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

io.alauda.kubernetes.api.model.extensions.PodSecurityPolicySpecFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model.extensions;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.alauda.kubernetes.api.builder.Nested;
import java.util.ArrayList;
import java.lang.String;
import io.alauda.kubernetes.api.builder.Predicate;
import java.lang.Deprecated;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.lang.Integer;
import javax.validation.Valid;
import java.util.Collection;
import java.lang.Object;

public class PodSecurityPolicySpecFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements PodSecurityPolicySpecFluent{

    private List allowedCapabilities = new ArrayList();
    private List defaultAddCapabilities = new ArrayList();
    private FSGroupStrategyOptionsBuilder fsGroup;
    private Boolean hostIPC;
    private Boolean hostNetwork;
    private Boolean hostPID;
    private List hostPorts =  new ArrayList();
    private Boolean privileged;
    private Boolean readOnlyRootFilesystem;
    private List requiredDropCapabilities = new ArrayList();
    private KubernetesRunAsUserStrategyOptionsBuilder runAsUser;
    private SELinuxStrategyOptionsBuilder seLinux;
    private SupplementalGroupsStrategyOptionsBuilder supplementalGroups;
    private List volumes = new ArrayList();

    public PodSecurityPolicySpecFluentImpl(){
    }
    public PodSecurityPolicySpecFluentImpl(PodSecurityPolicySpec instance){
            this.withAllowedCapabilities(instance.getAllowedCapabilities()); 
            this.withDefaultAddCapabilities(instance.getDefaultAddCapabilities()); 
            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.withRunAsUser(instance.getRunAsUser()); 
            this.withSeLinux(instance.getSeLinux()); 
            this.withSupplementalGroups(instance.getSupplementalGroups()); 
            this.withVolumes(instance.getVolumes()); 
    }

