io.fabric8.kubernetes.api.model.VolumeFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import io.fabric8.common.Nested;
import io.fabric8.common.Fluent;
public class VolumeFluent> implements Fluent{
private EmptyDirVolumeSource emptyDir ;
private GCEPersistentDiskVolumeSource gcePersistentDisk ;
private GitRepoVolumeSource gitRepo ;
private GlusterfsVolumeSource glusterfs ;
private HostPathVolumeSource hostPath ;
private ISCSIVolumeSource iscsi ;
private String name ;
private NFSVolumeSource nfs ;
private SecretVolumeSource secret ;
private Map additionalProperties = new HashMap();
public EmptyDirVolumeSource getEmptyDir(){
return this.emptyDir;
}
public T withEmptyDir(EmptyDirVolumeSource emptyDir){
this.emptyDir=emptyDir; return (T) this;
}
public GCEPersistentDiskVolumeSource getGcePersistentDisk(){
return this.gcePersistentDisk;
}
public T withGcePersistentDisk(GCEPersistentDiskVolumeSource gcePersistentDisk){
this.gcePersistentDisk=gcePersistentDisk; return (T) this;
}
public GitRepoVolumeSource getGitRepo(){
return this.gitRepo;
}
public T withGitRepo(GitRepoVolumeSource gitRepo){
this.gitRepo=gitRepo; return (T) this;
}
public GlusterfsVolumeSource getGlusterfs(){
return this.glusterfs;
}
public T withGlusterfs(GlusterfsVolumeSource glusterfs){
this.glusterfs=glusterfs; return (T) this;
}
public HostPathVolumeSource getHostPath(){
return this.hostPath;
}
public T withHostPath(HostPathVolumeSource hostPath){
this.hostPath=hostPath; return (T) this;
}
public ISCSIVolumeSource getIscsi(){
return this.iscsi;
}
public T withIscsi(ISCSIVolumeSource iscsi){
this.iscsi=iscsi; return (T) this;
}
public String getName(){
return this.name;
}
public T withName(String name){
this.name=name; return (T) this;
}
public NFSVolumeSource getNfs(){
return this.nfs;
}
public T withNfs(NFSVolumeSource nfs){
this.nfs=nfs; return (T) this;
}
public SecretVolumeSource getSecret(){
return this.secret;
}
public T withSecret(SecretVolumeSource secret){
this.secret=secret; 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 EmptyDirNested withNewEmptyDir(){
return new EmptyDirNested();
}
public T withNewEmptyDir(String medium){
return withEmptyDir(new EmptyDirVolumeSource(medium));
}
public GcePersistentDiskNested withNewGcePersistentDisk(){
return new GcePersistentDiskNested();
}
public T withNewGcePersistentDisk(String fsType, Integer partition, String pdName, Boolean readOnly){
return withGcePersistentDisk(new GCEPersistentDiskVolumeSource(fsType, partition, pdName, readOnly));
}
public GitRepoNested withNewGitRepo(){
return new GitRepoNested();
}
public T withNewGitRepo(String repository, String revision){
return withGitRepo(new GitRepoVolumeSource(repository, revision));
}
public GlusterfsNested withNewGlusterfs(){
return new GlusterfsNested();
}
public T withNewGlusterfs(String endpoints, String path, Boolean readOnly){
return withGlusterfs(new GlusterfsVolumeSource(endpoints, path, readOnly));
}
public HostPathNested withNewHostPath(){
return new HostPathNested();
}
public T withNewHostPath(String path){
return withHostPath(new HostPathVolumeSource(path));
}
public IscsiNested withNewIscsi(){
return new IscsiNested();
}
public T withNewIscsi(String fsType, String iqn, Integer lun, Boolean readOnly, String targetPortal){
return withIscsi(new ISCSIVolumeSource(fsType, iqn, lun, readOnly, targetPortal));
}
public NfsNested withNewNfs(){
return new NfsNested();
}
public T withNewNfs(String path, Boolean readOnly, String server){
return withNfs(new NFSVolumeSource(path, readOnly, server));
}
public SecretNested withNewSecret(){
return new SecretNested();
}
public T withNewSecret(String secretName){
return withSecret(new SecretVolumeSource(secretName));
}
public T addToAdditionalProperties(String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public class EmptyDirNested extends EmptyDirVolumeSourceFluent> implements Nested{
private final EmptyDirVolumeSourceBuilder builder = new EmptyDirVolumeSourceBuilder(this);
public N endEmptyDir(){
return and();
}
public N and(){
return (N) VolumeFluent.this.withEmptyDir(builder.build());
}
}
public class GcePersistentDiskNested extends GCEPersistentDiskVolumeSourceFluent> implements Nested{
private final GCEPersistentDiskVolumeSourceBuilder builder = new GCEPersistentDiskVolumeSourceBuilder(this);
public N and(){
return (N) VolumeFluent.this.withGcePersistentDisk(builder.build());
}
public N endGcePersistentDisk(){
return and();
}
}
public class GitRepoNested extends GitRepoVolumeSourceFluent> implements Nested{
private final GitRepoVolumeSourceBuilder builder = new GitRepoVolumeSourceBuilder(this);
public N endGitRepo(){
return and();
}
public N and(){
return (N) VolumeFluent.this.withGitRepo(builder.build());
}
}
public class GlusterfsNested extends GlusterfsVolumeSourceFluent> implements Nested{
private final GlusterfsVolumeSourceBuilder builder = new GlusterfsVolumeSourceBuilder(this);
public N endGlusterfs(){
return and();
}
public N and(){
return (N) VolumeFluent.this.withGlusterfs(builder.build());
}
}
public class HostPathNested extends HostPathVolumeSourceFluent> implements Nested{
private final HostPathVolumeSourceBuilder builder = new HostPathVolumeSourceBuilder(this);
public N and(){
return (N) VolumeFluent.this.withHostPath(builder.build());
}
public N endHostPath(){
return and();
}
}
public class IscsiNested extends ISCSIVolumeSourceFluent> implements Nested{
private final ISCSIVolumeSourceBuilder builder = new ISCSIVolumeSourceBuilder(this);
public N and(){
return (N) VolumeFluent.this.withIscsi(builder.build());
}
public N endIscsi(){
return and();
}
}
public class NfsNested extends NFSVolumeSourceFluent> implements Nested{
private final NFSVolumeSourceBuilder builder = new NFSVolumeSourceBuilder(this);
public N and(){
return (N) VolumeFluent.this.withNfs(builder.build());
}
public N endNfs(){
return and();
}
}
public class SecretNested extends SecretVolumeSourceFluent> implements Nested{
private final SecretVolumeSourceBuilder builder = new SecretVolumeSourceBuilder(this);
public N endSecret(){
return and();
}
public N and(){
return (N) VolumeFluent.this.withSecret(builder.build());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy