All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.openshift.api.model.installer.azure.v1.SecuritySettingsFluent Maven / Gradle / Ivy

package io.fabric8.openshift.api.model.installer.azure.v1;

import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.util.Map;

/**
 * Generated
 */
@SuppressWarnings("unchecked")
public class SecuritySettingsFluent> extends BaseFluent{
  public SecuritySettingsFluent() {
  }
  
  public SecuritySettingsFluent(SecuritySettings instance) {
    this.copyInstance(instance);
  }
  private ConfidentialVMBuilder confidentialVM;
  private String securityType;
  private TrustedLaunchBuilder trustedLaunch;
  private Map additionalProperties;
  
  protected void copyInstance(SecuritySettings instance) {
    instance = (instance != null ? instance : new SecuritySettings());
    if (instance != null) {
          this.withConfidentialVM(instance.getConfidentialVM());
          this.withSecurityType(instance.getSecurityType());
          this.withTrustedLaunch(instance.getTrustedLaunch());
          this.withAdditionalProperties(instance.getAdditionalProperties());
        }
  }
  
  public ConfidentialVM buildConfidentialVM() {
    return this.confidentialVM != null ? this.confidentialVM.build() : null;
  }
  
  public A withConfidentialVM(ConfidentialVM confidentialVM) {
    this._visitables.remove("confidentialVM");
    if (confidentialVM != null) {
        this.confidentialVM = new ConfidentialVMBuilder(confidentialVM);
        this._visitables.get("confidentialVM").add(this.confidentialVM);
    } else {
        this.confidentialVM = null;
        this._visitables.get("confidentialVM").remove(this.confidentialVM);
    }
    return (A) this;
  }
  
  public boolean hasConfidentialVM() {
    return this.confidentialVM != null;
  }
  
  public ConfidentialVMNested withNewConfidentialVM() {
    return new ConfidentialVMNested(null);
  }
  
  public ConfidentialVMNested withNewConfidentialVMLike(ConfidentialVM item) {
    return new ConfidentialVMNested(item);
  }
  
  public ConfidentialVMNested editConfidentialVM() {
    return withNewConfidentialVMLike(java.util.Optional.ofNullable(buildConfidentialVM()).orElse(null));
  }
  
  public ConfidentialVMNested editOrNewConfidentialVM() {
    return withNewConfidentialVMLike(java.util.Optional.ofNullable(buildConfidentialVM()).orElse(new ConfidentialVMBuilder().build()));
  }
  
  public ConfidentialVMNested editOrNewConfidentialVMLike(ConfidentialVM item) {
    return withNewConfidentialVMLike(java.util.Optional.ofNullable(buildConfidentialVM()).orElse(item));
  }
  
  public String getSecurityType() {
    return this.securityType;
  }
  
  public A withSecurityType(String securityType) {
    this.securityType = securityType;
    return (A) this;
  }
  
  public boolean hasSecurityType() {
    return this.securityType != null;
  }
  
  public TrustedLaunch buildTrustedLaunch() {
    return this.trustedLaunch != null ? this.trustedLaunch.build() : null;
  }
  
  public A withTrustedLaunch(TrustedLaunch trustedLaunch) {
    this._visitables.remove("trustedLaunch");
    if (trustedLaunch != null) {
        this.trustedLaunch = new TrustedLaunchBuilder(trustedLaunch);
        this._visitables.get("trustedLaunch").add(this.trustedLaunch);
    } else {
        this.trustedLaunch = null;
        this._visitables.get("trustedLaunch").remove(this.trustedLaunch);
    }
    return (A) this;
  }
  
  public boolean hasTrustedLaunch() {
    return this.trustedLaunch != null;
  }
  
  public TrustedLaunchNested withNewTrustedLaunch() {
    return new TrustedLaunchNested(null);
  }
  
  public TrustedLaunchNested withNewTrustedLaunchLike(TrustedLaunch item) {
    return new TrustedLaunchNested(item);
  }
  
  public TrustedLaunchNested editTrustedLaunch() {
    return withNewTrustedLaunchLike(java.util.Optional.ofNullable(buildTrustedLaunch()).orElse(null));
  }
  
  public TrustedLaunchNested editOrNewTrustedLaunch() {
    return withNewTrustedLaunchLike(java.util.Optional.ofNullable(buildTrustedLaunch()).orElse(new TrustedLaunchBuilder().build()));
  }
  
  public TrustedLaunchNested editOrNewTrustedLaunchLike(TrustedLaunch item) {
    return withNewTrustedLaunchLike(java.util.Optional.ofNullable(buildTrustedLaunch()).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;
    SecuritySettingsFluent that = (SecuritySettingsFluent) o;
    if (!java.util.Objects.equals(confidentialVM, that.confidentialVM)) return false;
    if (!java.util.Objects.equals(securityType, that.securityType)) return false;
    if (!java.util.Objects.equals(trustedLaunch, that.trustedLaunch)) return false;
    if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(confidentialVM,  securityType,  trustedLaunch,  additionalProperties,  super.hashCode());
  }
  
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (confidentialVM != null) { sb.append("confidentialVM:"); sb.append(confidentialVM + ","); }
    if (securityType != null) { sb.append("securityType:"); sb.append(securityType + ","); }
    if (trustedLaunch != null) { sb.append("trustedLaunch:"); sb.append(trustedLaunch + ","); }
    if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
    sb.append("}");
    return sb.toString();
  }
  public class ConfidentialVMNested extends ConfidentialVMFluent> implements Nested{
    ConfidentialVMNested(ConfidentialVM item) {
      this.builder = new ConfidentialVMBuilder(this, item);
    }
    ConfidentialVMBuilder builder;
    
    public N and() {
      return (N) SecuritySettingsFluent.this.withConfidentialVM(builder.build());
    }
    
    public N endConfidentialVM() {
      return and();
    }
    
  
  }
  public class TrustedLaunchNested extends TrustedLaunchFluent> implements Nested{
    TrustedLaunchNested(TrustedLaunch item) {
      this.builder = new TrustedLaunchBuilder(this, item);
    }
    TrustedLaunchBuilder builder;
    
    public N and() {
      return (N) SecuritySettingsFluent.this.withTrustedLaunch(builder.build());
    }
    
    public N endTrustedLaunch() {
      return and();
    }
    
  
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy