io.kubernetes.client.openapi.models.V1PodSpecFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import io.kubernetes.client.fluent.VisitableBuilder;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.lang.String;
import io.kubernetes.client.fluent.Predicate;
import java.util.LinkedHashMap;
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.StringBuilder;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import io.kubernetes.client.custom.Quantity;
import java.lang.Integer;
import java.lang.StringBuffer;
public class V1PodSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1PodSpecFluent {
private Long activeDeadlineSeconds;
private V1AffinityBuilder affinity;
private Boolean automountServiceAccountToken;
private List containers;
private V1PodDNSConfigBuilder dnsConfig;
private String dnsPolicy;
private Boolean enableServiceLinks;
private List ephemeralContainers;
private List hostAliases;
private Boolean hostIPC;
private Boolean hostNetwork;
private Boolean hostPID;
private String hostname;
private List imagePullSecrets;
private List initContainers;
private String nodeName;
private Map nodeSelector;
private Map overhead;
private String preemptionPolicy;
private Integer priority;
private String priorityClassName;
private List 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 List tolerations;
private List topologySpreadConstraints;
private List volumes;
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.withHostname(instance.getHostname());
this.withImagePullSecrets(instance.getImagePullSecrets());
this.withInitContainers(instance.getInitContainers());
this.withNodeName(instance.getNodeName());
this.withNodeSelector(instance.getNodeSelector());
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());
}
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);} return (A) this;
}
public Boolean hasAffinity() {
return this.affinity != null;
}
public V1PodSpecFluent.AffinityNested withNewAffinity() {
return new AffinityNestedImpl();
}
public V1PodSpecFluent.AffinityNested withNewAffinityLike(V1Affinity item) {
return new 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 isAutomountServiceAccountToken() {
return this.automountServiceAccountToken;
}
public A withAutomountServiceAccountToken(Boolean automountServiceAccountToken) {
this.automountServiceAccountToken=automountServiceAccountToken; return (A) this;
}
public Boolean hasAutomountServiceAccountToken() {
return this.automountServiceAccountToken != null;
}
public A withNewAutomountServiceAccountToken(String arg1) {
return (A)withAutomountServiceAccountToken(new Boolean(arg1));
}
public A withNewAutomountServiceAccountToken(boolean arg1) {
return (A)withAutomountServiceAccountToken(new Boolean(arg1));
}
public A addToContainers(int 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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(containers);
}
public List buildContainers() {
return build(containers);
}
public V1Container buildContainer(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1ContainerBuilder item: containers) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingContainer(io.kubernetes.client.fluent.Predicate predicate) {
for (V1ContainerBuilder item: containers) { if(predicate.apply(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(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 ContainersNestedImpl();
}
public V1PodSpecFluent.ContainersNested addNewContainerLike(V1Container item) {
return new ContainersNestedImpl(-1, item);
}
public V1PodSpecFluent.ContainersNested setNewContainerLike(int index,V1Container item) {
return new ContainersNestedImpl(index, item);
}
public V1PodSpecFluent.ContainersNested editContainer(int 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(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i withNewDnsConfig() {
return new DnsConfigNestedImpl();
}
public V1PodSpecFluent.DnsConfigNested withNewDnsConfigLike(V1PodDNSConfig item) {
return new 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 A withNewDnsPolicy(String arg1) {
return (A)withDnsPolicy(new String(arg1));
}
public A withNewDnsPolicy(StringBuilder arg1) {
return (A)withDnsPolicy(new String(arg1));
}
public A withNewDnsPolicy(StringBuffer arg1) {
return (A)withDnsPolicy(new String(arg1));
}
public Boolean isEnableServiceLinks() {
return this.enableServiceLinks;
}
public A withEnableServiceLinks(Boolean enableServiceLinks) {
this.enableServiceLinks=enableServiceLinks; return (A) this;
}
public Boolean hasEnableServiceLinks() {
return this.enableServiceLinks != null;
}
public A withNewEnableServiceLinks(String arg1) {
return (A)withEnableServiceLinks(new Boolean(arg1));
}
public A withNewEnableServiceLinks(boolean arg1) {
return (A)withEnableServiceLinks(new Boolean(arg1));
}
public A addToEphemeralContainers(int 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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(ephemeralContainers);
}
public List buildEphemeralContainers() {
return build(ephemeralContainers);
}
public V1EphemeralContainer buildEphemeralContainer(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1EphemeralContainerBuilder item: ephemeralContainers) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingEphemeralContainer(io.kubernetes.client.fluent.Predicate predicate) {
for (V1EphemeralContainerBuilder item: ephemeralContainers) { if(predicate.apply(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(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 EphemeralContainersNestedImpl();
}
public V1PodSpecFluent.EphemeralContainersNested addNewEphemeralContainerLike(V1EphemeralContainer item) {
return new EphemeralContainersNestedImpl(-1, item);
}
public V1PodSpecFluent.EphemeralContainersNested setNewEphemeralContainerLike(int index,V1EphemeralContainer item) {
return new EphemeralContainersNestedImpl(index, item);
}
public V1PodSpecFluent.EphemeralContainersNested editEphemeralContainer(int 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(io.kubernetes.client.fluent.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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(hostAliases);
}
public List buildHostAliases() {
return build(hostAliases);
}
public V1HostAlias buildHostAlias(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1HostAliasBuilder item: hostAliases) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingHostAlias(io.kubernetes.client.fluent.Predicate predicate) {
for (V1HostAliasBuilder item: hostAliases) { if(predicate.apply(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(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 HostAliasesNestedImpl();
}
public V1PodSpecFluent.HostAliasesNested addNewHostAliasLike(V1HostAlias item) {
return new HostAliasesNestedImpl(-1, item);
}
public V1PodSpecFluent.HostAliasesNested setNewHostAliasLike(int index,V1HostAlias item) {
return new HostAliasesNestedImpl(index, item);
}
public V1PodSpecFluent.HostAliasesNested editHostAlias(int 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(io.kubernetes.client.fluent.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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(imagePullSecrets);
}
public List buildImagePullSecrets() {
return build(imagePullSecrets);
}
public V1LocalObjectReference buildImagePullSecret(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingImagePullSecret(io.kubernetes.client.fluent.Predicate predicate) {
for (V1LocalObjectReferenceBuilder item: imagePullSecrets) { if(predicate.apply(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(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 ImagePullSecretsNestedImpl();
}
public V1PodSpecFluent.ImagePullSecretsNested addNewImagePullSecretLike(V1LocalObjectReference item) {
return new ImagePullSecretsNestedImpl(-1, item);
}
public V1PodSpecFluent.ImagePullSecretsNested setNewImagePullSecretLike(int index,V1LocalObjectReference item) {
return new ImagePullSecretsNestedImpl(index, item);
}
public V1PodSpecFluent.ImagePullSecretsNested editImagePullSecret(int 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(io.kubernetes.client.fluent.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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(initContainers);
}
public List buildInitContainers() {
return build(initContainers);
}
public V1Container buildInitContainer(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1ContainerBuilder item: initContainers) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingInitContainer(io.kubernetes.client.fluent.Predicate predicate) {
for (V1ContainerBuilder item: initContainers) { if(predicate.apply(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(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 InitContainersNestedImpl();
}
public V1PodSpecFluent.InitContainersNested addNewInitContainerLike(V1Container item) {
return new InitContainersNestedImpl(-1, item);
}
public V1PodSpecFluent.InitContainersNested setNewInitContainerLike(int index,V1Container item) {
return new InitContainersNestedImpl(index, item);
}
public V1PodSpecFluent.InitContainersNested editInitContainer(int 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(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i(); }
if(key != null && value != null) {this.nodeSelector.put(key, value);} return (A)this;
}
public A addToNodeSelector(Map 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;
}
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 A withNewPreemptionPolicy(String arg1) {
return (A)withPreemptionPolicy(new String(arg1));
}
public A withNewPreemptionPolicy(StringBuilder arg1) {
return (A)withPreemptionPolicy(new String(arg1));
}
public A withNewPreemptionPolicy(StringBuffer arg1) {
return (A)withPreemptionPolicy(new String(arg1));
}
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 withNewPriorityClassName(String arg1) {
return (A)withPriorityClassName(new String(arg1));
}
public A withNewPriorityClassName(StringBuilder arg1) {
return (A)withPriorityClassName(new String(arg1));
}
public A withNewPriorityClassName(StringBuffer arg1) {
return (A)withPriorityClassName(new String(arg1));
}
public A addToReadinessGates(int 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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(readinessGates);
}
public List buildReadinessGates() {
return build(readinessGates);
}
public V1PodReadinessGate buildReadinessGate(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1PodReadinessGateBuilder item: readinessGates) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingReadinessGate(io.kubernetes.client.fluent.Predicate predicate) {
for (V1PodReadinessGateBuilder item: readinessGates) { if(predicate.apply(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(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 ReadinessGatesNestedImpl();
}
public V1PodSpecFluent.ReadinessGatesNested addNewReadinessGateLike(V1PodReadinessGate item) {
return new ReadinessGatesNestedImpl(-1, item);
}
public V1PodSpecFluent.ReadinessGatesNested setNewReadinessGateLike(int index,V1PodReadinessGate item) {
return new ReadinessGatesNestedImpl(index, item);
}
public V1PodSpecFluent.ReadinessGatesNested editReadinessGate(int 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(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i withNewSecurityContext() {
return new SecurityContextNestedImpl();
}
public V1PodSpecFluent.SecurityContextNested withNewSecurityContextLike(V1PodSecurityContext item) {
return new 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 A withNewServiceAccount(String arg1) {
return (A)withServiceAccount(new String(arg1));
}
public A withNewServiceAccount(StringBuilder arg1) {
return (A)withServiceAccount(new String(arg1));
}
public A withNewServiceAccount(StringBuffer arg1) {
return (A)withServiceAccount(new String(arg1));
}
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 A withNewServiceAccountName(String arg1) {
return (A)withServiceAccountName(new String(arg1));
}
public A withNewServiceAccountName(StringBuilder arg1) {
return (A)withServiceAccountName(new String(arg1));
}
public A withNewServiceAccountName(StringBuffer arg1) {
return (A)withServiceAccountName(new String(arg1));
}
public Boolean isSetHostnameAsFQDN() {
return this.setHostnameAsFQDN;
}
public A withSetHostnameAsFQDN(Boolean setHostnameAsFQDN) {
this.setHostnameAsFQDN=setHostnameAsFQDN; return (A) this;
}
public Boolean hasSetHostnameAsFQDN() {
return this.setHostnameAsFQDN != null;
}
public A withNewSetHostnameAsFQDN(String arg1) {
return (A)withSetHostnameAsFQDN(new Boolean(arg1));
}
public A withNewSetHostnameAsFQDN(boolean arg1) {
return (A)withSetHostnameAsFQDN(new Boolean(arg1));
}
public Boolean isShareProcessNamespace() {
return this.shareProcessNamespace;
}
public A withShareProcessNamespace(Boolean shareProcessNamespace) {
this.shareProcessNamespace=shareProcessNamespace; return (A) this;
}
public Boolean hasShareProcessNamespace() {
return this.shareProcessNamespace != null;
}
public A withNewShareProcessNamespace(String arg1) {
return (A)withShareProcessNamespace(new Boolean(arg1));
}
public A withNewShareProcessNamespace(boolean arg1) {
return (A)withShareProcessNamespace(new Boolean(arg1));
}
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 A withNewSubdomain(String arg1) {
return (A)withSubdomain(new String(arg1));
}
public A withNewSubdomain(StringBuilder arg1) {
return (A)withSubdomain(new String(arg1));
}
public A withNewSubdomain(StringBuffer arg1) {
return (A)withSubdomain(new String(arg1));
}
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(int 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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(tolerations);
}
public List buildTolerations() {
return build(tolerations);
}
public V1Toleration buildToleration(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1TolerationBuilder item: tolerations) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingToleration(io.kubernetes.client.fluent.Predicate predicate) {
for (V1TolerationBuilder item: tolerations) { if(predicate.apply(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(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 TolerationsNestedImpl();
}
public V1PodSpecFluent.TolerationsNested addNewTolerationLike(V1Toleration item) {
return new TolerationsNestedImpl(-1, item);
}
public V1PodSpecFluent.TolerationsNested setNewTolerationLike(int index,V1Toleration item) {
return new TolerationsNestedImpl(index, item);
}
public V1PodSpecFluent.TolerationsNested editToleration(int 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(io.kubernetes.client.fluent.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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(topologySpreadConstraints);
}
public List buildTopologySpreadConstraints() {
return build(topologySpreadConstraints);
}
public V1TopologySpreadConstraint buildTopologySpreadConstraint(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1TopologySpreadConstraintBuilder item: topologySpreadConstraints) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingTopologySpreadConstraint(io.kubernetes.client.fluent.Predicate predicate) {
for (V1TopologySpreadConstraintBuilder item: topologySpreadConstraints) { if(predicate.apply(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(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 TopologySpreadConstraintsNestedImpl();
}
public V1PodSpecFluent.TopologySpreadConstraintsNested addNewTopologySpreadConstraintLike(V1TopologySpreadConstraint item) {
return new TopologySpreadConstraintsNestedImpl(-1, item);
}
public V1PodSpecFluent.TopologySpreadConstraintsNested setNewTopologySpreadConstraintLike(int index,V1TopologySpreadConstraint item) {
return new TopologySpreadConstraintsNestedImpl(index, item);
}
public V1PodSpecFluent.TopologySpreadConstraintsNested editTopologySpreadConstraint(int 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(io.kubernetes.client.fluent.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(int 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(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(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(io.kubernetes.client.fluent.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.apply(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 build(volumes);
}
public List buildVolumes() {
return build(volumes);
}
public V1Volume buildVolume(int 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(io.kubernetes.client.fluent.Predicate predicate) {
for (V1VolumeBuilder item: volumes) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingVolume(io.kubernetes.client.fluent.Predicate predicate) {
for (V1VolumeBuilder item: volumes) { if(predicate.apply(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(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 VolumesNestedImpl();
}
public V1PodSpecFluent.VolumesNested addNewVolumeLike(V1Volume item) {
return new VolumesNestedImpl(-1, item);
}
public V1PodSpecFluent.VolumesNested setNewVolumeLike(int index,V1Volume item) {
return new VolumesNestedImpl(index, item);
}
public V1PodSpecFluent.VolumesNested editVolume(int 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(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i extends V1AffinityFluentImpl> implements V1PodSpecFluent.AffinityNested,io.kubernetes.client.fluent.Nested {
private final V1AffinityBuilder builder;
AffinityNestedImpl(V1Affinity item) {
this.builder = new V1AffinityBuilder(this, item);
}
AffinityNestedImpl() {
this.builder = new V1AffinityBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.withAffinity(builder.build());
}
public N endAffinity() {
return and();
}
}
public class ContainersNestedImpl extends V1ContainerFluentImpl> implements V1PodSpecFluent.ContainersNested,io.kubernetes.client.fluent.Nested {
private final V1ContainerBuilder builder;
private final int index;
ContainersNestedImpl(int index,V1Container item) {
this.index = index;
this.builder = new V1ContainerBuilder(this, item);
}
ContainersNestedImpl() {
this.index = -1;
this.builder = new V1ContainerBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToContainers(index,builder.build());
}
public N endContainer() {
return and();
}
}
public class DnsConfigNestedImpl extends V1PodDNSConfigFluentImpl> implements V1PodSpecFluent.DnsConfigNested,io.kubernetes.client.fluent.Nested {
private final V1PodDNSConfigBuilder builder;
DnsConfigNestedImpl(V1PodDNSConfig item) {
this.builder = new V1PodDNSConfigBuilder(this, item);
}
DnsConfigNestedImpl() {
this.builder = new V1PodDNSConfigBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.withDnsConfig(builder.build());
}
public N endDnsConfig() {
return and();
}
}
public class EphemeralContainersNestedImpl extends V1EphemeralContainerFluentImpl> implements V1PodSpecFluent.EphemeralContainersNested,io.kubernetes.client.fluent.Nested {
private final V1EphemeralContainerBuilder builder;
private final int index;
EphemeralContainersNestedImpl(int index,V1EphemeralContainer item) {
this.index = index;
this.builder = new V1EphemeralContainerBuilder(this, item);
}
EphemeralContainersNestedImpl() {
this.index = -1;
this.builder = new V1EphemeralContainerBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToEphemeralContainers(index,builder.build());
}
public N endEphemeralContainer() {
return and();
}
}
public class HostAliasesNestedImpl extends V1HostAliasFluentImpl> implements V1PodSpecFluent.HostAliasesNested,io.kubernetes.client.fluent.Nested {
private final V1HostAliasBuilder builder;
private final int index;
HostAliasesNestedImpl(int index,V1HostAlias item) {
this.index = index;
this.builder = new V1HostAliasBuilder(this, item);
}
HostAliasesNestedImpl() {
this.index = -1;
this.builder = new V1HostAliasBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToHostAliases(index,builder.build());
}
public N endHostAlias() {
return and();
}
}
public class ImagePullSecretsNestedImpl extends V1LocalObjectReferenceFluentImpl> implements V1PodSpecFluent.ImagePullSecretsNested,io.kubernetes.client.fluent.Nested {
private final V1LocalObjectReferenceBuilder builder;
private final int index;
ImagePullSecretsNestedImpl(int index,V1LocalObjectReference item) {
this.index = index;
this.builder = new V1LocalObjectReferenceBuilder(this, item);
}
ImagePullSecretsNestedImpl() {
this.index = -1;
this.builder = new V1LocalObjectReferenceBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToImagePullSecrets(index,builder.build());
}
public N endImagePullSecret() {
return and();
}
}
public class InitContainersNestedImpl extends V1ContainerFluentImpl> implements V1PodSpecFluent.InitContainersNested,io.kubernetes.client.fluent.Nested {
private final V1ContainerBuilder builder;
private final int index;
InitContainersNestedImpl(int index,V1Container item) {
this.index = index;
this.builder = new V1ContainerBuilder(this, item);
}
InitContainersNestedImpl() {
this.index = -1;
this.builder = new V1ContainerBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToInitContainers(index,builder.build());
}
public N endInitContainer() {
return and();
}
}
public class ReadinessGatesNestedImpl extends V1PodReadinessGateFluentImpl> implements V1PodSpecFluent.ReadinessGatesNested,io.kubernetes.client.fluent.Nested {
private final V1PodReadinessGateBuilder builder;
private final int index;
ReadinessGatesNestedImpl(int index,V1PodReadinessGate item) {
this.index = index;
this.builder = new V1PodReadinessGateBuilder(this, item);
}
ReadinessGatesNestedImpl() {
this.index = -1;
this.builder = new V1PodReadinessGateBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToReadinessGates(index,builder.build());
}
public N endReadinessGate() {
return and();
}
}
public class SecurityContextNestedImpl extends V1PodSecurityContextFluentImpl> implements V1PodSpecFluent.SecurityContextNested,io.kubernetes.client.fluent.Nested {
private final V1PodSecurityContextBuilder builder;
SecurityContextNestedImpl(V1PodSecurityContext item) {
this.builder = new V1PodSecurityContextBuilder(this, item);
}
SecurityContextNestedImpl() {
this.builder = new V1PodSecurityContextBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.withSecurityContext(builder.build());
}
public N endSecurityContext() {
return and();
}
}
public class TolerationsNestedImpl extends V1TolerationFluentImpl> implements V1PodSpecFluent.TolerationsNested,io.kubernetes.client.fluent.Nested {
private final V1TolerationBuilder builder;
private final int index;
TolerationsNestedImpl(int index,V1Toleration item) {
this.index = index;
this.builder = new V1TolerationBuilder(this, item);
}
TolerationsNestedImpl() {
this.index = -1;
this.builder = new V1TolerationBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToTolerations(index,builder.build());
}
public N endToleration() {
return and();
}
}
public class TopologySpreadConstraintsNestedImpl extends V1TopologySpreadConstraintFluentImpl> implements V1PodSpecFluent.TopologySpreadConstraintsNested,io.kubernetes.client.fluent.Nested {
private final V1TopologySpreadConstraintBuilder builder;
private final int index;
TopologySpreadConstraintsNestedImpl(int index,V1TopologySpreadConstraint item) {
this.index = index;
this.builder = new V1TopologySpreadConstraintBuilder(this, item);
}
TopologySpreadConstraintsNestedImpl() {
this.index = -1;
this.builder = new V1TopologySpreadConstraintBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToTopologySpreadConstraints(index,builder.build());
}
public N endTopologySpreadConstraint() {
return and();
}
}
public class VolumesNestedImpl extends V1VolumeFluentImpl> implements V1PodSpecFluent.VolumesNested,io.kubernetes.client.fluent.Nested {
private final V1VolumeBuilder builder;
private final int index;
VolumesNestedImpl(int index,V1Volume item) {
this.index = index;
this.builder = new V1VolumeBuilder(this, item);
}
VolumesNestedImpl() {
this.index = -1;
this.builder = new V1VolumeBuilder(this);
}
public N and() {
return (N) V1PodSpecFluentImpl.this.setToVolumes(index,builder.build());
}
public N endVolume() {
return and();
}
}
}