io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecBuilder Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model.autoscaling.v2beta1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class HorizontalPodAutoscalerSpecBuilder extends io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecFluentImpl implements VisitableBuilder {
io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecFluent> fluent;
Boolean validationEnabled;
public HorizontalPodAutoscalerSpecBuilder() {
this(true);
}
public HorizontalPodAutoscalerSpecBuilder(Boolean validationEnabled) {
this(new HorizontalPodAutoscalerSpec(), validationEnabled);
}
public HorizontalPodAutoscalerSpecBuilder(io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecFluent> fluent) {
this(fluent, true);
}
public HorizontalPodAutoscalerSpecBuilder(io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecFluent> fluent,Boolean validationEnabled) {
this(fluent, new HorizontalPodAutoscalerSpec(), validationEnabled);
}
public HorizontalPodAutoscalerSpecBuilder(io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecFluent> fluent,io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec instance) {
this(fluent, instance, true);
}
public HorizontalPodAutoscalerSpecBuilder(io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpecFluent> fluent,io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec instance,Boolean validationEnabled) {
this.fluent = fluent;
fluent.withMaxReplicas(instance.getMaxReplicas());
fluent.withMetrics(instance.getMetrics());
fluent.withMinReplicas(instance.getMinReplicas());
fluent.withScaleTargetRef(instance.getScaleTargetRef());
this.validationEnabled = validationEnabled;
}
public HorizontalPodAutoscalerSpecBuilder(io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec instance) {
this(instance,true);
}
public HorizontalPodAutoscalerSpecBuilder(io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec instance,Boolean validationEnabled) {
this.fluent = this;
this.withMaxReplicas(instance.getMaxReplicas());
this.withMetrics(instance.getMetrics());
this.withMinReplicas(instance.getMinReplicas());
this.withScaleTargetRef(instance.getScaleTargetRef());
this.validationEnabled = validationEnabled;
}
public io.fabric8.kubernetes.api.model.autoscaling.v2beta1.HorizontalPodAutoscalerSpec build() {
HorizontalPodAutoscalerSpec buildable = new HorizontalPodAutoscalerSpec(fluent.getMaxReplicas(),fluent.getMetrics(),fluent.getMinReplicas(),fluent.getScaleTargetRef());
return buildable;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
HorizontalPodAutoscalerSpecBuilder that = (HorizontalPodAutoscalerSpecBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(fluent, validationEnabled, super.hashCode());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy