
io.fabric8.kubernetes.api.model.EnvFromSourceFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
public class EnvFromSourceFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.EnvFromSourceFluent{
public EnvFromSourceFluentImpl() {
}
public EnvFromSourceFluentImpl(io.fabric8.kubernetes.api.model.EnvFromSource instance) {
this.withConfigMapRef(instance.getConfigMapRef());
this.withPrefix(instance.getPrefix());
this.withSecretRef(instance.getSecretRef());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder configMapRef;
private java.lang.String prefix;
private io.fabric8.kubernetes.api.model.SecretEnvSourceBuilder secretRef;
private java.util.Map additionalProperties;
/**
* This method has been deprecated, please use method buildConfigMapRef instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.kubernetes.api.model.ConfigMapEnvSource getConfigMapRef() {
return this.configMapRef!=null?this.configMapRef.build():null;
}
public io.fabric8.kubernetes.api.model.ConfigMapEnvSource buildConfigMapRef() {
return this.configMapRef!=null?this.configMapRef.build():null;
}
public A withConfigMapRef(io.fabric8.kubernetes.api.model.ConfigMapEnvSource configMapRef) {
_visitables.get("configMapRef").remove(this.configMapRef);
if (configMapRef!=null){ this.configMapRef= new io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder(configMapRef); _visitables.get("configMapRef").add(this.configMapRef);} return (A) this;
}
public java.lang.Boolean hasConfigMapRef() {
return this.configMapRef != null;
}
public A withNewConfigMapRef(java.lang.String name,java.lang.Boolean optional) {
return (A)withConfigMapRef(new ConfigMapEnvSource(name, optional));
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.ConfigMapRefNested withNewConfigMapRef() {
return new io.fabric8.kubernetes.api.model.EnvFromSourceFluentImpl.ConfigMapRefNestedImpl();
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.ConfigMapRefNested withNewConfigMapRefLike(io.fabric8.kubernetes.api.model.ConfigMapEnvSource item) {
return new io.fabric8.kubernetes.api.model.EnvFromSourceFluentImpl.ConfigMapRefNestedImpl(item);
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.ConfigMapRefNested editConfigMapRef() {
return withNewConfigMapRefLike(getConfigMapRef());
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.ConfigMapRefNested editOrNewConfigMapRef() {
return withNewConfigMapRefLike(getConfigMapRef() != null ? getConfigMapRef(): new io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder().build());
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.ConfigMapRefNested editOrNewConfigMapRefLike(io.fabric8.kubernetes.api.model.ConfigMapEnvSource item) {
return withNewConfigMapRefLike(getConfigMapRef() != null ? getConfigMapRef(): item);
}
public java.lang.String getPrefix() {
return this.prefix;
}
public A withPrefix(java.lang.String prefix) {
this.prefix=prefix; return (A) this;
}
public java.lang.Boolean hasPrefix() {
return this.prefix != null;
}
/**
* Method is deprecated. use withPrefix instead.
*/
@java.lang.Deprecated
public A withNewPrefix(java.lang.String arg0) {
return (A)withPrefix(new String(arg0));
}
/**
* This method has been deprecated, please use method buildSecretRef instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.kubernetes.api.model.SecretEnvSource getSecretRef() {
return this.secretRef!=null?this.secretRef.build():null;
}
public io.fabric8.kubernetes.api.model.SecretEnvSource buildSecretRef() {
return this.secretRef!=null?this.secretRef.build():null;
}
public A withSecretRef(io.fabric8.kubernetes.api.model.SecretEnvSource secretRef) {
_visitables.get("secretRef").remove(this.secretRef);
if (secretRef!=null){ this.secretRef= new io.fabric8.kubernetes.api.model.SecretEnvSourceBuilder(secretRef); _visitables.get("secretRef").add(this.secretRef);} return (A) this;
}
public java.lang.Boolean hasSecretRef() {
return this.secretRef != null;
}
public A withNewSecretRef(java.lang.String name,java.lang.Boolean optional) {
return (A)withSecretRef(new SecretEnvSource(name, optional));
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.SecretRefNested withNewSecretRef() {
return new io.fabric8.kubernetes.api.model.EnvFromSourceFluentImpl.SecretRefNestedImpl();
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.SecretRefNested withNewSecretRefLike(io.fabric8.kubernetes.api.model.SecretEnvSource item) {
return new io.fabric8.kubernetes.api.model.EnvFromSourceFluentImpl.SecretRefNestedImpl(item);
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.SecretRefNested editSecretRef() {
return withNewSecretRefLike(getSecretRef());
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.SecretRefNested editOrNewSecretRef() {
return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): new io.fabric8.kubernetes.api.model.SecretEnvSourceBuilder().build());
}
public io.fabric8.kubernetes.api.model.EnvFromSourceFluent.SecretRefNested editOrNewSecretRefLike(io.fabric8.kubernetes.api.model.SecretEnvSource item) {
return withNewSecretRefLike(getSecretRef() != null ? getSecretRef(): item);
}
public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
}
public A addToAdditionalProperties(java.util.Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(java.lang.String key) {
if(this.additionalProperties == null) { return (A) this; }
if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
}
public A removeFromAdditionalProperties(java.util.Map map) {
if(this.additionalProperties == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
}
public java.util.Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(java.util.Map additionalProperties) {
if (additionalProperties == null) { this.additionalProperties = null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
}
public java.lang.Boolean hasAdditionalProperties() {
return this.additionalProperties != null;
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EnvFromSourceFluentImpl that = (EnvFromSourceFluentImpl) o;
if (configMapRef != null ? !configMapRef.equals(that.configMapRef) :that.configMapRef != null) return false;
if (prefix != null ? !prefix.equals(that.prefix) :that.prefix != null) return false;
if (secretRef != null ? !secretRef.equals(that.secretRef) :that.secretRef != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(configMapRef, prefix, secretRef, additionalProperties, super.hashCode());
}
public class ConfigMapRefNestedImpl extends io.fabric8.kubernetes.api.model.ConfigMapEnvSourceFluentImpl> implements io.fabric8.kubernetes.api.model.EnvFromSourceFluent.ConfigMapRefNested,io.fabric8.kubernetes.api.builder.Nested{
ConfigMapRefNestedImpl(io.fabric8.kubernetes.api.model.ConfigMapEnvSource item) {
this.builder = new io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder(this, item);
}
ConfigMapRefNestedImpl() {
this.builder = new io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder(this);
}
io.fabric8.kubernetes.api.model.ConfigMapEnvSourceBuilder builder;
public N and() {
return (N) EnvFromSourceFluentImpl.this.withConfigMapRef(builder.build());
}
public N endConfigMapRef() {
return and();
}
}
public class SecretRefNestedImpl extends io.fabric8.kubernetes.api.model.SecretEnvSourceFluentImpl> implements io.fabric8.kubernetes.api.model.EnvFromSourceFluent.SecretRefNested,io.fabric8.kubernetes.api.builder.Nested{
SecretRefNestedImpl(io.fabric8.kubernetes.api.model.SecretEnvSource item) {
this.builder = new io.fabric8.kubernetes.api.model.SecretEnvSourceBuilder(this, item);
}
SecretRefNestedImpl() {
this.builder = new io.fabric8.kubernetes.api.model.SecretEnvSourceBuilder(this);
}
io.fabric8.kubernetes.api.model.SecretEnvSourceBuilder builder;
public N and() {
return (N) EnvFromSourceFluentImpl.this.withSecretRef(builder.build());
}
public N endSecretRef() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy