io.kubernetes.client.openapi.models.V1alpha1PriorityLevelConfigurationSpecFluentImpl 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 V1alpha1PriorityLevelConfigurationSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1alpha1PriorityLevelConfigurationSpecFluent {
private V1alpha1LimitedPriorityLevelConfigurationBuilder limited;
private String type;
public V1alpha1PriorityLevelConfigurationSpecFluentImpl() {
}
public V1alpha1PriorityLevelConfigurationSpecFluentImpl(V1alpha1PriorityLevelConfigurationSpec 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 V1alpha1LimitedPriorityLevelConfiguration getLimited() {
return this.limited!=null?this.limited.build():null;
}
public V1alpha1LimitedPriorityLevelConfiguration buildLimited() {
return this.limited!=null?this.limited.build():null;
}
public A withLimited(V1alpha1LimitedPriorityLevelConfiguration limited) {
_visitables.get("limited").remove(this.limited);
if (limited!=null){ this.limited= new V1alpha1LimitedPriorityLevelConfigurationBuilder(limited); _visitables.get("limited").add(this.limited);} return (A) this;
}
public Boolean hasLimited() {
return this.limited != null;
}
public V1alpha1PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimited() {
return new LimitedNestedImpl();
}
public V1alpha1PriorityLevelConfigurationSpecFluent.LimitedNested withNewLimitedLike(V1alpha1LimitedPriorityLevelConfiguration item) {
return new LimitedNestedImpl(item);
}
public V1alpha1PriorityLevelConfigurationSpecFluent.LimitedNested editLimited() {
return withNewLimitedLike(getLimited());
}
public V1alpha1PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimited() {
return withNewLimitedLike(getLimited() != null ? getLimited(): new V1alpha1LimitedPriorityLevelConfigurationBuilder().build());
}
public V1alpha1PriorityLevelConfigurationSpecFluent.LimitedNested editOrNewLimitedLike(V1alpha1LimitedPriorityLevelConfiguration 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;
V1alpha1PriorityLevelConfigurationSpecFluentImpl that = (V1alpha1PriorityLevelConfigurationSpecFluentImpl) 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 V1alpha1LimitedPriorityLevelConfigurationFluentImpl> implements V1alpha1PriorityLevelConfigurationSpecFluent.LimitedNested,io.kubernetes.client.fluent.Nested {
private final V1alpha1LimitedPriorityLevelConfigurationBuilder builder;
LimitedNestedImpl(V1alpha1LimitedPriorityLevelConfiguration item) {
this.builder = new V1alpha1LimitedPriorityLevelConfigurationBuilder(this, item);
}
LimitedNestedImpl() {
this.builder = new V1alpha1LimitedPriorityLevelConfigurationBuilder(this);
}
public N and() {
return (N) V1alpha1PriorityLevelConfigurationSpecFluentImpl.this.withLimited(builder.build());
}
public N endLimited() {
return and();
}
}
}