![JAR search and dependency download from the Maven repository](/logo.png)
io.fabric8.kubernetes.api.model.extensions.ReplicaSetFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model.extensions;
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 io.fabric8.kubernetes.api.model.ObjectMeta;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
public class ReplicaSetFluentImpl> extends BaseFluent implements ReplicaSetFluent{
private String apiVersion;
private String kind;
private VisitableBuilder extends ObjectMeta,?> metadata;
private VisitableBuilder extends ReplicaSetSpec,?> spec;
private VisitableBuilder extends ReplicaSetStatus,?> status;
public ReplicaSetFluentImpl(){
}
public ReplicaSetFluentImpl(ReplicaSet 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 ReplicaSetFluent.MetadataNested withNewMetadata(){
return new MetadataNestedImpl();
}
public ReplicaSetFluent.MetadataNested withNewMetadataLike(ObjectMeta item){
return new MetadataNestedImpl(item);
}
public ReplicaSetFluent.MetadataNested editMetadata(){
return withNewMetadataLike(getMetadata());
}
public ReplicaSetSpec getSpec(){
return this.spec!=null?this.spec.build():null;
}
public A withSpec(ReplicaSetSpec spec){
if (spec!=null){ this.spec= new ReplicaSetSpecBuilder(spec); _visitables.add(this.spec);} return (A) this;
}
public ReplicaSetFluent.SpecNested withNewSpec(){
return new SpecNestedImpl();
}
public ReplicaSetFluent.SpecNested withNewSpecLike(ReplicaSetSpec item){
return new SpecNestedImpl(item);
}
public ReplicaSetFluent.SpecNested editSpec(){
return withNewSpecLike(getSpec());
}
public ReplicaSetStatus getStatus(){
return this.status!=null?this.status.build():null;
}
public A withStatus(ReplicaSetStatus status){
if (status!=null){ this.status= new ReplicaSetStatusBuilder(status); _visitables.add(this.status);} return (A) this;
}
public ReplicaSetFluent.StatusNested withNewStatus(){
return new StatusNestedImpl();
}
public ReplicaSetFluent.StatusNested withNewStatusLike(ReplicaSetStatus item){
return new StatusNestedImpl(item);
}
public ReplicaSetFluent.StatusNested editStatus(){
return withNewStatusLike(getStatus());
}
public A withNewStatus(Integer fullyLabeledReplicas,Long observedGeneration,Integer replicas){
return (A)withStatus(new ReplicaSetStatus(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;
ReplicaSetFluentImpl that = (ReplicaSetFluentImpl) 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 ReplicaSetFluent.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) ReplicaSetFluentImpl.this.withMetadata(builder.build());
}
}
public class SpecNestedImpl extends ReplicaSetSpecFluentImpl> implements ReplicaSetFluent.SpecNested,Nested{
private final ReplicaSetSpecBuilder builder;
SpecNestedImpl(){
this.builder = new ReplicaSetSpecBuilder(this);
}
SpecNestedImpl(ReplicaSetSpec item){
this.builder = new ReplicaSetSpecBuilder(this, item);
}
public N endSpec(){
return and();
}
public N and(){
return (N) ReplicaSetFluentImpl.this.withSpec(builder.build());
}
}
public class StatusNestedImpl extends ReplicaSetStatusFluentImpl> implements ReplicaSetFluent.StatusNested,Nested{
private final ReplicaSetStatusBuilder builder;
StatusNestedImpl(){
this.builder = new ReplicaSetStatusBuilder(this);
}
StatusNestedImpl(ReplicaSetStatus item){
this.builder = new ReplicaSetStatusBuilder(this, item);
}
public N endStatus(){
return and();
}
public N and(){
return (N) ReplicaSetFluentImpl.this.withStatus(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy