
annotations.io.fabric8.kubernetes.api.model.PersistentVolumeFluentImpl 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.Object;
import io.fabric8.kubernetes.api.builder.Nested;
public class PersistentVolumeFluentImpl> extends BaseFluent implements PersistentVolumeFluent{
private String apiVersion;
private String kind;
private VisitableBuilder extends ObjectMeta,?> metadata;
private VisitableBuilder extends PersistentVolumeSpec,?> spec;
private VisitableBuilder extends PersistentVolumeStatus,?> status;
public PersistentVolumeFluentImpl(){
}
public PersistentVolumeFluentImpl(PersistentVolume 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 PersistentVolumeFluent.MetadataNested withNewMetadata(){
return new MetadataNestedImpl();
}
public PersistentVolumeFluent.MetadataNested withNewMetadataLike(ObjectMeta item){
return new MetadataNestedImpl(item);
}
public PersistentVolumeFluent.MetadataNested editMetadata(){
return withNewMetadataLike(getMetadata());
}
public PersistentVolumeSpec getSpec(){
return this.spec!=null?this.spec.build():null;
}
public A withSpec(PersistentVolumeSpec spec){
if (spec!=null){ this.spec= new PersistentVolumeSpecBuilder(spec); _visitables.add(this.spec);} return (A) this;
}
public PersistentVolumeFluent.SpecNested withNewSpec(){
return new SpecNestedImpl();
}
public PersistentVolumeFluent.SpecNested withNewSpecLike(PersistentVolumeSpec item){
return new SpecNestedImpl(item);
}
public PersistentVolumeFluent.SpecNested editSpec(){
return withNewSpecLike(getSpec());
}
public PersistentVolumeStatus getStatus(){
return this.status!=null?this.status.build():null;
}
public A withStatus(PersistentVolumeStatus status){
if (status!=null){ this.status= new PersistentVolumeStatusBuilder(status); _visitables.add(this.status);} return (A) this;
}
public PersistentVolumeFluent.StatusNested withNewStatus(){
return new StatusNestedImpl();
}
public PersistentVolumeFluent.StatusNested withNewStatusLike(PersistentVolumeStatus item){
return new StatusNestedImpl(item);
}
public PersistentVolumeFluent.StatusNested editStatus(){
return withNewStatusLike(getStatus());
}
public A withNewStatus(String message,String phase,String reason){
return (A)withStatus(new PersistentVolumeStatus(message, phase, reason));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
PersistentVolumeFluentImpl that = (PersistentVolumeFluentImpl) 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 PersistentVolumeFluent.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) PersistentVolumeFluentImpl.this.withMetadata(builder.build());
}
}
public class SpecNestedImpl extends PersistentVolumeSpecFluentImpl> implements PersistentVolumeFluent.SpecNested,Nested{
private final PersistentVolumeSpecBuilder builder;
SpecNestedImpl(){
this.builder = new PersistentVolumeSpecBuilder(this);
}
SpecNestedImpl(PersistentVolumeSpec item){
this.builder = new PersistentVolumeSpecBuilder(this, item);
}
public N endSpec(){
return and();
}
public N and(){
return (N) PersistentVolumeFluentImpl.this.withSpec(builder.build());
}
}
public class StatusNestedImpl extends PersistentVolumeStatusFluentImpl> implements PersistentVolumeFluent.StatusNested,Nested{
private final PersistentVolumeStatusBuilder builder;
StatusNestedImpl(){
this.builder = new PersistentVolumeStatusBuilder(this);
}
StatusNestedImpl(PersistentVolumeStatus item){
this.builder = new PersistentVolumeStatusBuilder(this, item);
}
public N endStatus(){
return and();
}
public N and(){
return (N) PersistentVolumeFluentImpl.this.withStatus(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy