io.kubernetes.client.openapi.models.V1StatusFluentImpl 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.Integer;
import java.lang.StringBuffer;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class V1StatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1StatusFluent {
private String apiVersion;
private Integer code;
private V1StatusDetailsBuilder details;
private String kind;
private String message;
private V1ListMetaBuilder metadata;
private String reason;
private String status;
public V1StatusFluentImpl() {
}
public V1StatusFluentImpl(V1Status instance) {
this.withApiVersion(instance.getApiVersion());
this.withCode(instance.getCode());
this.withDetails(instance.getDetails());
this.withKind(instance.getKind());
this.withMessage(instance.getMessage());
this.withMetadata(instance.getMetadata());
this.withReason(instance.getReason());
this.withStatus(instance.getStatus());
}
public String getApiVersion() {
return this.apiVersion;
}
public A withApiVersion(String apiVersion) {
this.apiVersion=apiVersion; return (A) this;
}
public Boolean hasApiVersion() {
return this.apiVersion != null;
}
public A withNewApiVersion(String arg1) {
return (A)withApiVersion(new String(arg1));
}
public A withNewApiVersion(StringBuilder arg1) {
return (A)withApiVersion(new String(arg1));
}
public A withNewApiVersion(StringBuffer arg1) {
return (A)withApiVersion(new String(arg1));
}
public Integer getCode() {
return this.code;
}
public A withCode(Integer code) {
this.code=code; return (A) this;
}
public Boolean hasCode() {
return this.code != null;
}
/**
* This method has been deprecated, please use method buildDetails instead.
* @return The buildable object.
*/
@Deprecated public V1StatusDetails getDetails() {
return this.details!=null?this.details.build():null;
}
public V1StatusDetails buildDetails() {
return this.details!=null?this.details.build():null;
}
public A withDetails(V1StatusDetails details) {
_visitables.get("details").remove(this.details);
if (details!=null){ this.details= new V1StatusDetailsBuilder(details); _visitables.get("details").add(this.details);} return (A) this;
}
public Boolean hasDetails() {
return this.details != null;
}
public V1StatusFluent.DetailsNested withNewDetails() {
return new DetailsNestedImpl();
}
public V1StatusFluent.DetailsNested withNewDetailsLike(V1StatusDetails item) {
return new DetailsNestedImpl(item);
}
public V1StatusFluent.DetailsNested editDetails() {
return withNewDetailsLike(getDetails());
}
public V1StatusFluent.DetailsNested editOrNewDetails() {
return withNewDetailsLike(getDetails() != null ? getDetails(): new V1StatusDetailsBuilder().build());
}
public V1StatusFluent.DetailsNested editOrNewDetailsLike(V1StatusDetails item) {
return withNewDetailsLike(getDetails() != null ? getDetails(): item);
}
public String getKind() {
return this.kind;
}
public A withKind(String kind) {
this.kind=kind; return (A) this;
}
public Boolean hasKind() {
return this.kind != null;
}
public A withNewKind(String arg1) {
return (A)withKind(new String(arg1));
}
public A withNewKind(StringBuilder arg1) {
return (A)withKind(new String(arg1));
}
public A withNewKind(StringBuffer arg1) {
return (A)withKind(new String(arg1));
}
public String getMessage() {
return this.message;
}
public A withMessage(String message) {
this.message=message; return (A) this;
}
public Boolean hasMessage() {
return this.message != null;
}
public A withNewMessage(String arg1) {
return (A)withMessage(new String(arg1));
}
public A withNewMessage(StringBuilder arg1) {
return (A)withMessage(new String(arg1));
}
public A withNewMessage(StringBuffer arg1) {
return (A)withMessage(new String(arg1));
}
/**
* This method has been deprecated, please use method buildMetadata instead.
* @return The buildable object.
*/
@Deprecated public V1ListMeta getMetadata() {
return this.metadata!=null?this.metadata.build():null;
}
public V1ListMeta buildMetadata() {
return this.metadata!=null?this.metadata.build():null;
}
public A withMetadata(V1ListMeta metadata) {
_visitables.get("metadata").remove(this.metadata);
if (metadata!=null){ this.metadata= new V1ListMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} return (A) this;
}
public Boolean hasMetadata() {
return this.metadata != null;
}
public V1StatusFluent.MetadataNested withNewMetadata() {
return new MetadataNestedImpl();
}
public V1StatusFluent.MetadataNested withNewMetadataLike(V1ListMeta item) {
return new MetadataNestedImpl(item);
}
public V1StatusFluent.MetadataNested editMetadata() {
return withNewMetadataLike(getMetadata());
}
public V1StatusFluent.MetadataNested editOrNewMetadata() {
return withNewMetadataLike(getMetadata() != null ? getMetadata(): new V1ListMetaBuilder().build());
}
public V1StatusFluent.MetadataNested editOrNewMetadataLike(V1ListMeta item) {
return withNewMetadataLike(getMetadata() != null ? getMetadata(): item);
}
public String getReason() {
return this.reason;
}
public A withReason(String reason) {
this.reason=reason; return (A) this;
}
public Boolean hasReason() {
return this.reason != null;
}
public A withNewReason(String arg1) {
return (A)withReason(new String(arg1));
}
public A withNewReason(StringBuilder arg1) {
return (A)withReason(new String(arg1));
}
public A withNewReason(StringBuffer arg1) {
return (A)withReason(new String(arg1));
}
public String getStatus() {
return this.status;
}
public A withStatus(String status) {
this.status=status; return (A) this;
}
public Boolean hasStatus() {
return this.status != null;
}
public A withNewStatus(String arg1) {
return (A)withStatus(new String(arg1));
}
public A withNewStatus(StringBuilder arg1) {
return (A)withStatus(new String(arg1));
}
public A withNewStatus(StringBuffer arg1) {
return (A)withStatus(new String(arg1));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1StatusFluentImpl that = (V1StatusFluentImpl) o;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
if (code != null ? !code.equals(that.code) :that.code != null) return false;
if (details != null ? !details.equals(that.details) :that.details != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (message != null ? !message.equals(that.message) :that.message != null) return false;
if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
if (reason != null ? !reason.equals(that.reason) :that.reason != null) return false;
if (status != null ? !status.equals(that.status) :that.status != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(apiVersion, code, details, kind, message, metadata, reason, status, super.hashCode());
}
public class DetailsNestedImpl extends V1StatusDetailsFluentImpl> implements V1StatusFluent.DetailsNested,io.kubernetes.client.fluent.Nested {
private final V1StatusDetailsBuilder builder;
DetailsNestedImpl(V1StatusDetails item) {
this.builder = new V1StatusDetailsBuilder(this, item);
}
DetailsNestedImpl() {
this.builder = new V1StatusDetailsBuilder(this);
}
public N and() {
return (N) V1StatusFluentImpl.this.withDetails(builder.build());
}
public N endDetails() {
return and();
}
}
public class MetadataNestedImpl extends V1ListMetaFluentImpl> implements V1StatusFluent.MetadataNested,io.kubernetes.client.fluent.Nested {
private final V1ListMetaBuilder builder;
MetadataNestedImpl(V1ListMeta item) {
this.builder = new V1ListMetaBuilder(this, item);
}
MetadataNestedImpl() {
this.builder = new V1ListMetaBuilder(this);
}
public N and() {
return (N) V1StatusFluentImpl.this.withMetadata(builder.build());
}
public N endMetadata() {
return and();
}
}
}