io.dekorate.servicebinding.model.ServiceBindingFluentImpl Maven / Gradle / Ivy
package io.dekorate.servicebinding.model;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import java.lang.Object;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class ServiceBindingFluentImpl> extends BaseFluent implements ServiceBindingFluent{
public ServiceBindingFluentImpl() {
}
public ServiceBindingFluentImpl(ServiceBinding instance) {
this.withKind(instance.getKind());
this.withApiVersion(instance.getApiVersion());
this.withMetadata(instance.getMetadata());
this.withSpec(instance.getSpec());
this.withStatus(instance.getStatus());
}
private String kind;
private String apiVersion;
private ObjectMetaBuilder metadata;
private ServiceBindingSpecBuilder spec;
private ServiceBindingStatusBuilder status;
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 String getApiVersion() {
return this.apiVersion;
}
public A withApiVersion(String apiVersion) {
this.apiVersion=apiVersion; return (A) this;
}
public Boolean hasApiVersion() {
return this.apiVersion != null;
}
/**
* This method has been deprecated, please use method buildMetadata instead.
* @return The buildable object.
*/
@Deprecated
public ObjectMeta getMetadata() {
return this.metadata!=null ?this.metadata.build():null;
}
public ObjectMeta buildMetadata() {
return this.metadata!=null ?this.metadata.build():null;
}
public A withMetadata(ObjectMeta metadata) {
_visitables.get("metadata").remove(this.metadata);
if (metadata!=null){ this.metadata= new ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} else { this.metadata = null; _visitables.get("metadata").remove(this.metadata); } return (A) this;
}
public Boolean hasMetadata() {
return this.metadata != null;
}
public ServiceBindingFluent.MetadataNested withNewMetadata() {
return new ServiceBindingFluentImpl.MetadataNestedImpl();
}
public ServiceBindingFluent.MetadataNested withNewMetadataLike(ObjectMeta item) {
return new ServiceBindingFluentImpl.MetadataNestedImpl(item);
}
public ServiceBindingFluent.MetadataNested editMetadata() {
return withNewMetadataLike(getMetadata());
}
public ServiceBindingFluent.MetadataNested editOrNewMetadata() {
return withNewMetadataLike(getMetadata() != null ? getMetadata(): new ObjectMetaBuilder().build());
}
public ServiceBindingFluent.MetadataNested editOrNewMetadataLike(ObjectMeta item) {
return withNewMetadataLike(getMetadata() != null ? getMetadata(): item);
}
/**
* This method has been deprecated, please use method buildSpec instead.
* @return The buildable object.
*/
@Deprecated
public ServiceBindingSpec getSpec() {
return this.spec!=null ?this.spec.build():null;
}
public ServiceBindingSpec buildSpec() {
return this.spec!=null ?this.spec.build():null;
}
public A withSpec(ServiceBindingSpec spec) {
_visitables.get("spec").remove(this.spec);
if (spec!=null){ this.spec= new ServiceBindingSpecBuilder(spec); _visitables.get("spec").add(this.spec);} else { this.spec = null; _visitables.get("spec").remove(this.spec); } return (A) this;
}
public Boolean hasSpec() {
return this.spec != null;
}
public ServiceBindingFluent.SpecNested withNewSpec() {
return new ServiceBindingFluentImpl.SpecNestedImpl();
}
public ServiceBindingFluent.SpecNested withNewSpecLike(ServiceBindingSpec item) {
return new ServiceBindingFluentImpl.SpecNestedImpl(item);
}
public ServiceBindingFluent.SpecNested editSpec() {
return withNewSpecLike(getSpec());
}
public ServiceBindingFluent.SpecNested editOrNewSpec() {
return withNewSpecLike(getSpec() != null ? getSpec(): new ServiceBindingSpecBuilder().build());
}
public ServiceBindingFluent.SpecNested editOrNewSpecLike(ServiceBindingSpec item) {
return withNewSpecLike(getSpec() != null ? getSpec(): item);
}
/**
* This method has been deprecated, please use method buildStatus instead.
* @return The buildable object.
*/
@Deprecated
public ServiceBindingStatus getStatus() {
return this.status!=null ?this.status.build():null;
}
public ServiceBindingStatus buildStatus() {
return this.status!=null ?this.status.build():null;
}
public A withStatus(ServiceBindingStatus status) {
_visitables.get("status").remove(this.status);
if (status!=null){ this.status= new ServiceBindingStatusBuilder(status); _visitables.get("status").add(this.status);} else { this.status = null; _visitables.get("status").remove(this.status); } return (A) this;
}
public Boolean hasStatus() {
return this.status != null;
}
public ServiceBindingFluent.StatusNested withNewStatus() {
return new ServiceBindingFluentImpl.StatusNestedImpl();
}
public ServiceBindingFluent.StatusNested withNewStatusLike(ServiceBindingStatus item) {
return new ServiceBindingFluentImpl.StatusNestedImpl(item);
}
public ServiceBindingFluent.StatusNested editStatus() {
return withNewStatusLike(getStatus());
}
public ServiceBindingFluent.StatusNested editOrNewStatus() {
return withNewStatusLike(getStatus() != null ? getStatus(): new ServiceBindingStatusBuilder().build());
}
public ServiceBindingFluent.StatusNested editOrNewStatusLike(ServiceBindingStatus item) {
return withNewStatusLike(getStatus() != null ? getStatus(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ServiceBindingFluentImpl that = (ServiceBindingFluentImpl) o;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
if (spec != null ? !spec.equals(that.spec) :that.spec != 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(kind, apiVersion, metadata, spec, status, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (kind != null) { sb.append("kind:"); sb.append(kind + ","); }
if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); }
if (metadata != null) { sb.append("metadata:"); sb.append(metadata + ","); }
if (spec != null) { sb.append("spec:"); sb.append(spec + ","); }
if (status != null) { sb.append("status:"); sb.append(status); }
sb.append("}");
return sb.toString();
}
class MetadataNestedImpl extends ObjectMetaFluentImpl> implements ServiceBindingFluent.MetadataNested,Nested{
MetadataNestedImpl(ObjectMeta item) {
this.builder = new ObjectMetaBuilder(this, item);
}
MetadataNestedImpl() {
this.builder = new ObjectMetaBuilder(this);
}
ObjectMetaBuilder builder;
public N and() {
return (N) ServiceBindingFluentImpl.this.withMetadata(builder.build());
}
public N endMetadata() {
return and();
}
}
class SpecNestedImpl extends ServiceBindingSpecFluentImpl> implements ServiceBindingFluent.SpecNested,Nested{
SpecNestedImpl(ServiceBindingSpec item) {
this.builder = new ServiceBindingSpecBuilder(this, item);
}
SpecNestedImpl() {
this.builder = new ServiceBindingSpecBuilder(this);
}
ServiceBindingSpecBuilder builder;
public N and() {
return (N) ServiceBindingFluentImpl.this.withSpec(builder.build());
}
public N endSpec() {
return and();
}
}
class StatusNestedImpl extends ServiceBindingStatusFluentImpl> implements ServiceBindingFluent.StatusNested,Nested{
StatusNestedImpl(ServiceBindingStatus item) {
this.builder = new ServiceBindingStatusBuilder(this, item);
}
StatusNestedImpl() {
this.builder = new ServiceBindingStatusBuilder(this);
}
ServiceBindingStatusBuilder builder;
public N and() {
return (N) ServiceBindingFluentImpl.this.withStatus(builder.build());
}
public N endStatus() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy