annotations.io.fabric8.kubernetes.api.model.apps.RollingUpdateDeploymentFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model.apps;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.model.IntOrString;
import io.fabric8.kubernetes.api.builder.Nested;
import com.fasterxml.jackson.databind.JsonSerializer;
import java.lang.String;
import com.fasterxml.jackson.databind.JsonDeserializer;
import io.fabric8.kubernetes.api.model.IntOrStringBuilder;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.lang.Boolean;
import com.fasterxml.jackson.core.JsonParser;
import java.lang.Integer;
import java.lang.Object;
import io.fabric8.kubernetes.api.model.IntOrStringFluentImpl;
public class RollingUpdateDeploymentFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements RollingUpdateDeploymentFluent {
private IntOrStringBuilder maxSurge;
private IntOrStringBuilder maxUnavailable;
public RollingUpdateDeploymentFluentImpl() {
}
public RollingUpdateDeploymentFluentImpl(RollingUpdateDeployment instance) {
this.withMaxSurge(instance.getMaxSurge());
this.withMaxUnavailable(instance.getMaxUnavailable());
}
/**
* This method has been deprecated, please use method buildMaxSurge instead.
* @return The buildable object.
*/
@Deprecated public IntOrString getMaxSurge() {
return this.maxSurge!=null?this.maxSurge.build():null;
}
public IntOrString buildMaxSurge() {
return this.maxSurge!=null?this.maxSurge.build():null;
}
public A withMaxSurge(IntOrString maxSurge) {
_visitables.get("maxSurge").remove(this.maxSurge);
if (maxSurge!=null){ this.maxSurge= new IntOrStringBuilder(maxSurge); _visitables.get("maxSurge").add(this.maxSurge);} return (A) this;
}
public Boolean hasMaxSurge() {
return this.maxSurge != null;
}
public A withNewMaxSurge(String strVal) {
return (A)withMaxSurge(new IntOrString(strVal));
}
public A withNewMaxSurge(Integer intVal) {
return (A)withMaxSurge(new IntOrString(intVal));
}
public RollingUpdateDeploymentFluent.MaxSurgeNested withNewMaxSurge() {
return new MaxSurgeNestedImpl();
}
public RollingUpdateDeploymentFluent.MaxSurgeNested withNewMaxSurgeLike(IntOrString item) {
return new MaxSurgeNestedImpl(item);
}
public RollingUpdateDeploymentFluent.MaxSurgeNested editMaxSurge() {
return withNewMaxSurgeLike(getMaxSurge());
}
public RollingUpdateDeploymentFluent.MaxSurgeNested editOrNewMaxSurge() {
return withNewMaxSurgeLike(getMaxSurge() != null ? getMaxSurge(): new IntOrStringBuilder().build());
}
public RollingUpdateDeploymentFluent.MaxSurgeNested editOrNewMaxSurgeLike(IntOrString item) {
return withNewMaxSurgeLike(getMaxSurge() != null ? getMaxSurge(): item);
}
/**
* This method has been deprecated, please use method buildMaxUnavailable instead.
* @return The buildable object.
*/
@Deprecated public IntOrString getMaxUnavailable() {
return this.maxUnavailable!=null?this.maxUnavailable.build():null;
}
public IntOrString buildMaxUnavailable() {
return this.maxUnavailable!=null?this.maxUnavailable.build():null;
}
public A withMaxUnavailable(IntOrString maxUnavailable) {
_visitables.get("maxUnavailable").remove(this.maxUnavailable);
if (maxUnavailable!=null){ this.maxUnavailable= new IntOrStringBuilder(maxUnavailable); _visitables.get("maxUnavailable").add(this.maxUnavailable);} return (A) this;
}
public Boolean hasMaxUnavailable() {
return this.maxUnavailable != null;
}
public A withNewMaxUnavailable(String strVal) {
return (A)withMaxUnavailable(new IntOrString(strVal));
}
public A withNewMaxUnavailable(Integer intVal) {
return (A)withMaxUnavailable(new IntOrString(intVal));
}
public RollingUpdateDeploymentFluent.MaxUnavailableNested withNewMaxUnavailable() {
return new MaxUnavailableNestedImpl();
}
public RollingUpdateDeploymentFluent.MaxUnavailableNested withNewMaxUnavailableLike(IntOrString item) {
return new MaxUnavailableNestedImpl(item);
}
public RollingUpdateDeploymentFluent.MaxUnavailableNested editMaxUnavailable() {
return withNewMaxUnavailableLike(getMaxUnavailable());
}
public RollingUpdateDeploymentFluent.MaxUnavailableNested editOrNewMaxUnavailable() {
return withNewMaxUnavailableLike(getMaxUnavailable() != null ? getMaxUnavailable(): new IntOrStringBuilder().build());
}
public RollingUpdateDeploymentFluent.MaxUnavailableNested editOrNewMaxUnavailableLike(IntOrString item) {
return withNewMaxUnavailableLike(getMaxUnavailable() != null ? getMaxUnavailable(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RollingUpdateDeploymentFluentImpl that = (RollingUpdateDeploymentFluentImpl) o;
if (maxSurge != null ? !maxSurge.equals(that.maxSurge) :that.maxSurge != null) return false;
if (maxUnavailable != null ? !maxUnavailable.equals(that.maxUnavailable) :that.maxUnavailable != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(maxSurge, maxUnavailable, super.hashCode());
}
public class MaxSurgeNestedImpl extends IntOrStringFluentImpl> implements RollingUpdateDeploymentFluent.MaxSurgeNested,io.fabric8.kubernetes.api.builder.Nested {
private final IntOrStringBuilder builder;
MaxSurgeNestedImpl(IntOrString item) {
this.builder = new IntOrStringBuilder(this, item);
}
MaxSurgeNestedImpl() {
this.builder = new IntOrStringBuilder(this);
}
public N and() {
return (N) RollingUpdateDeploymentFluentImpl.this.withMaxSurge(builder.build());
}
public N endMaxSurge() {
return and();
}
}
public class MaxUnavailableNestedImpl extends IntOrStringFluentImpl> implements RollingUpdateDeploymentFluent.MaxUnavailableNested,io.fabric8.kubernetes.api.builder.Nested {
private final IntOrStringBuilder builder;
MaxUnavailableNestedImpl(IntOrString item) {
this.builder = new IntOrStringBuilder(this, item);
}
MaxUnavailableNestedImpl() {
this.builder = new IntOrStringBuilder(this);
}
public N and() {
return (N) RollingUpdateDeploymentFluentImpl.this.withMaxUnavailable(builder.build());
}
public N endMaxUnavailable() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy