
io.kubernetes.client.openapi.models.V1CSIPersistentVolumeSourceFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import java.lang.StringBuilder;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Boolean;
import java.lang.StringBuffer;
import java.lang.Object;
import java.util.Map;
public class V1CSIPersistentVolumeSourceFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1CSIPersistentVolumeSourceFluent {
private V1SecretReferenceBuilder controllerExpandSecretRef;
private V1SecretReferenceBuilder controllerPublishSecretRef;
private String driver;
private String fsType;
private V1SecretReferenceBuilder nodePublishSecretRef;
private V1SecretReferenceBuilder nodeStageSecretRef;
private Boolean readOnly;
private Map volumeAttributes;
private String volumeHandle;
public V1CSIPersistentVolumeSourceFluentImpl() {
}
public V1CSIPersistentVolumeSourceFluentImpl(V1CSIPersistentVolumeSource instance) {
this.withControllerExpandSecretRef(instance.getControllerExpandSecretRef());
this.withControllerPublishSecretRef(instance.getControllerPublishSecretRef());
this.withDriver(instance.getDriver());
this.withFsType(instance.getFsType());
this.withNodePublishSecretRef(instance.getNodePublishSecretRef());
this.withNodeStageSecretRef(instance.getNodeStageSecretRef());
this.withReadOnly(instance.getReadOnly());
this.withVolumeAttributes(instance.getVolumeAttributes());
this.withVolumeHandle(instance.getVolumeHandle());
}
/**
* This method has been deprecated, please use method buildControllerExpandSecretRef instead.
* @return The buildable object.
*/
@Deprecated public V1SecretReference getControllerExpandSecretRef() {
return this.controllerExpandSecretRef!=null?this.controllerExpandSecretRef.build():null;
}
public V1SecretReference buildControllerExpandSecretRef() {
return this.controllerExpandSecretRef!=null?this.controllerExpandSecretRef.build():null;
}
public A withControllerExpandSecretRef(V1SecretReference controllerExpandSecretRef) {
_visitables.get("controllerExpandSecretRef").remove(this.controllerExpandSecretRef);
if (controllerExpandSecretRef!=null){ this.controllerExpandSecretRef= new V1SecretReferenceBuilder(controllerExpandSecretRef); _visitables.get("controllerExpandSecretRef").add(this.controllerExpandSecretRef);} return (A) this;
}
public Boolean hasControllerExpandSecretRef() {
return this.controllerExpandSecretRef != null;
}
public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested withNewControllerExpandSecretRef() {
return new ControllerExpandSecretRefNestedImpl();
}
public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested withNewControllerExpandSecretRefLike(V1SecretReference item) {
return new ControllerExpandSecretRefNestedImpl(item);
}
public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested editControllerExpandSecretRef() {
return withNewControllerExpandSecretRefLike(getControllerExpandSecretRef());
}
public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested editOrNewControllerExpandSecretRef() {
return withNewControllerExpandSecretRefLike(getControllerExpandSecretRef() != null ? getControllerExpandSecretRef(): new V1SecretReferenceBuilder().build());
}
public V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested editOrNewControllerExpandSecretRefLike(V1SecretReference item) {
return withNewControllerExpandSecretRefLike(getControllerExpandSecretRef() != null ? getControllerExpandSecretRef(): item);
}
/**
* This method has been deprecated, please use method buildControllerPublishSecretRef instead.
* @return The buildable object.
*/
@Deprecated public V1SecretReference getControllerPublishSecretRef() {
return this.controllerPublishSecretRef!=null?this.controllerPublishSecretRef.build():null;
}
public V1SecretReference buildControllerPublishSecretRef() {
return this.controllerPublishSecretRef!=null?this.controllerPublishSecretRef.build():null;
}
public A withControllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) {
_visitables.get("controllerPublishSecretRef").remove(this.controllerPublishSecretRef);
if (controllerPublishSecretRef!=null){ this.controllerPublishSecretRef= new V1SecretReferenceBuilder(controllerPublishSecretRef); _visitables.get("controllerPublishSecretRef").add(this.controllerPublishSecretRef);} return (A) this;
}
public Boolean hasControllerPublishSecretRef() {
return this.controllerPublishSecretRef != null;
}
public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested withNewControllerPublishSecretRef() {
return new ControllerPublishSecretRefNestedImpl();
}
public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested withNewControllerPublishSecretRefLike(V1SecretReference item) {
return new ControllerPublishSecretRefNestedImpl(item);
}
public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested editControllerPublishSecretRef() {
return withNewControllerPublishSecretRefLike(getControllerPublishSecretRef());
}
public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested editOrNewControllerPublishSecretRef() {
return withNewControllerPublishSecretRefLike(getControllerPublishSecretRef() != null ? getControllerPublishSecretRef(): new V1SecretReferenceBuilder().build());
}
public V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested editOrNewControllerPublishSecretRefLike(V1SecretReference item) {
return withNewControllerPublishSecretRefLike(getControllerPublishSecretRef() != null ? getControllerPublishSecretRef(): item);
}
public String getDriver() {
return this.driver;
}
public A withDriver(String driver) {
this.driver=driver; return (A) this;
}
public Boolean hasDriver() {
return this.driver != null;
}
public A withNewDriver(String arg1) {
return (A)withDriver(new String(arg1));
}
public A withNewDriver(StringBuilder arg1) {
return (A)withDriver(new String(arg1));
}
public A withNewDriver(StringBuffer arg1) {
return (A)withDriver(new String(arg1));
}
public String getFsType() {
return this.fsType;
}
public A withFsType(String fsType) {
this.fsType=fsType; return (A) this;
}
public Boolean hasFsType() {
return this.fsType != null;
}
public A withNewFsType(String arg1) {
return (A)withFsType(new String(arg1));
}
public A withNewFsType(StringBuilder arg1) {
return (A)withFsType(new String(arg1));
}
public A withNewFsType(StringBuffer arg1) {
return (A)withFsType(new String(arg1));
}
/**
* This method has been deprecated, please use method buildNodePublishSecretRef instead.
* @return The buildable object.
*/
@Deprecated public V1SecretReference getNodePublishSecretRef() {
return this.nodePublishSecretRef!=null?this.nodePublishSecretRef.build():null;
}
public V1SecretReference buildNodePublishSecretRef() {
return this.nodePublishSecretRef!=null?this.nodePublishSecretRef.build():null;
}
public A withNodePublishSecretRef(V1SecretReference nodePublishSecretRef) {
_visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef);
if (nodePublishSecretRef!=null){ this.nodePublishSecretRef= new V1SecretReferenceBuilder(nodePublishSecretRef); _visitables.get("nodePublishSecretRef").add(this.nodePublishSecretRef);} return (A) this;
}
public Boolean hasNodePublishSecretRef() {
return this.nodePublishSecretRef != null;
}
public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRef() {
return new NodePublishSecretRefNestedImpl();
}
public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRefLike(V1SecretReference item) {
return new NodePublishSecretRefNestedImpl(item);
}
public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested editNodePublishSecretRef() {
return withNewNodePublishSecretRefLike(getNodePublishSecretRef());
}
public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRef() {
return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): new V1SecretReferenceBuilder().build());
}
public V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(V1SecretReference item) {
return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): item);
}
/**
* This method has been deprecated, please use method buildNodeStageSecretRef instead.
* @return The buildable object.
*/
@Deprecated public V1SecretReference getNodeStageSecretRef() {
return this.nodeStageSecretRef!=null?this.nodeStageSecretRef.build():null;
}
public V1SecretReference buildNodeStageSecretRef() {
return this.nodeStageSecretRef!=null?this.nodeStageSecretRef.build():null;
}
public A withNodeStageSecretRef(V1SecretReference nodeStageSecretRef) {
_visitables.get("nodeStageSecretRef").remove(this.nodeStageSecretRef);
if (nodeStageSecretRef!=null){ this.nodeStageSecretRef= new V1SecretReferenceBuilder(nodeStageSecretRef); _visitables.get("nodeStageSecretRef").add(this.nodeStageSecretRef);} return (A) this;
}
public Boolean hasNodeStageSecretRef() {
return this.nodeStageSecretRef != null;
}
public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested withNewNodeStageSecretRef() {
return new NodeStageSecretRefNestedImpl();
}
public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested withNewNodeStageSecretRefLike(V1SecretReference item) {
return new NodeStageSecretRefNestedImpl(item);
}
public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested editNodeStageSecretRef() {
return withNewNodeStageSecretRefLike(getNodeStageSecretRef());
}
public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested editOrNewNodeStageSecretRef() {
return withNewNodeStageSecretRefLike(getNodeStageSecretRef() != null ? getNodeStageSecretRef(): new V1SecretReferenceBuilder().build());
}
public V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested editOrNewNodeStageSecretRefLike(V1SecretReference item) {
return withNewNodeStageSecretRefLike(getNodeStageSecretRef() != null ? getNodeStageSecretRef(): item);
}
public Boolean isReadOnly() {
return this.readOnly;
}
public A withReadOnly(Boolean readOnly) {
this.readOnly=readOnly; return (A) this;
}
public Boolean hasReadOnly() {
return this.readOnly != null;
}
public A withNewReadOnly(String arg1) {
return (A)withReadOnly(new Boolean(arg1));
}
public A withNewReadOnly(boolean arg1) {
return (A)withReadOnly(new Boolean(arg1));
}
public A addToVolumeAttributes(String key,String value) {
if(this.volumeAttributes == null && key != null && value != null) { this.volumeAttributes = new LinkedHashMap(); }
if(key != null && value != null) {this.volumeAttributes.put(key, value);} return (A)this;
}
public A addToVolumeAttributes(Map map) {
if(this.volumeAttributes == null && map != null) { this.volumeAttributes = new LinkedHashMap(); }
if(map != null) { this.volumeAttributes.putAll(map);} return (A)this;
}
public A removeFromVolumeAttributes(String key) {
if(this.volumeAttributes == null) { return (A) this; }
if(key != null && this.volumeAttributes != null) {this.volumeAttributes.remove(key);} return (A)this;
}
public A removeFromVolumeAttributes(Map map) {
if(this.volumeAttributes == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.volumeAttributes != null){this.volumeAttributes.remove(key);}}} return (A)this;
}
public Map getVolumeAttributes() {
return this.volumeAttributes;
}
public A withVolumeAttributes(Map volumeAttributes) {
if (volumeAttributes == null) { this.volumeAttributes = null;} else {this.volumeAttributes = new LinkedHashMap(volumeAttributes);} return (A) this;
}
public Boolean hasVolumeAttributes() {
return this.volumeAttributes != null;
}
public String getVolumeHandle() {
return this.volumeHandle;
}
public A withVolumeHandle(String volumeHandle) {
this.volumeHandle=volumeHandle; return (A) this;
}
public Boolean hasVolumeHandle() {
return this.volumeHandle != null;
}
public A withNewVolumeHandle(String arg1) {
return (A)withVolumeHandle(new String(arg1));
}
public A withNewVolumeHandle(StringBuilder arg1) {
return (A)withVolumeHandle(new String(arg1));
}
public A withNewVolumeHandle(StringBuffer arg1) {
return (A)withVolumeHandle(new String(arg1));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
V1CSIPersistentVolumeSourceFluentImpl that = (V1CSIPersistentVolumeSourceFluentImpl) o;
if (controllerExpandSecretRef != null ? !controllerExpandSecretRef.equals(that.controllerExpandSecretRef) :that.controllerExpandSecretRef != null) return false;
if (controllerPublishSecretRef != null ? !controllerPublishSecretRef.equals(that.controllerPublishSecretRef) :that.controllerPublishSecretRef != null) return false;
if (driver != null ? !driver.equals(that.driver) :that.driver != null) return false;
if (fsType != null ? !fsType.equals(that.fsType) :that.fsType != null) return false;
if (nodePublishSecretRef != null ? !nodePublishSecretRef.equals(that.nodePublishSecretRef) :that.nodePublishSecretRef != null) return false;
if (nodeStageSecretRef != null ? !nodeStageSecretRef.equals(that.nodeStageSecretRef) :that.nodeStageSecretRef != null) return false;
if (readOnly != null ? !readOnly.equals(that.readOnly) :that.readOnly != null) return false;
if (volumeAttributes != null ? !volumeAttributes.equals(that.volumeAttributes) :that.volumeAttributes != null) return false;
if (volumeHandle != null ? !volumeHandle.equals(that.volumeHandle) :that.volumeHandle != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(controllerExpandSecretRef, controllerPublishSecretRef, driver, fsType, nodePublishSecretRef, nodeStageSecretRef, readOnly, volumeAttributes, volumeHandle, super.hashCode());
}
public class ControllerExpandSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluent.ControllerExpandSecretRefNested,io.kubernetes.client.fluent.Nested {
private final V1SecretReferenceBuilder builder;
ControllerExpandSecretRefNestedImpl(V1SecretReference item) {
this.builder = new V1SecretReferenceBuilder(this, item);
}
ControllerExpandSecretRefNestedImpl() {
this.builder = new V1SecretReferenceBuilder(this);
}
public N and() {
return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withControllerExpandSecretRef(builder.build());
}
public N endControllerExpandSecretRef() {
return and();
}
}
public class ControllerPublishSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluent.ControllerPublishSecretRefNested,io.kubernetes.client.fluent.Nested {
private final V1SecretReferenceBuilder builder;
ControllerPublishSecretRefNestedImpl(V1SecretReference item) {
this.builder = new V1SecretReferenceBuilder(this, item);
}
ControllerPublishSecretRefNestedImpl() {
this.builder = new V1SecretReferenceBuilder(this);
}
public N and() {
return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withControllerPublishSecretRef(builder.build());
}
public N endControllerPublishSecretRef() {
return and();
}
}
public class NodePublishSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluent.NodePublishSecretRefNested,io.kubernetes.client.fluent.Nested {
private final V1SecretReferenceBuilder builder;
NodePublishSecretRefNestedImpl(V1SecretReference item) {
this.builder = new V1SecretReferenceBuilder(this, item);
}
NodePublishSecretRefNestedImpl() {
this.builder = new V1SecretReferenceBuilder(this);
}
public N and() {
return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withNodePublishSecretRef(builder.build());
}
public N endNodePublishSecretRef() {
return and();
}
}
public class NodeStageSecretRefNestedImpl extends V1SecretReferenceFluentImpl> implements V1CSIPersistentVolumeSourceFluent.NodeStageSecretRefNested,io.kubernetes.client.fluent.Nested {
private final V1SecretReferenceBuilder builder;
NodeStageSecretRefNestedImpl(V1SecretReference item) {
this.builder = new V1SecretReferenceBuilder(this, item);
}
NodeStageSecretRefNestedImpl() {
this.builder = new V1SecretReferenceBuilder(this);
}
public N and() {
return (N) V1CSIPersistentVolumeSourceFluentImpl.this.withNodeStageSecretRef(builder.build());
}
public N endNodeStageSecretRef() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy