io.kubernetes.client.openapi.models.V1NodeConfigStatusFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import java.lang.SuppressWarnings;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class V1NodeConfigStatusFluentImpl> extends BaseFluent implements V1NodeConfigStatusFluent{
public V1NodeConfigStatusFluentImpl() {
}
public V1NodeConfigStatusFluentImpl(V1NodeConfigStatus instance) {
if (instance != null) {
this.withActive(instance.getActive());
this.withAssigned(instance.getAssigned());
this.withError(instance.getError());
this.withLastKnownGood(instance.getLastKnownGood());
}
}
private V1NodeConfigSourceBuilder active;
private V1NodeConfigSourceBuilder assigned;
private String error;
private V1NodeConfigSourceBuilder lastKnownGood;
/**
* This method has been deprecated, please use method buildActive instead.
* @return The buildable object.
*/
@Deprecated
public V1NodeConfigSource getActive() {
return this.active!=null ?this.active.build():null;
}
public V1NodeConfigSource buildActive() {
return this.active!=null ?this.active.build():null;
}
public A withActive(V1NodeConfigSource active) {
_visitables.get("active").remove(this.active);
if (active!=null){ this.active= new V1NodeConfigSourceBuilder(active); _visitables.get("active").add(this.active);} else { this.active = null; _visitables.get("active").remove(this.active); } return (A) this;
}
public Boolean hasActive() {
return this.active != null;
}
public V1NodeConfigStatusFluentImpl.ActiveNested withNewActive() {
return new V1NodeConfigStatusFluentImpl.ActiveNestedImpl();
}
public V1NodeConfigStatusFluentImpl.ActiveNested withNewActiveLike(V1NodeConfigSource item) {
return new V1NodeConfigStatusFluentImpl.ActiveNestedImpl(item);
}
public V1NodeConfigStatusFluentImpl.ActiveNested editActive() {
return withNewActiveLike(getActive());
}
public V1NodeConfigStatusFluentImpl.ActiveNested editOrNewActive() {
return withNewActiveLike(getActive() != null ? getActive(): new V1NodeConfigSourceBuilder().build());
}
public V1NodeConfigStatusFluentImpl.ActiveNested editOrNewActiveLike(V1NodeConfigSource item) {
return withNewActiveLike(getActive() != null ? getActive(): item);
}
/**
* This method has been deprecated, please use method buildAssigned instead.
* @return The buildable object.
*/
@Deprecated
public V1NodeConfigSource getAssigned() {
return this.assigned!=null ?this.assigned.build():null;
}
public V1NodeConfigSource buildAssigned() {
return this.assigned!=null ?this.assigned.build():null;
}
public A withAssigned(V1NodeConfigSource assigned) {
_visitables.get("assigned").remove(this.assigned);
if (assigned!=null){ this.assigned= new V1NodeConfigSourceBuilder(assigned); _visitables.get("assigned").add(this.assigned);} else { this.assigned = null; _visitables.get("assigned").remove(this.assigned); } return (A) this;
}
public Boolean hasAssigned() {
return this.assigned != null;
}
public V1NodeConfigStatusFluentImpl.AssignedNested withNewAssigned() {
return new V1NodeConfigStatusFluentImpl.AssignedNestedImpl();
}
public V1NodeConfigStatusFluentImpl.AssignedNested withNewAssignedLike(V1NodeConfigSource item) {
return new V1NodeConfigStatusFluentImpl.AssignedNestedImpl(item);
}
public V1NodeConfigStatusFluentImpl.AssignedNested editAssigned() {
return withNewAssignedLike(getAssigned());
}
public V1NodeConfigStatusFluentImpl.AssignedNested editOrNewAssigned() {
return withNewAssignedLike(getAssigned() != null ? getAssigned(): new V1NodeConfigSourceBuilder().build());
}
public V1NodeConfigStatusFluentImpl.AssignedNested editOrNewAssignedLike(V1NodeConfigSource item) {
return withNewAssignedLike(getAssigned() != null ? getAssigned(): item);
}
public String getError() {
return this.error;
}
public A withError(String error) {
this.error=error; return (A) this;
}
public Boolean hasError() {
return this.error != null;
}
/**
* This method has been deprecated, please use method buildLastKnownGood instead.
* @return The buildable object.
*/
@Deprecated
public V1NodeConfigSource getLastKnownGood() {
return this.lastKnownGood!=null ?this.lastKnownGood.build():null;
}
public V1NodeConfigSource buildLastKnownGood() {
return this.lastKnownGood!=null ?this.lastKnownGood.build():null;
}
public A withLastKnownGood(V1NodeConfigSource lastKnownGood) {
_visitables.get("lastKnownGood").remove(this.lastKnownGood);
if (lastKnownGood!=null){ this.lastKnownGood= new V1NodeConfigSourceBuilder(lastKnownGood); _visitables.get("lastKnownGood").add(this.lastKnownGood);} else { this.lastKnownGood = null; _visitables.get("lastKnownGood").remove(this.lastKnownGood); } return (A) this;
}
public Boolean hasLastKnownGood() {
return this.lastKnownGood != null;
}
public V1NodeConfigStatusFluentImpl.LastKnownGoodNested withNewLastKnownGood() {
return new V1NodeConfigStatusFluentImpl.LastKnownGoodNestedImpl();
}
public V1NodeConfigStatusFluentImpl.LastKnownGoodNested withNewLastKnownGoodLike(V1NodeConfigSource item) {
return new V1NodeConfigStatusFluentImpl.LastKnownGoodNestedImpl(item);
}
public V1NodeConfigStatusFluentImpl.LastKnownGoodNested editLastKnownGood() {
return withNewLastKnownGoodLike(getLastKnownGood());
}
public V1NodeConfigStatusFluentImpl.LastKnownGoodNested editOrNewLastKnownGood() {
return withNewLastKnownGoodLike(getLastKnownGood() != null ? getLastKnownGood(): new V1NodeConfigSourceBuilder().build());
}
public V1NodeConfigStatusFluentImpl.LastKnownGoodNested editOrNewLastKnownGoodLike(V1NodeConfigSource item) {
return withNewLastKnownGoodLike(getLastKnownGood() != null ? getLastKnownGood(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
V1NodeConfigStatusFluentImpl that = (V1NodeConfigStatusFluentImpl) o;
if (!java.util.Objects.equals(active, that.active)) return false;
if (!java.util.Objects.equals(assigned, that.assigned)) return false;
if (!java.util.Objects.equals(error, that.error)) return false;
if (!java.util.Objects.equals(lastKnownGood, that.lastKnownGood)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(active, assigned, error, lastKnownGood, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (active != null) { sb.append("active:"); sb.append(active + ","); }
if (assigned != null) { sb.append("assigned:"); sb.append(assigned + ","); }
if (error != null) { sb.append("error:"); sb.append(error + ","); }
if (lastKnownGood != null) { sb.append("lastKnownGood:"); sb.append(lastKnownGood); }
sb.append("}");
return sb.toString();
}
class ActiveNestedImpl extends V1NodeConfigSourceFluentImpl> implements V1NodeConfigStatusFluentImpl.ActiveNested,Nested{
ActiveNestedImpl(V1NodeConfigSource item) {
this.builder = new V1NodeConfigSourceBuilder(this, item);
}
ActiveNestedImpl() {
this.builder = new V1NodeConfigSourceBuilder(this);
}
V1NodeConfigSourceBuilder builder;
public N and() {
return (N) V1NodeConfigStatusFluentImpl.this.withActive(builder.build());
}
public N endActive() {
return and();
}
}
class AssignedNestedImpl extends V1NodeConfigSourceFluentImpl> implements V1NodeConfigStatusFluentImpl.AssignedNested,Nested{
AssignedNestedImpl(V1NodeConfigSource item) {
this.builder = new V1NodeConfigSourceBuilder(this, item);
}
AssignedNestedImpl() {
this.builder = new V1NodeConfigSourceBuilder(this);
}
V1NodeConfigSourceBuilder builder;
public N and() {
return (N) V1NodeConfigStatusFluentImpl.this.withAssigned(builder.build());
}
public N endAssigned() {
return and();
}
}
class LastKnownGoodNestedImpl extends V1NodeConfigSourceFluentImpl> implements V1NodeConfigStatusFluentImpl.LastKnownGoodNested,Nested{
LastKnownGoodNestedImpl(V1NodeConfigSource item) {
this.builder = new V1NodeConfigSourceBuilder(this, item);
}
LastKnownGoodNestedImpl() {
this.builder = new V1NodeConfigSourceBuilder(this);
}
V1NodeConfigSourceBuilder builder;
public N and() {
return (N) V1NodeConfigStatusFluentImpl.this.withLastKnownGood(builder.build());
}
public N endLastKnownGood() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy