io.alauda.kubernetes.api.model.extensions.RollingUpdateDaemonSetFluentImpl Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model.extensions;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.model.IntOrString;
import io.alauda.kubernetes.api.builder.Nested;
import com.fasterxml.jackson.databind.JsonSerializer;
import java.lang.String;
import com.fasterxml.jackson.databind.JsonDeserializer;
import io.alauda.kubernetes.api.model.IntOrStringBuilder;
import java.lang.Deprecated;
import io.alauda.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 java.lang.Override;
import com.fasterxml.jackson.core.JsonParser;
import java.lang.Integer;
import javax.validation.Valid;
import java.lang.Object;
import io.alauda.kubernetes.api.model.IntOrStringFluentImpl;
public class RollingUpdateDaemonSetFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements RollingUpdateDaemonSetFluent{
private IntOrStringBuilder maxUnavailable;
public RollingUpdateDaemonSetFluentImpl(){
}
public RollingUpdateDaemonSetFluentImpl(RollingUpdateDaemonSet instance){
this.withMaxUnavailable(instance.getMaxUnavailable());
}
/**
* This method has been deprecated, please use method buildMaxUnavailable instead.
*/
@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.remove(this.maxUnavailable);
if (maxUnavailable!=null){ this.maxUnavailable= new IntOrStringBuilder(maxUnavailable); _visitables.add(this.maxUnavailable);} return (A) this;
}
public Boolean hasMaxUnavailable(){
return this.maxUnavailable!=null;
}
public RollingUpdateDaemonSetFluent.MaxUnavailableNested withNewMaxUnavailable(){
return new MaxUnavailableNestedImpl();
}
public RollingUpdateDaemonSetFluent.MaxUnavailableNested withNewMaxUnavailableLike(IntOrString item){
return new MaxUnavailableNestedImpl(item);
}
public RollingUpdateDaemonSetFluent.MaxUnavailableNested editMaxUnavailable(){
return withNewMaxUnavailableLike(getMaxUnavailable());
}
public RollingUpdateDaemonSetFluent.MaxUnavailableNested editOrNewMaxUnavailable(){
return withNewMaxUnavailableLike(getMaxUnavailable() != null ? getMaxUnavailable(): new IntOrStringBuilder().build());
}
public RollingUpdateDaemonSetFluent.MaxUnavailableNested editOrNewMaxUnavailableLike(IntOrString item){
return withNewMaxUnavailableLike(getMaxUnavailable() != null ? getMaxUnavailable(): item);
}
public A withNewMaxUnavailable(Integer intVal){
return (A)withMaxUnavailable(new IntOrString(intVal));
}
public A withNewMaxUnavailable(String strVal){
return (A)withMaxUnavailable(new IntOrString(strVal));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
RollingUpdateDaemonSetFluentImpl that = (RollingUpdateDaemonSetFluentImpl) o;
if (maxUnavailable != null ? !maxUnavailable.equals(that.maxUnavailable) :that.maxUnavailable != null) return false;
return true;
}
public class MaxUnavailableNestedImpl extends IntOrStringFluentImpl> implements RollingUpdateDaemonSetFluent.MaxUnavailableNested,io.alauda.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) RollingUpdateDaemonSetFluentImpl.this.withMaxUnavailable(builder.build());
}
public N endMaxUnavailable(){
return and();
}
}
}