    public A addToAllowedCapabilities(int index,String item){
            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) {this.allowedCapabilities.remove(item);} return (A)this;
    }

    public A removeAllFromAllowedCapabilities(Collection items){
            for (String item : items) {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.alauda.kubernetes.api.builder.Predicate predicate){
            for (String item: allowedCapabilities) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withAllowedCapabilities(List allowedCapabilities){
            this.allowedCapabilities.clear();
            if (allowedCapabilities != null) {for (String item : allowedCapabilities){this.addToAllowedCapabilities(item);}} 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 addToDefaultAddCapabilities(int index,String item){
            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) {this.defaultAddCapabilities.remove(item);} return (A)this;
    }

    public A removeAllFromDefaultAddCapabilities(Collection items){
            for (String item : items) {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.alauda.kubernetes.api.builder.Predicate predicate){
            for (String item: defaultAddCapabilities) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withDefaultAddCapabilities(List defaultAddCapabilities){
            this.defaultAddCapabilities.clear();
            if (defaultAddCapabilities != null) {for (String item : defaultAddCapabilities){this.addToDefaultAddCapabilities(item);}} 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();
    }

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

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

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

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

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

    public PodSecurityPolicySpecFluent.FsGroupNested withNewFsGroupLike(FSGroupStrategyOptions item){
            return new FsGroupNestedImpl(item);
    }

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

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

    public PodSecurityPolicySpecFluent.FsGroupNested editOrNewFsGroupLike(FSGroupStrategyOptions 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 Boolean isHostNetwork(){
            return this.hostNetwork;
    }

    public A withHostNetwork(Boolean hostNetwork){
            this.hostNetwork=hostNetwork; return (A) this;
    }

    public Boolean hasHostNetwork(){
            return this.hostNetwork!=null;
    }

    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 addToHostPorts(int index,HostPortRange item){
            HostPortRangeBuilder builder = new HostPortRangeBuilder(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,HostPortRange item){
            HostPortRangeBuilder builder = new HostPortRangeBuilder(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(HostPortRange... items){
            for (HostPortRange item : items) {HostPortRangeBuilder builder = new HostPortRangeBuilder(item);_visitables.add(builder);this.hostPorts.add(builder);} return (A)this;
    }

    public A addAllToHostPorts(Collection items){
            for (HostPortRange item : items) {HostPortRangeBuilder builder = new HostPortRangeBuilder(item);_visitables.add(builder);this.hostPorts.add(builder);} return (A)this;
    }

    public A removeFromHostPorts(HostPortRange... items){
            for (HostPortRange item : items) {HostPortRangeBuilder builder = new HostPortRangeBuilder(item);_visitables.remove(builder);this.hostPorts.remove(builder);} return (A)this;
    }

    public A removeAllFromHostPorts(Collection items){
            for (HostPortRange item : items) {HostPortRangeBuilder builder = new HostPortRangeBuilder(item);_visitables.remove(builder);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 HostPortRange buildHostPort(int index){
            return this.hostPorts.get(index).build();
    }

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

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

    public HostPortRange buildMatchingHostPort(io.alauda.kubernetes.api.builder.Predicate predicate){
            for (HostPortRangeBuilder item: hostPorts) { if(predicate.apply(item)){return item.build();} } return null;
    }

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

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

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

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

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

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

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

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

    public PodSecurityPolicySpecFluent.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 PodSecurityPolicySpecFluent.HostPortsNested editMatchingHostPort(io.alauda.kubernetes.api.builder.Predicate predicate){
            int index = -1;
            for (int i=0;i items){
            for (String item : items) {this.requiredDropCapabilities.add(item);} return (A)this;
    }

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

    public A removeAllFromRequiredDropCapabilities(Collection items){
            for (String item : items) {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.alauda.kubernetes.api.builder.Predicate predicate){
            for (String item: requiredDropCapabilities) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withRequiredDropCapabilities(List requiredDropCapabilities){
            this.requiredDropCapabilities.clear();
            if (requiredDropCapabilities != null) {for (String item : requiredDropCapabilities){this.addToRequiredDropCapabilities(item);}} 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 KubernetesRunAsUserStrategyOptions getRunAsUser(){
            return this.runAsUser!=null?this.runAsUser.build():null;
    }

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

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

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

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

    public PodSecurityPolicySpecFluent.RunAsUserNested withNewRunAsUserLike(KubernetesRunAsUserStrategyOptions item){
            return new RunAsUserNestedImpl(item);
    }

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

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

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

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

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

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

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

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

    public PodSecurityPolicySpecFluent.SeLinuxNested withNewSeLinuxLike(SELinuxStrategyOptions item){
            return new SeLinuxNestedImpl(item);
    }

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

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

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

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

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

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

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

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

    public PodSecurityPolicySpecFluent.SupplementalGroupsNested withNewSupplementalGroupsLike(SupplementalGroupsStrategyOptions item){
            return new SupplementalGroupsNestedImpl(item);
    }

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

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

    public PodSecurityPolicySpecFluent.SupplementalGroupsNested editOrNewSupplementalGroupsLike(SupplementalGroupsStrategyOptions item){
            return withNewSupplementalGroupsLike(getSupplementalGroups() != null ? getSupplementalGroups(): item);
    }

    public A addToVolumes(int index,String item){
            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) {this.volumes.remove(item);} return (A)this;
    }

    public A removeAllFromVolumes(Collection items){
            for (String item : items) {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.alauda.kubernetes.api.builder.Predicate predicate){
            for (String item: volumes) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withVolumes(List volumes){
            this.volumes.clear();
            if (volumes != null) {for (String item : volumes){this.addToVolumes(item);}} 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;
            PodSecurityPolicySpecFluentImpl that = (PodSecurityPolicySpecFluentImpl) o;
            if (allowedCapabilities != null ? !allowedCapabilities.equals(that.allowedCapabilities) :that.allowedCapabilities != null) return false;
            if (defaultAddCapabilities != null ? !defaultAddCapabilities.equals(that.defaultAddCapabilities) :that.defaultAddCapabilities != 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 FsGroupNestedImpl extends FSGroupStrategyOptionsFluentImpl> implements PodSecurityPolicySpecFluent.FsGroupNested,io.alauda.kubernetes.api.builder.Nested{

            private final FSGroupStrategyOptionsBuilder builder;
    
            FsGroupNestedImpl(FSGroupStrategyOptions item){
                    this.builder = new FSGroupStrategyOptionsBuilder(this, item);
            }
            FsGroupNestedImpl(){
                    this.builder = new FSGroupStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) PodSecurityPolicySpecFluentImpl.this.withFsGroup(builder.build());
    }
    public N endFsGroup(){
            return and();
    }

}
    public class HostPortsNestedImpl extends HostPortRangeFluentImpl> implements PodSecurityPolicySpecFluent.HostPortsNested,io.alauda.kubernetes.api.builder.Nested{

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

}
    public class RunAsUserNestedImpl extends KubernetesRunAsUserStrategyOptionsFluentImpl> implements PodSecurityPolicySpecFluent.RunAsUserNested,io.alauda.kubernetes.api.builder.Nested{

            private final KubernetesRunAsUserStrategyOptionsBuilder builder;
    
            RunAsUserNestedImpl(KubernetesRunAsUserStrategyOptions item){
                    this.builder = new KubernetesRunAsUserStrategyOptionsBuilder(this, item);
            }
            RunAsUserNestedImpl(){
                    this.builder = new KubernetesRunAsUserStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) PodSecurityPolicySpecFluentImpl.this.withRunAsUser(builder.build());
    }
    public N endRunAsUser(){
            return and();
    }

}
    public class SeLinuxNestedImpl extends SELinuxStrategyOptionsFluentImpl> implements PodSecurityPolicySpecFluent.SeLinuxNested,io.alauda.kubernetes.api.builder.Nested{

            private final SELinuxStrategyOptionsBuilder builder;
    
            SeLinuxNestedImpl(SELinuxStrategyOptions item){
                    this.builder = new SELinuxStrategyOptionsBuilder(this, item);
            }
            SeLinuxNestedImpl(){
                    this.builder = new SELinuxStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) PodSecurityPolicySpecFluentImpl.this.withSeLinux(builder.build());
    }
    public N endSeLinux(){
            return and();
    }

}
    public class SupplementalGroupsNestedImpl extends SupplementalGroupsStrategyOptionsFluentImpl> implements PodSecurityPolicySpecFluent.SupplementalGroupsNested,io.alauda.kubernetes.api.builder.Nested{

            private final SupplementalGroupsStrategyOptionsBuilder builder;
    
            SupplementalGroupsNestedImpl(SupplementalGroupsStrategyOptions item){
                    this.builder = new SupplementalGroupsStrategyOptionsBuilder(this, item);
            }
            SupplementalGroupsNestedImpl(){
                    this.builder = new SupplementalGroupsStrategyOptionsBuilder(this);
            }
    
    public N and(){
            return (N) PodSecurityPolicySpecFluentImpl.this.withSupplementalGroups(builder.build());
    }
    public N endSupplementalGroups(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy