io.kubernetes.client.openapi.models.V1beta1PriorityLevelConfigurationSpecFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import java.lang.StringBuilder;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.StringBuffer;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class V1beta1PriorityLevelConfigurationSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1PriorityLevelConfigurationSpecFluent {
private V1beta1LimitedPriorityLevelConfigurationBuilder limited;
private String type;
public V1beta1PriorityLevelConfigurationSpecFluentImpl() {
}
public V1beta1PriorityLevelConfigurationSpecFluentImpl(V1beta1PriorityLevelConfigurationSpec instance) {
this.withLimited(instance.getLimited());
this.withType(instance.getType());
}
/**
* This method has been deprecated, please use method buildLimited instead.
* @return The buildable object.
*/
@Deprecated public V1beta1LimitedPriorityLevelConfiguration getLimited() {
return this.limited!=null?this.limited.build():null;
}
public V1beta1LimitedPriorityLevelConfiguration buildLimited() {
return this.limited!=null?this.limited.build():null;
}
public A withLimited(V1beta1LimitedPriorityLevelConfiguration limited) {
_visitables.get("limited").remove(this.limited);
if (limited!=null){ this.limited= new V1beta1LimitedPriorityLevelConfigurationBuilder(limited); _visitables.get("limited").add(this.limited);} return (A) this;
}
public Boolean hasLimited() {
return this.limited != null;
}
public V1beta1PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimited() {
return new LimitedNestedImpl();
}
public V1beta1PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimitedLike(V1beta1LimitedPriorityLevelConfiguration item) {
return new LimitedNestedImpl(item);
}
public V1beta1PriorityLevelConfigurationSpecFluent.LimitedNested editLimited() {
return withNewLimitedLike(getLimited());
}
public V1beta1PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimited() {
return withNewLimitedLike(getLimited() != null ? getLimited(): new V1beta1LimitedPriorityLevelConfigurationBuilder().build());
}
public V1beta1PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimitedLike(V1beta1LimitedPriorityLevelConfiguration item) {
return withNewLimitedLike(getLimited() != null ? getLimited(): item);
}
public String getType() {
return this.type;
}
public A withType(String type) {
this.type=type; return (A) this;
}
public Boolean hasType() {
return this.type != null;
}
public A withNewType(String arg1) {
return (A)withType(new String(arg1));
}
public A withNewType(StringBuilder arg1) {
return (A)withType(new String(arg1));
}
public A withNewType(StringBuffer arg1) {
return (A)withType(new String(arg1));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1beta1PriorityLevelConfigurationSpecFluentImpl that = (V1beta1PriorityLevelConfigurationSpecFluentImpl) o;
if (limited != null ? !limited.equals(that.limited) :that.limited != null) return false;
if (type != null ? !type.equals(that.type) :that.type != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(limited, type, super.hashCode());
}
public class LimitedNestedImpl extends V1beta1LimitedPriorityLevelConfigurationFluentImpl> implements V1beta1PriorityLevelConfigurationSpecFluent.LimitedNested,io.kubernetes.client.fluent.Nested {
private final V1beta1LimitedPriorityLevelConfigurationBuilder builder;
LimitedNestedImpl(V1beta1LimitedPriorityLevelConfiguration item) {
this.builder = new V1beta1LimitedPriorityLevelConfigurationBuilder(this, item);
}
LimitedNestedImpl() {
this.builder = new V1beta1LimitedPriorityLevelConfigurationBuilder(this);
}
public N and() {
return (N) V1beta1PriorityLevelConfigurationSpecFluentImpl.this.withLimited(builder.build());
}
public N endLimited() {
return and();
}
}
}