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

io.kubernetes.client.openapi.models.V1PodSpecFluentImpl 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.LinkedHashMap;
import java.util.function.Predicate;
import io.kubernetes.client.fluent.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.lang.Long;
import java.util.Collection;
import java.lang.Object;
import java.util.Map;
import java.lang.SuppressWarnings;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import io.kubernetes.client.custom.Quantity;
import java.lang.Integer;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class V1PodSpecFluentImpl> extends BaseFluent implements V1PodSpecFluent{
  public V1PodSpecFluentImpl() {
  }
  public V1PodSpecFluentImpl(V1PodSpec instance) {
    this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds());

    this.withAffinity(instance.getAffinity());

    this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken());

    this.withContainers(instance.getContainers());

    this.withDnsConfig(instance.getDnsConfig());

    this.withDnsPolicy(instance.getDnsPolicy());

    this.withEnableServiceLinks(instance.getEnableServiceLinks());

    this.withEphemeralContainers(instance.getEphemeralContainers());

    this.withHostAliases(instance.getHostAliases());

    this.withHostIPC(instance.getHostIPC());

    this.withHostNetwork(instance.getHostNetwork());

    this.withHostPID(instance.getHostPID());

    this.withHostUsers(instance.getHostUsers());

    this.withHostname(instance.getHostname());

    this.withImagePullSecrets(instance.getImagePullSecrets());

    this.withInitContainers(instance.getInitContainers());

    this.withNodeName(instance.getNodeName());

    this.withNodeSelector(instance.getNodeSelector());

    this.withOs(instance.getOs());

    this.withOverhead(instance.getOverhead());

    this.withPreemptionPolicy(instance.getPreemptionPolicy());

    this.withPriority(instance.getPriority());

    this.withPriorityClassName(instance.getPriorityClassName());

    this.withReadinessGates(instance.getReadinessGates());

    this.withRestartPolicy(instance.getRestartPolicy());

    this.withRuntimeClassName(instance.getRuntimeClassName());

    this.withSchedulerName(instance.getSchedulerName());

    this.withSecurityContext(instance.getSecurityContext());

    this.withServiceAccount(instance.getServiceAccount());

    this.withServiceAccountName(instance.getServiceAccountName());

    this.withSetHostnameAsFQDN(instance.getSetHostnameAsFQDN());

    this.withShareProcessNamespace(instance.getShareProcessNamespace());

    this.withSubdomain(instance.getSubdomain());

    this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds());

    this.withTolerations(instance.getTolerations());

    this.withTopologySpreadConstraints(instance.getTopologySpreadConstraints());

    this.withVolumes(instance.getVolumes());

  }
  private Long activeDeadlineSeconds;
  private V1AffinityBuilder affinity;
  private Boolean automountServiceAccountToken;
  private ArrayList containers;
  private V1PodDNSConfigBuilder dnsConfig;
  private String dnsPolicy;
  private Boolean enableServiceLinks;
  private ArrayList ephemeralContainers;
  private ArrayList hostAliases;
  private Boolean hostIPC;
  private Boolean hostNetwork;
  private Boolean hostPID;
  private Boolean hostUsers;
  private String hostname;
  private ArrayList imagePullSecrets;
  private ArrayList initContainers;
  private String nodeName;
  private Map nodeSelector;
  private V1PodOSBuilder os;
  private Map overhead;
  private String preemptionPolicy;
  private Integer priority;
  private String priorityClassName;
  private ArrayList readinessGates;
  private String restartPolicy;
  private String runtimeClassName;
  private String schedulerName;
  private V1PodSecurityContextBuilder securityContext;
  private String serviceAccount;
  private String serviceAccountName;
  private Boolean setHostnameAsFQDN;
  private Boolean shareProcessNamespace;
  private String subdomain;
  private Long terminationGracePeriodSeconds;
  private ArrayList tolerations;
  private ArrayList topologySpreadConstraints;
  private ArrayList volumes;
  public Long getActiveDeadlineSeconds() {
    return this.activeDeadlineSeconds;
  }
  public A withActiveDeadlineSeconds(Long activeDeadlineSeconds) {
    this.activeDeadlineSeconds=activeDeadlineSeconds; return (A) this;
  }
  public Boolean hasActiveDeadlineSeconds() {
    return this.activeDeadlineSeconds != null;
  }
  
  /**
   * This method has been deprecated, please use method buildAffinity instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1Affinity getAffinity() {
    return this.affinity!=null ?this.affinity.build():null;
  }
  public V1Affinity buildAffinity() {
    return this.affinity!=null ?this.affinity.build():null;
  }
  public A withAffinity(V1Affinity affinity) {
    _visitables.get("affinity").remove(this.affinity);
    if (affinity!=null){ this.affinity= new V1AffinityBuilder(affinity); _visitables.get("affinity").add(this.affinity);} else { this.affinity = null; _visitables.get("affinity").remove(this.affinity); } return (A) this;
  }
  public Boolean hasAffinity() {
    return this.affinity != null;
  }
  public V1PodSpecFluent.AffinityNested withNewAffinity() {
    return new V1PodSpecFluentImpl.AffinityNestedImpl();
  }
  public V1PodSpecFluent.AffinityNested withNewAffinityLike(V1Affinity item) {
    return new V1PodSpecFluentImpl.AffinityNestedImpl(item);
  }
  public V1PodSpecFluent.AffinityNested editAffinity() {
    return withNewAffinityLike(getAffinity());
  }
  public V1PodSpecFluent.AffinityNested editOrNewAffinity() {
    return withNewAffinityLike(getAffinity() != null ? getAffinity(): new V1AffinityBuilder().build());
  }
  public V1PodSpecFluent.AffinityNested editOrNewAffinityLike(V1Affinity item) {
    return withNewAffinityLike(getAffinity() != null ? getAffinity(): item);
  }
  public Boolean getAutomountServiceAccountToken() {
    return this.automountServiceAccountToken;
  }
  public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken) {
    this.automountServiceAccountToken=automountServiceAccountToken; return (A) this;
  }
  public Boolean hasAutomountServiceAccountToken() {
    return this.automountServiceAccountToken != null;
  }
  public A addToContainers(Integer index,V1Container item) {
    if (this.containers == null) {this.containers = new ArrayList();}
    V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(index >= 0 ? index : _visitables.get("containers").size(), builder);this.containers.add(index >= 0 ? index : containers.size(), builder); return (A)this;
  }
  public A setToContainers(Integer index,V1Container item) {
    if (this.containers == null) {this.containers = new ArrayList();}
    V1ContainerBuilder builder = new V1ContainerBuilder(item);
    if (index < 0 || index >= _visitables.get("containers").size()) { _visitables.get("containers").add(builder); } else { _visitables.get("containers").set(index, builder);}
    if (index < 0 || index >= containers.size()) { containers.add(builder); } else { containers.set(index, builder);}
     return (A)this;
  }
  public A addToContainers(io.kubernetes.client.openapi.models.V1Container... items) {
    if (this.containers == null) {this.containers = new ArrayList();}
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(builder);this.containers.add(builder);} return (A)this;
  }
  public A addAllToContainers(Collection items) {
    if (this.containers == null) {this.containers = new ArrayList();}
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").add(builder);this.containers.add(builder);} return (A)this;
  }
  public A removeFromContainers(io.kubernetes.client.openapi.models.V1Container... items) {
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").remove(builder);if (this.containers != null) {this.containers.remove(builder);}} return (A)this;
  }
  public A removeAllFromContainers(Collection items) {
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("containers").remove(builder);if (this.containers != null) {this.containers.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromContainers(Predicate predicate) {
    if (containers == null) return (A) this;
    final Iterator each = containers.iterator();
    final List visitables = _visitables.get("containers");
    while (each.hasNext()) {
      V1ContainerBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildContainers instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getContainers() {
    return containers != null ? build(containers) : null;
  }
  public List buildContainers() {
    return containers != null ? build(containers) : null;
  }
  public V1Container buildContainer(Integer index) {
    return this.containers.get(index).build();
  }
  public V1Container buildFirstContainer() {
    return this.containers.get(0).build();
  }
  public V1Container buildLastContainer() {
    return this.containers.get(containers.size() - 1).build();
  }
  public V1Container buildMatchingContainer(Predicate predicate) {
    for (V1ContainerBuilder item: containers) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingContainer(Predicate predicate) {
    for (V1ContainerBuilder item: containers) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withContainers(List containers) {
    if (this.containers != null) { _visitables.get("containers").removeAll(this.containers);}
    if (containers != null) {this.containers = new ArrayList(); for (V1Container item : containers){this.addToContainers(item);}} else { this.containers = null;} return (A) this;
  }
  public A withContainers(io.kubernetes.client.openapi.models.V1Container... containers) {
    if (this.containers != null) {this.containers.clear();}
    if (containers != null) {for (V1Container item :containers){ this.addToContainers(item);}} return (A) this;
  }
  public Boolean hasContainers() {
    return containers != null && !containers.isEmpty();
  }
  public V1PodSpecFluent.ContainersNested addNewContainer() {
    return new V1PodSpecFluentImpl.ContainersNestedImpl();
  }
  public V1PodSpecFluent.ContainersNested addNewContainerLike(V1Container item) {
    return new V1PodSpecFluentImpl.ContainersNestedImpl(-1, item);
  }
  public V1PodSpecFluent.ContainersNested setNewContainerLike(Integer index,V1Container item) {
    return new V1PodSpecFluentImpl.ContainersNestedImpl(index, item);
  }
  public V1PodSpecFluent.ContainersNested editContainer(Integer index) {
    if (containers.size() <= index) throw new RuntimeException("Can't edit containers. Index exceeds size.");
    return setNewContainerLike(index, buildContainer(index));
  }
  public V1PodSpecFluent.ContainersNested editFirstContainer() {
    if (containers.size() == 0) throw new RuntimeException("Can't edit first containers. The list is empty.");
    return setNewContainerLike(0, buildContainer(0));
  }
  public V1PodSpecFluent.ContainersNested editLastContainer() {
    int index = containers.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last containers. The list is empty.");
    return setNewContainerLike(index, buildContainer(index));
  }
  public V1PodSpecFluent.ContainersNested editMatchingContainer(Predicate predicate) {
    int index = -1;
    for (int i=0;i withNewDnsConfig() {
    return new V1PodSpecFluentImpl.DnsConfigNestedImpl();
  }
  public V1PodSpecFluent.DnsConfigNested withNewDnsConfigLike(V1PodDNSConfig item) {
    return new V1PodSpecFluentImpl.DnsConfigNestedImpl(item);
  }
  public V1PodSpecFluent.DnsConfigNested editDnsConfig() {
    return withNewDnsConfigLike(getDnsConfig());
  }
  public V1PodSpecFluent.DnsConfigNested editOrNewDnsConfig() {
    return withNewDnsConfigLike(getDnsConfig() != null ? getDnsConfig(): new V1PodDNSConfigBuilder().build());
  }
  public V1PodSpecFluent.DnsConfigNested editOrNewDnsConfigLike(V1PodDNSConfig item) {
    return withNewDnsConfigLike(getDnsConfig() != null ? getDnsConfig(): item);
  }
  public String getDnsPolicy() {
    return this.dnsPolicy;
  }
  public A withDnsPolicy(String dnsPolicy) {
    this.dnsPolicy=dnsPolicy; return (A) this;
  }
  public Boolean hasDnsPolicy() {
    return this.dnsPolicy != null;
  }
  public Boolean getEnableServiceLinks() {
    return this.enableServiceLinks;
  }
  public A withEnableServiceLinks(Boolean enableServiceLinks) {
    this.enableServiceLinks=enableServiceLinks; return (A) this;
  }
  public Boolean hasEnableServiceLinks() {
    return this.enableServiceLinks != null;
  }
  public A addToEphemeralContainers(Integer index,V1EphemeralContainer item) {
    if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();}
    V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(index >= 0 ? index : _visitables.get("ephemeralContainers").size(), builder);this.ephemeralContainers.add(index >= 0 ? index : ephemeralContainers.size(), builder); return (A)this;
  }
  public A setToEphemeralContainers(Integer index,V1EphemeralContainer item) {
    if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();}
    V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);
    if (index < 0 || index >= _visitables.get("ephemeralContainers").size()) { _visitables.get("ephemeralContainers").add(builder); } else { _visitables.get("ephemeralContainers").set(index, builder);}
    if (index < 0 || index >= ephemeralContainers.size()) { ephemeralContainers.add(builder); } else { ephemeralContainers.set(index, builder);}
     return (A)this;
  }
  public A addToEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items) {
    if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();}
    for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(builder);this.ephemeralContainers.add(builder);} return (A)this;
  }
  public A addAllToEphemeralContainers(Collection items) {
    if (this.ephemeralContainers == null) {this.ephemeralContainers = new ArrayList();}
    for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").add(builder);this.ephemeralContainers.add(builder);} return (A)this;
  }
  public A removeFromEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... items) {
    for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").remove(builder);if (this.ephemeralContainers != null) {this.ephemeralContainers.remove(builder);}} return (A)this;
  }
  public A removeAllFromEphemeralContainers(Collection items) {
    for (V1EphemeralContainer item : items) {V1EphemeralContainerBuilder builder = new V1EphemeralContainerBuilder(item);_visitables.get("ephemeralContainers").remove(builder);if (this.ephemeralContainers != null) {this.ephemeralContainers.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromEphemeralContainers(Predicate predicate) {
    if (ephemeralContainers == null) return (A) this;
    final Iterator each = ephemeralContainers.iterator();
    final List visitables = _visitables.get("ephemeralContainers");
    while (each.hasNext()) {
      V1EphemeralContainerBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildEphemeralContainers instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getEphemeralContainers() {
    return ephemeralContainers != null ? build(ephemeralContainers) : null;
  }
  public List buildEphemeralContainers() {
    return ephemeralContainers != null ? build(ephemeralContainers) : null;
  }
  public V1EphemeralContainer buildEphemeralContainer(Integer index) {
    return this.ephemeralContainers.get(index).build();
  }
  public V1EphemeralContainer buildFirstEphemeralContainer() {
    return this.ephemeralContainers.get(0).build();
  }
  public V1EphemeralContainer buildLastEphemeralContainer() {
    return this.ephemeralContainers.get(ephemeralContainers.size() - 1).build();
  }
  public V1EphemeralContainer buildMatchingEphemeralContainer(Predicate predicate) {
    for (V1EphemeralContainerBuilder item: ephemeralContainers) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingEphemeralContainer(Predicate predicate) {
    for (V1EphemeralContainerBuilder item: ephemeralContainers) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withEphemeralContainers(List ephemeralContainers) {
    if (this.ephemeralContainers != null) { _visitables.get("ephemeralContainers").removeAll(this.ephemeralContainers);}
    if (ephemeralContainers != null) {this.ephemeralContainers = new ArrayList(); for (V1EphemeralContainer item : ephemeralContainers){this.addToEphemeralContainers(item);}} else { this.ephemeralContainers = null;} return (A) this;
  }
  public A withEphemeralContainers(io.kubernetes.client.openapi.models.V1EphemeralContainer... ephemeralContainers) {
    if (this.ephemeralContainers != null) {this.ephemeralContainers.clear();}
    if (ephemeralContainers != null) {for (V1EphemeralContainer item :ephemeralContainers){ this.addToEphemeralContainers(item);}} return (A) this;
  }
  public Boolean hasEphemeralContainers() {
    return ephemeralContainers != null && !ephemeralContainers.isEmpty();
  }
  public V1PodSpecFluent.EphemeralContainersNested addNewEphemeralContainer() {
    return new V1PodSpecFluentImpl.EphemeralContainersNestedImpl();
  }
  public V1PodSpecFluent.EphemeralContainersNested addNewEphemeralContainerLike(V1EphemeralContainer item) {
    return new V1PodSpecFluentImpl.EphemeralContainersNestedImpl(-1, item);
  }
  public V1PodSpecFluent.EphemeralContainersNested setNewEphemeralContainerLike(Integer index,V1EphemeralContainer item) {
    return new V1PodSpecFluentImpl.EphemeralContainersNestedImpl(index, item);
  }
  public V1PodSpecFluent.EphemeralContainersNested editEphemeralContainer(Integer index) {
    if (ephemeralContainers.size() <= index) throw new RuntimeException("Can't edit ephemeralContainers. Index exceeds size.");
    return setNewEphemeralContainerLike(index, buildEphemeralContainer(index));
  }
  public V1PodSpecFluent.EphemeralContainersNested editFirstEphemeralContainer() {
    if (ephemeralContainers.size() == 0) throw new RuntimeException("Can't edit first ephemeralContainers. The list is empty.");
    return setNewEphemeralContainerLike(0, buildEphemeralContainer(0));
  }
  public V1PodSpecFluent.EphemeralContainersNested editLastEphemeralContainer() {
    int index = ephemeralContainers.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last ephemeralContainers. The list is empty.");
    return setNewEphemeralContainerLike(index, buildEphemeralContainer(index));
  }
  public V1PodSpecFluent.EphemeralContainersNested editMatchingEphemeralContainer(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(index >= 0 ? index : _visitables.get("hostAliases").size(), builder);this.hostAliases.add(index >= 0 ? index : hostAliases.size(), builder); return (A)this;
  }
  public A setToHostAliases(Integer index,V1HostAlias item) {
    if (this.hostAliases == null) {this.hostAliases = new ArrayList();}
    V1HostAliasBuilder builder = new V1HostAliasBuilder(item);
    if (index < 0 || index >= _visitables.get("hostAliases").size()) { _visitables.get("hostAliases").add(builder); } else { _visitables.get("hostAliases").set(index, builder);}
    if (index < 0 || index >= hostAliases.size()) { hostAliases.add(builder); } else { hostAliases.set(index, builder);}
     return (A)this;
  }
  public A addToHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items) {
    if (this.hostAliases == null) {this.hostAliases = new ArrayList();}
    for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(builder);this.hostAliases.add(builder);} return (A)this;
  }
  public A addAllToHostAliases(Collection items) {
    if (this.hostAliases == null) {this.hostAliases = new ArrayList();}
    for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").add(builder);this.hostAliases.add(builder);} return (A)this;
  }
  public A removeFromHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... items) {
    for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").remove(builder);if (this.hostAliases != null) {this.hostAliases.remove(builder);}} return (A)this;
  }
  public A removeAllFromHostAliases(Collection items) {
    for (V1HostAlias item : items) {V1HostAliasBuilder builder = new V1HostAliasBuilder(item);_visitables.get("hostAliases").remove(builder);if (this.hostAliases != null) {this.hostAliases.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromHostAliases(Predicate predicate) {
    if (hostAliases == null) return (A) this;
    final Iterator each = hostAliases.iterator();
    final List visitables = _visitables.get("hostAliases");
    while (each.hasNext()) {
      V1HostAliasBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildHostAliases instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getHostAliases() {
    return hostAliases != null ? build(hostAliases) : null;
  }
  public List buildHostAliases() {
    return hostAliases != null ? build(hostAliases) : null;
  }
  public V1HostAlias buildHostAlias(Integer index) {
    return this.hostAliases.get(index).build();
  }
  public V1HostAlias buildFirstHostAlias() {
    return this.hostAliases.get(0).build();
  }
  public V1HostAlias buildLastHostAlias() {
    return this.hostAliases.get(hostAliases.size() - 1).build();
  }
  public V1HostAlias buildMatchingHostAlias(Predicate predicate) {
    for (V1HostAliasBuilder item: hostAliases) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingHostAlias(Predicate predicate) {
    for (V1HostAliasBuilder item: hostAliases) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withHostAliases(List hostAliases) {
    if (this.hostAliases != null) { _visitables.get("hostAliases").removeAll(this.hostAliases);}
    if (hostAliases != null) {this.hostAliases = new ArrayList(); for (V1HostAlias item : hostAliases){this.addToHostAliases(item);}} else { this.hostAliases = null;} return (A) this;
  }
  public A withHostAliases(io.kubernetes.client.openapi.models.V1HostAlias... hostAliases) {
    if (this.hostAliases != null) {this.hostAliases.clear();}
    if (hostAliases != null) {for (V1HostAlias item :hostAliases){ this.addToHostAliases(item);}} return (A) this;
  }
  public Boolean hasHostAliases() {
    return hostAliases != null && !hostAliases.isEmpty();
  }
  public V1PodSpecFluent.HostAliasesNested addNewHostAlias() {
    return new V1PodSpecFluentImpl.HostAliasesNestedImpl();
  }
  public V1PodSpecFluent.HostAliasesNested addNewHostAliasLike(V1HostAlias item) {
    return new V1PodSpecFluentImpl.HostAliasesNestedImpl(-1, item);
  }
  public V1PodSpecFluent.HostAliasesNested setNewHostAliasLike(Integer index,V1HostAlias item) {
    return new V1PodSpecFluentImpl.HostAliasesNestedImpl(index, item);
  }
  public V1PodSpecFluent.HostAliasesNested editHostAlias(Integer index) {
    if (hostAliases.size() <= index) throw new RuntimeException("Can't edit hostAliases. Index exceeds size.");
    return setNewHostAliasLike(index, buildHostAlias(index));
  }
  public V1PodSpecFluent.HostAliasesNested editFirstHostAlias() {
    if (hostAliases.size() == 0) throw new RuntimeException("Can't edit first hostAliases. The list is empty.");
    return setNewHostAliasLike(0, buildHostAlias(0));
  }
  public V1PodSpecFluent.HostAliasesNested editLastHostAlias() {
    int index = hostAliases.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last hostAliases. The list is empty.");
    return setNewHostAliasLike(index, buildHostAlias(index));
  }
  public V1PodSpecFluent.HostAliasesNested editMatchingHostAlias(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(index >= 0 ? index : _visitables.get("imagePullSecrets").size(), builder);this.imagePullSecrets.add(index >= 0 ? index : imagePullSecrets.size(), builder); return (A)this;
  }
  public A setToImagePullSecrets(Integer index,V1LocalObjectReference item) {
    if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();}
    V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);
    if (index < 0 || index >= _visitables.get("imagePullSecrets").size()) { _visitables.get("imagePullSecrets").add(builder); } else { _visitables.get("imagePullSecrets").set(index, builder);}
    if (index < 0 || index >= imagePullSecrets.size()) { imagePullSecrets.add(builder); } else { imagePullSecrets.set(index, builder);}
     return (A)this;
  }
  public A addToImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) {
    if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();}
    for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this;
  }
  public A addAllToImagePullSecrets(Collection items) {
    if (this.imagePullSecrets == null) {this.imagePullSecrets = new ArrayList();}
    for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").add(builder);this.imagePullSecrets.add(builder);} return (A)this;
  }
  public A removeFromImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... items) {
    for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder);if (this.imagePullSecrets != null) {this.imagePullSecrets.remove(builder);}} return (A)this;
  }
  public A removeAllFromImagePullSecrets(Collection items) {
    for (V1LocalObjectReference item : items) {V1LocalObjectReferenceBuilder builder = new V1LocalObjectReferenceBuilder(item);_visitables.get("imagePullSecrets").remove(builder);if (this.imagePullSecrets != null) {this.imagePullSecrets.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromImagePullSecrets(Predicate predicate) {
    if (imagePullSecrets == null) return (A) this;
    final Iterator each = imagePullSecrets.iterator();
    final List visitables = _visitables.get("imagePullSecrets");
    while (each.hasNext()) {
      V1LocalObjectReferenceBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildImagePullSecrets instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getImagePullSecrets() {
    return imagePullSecrets != null ? build(imagePullSecrets) : null;
  }
  public List buildImagePullSecrets() {
    return imagePullSecrets != null ? build(imagePullSecrets) : null;
  }
  public V1LocalObjectReference buildImagePullSecret(Integer index) {
    return this.imagePullSecrets.get(index).build();
  }
  public V1LocalObjectReference buildFirstImagePullSecret() {
    return this.imagePullSecrets.get(0).build();
  }
  public V1LocalObjectReference buildLastImagePullSecret() {
    return this.imagePullSecrets.get(imagePullSecrets.size() - 1).build();
  }
  public V1LocalObjectReference buildMatchingImagePullSecret(Predicate predicate) {
    for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingImagePullSecret(Predicate predicate) {
    for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withImagePullSecrets(List imagePullSecrets) {
    if (this.imagePullSecrets != null) { _visitables.get("imagePullSecrets").removeAll(this.imagePullSecrets);}
    if (imagePullSecrets != null) {this.imagePullSecrets = new ArrayList(); for (V1LocalObjectReference item : imagePullSecrets){this.addToImagePullSecrets(item);}} else { this.imagePullSecrets = null;} return (A) this;
  }
  public A withImagePullSecrets(io.kubernetes.client.openapi.models.V1LocalObjectReference... imagePullSecrets) {
    if (this.imagePullSecrets != null) {this.imagePullSecrets.clear();}
    if (imagePullSecrets != null) {for (V1LocalObjectReference item :imagePullSecrets){ this.addToImagePullSecrets(item);}} return (A) this;
  }
  public Boolean hasImagePullSecrets() {
    return imagePullSecrets != null && !imagePullSecrets.isEmpty();
  }
  public V1PodSpecFluent.ImagePullSecretsNested addNewImagePullSecret() {
    return new V1PodSpecFluentImpl.ImagePullSecretsNestedImpl();
  }
  public V1PodSpecFluent.ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item) {
    return new V1PodSpecFluentImpl.ImagePullSecretsNestedImpl(-1, item);
  }
  public V1PodSpecFluent.ImagePullSecretsNested setNewImagePullSecretLike(Integer index,V1LocalObjectReference item) {
    return new V1PodSpecFluentImpl.ImagePullSecretsNestedImpl(index, item);
  }
  public V1PodSpecFluent.ImagePullSecretsNested editImagePullSecret(Integer index) {
    if (imagePullSecrets.size() <= index) throw new RuntimeException("Can't edit imagePullSecrets. Index exceeds size.");
    return setNewImagePullSecretLike(index, buildImagePullSecret(index));
  }
  public V1PodSpecFluent.ImagePullSecretsNested editFirstImagePullSecret() {
    if (imagePullSecrets.size() == 0) throw new RuntimeException("Can't edit first imagePullSecrets. The list is empty.");
    return setNewImagePullSecretLike(0, buildImagePullSecret(0));
  }
  public V1PodSpecFluent.ImagePullSecretsNested editLastImagePullSecret() {
    int index = imagePullSecrets.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last imagePullSecrets. The list is empty.");
    return setNewImagePullSecretLike(index, buildImagePullSecret(index));
  }
  public V1PodSpecFluent.ImagePullSecretsNested editMatchingImagePullSecret(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(index >= 0 ? index : _visitables.get("initContainers").size(), builder);this.initContainers.add(index >= 0 ? index : initContainers.size(), builder); return (A)this;
  }
  public A setToInitContainers(Integer index,V1Container item) {
    if (this.initContainers == null) {this.initContainers = new ArrayList();}
    V1ContainerBuilder builder = new V1ContainerBuilder(item);
    if (index < 0 || index >= _visitables.get("initContainers").size()) { _visitables.get("initContainers").add(builder); } else { _visitables.get("initContainers").set(index, builder);}
    if (index < 0 || index >= initContainers.size()) { initContainers.add(builder); } else { initContainers.set(index, builder);}
     return (A)this;
  }
  public A addToInitContainers(io.kubernetes.client.openapi.models.V1Container... items) {
    if (this.initContainers == null) {this.initContainers = new ArrayList();}
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(builder);this.initContainers.add(builder);} return (A)this;
  }
  public A addAllToInitContainers(Collection items) {
    if (this.initContainers == null) {this.initContainers = new ArrayList();}
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").add(builder);this.initContainers.add(builder);} return (A)this;
  }
  public A removeFromInitContainers(io.kubernetes.client.openapi.models.V1Container... items) {
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").remove(builder);if (this.initContainers != null) {this.initContainers.remove(builder);}} return (A)this;
  }
  public A removeAllFromInitContainers(Collection items) {
    for (V1Container item : items) {V1ContainerBuilder builder = new V1ContainerBuilder(item);_visitables.get("initContainers").remove(builder);if (this.initContainers != null) {this.initContainers.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromInitContainers(Predicate predicate) {
    if (initContainers == null) return (A) this;
    final Iterator each = initContainers.iterator();
    final List visitables = _visitables.get("initContainers");
    while (each.hasNext()) {
      V1ContainerBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildInitContainers instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getInitContainers() {
    return initContainers != null ? build(initContainers) : null;
  }
  public List buildInitContainers() {
    return initContainers != null ? build(initContainers) : null;
  }
  public V1Container buildInitContainer(Integer index) {
    return this.initContainers.get(index).build();
  }
  public V1Container buildFirstInitContainer() {
    return this.initContainers.get(0).build();
  }
  public V1Container buildLastInitContainer() {
    return this.initContainers.get(initContainers.size() - 1).build();
  }
  public V1Container buildMatchingInitContainer(Predicate predicate) {
    for (V1ContainerBuilder item: initContainers) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingInitContainer(Predicate predicate) {
    for (V1ContainerBuilder item: initContainers) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withInitContainers(List initContainers) {
    if (this.initContainers != null) { _visitables.get("initContainers").removeAll(this.initContainers);}
    if (initContainers != null) {this.initContainers = new ArrayList(); for (V1Container item : initContainers){this.addToInitContainers(item);}} else { this.initContainers = null;} return (A) this;
  }
  public A withInitContainers(io.kubernetes.client.openapi.models.V1Container... initContainers) {
    if (this.initContainers != null) {this.initContainers.clear();}
    if (initContainers != null) {for (V1Container item :initContainers){ this.addToInitContainers(item);}} return (A) this;
  }
  public Boolean hasInitContainers() {
    return initContainers != null && !initContainers.isEmpty();
  }
  public V1PodSpecFluent.InitContainersNested addNewInitContainer() {
    return new V1PodSpecFluentImpl.InitContainersNestedImpl();
  }
  public V1PodSpecFluent.InitContainersNested addNewInitContainerLike(V1Container item) {
    return new V1PodSpecFluentImpl.InitContainersNestedImpl(-1, item);
  }
  public V1PodSpecFluent.InitContainersNested setNewInitContainerLike(Integer index,V1Container item) {
    return new V1PodSpecFluentImpl.InitContainersNestedImpl(index, item);
  }
  public V1PodSpecFluent.InitContainersNested editInitContainer(Integer index) {
    if (initContainers.size() <= index) throw new RuntimeException("Can't edit initContainers. Index exceeds size.");
    return setNewInitContainerLike(index, buildInitContainer(index));
  }
  public V1PodSpecFluent.InitContainersNested editFirstInitContainer() {
    if (initContainers.size() == 0) throw new RuntimeException("Can't edit first initContainers. The list is empty.");
    return setNewInitContainerLike(0, buildInitContainer(0));
  }
  public V1PodSpecFluent.InitContainersNested editLastInitContainer() {
    int index = initContainers.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last initContainers. The list is empty.");
    return setNewInitContainerLike(index, buildInitContainer(index));
  }
  public V1PodSpecFluent.InitContainersNested editMatchingInitContainer(Predicate predicate) {
    int index = -1;
    for (int i=0;i map) {
    if(this.nodeSelector == null && map != null) { this.nodeSelector = new LinkedHashMap(); }
    if(map != null) { this.nodeSelector.putAll(map);} return (A)this;
  }
  public A removeFromNodeSelector(String key) {
    if(this.nodeSelector == null) { return (A) this; }
    if(key != null && this.nodeSelector != null) {this.nodeSelector.remove(key);} return (A)this;
  }
  public A removeFromNodeSelector(Map map) {
    if(this.nodeSelector == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.nodeSelector != null){this.nodeSelector.remove(key);}}} return (A)this;
  }
  public Map getNodeSelector() {
    return this.nodeSelector;
  }
  public A withNodeSelector(Map nodeSelector) {
    if (nodeSelector == null) { this.nodeSelector =  null;} else {this.nodeSelector = new LinkedHashMap(nodeSelector);} return (A) this;
  }
  public Boolean hasNodeSelector() {
    return this.nodeSelector != null;
  }
  
  /**
   * This method has been deprecated, please use method buildOs instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1PodOS getOs() {
    return this.os!=null ?this.os.build():null;
  }
  public V1PodOS buildOs() {
    return this.os!=null ?this.os.build():null;
  }
  public A withOs(V1PodOS os) {
    _visitables.get("os").remove(this.os);
    if (os!=null){ this.os= new V1PodOSBuilder(os); _visitables.get("os").add(this.os);} else { this.os = null; _visitables.get("os").remove(this.os); } return (A) this;
  }
  public Boolean hasOs() {
    return this.os != null;
  }
  public V1PodSpecFluent.OsNested withNewOs() {
    return new V1PodSpecFluentImpl.OsNestedImpl();
  }
  public V1PodSpecFluent.OsNested withNewOsLike(V1PodOS item) {
    return new V1PodSpecFluentImpl.OsNestedImpl(item);
  }
  public V1PodSpecFluent.OsNested editOs() {
    return withNewOsLike(getOs());
  }
  public V1PodSpecFluent.OsNested editOrNewOs() {
    return withNewOsLike(getOs() != null ? getOs(): new V1PodOSBuilder().build());
  }
  public V1PodSpecFluent.OsNested editOrNewOsLike(V1PodOS item) {
    return withNewOsLike(getOs() != null ? getOs(): item);
  }
  public A addToOverhead(String key,Quantity value) {
    if(this.overhead == null && key != null && value != null) { this.overhead = new LinkedHashMap(); }
    if(key != null && value != null) {this.overhead.put(key, value);} return (A)this;
  }
  public A addToOverhead(Map map) {
    if(this.overhead == null && map != null) { this.overhead = new LinkedHashMap(); }
    if(map != null) { this.overhead.putAll(map);} return (A)this;
  }
  public A removeFromOverhead(String key) {
    if(this.overhead == null) { return (A) this; }
    if(key != null && this.overhead != null) {this.overhead.remove(key);} return (A)this;
  }
  public A removeFromOverhead(Map map) {
    if(this.overhead == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.overhead != null){this.overhead.remove(key);}}} return (A)this;
  }
  public Map getOverhead() {
    return this.overhead;
  }
  public A withOverhead(Map overhead) {
    if (overhead == null) { this.overhead =  null;} else {this.overhead = new LinkedHashMap(overhead);} return (A) this;
  }
  public Boolean hasOverhead() {
    return this.overhead != null;
  }
  public String getPreemptionPolicy() {
    return this.preemptionPolicy;
  }
  public A withPreemptionPolicy(String preemptionPolicy) {
    this.preemptionPolicy=preemptionPolicy; return (A) this;
  }
  public Boolean hasPreemptionPolicy() {
    return this.preemptionPolicy != null;
  }
  public Integer getPriority() {
    return this.priority;
  }
  public A withPriority(Integer priority) {
    this.priority=priority; return (A) this;
  }
  public Boolean hasPriority() {
    return this.priority != null;
  }
  public String getPriorityClassName() {
    return this.priorityClassName;
  }
  public A withPriorityClassName(String priorityClassName) {
    this.priorityClassName=priorityClassName; return (A) this;
  }
  public Boolean hasPriorityClassName() {
    return this.priorityClassName != null;
  }
  public A addToReadinessGates(Integer index,V1PodReadinessGate item) {
    if (this.readinessGates == null) {this.readinessGates = new ArrayList();}
    V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(index >= 0 ? index : _visitables.get("readinessGates").size(), builder);this.readinessGates.add(index >= 0 ? index : readinessGates.size(), builder); return (A)this;
  }
  public A setToReadinessGates(Integer index,V1PodReadinessGate item) {
    if (this.readinessGates == null) {this.readinessGates = new ArrayList();}
    V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);
    if (index < 0 || index >= _visitables.get("readinessGates").size()) { _visitables.get("readinessGates").add(builder); } else { _visitables.get("readinessGates").set(index, builder);}
    if (index < 0 || index >= readinessGates.size()) { readinessGates.add(builder); } else { readinessGates.set(index, builder);}
     return (A)this;
  }
  public A addToReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items) {
    if (this.readinessGates == null) {this.readinessGates = new ArrayList();}
    for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(builder);this.readinessGates.add(builder);} return (A)this;
  }
  public A addAllToReadinessGates(Collection items) {
    if (this.readinessGates == null) {this.readinessGates = new ArrayList();}
    for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").add(builder);this.readinessGates.add(builder);} return (A)this;
  }
  public A removeFromReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... items) {
    for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").remove(builder);if (this.readinessGates != null) {this.readinessGates.remove(builder);}} return (A)this;
  }
  public A removeAllFromReadinessGates(Collection items) {
    for (V1PodReadinessGate item : items) {V1PodReadinessGateBuilder builder = new V1PodReadinessGateBuilder(item);_visitables.get("readinessGates").remove(builder);if (this.readinessGates != null) {this.readinessGates.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromReadinessGates(Predicate predicate) {
    if (readinessGates == null) return (A) this;
    final Iterator each = readinessGates.iterator();
    final List visitables = _visitables.get("readinessGates");
    while (each.hasNext()) {
      V1PodReadinessGateBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildReadinessGates instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getReadinessGates() {
    return readinessGates != null ? build(readinessGates) : null;
  }
  public List buildReadinessGates() {
    return readinessGates != null ? build(readinessGates) : null;
  }
  public V1PodReadinessGate buildReadinessGate(Integer index) {
    return this.readinessGates.get(index).build();
  }
  public V1PodReadinessGate buildFirstReadinessGate() {
    return this.readinessGates.get(0).build();
  }
  public V1PodReadinessGate buildLastReadinessGate() {
    return this.readinessGates.get(readinessGates.size() - 1).build();
  }
  public V1PodReadinessGate buildMatchingReadinessGate(Predicate predicate) {
    for (V1PodReadinessGateBuilder item: readinessGates) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingReadinessGate(Predicate predicate) {
    for (V1PodReadinessGateBuilder item: readinessGates) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withReadinessGates(List readinessGates) {
    if (this.readinessGates != null) { _visitables.get("readinessGates").removeAll(this.readinessGates);}
    if (readinessGates != null) {this.readinessGates = new ArrayList(); for (V1PodReadinessGate item : readinessGates){this.addToReadinessGates(item);}} else { this.readinessGates = null;} return (A) this;
  }
  public A withReadinessGates(io.kubernetes.client.openapi.models.V1PodReadinessGate... readinessGates) {
    if (this.readinessGates != null) {this.readinessGates.clear();}
    if (readinessGates != null) {for (V1PodReadinessGate item :readinessGates){ this.addToReadinessGates(item);}} return (A) this;
  }
  public Boolean hasReadinessGates() {
    return readinessGates != null && !readinessGates.isEmpty();
  }
  public V1PodSpecFluent.ReadinessGatesNested addNewReadinessGate() {
    return new V1PodSpecFluentImpl.ReadinessGatesNestedImpl();
  }
  public V1PodSpecFluent.ReadinessGatesNested addNewReadinessGateLike(V1PodReadinessGate item) {
    return new V1PodSpecFluentImpl.ReadinessGatesNestedImpl(-1, item);
  }
  public V1PodSpecFluent.ReadinessGatesNested setNewReadinessGateLike(Integer index,V1PodReadinessGate item) {
    return new V1PodSpecFluentImpl.ReadinessGatesNestedImpl(index, item);
  }
  public V1PodSpecFluent.ReadinessGatesNested editReadinessGate(Integer index) {
    if (readinessGates.size() <= index) throw new RuntimeException("Can't edit readinessGates. Index exceeds size.");
    return setNewReadinessGateLike(index, buildReadinessGate(index));
  }
  public V1PodSpecFluent.ReadinessGatesNested editFirstReadinessGate() {
    if (readinessGates.size() == 0) throw new RuntimeException("Can't edit first readinessGates. The list is empty.");
    return setNewReadinessGateLike(0, buildReadinessGate(0));
  }
  public V1PodSpecFluent.ReadinessGatesNested editLastReadinessGate() {
    int index = readinessGates.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last readinessGates. The list is empty.");
    return setNewReadinessGateLike(index, buildReadinessGate(index));
  }
  public V1PodSpecFluent.ReadinessGatesNested editMatchingReadinessGate(Predicate predicate) {
    int index = -1;
    for (int i=0;i withNewSecurityContext() {
    return new V1PodSpecFluentImpl.SecurityContextNestedImpl();
  }
  public V1PodSpecFluent.SecurityContextNested withNewSecurityContextLike(V1PodSecurityContext item) {
    return new V1PodSpecFluentImpl.SecurityContextNestedImpl(item);
  }
  public V1PodSpecFluent.SecurityContextNested editSecurityContext() {
    return withNewSecurityContextLike(getSecurityContext());
  }
  public V1PodSpecFluent.SecurityContextNested editOrNewSecurityContext() {
    return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): new V1PodSecurityContextBuilder().build());
  }
  public V1PodSpecFluent.SecurityContextNested editOrNewSecurityContextLike(V1PodSecurityContext item) {
    return withNewSecurityContextLike(getSecurityContext() != null ? getSecurityContext(): item);
  }
  public String getServiceAccount() {
    return this.serviceAccount;
  }
  public A withServiceAccount(String serviceAccount) {
    this.serviceAccount=serviceAccount; return (A) this;
  }
  public Boolean hasServiceAccount() {
    return this.serviceAccount != null;
  }
  public String getServiceAccountName() {
    return this.serviceAccountName;
  }
  public A withServiceAccountName(String serviceAccountName) {
    this.serviceAccountName=serviceAccountName; return (A) this;
  }
  public Boolean hasServiceAccountName() {
    return this.serviceAccountName != null;
  }
  public Boolean getSetHostnameAsFQDN() {
    return this.setHostnameAsFQDN;
  }
  public A withSetHostnameAsFQDN(Boolean setHostnameAsFQDN) {
    this.setHostnameAsFQDN=setHostnameAsFQDN; return (A) this;
  }
  public Boolean hasSetHostnameAsFQDN() {
    return this.setHostnameAsFQDN != null;
  }
  public Boolean getShareProcessNamespace() {
    return this.shareProcessNamespace;
  }
  public A withShareProcessNamespace(Boolean shareProcessNamespace) {
    this.shareProcessNamespace=shareProcessNamespace; return (A) this;
  }
  public Boolean hasShareProcessNamespace() {
    return this.shareProcessNamespace != null;
  }
  public String getSubdomain() {
    return this.subdomain;
  }
  public A withSubdomain(String subdomain) {
    this.subdomain=subdomain; return (A) this;
  }
  public Boolean hasSubdomain() {
    return this.subdomain != null;
  }
  public Long getTerminationGracePeriodSeconds() {
    return this.terminationGracePeriodSeconds;
  }
  public A withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) {
    this.terminationGracePeriodSeconds=terminationGracePeriodSeconds; return (A) this;
  }
  public Boolean hasTerminationGracePeriodSeconds() {
    return this.terminationGracePeriodSeconds != null;
  }
  public A addToTolerations(Integer index,V1Toleration item) {
    if (this.tolerations == null) {this.tolerations = new ArrayList();}
    V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(index >= 0 ? index : _visitables.get("tolerations").size(), builder);this.tolerations.add(index >= 0 ? index : tolerations.size(), builder); return (A)this;
  }
  public A setToTolerations(Integer index,V1Toleration item) {
    if (this.tolerations == null) {this.tolerations = new ArrayList();}
    V1TolerationBuilder builder = new V1TolerationBuilder(item);
    if (index < 0 || index >= _visitables.get("tolerations").size()) { _visitables.get("tolerations").add(builder); } else { _visitables.get("tolerations").set(index, builder);}
    if (index < 0 || index >= tolerations.size()) { tolerations.add(builder); } else { tolerations.set(index, builder);}
     return (A)this;
  }
  public A addToTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) {
    if (this.tolerations == null) {this.tolerations = new ArrayList();}
    for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this;
  }
  public A addAllToTolerations(Collection items) {
    if (this.tolerations == null) {this.tolerations = new ArrayList();}
    for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").add(builder);this.tolerations.add(builder);} return (A)this;
  }
  public A removeFromTolerations(io.kubernetes.client.openapi.models.V1Toleration... items) {
    for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder);if (this.tolerations != null) {this.tolerations.remove(builder);}} return (A)this;
  }
  public A removeAllFromTolerations(Collection items) {
    for (V1Toleration item : items) {V1TolerationBuilder builder = new V1TolerationBuilder(item);_visitables.get("tolerations").remove(builder);if (this.tolerations != null) {this.tolerations.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromTolerations(Predicate predicate) {
    if (tolerations == null) return (A) this;
    final Iterator each = tolerations.iterator();
    final List visitables = _visitables.get("tolerations");
    while (each.hasNext()) {
      V1TolerationBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildTolerations instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getTolerations() {
    return tolerations != null ? build(tolerations) : null;
  }
  public List buildTolerations() {
    return tolerations != null ? build(tolerations) : null;
  }
  public V1Toleration buildToleration(Integer index) {
    return this.tolerations.get(index).build();
  }
  public V1Toleration buildFirstToleration() {
    return this.tolerations.get(0).build();
  }
  public V1Toleration buildLastToleration() {
    return this.tolerations.get(tolerations.size() - 1).build();
  }
  public V1Toleration buildMatchingToleration(Predicate predicate) {
    for (V1TolerationBuilder item: tolerations) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingToleration(Predicate predicate) {
    for (V1TolerationBuilder item: tolerations) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withTolerations(List tolerations) {
    if (this.tolerations != null) { _visitables.get("tolerations").removeAll(this.tolerations);}
    if (tolerations != null) {this.tolerations = new ArrayList(); for (V1Toleration item : tolerations){this.addToTolerations(item);}} else { this.tolerations = null;} return (A) this;
  }
  public A withTolerations(io.kubernetes.client.openapi.models.V1Toleration... tolerations) {
    if (this.tolerations != null) {this.tolerations.clear();}
    if (tolerations != null) {for (V1Toleration item :tolerations){ this.addToTolerations(item);}} return (A) this;
  }
  public Boolean hasTolerations() {
    return tolerations != null && !tolerations.isEmpty();
  }
  public V1PodSpecFluent.TolerationsNested addNewToleration() {
    return new V1PodSpecFluentImpl.TolerationsNestedImpl();
  }
  public V1PodSpecFluent.TolerationsNested addNewTolerationLike(V1Toleration item) {
    return new V1PodSpecFluentImpl.TolerationsNestedImpl(-1, item);
  }
  public V1PodSpecFluent.TolerationsNested setNewTolerationLike(Integer index,V1Toleration item) {
    return new V1PodSpecFluentImpl.TolerationsNestedImpl(index, item);
  }
  public V1PodSpecFluent.TolerationsNested editToleration(Integer index) {
    if (tolerations.size() <= index) throw new RuntimeException("Can't edit tolerations. Index exceeds size.");
    return setNewTolerationLike(index, buildToleration(index));
  }
  public V1PodSpecFluent.TolerationsNested editFirstToleration() {
    if (tolerations.size() == 0) throw new RuntimeException("Can't edit first tolerations. The list is empty.");
    return setNewTolerationLike(0, buildToleration(0));
  }
  public V1PodSpecFluent.TolerationsNested editLastToleration() {
    int index = tolerations.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last tolerations. The list is empty.");
    return setNewTolerationLike(index, buildToleration(index));
  }
  public V1PodSpecFluent.TolerationsNested editMatchingToleration(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(index >= 0 ? index : _visitables.get("topologySpreadConstraints").size(), builder);this.topologySpreadConstraints.add(index >= 0 ? index : topologySpreadConstraints.size(), builder); return (A)this;
  }
  public A setToTopologySpreadConstraints(Integer index,V1TopologySpreadConstraint item) {
    if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();}
    V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);
    if (index < 0 || index >= _visitables.get("topologySpreadConstraints").size()) { _visitables.get("topologySpreadConstraints").add(builder); } else { _visitables.get("topologySpreadConstraints").set(index, builder);}
    if (index < 0 || index >= topologySpreadConstraints.size()) { topologySpreadConstraints.add(builder); } else { topologySpreadConstraints.set(index, builder);}
     return (A)this;
  }
  public A addToTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items) {
    if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();}
    for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(builder);this.topologySpreadConstraints.add(builder);} return (A)this;
  }
  public A addAllToTopologySpreadConstraints(Collection items) {
    if (this.topologySpreadConstraints == null) {this.topologySpreadConstraints = new ArrayList();}
    for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").add(builder);this.topologySpreadConstraints.add(builder);} return (A)this;
  }
  public A removeFromTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... items) {
    for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").remove(builder);if (this.topologySpreadConstraints != null) {this.topologySpreadConstraints.remove(builder);}} return (A)this;
  }
  public A removeAllFromTopologySpreadConstraints(Collection items) {
    for (V1TopologySpreadConstraint item : items) {V1TopologySpreadConstraintBuilder builder = new V1TopologySpreadConstraintBuilder(item);_visitables.get("topologySpreadConstraints").remove(builder);if (this.topologySpreadConstraints != null) {this.topologySpreadConstraints.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromTopologySpreadConstraints(Predicate predicate) {
    if (topologySpreadConstraints == null) return (A) this;
    final Iterator each = topologySpreadConstraints.iterator();
    final List visitables = _visitables.get("topologySpreadConstraints");
    while (each.hasNext()) {
      V1TopologySpreadConstraintBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildTopologySpreadConstraints instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getTopologySpreadConstraints() {
    return topologySpreadConstraints != null ? build(topologySpreadConstraints) : null;
  }
  public List buildTopologySpreadConstraints() {
    return topologySpreadConstraints != null ? build(topologySpreadConstraints) : null;
  }
  public V1TopologySpreadConstraint buildTopologySpreadConstraint(Integer index) {
    return this.topologySpreadConstraints.get(index).build();
  }
  public V1TopologySpreadConstraint buildFirstTopologySpreadConstraint() {
    return this.topologySpreadConstraints.get(0).build();
  }
  public V1TopologySpreadConstraint buildLastTopologySpreadConstraint() {
    return this.topologySpreadConstraints.get(topologySpreadConstraints.size() - 1).build();
  }
  public V1TopologySpreadConstraint buildMatchingTopologySpreadConstraint(Predicate predicate) {
    for (V1TopologySpreadConstraintBuilder item: topologySpreadConstraints) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingTopologySpreadConstraint(Predicate predicate) {
    for (V1TopologySpreadConstraintBuilder item: topologySpreadConstraints) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withTopologySpreadConstraints(List topologySpreadConstraints) {
    if (this.topologySpreadConstraints != null) { _visitables.get("topologySpreadConstraints").removeAll(this.topologySpreadConstraints);}
    if (topologySpreadConstraints != null) {this.topologySpreadConstraints = new ArrayList(); for (V1TopologySpreadConstraint item : topologySpreadConstraints){this.addToTopologySpreadConstraints(item);}} else { this.topologySpreadConstraints = null;} return (A) this;
  }
  public A withTopologySpreadConstraints(io.kubernetes.client.openapi.models.V1TopologySpreadConstraint... topologySpreadConstraints) {
    if (this.topologySpreadConstraints != null) {this.topologySpreadConstraints.clear();}
    if (topologySpreadConstraints != null) {for (V1TopologySpreadConstraint item :topologySpreadConstraints){ this.addToTopologySpreadConstraints(item);}} return (A) this;
  }
  public Boolean hasTopologySpreadConstraints() {
    return topologySpreadConstraints != null && !topologySpreadConstraints.isEmpty();
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested addNewTopologySpreadConstraint() {
    return new V1PodSpecFluentImpl.TopologySpreadConstraintsNestedImpl();
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested addNewTopologySpreadConstraintLike(V1TopologySpreadConstraint item) {
    return new V1PodSpecFluentImpl.TopologySpreadConstraintsNestedImpl(-1, item);
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested setNewTopologySpreadConstraintLike(Integer index,V1TopologySpreadConstraint item) {
    return new V1PodSpecFluentImpl.TopologySpreadConstraintsNestedImpl(index, item);
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested editTopologySpreadConstraint(Integer index) {
    if (topologySpreadConstraints.size() <= index) throw new RuntimeException("Can't edit topologySpreadConstraints. Index exceeds size.");
    return setNewTopologySpreadConstraintLike(index, buildTopologySpreadConstraint(index));
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested editFirstTopologySpreadConstraint() {
    if (topologySpreadConstraints.size() == 0) throw new RuntimeException("Can't edit first topologySpreadConstraints. The list is empty.");
    return setNewTopologySpreadConstraintLike(0, buildTopologySpreadConstraint(0));
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested editLastTopologySpreadConstraint() {
    int index = topologySpreadConstraints.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last topologySpreadConstraints. The list is empty.");
    return setNewTopologySpreadConstraintLike(index, buildTopologySpreadConstraint(index));
  }
  public V1PodSpecFluent.TopologySpreadConstraintsNested editMatchingTopologySpreadConstraint(Predicate predicate) {
    int index = -1;
    for (int i=0;i();}
    V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(index >= 0 ? index : _visitables.get("volumes").size(), builder);this.volumes.add(index >= 0 ? index : volumes.size(), builder); return (A)this;
  }
  public A setToVolumes(Integer index,V1Volume item) {
    if (this.volumes == null) {this.volumes = new ArrayList();}
    V1VolumeBuilder builder = new V1VolumeBuilder(item);
    if (index < 0 || index >= _visitables.get("volumes").size()) { _visitables.get("volumes").add(builder); } else { _visitables.get("volumes").set(index, builder);}
    if (index < 0 || index >= volumes.size()) { volumes.add(builder); } else { volumes.set(index, builder);}
     return (A)this;
  }
  public A addToVolumes(io.kubernetes.client.openapi.models.V1Volume... items) {
    if (this.volumes == null) {this.volumes = new ArrayList();}
    for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(builder);this.volumes.add(builder);} return (A)this;
  }
  public A addAllToVolumes(Collection items) {
    if (this.volumes == null) {this.volumes = new ArrayList();}
    for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").add(builder);this.volumes.add(builder);} return (A)this;
  }
  public A removeFromVolumes(io.kubernetes.client.openapi.models.V1Volume... items) {
    for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").remove(builder);if (this.volumes != null) {this.volumes.remove(builder);}} return (A)this;
  }
  public A removeAllFromVolumes(Collection items) {
    for (V1Volume item : items) {V1VolumeBuilder builder = new V1VolumeBuilder(item);_visitables.get("volumes").remove(builder);if (this.volumes != null) {this.volumes.remove(builder);}} return (A)this;
  }
  public A removeMatchingFromVolumes(Predicate predicate) {
    if (volumes == null) return (A) this;
    final Iterator each = volumes.iterator();
    final List visitables = _visitables.get("volumes");
    while (each.hasNext()) {
      V1VolumeBuilder builder = each.next();
      if (predicate.test(builder)) {
        visitables.remove(builder);
        each.remove();
      }
    }
    return (A)this;
  }
  
  /**
   * This method has been deprecated, please use method buildVolumes instead.
   * @return The buildable object.
   */
  @Deprecated
  public List getVolumes() {
    return volumes != null ? build(volumes) : null;
  }
  public List buildVolumes() {
    return volumes != null ? build(volumes) : null;
  }
  public V1Volume buildVolume(Integer index) {
    return this.volumes.get(index).build();
  }
  public V1Volume buildFirstVolume() {
    return this.volumes.get(0).build();
  }
  public V1Volume buildLastVolume() {
    return this.volumes.get(volumes.size() - 1).build();
  }
  public V1Volume buildMatchingVolume(Predicate predicate) {
    for (V1VolumeBuilder item: volumes) { if(predicate.test(item)){ return item.build();} } return null;
  }
  public Boolean hasMatchingVolume(Predicate predicate) {
    for (V1VolumeBuilder item: volumes) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withVolumes(List volumes) {
    if (this.volumes != null) { _visitables.get("volumes").removeAll(this.volumes);}
    if (volumes != null) {this.volumes = new ArrayList(); for (V1Volume item : volumes){this.addToVolumes(item);}} else { this.volumes = null;} return (A) this;
  }
  public A withVolumes(io.kubernetes.client.openapi.models.V1Volume... volumes) {
    if (this.volumes != null) {this.volumes.clear();}
    if (volumes != null) {for (V1Volume item :volumes){ this.addToVolumes(item);}} return (A) this;
  }
  public Boolean hasVolumes() {
    return volumes != null && !volumes.isEmpty();
  }
  public V1PodSpecFluent.VolumesNested addNewVolume() {
    return new V1PodSpecFluentImpl.VolumesNestedImpl();
  }
  public V1PodSpecFluent.VolumesNested addNewVolumeLike(V1Volume item) {
    return new V1PodSpecFluentImpl.VolumesNestedImpl(-1, item);
  }
  public V1PodSpecFluent.VolumesNested setNewVolumeLike(Integer index,V1Volume item) {
    return new V1PodSpecFluentImpl.VolumesNestedImpl(index, item);
  }
  public V1PodSpecFluent.VolumesNested editVolume(Integer index) {
    if (volumes.size() <= index) throw new RuntimeException("Can't edit volumes. Index exceeds size.");
    return setNewVolumeLike(index, buildVolume(index));
  }
  public V1PodSpecFluent.VolumesNested editFirstVolume() {
    if (volumes.size() == 0) throw new RuntimeException("Can't edit first volumes. The list is empty.");
    return setNewVolumeLike(0, buildVolume(0));
  }
  public V1PodSpecFluent.VolumesNested editLastVolume() {
    int index = volumes.size() - 1;
    if (index < 0) throw new RuntimeException("Can't edit last volumes. The list is empty.");
    return setNewVolumeLike(index, buildVolume(index));
  }
  public V1PodSpecFluent.VolumesNested editMatchingVolume(Predicate predicate) {
    int index = -1;
    for (int i=0;i extends V1AffinityFluentImpl> implements V1PodSpecFluent.AffinityNested,Nested{
    AffinityNestedImpl(V1Affinity item) {
      this.builder = new V1AffinityBuilder(this, item);
    }
    AffinityNestedImpl() {
      this.builder = new V1AffinityBuilder(this);
    }
    V1AffinityBuilder builder;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.withAffinity(builder.build());
    }
    public N endAffinity() {
      return and();
    }
    
  }
  class ContainersNestedImpl extends V1ContainerFluentImpl> implements V1PodSpecFluent.ContainersNested,Nested{
    ContainersNestedImpl(Integer index,V1Container item) {
      this.index = index;
      this.builder = new V1ContainerBuilder(this, item);
    }
    ContainersNestedImpl() {
      this.index = -1;
      this.builder = new V1ContainerBuilder(this);
    }
    V1ContainerBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToContainers(index,builder.build());
    }
    public N endContainer() {
      return and();
    }
    
  }
  class DnsConfigNestedImpl extends V1PodDNSConfigFluentImpl> implements V1PodSpecFluent.DnsConfigNested,Nested{
    DnsConfigNestedImpl(V1PodDNSConfig item) {
      this.builder = new V1PodDNSConfigBuilder(this, item);
    }
    DnsConfigNestedImpl() {
      this.builder = new V1PodDNSConfigBuilder(this);
    }
    V1PodDNSConfigBuilder builder;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.withDnsConfig(builder.build());
    }
    public N endDnsConfig() {
      return and();
    }
    
  }
  class EphemeralContainersNestedImpl extends V1EphemeralContainerFluentImpl> implements V1PodSpecFluent.EphemeralContainersNested,Nested{
    EphemeralContainersNestedImpl(Integer index,V1EphemeralContainer item) {
      this.index = index;
      this.builder = new V1EphemeralContainerBuilder(this, item);
    }
    EphemeralContainersNestedImpl() {
      this.index = -1;
      this.builder = new V1EphemeralContainerBuilder(this);
    }
    V1EphemeralContainerBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToEphemeralContainers(index,builder.build());
    }
    public N endEphemeralContainer() {
      return and();
    }
    
  }
  class HostAliasesNestedImpl extends V1HostAliasFluentImpl> implements V1PodSpecFluent.HostAliasesNested,Nested{
    HostAliasesNestedImpl(Integer index,V1HostAlias item) {
      this.index = index;
      this.builder = new V1HostAliasBuilder(this, item);
    }
    HostAliasesNestedImpl() {
      this.index = -1;
      this.builder = new V1HostAliasBuilder(this);
    }
    V1HostAliasBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToHostAliases(index,builder.build());
    }
    public N endHostAlias() {
      return and();
    }
    
  }
  class ImagePullSecretsNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1PodSpecFluent.ImagePullSecretsNested,Nested{
    ImagePullSecretsNestedImpl(Integer index,V1LocalObjectReference item) {
      this.index = index;
      this.builder = new V1LocalObjectReferenceBuilder(this, item);
    }
    ImagePullSecretsNestedImpl() {
      this.index = -1;
      this.builder = new V1LocalObjectReferenceBuilder(this);
    }
    V1LocalObjectReferenceBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToImagePullSecrets(index,builder.build());
    }
    public N endImagePullSecret() {
      return and();
    }
    
  }
  class InitContainersNestedImpl extends V1ContainerFluentImpl> implements V1PodSpecFluent.InitContainersNested,Nested{
    InitContainersNestedImpl(Integer index,V1Container item) {
      this.index = index;
      this.builder = new V1ContainerBuilder(this, item);
    }
    InitContainersNestedImpl() {
      this.index = -1;
      this.builder = new V1ContainerBuilder(this);
    }
    V1ContainerBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToInitContainers(index,builder.build());
    }
    public N endInitContainer() {
      return and();
    }
    
  }
  class OsNestedImpl extends V1PodOSFluentImpl> implements V1PodSpecFluent.OsNested,Nested{
    OsNestedImpl(V1PodOS item) {
      this.builder = new V1PodOSBuilder(this, item);
    }
    OsNestedImpl() {
      this.builder = new V1PodOSBuilder(this);
    }
    V1PodOSBuilder builder;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.withOs(builder.build());
    }
    public N endOs() {
      return and();
    }
    
  }
  class ReadinessGatesNestedImpl extends V1PodReadinessGateFluentImpl> implements V1PodSpecFluent.ReadinessGatesNested,Nested{
    ReadinessGatesNestedImpl(Integer index,V1PodReadinessGate item) {
      this.index = index;
      this.builder = new V1PodReadinessGateBuilder(this, item);
    }
    ReadinessGatesNestedImpl() {
      this.index = -1;
      this.builder = new V1PodReadinessGateBuilder(this);
    }
    V1PodReadinessGateBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToReadinessGates(index,builder.build());
    }
    public N endReadinessGate() {
      return and();
    }
    
  }
  class SecurityContextNestedImpl extends V1PodSecurityContextFluentImpl> implements V1PodSpecFluent.SecurityContextNested,Nested{
    SecurityContextNestedImpl(V1PodSecurityContext item) {
      this.builder = new V1PodSecurityContextBuilder(this, item);
    }
    SecurityContextNestedImpl() {
      this.builder = new V1PodSecurityContextBuilder(this);
    }
    V1PodSecurityContextBuilder builder;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.withSecurityContext(builder.build());
    }
    public N endSecurityContext() {
      return and();
    }
    
  }
  class TolerationsNestedImpl extends V1TolerationFluentImpl> implements V1PodSpecFluent.TolerationsNested,Nested{
    TolerationsNestedImpl(Integer index,V1Toleration item) {
      this.index = index;
      this.builder = new V1TolerationBuilder(this, item);
    }
    TolerationsNestedImpl() {
      this.index = -1;
      this.builder = new V1TolerationBuilder(this);
    }
    V1TolerationBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToTolerations(index,builder.build());
    }
    public N endToleration() {
      return and();
    }
    
  }
  class TopologySpreadConstraintsNestedImpl extends V1TopologySpreadConstraintFluentImpl> implements V1PodSpecFluent.TopologySpreadConstraintsNested,Nested{
    TopologySpreadConstraintsNestedImpl(Integer index,V1TopologySpreadConstraint item) {
      this.index = index;
      this.builder = new V1TopologySpreadConstraintBuilder(this, item);
    }
    TopologySpreadConstraintsNestedImpl() {
      this.index = -1;
      this.builder = new V1TopologySpreadConstraintBuilder(this);
    }
    V1TopologySpreadConstraintBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToTopologySpreadConstraints(index,builder.build());
    }
    public N endTopologySpreadConstraint() {
      return and();
    }
    
  }
  class VolumesNestedImpl extends V1VolumeFluentImpl> implements V1PodSpecFluent.VolumesNested,Nested{
    VolumesNestedImpl(Integer index,V1Volume item) {
      this.index = index;
      this.builder = new V1VolumeBuilder(this, item);
    }
    VolumesNestedImpl() {
      this.index = -1;
      this.builder = new V1VolumeBuilder(this);
    }
    V1VolumeBuilder builder;
    Integer index;
    public N and() {
      return (N) V1PodSpecFluentImpl.this.setToVolumes(index,builder.build());
    }
    public N endVolume() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy