annotations.io.fabric8.kubernetes.api.model.PersistentVolumeSpecFluent Maven / Gradle / Ivy
The newest version!
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.model.resource.Quantity;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import io.fabric8.common.Nested;
import io.fabric8.common.VisitableBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.common.Visitable;
import io.fabric8.common.BaseFluent;
public class PersistentVolumeSpecFluent> extends BaseFluent implements Fluent{
List accessModes = new ArrayList(); VisitableBuilder awsElasticBlockStore; Map capacity = new HashMap(); VisitableBuilder claimRef; VisitableBuilder gcePersistentDisk; VisitableBuilder glusterfs; VisitableBuilder hostPath; VisitableBuilder nfs; VisitableBuilder rbd; Map additionalProperties = new HashMap();
public T addToAccessModes( String item){
if (item != null) {this.accessModes.add(item);} return (T)this;
}
public List getAccessModes(){
return this.accessModes;
}
public T withAccessModes( List accessModes){
this.accessModes.clear();if (accessModes != null) {for (String item : accessModes){this.addToAccessModes(item);}} return (T) this;
}
public AWSElasticBlockStoreVolumeSource getAwsElasticBlockStore(){
return this.awsElasticBlockStore!=null?this.awsElasticBlockStore.build():null;
}
public T withAwsElasticBlockStore( AWSElasticBlockStoreVolumeSource awsElasticBlockStore){
if (awsElasticBlockStore!=null){ this.awsElasticBlockStore= new AWSElasticBlockStoreVolumeSourceBuilder(awsElasticBlockStore); _visitables.add(this.awsElasticBlockStore);} return (T) this;
}
public AwsElasticBlockStoreNested withNewAwsElasticBlockStore(){
return new AwsElasticBlockStoreNested();
}
public AwsElasticBlockStoreNested withNewAwsElasticBlockStoreLike( AWSElasticBlockStoreVolumeSource item){
return new AwsElasticBlockStoreNested(item);
}
public AwsElasticBlockStoreNested editAwsElasticBlockStore(){
return withNewAwsElasticBlockStoreLike(getAwsElasticBlockStore());
}
public T withNewAwsElasticBlockStore( String fsType, Integer partition, Boolean readOnly, String volumeID){
return withAwsElasticBlockStore(new AWSElasticBlockStoreVolumeSource(fsType, partition, readOnly, volumeID));
}
public T addToCapacity( String key, Quantity value){
if(key != null && value != null) {this.capacity.put(key, value);} return (T)this;
}
public Map getCapacity(){
return this.capacity;
}
public T withCapacity( Map capacity){
this.capacity.clear();if (capacity != null) {this.capacity.putAll(capacity);} return (T) this;
}
public ObjectReference getClaimRef(){
return this.claimRef!=null?this.claimRef.build():null;
}
public T withClaimRef( ObjectReference claimRef){
if (claimRef!=null){ this.claimRef= new ObjectReferenceBuilder(claimRef); _visitables.add(this.claimRef);} return (T) this;
}
public ClaimRefNested withNewClaimRef(){
return new ClaimRefNested();
}
public ClaimRefNested withNewClaimRefLike( ObjectReference item){
return new ClaimRefNested(item);
}
public ClaimRefNested editClaimRef(){
return withNewClaimRefLike(getClaimRef());
}
public GCEPersistentDiskVolumeSource getGcePersistentDisk(){
return this.gcePersistentDisk!=null?this.gcePersistentDisk.build():null;
}
public T withGcePersistentDisk( GCEPersistentDiskVolumeSource gcePersistentDisk){
if (gcePersistentDisk!=null){ this.gcePersistentDisk= new GCEPersistentDiskVolumeSourceBuilder(gcePersistentDisk); _visitables.add(this.gcePersistentDisk);} return (T) this;
}
public GcePersistentDiskNested withNewGcePersistentDisk(){
return new GcePersistentDiskNested();
}
public GcePersistentDiskNested withNewGcePersistentDiskLike( GCEPersistentDiskVolumeSource item){
return new GcePersistentDiskNested(item);
}
public GcePersistentDiskNested editGcePersistentDisk(){
return withNewGcePersistentDiskLike(getGcePersistentDisk());
}
public T withNewGcePersistentDisk( String fsType, Integer partition, String pdName, Boolean readOnly){
return withGcePersistentDisk(new GCEPersistentDiskVolumeSource(fsType, partition, pdName, readOnly));
}
public GlusterfsVolumeSource getGlusterfs(){
return this.glusterfs!=null?this.glusterfs.build():null;
}
public T withGlusterfs( GlusterfsVolumeSource glusterfs){
if (glusterfs!=null){ this.glusterfs= new GlusterfsVolumeSourceBuilder(glusterfs); _visitables.add(this.glusterfs);} return (T) this;
}
public GlusterfsNested withNewGlusterfs(){
return new GlusterfsNested();
}
public GlusterfsNested withNewGlusterfsLike( GlusterfsVolumeSource item){
return new GlusterfsNested(item);
}
public GlusterfsNested editGlusterfs(){
return withNewGlusterfsLike(getGlusterfs());
}
public T withNewGlusterfs( String endpoints, String path, Boolean readOnly){
return withGlusterfs(new GlusterfsVolumeSource(endpoints, path, readOnly));
}
public HostPathVolumeSource getHostPath(){
return this.hostPath!=null?this.hostPath.build():null;
}
public T withHostPath( HostPathVolumeSource hostPath){
if (hostPath!=null){ this.hostPath= new HostPathVolumeSourceBuilder(hostPath); _visitables.add(this.hostPath);} return (T) this;
}
public HostPathNested withNewHostPath(){
return new HostPathNested();
}
public HostPathNested withNewHostPathLike( HostPathVolumeSource item){
return new HostPathNested(item);
}
public HostPathNested editHostPath(){
return withNewHostPathLike(getHostPath());
}
public T withNewHostPath( String path){
return withHostPath(new HostPathVolumeSource(path));
}
public NFSVolumeSource getNfs(){
return this.nfs!=null?this.nfs.build():null;
}
public T withNfs( NFSVolumeSource nfs){
if (nfs!=null){ this.nfs= new NFSVolumeSourceBuilder(nfs); _visitables.add(this.nfs);} return (T) this;
}
public NfsNested withNewNfs(){
return new NfsNested();
}
public NfsNested withNewNfsLike( NFSVolumeSource item){
return new NfsNested(item);
}
public NfsNested editNfs(){
return withNewNfsLike(getNfs());
}
public T withNewNfs( String path, Boolean readOnly, String server){
return withNfs(new NFSVolumeSource(path, readOnly, server));
}
public RBDVolumeSource getRbd(){
return this.rbd!=null?this.rbd.build():null;
}
public T withRbd( RBDVolumeSource rbd){
if (rbd!=null){ this.rbd= new RBDVolumeSourceBuilder(rbd); _visitables.add(this.rbd);} return (T) this;
}
public RbdNested withNewRbd(){
return new RbdNested();
}
public RbdNested withNewRbdLike( RBDVolumeSource item){
return new RbdNested(item);
}
public RbdNested editRbd(){
return withNewRbdLike(getRbd());
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties( Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public class AwsElasticBlockStoreNested extends AWSElasticBlockStoreVolumeSourceFluent> implements Nested{
private final AWSElasticBlockStoreVolumeSourceBuilder builder;
AwsElasticBlockStoreNested (){
this.builder = new AWSElasticBlockStoreVolumeSourceBuilder(this);
}
AwsElasticBlockStoreNested ( AWSElasticBlockStoreVolumeSource item){
this.builder = new AWSElasticBlockStoreVolumeSourceBuilder(this, item);
}
public N endAwsElasticBlockStore(){
return and();
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withAwsElasticBlockStore(builder.build());
}
}
public class ClaimRefNested extends ObjectReferenceFluent> implements Nested{
private final ObjectReferenceBuilder builder;
ClaimRefNested (){
this.builder = new ObjectReferenceBuilder(this);
}
ClaimRefNested ( ObjectReference item){
this.builder = new ObjectReferenceBuilder(this, item);
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withClaimRef(builder.build());
}
public N endClaimRef(){
return and();
}
}
public class GcePersistentDiskNested extends GCEPersistentDiskVolumeSourceFluent> implements Nested{
private final GCEPersistentDiskVolumeSourceBuilder builder;
GcePersistentDiskNested ( GCEPersistentDiskVolumeSource item){
this.builder = new GCEPersistentDiskVolumeSourceBuilder(this, item);
}
GcePersistentDiskNested (){
this.builder = new GCEPersistentDiskVolumeSourceBuilder(this);
}
public N endGcePersistentDisk(){
return and();
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withGcePersistentDisk(builder.build());
}
}
public class GlusterfsNested extends GlusterfsVolumeSourceFluent> implements Nested{
private final GlusterfsVolumeSourceBuilder builder;
GlusterfsNested (){
this.builder = new GlusterfsVolumeSourceBuilder(this);
}
GlusterfsNested ( GlusterfsVolumeSource item){
this.builder = new GlusterfsVolumeSourceBuilder(this, item);
}
public N endGlusterfs(){
return and();
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withGlusterfs(builder.build());
}
}
public class HostPathNested extends HostPathVolumeSourceFluent> implements Nested{
private final HostPathVolumeSourceBuilder builder;
HostPathNested (){
this.builder = new HostPathVolumeSourceBuilder(this);
}
HostPathNested ( HostPathVolumeSource item){
this.builder = new HostPathVolumeSourceBuilder(this, item);
}
public N endHostPath(){
return and();
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withHostPath(builder.build());
}
}
public class NfsNested extends NFSVolumeSourceFluent> implements Nested{
private final NFSVolumeSourceBuilder builder;
NfsNested (){
this.builder = new NFSVolumeSourceBuilder(this);
}
NfsNested ( NFSVolumeSource item){
this.builder = new NFSVolumeSourceBuilder(this, item);
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withNfs(builder.build());
}
public N endNfs(){
return and();
}
}
public class RbdNested extends RBDVolumeSourceFluent> implements Nested{
private final RBDVolumeSourceBuilder builder;
RbdNested (){
this.builder = new RBDVolumeSourceBuilder(this);
}
RbdNested ( RBDVolumeSource item){
this.builder = new RBDVolumeSourceBuilder(this, item);
}
public N endRbd(){
return and();
}
public N and(){
return (N) PersistentVolumeSpecFluent.this.withRbd(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy