io.kubernetes.client.openapi.models.V1VolumeNodeAffinityFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class V1VolumeNodeAffinityFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1VolumeNodeAffinityFluent {
private V1NodeSelectorBuilder required;
public V1VolumeNodeAffinityFluentImpl() {
}
public V1VolumeNodeAffinityFluentImpl(V1VolumeNodeAffinity instance) {
this.withRequired(instance.getRequired());
}
/**
* This method has been deprecated, please use method buildRequired instead.
* @return The buildable object.
*/
@Deprecated public V1NodeSelector getRequired() {
return this.required!=null?this.required.build():null;
}
public V1NodeSelector buildRequired() {
return this.required!=null?this.required.build():null;
}
public A withRequired(V1NodeSelector required) {
_visitables.get("required").remove(this.required);
if (required!=null){ this.required= new V1NodeSelectorBuilder(required); _visitables.get("required").add(this.required);} return (A) this;
}
public Boolean hasRequired() {
return this.required != null;
}
public V1VolumeNodeAffinityFluent.RequiredNested withNewRequired() {
return new RequiredNestedImpl();
}
public V1VolumeNodeAffinityFluent.RequiredNested withNewRequiredLike(V1NodeSelector item) {
return new RequiredNestedImpl(item);
}
public V1VolumeNodeAffinityFluent.RequiredNested editRequired() {
return withNewRequiredLike(getRequired());
}
public V1VolumeNodeAffinityFluent.RequiredNested editOrNewRequired() {
return withNewRequiredLike(getRequired() != null ? getRequired(): new V1NodeSelectorBuilder().build());
}
public V1VolumeNodeAffinityFluent.RequiredNested editOrNewRequiredLike(V1NodeSelector item) {
return withNewRequiredLike(getRequired() != null ? getRequired(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1VolumeNodeAffinityFluentImpl that = (V1VolumeNodeAffinityFluentImpl) o;
if (required != null ? !required.equals(that.required) :that.required != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(required, super.hashCode());
}
public class RequiredNestedImpl extends V1NodeSelectorFluentImpl> implements V1VolumeNodeAffinityFluent.RequiredNested,io.kubernetes.client.fluent.Nested {
private final V1NodeSelectorBuilder builder;
RequiredNestedImpl(V1NodeSelector item) {
this.builder = new V1NodeSelectorBuilder(this, item);
}
RequiredNestedImpl() {
this.builder = new V1NodeSelectorBuilder(this);
}
public N and() {
return (N) V1VolumeNodeAffinityFluentImpl.this.withRequired(builder.build());
}
public N endRequired() {
return and();
}
}
}