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

io.kubernetes.client.models.V1VolumeProjectionFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.models;

import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Boolean;
import java.lang.Object;

public class V1VolumeProjectionFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1VolumeProjectionFluent{

    private V1ConfigMapProjectionBuilder configMap;
    private V1DownwardAPIProjectionBuilder downwardAPI;
    private V1SecretProjectionBuilder secret;
    private V1ServiceAccountTokenProjectionBuilder serviceAccountToken;

    public V1VolumeProjectionFluentImpl(){
    }
    public V1VolumeProjectionFluentImpl(V1VolumeProjection instance){
            this.withConfigMap(instance.getConfigMap());

            this.withDownwardAPI(instance.getDownwardAPI());

            this.withSecret(instance.getSecret());

            this.withServiceAccountToken(instance.getServiceAccountToken());

    }

    
/**
 * This method has been deprecated, please use method buildConfigMap instead.
 */
@Deprecated public V1ConfigMapProjection getConfigMap(){
            return this.configMap!=null?this.configMap.build():null;
    }

    public V1ConfigMapProjection buildConfigMap(){
            return this.configMap!=null?this.configMap.build():null;
    }

    public A withConfigMap(V1ConfigMapProjection configMap){
            _visitables.remove(this.configMap);
            if (configMap!=null){ this.configMap= new V1ConfigMapProjectionBuilder(configMap); _visitables.add(this.configMap);} return (A) this;
    }

    public Boolean hasConfigMap(){
            return this.configMap != null;
    }

    public V1VolumeProjectionFluent.ConfigMapNested withNewConfigMap(){
            return new ConfigMapNestedImpl();
    }

    public V1VolumeProjectionFluent.ConfigMapNested withNewConfigMapLike(V1ConfigMapProjection item){
            return new ConfigMapNestedImpl(item);
    }

    public V1VolumeProjectionFluent.ConfigMapNested editConfigMap(){
            return withNewConfigMapLike(getConfigMap());
    }

    public V1VolumeProjectionFluent.ConfigMapNested editOrNewConfigMap(){
            return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): new V1ConfigMapProjectionBuilder().build());
    }

    public V1VolumeProjectionFluent.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapProjection item){
            return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): item);
    }

    
/**
 * This method has been deprecated, please use method buildDownwardAPI instead.
 */
@Deprecated public V1DownwardAPIProjection getDownwardAPI(){
            return this.downwardAPI!=null?this.downwardAPI.build():null;
    }

    public V1DownwardAPIProjection buildDownwardAPI(){
            return this.downwardAPI!=null?this.downwardAPI.build():null;
    }

    public A withDownwardAPI(V1DownwardAPIProjection downwardAPI){
            _visitables.remove(this.downwardAPI);
            if (downwardAPI!=null){ this.downwardAPI= new V1DownwardAPIProjectionBuilder(downwardAPI); _visitables.add(this.downwardAPI);} return (A) this;
    }

    public Boolean hasDownwardAPI(){
            return this.downwardAPI != null;
    }

    public V1VolumeProjectionFluent.DownwardAPINested withNewDownwardAPI(){
            return new DownwardAPINestedImpl();
    }

    public V1VolumeProjectionFluent.DownwardAPINested withNewDownwardAPILike(V1DownwardAPIProjection item){
            return new DownwardAPINestedImpl(item);
    }

    public V1VolumeProjectionFluent.DownwardAPINested editDownwardAPI(){
            return withNewDownwardAPILike(getDownwardAPI());
    }

    public V1VolumeProjectionFluent.DownwardAPINested editOrNewDownwardAPI(){
            return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): new V1DownwardAPIProjectionBuilder().build());
    }

    public V1VolumeProjectionFluent.DownwardAPINested editOrNewDownwardAPILike(V1DownwardAPIProjection item){
            return withNewDownwardAPILike(getDownwardAPI() != null ? getDownwardAPI(): item);
    }

    
/**
 * This method has been deprecated, please use method buildSecret instead.
 */
@Deprecated public V1SecretProjection getSecret(){
            return this.secret!=null?this.secret.build():null;
    }

    public V1SecretProjection buildSecret(){
            return this.secret!=null?this.secret.build():null;
    }

    public A withSecret(V1SecretProjection secret){
            _visitables.remove(this.secret);
            if (secret!=null){ this.secret= new V1SecretProjectionBuilder(secret); _visitables.add(this.secret);} return (A) this;
    }

    public Boolean hasSecret(){
            return this.secret != null;
    }

    public V1VolumeProjectionFluent.SecretNested withNewSecret(){
            return new SecretNestedImpl();
    }

    public V1VolumeProjectionFluent.SecretNested withNewSecretLike(V1SecretProjection item){
            return new SecretNestedImpl(item);
    }

    public V1VolumeProjectionFluent.SecretNested editSecret(){
            return withNewSecretLike(getSecret());
    }

    public V1VolumeProjectionFluent.SecretNested editOrNewSecret(){
            return withNewSecretLike(getSecret() != null ? getSecret(): new V1SecretProjectionBuilder().build());
    }

    public V1VolumeProjectionFluent.SecretNested editOrNewSecretLike(V1SecretProjection item){
            return withNewSecretLike(getSecret() != null ? getSecret(): item);
    }

    
/**
 * This method has been deprecated, please use method buildServiceAccountToken instead.
 */
@Deprecated public V1ServiceAccountTokenProjection getServiceAccountToken(){
            return this.serviceAccountToken!=null?this.serviceAccountToken.build():null;
    }

    public V1ServiceAccountTokenProjection buildServiceAccountToken(){
            return this.serviceAccountToken!=null?this.serviceAccountToken.build():null;
    }

    public A withServiceAccountToken(V1ServiceAccountTokenProjection serviceAccountToken){
            _visitables.remove(this.serviceAccountToken);
            if (serviceAccountToken!=null){ this.serviceAccountToken= new V1ServiceAccountTokenProjectionBuilder(serviceAccountToken); _visitables.add(this.serviceAccountToken);} return (A) this;
    }

    public Boolean hasServiceAccountToken(){
            return this.serviceAccountToken != null;
    }

    public V1VolumeProjectionFluent.ServiceAccountTokenNested withNewServiceAccountToken(){
            return new ServiceAccountTokenNestedImpl();
    }

    public V1VolumeProjectionFluent.ServiceAccountTokenNested withNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item){
            return new ServiceAccountTokenNestedImpl(item);
    }

    public V1VolumeProjectionFluent.ServiceAccountTokenNested editServiceAccountToken(){
            return withNewServiceAccountTokenLike(getServiceAccountToken());
    }

    public V1VolumeProjectionFluent.ServiceAccountTokenNested editOrNewServiceAccountToken(){
            return withNewServiceAccountTokenLike(getServiceAccountToken() != null ? getServiceAccountToken(): new V1ServiceAccountTokenProjectionBuilder().build());
    }

    public V1VolumeProjectionFluent.ServiceAccountTokenNested editOrNewServiceAccountTokenLike(V1ServiceAccountTokenProjection item){
            return withNewServiceAccountTokenLike(getServiceAccountToken() != null ? getServiceAccountToken(): item);
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            V1VolumeProjectionFluentImpl that = (V1VolumeProjectionFluentImpl) 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;
            return true;
    }


    public class ConfigMapNestedImpl extends V1ConfigMapProjectionFluentImpl> implements V1VolumeProjectionFluent.ConfigMapNested,io.kubernetes.client.fluent.Nested{

            private final V1ConfigMapProjectionBuilder builder;
    
            ConfigMapNestedImpl(V1ConfigMapProjection item){
                    this.builder = new V1ConfigMapProjectionBuilder(this, item);
            }
            ConfigMapNestedImpl(){
                    this.builder = new V1ConfigMapProjectionBuilder(this);
            }
    
    public N and(){
            return (N) V1VolumeProjectionFluentImpl.this.withConfigMap(builder.build());
    }
    public N endConfigMap(){
            return and();
    }

}
    public class DownwardAPINestedImpl extends V1DownwardAPIProjectionFluentImpl> implements V1VolumeProjectionFluent.DownwardAPINested,io.kubernetes.client.fluent.Nested{

            private final V1DownwardAPIProjectionBuilder builder;
    
            DownwardAPINestedImpl(V1DownwardAPIProjection item){
                    this.builder = new V1DownwardAPIProjectionBuilder(this, item);
            }
            DownwardAPINestedImpl(){
                    this.builder = new V1DownwardAPIProjectionBuilder(this);
            }
    
    public N and(){
            return (N) V1VolumeProjectionFluentImpl.this.withDownwardAPI(builder.build());
    }
    public N endDownwardAPI(){
            return and();
    }

}
    public class SecretNestedImpl extends V1SecretProjectionFluentImpl> implements V1VolumeProjectionFluent.SecretNested,io.kubernetes.client.fluent.Nested{

            private final V1SecretProjectionBuilder builder;
    
            SecretNestedImpl(V1SecretProjection item){
                    this.builder = new V1SecretProjectionBuilder(this, item);
            }
            SecretNestedImpl(){
                    this.builder = new V1SecretProjectionBuilder(this);
            }
    
    public N and(){
            return (N) V1VolumeProjectionFluentImpl.this.withSecret(builder.build());
    }
    public N endSecret(){
            return and();
    }

}
    public class ServiceAccountTokenNestedImpl extends V1ServiceAccountTokenProjectionFluentImpl> implements V1VolumeProjectionFluent.ServiceAccountTokenNested,io.kubernetes.client.fluent.Nested{

            private final V1ServiceAccountTokenProjectionBuilder builder;
    
            ServiceAccountTokenNestedImpl(V1ServiceAccountTokenProjection item){
                    this.builder = new V1ServiceAccountTokenProjectionBuilder(this, item);
            }
            ServiceAccountTokenNestedImpl(){
                    this.builder = new V1ServiceAccountTokenProjectionBuilder(this);
            }
    
    public N and(){
            return (N) V1VolumeProjectionFluentImpl.this.withServiceAccountToken(builder.build());
    }
    public N endServiceAccountToken(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy