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

io.kubernetes.client.models.ExtensionsV1beta1PodSecurityPolicySpecFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.models;

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 io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;

public class ExtensionsV1beta1PodSecurityPolicySpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements ExtensionsV1beta1PodSecurityPolicySpecFluent{

    private Boolean allowPrivilegeEscalation;
    private List allowedCapabilities;
    private List allowedFlexVolumes;
    private List allowedHostPaths;
    private List allowedUnsafeSysctls;
    private List defaultAddCapabilities;
    private Boolean defaultAllowPrivilegeEscalation;
    private List forbiddenSysctls;
    private ExtensionsV1beta1FSGroupStrategyOptionsBuilder fsGroup;
    private Boolean hostIPC;
    private Boolean hostNetwork;
    private Boolean hostPID;
    private List hostPorts;
    private Boolean privileged;
    private Boolean readOnlyRootFilesystem;
    private List requiredDropCapabilities;
    private ExtensionsV1beta1RunAsUserStrategyOptionsBuilder runAsUser;
    private ExtensionsV1beta1SELinuxStrategyOptionsBuilder seLinux;
    private ExtensionsV1beta1SupplementalGroupsStrategyOptionsBuilder supplementalGroups;
    private List volumes;

    public ExtensionsV1beta1PodSecurityPolicySpecFluentImpl(){
    }
    public ExtensionsV1beta1PodSecurityPolicySpecFluentImpl(ExtensionsV1beta1PodSecurityPolicySpec instance){
            this.withAllowPrivilegeEscalation(instance.isAllowPrivilegeEscalation());

            this.withAllowedCapabilities(instance.getAllowedCapabilities());

            this.withAllowedFlexVolumes(instance.getAllowedFlexVolumes());

            this.withAllowedHostPaths(instance.getAllowedHostPaths());

            this.withAllowedUnsafeSysctls(instance.getAllowedUnsafeSysctls());

            this.withDefaultAddCapabilities(instance.getDefaultAddCapabilities());

            this.withDefaultAllowPrivilegeEscalation(instance.isDefaultAllowPrivilegeEscalation());

            this.withForbiddenSysctls(instance.getForbiddenSysctls());

            this.withFsGroup(instance.getFsGroup());

            this.withHostIPC(instance.isHostIPC());

            this.withHostNetwork(instance.isHostNetwork());

            this.withHostPID(instance.isHostPID());

            this.withHostPorts(instance.getHostPorts());

            this.withPrivileged(instance.isPrivileged());

            this.withReadOnlyRootFilesystem(instance.isReadOnlyRootFilesystem());

            this.withRequiredDropCapabilities(instance.getRequiredDropCapabilities());

            this.withRunAsUser(instance.getRunAsUser());

            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(boolean arg1){
            return (A)withAllowPrivilegeEscalation(new Boolean(arg1));
    }

    public A withNewAllowPrivilegeEscalation(String arg1){
            return (A)withAllowPrivilegeEscalation(new Boolean(arg1));
    }

    public A addToAllowedCapabilities(int index,String item){
            if (this.allowedCapabilities == null) {this.allowedCapabilities = new ArrayList();}
            this.allowedCapabilities.add(index, item);
            return (A)this;
    }

    public A setToAllowedCapabilities(int index,String item){
            this.allowedCapabilities.set(index, item); return (A)this;
    }

    public A addToAllowedCapabilities(String... items){
            for (String item : items) {this.allowedCapabilities.add(item);} return (A)this;
    }

    public A addAllToAllowedCapabilities(Collection items){
            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 A withAllowedCapabilities(List allowedCapabilities){
            if (this.allowedCapabilities != null) { _visitables.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){
            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 addToAllowedFlexVolumes(int index,ExtensionsV1beta1AllowedFlexVolume item){
            if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
            ExtensionsV1beta1AllowedFlexVolumeBuilder builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(item);_visitables.add(index >= 0 ? index : _visitables.size(), builder);this.allowedFlexVolumes.add(index >= 0 ? index : allowedFlexVolumes.size(), builder); return (A)this;
    }

    public A setToAllowedFlexVolumes(int index,ExtensionsV1beta1AllowedFlexVolume item){
            if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
            ExtensionsV1beta1AllowedFlexVolumeBuilder builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(item);
            if (index < 0 || index >= _visitables.size()) { _visitables.add(builder); } else { _visitables.set(index, builder);}
            if (index < 0 || index >= allowedFlexVolumes.size()) { allowedFlexVolumes.add(builder); } else { allowedFlexVolumes.set(index, builder);}
             return (A)this;
    }

    public A addToAllowedFlexVolumes(ExtensionsV1beta1AllowedFlexVolume... items){
            if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
            for (ExtensionsV1beta1AllowedFlexVolume item : items) {ExtensionsV1beta1AllowedFlexVolumeBuilder builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(item);_visitables.add(builder);this.allowedFlexVolumes.add(builder);} return (A)this;
    }

    public A addAllToAllowedFlexVolumes(Collection items){
            if (this.allowedFlexVolumes == null) {this.allowedFlexVolumes = new ArrayList();}
            for (ExtensionsV1beta1AllowedFlexVolume item : items) {ExtensionsV1beta1AllowedFlexVolumeBuilder builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(item);_visitables.add(builder);this.allowedFlexVolumes.add(builder);} return (A)this;
    }

    public A removeFromAllowedFlexVolumes(ExtensionsV1beta1AllowedFlexVolume... items){
            for (ExtensionsV1beta1AllowedFlexVolume item : items) {ExtensionsV1beta1AllowedFlexVolumeBuilder builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(item);_visitables.remove(builder);if (this.allowedFlexVolumes != null) {this.allowedFlexVolumes.remove(builder);}} return (A)this;
    }

    public A removeAllFromAllowedFlexVolumes(Collection items){
            for (ExtensionsV1beta1AllowedFlexVolume item : items) {ExtensionsV1beta1AllowedFlexVolumeBuilder builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(item);_visitables.remove(builder);if (this.allowedFlexVolumes != null) {this.allowedFlexVolumes.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildAllowedFlexVolumes instead.
 */
@Deprecated public List getAllowedFlexVolumes(){
            return build(allowedFlexVolumes);
    }

    public List buildAllowedFlexVolumes(){
            return build(allowedFlexVolumes);
    }

    public ExtensionsV1beta1AllowedFlexVolume buildAllowedFlexVolume(int index){
            return this.allowedFlexVolumes.get(index).build();
    }

    public ExtensionsV1beta1AllowedFlexVolume buildFirstAllowedFlexVolume(){
            return this.allowedFlexVolumes.get(0).build();
    }

    public ExtensionsV1beta1AllowedFlexVolume buildLastAllowedFlexVolume(){
            return this.allowedFlexVolumes.get(allowedFlexVolumes.size() - 1).build();
    }

    public ExtensionsV1beta1AllowedFlexVolume buildMatchingAllowedFlexVolume(io.kubernetes.client.fluent.Predicate predicate){
            for (ExtensionsV1beta1AllowedFlexVolumeBuilder item: allowedFlexVolumes) { if(predicate.apply(item)){return item.build();} } return null;
    }

    public A withAllowedFlexVolumes(List allowedFlexVolumes){
            if (this.allowedFlexVolumes != null) { _visitables.removeAll(this.allowedFlexVolumes);}
            if (allowedFlexVolumes != null) {this.allowedFlexVolumes = new ArrayList(); for (ExtensionsV1beta1AllowedFlexVolume item : allowedFlexVolumes){this.addToAllowedFlexVolumes(item);}} else { this.allowedFlexVolumes = null;} return (A) this;
    }

    public A withAllowedFlexVolumes(ExtensionsV1beta1AllowedFlexVolume... allowedFlexVolumes){
            this.allowedFlexVolumes.clear(); if (allowedFlexVolumes != null) {for (ExtensionsV1beta1AllowedFlexVolume item :allowedFlexVolumes){ this.addToAllowedFlexVolumes(item);}} return (A) this;
    }

    public Boolean hasAllowedFlexVolumes(){
            return allowedFlexVolumes != null && !allowedFlexVolumes.isEmpty();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested addNewAllowedFlexVolume(){
            return new AllowedFlexVolumesNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested addNewAllowedFlexVolumeLike(ExtensionsV1beta1AllowedFlexVolume item){
            return new AllowedFlexVolumesNestedImpl(-1, item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested setNewAllowedFlexVolumeLike(int index,ExtensionsV1beta1AllowedFlexVolume item){
            return new AllowedFlexVolumesNestedImpl(index, item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editAllowedFlexVolume(int index){
            if (allowedFlexVolumes.size() <= index) throw new RuntimeException("Can't edit allowedFlexVolumes. Index exceeds size.");
            return setNewAllowedFlexVolumeLike(index, buildAllowedFlexVolume(index));
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editFirstAllowedFlexVolume(){
            if (allowedFlexVolumes.size() == 0) throw new RuntimeException("Can't edit first allowedFlexVolumes. The list is empty.");
            return setNewAllowedFlexVolumeLike(0, buildAllowedFlexVolume(0));
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.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 ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested editMatchingAllowedFlexVolume(io.kubernetes.client.fluent.Predicate predicate){
            int index = -1;
            for (int i=0;i();}
            ExtensionsV1beta1AllowedHostPathBuilder builder = new ExtensionsV1beta1AllowedHostPathBuilder(item);_visitables.add(index >= 0 ? index : _visitables.size(), builder);this.allowedHostPaths.add(index >= 0 ? index : allowedHostPaths.size(), builder); return (A)this;
    }

    public A setToAllowedHostPaths(int index,ExtensionsV1beta1AllowedHostPath item){
            if (this.allowedHostPaths == null) {this.allowedHostPaths = new ArrayList();}
            ExtensionsV1beta1AllowedHostPathBuilder builder = new ExtensionsV1beta1AllowedHostPathBuilder(item);
            if (index < 0 || index >= _visitables.size()) { _visitables.add(builder); } else { _visitables.set(index, builder);}
            if (index < 0 || index >= allowedHostPaths.size()) { allowedHostPaths.add(builder); } else { allowedHostPaths.set(index, builder);}
             return (A)this;
    }

    public A addToAllowedHostPaths(ExtensionsV1beta1AllowedHostPath... items){
            if (this.allowedHostPaths == null) {this.allowedHostPaths = new ArrayList();}
            for (ExtensionsV1beta1AllowedHostPath item : items) {ExtensionsV1beta1AllowedHostPathBuilder builder = new ExtensionsV1beta1AllowedHostPathBuilder(item);_visitables.add(builder);this.allowedHostPaths.add(builder);} return (A)this;
    }

    public A addAllToAllowedHostPaths(Collection items){
            if (this.allowedHostPaths == null) {this.allowedHostPaths = new ArrayList();}
            for (ExtensionsV1beta1AllowedHostPath item : items) {ExtensionsV1beta1AllowedHostPathBuilder builder = new ExtensionsV1beta1AllowedHostPathBuilder(item);_visitables.add(builder);this.allowedHostPaths.add(builder);} return (A)this;
    }

    public A removeFromAllowedHostPaths(ExtensionsV1beta1AllowedHostPath... items){
            for (ExtensionsV1beta1AllowedHostPath item : items) {ExtensionsV1beta1AllowedHostPathBuilder builder = new ExtensionsV1beta1AllowedHostPathBuilder(item);_visitables.remove(builder);if (this.allowedHostPaths != null) {this.allowedHostPaths.remove(builder);}} return (A)this;
    }

    public A removeAllFromAllowedHostPaths(Collection items){
            for (ExtensionsV1beta1AllowedHostPath item : items) {ExtensionsV1beta1AllowedHostPathBuilder builder = new ExtensionsV1beta1AllowedHostPathBuilder(item);_visitables.remove(builder);if (this.allowedHostPaths != null) {this.allowedHostPaths.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildAllowedHostPaths instead.
 */
@Deprecated public List getAllowedHostPaths(){
            return build(allowedHostPaths);
    }

    public List buildAllowedHostPaths(){
            return build(allowedHostPaths);
    }

    public ExtensionsV1beta1AllowedHostPath buildAllowedHostPath(int index){
            return this.allowedHostPaths.get(index).build();
    }

    public ExtensionsV1beta1AllowedHostPath buildFirstAllowedHostPath(){
            return this.allowedHostPaths.get(0).build();
    }

    public ExtensionsV1beta1AllowedHostPath buildLastAllowedHostPath(){
            return this.allowedHostPaths.get(allowedHostPaths.size() - 1).build();
    }

    public ExtensionsV1beta1AllowedHostPath buildMatchingAllowedHostPath(io.kubernetes.client.fluent.Predicate predicate){
            for (ExtensionsV1beta1AllowedHostPathBuilder item: allowedHostPaths) { if(predicate.apply(item)){return item.build();} } return null;
    }

    public A withAllowedHostPaths(List allowedHostPaths){
            if (this.allowedHostPaths != null) { _visitables.removeAll(this.allowedHostPaths);}
            if (allowedHostPaths != null) {this.allowedHostPaths = new ArrayList(); for (ExtensionsV1beta1AllowedHostPath item : allowedHostPaths){this.addToAllowedHostPaths(item);}} else { this.allowedHostPaths = null;} return (A) this;
    }

    public A withAllowedHostPaths(ExtensionsV1beta1AllowedHostPath... allowedHostPaths){
            this.allowedHostPaths.clear(); if (allowedHostPaths != null) {for (ExtensionsV1beta1AllowedHostPath item :allowedHostPaths){ this.addToAllowedHostPaths(item);}} return (A) this;
    }

    public Boolean hasAllowedHostPaths(){
            return allowedHostPaths != null && !allowedHostPaths.isEmpty();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested addNewAllowedHostPath(){
            return new AllowedHostPathsNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested addNewAllowedHostPathLike(ExtensionsV1beta1AllowedHostPath item){
            return new AllowedHostPathsNestedImpl(-1, item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested setNewAllowedHostPathLike(int index,ExtensionsV1beta1AllowedHostPath item){
            return new AllowedHostPathsNestedImpl(index, item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editAllowedHostPath(int index){
            if (allowedHostPaths.size() <= index) throw new RuntimeException("Can't edit allowedHostPaths. Index exceeds size.");
            return setNewAllowedHostPathLike(index, buildAllowedHostPath(index));
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editFirstAllowedHostPath(){
            if (allowedHostPaths.size() == 0) throw new RuntimeException("Can't edit first allowedHostPaths. The list is empty.");
            return setNewAllowedHostPathLike(0, buildAllowedHostPath(0));
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.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 ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested editMatchingAllowedHostPath(io.kubernetes.client.fluent.Predicate predicate){
            int index = -1;
            for (int i=0;i();}
            this.allowedUnsafeSysctls.add(index, item);
            return (A)this;
    }

    public A setToAllowedUnsafeSysctls(int index,String item){
            this.allowedUnsafeSysctls.set(index, item); return (A)this;
    }

    public A addToAllowedUnsafeSysctls(String... items){
            for (String item : items) {this.allowedUnsafeSysctls.add(item);} return (A)this;
    }

    public A addAllToAllowedUnsafeSysctls(Collection items){
            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 A withAllowedUnsafeSysctls(List allowedUnsafeSysctls){
            if (this.allowedUnsafeSysctls != null) { _visitables.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){
            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 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){
            this.defaultAddCapabilities.set(index, item); return (A)this;
    }

    public A addToDefaultAddCapabilities(String... items){
            for (String item : items) {this.defaultAddCapabilities.add(item);} return (A)this;
    }

    public A addAllToDefaultAddCapabilities(Collection items){
            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 A withDefaultAddCapabilities(List defaultAddCapabilities){
            if (this.defaultAddCapabilities != null) { _visitables.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){
            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 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(boolean arg1){
            return (A)withDefaultAllowPrivilegeEscalation(new Boolean(arg1));
    }

    public A withNewDefaultAllowPrivilegeEscalation(String 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){
            this.forbiddenSysctls.set(index, item); return (A)this;
    }

    public A addToForbiddenSysctls(String... items){
            for (String item : items) {this.forbiddenSysctls.add(item);} return (A)this;
    }

    public A addAllToForbiddenSysctls(Collection items){
            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 A withForbiddenSysctls(List forbiddenSysctls){
            if (this.forbiddenSysctls != null) { _visitables.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){
            this.forbiddenSysctls.clear(); if (forbiddenSysctls != null) {for (String item :forbiddenSysctls){ this.addToForbiddenSysctls(item);}} return (A) this;
    }

    public Boolean hasForbiddenSysctls(){
            return forbiddenSysctls != null && !forbiddenSysctls.isEmpty();
    }

    
/**
 * This method has been deprecated, please use method buildFsGroup instead.
 */
@Deprecated public ExtensionsV1beta1FSGroupStrategyOptions getFsGroup(){
            return this.fsGroup!=null?this.fsGroup.build():null;
    }

    public ExtensionsV1beta1FSGroupStrategyOptions buildFsGroup(){
            return this.fsGroup!=null?this.fsGroup.build():null;
    }

    public A withFsGroup(ExtensionsV1beta1FSGroupStrategyOptions fsGroup){
            _visitables.remove(this.fsGroup);
            if (fsGroup!=null){ this.fsGroup= new ExtensionsV1beta1FSGroupStrategyOptionsBuilder(fsGroup); _visitables.add(this.fsGroup);} return (A) this;
    }

    public Boolean hasFsGroup(){
            return this.fsGroup != null;
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.FsGroupNested withNewFsGroup(){
            return new FsGroupNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.FsGroupNested withNewFsGroupLike(ExtensionsV1beta1FSGroupStrategyOptions item){
            return new FsGroupNestedImpl(item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.FsGroupNested editFsGroup(){
            return withNewFsGroupLike(getFsGroup());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.FsGroupNested editOrNewFsGroup(){
            return withNewFsGroupLike(getFsGroup() != null ? getFsGroup(): new ExtensionsV1beta1FSGroupStrategyOptionsBuilder().build());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.FsGroupNested editOrNewFsGroupLike(ExtensionsV1beta1FSGroupStrategyOptions 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(boolean arg1){
            return (A)withHostIPC(new Boolean(arg1));
    }

    public A withNewHostIPC(String 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(boolean arg1){
            return (A)withHostNetwork(new Boolean(arg1));
    }

    public A withNewHostNetwork(String 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(boolean arg1){
            return (A)withHostPID(new Boolean(arg1));
    }

    public A withNewHostPID(String arg1){
            return (A)withHostPID(new Boolean(arg1));
    }

    public A addToHostPorts(int index,ExtensionsV1beta1HostPortRange item){
            if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
            ExtensionsV1beta1HostPortRangeBuilder builder = new ExtensionsV1beta1HostPortRangeBuilder(item);_visitables.add(index >= 0 ? index : _visitables.size(), builder);this.hostPorts.add(index >= 0 ? index : hostPorts.size(), builder); return (A)this;
    }

    public A setToHostPorts(int index,ExtensionsV1beta1HostPortRange item){
            if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
            ExtensionsV1beta1HostPortRangeBuilder builder = new ExtensionsV1beta1HostPortRangeBuilder(item);
            if (index < 0 || index >= _visitables.size()) { _visitables.add(builder); } else { _visitables.set(index, builder);}
            if (index < 0 || index >= hostPorts.size()) { hostPorts.add(builder); } else { hostPorts.set(index, builder);}
             return (A)this;
    }

    public A addToHostPorts(ExtensionsV1beta1HostPortRange... items){
            if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
            for (ExtensionsV1beta1HostPortRange item : items) {ExtensionsV1beta1HostPortRangeBuilder builder = new ExtensionsV1beta1HostPortRangeBuilder(item);_visitables.add(builder);this.hostPorts.add(builder);} return (A)this;
    }

    public A addAllToHostPorts(Collection items){
            if (this.hostPorts == null) {this.hostPorts = new ArrayList();}
            for (ExtensionsV1beta1HostPortRange item : items) {ExtensionsV1beta1HostPortRangeBuilder builder = new ExtensionsV1beta1HostPortRangeBuilder(item);_visitables.add(builder);this.hostPorts.add(builder);} return (A)this;
    }

    public A removeFromHostPorts(ExtensionsV1beta1HostPortRange... items){
            for (ExtensionsV1beta1HostPortRange item : items) {ExtensionsV1beta1HostPortRangeBuilder builder = new ExtensionsV1beta1HostPortRangeBuilder(item);_visitables.remove(builder);if (this.hostPorts != null) {this.hostPorts.remove(builder);}} return (A)this;
    }

    public A removeAllFromHostPorts(Collection items){
            for (ExtensionsV1beta1HostPortRange item : items) {ExtensionsV1beta1HostPortRangeBuilder builder = new ExtensionsV1beta1HostPortRangeBuilder(item);_visitables.remove(builder);if (this.hostPorts != null) {this.hostPorts.remove(builder);}} return (A)this;
    }

    
/**
 * This method has been deprecated, please use method buildHostPorts instead.
 */
@Deprecated public List getHostPorts(){
            return build(hostPorts);
    }

    public List buildHostPorts(){
            return build(hostPorts);
    }

    public ExtensionsV1beta1HostPortRange buildHostPort(int index){
            return this.hostPorts.get(index).build();
    }

    public ExtensionsV1beta1HostPortRange buildFirstHostPort(){
            return this.hostPorts.get(0).build();
    }

    public ExtensionsV1beta1HostPortRange buildLastHostPort(){
            return this.hostPorts.get(hostPorts.size() - 1).build();
    }

    public ExtensionsV1beta1HostPortRange buildMatchingHostPort(io.kubernetes.client.fluent.Predicate predicate){
            for (ExtensionsV1beta1HostPortRangeBuilder item: hostPorts) { if(predicate.apply(item)){return item.build();} } return null;
    }

    public A withHostPorts(List hostPorts){
            if (this.hostPorts != null) { _visitables.removeAll(this.hostPorts);}
            if (hostPorts != null) {this.hostPorts = new ArrayList(); for (ExtensionsV1beta1HostPortRange item : hostPorts){this.addToHostPorts(item);}} else { this.hostPorts = null;} return (A) this;
    }

    public A withHostPorts(ExtensionsV1beta1HostPortRange... hostPorts){
            this.hostPorts.clear(); if (hostPorts != null) {for (ExtensionsV1beta1HostPortRange item :hostPorts){ this.addToHostPorts(item);}} return (A) this;
    }

    public Boolean hasHostPorts(){
            return hostPorts != null && !hostPorts.isEmpty();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.HostPortsNested addNewHostPort(){
            return new HostPortsNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.HostPortsNested addNewHostPortLike(ExtensionsV1beta1HostPortRange item){
            return new HostPortsNestedImpl(-1, item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.HostPortsNested setNewHostPortLike(int index,ExtensionsV1beta1HostPortRange item){
            return new HostPortsNestedImpl(index, item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.HostPortsNested editHostPort(int index){
            if (hostPorts.size() <= index) throw new RuntimeException("Can't edit hostPorts. Index exceeds size.");
            return setNewHostPortLike(index, buildHostPort(index));
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.HostPortsNested editFirstHostPort(){
            if (hostPorts.size() == 0) throw new RuntimeException("Can't edit first hostPorts. The list is empty.");
            return setNewHostPortLike(0, buildHostPort(0));
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.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 ExtensionsV1beta1PodSecurityPolicySpecFluent.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){
            this.requiredDropCapabilities.set(index, item); return (A)this;
    }

    public A addToRequiredDropCapabilities(String... items){
            for (String item : items) {this.requiredDropCapabilities.add(item);} return (A)this;
    }

    public A addAllToRequiredDropCapabilities(Collection items){
            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 A withRequiredDropCapabilities(List requiredDropCapabilities){
            if (this.requiredDropCapabilities != null) { _visitables.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){
            this.requiredDropCapabilities.clear(); if (requiredDropCapabilities != null) {for (String item :requiredDropCapabilities){ this.addToRequiredDropCapabilities(item);}} return (A) this;
    }

    public Boolean hasRequiredDropCapabilities(){
            return requiredDropCapabilities != null && !requiredDropCapabilities.isEmpty();
    }

    
/**
 * This method has been deprecated, please use method buildRunAsUser instead.
 */
@Deprecated public ExtensionsV1beta1RunAsUserStrategyOptions getRunAsUser(){
            return this.runAsUser!=null?this.runAsUser.build():null;
    }

    public ExtensionsV1beta1RunAsUserStrategyOptions buildRunAsUser(){
            return this.runAsUser!=null?this.runAsUser.build():null;
    }

    public A withRunAsUser(ExtensionsV1beta1RunAsUserStrategyOptions runAsUser){
            _visitables.remove(this.runAsUser);
            if (runAsUser!=null){ this.runAsUser= new ExtensionsV1beta1RunAsUserStrategyOptionsBuilder(runAsUser); _visitables.add(this.runAsUser);} return (A) this;
    }

    public Boolean hasRunAsUser(){
            return this.runAsUser != null;
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.RunAsUserNested withNewRunAsUser(){
            return new RunAsUserNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.RunAsUserNested withNewRunAsUserLike(ExtensionsV1beta1RunAsUserStrategyOptions item){
            return new RunAsUserNestedImpl(item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.RunAsUserNested editRunAsUser(){
            return withNewRunAsUserLike(getRunAsUser());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.RunAsUserNested editOrNewRunAsUser(){
            return withNewRunAsUserLike(getRunAsUser() != null ? getRunAsUser(): new ExtensionsV1beta1RunAsUserStrategyOptionsBuilder().build());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.RunAsUserNested editOrNewRunAsUserLike(ExtensionsV1beta1RunAsUserStrategyOptions item){
            return withNewRunAsUserLike(getRunAsUser() != null ? getRunAsUser(): item);
    }

    
/**
 * This method has been deprecated, please use method buildSeLinux instead.
 */
@Deprecated public ExtensionsV1beta1SELinuxStrategyOptions getSeLinux(){
            return this.seLinux!=null?this.seLinux.build():null;
    }

    public ExtensionsV1beta1SELinuxStrategyOptions buildSeLinux(){
            return this.seLinux!=null?this.seLinux.build():null;
    }

    public A withSeLinux(ExtensionsV1beta1SELinuxStrategyOptions seLinux){
            _visitables.remove(this.seLinux);
            if (seLinux!=null){ this.seLinux= new ExtensionsV1beta1SELinuxStrategyOptionsBuilder(seLinux); _visitables.add(this.seLinux);} return (A) this;
    }

    public Boolean hasSeLinux(){
            return this.seLinux != null;
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SeLinuxNested withNewSeLinux(){
            return new SeLinuxNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SeLinuxNested withNewSeLinuxLike(ExtensionsV1beta1SELinuxStrategyOptions item){
            return new SeLinuxNestedImpl(item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SeLinuxNested editSeLinux(){
            return withNewSeLinuxLike(getSeLinux());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SeLinuxNested editOrNewSeLinux(){
            return withNewSeLinuxLike(getSeLinux() != null ? getSeLinux(): new ExtensionsV1beta1SELinuxStrategyOptionsBuilder().build());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SeLinuxNested editOrNewSeLinuxLike(ExtensionsV1beta1SELinuxStrategyOptions item){
            return withNewSeLinuxLike(getSeLinux() != null ? getSeLinux(): item);
    }

    
/**
 * This method has been deprecated, please use method buildSupplementalGroups instead.
 */
@Deprecated public ExtensionsV1beta1SupplementalGroupsStrategyOptions getSupplementalGroups(){
            return this.supplementalGroups!=null?this.supplementalGroups.build():null;
    }

    public ExtensionsV1beta1SupplementalGroupsStrategyOptions buildSupplementalGroups(){
            return this.supplementalGroups!=null?this.supplementalGroups.build():null;
    }

    public A withSupplementalGroups(ExtensionsV1beta1SupplementalGroupsStrategyOptions supplementalGroups){
            _visitables.remove(this.supplementalGroups);
            if (supplementalGroups!=null){ this.supplementalGroups= new ExtensionsV1beta1SupplementalGroupsStrategyOptionsBuilder(supplementalGroups); _visitables.add(this.supplementalGroups);} return (A) this;
    }

    public Boolean hasSupplementalGroups(){
            return this.supplementalGroups != null;
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested withNewSupplementalGroups(){
            return new SupplementalGroupsNestedImpl();
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested withNewSupplementalGroupsLike(ExtensionsV1beta1SupplementalGroupsStrategyOptions item){
            return new SupplementalGroupsNestedImpl(item);
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested editSupplementalGroups(){
            return withNewSupplementalGroupsLike(getSupplementalGroups());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested editOrNewSupplementalGroups(){
            return withNewSupplementalGroupsLike(getSupplementalGroups() != null ? getSupplementalGroups(): new ExtensionsV1beta1SupplementalGroupsStrategyOptionsBuilder().build());
    }

    public ExtensionsV1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested editOrNewSupplementalGroupsLike(ExtensionsV1beta1SupplementalGroupsStrategyOptions 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){
            this.volumes.set(index, item); return (A)this;
    }

    public A addToVolumes(String... items){
            for (String item : items) {this.volumes.add(item);} return (A)this;
    }

    public A addAllToVolumes(Collection items){
            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 A withVolumes(List volumes){
            if (this.volumes != null) { _visitables.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){
            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 boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            ExtensionsV1beta1PodSecurityPolicySpecFluentImpl that = (ExtensionsV1beta1PodSecurityPolicySpecFluentImpl) o;
            if (allowPrivilegeEscalation != null ? !allowPrivilegeEscalation.equals(that.allowPrivilegeEscalation) :that.allowPrivilegeEscalation != 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 (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 (runAsUser != null ? !runAsUser.equals(that.runAsUser) :that.runAsUser != 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 class AllowedFlexVolumesNestedImpl extends ExtensionsV1beta1AllowedFlexVolumeFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedFlexVolumesNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1AllowedFlexVolumeBuilder builder;
        private final int index;
    
            AllowedFlexVolumesNestedImpl(int index,ExtensionsV1beta1AllowedFlexVolume item){
                    this.index = index;
                    this.builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(this, item);
            }
            AllowedFlexVolumesNestedImpl(){
                    this.index = -1;
                    this.builder = new ExtensionsV1beta1AllowedFlexVolumeBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.setToAllowedFlexVolumes(index, builder.build());
    }
    public N endAllowedFlexVolume(){
            return and();
    }

}
    public class AllowedHostPathsNestedImpl extends ExtensionsV1beta1AllowedHostPathFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.AllowedHostPathsNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1AllowedHostPathBuilder builder;
        private final int index;
    
            AllowedHostPathsNestedImpl(int index,ExtensionsV1beta1AllowedHostPath item){
                    this.index = index;
                    this.builder = new ExtensionsV1beta1AllowedHostPathBuilder(this, item);
            }
            AllowedHostPathsNestedImpl(){
                    this.index = -1;
                    this.builder = new ExtensionsV1beta1AllowedHostPathBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.setToAllowedHostPaths(index, builder.build());
    }
    public N endAllowedHostPath(){
            return and();
    }

}
    public class FsGroupNestedImpl extends ExtensionsV1beta1FSGroupStrategyOptionsFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.FsGroupNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1FSGroupStrategyOptionsBuilder builder;
    
            FsGroupNestedImpl(ExtensionsV1beta1FSGroupStrategyOptions item){
                    this.builder = new ExtensionsV1beta1FSGroupStrategyOptionsBuilder(this, item);
            }
            FsGroupNestedImpl(){
                    this.builder = new ExtensionsV1beta1FSGroupStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.withFsGroup(builder.build());
    }
    public N endFsGroup(){
            return and();
    }

}
    public class HostPortsNestedImpl extends ExtensionsV1beta1HostPortRangeFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.HostPortsNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1HostPortRangeBuilder builder;
        private final int index;
    
            HostPortsNestedImpl(int index,ExtensionsV1beta1HostPortRange item){
                    this.index = index;
                    this.builder = new ExtensionsV1beta1HostPortRangeBuilder(this, item);
            }
            HostPortsNestedImpl(){
                    this.index = -1;
                    this.builder = new ExtensionsV1beta1HostPortRangeBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.setToHostPorts(index, builder.build());
    }
    public N endHostPort(){
            return and();
    }

}
    public class RunAsUserNestedImpl extends ExtensionsV1beta1RunAsUserStrategyOptionsFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.RunAsUserNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1RunAsUserStrategyOptionsBuilder builder;
    
            RunAsUserNestedImpl(ExtensionsV1beta1RunAsUserStrategyOptions item){
                    this.builder = new ExtensionsV1beta1RunAsUserStrategyOptionsBuilder(this, item);
            }
            RunAsUserNestedImpl(){
                    this.builder = new ExtensionsV1beta1RunAsUserStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.withRunAsUser(builder.build());
    }
    public N endRunAsUser(){
            return and();
    }

}
    public class SeLinuxNestedImpl extends ExtensionsV1beta1SELinuxStrategyOptionsFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.SeLinuxNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1SELinuxStrategyOptionsBuilder builder;
    
            SeLinuxNestedImpl(ExtensionsV1beta1SELinuxStrategyOptions item){
                    this.builder = new ExtensionsV1beta1SELinuxStrategyOptionsBuilder(this, item);
            }
            SeLinuxNestedImpl(){
                    this.builder = new ExtensionsV1beta1SELinuxStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.withSeLinux(builder.build());
    }
    public N endSeLinux(){
            return and();
    }

}
    public class SupplementalGroupsNestedImpl extends ExtensionsV1beta1SupplementalGroupsStrategyOptionsFluentImpl> implements ExtensionsV1beta1PodSecurityPolicySpecFluent.SupplementalGroupsNested,io.kubernetes.client.fluent.Nested{

            private final ExtensionsV1beta1SupplementalGroupsStrategyOptionsBuilder builder;
    
            SupplementalGroupsNestedImpl(ExtensionsV1beta1SupplementalGroupsStrategyOptions item){
                    this.builder = new ExtensionsV1beta1SupplementalGroupsStrategyOptionsBuilder(this, item);
            }
            SupplementalGroupsNestedImpl(){
                    this.builder = new ExtensionsV1beta1SupplementalGroupsStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) ExtensionsV1beta1PodSecurityPolicySpecFluentImpl.this.withSupplementalGroups(builder.build());
    }
    public N endSupplementalGroups(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy