
io.fabric8.kubernetes.api.model.ReplicationControllerFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.String;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.model.validators.CheckObjectMeta;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;
public class ReplicationControllerFluentImpl> extends BaseFluent implements ReplicationControllerFluent{
private String apiVersion;
private String kind;
private VisitableBuilder extends ObjectMeta,?> metadata;
private VisitableBuilder extends ReplicationControllerSpec,?> spec;
private VisitableBuilder extends ReplicationControllerStatus,?> status;
public ReplicationControllerFluentImpl(){
}
public ReplicationControllerFluentImpl(ReplicationController instance){
this.withApiVersion(instance.getApiVersion());
this.withKind(instance.getKind());
this.withMetadata(instance.getMetadata());
this.withSpec(instance.getSpec());
this.withStatus(instance.getStatus());
}
public String getApiVersion(){
return this.apiVersion;
}
public A withApiVersion(String apiVersion){
this.apiVersion=apiVersion; return (A) this;
}
public String getKind(){
return this.kind;
}
public A withKind(String kind){
this.kind=kind; return (A) this;
}
public ObjectMeta getMetadata(){
return this.metadata!=null?this.metadata.build():null;
}
public A withMetadata(ObjectMeta metadata){
if (metadata!=null){ this.metadata= new ObjectMetaBuilder(metadata); _visitables.add(this.metadata);} return (A) this;
}
public ReplicationControllerFluent.MetadataNested withNewMetadata(){
return new MetadataNestedImpl();
}
public ReplicationControllerFluent.MetadataNested withNewMetadataLike(ObjectMeta item){
return new MetadataNestedImpl(item);
}
public ReplicationControllerFluent.MetadataNested editMetadata(){
return withNewMetadataLike(getMetadata());
}
public ReplicationControllerSpec getSpec(){
return this.spec!=null?this.spec.build():null;
}
public A withSpec(ReplicationControllerSpec spec){
if (spec!=null){ this.spec= new ReplicationControllerSpecBuilder(spec); _visitables.add(this.spec);} return (A) this;
}
public ReplicationControllerFluent.SpecNested withNewSpec(){
return new SpecNestedImpl();
}
public ReplicationControllerFluent.SpecNested withNewSpecLike(ReplicationControllerSpec item){
return new SpecNestedImpl(item);
}
public ReplicationControllerFluent.SpecNested editSpec(){
return withNewSpecLike(getSpec());
}
public ReplicationControllerStatus getStatus(){
return this.status!=null?this.status.build():null;
}
public A withStatus(ReplicationControllerStatus status){
if (status!=null){ this.status= new ReplicationControllerStatusBuilder(status); _visitables.add(this.status);} return (A) this;
}
public ReplicationControllerFluent.StatusNested withNewStatus(){
return new StatusNestedImpl();
}
public ReplicationControllerFluent.StatusNested withNewStatusLike(ReplicationControllerStatus item){
return new StatusNestedImpl(item);
}
public ReplicationControllerFluent.StatusNested editStatus(){
return withNewStatusLike(getStatus());
}
public A withNewStatus(Integer fullyLabeledReplicas,Long observedGeneration,Integer replicas){
return (A)withStatus(new ReplicationControllerStatus(fullyLabeledReplicas, observedGeneration, replicas));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ReplicationControllerFluentImpl that = (ReplicationControllerFluentImpl) 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 (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 class MetadataNestedImpl extends ObjectMetaFluentImpl> implements ReplicationControllerFluent.MetadataNested,Nested{
private final ObjectMetaBuilder builder;
MetadataNestedImpl(){
this.builder = new ObjectMetaBuilder(this);
}
MetadataNestedImpl(ObjectMeta item){
this.builder = new ObjectMetaBuilder(this, item);
}
public N endMetadata(){
return and();
}
public N and(){
return (N) ReplicationControllerFluentImpl.this.withMetadata(builder.build());
}
}
public class SpecNestedImpl extends ReplicationControllerSpecFluentImpl> implements ReplicationControllerFluent.SpecNested,Nested{
private final ReplicationControllerSpecBuilder builder;
SpecNestedImpl(){
this.builder = new ReplicationControllerSpecBuilder(this);
}
SpecNestedImpl(ReplicationControllerSpec item){
this.builder = new ReplicationControllerSpecBuilder(this, item);
}
public N endSpec(){
return and();
}
public N and(){
return (N) ReplicationControllerFluentImpl.this.withSpec(builder.build());
}
}
public class StatusNestedImpl extends ReplicationControllerStatusFluentImpl> implements ReplicationControllerFluent.StatusNested,Nested{
private final ReplicationControllerStatusBuilder builder;
StatusNestedImpl(){
this.builder = new ReplicationControllerStatusBuilder(this);
}
StatusNestedImpl(ReplicationControllerStatus item){
this.builder = new ReplicationControllerStatusBuilder(this, item);
}
public N endStatus(){
return and();
}
public N and(){
return (N) ReplicationControllerFluentImpl.this.withStatus(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy