All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kubernetes.client.openapi.models.V1ContainerFluentImpl Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

import io.kubernetes.client.fluent.VisitableBuilder;
import java.util.ArrayList;
import java.lang.String;
import java.util.function.Predicate;
import io.kubernetes.client.fluent.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.util.Collection;
import java.lang.Object;
import java.lang.SuppressWarnings;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import java.lang.Integer;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class V1ContainerFluentImpl> extends BaseFluent implements V1ContainerFluent{
  public V1ContainerFluentImpl() {
  }
  public V1ContainerFluentImpl(V1Container instance) {
    this.withArgs(instance.getArgs());

    this.withCommand(instance.getCommand());

    this.withEnv(instance.getEnv());

    this.withEnvFrom(instance.getEnvFrom());

    this.withImage(instance.getImage());

    this.withImagePullPolicy(instance.getImagePullPolicy());

    this.withLifecycle(instance.getLifecycle());

    this.withLivenessProbe(instance.getLivenessProbe());

    this.withName(instance.getName());

    this.withPorts(instance.getPorts());

    this.withReadinessProbe(instance.getReadinessProbe());

    this.withResources(instance.getResources());

    this.withSecurityContext(instance.getSecurityContext());

    this.withStartupProbe(instance.getStartupProbe());

    this.withStdin(instance.getStdin());

    this.withStdinOnce(instance.getStdinOnce());

    this.withTerminationMessagePath(instance.getTerminationMessagePath());

    this.withTerminationMessagePolicy(instance.getTerminationMessagePolicy());

    this.withTty(instance.getTty());

    this.withVolumeDevices(instance.getVolumeDevices());

    this.withVolumeMounts(instance.getVolumeMounts());

    this.withWorkingDir(instance.getWorkingDir());

  }
  private List args;
  private List command;
  private ArrayList env;
  private ArrayList envFrom;
  private String image;
  private String imagePullPolicy;
  private V1LifecycleBuilder lifecycle;
  private V1ProbeBuilder livenessProbe;
  private String name;
  private ArrayList ports;
  private V1ProbeBuilder readinessProbe;
  private V1ResourceRequirementsBuilder resources;
  private V1SecurityContextBuilder securityContext;
  private V1ProbeBuilder startupProbe;
  private Boolean stdin;
  private Boolean stdinOnce;
  private String terminationMessagePath;
  private String terminationMessagePolicy;
  private Boolean tty;
  private ArrayList volumeDevices;
  private ArrayList volumeMounts;
  private String workingDir;
  public A addToArgs(Integer index,String item) {
    if (this.args == null) {this.args = new ArrayList();}
    this.args.add(index, item);
    return (A)this;
  }
  public A setToArgs(Integer index,String item) {
    if (this.args == null) {this.args = new ArrayList();}
    this.args.set(index, item); return (A)this;
  }
  public A addToArgs(java.lang.String... items) {
    if (this.args == null) {this.args = new ArrayList();}
    for (String item : items) {this.args.add(item);} return (A)this;
  }
  public A addAllToArgs(Collection items) {
    if (this.args == null) {this.args = new ArrayList();}
    for (String item : items) {this.args.add(item);} return (A)this;
  }
  public A removeFromArgs(java.lang.String... items) {
    for (String item : items) {if (this.args!= null){ this.args.remove(item);}} return (A)this;
  }
  public A removeAllFromArgs(Collection items) {
    for (String item : items) {if (this.args!= null){ this.args.remove(item);}} return (A)this;
  }
  public List getArgs() {
    return this.args;
  }
  public String getArg(Integer index) {
    return this.args.get(index);
  }
  public String getFirstArg() {
    return this.args.get(0);
  }
  public String getLastArg() {
    return this.args.get(args.size() - 1);
  }
  public String getMatchingArg(Predicate predicate) {
    for (String item: args) { if(predicate.test(item)){ return item;} } return null;
  }
  public Boolean hasMatchingArg(Predicate predicate) {
    for (String item: args) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withArgs(List args) {
    if (args != null) {this.args = new ArrayList(); for (String item : args){this.addToArgs(item);}} else { this.args = null;} return (A) this;
  }
  public A withArgs(java.lang.String... args) {
    if (this.args != null) {this.args.clear();}
    if (args != null) {for (String item :args){ this.addToArgs(item);}} return (A) this;
  }
  public Boolean hasArgs() {
    return args != null && !args.isEmpty();
  }
  public A addToCommand(Integer index,String item) {
    if (this.command == null) {this.command = new ArrayList();}
    this.command.add(index, item);
    return (A)this;
  }
  public A setToCommand(Integer index,String item) {
    if (this.command == null) {this.command = new ArrayList();}
    this.command.set(index, item); return (A)this;
  }
  public A addToCommand(java.lang.String... items) {
    if (this.command == null) {this.command = new ArrayList();}
    for (String item : items) {this.command.add(item);} return (A)this;
  }
  public A addAllToCommand(Collection items) {
    if (this.command == null) {this.command = new ArrayList();}
    for (String item : items) {this.command.add(item);} return (A)this;
  }
  public A removeFromCommand(java.lang.String... items) {
    for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this;
  }
  public A removeAllFromCommand(Collection items) {
    for (String item : items) {if (this.command!= null){ this.command.remove(item);}} return (A)this;
  }
  public List getCommand() {
    return this.command;
  }
  public String getCommand(Integer index) {
    return this.command.get(index);
  }
  public String getFirstCommand() {
    return this.command.get(0);
  }
  public String getLastCommand() {
    return this.command.get(command.size() - 1);
  }
  public String getMatchingCommand(Predicate predicate) {
    for (String item: command) { if(predicate.test(item)){ return item;} } return null;
  }
  public Boolean hasMatchingCommand(Predicate predicate) {
    for (String item: command) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withCommand(List command) {
    if (command != null) {this.command = new ArrayList(); for (String item : command){this.addToCommand(item);}} else { this.command = null;} return (A) this;
  }
  public A withCommand(java.lang.String... command) {
    if (this.command != null) {this.command.clear();}
    if (command != null) {for (String item :command){ this.addToCommand(item);}} return (A) this;
  }
  public Boolean hasCommand() {
    return command != null && !command.isEmpty();
  }
  public A addToEnv(Integer index,V1EnvVar item) {
    if (this.env == null) {this.env = new ArrayList();}
    V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(index >= 0 ? index : _visitables.get("env").size(), builder);this.env.add(index >= 0 ? index : env.size(), builder); return (A)this;
  }
  public A setToEnv(Integer index,V1EnvVar item) {
    if (this.env == null) {this.env = new ArrayList();}
    V1EnvVarBuilder builder = new V1EnvVarBuilder(item);
    if (index < 0 || index >= _visitables.get("env").size()) { _visitables.get("env").add(builder); } else { _visitables.get("env").set(index, builder);}
    if (index < 0 || index >= env.size()) { env.add(builder); } else { env.set(index, builder);}
     return (A)this;
  }
  public A addToEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) {
    if (this.env == null) {this.env = new ArrayList();}
    for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this;
  }
  public A addAllToEnv(Collection items) {
    if (this.env == null) {this.env = new ArrayList();}
    for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").add(builder);this.env.add(builder);} return (A)this;
  }
  public A removeFromEnv(io.kubernetes.client.openapi.models.V1EnvVar... items) {
    for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder);if (this.env != null) {this.env.remove(builder);}} return (A)this;
  }
  public A removeAllFromEnv(Collection items) {
    for (V1EnvVar item : items) {V1EnvVarBuilder builder = new V1EnvVarBuilder(item);_visitables.get("env").remove(builder);if (this.env != null) {this.env.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromEnv(Predicate predicate) {
    if (env == null) return (A) this;
    final Iterator each = env.iterator();
    final List visitables = _visitables.get("env");
    while (each.hasNext()) {
      V1EnvVarBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildEnv instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getEnv() {
    return env != null ? build(env) : null;
  }
  public List buildEnv() {
    return env != null ? build(env) : null;
  }
  public V1EnvVar buildEnv(Integer index) {
    return this.env.get(index).build();
  }
  public V1EnvVar buildFirstEnv() {
    return this.env.get(0).build();
  }
  public V1EnvVar buildLastEnv() {
    return this.env.get(env.size() - 1).build();
  }
  public V1EnvVar buildMatchingEnv(Predicate predicate) {
    for (V1EnvVarBuilder item: env) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingEnv(Predicate predicate) {
    for (V1EnvVarBuilder item: env) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withEnv(List env) {
    if (this.env != null) { _visitables.get("env").removeAll(this.env);}
    if (env != null) {this.env = new ArrayList(); for (V1EnvVar item : env){this.addToEnv(item);}} else { this.env = null;} return (A) this;
  }
  public A withEnv(io.kubernetes.client.openapi.models.V1EnvVar... env) {
    if (this.env != null) {this.env.clear();}
    if (env != null) {for (V1EnvVar item :env){ this.addToEnv(item);}} return (A) this;
  }
  public Boolean hasEnv() {
    return env != null && !env.isEmpty();
  }
  public V1ContainerFluent.EnvNested addNewEnv() {
    return new V1ContainerFluentImpl.EnvNestedImpl();
  }
  public V1ContainerFluent.EnvNested addNewEnvLike(V1EnvVar item) {
    return new V1ContainerFluentImpl.EnvNestedImpl(-1, item);
  }
  public V1ContainerFluent.EnvNested setNewEnvLike(Integer index,V1EnvVar item) {
    return new V1ContainerFluentImpl.EnvNestedImpl(index, item);
  }
  public V1ContainerFluent.EnvNested editEnv(Integer index) {
    if (env.size() <= index) throw new RuntimeException("Can't edit env. Index exceeds size.");
    return setNewEnvLike(index, buildEnv(index));
  }
  public V1ContainerFluent.EnvNested editFirstEnv() {
    if (env.size() == 0) throw new RuntimeException("Can't edit first env. The list is empty.");
    return setNewEnvLike(0, buildEnv(0));
  }
  public V1ContainerFluent.EnvNested editLastEnv() {
    int index = env.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last env. The list is empty.");
    return setNewEnvLike(index, buildEnv(index));
  }
  public V1ContainerFluent.EnvNested editMatchingEnv(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(index >= 0 ? index : _visitables.get("envFrom").size(), builder);this.envFrom.add(index >= 0 ? index : envFrom.size(), builder); return (A)this;
  }
  public A setToEnvFrom(Integer index,V1EnvFromSource item) {
    if (this.envFrom == null) {this.envFrom = new ArrayList();}
    V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);
    if (index < 0 || index >= _visitables.get("envFrom").size()) { _visitables.get("envFrom").add(builder); } else { _visitables.get("envFrom").set(index, builder);}
    if (index < 0 || index >= envFrom.size()) { envFrom.add(builder); } else { envFrom.set(index, builder);}
     return (A)this;
  }
  public A addToEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) {
    if (this.envFrom == null) {this.envFrom = new ArrayList();}
    for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this;
  }
  public A addAllToEnvFrom(Collection items) {
    if (this.envFrom == null) {this.envFrom = new ArrayList();}
    for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").add(builder);this.envFrom.add(builder);} return (A)this;
  }
  public A removeFromEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... items) {
    for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder);if (this.envFrom != null) {this.envFrom.remove(builder);}} return (A)this;
  }
  public A removeAllFromEnvFrom(Collection items) {
    for (V1EnvFromSource item : items) {V1EnvFromSourceBuilder builder = new V1EnvFromSourceBuilder(item);_visitables.get("envFrom").remove(builder);if (this.envFrom != null) {this.envFrom.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromEnvFrom(Predicate predicate) {
    if (envFrom == null) return (A) this;
    final Iterator each = envFrom.iterator();
    final List visitables = _visitables.get("envFrom");
    while (each.hasNext()) {
      V1EnvFromSourceBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildEnvFrom instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getEnvFrom() {
    return envFrom != null ? build(envFrom) : null;
  }
  public List buildEnvFrom() {
    return envFrom != null ? build(envFrom) : null;
  }
  public V1EnvFromSource buildEnvFrom(Integer index) {
    return this.envFrom.get(index).build();
  }
  public V1EnvFromSource buildFirstEnvFrom() {
    return this.envFrom.get(0).build();
  }
  public V1EnvFromSource buildLastEnvFrom() {
    return this.envFrom.get(envFrom.size() - 1).build();
  }
  public V1EnvFromSource buildMatchingEnvFrom(Predicate predicate) {
    for (V1EnvFromSourceBuilder item: envFrom) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingEnvFrom(Predicate predicate) {
    for (V1EnvFromSourceBuilder item: envFrom) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withEnvFrom(List envFrom) {
    if (this.envFrom != null) { _visitables.get("envFrom").removeAll(this.envFrom);}
    if (envFrom != null) {this.envFrom = new ArrayList(); for (V1EnvFromSource item : envFrom){this.addToEnvFrom(item);}} else { this.envFrom = null;} return (A) this;
  }
  public A withEnvFrom(io.kubernetes.client.openapi.models.V1EnvFromSource... envFrom) {
    if (this.envFrom != null) {this.envFrom.clear();}
    if (envFrom != null) {for (V1EnvFromSource item :envFrom){ this.addToEnvFrom(item);}} return (A) this;
  }
  public Boolean hasEnvFrom() {
    return envFrom != null && !envFrom.isEmpty();
  }
  public V1ContainerFluent.EnvFromNested addNewEnvFrom() {
    return new V1ContainerFluentImpl.EnvFromNestedImpl();
  }
  public V1ContainerFluent.EnvFromNested addNewEnvFromLike(V1EnvFromSource item) {
    return new V1ContainerFluentImpl.EnvFromNestedImpl(-1, item);
  }
  public V1ContainerFluent.EnvFromNested setNewEnvFromLike(Integer index,V1EnvFromSource item) {
    return new V1ContainerFluentImpl.EnvFromNestedImpl(index, item);
  }
  public V1ContainerFluent.EnvFromNested editEnvFrom(Integer index) {
    if (envFrom.size() <= index) throw new RuntimeException("Can't edit envFrom. Index exceeds size.");
    return setNewEnvFromLike(index, buildEnvFrom(index));
  }
  public V1ContainerFluent.EnvFromNested editFirstEnvFrom() {
    if (envFrom.size() == 0) throw new RuntimeException("Can't edit first envFrom. The list is empty.");
    return setNewEnvFromLike(0, buildEnvFrom(0));
  }
  public V1ContainerFluent.EnvFromNested editLastEnvFrom() {
    int index = envFrom.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last envFrom. The list is empty.");
    return setNewEnvFromLike(index, buildEnvFrom(index));
  }
  public V1ContainerFluent.EnvFromNested editMatchingEnvFrom(Predicate predicate) {
    int index = -1;
    for (int i=0;i withNewLifecycle() {
    return new V1ContainerFluentImpl.LifecycleNestedImpl();
  }
  public V1ContainerFluent.LifecycleNested withNewLifecycleLike(V1Lifecycle item) {
    return new V1ContainerFluentImpl.LifecycleNestedImpl(item);
  }
  public V1ContainerFluent.LifecycleNested editLifecycle() {
    return withNewLifecycleLike(getLifecycle());
  }
  public V1ContainerFluent.LifecycleNested editOrNewLifecycle() {
    return withNewLifecycleLike(getLifecycle() != null ? getLifecycle(): new V1LifecycleBuilder().build());
  }
  public V1ContainerFluent.LifecycleNested editOrNewLifecycleLike(V1Lifecycle item) {
    return withNewLifecycleLike(getLifecycle() != null ? getLifecycle(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildLivenessProbe instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1Probe getLivenessProbe() {
    return this.livenessProbe!=null ?this.livenessProbe.build():null;
  }
  public V1Probe buildLivenessProbe() {
    return this.livenessProbe!=null ?this.livenessProbe.build():null;
  }
  public A withLivenessProbe(V1Probe livenessProbe) {
    _visitables.get("livenessProbe").remove(this.livenessProbe);
    if (livenessProbe!=null){ this.livenessProbe= new V1ProbeBuilder(livenessProbe); _visitables.get("livenessProbe").add(this.livenessProbe);} else { this.livenessProbe = null; _visitables.get("livenessProbe").remove(this.livenessProbe); } return (A) this;
  }
  public Boolean hasLivenessProbe() {
    return this.livenessProbe != null;
  }
  public V1ContainerFluent.LivenessProbeNested withNewLivenessProbe() {
    return new V1ContainerFluentImpl.LivenessProbeNestedImpl();
  }
  public V1ContainerFluent.LivenessProbeNested withNewLivenessProbeLike(V1Probe item) {
    return new V1ContainerFluentImpl.LivenessProbeNestedImpl(item);
  }
  public V1ContainerFluent.LivenessProbeNested editLivenessProbe() {
    return withNewLivenessProbeLike(getLivenessProbe());
  }
  public V1ContainerFluent.LivenessProbeNested editOrNewLivenessProbe() {
    return withNewLivenessProbeLike(getLivenessProbe() != null ? getLivenessProbe(): new V1ProbeBuilder().build());
  }
  public V1ContainerFluent.LivenessProbeNested editOrNewLivenessProbeLike(V1Probe item) {
    return withNewLivenessProbeLike(getLivenessProbe() != null ? getLivenessProbe(): item);
  }
  public String getName() {
    return this.name;
  }
  public A withName(String name) {
    this.name=name; return (A) this;
  }
  public Boolean hasName() {
    return this.name != null;
  }
  public A addToPorts(Integer index,V1ContainerPort item) {
    if (this.ports == null) {this.ports = new ArrayList();}
    V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(index >= 0 ? index : _visitables.get("ports").size(), builder);this.ports.add(index >= 0 ? index : ports.size(), builder); return (A)this;
  }
  public A setToPorts(Integer index,V1ContainerPort item) {
    if (this.ports == null) {this.ports = new ArrayList();}
    V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);
    if (index < 0 || index >= _visitables.get("ports").size()) { _visitables.get("ports").add(builder); } else { _visitables.get("ports").set(index, builder);}
    if (index < 0 || index >= ports.size()) { ports.add(builder); } else { ports.set(index, builder);}
     return (A)this;
  }
  public A addToPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) {
    if (this.ports == null) {this.ports = new ArrayList();}
    for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this;
  }
  public A addAllToPorts(Collection items) {
    if (this.ports == null) {this.ports = new ArrayList();}
    for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").add(builder);this.ports.add(builder);} return (A)this;
  }
  public A removeFromPorts(io.kubernetes.client.openapi.models.V1ContainerPort... items) {
    for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this;
  }
  public A removeAllFromPorts(Collection items) {
    for (V1ContainerPort item : items) {V1ContainerPortBuilder builder = new V1ContainerPortBuilder(item);_visitables.get("ports").remove(builder);if (this.ports != null) {this.ports.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromPorts(Predicate predicate) {
    if (ports == null) return (A) this;
    final Iterator each = ports.iterator();
    final List visitables = _visitables.get("ports");
    while (each.hasNext()) {
      V1ContainerPortBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildPorts instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getPorts() {
    return ports != null ? build(ports) : null;
  }
  public List buildPorts() {
    return ports != null ? build(ports) : null;
  }
  public V1ContainerPort buildPort(Integer index) {
    return this.ports.get(index).build();
  }
  public V1ContainerPort buildFirstPort() {
    return this.ports.get(0).build();
  }
  public V1ContainerPort buildLastPort() {
    return this.ports.get(ports.size() - 1).build();
  }
  public V1ContainerPort buildMatchingPort(Predicate predicate) {
    for (V1ContainerPortBuilder item: ports) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingPort(Predicate predicate) {
    for (V1ContainerPortBuilder item: ports) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withPorts(List ports) {
    if (this.ports != null) { _visitables.get("ports").removeAll(this.ports);}
    if (ports != null) {this.ports = new ArrayList(); for (V1ContainerPort item : ports){this.addToPorts(item);}} else { this.ports = null;} return (A) this;
  }
  public A withPorts(io.kubernetes.client.openapi.models.V1ContainerPort... ports) {
    if (this.ports != null) {this.ports.clear();}
    if (ports != null) {for (V1ContainerPort item :ports){ this.addToPorts(item);}} return (A) this;
  }
  public Boolean hasPorts() {
    return ports != null && !ports.isEmpty();
  }
  public V1ContainerFluent.PortsNested addNewPort() {
    return new V1ContainerFluentImpl.PortsNestedImpl();
  }
  public V1ContainerFluent.PortsNested addNewPortLike(V1ContainerPort item) {
    return new V1ContainerFluentImpl.PortsNestedImpl(-1, item);
  }
  public V1ContainerFluent.PortsNested setNewPortLike(Integer index,V1ContainerPort item) {
    return new V1ContainerFluentImpl.PortsNestedImpl(index, item);
  }
  public V1ContainerFluent.PortsNested editPort(Integer index) {
    if (ports.size() <= index) throw new RuntimeException("Can't edit ports. Index exceeds size.");
    return setNewPortLike(index, buildPort(index));
  }
  public V1ContainerFluent.PortsNested editFirstPort() {
    if (ports.size() == 0) throw new RuntimeException("Can't edit first ports. The list is empty.");
    return setNewPortLike(0, buildPort(0));
  }
  public V1ContainerFluent.PortsNested editLastPort() {
    int index = ports.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last ports. The list is empty.");
    return setNewPortLike(index, buildPort(index));
  }
  public V1ContainerFluent.PortsNested editMatchingPort(Predicate predicate) {
    int index = -1;
    for (int i=0;i withNewReadinessProbe() {
    return new V1ContainerFluentImpl.ReadinessProbeNestedImpl();
  }
  public V1ContainerFluent.ReadinessProbeNested withNewReadinessProbeLike(V1Probe item) {
    return new V1ContainerFluentImpl.ReadinessProbeNestedImpl(item);
  }
  public V1ContainerFluent.ReadinessProbeNested editReadinessProbe() {
    return withNewReadinessProbeLike(getReadinessProbe());
  }
  public V1ContainerFluent.ReadinessProbeNested editOrNewReadinessProbe() {
    return withNewReadinessProbeLike(getReadinessProbe() != null ? getReadinessProbe(): new V1ProbeBuilder().build());
  }
  public V1ContainerFluent.ReadinessProbeNested editOrNewReadinessProbeLike(V1Probe item) {
    return withNewReadinessProbeLike(getReadinessProbe() != null ? getReadinessProbe(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildResources instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1ResourceRequirements getResources() {
    return this.resources!=null ?this.resources.build():null;
  }
  public V1ResourceRequirements buildResources() {
    return this.resources!=null ?this.resources.build():null;
  }
  public A withResources(V1ResourceRequirements resources) {
    _visitables.get("resources").remove(this.resources);
    if (resources!=null){ this.resources= new V1ResourceRequirementsBuilder(resources); _visitables.get("resources").add(this.resources);} else { this.resources = null; _visitables.get("resources").remove(this.resources); } return (A) this;
  }
  public Boolean hasResources() {
    return this.resources != null;
  }
  public V1ContainerFluent.ResourcesNested withNewResources() {
    return new V1ContainerFluentImpl.ResourcesNestedImpl();
  }
  public V1ContainerFluent.ResourcesNested withNewResourcesLike(V1ResourceRequirements item) {
    return new V1ContainerFluentImpl.ResourcesNestedImpl(item);
  }
  public V1ContainerFluent.ResourcesNested editResources() {
    return withNewResourcesLike(getResources());
  }
  public V1ContainerFluent.ResourcesNested editOrNewResources() {
    return withNewResourcesLike(getResources() != null ? getResources(): new V1ResourceRequirementsBuilder().build());
  }
  public V1ContainerFluent.ResourcesNested editOrNewResourcesLike(V1ResourceRequirements item) {
    return withNewResourcesLike(getResources() != null ? getResources(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildSecurityContext instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1SecurityContext getSecurityContext() {
    return this.securityContext!=null ?this.securityContext.build():null;
  }
  public V1SecurityContext buildSecurityContext() {
    return this.securityContext!=null ?this.securityContext.build():null;
  }
  public A withSecurityContext(V1SecurityContext securityContext) {
    _visitables.get("securityContext").remove(this.securityContext);
    if (securityContext!=null){ this.securityContext= new V1SecurityContextBuilder(securityContext); _visitables.get("securityContext").add(this.securityContext);} else { this.securityContext = null; _visitables.get("securityContext").remove(this.securityContext); } return (A) this;
  }
  public Boolean hasSecurityContext() {
    return this.securityContext != null;
  }
  public V1ContainerFluent.SecurityContextNested withNewSecurityContext() {
    return new V1ContainerFluentImpl.SecurityContextNestedImpl();
  }
  public V1ContainerFluent.SecurityContextNested withNewSecurityContextLike(V1SecurityContext item) {
    return new V1ContainerFluentImpl.SecurityContextNestedImpl(item);
  }
  public V1ContainerFluent.SecurityContextNested editSecurityContext() {
    return withNewSecurityContextLike(getSecurityContext());
  }
  public V1ContainerFluent.SecurityContextNested editOrNewSecurityContext() {
    return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): new V1SecurityContextBuilder().build());
  }
  public V1ContainerFluent.SecurityContextNested editOrNewSecurityContextLike(V1SecurityContext item) {
    return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildStartupProbe instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1Probe getStartupProbe() {
    return this.startupProbe!=null ?this.startupProbe.build():null;
  }
  public V1Probe buildStartupProbe() {
    return this.startupProbe!=null ?this.startupProbe.build():null;
  }
  public A withStartupProbe(V1Probe startupProbe) {
    _visitables.get("startupProbe").remove(this.startupProbe);
    if (startupProbe!=null){ this.startupProbe= new V1ProbeBuilder(startupProbe); _visitables.get("startupProbe").add(this.startupProbe);} else { this.startupProbe = null; _visitables.get("startupProbe").remove(this.startupProbe); } return (A) this;
  }
  public Boolean hasStartupProbe() {
    return this.startupProbe != null;
  }
  public V1ContainerFluent.StartupProbeNested withNewStartupProbe() {
    return new V1ContainerFluentImpl.StartupProbeNestedImpl();
  }
  public V1ContainerFluent.StartupProbeNested withNewStartupProbeLike(V1Probe item) {
    return new V1ContainerFluentImpl.StartupProbeNestedImpl(item);
  }
  public V1ContainerFluent.StartupProbeNested editStartupProbe() {
    return withNewStartupProbeLike(getStartupProbe());
  }
  public V1ContainerFluent.StartupProbeNested editOrNewStartupProbe() {
    return withNewStartupProbeLike(getStartupProbe() != null ? getStartupProbe(): new V1ProbeBuilder().build());
  }
  public V1ContainerFluent.StartupProbeNested editOrNewStartupProbeLike(V1Probe item) {
    return withNewStartupProbeLike(getStartupProbe() != null ? getStartupProbe(): item);
  }
  public Boolean getStdin() {
    return this.stdin;
  }
  public A withStdin(Boolean stdin) {
    this.stdin=stdin; return (A) this;
  }
  public Boolean hasStdin() {
    return this.stdin != null;
  }
  public Boolean getStdinOnce() {
    return this.stdinOnce;
  }
  public A withStdinOnce(Boolean stdinOnce) {
    this.stdinOnce=stdinOnce; return (A) this;
  }
  public Boolean hasStdinOnce() {
    return this.stdinOnce != null;
  }
  public String getTerminationMessagePath() {
    return this.terminationMessagePath;
  }
  public A withTerminationMessagePath(String terminationMessagePath) {
    this.terminationMessagePath=terminationMessagePath; return (A) this;
  }
  public Boolean hasTerminationMessagePath() {
    return this.terminationMessagePath != null;
  }
  public String getTerminationMessagePolicy() {
    return this.terminationMessagePolicy;
  }
  public A withTerminationMessagePolicy(String terminationMessagePolicy) {
    this.terminationMessagePolicy=terminationMessagePolicy; return (A) this;
  }
  public Boolean hasTerminationMessagePolicy() {
    return this.terminationMessagePolicy != null;
  }
  public Boolean getTty() {
    return this.tty;
  }
  public A withTty(Boolean tty) {
    this.tty=tty; return (A) this;
  }
  public Boolean hasTty() {
    return this.tty != null;
  }
  public A addToVolumeDevices(Integer index,V1VolumeDevice item) {
    if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();}
    V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(index >= 0 ? index : _visitables.get("volumeDevices").size(), builder);this.volumeDevices.add(index >= 0 ? index : volumeDevices.size(), builder); return (A)this;
  }
  public A setToVolumeDevices(Integer index,V1VolumeDevice item) {
    if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();}
    V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);
    if (index < 0 || index >= _visitables.get("volumeDevices").size()) { _visitables.get("volumeDevices").add(builder); } else { _visitables.get("volumeDevices").set(index, builder);}
    if (index < 0 || index >= volumeDevices.size()) { volumeDevices.add(builder); } else { volumeDevices.set(index, builder);}
     return (A)this;
  }
  public A addToVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) {
    if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();}
    for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this;
  }
  public A addAllToVolumeDevices(Collection items) {
    if (this.volumeDevices == null) {this.volumeDevices = new ArrayList();}
    for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").add(builder);this.volumeDevices.add(builder);} return (A)this;
  }
  public A removeFromVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... items) {
    for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder);if (this.volumeDevices != null) {this.volumeDevices.remove(builder);}} return (A)this;
  }
  public A removeAllFromVolumeDevices(Collection items) {
    for (V1VolumeDevice item : items) {V1VolumeDeviceBuilder builder = new V1VolumeDeviceBuilder(item);_visitables.get("volumeDevices").remove(builder);if (this.volumeDevices != null) {this.volumeDevices.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromVolumeDevices(Predicate predicate) {
    if (volumeDevices == null) return (A) this;
    final Iterator each = volumeDevices.iterator();
    final List visitables = _visitables.get("volumeDevices");
    while (each.hasNext()) {
      V1VolumeDeviceBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildVolumeDevices instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getVolumeDevices() {
    return volumeDevices != null ? build(volumeDevices) : null;
  }
  public List buildVolumeDevices() {
    return volumeDevices != null ? build(volumeDevices) : null;
  }
  public V1VolumeDevice buildVolumeDevice(Integer index) {
    return this.volumeDevices.get(index).build();
  }
  public V1VolumeDevice buildFirstVolumeDevice() {
    return this.volumeDevices.get(0).build();
  }
  public V1VolumeDevice buildLastVolumeDevice() {
    return this.volumeDevices.get(volumeDevices.size() - 1).build();
  }
  public V1VolumeDevice buildMatchingVolumeDevice(Predicate predicate) {
    for (V1VolumeDeviceBuilder item: volumeDevices) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingVolumeDevice(Predicate predicate) {
    for (V1VolumeDeviceBuilder item: volumeDevices) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withVolumeDevices(List volumeDevices) {
    if (this.volumeDevices != null) { _visitables.get("volumeDevices").removeAll(this.volumeDevices);}
    if (volumeDevices != null) {this.volumeDevices = new ArrayList(); for (V1VolumeDevice item : volumeDevices){this.addToVolumeDevices(item);}} else { this.volumeDevices = null;} return (A) this;
  }
  public A withVolumeDevices(io.kubernetes.client.openapi.models.V1VolumeDevice... volumeDevices) {
    if (this.volumeDevices != null) {this.volumeDevices.clear();}
    if (volumeDevices != null) {for (V1VolumeDevice item :volumeDevices){ this.addToVolumeDevices(item);}} return (A) this;
  }
  public Boolean hasVolumeDevices() {
    return volumeDevices != null && !volumeDevices.isEmpty();
  }
  public V1ContainerFluent.VolumeDevicesNested addNewVolumeDevice() {
    return new V1ContainerFluentImpl.VolumeDevicesNestedImpl();
  }
  public V1ContainerFluent.VolumeDevicesNested addNewVolumeDeviceLike(V1VolumeDevice item) {
    return new V1ContainerFluentImpl.VolumeDevicesNestedImpl(-1, item);
  }
  public V1ContainerFluent.VolumeDevicesNested setNewVolumeDeviceLike(Integer index,V1VolumeDevice item) {
    return new V1ContainerFluentImpl.VolumeDevicesNestedImpl(index, item);
  }
  public V1ContainerFluent.VolumeDevicesNested editVolumeDevice(Integer index) {
    if (volumeDevices.size() <= index) throw new RuntimeException("Can't edit volumeDevices. Index exceeds size.");
    return setNewVolumeDeviceLike(index, buildVolumeDevice(index));
  }
  public V1ContainerFluent.VolumeDevicesNested editFirstVolumeDevice() {
    if (volumeDevices.size() == 0) throw new RuntimeException("Can't edit first volumeDevices. The list is empty.");
    return setNewVolumeDeviceLike(0, buildVolumeDevice(0));
  }
  public V1ContainerFluent.VolumeDevicesNested editLastVolumeDevice() {
    int index = volumeDevices.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last volumeDevices. The list is empty.");
    return setNewVolumeDeviceLike(index, buildVolumeDevice(index));
  }
  public V1ContainerFluent.VolumeDevicesNested editMatchingVolumeDevice(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(index >= 0 ? index : _visitables.get("volumeMounts").size(), builder);this.volumeMounts.add(index >= 0 ? index : volumeMounts.size(), builder); return (A)this;
  }
  public A setToVolumeMounts(Integer index,V1VolumeMount item) {
    if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();}
    V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);
    if (index < 0 || index >= _visitables.get("volumeMounts").size()) { _visitables.get("volumeMounts").add(builder); } else { _visitables.get("volumeMounts").set(index, builder);}
    if (index < 0 || index >= volumeMounts.size()) { volumeMounts.add(builder); } else { volumeMounts.set(index, builder);}
     return (A)this;
  }
  public A addToVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) {
    if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();}
    for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this;
  }
  public A addAllToVolumeMounts(Collection items) {
    if (this.volumeMounts == null) {this.volumeMounts = new ArrayList();}
    for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").add(builder);this.volumeMounts.add(builder);} return (A)this;
  }
  public A removeFromVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... items) {
    for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder);if (this.volumeMounts != null) {this.volumeMounts.remove(builder);}} return (A)this;
  }
  public A removeAllFromVolumeMounts(Collection items) {
    for (V1VolumeMount item : items) {V1VolumeMountBuilder builder = new V1VolumeMountBuilder(item);_visitables.get("volumeMounts").remove(builder);if (this.volumeMounts != null) {this.volumeMounts.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromVolumeMounts(Predicate predicate) {
    if (volumeMounts == null) return (A) this;
    final Iterator each = volumeMounts.iterator();
    final List visitables = _visitables.get("volumeMounts");
    while (each.hasNext()) {
      V1VolumeMountBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildVolumeMounts instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getVolumeMounts() {
    return volumeMounts != null ? build(volumeMounts) : null;
  }
  public List buildVolumeMounts() {
    return volumeMounts != null ? build(volumeMounts) : null;
  }
  public V1VolumeMount buildVolumeMount(Integer index) {
    return this.volumeMounts.get(index).build();
  }
  public V1VolumeMount buildFirstVolumeMount() {
    return this.volumeMounts.get(0).build();
  }
  public V1VolumeMount buildLastVolumeMount() {
    return this.volumeMounts.get(volumeMounts.size() - 1).build();
  }
  public V1VolumeMount buildMatchingVolumeMount(Predicate predicate) {
    for (V1VolumeMountBuilder item: volumeMounts) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingVolumeMount(Predicate predicate) {
    for (V1VolumeMountBuilder item: volumeMounts) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withVolumeMounts(List volumeMounts) {
    if (this.volumeMounts != null) { _visitables.get("volumeMounts").removeAll(this.volumeMounts);}
    if (volumeMounts != null) {this.volumeMounts = new ArrayList(); for (V1VolumeMount item : volumeMounts){this.addToVolumeMounts(item);}} else { this.volumeMounts = null;} return (A) this;
  }
  public A withVolumeMounts(io.kubernetes.client.openapi.models.V1VolumeMount... volumeMounts) {
    if (this.volumeMounts != null) {this.volumeMounts.clear();}
    if (volumeMounts != null) {for (V1VolumeMount item :volumeMounts){ this.addToVolumeMounts(item);}} return (A) this;
  }
  public Boolean hasVolumeMounts() {
    return volumeMounts != null && !volumeMounts.isEmpty();
  }
  public V1ContainerFluent.VolumeMountsNested addNewVolumeMount() {
    return new V1ContainerFluentImpl.VolumeMountsNestedImpl();
  }
  public V1ContainerFluent.VolumeMountsNested addNewVolumeMountLike(V1VolumeMount item) {
    return new V1ContainerFluentImpl.VolumeMountsNestedImpl(-1, item);
  }
  public V1ContainerFluent.VolumeMountsNested setNewVolumeMountLike(Integer index,V1VolumeMount item) {
    return new V1ContainerFluentImpl.VolumeMountsNestedImpl(index, item);
  }
  public V1ContainerFluent.VolumeMountsNested editVolumeMount(Integer index) {
    if (volumeMounts.size() <= index) throw new RuntimeException("Can't edit volumeMounts. Index exceeds size.");
    return setNewVolumeMountLike(index, buildVolumeMount(index));
  }
  public V1ContainerFluent.VolumeMountsNested editFirstVolumeMount() {
    if (volumeMounts.size() == 0) throw new RuntimeException("Can't edit first volumeMounts. The list is empty.");
    return setNewVolumeMountLike(0, buildVolumeMount(0));
  }
  public V1ContainerFluent.VolumeMountsNested editLastVolumeMount() {
    int index = volumeMounts.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last volumeMounts. The list is empty.");
    return setNewVolumeMountLike(index, buildVolumeMount(index));
  }
  public V1ContainerFluent.VolumeMountsNested editMatchingVolumeMount(Predicate predicate) {
    int index = -1;
    for (int i=0;i extends V1EnvVarFluentImpl> implements V1ContainerFluent.EnvNested,Nested{
    EnvNestedImpl(Integer index,V1EnvVar item) {
      this.index = index;
      this.builder = new V1EnvVarBuilder(this, item);
    }
    EnvNestedImpl() {
      this.index = -1;
      this.builder = new V1EnvVarBuilder(this);
    }
    V1EnvVarBuilder builder;
    Integer index;
    public N and() {
      return (N) V1ContainerFluentImpl.this.setToEnv(index,builder.build());
    }
    public N endEnv() {
      return and();
    }
    
  }
  class EnvFromNestedImpl extends V1EnvFromSourceFluentImpl> implements V1ContainerFluent.EnvFromNested,Nested{
    EnvFromNestedImpl(Integer index,V1EnvFromSource item) {
      this.index = index;
      this.builder = new V1EnvFromSourceBuilder(this, item);
    }
    EnvFromNestedImpl() {
      this.index = -1;
      this.builder = new V1EnvFromSourceBuilder(this);
    }
    V1EnvFromSourceBuilder builder;
    Integer index;
    public N and() {
      return (N) V1ContainerFluentImpl.this.setToEnvFrom(index,builder.build());
    }
    public N endEnvFrom() {
      return and();
    }
    
  }
  class LifecycleNestedImpl extends V1LifecycleFluentImpl> implements V1ContainerFluent.LifecycleNested,Nested{
    LifecycleNestedImpl(V1Lifecycle item) {
      this.builder = new V1LifecycleBuilder(this, item);
    }
    LifecycleNestedImpl() {
      this.builder = new V1LifecycleBuilder(this);
    }
    V1LifecycleBuilder builder;
    public N and() {
      return (N) V1ContainerFluentImpl.this.withLifecycle(builder.build());
    }
    public N endLifecycle() {
      return and();
    }
    
  }
  class LivenessProbeNestedImpl extends V1ProbeFluentImpl> implements V1ContainerFluent.LivenessProbeNested,Nested{
    LivenessProbeNestedImpl(V1Probe item) {
      this.builder = new V1ProbeBuilder(this, item);
    }
    LivenessProbeNestedImpl() {
      this.builder = new V1ProbeBuilder(this);
    }
    V1ProbeBuilder builder;
    public N and() {
      return (N) V1ContainerFluentImpl.this.withLivenessProbe(builder.build());
    }
    public N endLivenessProbe() {
      return and();
    }
    
  }
  class PortsNestedImpl extends V1ContainerPortFluentImpl> implements V1ContainerFluent.PortsNested,Nested{
    PortsNestedImpl(Integer index,V1ContainerPort item) {
      this.index = index;
      this.builder = new V1ContainerPortBuilder(this, item);
    }
    PortsNestedImpl() {
      this.index = -1;
      this.builder = new V1ContainerPortBuilder(this);
    }
    V1ContainerPortBuilder builder;
    Integer index;
    public N and() {
      return (N) V1ContainerFluentImpl.this.setToPorts(index,builder.build());
    }
    public N endPort() {
      return and();
    }
    
  }
  class ReadinessProbeNestedImpl extends V1ProbeFluentImpl> implements V1ContainerFluent.ReadinessProbeNested,Nested{
    ReadinessProbeNestedImpl(V1Probe item) {
      this.builder = new V1ProbeBuilder(this, item);
    }
    ReadinessProbeNestedImpl() {
      this.builder = new V1ProbeBuilder(this);
    }
    V1ProbeBuilder builder;
    public N and() {
      return (N) V1ContainerFluentImpl.this.withReadinessProbe(builder.build());
    }
    public N endReadinessProbe() {
      return and();
    }
    
  }
  class ResourcesNestedImpl extends V1ResourceRequirementsFluentImpl> implements V1ContainerFluent.ResourcesNested,Nested{
    ResourcesNestedImpl(V1ResourceRequirements item) {
      this.builder = new V1ResourceRequirementsBuilder(this, item);
    }
    ResourcesNestedImpl() {
      this.builder = new V1ResourceRequirementsBuilder(this);
    }
    V1ResourceRequirementsBuilder builder;
    public N and() {
      return (N) V1ContainerFluentImpl.this.withResources(builder.build());
    }
    public N endResources() {
      return and();
    }
    
  }
  class SecurityContextNestedImpl extends V1SecurityContextFluentImpl> implements V1ContainerFluent.SecurityContextNested,Nested{
    SecurityContextNestedImpl(V1SecurityContext item) {
      this.builder = new V1SecurityContextBuilder(this, item);
    }
    SecurityContextNestedImpl() {
      this.builder = new V1SecurityContextBuilder(this);
    }
    V1SecurityContextBuilder builder;
    public N and() {
      return (N) V1ContainerFluentImpl.this.withSecurityContext(builder.build());
    }
    public N endSecurityContext() {
      return and();
    }
    
  }
  class StartupProbeNestedImpl extends V1ProbeFluentImpl> implements V1ContainerFluent.StartupProbeNested,Nested{
    StartupProbeNestedImpl(V1Probe item) {
      this.builder = new V1ProbeBuilder(this, item);
    }
    StartupProbeNestedImpl() {
      this.builder = new V1ProbeBuilder(this);
    }
    V1ProbeBuilder builder;
    public N and() {
      return (N) V1ContainerFluentImpl.this.withStartupProbe(builder.build());
    }
    public N endStartupProbe() {
      return and();
    }
    
  }
  class VolumeDevicesNestedImpl extends V1VolumeDeviceFluentImpl> implements V1ContainerFluent.VolumeDevicesNested,Nested{
    VolumeDevicesNestedImpl(Integer index,V1VolumeDevice item) {
      this.index = index;
      this.builder = new V1VolumeDeviceBuilder(this, item);
    }
    VolumeDevicesNestedImpl() {
      this.index = -1;
      this.builder = new V1VolumeDeviceBuilder(this);
    }
    V1VolumeDeviceBuilder builder;
    Integer index;
    public N and() {
      return (N) V1ContainerFluentImpl.this.setToVolumeDevices(index,builder.build());
    }
    public N endVolumeDevice() {
      return and();
    }
    
  }
  class VolumeMountsNestedImpl extends V1VolumeMountFluentImpl> implements V1ContainerFluent.VolumeMountsNested,Nested{
    VolumeMountsNestedImpl(Integer index,V1VolumeMount item) {
      this.index = index;
      this.builder = new V1VolumeMountBuilder(this, item);
    }
    VolumeMountsNestedImpl() {
      this.index = -1;
      this.builder = new V1VolumeMountBuilder(this);
    }
    V1VolumeMountBuilder builder;
    Integer index;
    public N and() {
      return (N) V1ContainerFluentImpl.this.setToVolumeMounts(index,builder.build());
    }
    public N endVolumeMount() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy