io.strimzi.api.kafka.model.KafkaConnectFluentImpl Maven / Gradle / Ivy
package io.strimzi.api.kafka.model;
import io.strimzi.api.kafka.model.status.KafkaConnectStatus;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import io.strimzi.api.kafka.model.status.KafkaConnectStatusFluentImpl;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class KafkaConnectFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.strimzi.api.kafka.model.KafkaConnectFluent {
private java.lang.String apiVersion;
private java.lang.String kind;
private io.strimzi.api.kafka.model.KafkaConnectSpecBuilder spec;
private io.fabric8.kubernetes.api.model.ObjectMetaBuilder metadata;
private io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder status;
public KafkaConnectFluentImpl() {
}
public KafkaConnectFluentImpl(io.strimzi.api.kafka.model.KafkaConnect instance) {
this.withApiVersion(instance.getApiVersion());
this.withSpec(instance.getSpec());
this.withMetadata(instance.getMetadata());
this.withStatus(instance.getStatus());
}
public java.lang.String getApiVersion() {
return this.apiVersion;
}
public A withApiVersion(java.lang.String apiVersion) {
this.apiVersion=apiVersion; return (A) this;
}
public java.lang.Boolean hasApiVersion() {
return this.apiVersion != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withApiVersion instead.
*/
public A withNewApiVersion(java.lang.String original) {
return (A)withApiVersion(new String(original));
}
public java.lang.String getKind() {
return this.kind;
}
public A withKind(java.lang.String kind) {
this.kind=kind; return (A) this;
}
public java.lang.Boolean hasKind() {
return this.kind != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withKind instead.
*/
public A withNewKind(java.lang.String original) {
return (A)withKind(new String(original));
}
@java.lang.Deprecated
/**
* This method has been deprecated, please use method buildSpec instead.
* @return The buildable object.
*/
public io.strimzi.api.kafka.model.KafkaConnectSpec getSpec() {
return this.spec!=null?this.spec.build():null;
}
public io.strimzi.api.kafka.model.KafkaConnectSpec buildSpec() {
return this.spec!=null?this.spec.build():null;
}
public A withSpec(io.strimzi.api.kafka.model.KafkaConnectSpec spec) {
_visitables.get("spec").remove(this.spec);
if (spec!=null){ this.spec= new io.strimzi.api.kafka.model.KafkaConnectSpecBuilder(spec); _visitables.get("spec").add(this.spec);} return (A) this;
}
public java.lang.Boolean hasSpec() {
return this.spec != null;
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.SpecNested withNewSpec() {
return new io.strimzi.api.kafka.model.KafkaConnectFluentImpl.SpecNestedImpl();
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.SpecNested withNewSpecLike(io.strimzi.api.kafka.model.KafkaConnectSpec item) {
return new io.strimzi.api.kafka.model.KafkaConnectFluentImpl.SpecNestedImpl(item);
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.SpecNested editSpec() {
return withNewSpecLike(getSpec());
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.SpecNested editOrNewSpec() {
return withNewSpecLike(getSpec() != null ? getSpec(): new io.strimzi.api.kafka.model.KafkaConnectSpecBuilder().build());
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.SpecNested editOrNewSpecLike(io.strimzi.api.kafka.model.KafkaConnectSpec item) {
return withNewSpecLike(getSpec() != null ? getSpec(): item);
}
@java.lang.Deprecated
/**
* This method has been deprecated, please use method buildMetadata instead.
* @return The buildable object.
*/
public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() {
return this.metadata!=null?this.metadata.build():null;
}
public io.fabric8.kubernetes.api.model.ObjectMeta buildMetadata() {
return this.metadata!=null?this.metadata.build():null;
}
public A withMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) {
_visitables.get("metadata").remove(this.metadata);
if (metadata!=null){ this.metadata= new io.fabric8.kubernetes.api.model.ObjectMetaBuilder(metadata); _visitables.get("metadata").add(this.metadata);} return (A) this;
}
public java.lang.Boolean hasMetadata() {
return this.metadata != null;
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.MetadataNested withNewMetadata() {
return new io.strimzi.api.kafka.model.KafkaConnectFluentImpl.MetadataNestedImpl();
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.MetadataNested withNewMetadataLike(io.fabric8.kubernetes.api.model.ObjectMeta item) {
return new io.strimzi.api.kafka.model.KafkaConnectFluentImpl.MetadataNestedImpl(item);
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.MetadataNested editMetadata() {
return withNewMetadataLike(getMetadata());
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.MetadataNested editOrNewMetadata() {
return withNewMetadataLike(getMetadata() != null ? getMetadata(): new io.fabric8.kubernetes.api.model.ObjectMetaBuilder().build());
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.MetadataNested editOrNewMetadataLike(io.fabric8.kubernetes.api.model.ObjectMeta item) {
return withNewMetadataLike(getMetadata() != null ? getMetadata(): item);
}
@java.lang.Deprecated
/**
* This method has been deprecated, please use method buildStatus instead.
* @return The buildable object.
*/
public io.strimzi.api.kafka.model.status.KafkaConnectStatus getStatus() {
return this.status!=null?this.status.build():null;
}
public io.strimzi.api.kafka.model.status.KafkaConnectStatus buildStatus() {
return this.status!=null?this.status.build():null;
}
public A withStatus(io.strimzi.api.kafka.model.status.KafkaConnectStatus status) {
_visitables.get("status").remove(this.status);
if (status!=null){ this.status= new io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder(status); _visitables.get("status").add(this.status);} return (A) this;
}
public java.lang.Boolean hasStatus() {
return this.status != null;
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.StatusNested withNewStatus() {
return new io.strimzi.api.kafka.model.KafkaConnectFluentImpl.StatusNestedImpl();
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.StatusNested withNewStatusLike(io.strimzi.api.kafka.model.status.KafkaConnectStatus item) {
return new io.strimzi.api.kafka.model.KafkaConnectFluentImpl.StatusNestedImpl(item);
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.StatusNested editStatus() {
return withNewStatusLike(getStatus());
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.StatusNested editOrNewStatus() {
return withNewStatusLike(getStatus() != null ? getStatus(): new io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder().build());
}
public io.strimzi.api.kafka.model.KafkaConnectFluent.StatusNested editOrNewStatusLike(io.strimzi.api.kafka.model.status.KafkaConnectStatus item) {
return withNewStatusLike(getStatus() != null ? getStatus(): item);
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
KafkaConnectFluentImpl that = (KafkaConnectFluentImpl) o;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (spec != null ? !spec.equals(that.spec) :that.spec != null) return false;
if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != 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, kind, spec, metadata, status, super.hashCode());
}
public class SpecNestedImpl extends io.strimzi.api.kafka.model.KafkaConnectSpecFluentImpl> implements io.strimzi.api.kafka.model.KafkaConnectFluent.SpecNested,io.fabric8.kubernetes.api.builder.Nested {
private final io.strimzi.api.kafka.model.KafkaConnectSpecBuilder builder;
SpecNestedImpl(io.strimzi.api.kafka.model.KafkaConnectSpec item) {
this.builder = new io.strimzi.api.kafka.model.KafkaConnectSpecBuilder(this, item);
}
SpecNestedImpl() {
this.builder = new io.strimzi.api.kafka.model.KafkaConnectSpecBuilder(this);
}
public N and() {
return (N) KafkaConnectFluentImpl.this.withSpec(builder.build());
}
public N endSpec() {
return and();
}
}
public class MetadataNestedImpl extends io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl> implements io.strimzi.api.kafka.model.KafkaConnectFluent.MetadataNested,io.fabric8.kubernetes.api.builder.Nested {
private final io.fabric8.kubernetes.api.model.ObjectMetaBuilder builder;
MetadataNestedImpl(io.fabric8.kubernetes.api.model.ObjectMeta item) {
this.builder = new io.fabric8.kubernetes.api.model.ObjectMetaBuilder(this, item);
}
MetadataNestedImpl() {
this.builder = new io.fabric8.kubernetes.api.model.ObjectMetaBuilder(this);
}
public N and() {
return (N) KafkaConnectFluentImpl.this.withMetadata(builder.build());
}
public N endMetadata() {
return and();
}
}
/**
* Represents a status of the Kafka Connect resource
*/
public class StatusNestedImpl extends io.strimzi.api.kafka.model.status.KafkaConnectStatusFluentImpl> implements io.strimzi.api.kafka.model.KafkaConnectFluent.StatusNested,io.fabric8.kubernetes.api.builder.Nested {
private final io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder builder;
StatusNestedImpl(io.strimzi.api.kafka.model.status.KafkaConnectStatus item) {
this.builder = new io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder(this, item);
}
StatusNestedImpl() {
this.builder = new io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder(this);
}
public N and() {
return (N) KafkaConnectFluentImpl.this.withStatus(builder.build());
}
public N endStatus() {
return and();
}
}
}