io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model.installer.gcp.v1;
import java.lang.SuppressWarnings;
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
*/
@SuppressWarnings(value = "unchecked")
public class EncryptionKeyReferenceFluentImpl> extends BaseFluent implements EncryptionKeyReferenceFluent{
public EncryptionKeyReferenceFluentImpl() {
}
public EncryptionKeyReferenceFluentImpl(io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReference instance) {
this.withKmsKey(instance.getKmsKey());
this.withKmsKeyServiceAccount(instance.getKmsKeyServiceAccount());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private KMSKeyReferenceBuilder kmsKey;
private String kmsKeyServiceAccount;
private Map additionalProperties;
/**
* This method has been deprecated, please use method buildKmsKey instead.
* @return The buildable object.
*/
@Deprecated
public KMSKeyReference getKmsKey() {
return this.kmsKey!=null ?this.kmsKey.build():null;
}
public io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReference buildKmsKey() {
return this.kmsKey!=null ?this.kmsKey.build():null;
}
public A withKmsKey(io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReference kmsKey) {
_visitables.get("kmsKey").remove(this.kmsKey);
if (kmsKey!=null){ this.kmsKey= new io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReferenceBuilder(kmsKey); _visitables.get("kmsKey").add(this.kmsKey);} return (A) this;
}
public Boolean hasKmsKey() {
return this.kmsKey != null;
}
public A withNewKmsKey(java.lang.String keyRing,java.lang.String location,java.lang.String name,java.lang.String projectID) {
return (A)withKmsKey(new KMSKeyReference(keyRing, location, name, projectID));
}
public EncryptionKeyReferenceFluent.KmsKeyNested withNewKmsKey() {
return new EncryptionKeyReferenceFluentImpl.KmsKeyNestedImpl();
}
public io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceFluent.KmsKeyNested withNewKmsKeyLike(io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReference item) {
return new EncryptionKeyReferenceFluentImpl.KmsKeyNestedImpl(item);
}
public io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceFluent.KmsKeyNested editKmsKey() {
return withNewKmsKeyLike(getKmsKey());
}
public io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceFluent.KmsKeyNested editOrNewKmsKey() {
return withNewKmsKeyLike(getKmsKey() != null ? getKmsKey(): new io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReferenceBuilder().build());
}
public io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceFluent.KmsKeyNested editOrNewKmsKeyLike(io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReference item) {
return withNewKmsKeyLike(getKmsKey() != null ? getKmsKey(): item);
}
public java.lang.String getKmsKeyServiceAccount() {
return this.kmsKeyServiceAccount;
}
public A withKmsKeyServiceAccount(java.lang.String kmsKeyServiceAccount) {
this.kmsKeyServiceAccount=kmsKeyServiceAccount; return (A) this;
}
public java.lang.Boolean hasKmsKeyServiceAccount() {
return this.kmsKeyServiceAccount != null;
}
public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new 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;
EncryptionKeyReferenceFluentImpl that = (EncryptionKeyReferenceFluentImpl) o;
if (kmsKey != null ? !kmsKey.equals(that.kmsKey) :that.kmsKey != null) return false;
if (kmsKeyServiceAccount != null ? !kmsKeyServiceAccount.equals(that.kmsKeyServiceAccount) :that.kmsKeyServiceAccount != 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(kmsKey, kmsKeyServiceAccount, additionalProperties, super.hashCode());
}
public java.lang.String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (kmsKey != null) { sb.append("kmsKey:"); sb.append(kmsKey + ","); }
if (kmsKeyServiceAccount != null) { sb.append("kmsKeyServiceAccount:"); sb.append(kmsKeyServiceAccount + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
class KmsKeyNestedImpl extends KMSKeyReferenceFluentImpl> implements io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceFluent.KmsKeyNested,Nested{
KmsKeyNestedImpl(KMSKeyReference item) {
this.builder = new KMSKeyReferenceBuilder(this, item);
}
KmsKeyNestedImpl() {
this.builder = new io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReferenceBuilder(this);
}
io.fabric8.openshift.api.model.installer.gcp.v1.KMSKeyReferenceBuilder builder;
public N and() {
return (N) EncryptionKeyReferenceFluentImpl.this.withKmsKey(builder.build());
}
public N endKmsKey() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy