io.fabric8.certmanager.api.model.v1.VaultAppRoleFluent Maven / Gradle / Ivy
The newest version!
package io.fabric8.certmanager.api.model.v1;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.certmanager.api.model.meta.v1.SecretKeySelector;
import java.util.LinkedHashMap;
import io.fabric8.certmanager.api.model.meta.v1.SecretKeySelectorFluent;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import io.fabric8.certmanager.api.model.meta.v1.SecretKeySelectorBuilder;
import java.util.Map;
/**
* Generated
*/
@SuppressWarnings("unchecked")
public class VaultAppRoleFluent> extends BaseFluent{
public VaultAppRoleFluent() {
}
public VaultAppRoleFluent(VaultAppRole instance) {
this.copyInstance(instance);
}
private String path;
private String roleId;
private SecretKeySelectorBuilder secretRef;
private Map additionalProperties;
protected void copyInstance(VaultAppRole instance) {
instance = (instance != null ? instance : new VaultAppRole());
if (instance != null) {
this.withPath(instance.getPath());
this.withRoleId(instance.getRoleId());
this.withSecretRef(instance.getSecretRef());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
}
public String getPath() {
return this.path;
}
public A withPath(String path) {
this.path = path;
return (A) this;
}
public boolean hasPath() {
return this.path != null;
}
public String getRoleId() {
return this.roleId;
}
public A withRoleId(String roleId) {
this.roleId = roleId;
return (A) this;
}
public boolean hasRoleId() {
return this.roleId != null;
}
public SecretKeySelector buildSecretRef() {
return this.secretRef != null ? this.secretRef.build() : null;
}
public A withSecretRef(SecretKeySelector secretRef) {
this._visitables.remove("secretRef");
if (secretRef != null) {
this.secretRef = new SecretKeySelectorBuilder(secretRef);
this._visitables.get("secretRef").add(this.secretRef);
} else {
this.secretRef = null;
this._visitables.get("secretRef").remove(this.secretRef);
}
return (A) this;
}
public boolean hasSecretRef() {
return this.secretRef != null;
}
public A withNewSecretRef(String key,String name) {
return (A)withSecretRef(new SecretKeySelector(key, name));
}
public SecretRefNested withNewSecretRef() {
return new SecretRefNested(null);
}
public SecretRefNested withNewSecretRefLike(SecretKeySelector item) {
return new SecretRefNested(item);
}
public SecretRefNested editSecretRef() {
return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(null));
}
public SecretRefNested editOrNewSecretRef() {
return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(new SecretKeySelectorBuilder().build()));
}
public SecretRefNested editOrNewSecretRefLike(SecretKeySelector item) {
return withNewSecretRefLike(java.util.Optional.ofNullable(buildSecretRef()).orElse(item));
}
public A addToAdditionalProperties(String key,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(Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(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(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 Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(Map additionalProperties) {
if (additionalProperties == null) {
this.additionalProperties = null;
} else {
this.additionalProperties = new LinkedHashMap(additionalProperties);
}
return (A) this;
}
public boolean hasAdditionalProperties() {
return this.additionalProperties != null;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
VaultAppRoleFluent that = (VaultAppRoleFluent) o;
if (!java.util.Objects.equals(path, that.path)) return false;
if (!java.util.Objects.equals(roleId, that.roleId)) return false;
if (!java.util.Objects.equals(secretRef, that.secretRef)) return false;
if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(path, roleId, secretRef, additionalProperties, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (path != null) { sb.append("path:"); sb.append(path + ","); }
if (roleId != null) { sb.append("roleId:"); sb.append(roleId + ","); }
if (secretRef != null) { sb.append("secretRef:"); sb.append(secretRef + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
public class SecretRefNested extends SecretKeySelectorFluent> implements Nested{
SecretRefNested(SecretKeySelector item) {
this.builder = new SecretKeySelectorBuilder(this, item);
}
SecretKeySelectorBuilder builder;
public N and() {
return (N) VaultAppRoleFluent.this.withSecretRef(builder.build());
}
public N endSecretRef() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy