io.dekorate.servicebinding.model.ValueFromFluentImpl Maven / Gradle / Ivy
package io.dekorate.servicebinding.model;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import java.lang.Object;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class ValueFromFluentImpl> extends BaseFluent implements ValueFromFluent{
public ValueFromFluentImpl() {
}
public ValueFromFluentImpl(ValueFrom instance) {
this.withConfigMapKeyRef(instance.getConfigMapKeyRef());
this.withSecretKeyRef(instance.getSecretKeyRef());
this.withFieldRef(instance.getFieldRef());
this.withResourceFieldRef(instance.getResourceFieldRef());
}
private ConfigMapKeyRefBuilder configMapKeyRef;
private FieldRefBuilder fieldRef;
private ResourceFieldRefBuilder resourceFieldRef;
private SecretKeyRefBuilder secretKeyRef;
/**
* This method has been deprecated, please use method buildConfigMapKeyRef instead.
* @return The buildable object.
*/
@Deprecated
public ConfigMapKeyRef getConfigMapKeyRef() {
return this.configMapKeyRef!=null ?this.configMapKeyRef.build():null;
}
public ConfigMapKeyRef buildConfigMapKeyRef() {
return this.configMapKeyRef!=null ?this.configMapKeyRef.build():null;
}
public A withConfigMapKeyRef(ConfigMapKeyRef configMapKeyRef) {
_visitables.get("configMapKeyRef").remove(this.configMapKeyRef);
if (configMapKeyRef!=null){ this.configMapKeyRef= new ConfigMapKeyRefBuilder(configMapKeyRef); _visitables.get("configMapKeyRef").add(this.configMapKeyRef);} else { this.configMapKeyRef = null; _visitables.get("configMapKeyRef").remove(this.configMapKeyRef); } return (A) this;
}
public Boolean hasConfigMapKeyRef() {
return this.configMapKeyRef != null;
}
public A withNewConfigMapKeyRef(String key,String name,boolean optional) {
return (A)withConfigMapKeyRef(new ConfigMapKeyRef(key, name, optional));
}
public ValueFromFluent.ConfigMapKeyRefNested withNewConfigMapKeyRef() {
return new ValueFromFluentImpl.ConfigMapKeyRefNestedImpl();
}
public ValueFromFluent.ConfigMapKeyRefNested withNewConfigMapKeyRefLike(ConfigMapKeyRef item) {
return new ValueFromFluentImpl.ConfigMapKeyRefNestedImpl(item);
}
public ValueFromFluent.ConfigMapKeyRefNested editConfigMapKeyRef() {
return withNewConfigMapKeyRefLike(getConfigMapKeyRef());
}
public ValueFromFluent.ConfigMapKeyRefNested editOrNewConfigMapKeyRef() {
return withNewConfigMapKeyRefLike(getConfigMapKeyRef() != null ? getConfigMapKeyRef(): new ConfigMapKeyRefBuilder().build());
}
public ValueFromFluent.ConfigMapKeyRefNested editOrNewConfigMapKeyRefLike(ConfigMapKeyRef item) {
return withNewConfigMapKeyRefLike(getConfigMapKeyRef() != null ? getConfigMapKeyRef(): item);
}
/**
* This method has been deprecated, please use method buildFieldRef instead.
* @return The buildable object.
*/
@Deprecated
public FieldRef getFieldRef() {
return this.fieldRef!=null ?this.fieldRef.build():null;
}
public FieldRef buildFieldRef() {
return this.fieldRef!=null ?this.fieldRef.build():null;
}
public A withFieldRef(FieldRef fieldRef) {
_visitables.get("fieldRef").remove(this.fieldRef);
if (fieldRef!=null){ this.fieldRef= new FieldRefBuilder(fieldRef); _visitables.get("fieldRef").add(this.fieldRef);} else { this.fieldRef = null; _visitables.get("fieldRef").remove(this.fieldRef); } return (A) this;
}
public Boolean hasFieldRef() {
return this.fieldRef != null;
}
public A withNewFieldRef(String apiVersion,String fieldPath) {
return (A)withFieldRef(new FieldRef(apiVersion, fieldPath));
}
public ValueFromFluent.FieldRefNested withNewFieldRef() {
return new ValueFromFluentImpl.FieldRefNestedImpl();
}
public ValueFromFluent.FieldRefNested withNewFieldRefLike(FieldRef item) {
return new ValueFromFluentImpl.FieldRefNestedImpl(item);
}
public ValueFromFluent.FieldRefNested editFieldRef() {
return withNewFieldRefLike(getFieldRef());
}
public ValueFromFluent.FieldRefNested editOrNewFieldRef() {
return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): new FieldRefBuilder().build());
}
public ValueFromFluent.FieldRefNested editOrNewFieldRefLike(FieldRef item) {
return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): item);
}
/**
* This method has been deprecated, please use method buildResourceFieldRef instead.
* @return The buildable object.
*/
@Deprecated
public ResourceFieldRef getResourceFieldRef() {
return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null;
}
public ResourceFieldRef buildResourceFieldRef() {
return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null;
}
public A withResourceFieldRef(ResourceFieldRef resourceFieldRef) {
_visitables.get("resourceFieldRef").remove(this.resourceFieldRef);
if (resourceFieldRef!=null){ this.resourceFieldRef= new ResourceFieldRefBuilder(resourceFieldRef); _visitables.get("resourceFieldRef").add(this.resourceFieldRef);} else { this.resourceFieldRef = null; _visitables.get("resourceFieldRef").remove(this.resourceFieldRef); } return (A) this;
}
public Boolean hasResourceFieldRef() {
return this.resourceFieldRef != null;
}
public A withNewResourceFieldRef(String containerName,String divisor,String resource) {
return (A)withResourceFieldRef(new ResourceFieldRef(containerName, divisor, resource));
}
public ValueFromFluent.ResourceFieldRefNested withNewResourceFieldRef() {
return new ValueFromFluentImpl.ResourceFieldRefNestedImpl();
}
public ValueFromFluent.ResourceFieldRefNested withNewResourceFieldRefLike(ResourceFieldRef item) {
return new ValueFromFluentImpl.ResourceFieldRefNestedImpl(item);
}
public ValueFromFluent.ResourceFieldRefNested editResourceFieldRef() {
return withNewResourceFieldRefLike(getResourceFieldRef());
}
public ValueFromFluent.ResourceFieldRefNested editOrNewResourceFieldRef() {
return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): new ResourceFieldRefBuilder().build());
}
public ValueFromFluent.ResourceFieldRefNested editOrNewResourceFieldRefLike(ResourceFieldRef item) {
return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): item);
}
/**
* This method has been deprecated, please use method buildSecretKeyRef instead.
* @return The buildable object.
*/
@Deprecated
public SecretKeyRef getSecretKeyRef() {
return this.secretKeyRef!=null ?this.secretKeyRef.build():null;
}
public SecretKeyRef buildSecretKeyRef() {
return this.secretKeyRef!=null ?this.secretKeyRef.build():null;
}
public A withSecretKeyRef(SecretKeyRef secretKeyRef) {
_visitables.get("secretKeyRef").remove(this.secretKeyRef);
if (secretKeyRef!=null){ this.secretKeyRef= new SecretKeyRefBuilder(secretKeyRef); _visitables.get("secretKeyRef").add(this.secretKeyRef);} else { this.secretKeyRef = null; _visitables.get("secretKeyRef").remove(this.secretKeyRef); } return (A) this;
}
public Boolean hasSecretKeyRef() {
return this.secretKeyRef != null;
}
public A withNewSecretKeyRef(String key,String name,boolean optional) {
return (A)withSecretKeyRef(new SecretKeyRef(key, name, optional));
}
public ValueFromFluent.SecretKeyRefNested withNewSecretKeyRef() {
return new ValueFromFluentImpl.SecretKeyRefNestedImpl();
}
public ValueFromFluent.SecretKeyRefNested withNewSecretKeyRefLike(SecretKeyRef item) {
return new ValueFromFluentImpl.SecretKeyRefNestedImpl(item);
}
public ValueFromFluent.SecretKeyRefNested editSecretKeyRef() {
return withNewSecretKeyRefLike(getSecretKeyRef());
}
public ValueFromFluent.SecretKeyRefNested editOrNewSecretKeyRef() {
return withNewSecretKeyRefLike(getSecretKeyRef() != null ? getSecretKeyRef(): new SecretKeyRefBuilder().build());
}
public ValueFromFluent.SecretKeyRefNested editOrNewSecretKeyRefLike(SecretKeyRef item) {
return withNewSecretKeyRefLike(getSecretKeyRef() != null ? getSecretKeyRef(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ValueFromFluentImpl that = (ValueFromFluentImpl) o;
if (configMapKeyRef != null ? !configMapKeyRef.equals(that.configMapKeyRef) :that.configMapKeyRef != null) return false;
if (fieldRef != null ? !fieldRef.equals(that.fieldRef) :that.fieldRef != null) return false;
if (resourceFieldRef != null ? !resourceFieldRef.equals(that.resourceFieldRef) :that.resourceFieldRef != null) return false;
if (secretKeyRef != null ? !secretKeyRef.equals(that.secretKeyRef) :that.secretKeyRef != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(configMapKeyRef, fieldRef, resourceFieldRef, secretKeyRef, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (configMapKeyRef != null) { sb.append("configMapKeyRef:"); sb.append(configMapKeyRef + ","); }
if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); }
if (resourceFieldRef != null) { sb.append("resourceFieldRef:"); sb.append(resourceFieldRef + ","); }
if (secretKeyRef != null) { sb.append("secretKeyRef:"); sb.append(secretKeyRef); }
sb.append("}");
return sb.toString();
}
class ConfigMapKeyRefNestedImpl extends ConfigMapKeyRefFluentImpl> implements ValueFromFluent.ConfigMapKeyRefNested,Nested{
ConfigMapKeyRefNestedImpl(ConfigMapKeyRef item) {
this.builder = new ConfigMapKeyRefBuilder(this, item);
}
ConfigMapKeyRefNestedImpl() {
this.builder = new ConfigMapKeyRefBuilder(this);
}
ConfigMapKeyRefBuilder builder;
public N and() {
return (N) ValueFromFluentImpl.this.withConfigMapKeyRef(builder.build());
}
public N endConfigMapKeyRef() {
return and();
}
}
class FieldRefNestedImpl extends FieldRefFluentImpl> implements ValueFromFluent.FieldRefNested,Nested{
FieldRefNestedImpl(FieldRef item) {
this.builder = new FieldRefBuilder(this, item);
}
FieldRefNestedImpl() {
this.builder = new FieldRefBuilder(this);
}
FieldRefBuilder builder;
public N and() {
return (N) ValueFromFluentImpl.this.withFieldRef(builder.build());
}
public N endFieldRef() {
return and();
}
}
class ResourceFieldRefNestedImpl extends ResourceFieldRefFluentImpl> implements ValueFromFluent.ResourceFieldRefNested,Nested{
ResourceFieldRefNestedImpl(ResourceFieldRef item) {
this.builder = new ResourceFieldRefBuilder(this, item);
}
ResourceFieldRefNestedImpl() {
this.builder = new ResourceFieldRefBuilder(this);
}
ResourceFieldRefBuilder builder;
public N and() {
return (N) ValueFromFluentImpl.this.withResourceFieldRef(builder.build());
}
public N endResourceFieldRef() {
return and();
}
}
class SecretKeyRefNestedImpl extends SecretKeyRefFluentImpl> implements ValueFromFluent.SecretKeyRefNested,Nested{
SecretKeyRefNestedImpl(SecretKeyRef item) {
this.builder = new SecretKeyRefBuilder(this, item);
}
SecretKeyRefNestedImpl() {
this.builder = new SecretKeyRefBuilder(this);
}
SecretKeyRefBuilder builder;
public N and() {
return (N) ValueFromFluentImpl.this.withSecretKeyRef(builder.build());
}
public N endSecretKeyRef() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy