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

io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl 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.Boolean;
import java.lang.Long;
import java.lang.Object;
import java.util.Map;

 /**
  * Generated
  */
public class VolumeProjectionFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.VolumeProjectionFluent{
  public VolumeProjectionFluentImpl() {
  }
  public VolumeProjectionFluentImpl(io.fabric8.kubernetes.api.model.VolumeProjection instance) {
    this.withConfigMap(instance.getConfigMap()); 
    this.withDownwardAPI(instance.getDownwardAPI()); 
    this.withSecret(instance.getSecret()); 
    this.withServiceAccountToken(instance.getServiceAccountToken()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private io.fabric8.kubernetes.api.model.ConfigMapProjectionBuilder configMap;
  private io.fabric8.kubernetes.api.model.DownwardAPIProjectionBuilder downwardAPI;
  private io.fabric8.kubernetes.api.model.SecretProjectionBuilder secret;
  private io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionBuilder serviceAccountToken;
  private java.util.Map additionalProperties;
  
  /**
   * This method has been deprecated, please use method buildConfigMap instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ConfigMapProjection getConfigMap() {
    return this.configMap!=null?this.configMap.build():null;
  }
  public io.fabric8.kubernetes.api.model.ConfigMapProjection buildConfigMap() {
    return this.configMap!=null?this.configMap.build():null;
  }
  public A withConfigMap(io.fabric8.kubernetes.api.model.ConfigMapProjection configMap) {
    _visitables.get("configMap").remove(this.configMap);
    if (configMap!=null){ this.configMap= new io.fabric8.kubernetes.api.model.ConfigMapProjectionBuilder(configMap); _visitables.get("configMap").add(this.configMap);} return (A) this;
  }
  public java.lang.Boolean hasConfigMap() {
    return this.configMap != null;
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ConfigMapNested withNewConfigMap() {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.ConfigMapNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ConfigMapNested withNewConfigMapLike(io.fabric8.kubernetes.api.model.ConfigMapProjection item) {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.ConfigMapNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ConfigMapNested editConfigMap() {
    return withNewConfigMapLike(getConfigMap());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ConfigMapNested editOrNewConfigMap() {
    return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): new io.fabric8.kubernetes.api.model.ConfigMapProjectionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ConfigMapNested editOrNewConfigMapLike(io.fabric8.kubernetes.api.model.ConfigMapProjection item) {
    return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildDownwardAPI instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.DownwardAPIProjection getDownwardAPI() {
    return this.downwardAPI!=null?this.downwardAPI.build():null;
  }
  public io.fabric8.kubernetes.api.model.DownwardAPIProjection buildDownwardAPI() {
    return this.downwardAPI!=null?this.downwardAPI.build():null;
  }
  public A withDownwardAPI(io.fabric8.kubernetes.api.model.DownwardAPIProjection downwardAPI) {
    _visitables.get("downwardAPI").remove(this.downwardAPI);
    if (downwardAPI!=null){ this.downwardAPI= new io.fabric8.kubernetes.api.model.DownwardAPIProjectionBuilder(downwardAPI); _visitables.get("downwardAPI").add(this.downwardAPI);} return (A) this;
  }
  public java.lang.Boolean hasDownwardAPI() {
    return this.downwardAPI != null;
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.DownwardAPINested withNewDownwardAPI() {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.DownwardAPINestedImpl();
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.DownwardAPINested withNewDownwardAPILike(io.fabric8.kubernetes.api.model.DownwardAPIProjection item) {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.DownwardAPINestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.DownwardAPINested editDownwardAPI() {
    return withNewDownwardAPILike(getDownwardAPI());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.DownwardAPINested editOrNewDownwardAPI() {
    return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): new io.fabric8.kubernetes.api.model.DownwardAPIProjectionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.DownwardAPINested editOrNewDownwardAPILike(io.fabric8.kubernetes.api.model.DownwardAPIProjection item) {
    return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildSecret instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.SecretProjection getSecret() {
    return this.secret!=null?this.secret.build():null;
  }
  public io.fabric8.kubernetes.api.model.SecretProjection buildSecret() {
    return this.secret!=null?this.secret.build():null;
  }
  public A withSecret(io.fabric8.kubernetes.api.model.SecretProjection secret) {
    _visitables.get("secret").remove(this.secret);
    if (secret!=null){ this.secret= new io.fabric8.kubernetes.api.model.SecretProjectionBuilder(secret); _visitables.get("secret").add(this.secret);} return (A) this;
  }
  public java.lang.Boolean hasSecret() {
    return this.secret != null;
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.SecretNested withNewSecret() {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.SecretNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.SecretNested withNewSecretLike(io.fabric8.kubernetes.api.model.SecretProjection item) {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.SecretNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.SecretNested editSecret() {
    return withNewSecretLike(getSecret());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.SecretNested editOrNewSecret() {
    return withNewSecretLike(getSecret() != null ? getSecret(): new io.fabric8.kubernetes.api.model.SecretProjectionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.SecretNested editOrNewSecretLike(io.fabric8.kubernetes.api.model.SecretProjection item) {
    return withNewSecretLike(getSecret() != null ? getSecret(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildServiceAccountToken instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ServiceAccountTokenProjection getServiceAccountToken() {
    return this.serviceAccountToken!=null?this.serviceAccountToken.build():null;
  }
  public io.fabric8.kubernetes.api.model.ServiceAccountTokenProjection buildServiceAccountToken() {
    return this.serviceAccountToken!=null?this.serviceAccountToken.build():null;
  }
  public A withServiceAccountToken(io.fabric8.kubernetes.api.model.ServiceAccountTokenProjection serviceAccountToken) {
    _visitables.get("serviceAccountToken").remove(this.serviceAccountToken);
    if (serviceAccountToken!=null){ this.serviceAccountToken= new io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionBuilder(serviceAccountToken); _visitables.get("serviceAccountToken").add(this.serviceAccountToken);} return (A) this;
  }
  public java.lang.Boolean hasServiceAccountToken() {
    return this.serviceAccountToken != null;
  }
  public A withNewServiceAccountToken(java.lang.String audience,java.lang.Long expirationSeconds,java.lang.String path) {
    return (A)withServiceAccountToken(new ServiceAccountTokenProjection(audience, expirationSeconds, path));
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ServiceAccountTokenNested withNewServiceAccountToken() {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.ServiceAccountTokenNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ServiceAccountTokenNested withNewServiceAccountTokenLike(io.fabric8.kubernetes.api.model.ServiceAccountTokenProjection item) {
    return new io.fabric8.kubernetes.api.model.VolumeProjectionFluentImpl.ServiceAccountTokenNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ServiceAccountTokenNested editServiceAccountToken() {
    return withNewServiceAccountTokenLike(getServiceAccountToken());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ServiceAccountTokenNested editOrNewServiceAccountToken() {
    return withNewServiceAccountTokenLike(getServiceAccountToken() != null ? getServiceAccountToken(): new io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ServiceAccountTokenNested editOrNewServiceAccountTokenLike(io.fabric8.kubernetes.api.model.ServiceAccountTokenProjection item) {
    return withNewServiceAccountTokenLike(getServiceAccountToken() != null ? getServiceAccountToken(): 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;
    VolumeProjectionFluentImpl that = (VolumeProjectionFluentImpl) o;
    if (configMap != null ? !configMap.equals(that.configMap) :that.configMap != null) return false;
    if (downwardAPI != null ? !downwardAPI.equals(that.downwardAPI) :that.downwardAPI != null) return false;
    if (secret != null ? !secret.equals(that.secret) :that.secret != null) return false;
    if (serviceAccountToken != null ? !serviceAccountToken.equals(that.serviceAccountToken) :that.serviceAccountToken != 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(configMap,  downwardAPI,  secret,  serviceAccountToken,  additionalProperties,  super.hashCode());
  }
  public class ConfigMapNestedImpl extends io.fabric8.kubernetes.api.model.ConfigMapProjectionFluentImpl> implements io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ConfigMapNested,io.fabric8.kubernetes.api.builder.Nested{
    ConfigMapNestedImpl(io.fabric8.kubernetes.api.model.ConfigMapProjection item) {
      this.builder = new io.fabric8.kubernetes.api.model.ConfigMapProjectionBuilder(this, item);
    }
    ConfigMapNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ConfigMapProjectionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ConfigMapProjectionBuilder builder;
    public N and() {
      return (N) VolumeProjectionFluentImpl.this.withConfigMap(builder.build());
    }
    public N endConfigMap() {
      return and();
    }
    
  }
  public class DownwardAPINestedImpl extends io.fabric8.kubernetes.api.model.DownwardAPIProjectionFluentImpl> implements io.fabric8.kubernetes.api.model.VolumeProjectionFluent.DownwardAPINested,io.fabric8.kubernetes.api.builder.Nested{
    DownwardAPINestedImpl(io.fabric8.kubernetes.api.model.DownwardAPIProjection item) {
      this.builder = new io.fabric8.kubernetes.api.model.DownwardAPIProjectionBuilder(this, item);
    }
    DownwardAPINestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.DownwardAPIProjectionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.DownwardAPIProjectionBuilder builder;
    public N and() {
      return (N) VolumeProjectionFluentImpl.this.withDownwardAPI(builder.build());
    }
    public N endDownwardAPI() {
      return and();
    }
    
  }
  public class SecretNestedImpl extends io.fabric8.kubernetes.api.model.SecretProjectionFluentImpl> implements io.fabric8.kubernetes.api.model.VolumeProjectionFluent.SecretNested,io.fabric8.kubernetes.api.builder.Nested{
    SecretNestedImpl(io.fabric8.kubernetes.api.model.SecretProjection item) {
      this.builder = new io.fabric8.kubernetes.api.model.SecretProjectionBuilder(this, item);
    }
    SecretNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.SecretProjectionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.SecretProjectionBuilder builder;
    public N and() {
      return (N) VolumeProjectionFluentImpl.this.withSecret(builder.build());
    }
    public N endSecret() {
      return and();
    }
    
  }
  public class ServiceAccountTokenNestedImpl extends io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionFluentImpl> implements io.fabric8.kubernetes.api.model.VolumeProjectionFluent.ServiceAccountTokenNested,io.fabric8.kubernetes.api.builder.Nested{
    ServiceAccountTokenNestedImpl(io.fabric8.kubernetes.api.model.ServiceAccountTokenProjection item) {
      this.builder = new io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionBuilder(this, item);
    }
    ServiceAccountTokenNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ServiceAccountTokenProjectionBuilder builder;
    public N and() {
      return (N) VolumeProjectionFluentImpl.this.withServiceAccountToken(builder.build());
    }
    public N endServiceAccountToken() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy