io.fabric8.kubernetes.api.model.ContainerFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
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.Fluent;
public class ContainerFluent> implements Fluent{
private Capabilities capabilities ;
private List command = new ArrayList();
private Integer cpu ;
private List entrypointOmitempty = new ArrayList();
private List env = new ArrayList();
private String image ;
private String imagePullPolicy ;
private Lifecycle lifecycle ;
private LivenessProbe livenessProbe ;
private Integer memory ;
private String name ;
private List ports = new ArrayList();
private Boolean privileged ;
private LivenessProbe readinessProbe ;
private ResourceRequirements resources ;
private String terminationMessagePath ;
private List volumeMounts = new ArrayList();
private String workingDir ;
private Map additionalProperties = new HashMap();
public Capabilities getCapabilities(){
return this.capabilities;
}
public T withCapabilities(Capabilities capabilities){
this.capabilities=capabilities; return (T) this;
}
public List getCommand(){
return this.command;
}
public T withCommand(List command){
this.command.clear();if (command != null) {this.command.addAll(command);} return (T) this;
}
public Integer getCpu(){
return this.cpu;
}
public T withCpu(Integer cpu){
this.cpu=cpu; return (T) this;
}
public List getEntrypointOmitempty(){
return this.entrypointOmitempty;
}
public T withEntrypointOmitempty(List entrypointOmitempty){
this.entrypointOmitempty.clear();if (entrypointOmitempty != null) {this.entrypointOmitempty.addAll(entrypointOmitempty);} return (T) this;
}
public List getEnv(){
return this.env;
}
public T withEnv(List env){
this.env.clear();if (env != null) {this.env.addAll(env);} return (T) this;
}
public String getImage(){
return this.image;
}
public T withImage(String image){
this.image=image; return (T) this;
}
public String getImagePullPolicy(){
return this.imagePullPolicy;
}
public T withImagePullPolicy(String imagePullPolicy){
this.imagePullPolicy=imagePullPolicy; return (T) this;
}
public Lifecycle getLifecycle(){
return this.lifecycle;
}
public T withLifecycle(Lifecycle lifecycle){
this.lifecycle=lifecycle; return (T) this;
}
public LivenessProbe getLivenessProbe(){
return this.livenessProbe;
}
public T withLivenessProbe(LivenessProbe livenessProbe){
this.livenessProbe=livenessProbe; return (T) this;
}
public Integer getMemory(){
return this.memory;
}
public T withMemory(Integer memory){
this.memory=memory; return (T) this;
}
public String getName(){
return this.name;
}
public T withName(String name){
this.name=name; return (T) this;
}
public List getPorts(){
return this.ports;
}
public T withPorts(List ports){
this.ports.clear();if (ports != null) {this.ports.addAll(ports);} return (T) this;
}
public Boolean isPrivileged(){
return this.privileged;
}
public T withPrivileged(Boolean privileged){
this.privileged=privileged; return (T) this;
}
public LivenessProbe getReadinessProbe(){
return this.readinessProbe;
}
public T withReadinessProbe(LivenessProbe readinessProbe){
this.readinessProbe=readinessProbe; return (T) this;
}
public ResourceRequirements getResources(){
return this.resources;
}
public T withResources(ResourceRequirements resources){
this.resources=resources; return (T) this;
}
public String getTerminationMessagePath(){
return this.terminationMessagePath;
}
public T withTerminationMessagePath(String terminationMessagePath){
this.terminationMessagePath=terminationMessagePath; return (T) this;
}
public List getVolumeMounts(){
return this.volumeMounts;
}
public T withVolumeMounts(List volumeMounts){
this.volumeMounts.clear();if (volumeMounts != null) {this.volumeMounts.addAll(volumeMounts);} return (T) this;
}
public String getWorkingDir(){
return this.workingDir;
}
public T withWorkingDir(String workingDir){
this.workingDir=workingDir; 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 CapabilitiesNested withNewCapabilitie(){
return new CapabilitiesNested();
}
public T addToCommand(String item){
if (item != null) {this.command.add(item);} return (T)this;
}
public T addToEntrypointOmitempty(String item){
if (item != null) {this.entrypointOmitempty.add(item);} return (T)this;
}
public T addToEnv(EnvVar item){
if (item != null) {this.env.add(item);} return (T)this;
}
public EnvNested addNewEnv(){
return new EnvNested();
}
public LifecycleNested withNewLifecycle(){
return new LifecycleNested();
}
public LivenessProbeNested withNewLivenessProbe(){
return new LivenessProbeNested();
}
public T addToPorts(ContainerPort item){
if (item != null) {this.ports.add(item);} return (T)this;
}
public PortsNested addNewPort(){
return new PortsNested();
}
public ReadinessProbeNested withNewReadinessProbe(){
return new ReadinessProbeNested();
}
public ResourcesNested withNewResource(){
return new ResourcesNested();
}
public T addToVolumeMounts(VolumeMount item){
if (item != null) {this.volumeMounts.add(item);} return (T)this;
}
public VolumeMountsNested addNewVolumeMount(){
return new VolumeMountsNested();
}
public T addToAdditionalProperties(String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public class CapabilitiesNested extends CapabilitiesFluent> implements Nested{
private final CapabilitiesBuilder builder = new CapabilitiesBuilder(this);
public N endCapabilitie(){
return and();
}
public N and(){
return (N) ContainerFluent.this.withCapabilities(builder.build());
}
}
public class EnvNested extends EnvVarFluent> implements Nested{
private final EnvVarBuilder builder = new EnvVarBuilder(this);
public N and(){
return (N) ContainerFluent.this.addToEnv(builder.build());
}
public N endEnv(){
return and();
}
}
public class LifecycleNested extends LifecycleFluent> implements Nested{
private final LifecycleBuilder builder = new LifecycleBuilder(this);
public N endLifecycle(){
return and();
}
public N and(){
return (N) ContainerFluent.this.withLifecycle(builder.build());
}
}
public class LivenessProbeNested extends LivenessProbeFluent> implements Nested{
private final LivenessProbeBuilder builder = new LivenessProbeBuilder(this);
public N and(){
return (N) ContainerFluent.this.withLivenessProbe(builder.build());
}
public N endLivenessProbe(){
return and();
}
}
public class PortsNested extends ContainerPortFluent> implements Nested{
private final ContainerPortBuilder builder = new ContainerPortBuilder(this);
public N endPort(){
return and();
}
public N and(){
return (N) ContainerFluent.this.addToPorts(builder.build());
}
}
public class ReadinessProbeNested extends LivenessProbeFluent> implements Nested{
private final LivenessProbeBuilder builder = new LivenessProbeBuilder(this);
public N and(){
return (N) ContainerFluent.this.withReadinessProbe(builder.build());
}
public N endReadinessProbe(){
return and();
}
}
public class ResourcesNested extends ResourceRequirementsFluent> implements Nested{
private final ResourceRequirementsBuilder builder = new ResourceRequirementsBuilder(this);
public N endResource(){
return and();
}
public N and(){
return (N) ContainerFluent.this.withResources(builder.build());
}
}
public class VolumeMountsNested extends VolumeMountFluent> implements Nested{
private final VolumeMountBuilder builder = new VolumeMountBuilder(this);
public N and(){
return (N) ContainerFluent.this.addToVolumeMounts(builder.build());
}
public N endVolumeMount(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy