io.quarkiverse.operatorsdk.runtime.CRDGenerationInfo Maven / Gradle / Ivy
The newest version!
package io.quarkiverse.operatorsdk.runtime;
import java.util.Map;
import java.util.Set;
import io.quarkus.runtime.annotations.IgnoreProperty;
import io.quarkus.runtime.annotations.RecordableConstructor;
public class CRDGenerationInfo {
private final boolean applyCRDs;
private final boolean validateCRDs;
private final CRDInfos crds;
private final Set generated;
@RecordableConstructor // constructor needs to be recordable for the class to be passed around by Quarkus
public CRDGenerationInfo(boolean applyCRDs, boolean validateCRDs, CRDInfos crds,
Set generated) {
this.applyCRDs = applyCRDs;
this.validateCRDs = validateCRDs;
this.crds = crds;
this.generated = generated;
}
// Needed by Quarkus: if this method isn't present, state is not properly set
public CRDInfos getCrds() {
return crds;
}
// Needed by Quarkus: if this method isn't present, state is not properly set
public Set getGenerated() {
return generated;
}
// Needed by Quarkus: if this method isn't present, state is not properly set
public boolean isApplyCRDs() {
return applyCRDs;
}
@IgnoreProperty
public Map getCRDInfosFor(String crdName) {
return crds.getOrCreateCRDSpecVersionToInfoMapping(crdName);
}
public boolean isValidateCRDs() {
return validateCRDs;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy