annotations.io.fabric8.kubernetes.api.model.SecurityContextConstraintsFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.ArrayList;
import java.util.RandomAccess;
import java.util.Map;
import java.util.Map;
import java.util.List;
import java.util.List;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.HashMap;
import java.io.Serializable;
import java.util.Collection;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
public class SecurityContextConstraintsFluentImpl> extends BaseFluent implements SecurityContextConstraintsFluent{
Boolean allowHostDirVolumePlugin; Boolean allowHostIPC; Boolean allowHostNetwork; Boolean allowHostPID; Boolean allowHostPorts; Boolean allowPrivilegedContainer; List allowedCapabilities = new ArrayList(); String apiVersion; List defaultAddCapabilities = new ArrayList(); VisitableBuilder fsGroup; List groups = new ArrayList(); String kind; VisitableBuilder metadata; Integer priority; Boolean readOnlyRootFilesystem; List requiredDropCapabilities = new ArrayList(); VisitableBuilder runAsUser; VisitableBuilder seLinuxContext; VisitableBuilder supplementalGroups; List users = new ArrayList(); List volumes = new ArrayList(); Map additionalProperties = new HashMap();
public SecurityContextConstraintsFluentImpl(){
}
public SecurityContextConstraintsFluentImpl( SecurityContextConstraints instance ){
this.withAllowHostDirVolumePlugin(instance.getAllowHostDirVolumePlugin()); this.withAllowHostIPC(instance.getAllowHostIPC()); this.withAllowHostNetwork(instance.getAllowHostNetwork()); this.withAllowHostPID(instance.getAllowHostPID()); this.withAllowHostPorts(instance.getAllowHostPorts()); this.withAllowPrivilegedContainer(instance.getAllowPrivilegedContainer()); this.withAllowedCapabilities(instance.getAllowedCapabilities()); this.withApiVersion(instance.getApiVersion()); this.withDefaultAddCapabilities(instance.getDefaultAddCapabilities()); this.withFsGroup(instance.getFsGroup()); this.withGroups(instance.getGroups()); this.withKind(instance.getKind()); this.withMetadata(instance.getMetadata()); this.withPriority(instance.getPriority()); this.withReadOnlyRootFilesystem(instance.getReadOnlyRootFilesystem()); this.withRequiredDropCapabilities(instance.getRequiredDropCapabilities()); this.withRunAsUser(instance.getRunAsUser()); this.withSeLinuxContext(instance.getSeLinuxContext()); this.withSupplementalGroups(instance.getSupplementalGroups()); this.withUsers(instance.getUsers()); this.withVolumes(instance.getVolumes());
}
public Boolean isAllowHostDirVolumePlugin(){
return this.allowHostDirVolumePlugin;
}
public T withAllowHostDirVolumePlugin( Boolean allowHostDirVolumePlugin){
this.allowHostDirVolumePlugin=allowHostDirVolumePlugin; return (T) this;
}
public Boolean isAllowHostIPC(){
return this.allowHostIPC;
}
public T withAllowHostIPC( Boolean allowHostIPC){
this.allowHostIPC=allowHostIPC; return (T) this;
}
public Boolean isAllowHostNetwork(){
return this.allowHostNetwork;
}
public T withAllowHostNetwork( Boolean allowHostNetwork){
this.allowHostNetwork=allowHostNetwork; return (T) this;
}
public Boolean isAllowHostPID(){
return this.allowHostPID;
}
public T withAllowHostPID( Boolean allowHostPID){
this.allowHostPID=allowHostPID; return (T) this;
}
public Boolean isAllowHostPorts(){
return this.allowHostPorts;
}
public T withAllowHostPorts( Boolean allowHostPorts){
this.allowHostPorts=allowHostPorts; return (T) this;
}
public Boolean isAllowPrivilegedContainer(){
return this.allowPrivilegedContainer;
}
public T withAllowPrivilegedContainer( Boolean allowPrivilegedContainer){
this.allowPrivilegedContainer=allowPrivilegedContainer; return (T) this;
}
public T addToAllowedCapabilities( String ...items){
for (String item : items) {this.allowedCapabilities.add(item);} return (T)this;
}
public T removeFromAllowedCapabilities( String ...items){
for (String item : items) {this.allowedCapabilities.remove(item);} return (T)this;
}
public List getAllowedCapabilities(){
return this.allowedCapabilities;
}
public T withAllowedCapabilities( List allowedCapabilities){
this.allowedCapabilities.clear();if (allowedCapabilities != null) {for (String item : allowedCapabilities){this.addToAllowedCapabilities(item);}} return (T) this;
}
public T withAllowedCapabilities( String ...allowedCapabilities){
this.allowedCapabilities.clear(); if (allowedCapabilities != null) {for (String item :allowedCapabilities){ this.addToAllowedCapabilities(item);}} return (T) this;
}
public String getApiVersion(){
return this.apiVersion;
}
public T withApiVersion( String apiVersion){
this.apiVersion=apiVersion; return (T) this;
}
public T addToDefaultAddCapabilities( String ...items){
for (String item : items) {this.defaultAddCapabilities.add(item);} return (T)this;
}
public T removeFromDefaultAddCapabilities( String ...items){
for (String item : items) {this.defaultAddCapabilities.remove(item);} return (T)this;
}
public List getDefaultAddCapabilities(){
return this.defaultAddCapabilities;
}
public T withDefaultAddCapabilities( List defaultAddCapabilities){
this.defaultAddCapabilities.clear();if (defaultAddCapabilities != null) {for (String item : defaultAddCapabilities){this.addToDefaultAddCapabilities(item);}} return (T) this;
}
public T withDefaultAddCapabilities( String ...defaultAddCapabilities){
this.defaultAddCapabilities.clear(); if (defaultAddCapabilities != null) {for (String item :defaultAddCapabilities){ this.addToDefaultAddCapabilities(item);}} return (T) this;
}
public FSGroupStrategyOptions getFsGroup(){
return this.fsGroup!=null?this.fsGroup.build():null;
}
public T withFsGroup( FSGroupStrategyOptions fsGroup){
if (fsGroup!=null){ this.fsGroup= new FSGroupStrategyOptionsBuilder(fsGroup); _visitables.add(this.fsGroup);} return (T) this;
}
public FsGroupNested withNewFsGroup(){
return new FsGroupNestedImpl();
}
public FsGroupNested withNewFsGroupLike( FSGroupStrategyOptions item){
return new FsGroupNestedImpl(item);
}
public FsGroupNested editFsGroup(){
return withNewFsGroupLike(getFsGroup());
}
public T addToGroups( String ...items){
for (String item : items) {this.groups.add(item);} return (T)this;
}
public T removeFromGroups( String ...items){
for (String item : items) {this.groups.remove(item);} return (T)this;
}
public List getGroups(){
return this.groups;
}
public T withGroups( List groups){
this.groups.clear();if (groups != null) {for (String item : groups){this.addToGroups(item);}} return (T) this;
}
public T withGroups( String ...groups){
this.groups.clear(); if (groups != null) {for (String item :groups){ this.addToGroups(item);}} return (T) this;
}
public String getKind(){
return this.kind;
}
public T withKind( String kind){
this.kind=kind; return (T) this;
}
public ObjectMeta getMetadata(){
return this.metadata!=null?this.metadata.build():null;
}
public T withMetadata( ObjectMeta metadata){
if (metadata!=null){ this.metadata= new ObjectMetaBuilder(metadata); _visitables.add(this.metadata);} return (T) this;
}
public MetadataNested withNewMetadata(){
return new MetadataNestedImpl();
}
public MetadataNested withNewMetadataLike( ObjectMeta item){
return new MetadataNestedImpl(item);
}
public MetadataNested editMetadata(){
return withNewMetadataLike(getMetadata());
}
public Integer getPriority(){
return this.priority;
}
public T withPriority( Integer priority){
this.priority=priority; return (T) this;
}
public Boolean isReadOnlyRootFilesystem(){
return this.readOnlyRootFilesystem;
}
public T withReadOnlyRootFilesystem( Boolean readOnlyRootFilesystem){
this.readOnlyRootFilesystem=readOnlyRootFilesystem; return (T) this;
}
public T addToRequiredDropCapabilities( String ...items){
for (String item : items) {this.requiredDropCapabilities.add(item);} return (T)this;
}
public T removeFromRequiredDropCapabilities( String ...items){
for (String item : items) {this.requiredDropCapabilities.remove(item);} return (T)this;
}
public List getRequiredDropCapabilities(){
return this.requiredDropCapabilities;
}
public T withRequiredDropCapabilities( List requiredDropCapabilities){
this.requiredDropCapabilities.clear();if (requiredDropCapabilities != null) {for (String item : requiredDropCapabilities){this.addToRequiredDropCapabilities(item);}} return (T) this;
}
public T withRequiredDropCapabilities( String ...requiredDropCapabilities){
this.requiredDropCapabilities.clear(); if (requiredDropCapabilities != null) {for (String item :requiredDropCapabilities){ this.addToRequiredDropCapabilities(item);}} return (T) this;
}
public RunAsUserStrategyOptions getRunAsUser(){
return this.runAsUser!=null?this.runAsUser.build():null;
}
public T withRunAsUser( RunAsUserStrategyOptions runAsUser){
if (runAsUser!=null){ this.runAsUser= new RunAsUserStrategyOptionsBuilder(runAsUser); _visitables.add(this.runAsUser);} return (T) this;
}
public RunAsUserNested withNewRunAsUser(){
return new RunAsUserNestedImpl();
}
public RunAsUserNested withNewRunAsUserLike( RunAsUserStrategyOptions item){
return new RunAsUserNestedImpl(item);
}
public RunAsUserNested editRunAsUser(){
return withNewRunAsUserLike(getRunAsUser());
}
public T withNewRunAsUser( String type, Long uid, Long uidRangeMax, Long uidRangeMin){
return withRunAsUser(new RunAsUserStrategyOptions(type, uid, uidRangeMax, uidRangeMin));
}
public SELinuxContextStrategyOptions getSeLinuxContext(){
return this.seLinuxContext!=null?this.seLinuxContext.build():null;
}
public T withSeLinuxContext( SELinuxContextStrategyOptions seLinuxContext){
if (seLinuxContext!=null){ this.seLinuxContext= new SELinuxContextStrategyOptionsBuilder(seLinuxContext); _visitables.add(this.seLinuxContext);} return (T) this;
}
public SeLinuxContextNested withNewSeLinuxContext(){
return new SeLinuxContextNestedImpl();
}
public SeLinuxContextNested withNewSeLinuxContextLike( SELinuxContextStrategyOptions item){
return new SeLinuxContextNestedImpl(item);
}
public SeLinuxContextNested editSeLinuxContext(){
return withNewSeLinuxContextLike(getSeLinuxContext());
}
public SupplementalGroupsStrategyOptions getSupplementalGroups(){
return this.supplementalGroups!=null?this.supplementalGroups.build():null;
}
public T withSupplementalGroups( SupplementalGroupsStrategyOptions supplementalGroups){
if (supplementalGroups!=null){ this.supplementalGroups= new SupplementalGroupsStrategyOptionsBuilder(supplementalGroups); _visitables.add(this.supplementalGroups);} return (T) this;
}
public SupplementalGroupsNested withNewSupplementalGroups(){
return new SupplementalGroupsNestedImpl();
}
public SupplementalGroupsNested withNewSupplementalGroupsLike( SupplementalGroupsStrategyOptions item){
return new SupplementalGroupsNestedImpl(item);
}
public SupplementalGroupsNested editSupplementalGroups(){
return withNewSupplementalGroupsLike(getSupplementalGroups());
}
public T addToUsers( String ...items){
for (String item : items) {this.users.add(item);} return (T)this;
}
public T removeFromUsers( String ...items){
for (String item : items) {this.users.remove(item);} return (T)this;
}
public List getUsers(){
return this.users;
}
public T withUsers( List users){
this.users.clear();if (users != null) {for (String item : users){this.addToUsers(item);}} return (T) this;
}
public T withUsers( String ...users){
this.users.clear(); if (users != null) {for (String item :users){ this.addToUsers(item);}} return (T) this;
}
public T addToVolumes( String ...items){
for (String item : items) {this.volumes.add(item);} return (T)this;
}
public T removeFromVolumes( String ...items){
for (String item : items) {this.volumes.remove(item);} return (T)this;
}
public List getVolumes(){
return this.volumes;
}
public T withVolumes( List volumes){
this.volumes.clear();if (volumes != null) {for (String item : volumes){this.addToVolumes(item);}} return (T) this;
}
public T withVolumes( String ...volumes){
this.volumes.clear(); if (volumes != null) {for (String item :volumes){ this.addToVolumes(item);}} return (T) this;
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public T addToAdditionalProperties( Map map){
if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
}
public T removeFromAdditionalProperties( String key){
if(key != null) {this.additionalProperties.remove(key);} return (T)this;
}
public T removeFromAdditionalProperties( Map map){
if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} return (T)this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties( Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public boolean equals( Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SecurityContextConstraintsFluentImpl that = (SecurityContextConstraintsFluentImpl) o;
if (allowHostDirVolumePlugin != null ? !allowHostDirVolumePlugin.equals(that.allowHostDirVolumePlugin) :that.allowHostDirVolumePlugin != null) return false;
if (allowHostIPC != null ? !allowHostIPC.equals(that.allowHostIPC) :that.allowHostIPC != null) return false;
if (allowHostNetwork != null ? !allowHostNetwork.equals(that.allowHostNetwork) :that.allowHostNetwork != null) return false;
if (allowHostPID != null ? !allowHostPID.equals(that.allowHostPID) :that.allowHostPID != null) return false;
if (allowHostPorts != null ? !allowHostPorts.equals(that.allowHostPorts) :that.allowHostPorts != null) return false;
if (allowPrivilegedContainer != null ? !allowPrivilegedContainer.equals(that.allowPrivilegedContainer) :that.allowPrivilegedContainer != null) return false;
if (allowedCapabilities != null ? !allowedCapabilities.equals(that.allowedCapabilities) :that.allowedCapabilities != null) return false;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != 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 (groups != null ? !groups.equals(that.groups) :that.groups != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
if (priority != null ? !priority.equals(that.priority) :that.priority != 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 (seLinuxContext != null ? !seLinuxContext.equals(that.seLinuxContext) :that.seLinuxContext != null) return false;
if (supplementalGroups != null ? !supplementalGroups.equals(that.supplementalGroups) :that.supplementalGroups != null) return false;
if (users != null ? !users.equals(that.users) :that.users != null) return false;
if (volumes != null ? !volumes.equals(that.volumes) :that.volumes != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public class FsGroupNestedImpl extends FSGroupStrategyOptionsFluentImpl> implements FsGroupNested{
private final FSGroupStrategyOptionsBuilder builder;
FsGroupNestedImpl (){
this.builder = new FSGroupStrategyOptionsBuilder(this);
}
FsGroupNestedImpl ( FSGroupStrategyOptions item){
this.builder = new FSGroupStrategyOptionsBuilder(this, item);
}
public N and(){
return (N) SecurityContextConstraintsFluentImpl.this.withFsGroup(builder.build());
}
public N endFsGroup(){
return and();
}
}
public class MetadataNestedImpl extends ObjectMetaFluentImpl> implements MetadataNested{
private final ObjectMetaBuilder builder;
MetadataNestedImpl ( ObjectMeta item){
this.builder = new ObjectMetaBuilder(this, item);
}
MetadataNestedImpl (){
this.builder = new ObjectMetaBuilder(this);
}
public N and(){
return (N) SecurityContextConstraintsFluentImpl.this.withMetadata(builder.build());
}
public N endMetadata(){
return and();
}
}
public class RunAsUserNestedImpl extends RunAsUserStrategyOptionsFluentImpl> implements RunAsUserNested{
private final RunAsUserStrategyOptionsBuilder builder;
RunAsUserNestedImpl (){
this.builder = new RunAsUserStrategyOptionsBuilder(this);
}
RunAsUserNestedImpl ( RunAsUserStrategyOptions item){
this.builder = new RunAsUserStrategyOptionsBuilder(this, item);
}
public N endRunAsUser(){
return and();
}
public N and(){
return (N) SecurityContextConstraintsFluentImpl.this.withRunAsUser(builder.build());
}
}
public class SeLinuxContextNestedImpl extends SELinuxContextStrategyOptionsFluentImpl> implements SeLinuxContextNested{
private final SELinuxContextStrategyOptionsBuilder builder;
SeLinuxContextNestedImpl (){
this.builder = new SELinuxContextStrategyOptionsBuilder(this);
}
SeLinuxContextNestedImpl ( SELinuxContextStrategyOptions item){
this.builder = new SELinuxContextStrategyOptionsBuilder(this, item);
}
public N and(){
return (N) SecurityContextConstraintsFluentImpl.this.withSeLinuxContext(builder.build());
}
public N endSeLinuxContext(){
return and();
}
}
public class SupplementalGroupsNestedImpl extends SupplementalGroupsStrategyOptionsFluentImpl> implements SupplementalGroupsNested{
private final SupplementalGroupsStrategyOptionsBuilder builder;
SupplementalGroupsNestedImpl (){
this.builder = new SupplementalGroupsStrategyOptionsBuilder(this);
}
SupplementalGroupsNestedImpl ( SupplementalGroupsStrategyOptions item){
this.builder = new SupplementalGroupsStrategyOptionsBuilder(this, item);
}
public N and(){
return (N) SecurityContextConstraintsFluentImpl.this.withSupplementalGroups(builder.build());
}
public N endSupplementalGroups(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy