
io.kubernetes.client.openapi.models.V1beta1PodSecurityPolicySpecFluentImpl 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 io.kubernetes.client.fluent.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.util.Collection;
import java.lang.Object;
import java.lang.StringBuilder;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import java.lang.StringBuffer;
public class V1beta1PodSecurityPolicySpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1PodSecurityPolicySpecFluent {
private Boolean allowPrivilegeEscalation;
private List allowedCSIDrivers;
private List allowedCapabilities;
private List allowedFlexVolumes;
private List allowedHostPaths;
private List allowedProcMountTypes;
private List allowedUnsafeSysctls;
private List defaultAddCapabilities;
private Boolean defaultAllowPrivilegeEscalation;
private List forbiddenSysctls;
private V1beta1FSGroupStrategyOptionsBuilder fsGroup;
private Boolean hostIPC;
private Boolean hostNetwork;
private Boolean hostPID;
private List hostPorts;
private Boolean privileged;
private Boolean readOnlyRootFilesystem;
private List requiredDropCapabilities;
private V1beta1RunAsGroupStrategyOptionsBuilder runAsGroup;
private V1beta1RunAsUserStrategyOptionsBuilder runAsUser;
private V1beta1RuntimeClassStrategyOptionsBuilder runtimeClass;
private V1beta1SELinuxStrategyOptionsBuilder seLinux;
private V1beta1SupplementalGroupsStrategyOptionsBuilder supplementalGroups;
private List volumes;
public V1beta1PodSecurityPolicySpecFluentImpl() {
}
public V1beta1PodSecurityPolicySpecFluentImpl(V1beta1PodSecurityPolicySpec instance) {
this.withAllowPrivilegeEscalation(instance.getAllowPrivilegeEscalation());
this.withAllowedCSIDrivers(instance.getAllowedCSIDrivers());
this.withAllowedCapabilities(instance.getAllowedCapabilities());
this.withAllowedFlexVolumes(instance.getAllowedFlexVolumes());
this.withAllowedHostPaths(instance.getAllowedHostPaths());
this.withAllowedProcMountTypes(instance.getAllowedProcMountTypes());
this.withAllowedUnsafeSysctls(instance.getAllowedUnsafeSysctls());
this.withDefaultAddCapabilities(instance.getDefaultAddCapabilities());
this.withDefaultAllowPrivilegeEscalation(instance.getDefaultAllowPrivilegeEscalation());
this.withForbiddenSysctls(instance.getForbiddenSysctls());
this.withFsGroup(instance.getFsGroup());
this.withHostIPC(instance.getHostIPC());
this.withHostNetwork(instance.getHostNetwork());
this.withHostPID(instance.getHostPID());
this.withHostPorts(instance.getHostPorts());
this.withPrivileged(instance.getPrivileged());
this.withReadOnlyRootFilesystem(instance.getReadOnlyRootFilesystem());
this.withRequiredDropCapabilities(instance.getRequiredDropCapabilities());
this.withRunAsGroup(instance.getRunAsGroup());
this.withRunAsUser(instance.getRunAsUser());
this.withRuntimeClass(instance.getRuntimeClass());
this.withSeLinux(instance.getSeLinux());
this.withSupplementalGroups(instance.getSupplementalGroups());
this.withVolumes(instance.getVolumes());
}
public Boolean isAllowPrivilegeEscalation() {
return this.allowPrivilegeEscalation;
}
public A withAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation) {
this.allowPrivilegeEscalation=allowPrivilegeEscalation; return (A) this;
}
public Boolean hasAllowPrivilegeEscalation() {
return this.allowPrivilegeEscalation != null;
}
public A withNewAllowPrivilegeEscalation(String arg1) {
return (A)withAllowPrivilegeEscalation(new Boolean(arg1));
}
public A withNewAllowPrivilegeEscalation(boolean arg1) {
return (A)withAllowPrivilegeEscalation(new Boolean(arg1));
}
public A addToAllowedCSIDrivers(int index,V1beta1AllowedCSIDriver item) {
if (this.allowedCSIDrivers == null) {this.allowedCSIDrivers = new ArrayList();}
V1beta1AllowedCSIDriverBuilder builder = new V1beta1AllowedCSIDriverBuilder(item);_visitables.get("allowedCSIDrivers").add(index >= 0 ? index : _visitables.get("allowedCSIDrivers").size(), builder);this.allowedCSIDrivers.add(index >= 0 ? index : allowedCSIDrivers.size(), builder); return (A)this;
}
public A setToAllowedCSIDrivers(int index,V1beta1AllowedCSIDriver item) {
if (this.allowedCSIDrivers == null) {this.allowedCSIDrivers = new ArrayList();}
V1beta1AllowedCSIDriverBuilder builder = new V1beta1AllowedCSIDriverBuilder(item);
if (index < 0 || index >= _visitables.get("allowedCSIDrivers").size()) { _visitables.get("allowedCSIDrivers").add(builder); } else { _visitables.get("allowedCSIDrivers").set(index, builder);}
if (index < 0 || index >= allowedCSIDrivers.size()) { allowedCSIDrivers.add(builder); } else { allowedCSIDrivers.set(index, builder);}
return (A)this;
}
public A addToAllowedCSIDrivers(V1beta1AllowedCSIDriver... items) {
if (this.allowedCSIDrivers == null) {this.allowedCSIDrivers = new ArrayList();}
for (V1beta1AllowedCSIDriver item : items) {V1beta1AllowedCSIDriverBuilder builder = new V1beta1AllowedCSIDriverBuilder(item);_visitables.get("allowedCSIDrivers").add(builder);this.allowedCSIDrivers.add(builder);} return (A)this;
}
public A addAllToAllowedCSIDrivers(Collection items) {
if (this.allowedCSIDrivers == null) {this.allowedCSIDrivers = new ArrayList();}
for (V1beta1AllowedCSIDriver item : items) {V1beta1AllowedCSIDriverBuilder builder = new V1beta1AllowedCSIDriverBuilder(item);_visitables.get("allowedCSIDrivers").add(builder);this.allowedCSIDrivers.add(builder);} return (A)this;
}
public A removeFromAllowedCSIDrivers(V1beta1AllowedCSIDriver... items) {
for (V1beta1AllowedCSIDriver item : items) {V1beta1AllowedCSIDriverBuilder builder = new V1beta1AllowedCSIDriverBuilder(item);_visitables.get("allowedCSIDrivers").remove(builder);if (this.allowedCSIDrivers != null) {this.allowedCSIDrivers.remove(builder);}} return (A)this;
}
public A removeAllFromAllowedCSIDrivers(Collection items) {
for (V1beta1AllowedCSIDriver item : items) {V1beta1AllowedCSIDriverBuilder builder = new V1beta1AllowedCSIDriverBuilder(item);_visitables.get("allowedCSIDrivers").remove(builder);if (this.allowedCSIDrivers != null) {this.allowedCSIDrivers.remove(builder);}} return (A)this;
}
public A removeMatchingFromAllowedCSIDrivers(io.kubernetes.client.fluent.Predicate predicate) {
if (allowedCSIDrivers == null) return (A) this;
final Iterator each = allowedCSIDrivers.iterator();
final List visitables = _visitables.get("allowedCSIDrivers");
while (each.hasNext()) {
V1beta1AllowedCSIDriverBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildAllowedCSIDrivers instead.
* @return The buildable object.
*/
@Deprecated public List getAllowedCSIDrivers() {
return build(allowedCSIDrivers);
}
public List buildAllowedCSIDrivers() {
return build(allowedCSIDrivers);
}
public V1beta1AllowedCSIDriver buildAllowedCSIDriver(int index) {
return this.allowedCSIDrivers.get(index).build();
}
public V1beta1AllowedCSIDriver buildFirstAllowedCSIDriver() {
return this.allowedCSIDrivers.get(0).build();
}
public V1beta1AllowedCSIDriver buildLastAllowedCSIDriver() {
return this.allowedCSIDrivers.get(allowedCSIDrivers.size() - 1).build();
}
public V1beta1AllowedCSIDriver buildMatchingAllowedCSIDriver(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1AllowedCSIDriverBuilder item: allowedCSIDrivers) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingAllowedCSIDriver(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1AllowedCSIDriverBuilder item: allowedCSIDrivers) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAllowedCSIDrivers(List allowedCSIDrivers) {
if (this.allowedCSIDrivers != null) { _visitables.get("allowedCSIDrivers").removeAll(this.allowedCSIDrivers);}
if (allowedCSIDrivers != null) {this.allowedCSIDrivers = new ArrayList(); for (V1beta1AllowedCSIDriver item : allowedCSIDrivers){this.addToAllowedCSIDrivers(item);}} else { this.allowedCSIDrivers = null;} return (A) this;
}
public A withAllowedCSIDrivers(V1beta1AllowedCSIDriver... allowedCSIDrivers) {
if (this.allowedCSIDrivers != null) {this.allowedCSIDrivers.clear();}
if (allowedCSIDrivers != null) {for (V1beta1AllowedCSIDriver item :allowedCSIDrivers){ this.addToAllowedCSIDrivers(item);}} return (A) this;
}
public Boolean hasAllowedCSIDrivers() {
return allowedCSIDrivers != null && !allowedCSIDrivers.isEmpty();
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested addNewAllowedCSIDriver() {
return new AllowedCSIDriversNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested addNewAllowedCSIDriverLike(V1beta1AllowedCSIDriver item) {
return new AllowedCSIDriversNestedImpl(-1, item);
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested setNewAllowedCSIDriverLike(int index,V1beta1AllowedCSIDriver item) {
return new AllowedCSIDriversNestedImpl(index, item);
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested editAllowedCSIDriver(int index) {
if (allowedCSIDrivers.size() <= index) throw new RuntimeException("Can't edit allowedCSIDrivers. Index exceeds size.");
return setNewAllowedCSIDriverLike(index, buildAllowedCSIDriver(index));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested editFirstAllowedCSIDriver() {
if (allowedCSIDrivers.size() == 0) throw new RuntimeException("Can't edit first allowedCSIDrivers. The list is empty.");
return setNewAllowedCSIDriverLike(0, buildAllowedCSIDriver(0));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested editLastAllowedCSIDriver() {
int index = allowedCSIDrivers.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last allowedCSIDrivers. The list is empty.");
return setNewAllowedCSIDriverLike(index, buildAllowedCSIDriver(index));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested editMatchingAllowedCSIDriver(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i();}
this.allowedCapabilities.add(index, item);
return (A)this;
}
public A setToAllowedCapabilities(int index,String item) {
if (this.allowedCapabilities == null) {this.allowedCapabilities = new ArrayList();}
this.allowedCapabilities.set(index, item); return (A)this;
}
public A addToAllowedCapabilities(String... items) {
if (this.allowedCapabilities == null) {this.allowedCapabilities = new ArrayList();}
for (String item : items) {this.allowedCapabilities.add(item);} return (A)this;
}
public A addAllToAllowedCapabilities(Collection items) {
if (this.allowedCapabilities == null) {this.allowedCapabilities = new ArrayList();}
for (String item : items) {this.allowedCapabilities.add(item);} return (A)this;
}
public A removeFromAllowedCapabilities(String... items) {
for (String item : items) {if (this.allowedCapabilities!= null){ this.allowedCapabilities.remove(item);}} return (A)this;
}
public A removeAllFromAllowedCapabilities(Collection items) {
for (String item : items) {if (this.allowedCapabilities!= null){ this.allowedCapabilities.remove(item);}} return (A)this;
}
public List getAllowedCapabilities() {
return this.allowedCapabilities;
}
public String getAllowedCapability(int index) {
return this.allowedCapabilities.get(index);
}
public String getFirstAllowedCapability() {
return this.allowedCapabilities.get(0);
}
public String getLastAllowedCapability() {
return this.allowedCapabilities.get(allowedCapabilities.size() - 1);
}
public String getMatchingAllowedCapability(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: allowedCapabilities) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingAllowedCapability(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: allowedCapabilities) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAllowedCapabilities(List allowedCapabilities) {
if (this.allowedCapabilities != null) { _visitables.get("allowedCapabilities").removeAll(this.allowedCapabilities);}
if (allowedCapabilities != null) {this.allowedCapabilities = new ArrayList(); for (String item : allowedCapabilities){this.addToAllowedCapabilities(item);}} else { this.allowedCapabilities = null;} return (A) this;
}
public A withAllowedCapabilities(String... allowedCapabilities) {
if (this.allowedCapabilities != null) {this.allowedCapabilities.clear();}
if (allowedCapabilities != null) {for (String item :allowedCapabilities){ this.addToAllowedCapabilities(item);}} return (A) this;
}
public Boolean hasAllowedCapabilities() {
return allowedCapabilities != null && !allowedCapabilities.isEmpty();
}
public A addNewAllowedCapability(String arg1) {
return (A)addToAllowedCapabilities(new String(arg1));
}
public A addNewAllowedCapability(StringBuilder arg1) {
return (A)addToAllowedCapabilities(new String(arg1));
}
public A addNewAllowedCapability(StringBuffer arg1) {
return (A)addToAllowedCapabilities(new String(arg1));
}
public A addToAllowedFlexVolumes(int index,V1beta1AllowedFlexVolume item) {
if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
V1beta1AllowedFlexVolumeBuilder builder = new V1beta1AllowedFlexVolumeBuilder(item);_visitables.get("allowedFlexVolumes").add(index >= 0 ? index : _visitables.get("allowedFlexVolumes").size(), builder);this.allowedFlexVolumes.add(index >= 0 ? index : allowedFlexVolumes.size(), builder); return (A)this;
}
public A setToAllowedFlexVolumes(int index,V1beta1AllowedFlexVolume item) {
if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
V1beta1AllowedFlexVolumeBuilder builder = new V1beta1AllowedFlexVolumeBuilder(item);
if (index < 0 || index >= _visitables.get("allowedFlexVolumes").size()) { _visitables.get("allowedFlexVolumes").add(builder); } else { _visitables.get("allowedFlexVolumes").set(index, builder);}
if (index < 0 || index >= allowedFlexVolumes.size()) { allowedFlexVolumes.add(builder); } else { allowedFlexVolumes.set(index, builder);}
return (A)this;
}
public A addToAllowedFlexVolumes(V1beta1AllowedFlexVolume... items) {
if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
for (V1beta1AllowedFlexVolume item : items) {V1beta1AllowedFlexVolumeBuilder builder = new V1beta1AllowedFlexVolumeBuilder(item);_visitables.get("allowedFlexVolumes").add(builder);this.allowedFlexVolumes.add(builder);} return (A)this;
}
public A addAllToAllowedFlexVolumes(Collection items) {
if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
for (V1beta1AllowedFlexVolume item : items) {V1beta1AllowedFlexVolumeBuilder builder = new V1beta1AllowedFlexVolumeBuilder(item);_visitables.get("allowedFlexVolumes").add(builder);this.allowedFlexVolumes.add(builder);} return (A)this;
}
public A removeFromAllowedFlexVolumes(V1beta1AllowedFlexVolume... items) {
for (V1beta1AllowedFlexVolume item : items) {V1beta1AllowedFlexVolumeBuilder builder = new V1beta1AllowedFlexVolumeBuilder(item);_visitables.get("allowedFlexVolumes").remove(builder);if (this.allowedFlexVolumes != null) {this.allowedFlexVolumes.remove(builder);}} return (A)this;
}
public A removeAllFromAllowedFlexVolumes(Collection items) {
for (V1beta1AllowedFlexVolume item : items) {V1beta1AllowedFlexVolumeBuilder builder = new V1beta1AllowedFlexVolumeBuilder(item);_visitables.get("allowedFlexVolumes").remove(builder);if (this.allowedFlexVolumes != null) {this.allowedFlexVolumes.remove(builder);}} return (A)this;
}
public A removeMatchingFromAllowedFlexVolumes(io.kubernetes.client.fluent.Predicate predicate) {
if (allowedFlexVolumes == null) return (A) this;
final Iterator each = allowedFlexVolumes.iterator();
final List visitables = _visitables.get("allowedFlexVolumes");
while (each.hasNext()) {
V1beta1AllowedFlexVolumeBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildAllowedFlexVolumes instead.
* @return The buildable object.
*/
@Deprecated public List getAllowedFlexVolumes() {
return build(allowedFlexVolumes);
}
public List buildAllowedFlexVolumes() {
return build(allowedFlexVolumes);
}
public V1beta1AllowedFlexVolume buildAllowedFlexVolume(int index) {
return this.allowedFlexVolumes.get(index).build();
}
public V1beta1AllowedFlexVolume buildFirstAllowedFlexVolume() {
return this.allowedFlexVolumes.get(0).build();
}
public V1beta1AllowedFlexVolume buildLastAllowedFlexVolume() {
return this.allowedFlexVolumes.get(allowedFlexVolumes.size() - 1).build();
}
public V1beta1AllowedFlexVolume buildMatchingAllowedFlexVolume(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1AllowedFlexVolumeBuilder item: allowedFlexVolumes) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingAllowedFlexVolume(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1AllowedFlexVolumeBuilder item: allowedFlexVolumes) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAllowedFlexVolumes(List allowedFlexVolumes) {
if (this.allowedFlexVolumes != null) { _visitables.get("allowedFlexVolumes").removeAll(this.allowedFlexVolumes);}
if (allowedFlexVolumes != null) {this.allowedFlexVolumes = new ArrayList(); for (V1beta1AllowedFlexVolume item : allowedFlexVolumes){this.addToAllowedFlexVolumes(item);}} else { this.allowedFlexVolumes = null;} return (A) this;
}
public A withAllowedFlexVolumes(V1beta1AllowedFlexVolume... allowedFlexVolumes) {
if (this.allowedFlexVolumes != null) {this.allowedFlexVolumes.clear();}
if (allowedFlexVolumes != null) {for (V1beta1AllowedFlexVolume item :allowedFlexVolumes){ this.addToAllowedFlexVolumes(item);}} return (A) this;
}
public Boolean hasAllowedFlexVolumes() {
return allowedFlexVolumes != null && !allowedFlexVolumes.isEmpty();
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested addNewAllowedFlexVolume() {
return new AllowedFlexVolumesNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested addNewAllowedFlexVolumeLike(V1beta1AllowedFlexVolume item) {
return new AllowedFlexVolumesNestedImpl(-1, item);
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested setNewAllowedFlexVolumeLike(int index,V1beta1AllowedFlexVolume item) {
return new AllowedFlexVolumesNestedImpl(index, item);
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editAllowedFlexVolume(int index) {
if (allowedFlexVolumes.size() <= index) throw new RuntimeException("Can't edit allowedFlexVolumes. Index exceeds size.");
return setNewAllowedFlexVolumeLike(index, buildAllowedFlexVolume(index));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editFirstAllowedFlexVolume() {
if (allowedFlexVolumes.size() == 0) throw new RuntimeException("Can't edit first allowedFlexVolumes. The list is empty.");
return setNewAllowedFlexVolumeLike(0, buildAllowedFlexVolume(0));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editLastAllowedFlexVolume() {
int index = allowedFlexVolumes.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last allowedFlexVolumes. The list is empty.");
return setNewAllowedFlexVolumeLike(index, buildAllowedFlexVolume(index));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editMatchingAllowedFlexVolume(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i();}
V1beta1AllowedHostPathBuilder builder = new V1beta1AllowedHostPathBuilder(item);_visitables.get("allowedHostPaths").add(index >= 0 ? index : _visitables.get("allowedHostPaths").size(), builder);this.allowedHostPaths.add(index >= 0 ? index : allowedHostPaths.size(), builder); return (A)this;
}
public A setToAllowedHostPaths(int index,V1beta1AllowedHostPath item) {
if (this.allowedHostPaths == null) {this.allowedHostPaths = new ArrayList();}
V1beta1AllowedHostPathBuilder builder = new V1beta1AllowedHostPathBuilder(item);
if (index < 0 || index >= _visitables.get("allowedHostPaths").size()) { _visitables.get("allowedHostPaths").add(builder); } else { _visitables.get("allowedHostPaths").set(index, builder);}
if (index < 0 || index >= allowedHostPaths.size()) { allowedHostPaths.add(builder); } else { allowedHostPaths.set(index, builder);}
return (A)this;
}
public A addToAllowedHostPaths(V1beta1AllowedHostPath... items) {
if (this.allowedHostPaths == null) {this.allowedHostPaths = new ArrayList();}
for (V1beta1AllowedHostPath item : items) {V1beta1AllowedHostPathBuilder builder = new V1beta1AllowedHostPathBuilder(item);_visitables.get("allowedHostPaths").add(builder);this.allowedHostPaths.add(builder);} return (A)this;
}
public A addAllToAllowedHostPaths(Collection items) {
if (this.allowedHostPaths == null) {this.allowedHostPaths = new ArrayList();}
for (V1beta1AllowedHostPath item : items) {V1beta1AllowedHostPathBuilder builder = new V1beta1AllowedHostPathBuilder(item);_visitables.get("allowedHostPaths").add(builder);this.allowedHostPaths.add(builder);} return (A)this;
}
public A removeFromAllowedHostPaths(V1beta1AllowedHostPath... items) {
for (V1beta1AllowedHostPath item : items) {V1beta1AllowedHostPathBuilder builder = new V1beta1AllowedHostPathBuilder(item);_visitables.get("allowedHostPaths").remove(builder);if (this.allowedHostPaths != null) {this.allowedHostPaths.remove(builder);}} return (A)this;
}
public A removeAllFromAllowedHostPaths(Collection items) {
for (V1beta1AllowedHostPath item : items) {V1beta1AllowedHostPathBuilder builder = new V1beta1AllowedHostPathBuilder(item);_visitables.get("allowedHostPaths").remove(builder);if (this.allowedHostPaths != null) {this.allowedHostPaths.remove(builder);}} return (A)this;
}
public A removeMatchingFromAllowedHostPaths(io.kubernetes.client.fluent.Predicate predicate) {
if (allowedHostPaths == null) return (A) this;
final Iterator each = allowedHostPaths.iterator();
final List visitables = _visitables.get("allowedHostPaths");
while (each.hasNext()) {
V1beta1AllowedHostPathBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildAllowedHostPaths instead.
* @return The buildable object.
*/
@Deprecated public List getAllowedHostPaths() {
return build(allowedHostPaths);
}
public List buildAllowedHostPaths() {
return build(allowedHostPaths);
}
public V1beta1AllowedHostPath buildAllowedHostPath(int index) {
return this.allowedHostPaths.get(index).build();
}
public V1beta1AllowedHostPath buildFirstAllowedHostPath() {
return this.allowedHostPaths.get(0).build();
}
public V1beta1AllowedHostPath buildLastAllowedHostPath() {
return this.allowedHostPaths.get(allowedHostPaths.size() - 1).build();
}
public V1beta1AllowedHostPath buildMatchingAllowedHostPath(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1AllowedHostPathBuilder item: allowedHostPaths) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingAllowedHostPath(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1AllowedHostPathBuilder item: allowedHostPaths) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAllowedHostPaths(List allowedHostPaths) {
if (this.allowedHostPaths != null) { _visitables.get("allowedHostPaths").removeAll(this.allowedHostPaths);}
if (allowedHostPaths != null) {this.allowedHostPaths = new ArrayList(); for (V1beta1AllowedHostPath item : allowedHostPaths){this.addToAllowedHostPaths(item);}} else { this.allowedHostPaths = null;} return (A) this;
}
public A withAllowedHostPaths(V1beta1AllowedHostPath... allowedHostPaths) {
if (this.allowedHostPaths != null) {this.allowedHostPaths.clear();}
if (allowedHostPaths != null) {for (V1beta1AllowedHostPath item :allowedHostPaths){ this.addToAllowedHostPaths(item);}} return (A) this;
}
public Boolean hasAllowedHostPaths() {
return allowedHostPaths != null && !allowedHostPaths.isEmpty();
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested addNewAllowedHostPath() {
return new AllowedHostPathsNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested addNewAllowedHostPathLike(V1beta1AllowedHostPath item) {
return new AllowedHostPathsNestedImpl(-1, item);
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested setNewAllowedHostPathLike(int index,V1beta1AllowedHostPath item) {
return new AllowedHostPathsNestedImpl(index, item);
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editAllowedHostPath(int index) {
if (allowedHostPaths.size() <= index) throw new RuntimeException("Can't edit allowedHostPaths. Index exceeds size.");
return setNewAllowedHostPathLike(index, buildAllowedHostPath(index));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editFirstAllowedHostPath() {
if (allowedHostPaths.size() == 0) throw new RuntimeException("Can't edit first allowedHostPaths. The list is empty.");
return setNewAllowedHostPathLike(0, buildAllowedHostPath(0));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editLastAllowedHostPath() {
int index = allowedHostPaths.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last allowedHostPaths. The list is empty.");
return setNewAllowedHostPathLike(index, buildAllowedHostPath(index));
}
public V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editMatchingAllowedHostPath(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i();}
this.allowedProcMountTypes.add(index, item);
return (A)this;
}
public A setToAllowedProcMountTypes(int index,String item) {
if (this.allowedProcMountTypes == null) {this.allowedProcMountTypes = new ArrayList();}
this.allowedProcMountTypes.set(index, item); return (A)this;
}
public A addToAllowedProcMountTypes(String... items) {
if (this.allowedProcMountTypes == null) {this.allowedProcMountTypes = new ArrayList();}
for (String item : items) {this.allowedProcMountTypes.add(item);} return (A)this;
}
public A addAllToAllowedProcMountTypes(Collection items) {
if (this.allowedProcMountTypes == null) {this.allowedProcMountTypes = new ArrayList();}
for (String item : items) {this.allowedProcMountTypes.add(item);} return (A)this;
}
public A removeFromAllowedProcMountTypes(String... items) {
for (String item : items) {if (this.allowedProcMountTypes!= null){ this.allowedProcMountTypes.remove(item);}} return (A)this;
}
public A removeAllFromAllowedProcMountTypes(Collection items) {
for (String item : items) {if (this.allowedProcMountTypes!= null){ this.allowedProcMountTypes.remove(item);}} return (A)this;
}
public List getAllowedProcMountTypes() {
return this.allowedProcMountTypes;
}
public String getAllowedProcMountType(int index) {
return this.allowedProcMountTypes.get(index);
}
public String getFirstAllowedProcMountType() {
return this.allowedProcMountTypes.get(0);
}
public String getLastAllowedProcMountType() {
return this.allowedProcMountTypes.get(allowedProcMountTypes.size() - 1);
}
public String getMatchingAllowedProcMountType(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: allowedProcMountTypes) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingAllowedProcMountType(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: allowedProcMountTypes) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAllowedProcMountTypes(List allowedProcMountTypes) {
if (this.allowedProcMountTypes != null) { _visitables.get("allowedProcMountTypes").removeAll(this.allowedProcMountTypes);}
if (allowedProcMountTypes != null) {this.allowedProcMountTypes = new ArrayList(); for (String item : allowedProcMountTypes){this.addToAllowedProcMountTypes(item);}} else { this.allowedProcMountTypes = null;} return (A) this;
}
public A withAllowedProcMountTypes(String... allowedProcMountTypes) {
if (this.allowedProcMountTypes != null) {this.allowedProcMountTypes.clear();}
if (allowedProcMountTypes != null) {for (String item :allowedProcMountTypes){ this.addToAllowedProcMountTypes(item);}} return (A) this;
}
public Boolean hasAllowedProcMountTypes() {
return allowedProcMountTypes != null && !allowedProcMountTypes.isEmpty();
}
public A addNewAllowedProcMountType(String arg1) {
return (A)addToAllowedProcMountTypes(new String(arg1));
}
public A addNewAllowedProcMountType(StringBuilder arg1) {
return (A)addToAllowedProcMountTypes(new String(arg1));
}
public A addNewAllowedProcMountType(StringBuffer arg1) {
return (A)addToAllowedProcMountTypes(new String(arg1));
}
public A addToAllowedUnsafeSysctls(int index,String item) {
if (this.allowedUnsafeSysctls == null) {this.allowedUnsafeSysctls = new ArrayList();}
this.allowedUnsafeSysctls.add(index, item);
return (A)this;
}
public A setToAllowedUnsafeSysctls(int index,String item) {
if (this.allowedUnsafeSysctls == null) {this.allowedUnsafeSysctls = new ArrayList();}
this.allowedUnsafeSysctls.set(index, item); return (A)this;
}
public A addToAllowedUnsafeSysctls(String... items) {
if (this.allowedUnsafeSysctls == null) {this.allowedUnsafeSysctls = new ArrayList();}
for (String item : items) {this.allowedUnsafeSysctls.add(item);} return (A)this;
}
public A addAllToAllowedUnsafeSysctls(Collection items) {
if (this.allowedUnsafeSysctls == null) {this.allowedUnsafeSysctls = new ArrayList();}
for (String item : items) {this.allowedUnsafeSysctls.add(item);} return (A)this;
}
public A removeFromAllowedUnsafeSysctls(String... items) {
for (String item : items) {if (this.allowedUnsafeSysctls!= null){ this.allowedUnsafeSysctls.remove(item);}} return (A)this;
}
public A removeAllFromAllowedUnsafeSysctls(Collection items) {
for (String item : items) {if (this.allowedUnsafeSysctls!= null){ this.allowedUnsafeSysctls.remove(item);}} return (A)this;
}
public List getAllowedUnsafeSysctls() {
return this.allowedUnsafeSysctls;
}
public String getAllowedUnsafeSysctl(int index) {
return this.allowedUnsafeSysctls.get(index);
}
public String getFirstAllowedUnsafeSysctl() {
return this.allowedUnsafeSysctls.get(0);
}
public String getLastAllowedUnsafeSysctl() {
return this.allowedUnsafeSysctls.get(allowedUnsafeSysctls.size() - 1);
}
public String getMatchingAllowedUnsafeSysctl(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: allowedUnsafeSysctls) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingAllowedUnsafeSysctl(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: allowedUnsafeSysctls) { if(predicate.apply(item)){ return true;} } return false;
}
public A withAllowedUnsafeSysctls(List allowedUnsafeSysctls) {
if (this.allowedUnsafeSysctls != null) { _visitables.get("allowedUnsafeSysctls").removeAll(this.allowedUnsafeSysctls);}
if (allowedUnsafeSysctls != null) {this.allowedUnsafeSysctls = new ArrayList(); for (String item : allowedUnsafeSysctls){this.addToAllowedUnsafeSysctls(item);}} else { this.allowedUnsafeSysctls = null;} return (A) this;
}
public A withAllowedUnsafeSysctls(String... allowedUnsafeSysctls) {
if (this.allowedUnsafeSysctls != null) {this.allowedUnsafeSysctls.clear();}
if (allowedUnsafeSysctls != null) {for (String item :allowedUnsafeSysctls){ this.addToAllowedUnsafeSysctls(item);}} return (A) this;
}
public Boolean hasAllowedUnsafeSysctls() {
return allowedUnsafeSysctls != null && !allowedUnsafeSysctls.isEmpty();
}
public A addNewAllowedUnsafeSysctl(String arg1) {
return (A)addToAllowedUnsafeSysctls(new String(arg1));
}
public A addNewAllowedUnsafeSysctl(StringBuilder arg1) {
return (A)addToAllowedUnsafeSysctls(new String(arg1));
}
public A addNewAllowedUnsafeSysctl(StringBuffer arg1) {
return (A)addToAllowedUnsafeSysctls(new String(arg1));
}
public A addToDefaultAddCapabilities(int index,String item) {
if (this.defaultAddCapabilities == null) {this.defaultAddCapabilities = new ArrayList();}
this.defaultAddCapabilities.add(index, item);
return (A)this;
}
public A setToDefaultAddCapabilities(int index,String item) {
if (this.defaultAddCapabilities == null) {this.defaultAddCapabilities = new ArrayList();}
this.defaultAddCapabilities.set(index, item); return (A)this;
}
public A addToDefaultAddCapabilities(String... items) {
if (this.defaultAddCapabilities == null) {this.defaultAddCapabilities = new ArrayList();}
for (String item : items) {this.defaultAddCapabilities.add(item);} return (A)this;
}
public A addAllToDefaultAddCapabilities(Collection items) {
if (this.defaultAddCapabilities == null) {this.defaultAddCapabilities = new ArrayList();}
for (String item : items) {this.defaultAddCapabilities.add(item);} return (A)this;
}
public A removeFromDefaultAddCapabilities(String... items) {
for (String item : items) {if (this.defaultAddCapabilities!= null){ this.defaultAddCapabilities.remove(item);}} return (A)this;
}
public A removeAllFromDefaultAddCapabilities(Collection items) {
for (String item : items) {if (this.defaultAddCapabilities!= null){ this.defaultAddCapabilities.remove(item);}} return (A)this;
}
public List getDefaultAddCapabilities() {
return this.defaultAddCapabilities;
}
public String getDefaultAddCapability(int index) {
return this.defaultAddCapabilities.get(index);
}
public String getFirstDefaultAddCapability() {
return this.defaultAddCapabilities.get(0);
}
public String getLastDefaultAddCapability() {
return this.defaultAddCapabilities.get(defaultAddCapabilities.size() - 1);
}
public String getMatchingDefaultAddCapability(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: defaultAddCapabilities) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingDefaultAddCapability(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: defaultAddCapabilities) { if(predicate.apply(item)){ return true;} } return false;
}
public A withDefaultAddCapabilities(List defaultAddCapabilities) {
if (this.defaultAddCapabilities != null) { _visitables.get("defaultAddCapabilities").removeAll(this.defaultAddCapabilities);}
if (defaultAddCapabilities != null) {this.defaultAddCapabilities = new ArrayList(); for (String item : defaultAddCapabilities){this.addToDefaultAddCapabilities(item);}} else { this.defaultAddCapabilities = null;} return (A) this;
}
public A withDefaultAddCapabilities(String... defaultAddCapabilities) {
if (this.defaultAddCapabilities != null) {this.defaultAddCapabilities.clear();}
if (defaultAddCapabilities != null) {for (String item :defaultAddCapabilities){ this.addToDefaultAddCapabilities(item);}} return (A) this;
}
public Boolean hasDefaultAddCapabilities() {
return defaultAddCapabilities != null && !defaultAddCapabilities.isEmpty();
}
public A addNewDefaultAddCapability(String arg1) {
return (A)addToDefaultAddCapabilities(new String(arg1));
}
public A addNewDefaultAddCapability(StringBuilder arg1) {
return (A)addToDefaultAddCapabilities(new String(arg1));
}
public A addNewDefaultAddCapability(StringBuffer arg1) {
return (A)addToDefaultAddCapabilities(new String(arg1));
}
public Boolean isDefaultAllowPrivilegeEscalation() {
return this.defaultAllowPrivilegeEscalation;
}
public A withDefaultAllowPrivilegeEscalation(Boolean defaultAllowPrivilegeEscalation) {
this.defaultAllowPrivilegeEscalation=defaultAllowPrivilegeEscalation; return (A) this;
}
public Boolean hasDefaultAllowPrivilegeEscalation() {
return this.defaultAllowPrivilegeEscalation != null;
}
public A withNewDefaultAllowPrivilegeEscalation(String arg1) {
return (A)withDefaultAllowPrivilegeEscalation(new Boolean(arg1));
}
public A withNewDefaultAllowPrivilegeEscalation(boolean arg1) {
return (A)withDefaultAllowPrivilegeEscalation(new Boolean(arg1));
}
public A addToForbiddenSysctls(int index,String item) {
if (this.forbiddenSysctls == null) {this.forbiddenSysctls = new ArrayList();}
this.forbiddenSysctls.add(index, item);
return (A)this;
}
public A setToForbiddenSysctls(int index,String item) {
if (this.forbiddenSysctls == null) {this.forbiddenSysctls = new ArrayList();}
this.forbiddenSysctls.set(index, item); return (A)this;
}
public A addToForbiddenSysctls(String... items) {
if (this.forbiddenSysctls == null) {this.forbiddenSysctls = new ArrayList();}
for (String item : items) {this.forbiddenSysctls.add(item);} return (A)this;
}
public A addAllToForbiddenSysctls(Collection items) {
if (this.forbiddenSysctls == null) {this.forbiddenSysctls = new ArrayList();}
for (String item : items) {this.forbiddenSysctls.add(item);} return (A)this;
}
public A removeFromForbiddenSysctls(String... items) {
for (String item : items) {if (this.forbiddenSysctls!= null){ this.forbiddenSysctls.remove(item);}} return (A)this;
}
public A removeAllFromForbiddenSysctls(Collection items) {
for (String item : items) {if (this.forbiddenSysctls!= null){ this.forbiddenSysctls.remove(item);}} return (A)this;
}
public List getForbiddenSysctls() {
return this.forbiddenSysctls;
}
public String getForbiddenSysctl(int index) {
return this.forbiddenSysctls.get(index);
}
public String getFirstForbiddenSysctl() {
return this.forbiddenSysctls.get(0);
}
public String getLastForbiddenSysctl() {
return this.forbiddenSysctls.get(forbiddenSysctls.size() - 1);
}
public String getMatchingForbiddenSysctl(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: forbiddenSysctls) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingForbiddenSysctl(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: forbiddenSysctls) { if(predicate.apply(item)){ return true;} } return false;
}
public A withForbiddenSysctls(List forbiddenSysctls) {
if (this.forbiddenSysctls != null) { _visitables.get("forbiddenSysctls").removeAll(this.forbiddenSysctls);}
if (forbiddenSysctls != null) {this.forbiddenSysctls = new ArrayList(); for (String item : forbiddenSysctls){this.addToForbiddenSysctls(item);}} else { this.forbiddenSysctls = null;} return (A) this;
}
public A withForbiddenSysctls(String... forbiddenSysctls) {
if (this.forbiddenSysctls != null) {this.forbiddenSysctls.clear();}
if (forbiddenSysctls != null) {for (String item :forbiddenSysctls){ this.addToForbiddenSysctls(item);}} return (A) this;
}
public Boolean hasForbiddenSysctls() {
return forbiddenSysctls != null && !forbiddenSysctls.isEmpty();
}
public A addNewForbiddenSysctl(String arg1) {
return (A)addToForbiddenSysctls(new String(arg1));
}
public A addNewForbiddenSysctl(StringBuilder arg1) {
return (A)addToForbiddenSysctls(new String(arg1));
}
public A addNewForbiddenSysctl(StringBuffer arg1) {
return (A)addToForbiddenSysctls(new String(arg1));
}
/**
* This method has been deprecated, please use method buildFsGroup instead.
* @return The buildable object.
*/
@Deprecated public V1beta1FSGroupStrategyOptions getFsGroup() {
return this.fsGroup!=null?this.fsGroup.build():null;
}
public V1beta1FSGroupStrategyOptions buildFsGroup() {
return this.fsGroup!=null?this.fsGroup.build():null;
}
public A withFsGroup(V1beta1FSGroupStrategyOptions fsGroup) {
_visitables.get("fsGroup").remove(this.fsGroup);
if (fsGroup!=null){ this.fsGroup= new V1beta1FSGroupStrategyOptionsBuilder(fsGroup); _visitables.get("fsGroup").add(this.fsGroup);} return (A) this;
}
public Boolean hasFsGroup() {
return this.fsGroup != null;
}
public V1beta1PodSecurityPolicySpecFluent.FsGroupNested withNewFsGroup() {
return new FsGroupNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.FsGroupNested withNewFsGroupLike(V1beta1FSGroupStrategyOptions item) {
return new FsGroupNestedImpl(item);
}
public V1beta1PodSecurityPolicySpecFluent.FsGroupNested editFsGroup() {
return withNewFsGroupLike(getFsGroup());
}
public V1beta1PodSecurityPolicySpecFluent.FsGroupNested editOrNewFsGroup() {
return withNewFsGroupLike(getFsGroup() != null ? getFsGroup(): new V1beta1FSGroupStrategyOptionsBuilder().build());
}
public V1beta1PodSecurityPolicySpecFluent.FsGroupNested editOrNewFsGroupLike(V1beta1FSGroupStrategyOptions item) {
return withNewFsGroupLike(getFsGroup() != null ? getFsGroup(): item);
}
public Boolean isHostIPC() {
return this.hostIPC;
}
public A withHostIPC(Boolean hostIPC) {
this.hostIPC=hostIPC; return (A) this;
}
public Boolean hasHostIPC() {
return this.hostIPC != null;
}
public A withNewHostIPC(String arg1) {
return (A)withHostIPC(new Boolean(arg1));
}
public A withNewHostIPC(boolean arg1) {
return (A)withHostIPC(new Boolean(arg1));
}
public Boolean isHostNetwork() {
return this.hostNetwork;
}
public A withHostNetwork(Boolean hostNetwork) {
this.hostNetwork=hostNetwork; return (A) this;
}
public Boolean hasHostNetwork() {
return this.hostNetwork != null;
}
public A withNewHostNetwork(String arg1) {
return (A)withHostNetwork(new Boolean(arg1));
}
public A withNewHostNetwork(boolean arg1) {
return (A)withHostNetwork(new Boolean(arg1));
}
public Boolean isHostPID() {
return this.hostPID;
}
public A withHostPID(Boolean hostPID) {
this.hostPID=hostPID; return (A) this;
}
public Boolean hasHostPID() {
return this.hostPID != null;
}
public A withNewHostPID(String arg1) {
return (A)withHostPID(new Boolean(arg1));
}
public A withNewHostPID(boolean arg1) {
return (A)withHostPID(new Boolean(arg1));
}
public A addToHostPorts(int index,V1beta1HostPortRange item) {
if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
V1beta1HostPortRangeBuilder builder = new V1beta1HostPortRangeBuilder(item);_visitables.get("hostPorts").add(index >= 0 ? index : _visitables.get("hostPorts").size(), builder);this.hostPorts.add(index >= 0 ? index : hostPorts.size(), builder); return (A)this;
}
public A setToHostPorts(int index,V1beta1HostPortRange item) {
if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
V1beta1HostPortRangeBuilder builder = new V1beta1HostPortRangeBuilder(item);
if (index < 0 || index >= _visitables.get("hostPorts").size()) { _visitables.get("hostPorts").add(builder); } else { _visitables.get("hostPorts").set(index, builder);}
if (index < 0 || index >= hostPorts.size()) { hostPorts.add(builder); } else { hostPorts.set(index, builder);}
return (A)this;
}
public A addToHostPorts(V1beta1HostPortRange... items) {
if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
for (V1beta1HostPortRange item : items) {V1beta1HostPortRangeBuilder builder = new V1beta1HostPortRangeBuilder(item);_visitables.get("hostPorts").add(builder);this.hostPorts.add(builder);} return (A)this;
}
public A addAllToHostPorts(Collection items) {
if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
for (V1beta1HostPortRange item : items) {V1beta1HostPortRangeBuilder builder = new V1beta1HostPortRangeBuilder(item);_visitables.get("hostPorts").add(builder);this.hostPorts.add(builder);} return (A)this;
}
public A removeFromHostPorts(V1beta1HostPortRange... items) {
for (V1beta1HostPortRange item : items) {V1beta1HostPortRangeBuilder builder = new V1beta1HostPortRangeBuilder(item);_visitables.get("hostPorts").remove(builder);if (this.hostPorts != null) {this.hostPorts.remove(builder);}} return (A)this;
}
public A removeAllFromHostPorts(Collection items) {
for (V1beta1HostPortRange item : items) {V1beta1HostPortRangeBuilder builder = new V1beta1HostPortRangeBuilder(item);_visitables.get("hostPorts").remove(builder);if (this.hostPorts != null) {this.hostPorts.remove(builder);}} return (A)this;
}
public A removeMatchingFromHostPorts(io.kubernetes.client.fluent.Predicate predicate) {
if (hostPorts == null) return (A) this;
final Iterator each = hostPorts.iterator();
final List visitables = _visitables.get("hostPorts");
while (each.hasNext()) {
V1beta1HostPortRangeBuilder builder = each.next();
if (predicate.apply(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildHostPorts instead.
* @return The buildable object.
*/
@Deprecated public List getHostPorts() {
return build(hostPorts);
}
public List buildHostPorts() {
return build(hostPorts);
}
public V1beta1HostPortRange buildHostPort(int index) {
return this.hostPorts.get(index).build();
}
public V1beta1HostPortRange buildFirstHostPort() {
return this.hostPorts.get(0).build();
}
public V1beta1HostPortRange buildLastHostPort() {
return this.hostPorts.get(hostPorts.size() - 1).build();
}
public V1beta1HostPortRange buildMatchingHostPort(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1HostPortRangeBuilder item: hostPorts) { if(predicate.apply(item)){ return item.build();} } return null;
}
public Boolean hasMatchingHostPort(io.kubernetes.client.fluent.Predicate predicate) {
for (V1beta1HostPortRangeBuilder item: hostPorts) { if(predicate.apply(item)){ return true;} } return false;
}
public A withHostPorts(List hostPorts) {
if (this.hostPorts != null) { _visitables.get("hostPorts").removeAll(this.hostPorts);}
if (hostPorts != null) {this.hostPorts = new ArrayList(); for (V1beta1HostPortRange item : hostPorts){this.addToHostPorts(item);}} else { this.hostPorts = null;} return (A) this;
}
public A withHostPorts(V1beta1HostPortRange... hostPorts) {
if (this.hostPorts != null) {this.hostPorts.clear();}
if (hostPorts != null) {for (V1beta1HostPortRange item :hostPorts){ this.addToHostPorts(item);}} return (A) this;
}
public Boolean hasHostPorts() {
return hostPorts != null && !hostPorts.isEmpty();
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested addNewHostPort() {
return new HostPortsNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested addNewHostPortLike(V1beta1HostPortRange item) {
return new HostPortsNestedImpl(-1, item);
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested setNewHostPortLike(int index,V1beta1HostPortRange item) {
return new HostPortsNestedImpl(index, item);
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested editHostPort(int index) {
if (hostPorts.size() <= index) throw new RuntimeException("Can't edit hostPorts. Index exceeds size.");
return setNewHostPortLike(index, buildHostPort(index));
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested editFirstHostPort() {
if (hostPorts.size() == 0) throw new RuntimeException("Can't edit first hostPorts. The list is empty.");
return setNewHostPortLike(0, buildHostPort(0));
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested editLastHostPort() {
int index = hostPorts.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last hostPorts. The list is empty.");
return setNewHostPortLike(index, buildHostPort(index));
}
public V1beta1PodSecurityPolicySpecFluent.HostPortsNested editMatchingHostPort(io.kubernetes.client.fluent.Predicate predicate) {
int index = -1;
for (int i=0;i();}
this.requiredDropCapabilities.add(index, item);
return (A)this;
}
public A setToRequiredDropCapabilities(int index,String item) {
if (this.requiredDropCapabilities == null) {this.requiredDropCapabilities = new ArrayList();}
this.requiredDropCapabilities.set(index, item); return (A)this;
}
public A addToRequiredDropCapabilities(String... items) {
if (this.requiredDropCapabilities == null) {this.requiredDropCapabilities = new ArrayList();}
for (String item : items) {this.requiredDropCapabilities.add(item);} return (A)this;
}
public A addAllToRequiredDropCapabilities(Collection items) {
if (this.requiredDropCapabilities == null) {this.requiredDropCapabilities = new ArrayList();}
for (String item : items) {this.requiredDropCapabilities.add(item);} return (A)this;
}
public A removeFromRequiredDropCapabilities(String... items) {
for (String item : items) {if (this.requiredDropCapabilities!= null){ this.requiredDropCapabilities.remove(item);}} return (A)this;
}
public A removeAllFromRequiredDropCapabilities(Collection items) {
for (String item : items) {if (this.requiredDropCapabilities!= null){ this.requiredDropCapabilities.remove(item);}} return (A)this;
}
public List getRequiredDropCapabilities() {
return this.requiredDropCapabilities;
}
public String getRequiredDropCapability(int index) {
return this.requiredDropCapabilities.get(index);
}
public String getFirstRequiredDropCapability() {
return this.requiredDropCapabilities.get(0);
}
public String getLastRequiredDropCapability() {
return this.requiredDropCapabilities.get(requiredDropCapabilities.size() - 1);
}
public String getMatchingRequiredDropCapability(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: requiredDropCapabilities) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingRequiredDropCapability(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: requiredDropCapabilities) { if(predicate.apply(item)){ return true;} } return false;
}
public A withRequiredDropCapabilities(List requiredDropCapabilities) {
if (this.requiredDropCapabilities != null) { _visitables.get("requiredDropCapabilities").removeAll(this.requiredDropCapabilities);}
if (requiredDropCapabilities != null) {this.requiredDropCapabilities = new ArrayList(); for (String item : requiredDropCapabilities){this.addToRequiredDropCapabilities(item);}} else { this.requiredDropCapabilities = null;} return (A) this;
}
public A withRequiredDropCapabilities(String... requiredDropCapabilities) {
if (this.requiredDropCapabilities != null) {this.requiredDropCapabilities.clear();}
if (requiredDropCapabilities != null) {for (String item :requiredDropCapabilities){ this.addToRequiredDropCapabilities(item);}} return (A) this;
}
public Boolean hasRequiredDropCapabilities() {
return requiredDropCapabilities != null && !requiredDropCapabilities.isEmpty();
}
public A addNewRequiredDropCapability(String arg1) {
return (A)addToRequiredDropCapabilities(new String(arg1));
}
public A addNewRequiredDropCapability(StringBuilder arg1) {
return (A)addToRequiredDropCapabilities(new String(arg1));
}
public A addNewRequiredDropCapability(StringBuffer arg1) {
return (A)addToRequiredDropCapabilities(new String(arg1));
}
/**
* This method has been deprecated, please use method buildRunAsGroup instead.
* @return The buildable object.
*/
@Deprecated public V1beta1RunAsGroupStrategyOptions getRunAsGroup() {
return this.runAsGroup!=null?this.runAsGroup.build():null;
}
public V1beta1RunAsGroupStrategyOptions buildRunAsGroup() {
return this.runAsGroup!=null?this.runAsGroup.build():null;
}
public A withRunAsGroup(V1beta1RunAsGroupStrategyOptions runAsGroup) {
_visitables.get("runAsGroup").remove(this.runAsGroup);
if (runAsGroup!=null){ this.runAsGroup= new V1beta1RunAsGroupStrategyOptionsBuilder(runAsGroup); _visitables.get("runAsGroup").add(this.runAsGroup);} return (A) this;
}
public Boolean hasRunAsGroup() {
return this.runAsGroup != null;
}
public V1beta1PodSecurityPolicySpecFluent.RunAsGroupNested withNewRunAsGroup() {
return new RunAsGroupNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.RunAsGroupNested withNewRunAsGroupLike(V1beta1RunAsGroupStrategyOptions item) {
return new RunAsGroupNestedImpl(item);
}
public V1beta1PodSecurityPolicySpecFluent.RunAsGroupNested editRunAsGroup() {
return withNewRunAsGroupLike(getRunAsGroup());
}
public V1beta1PodSecurityPolicySpecFluent.RunAsGroupNested editOrNewRunAsGroup() {
return withNewRunAsGroupLike(getRunAsGroup() != null ? getRunAsGroup(): new V1beta1RunAsGroupStrategyOptionsBuilder().build());
}
public V1beta1PodSecurityPolicySpecFluent.RunAsGroupNested editOrNewRunAsGroupLike(V1beta1RunAsGroupStrategyOptions item) {
return withNewRunAsGroupLike(getRunAsGroup() != null ? getRunAsGroup(): item);
}
/**
* This method has been deprecated, please use method buildRunAsUser instead.
* @return The buildable object.
*/
@Deprecated public V1beta1RunAsUserStrategyOptions getRunAsUser() {
return this.runAsUser!=null?this.runAsUser.build():null;
}
public V1beta1RunAsUserStrategyOptions buildRunAsUser() {
return this.runAsUser!=null?this.runAsUser.build():null;
}
public A withRunAsUser(V1beta1RunAsUserStrategyOptions runAsUser) {
_visitables.get("runAsUser").remove(this.runAsUser);
if (runAsUser!=null){ this.runAsUser= new V1beta1RunAsUserStrategyOptionsBuilder(runAsUser); _visitables.get("runAsUser").add(this.runAsUser);} return (A) this;
}
public Boolean hasRunAsUser() {
return this.runAsUser != null;
}
public V1beta1PodSecurityPolicySpecFluent.RunAsUserNested withNewRunAsUser() {
return new RunAsUserNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.RunAsUserNested withNewRunAsUserLike(V1beta1RunAsUserStrategyOptions item) {
return new RunAsUserNestedImpl(item);
}
public V1beta1PodSecurityPolicySpecFluent.RunAsUserNested editRunAsUser() {
return withNewRunAsUserLike(getRunAsUser());
}
public V1beta1PodSecurityPolicySpecFluent.RunAsUserNested editOrNewRunAsUser() {
return withNewRunAsUserLike(getRunAsUser() != null ? getRunAsUser(): new V1beta1RunAsUserStrategyOptionsBuilder().build());
}
public V1beta1PodSecurityPolicySpecFluent.RunAsUserNested editOrNewRunAsUserLike(V1beta1RunAsUserStrategyOptions item) {
return withNewRunAsUserLike(getRunAsUser() != null ? getRunAsUser(): item);
}
/**
* This method has been deprecated, please use method buildRuntimeClass instead.
* @return The buildable object.
*/
@Deprecated public V1beta1RuntimeClassStrategyOptions getRuntimeClass() {
return this.runtimeClass!=null?this.runtimeClass.build():null;
}
public V1beta1RuntimeClassStrategyOptions buildRuntimeClass() {
return this.runtimeClass!=null?this.runtimeClass.build():null;
}
public A withRuntimeClass(V1beta1RuntimeClassStrategyOptions runtimeClass) {
_visitables.get("runtimeClass").remove(this.runtimeClass);
if (runtimeClass!=null){ this.runtimeClass= new V1beta1RuntimeClassStrategyOptionsBuilder(runtimeClass); _visitables.get("runtimeClass").add(this.runtimeClass);} return (A) this;
}
public Boolean hasRuntimeClass() {
return this.runtimeClass != null;
}
public V1beta1PodSecurityPolicySpecFluent.RuntimeClassNested withNewRuntimeClass() {
return new RuntimeClassNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.RuntimeClassNested withNewRuntimeClassLike(V1beta1RuntimeClassStrategyOptions item) {
return new RuntimeClassNestedImpl(item);
}
public V1beta1PodSecurityPolicySpecFluent.RuntimeClassNested editRuntimeClass() {
return withNewRuntimeClassLike(getRuntimeClass());
}
public V1beta1PodSecurityPolicySpecFluent.RuntimeClassNested editOrNewRuntimeClass() {
return withNewRuntimeClassLike(getRuntimeClass() != null ? getRuntimeClass(): new V1beta1RuntimeClassStrategyOptionsBuilder().build());
}
public V1beta1PodSecurityPolicySpecFluent.RuntimeClassNested editOrNewRuntimeClassLike(V1beta1RuntimeClassStrategyOptions item) {
return withNewRuntimeClassLike(getRuntimeClass() != null ? getRuntimeClass(): item);
}
/**
* This method has been deprecated, please use method buildSeLinux instead.
* @return The buildable object.
*/
@Deprecated public V1beta1SELinuxStrategyOptions getSeLinux() {
return this.seLinux!=null?this.seLinux.build():null;
}
public V1beta1SELinuxStrategyOptions buildSeLinux() {
return this.seLinux!=null?this.seLinux.build():null;
}
public A withSeLinux(V1beta1SELinuxStrategyOptions seLinux) {
_visitables.get("seLinux").remove(this.seLinux);
if (seLinux!=null){ this.seLinux= new V1beta1SELinuxStrategyOptionsBuilder(seLinux); _visitables.get("seLinux").add(this.seLinux);} return (A) this;
}
public Boolean hasSeLinux() {
return this.seLinux != null;
}
public V1beta1PodSecurityPolicySpecFluent.SeLinuxNested withNewSeLinux() {
return new SeLinuxNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.SeLinuxNested withNewSeLinuxLike(V1beta1SELinuxStrategyOptions item) {
return new SeLinuxNestedImpl(item);
}
public V1beta1PodSecurityPolicySpecFluent.SeLinuxNested editSeLinux() {
return withNewSeLinuxLike(getSeLinux());
}
public V1beta1PodSecurityPolicySpecFluent.SeLinuxNested editOrNewSeLinux() {
return withNewSeLinuxLike(getSeLinux() != null ? getSeLinux(): new V1beta1SELinuxStrategyOptionsBuilder().build());
}
public V1beta1PodSecurityPolicySpecFluent.SeLinuxNested editOrNewSeLinuxLike(V1beta1SELinuxStrategyOptions item) {
return withNewSeLinuxLike(getSeLinux() != null ? getSeLinux(): item);
}
/**
* This method has been deprecated, please use method buildSupplementalGroups instead.
* @return The buildable object.
*/
@Deprecated public V1beta1SupplementalGroupsStrategyOptions getSupplementalGroups() {
return this.supplementalGroups!=null?this.supplementalGroups.build():null;
}
public V1beta1SupplementalGroupsStrategyOptions buildSupplementalGroups() {
return this.supplementalGroups!=null?this.supplementalGroups.build():null;
}
public A withSupplementalGroups(V1beta1SupplementalGroupsStrategyOptions supplementalGroups) {
_visitables.get("supplementalGroups").remove(this.supplementalGroups);
if (supplementalGroups!=null){ this.supplementalGroups= new V1beta1SupplementalGroupsStrategyOptionsBuilder(supplementalGroups); _visitables.get("supplementalGroups").add(this.supplementalGroups);} return (A) this;
}
public Boolean hasSupplementalGroups() {
return this.supplementalGroups != null;
}
public V1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested withNewSupplementalGroups() {
return new SupplementalGroupsNestedImpl();
}
public V1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested withNewSupplementalGroupsLike(V1beta1SupplementalGroupsStrategyOptions item) {
return new SupplementalGroupsNestedImpl(item);
}
public V1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested editSupplementalGroups() {
return withNewSupplementalGroupsLike(getSupplementalGroups());
}
public V1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested editOrNewSupplementalGroups() {
return withNewSupplementalGroupsLike(getSupplementalGroups() != null ? getSupplementalGroups(): new V1beta1SupplementalGroupsStrategyOptionsBuilder().build());
}
public V1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested editOrNewSupplementalGroupsLike(V1beta1SupplementalGroupsStrategyOptions item) {
return withNewSupplementalGroupsLike(getSupplementalGroups() != null ? getSupplementalGroups(): item);
}
public A addToVolumes(int index,String item) {
if (this.volumes == null) {this.volumes = new ArrayList();}
this.volumes.add(index, item);
return (A)this;
}
public A setToVolumes(int index,String item) {
if (this.volumes == null) {this.volumes = new ArrayList();}
this.volumes.set(index, item); return (A)this;
}
public A addToVolumes(String... items) {
if (this.volumes == null) {this.volumes = new ArrayList();}
for (String item : items) {this.volumes.add(item);} return (A)this;
}
public A addAllToVolumes(Collection items) {
if (this.volumes == null) {this.volumes = new ArrayList();}
for (String item : items) {this.volumes.add(item);} return (A)this;
}
public A removeFromVolumes(String... items) {
for (String item : items) {if (this.volumes!= null){ this.volumes.remove(item);}} return (A)this;
}
public A removeAllFromVolumes(Collection items) {
for (String item : items) {if (this.volumes!= null){ this.volumes.remove(item);}} return (A)this;
}
public List getVolumes() {
return this.volumes;
}
public String getVolume(int index) {
return this.volumes.get(index);
}
public String getFirstVolume() {
return this.volumes.get(0);
}
public String getLastVolume() {
return this.volumes.get(volumes.size() - 1);
}
public String getMatchingVolume(io.kubernetes.client.fluent.Predicate predicate) {
for (String item: volumes) { if(predicate.apply(item)){ return item;} } return null;
}
public Boolean hasMatchingVolume(io.kubernetes.client.fluent.Predicate predicate) {
for (String 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 (String item : volumes){this.addToVolumes(item);}} else { this.volumes = null;} return (A) this;
}
public A withVolumes(String... volumes) {
if (this.volumes != null) {this.volumes.clear();}
if (volumes != null) {for (String item :volumes){ this.addToVolumes(item);}} return (A) this;
}
public Boolean hasVolumes() {
return volumes != null && !volumes.isEmpty();
}
public A addNewVolume(String arg1) {
return (A)addToVolumes(new String(arg1));
}
public A addNewVolume(StringBuilder arg1) {
return (A)addToVolumes(new String(arg1));
}
public A addNewVolume(StringBuffer arg1) {
return (A)addToVolumes(new String(arg1));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1beta1PodSecurityPolicySpecFluentImpl that = (V1beta1PodSecurityPolicySpecFluentImpl) o;
if (allowPrivilegeEscalation != null ? !allowPrivilegeEscalation.equals(that.allowPrivilegeEscalation) :that.allowPrivilegeEscalation != null) return false;
if (allowedCSIDrivers != null ? !allowedCSIDrivers.equals(that.allowedCSIDrivers) :that.allowedCSIDrivers != null) return false;
if (allowedCapabilities != null ? !allowedCapabilities.equals(that.allowedCapabilities) :that.allowedCapabilities != null) return false;
if (allowedFlexVolumes != null ? !allowedFlexVolumes.equals(that.allowedFlexVolumes) :that.allowedFlexVolumes != null) return false;
if (allowedHostPaths != null ? !allowedHostPaths.equals(that.allowedHostPaths) :that.allowedHostPaths != null) return false;
if (allowedProcMountTypes != null ? !allowedProcMountTypes.equals(that.allowedProcMountTypes) :that.allowedProcMountTypes != null) return false;
if (allowedUnsafeSysctls != null ? !allowedUnsafeSysctls.equals(that.allowedUnsafeSysctls) :that.allowedUnsafeSysctls != null) return false;
if (defaultAddCapabilities != null ? !defaultAddCapabilities.equals(that.defaultAddCapabilities) :that.defaultAddCapabilities != null) return false;
if (defaultAllowPrivilegeEscalation != null ? !defaultAllowPrivilegeEscalation.equals(that.defaultAllowPrivilegeEscalation) :that.defaultAllowPrivilegeEscalation != null) return false;
if (forbiddenSysctls != null ? !forbiddenSysctls.equals(that.forbiddenSysctls) :that.forbiddenSysctls != null) return false;
if (fsGroup != null ? !fsGroup.equals(that.fsGroup) :that.fsGroup != null) return false;
if (hostIPC != null ? !hostIPC.equals(that.hostIPC) :that.hostIPC != null) return false;
if (hostNetwork != null ? !hostNetwork.equals(that.hostNetwork) :that.hostNetwork != null) return false;
if (hostPID != null ? !hostPID.equals(that.hostPID) :that.hostPID != null) return false;
if (hostPorts != null ? !hostPorts.equals(that.hostPorts) :that.hostPorts != null) return false;
if (privileged != null ? !privileged.equals(that.privileged) :that.privileged != null) return false;
if (readOnlyRootFilesystem != null ? !readOnlyRootFilesystem.equals(that.readOnlyRootFilesystem) :that.readOnlyRootFilesystem != null) return false;
if (requiredDropCapabilities != null ? !requiredDropCapabilities.equals(that.requiredDropCapabilities) :that.requiredDropCapabilities != null) return false;
if (runAsGroup != null ? !runAsGroup.equals(that.runAsGroup) :that.runAsGroup != null) return false;
if (runAsUser != null ? !runAsUser.equals(that.runAsUser) :that.runAsUser != null) return false;
if (runtimeClass != null ? !runtimeClass.equals(that.runtimeClass) :that.runtimeClass != null) return false;
if (seLinux != null ? !seLinux.equals(that.seLinux) :that.seLinux != null) return false;
if (supplementalGroups != null ? !supplementalGroups.equals(that.supplementalGroups) :that.supplementalGroups != null) return false;
if (volumes != null ? !volumes.equals(that.volumes) :that.volumes != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(allowPrivilegeEscalation, allowedCSIDrivers, allowedCapabilities, allowedFlexVolumes, allowedHostPaths, allowedProcMountTypes, allowedUnsafeSysctls, defaultAddCapabilities, defaultAllowPrivilegeEscalation, forbiddenSysctls, fsGroup, hostIPC, hostNetwork, hostPID, hostPorts, privileged, readOnlyRootFilesystem, requiredDropCapabilities, runAsGroup, runAsUser, runtimeClass, seLinux, supplementalGroups, volumes, super.hashCode());
}
public class AllowedCSIDriversNestedImpl extends V1beta1AllowedCSIDriverFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.AllowedCSIDriversNested,io.kubernetes.client.fluent.Nested {
private final V1beta1AllowedCSIDriverBuilder builder;
private final int index;
AllowedCSIDriversNestedImpl(int index,V1beta1AllowedCSIDriver item) {
this.index = index;
this.builder = new V1beta1AllowedCSIDriverBuilder(this, item);
}
AllowedCSIDriversNestedImpl() {
this.index = -1;
this.builder = new V1beta1AllowedCSIDriverBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.setToAllowedCSIDrivers(index,builder.build());
}
public N endAllowedCSIDriver() {
return and();
}
}
public class AllowedFlexVolumesNestedImpl extends V1beta1AllowedFlexVolumeFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested,io.kubernetes.client.fluent.Nested {
private final V1beta1AllowedFlexVolumeBuilder builder;
private final int index;
AllowedFlexVolumesNestedImpl(int index,V1beta1AllowedFlexVolume item) {
this.index = index;
this.builder = new V1beta1AllowedFlexVolumeBuilder(this, item);
}
AllowedFlexVolumesNestedImpl() {
this.index = -1;
this.builder = new V1beta1AllowedFlexVolumeBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.setToAllowedFlexVolumes(index,builder.build());
}
public N endAllowedFlexVolume() {
return and();
}
}
public class AllowedHostPathsNestedImpl extends V1beta1AllowedHostPathFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested,io.kubernetes.client.fluent.Nested {
private final V1beta1AllowedHostPathBuilder builder;
private final int index;
AllowedHostPathsNestedImpl(int index,V1beta1AllowedHostPath item) {
this.index = index;
this.builder = new V1beta1AllowedHostPathBuilder(this, item);
}
AllowedHostPathsNestedImpl() {
this.index = -1;
this.builder = new V1beta1AllowedHostPathBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.setToAllowedHostPaths(index,builder.build());
}
public N endAllowedHostPath() {
return and();
}
}
public class FsGroupNestedImpl extends V1beta1FSGroupStrategyOptionsFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.FsGroupNested,io.kubernetes.client.fluent.Nested {
private final V1beta1FSGroupStrategyOptionsBuilder builder;
FsGroupNestedImpl(V1beta1FSGroupStrategyOptions item) {
this.builder = new V1beta1FSGroupStrategyOptionsBuilder(this, item);
}
FsGroupNestedImpl() {
this.builder = new V1beta1FSGroupStrategyOptionsBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.withFsGroup(builder.build());
}
public N endFsGroup() {
return and();
}
}
public class HostPortsNestedImpl extends V1beta1HostPortRangeFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.HostPortsNested,io.kubernetes.client.fluent.Nested {
private final V1beta1HostPortRangeBuilder builder;
private final int index;
HostPortsNestedImpl(int index,V1beta1HostPortRange item) {
this.index = index;
this.builder = new V1beta1HostPortRangeBuilder(this, item);
}
HostPortsNestedImpl() {
this.index = -1;
this.builder = new V1beta1HostPortRangeBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.setToHostPorts(index,builder.build());
}
public N endHostPort() {
return and();
}
}
public class RunAsGroupNestedImpl extends V1beta1RunAsGroupStrategyOptionsFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.RunAsGroupNested,io.kubernetes.client.fluent.Nested {
private final V1beta1RunAsGroupStrategyOptionsBuilder builder;
RunAsGroupNestedImpl(V1beta1RunAsGroupStrategyOptions item) {
this.builder = new V1beta1RunAsGroupStrategyOptionsBuilder(this, item);
}
RunAsGroupNestedImpl() {
this.builder = new V1beta1RunAsGroupStrategyOptionsBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.withRunAsGroup(builder.build());
}
public N endRunAsGroup() {
return and();
}
}
public class RunAsUserNestedImpl extends V1beta1RunAsUserStrategyOptionsFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.RunAsUserNested,io.kubernetes.client.fluent.Nested {
private final V1beta1RunAsUserStrategyOptionsBuilder builder;
RunAsUserNestedImpl(V1beta1RunAsUserStrategyOptions item) {
this.builder = new V1beta1RunAsUserStrategyOptionsBuilder(this, item);
}
RunAsUserNestedImpl() {
this.builder = new V1beta1RunAsUserStrategyOptionsBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.withRunAsUser(builder.build());
}
public N endRunAsUser() {
return and();
}
}
public class RuntimeClassNestedImpl extends V1beta1RuntimeClassStrategyOptionsFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.RuntimeClassNested,io.kubernetes.client.fluent.Nested {
private final V1beta1RuntimeClassStrategyOptionsBuilder builder;
RuntimeClassNestedImpl(V1beta1RuntimeClassStrategyOptions item) {
this.builder = new V1beta1RuntimeClassStrategyOptionsBuilder(this, item);
}
RuntimeClassNestedImpl() {
this.builder = new V1beta1RuntimeClassStrategyOptionsBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.withRuntimeClass(builder.build());
}
public N endRuntimeClass() {
return and();
}
}
public class SeLinuxNestedImpl extends V1beta1SELinuxStrategyOptionsFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.SeLinuxNested,io.kubernetes.client.fluent.Nested {
private final V1beta1SELinuxStrategyOptionsBuilder builder;
SeLinuxNestedImpl(V1beta1SELinuxStrategyOptions item) {
this.builder = new V1beta1SELinuxStrategyOptionsBuilder(this, item);
}
SeLinuxNestedImpl() {
this.builder = new V1beta1SELinuxStrategyOptionsBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.withSeLinux(builder.build());
}
public N endSeLinux() {
return and();
}
}
public class SupplementalGroupsNestedImpl extends V1beta1SupplementalGroupsStrategyOptionsFluentImpl> implements V1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested,io.kubernetes.client.fluent.Nested {
private final V1beta1SupplementalGroupsStrategyOptionsBuilder builder;
SupplementalGroupsNestedImpl(V1beta1SupplementalGroupsStrategyOptions item) {
this.builder = new V1beta1SupplementalGroupsStrategyOptionsBuilder(this, item);
}
SupplementalGroupsNestedImpl() {
this.builder = new V1beta1SupplementalGroupsStrategyOptionsBuilder(this);
}
public N and() {
return (N) V1beta1PodSecurityPolicySpecFluentImpl.this.withSupplementalGroups(builder.build());
}
public N endSupplementalGroups() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy