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

annotations.io.alauda.kubernetes.api.model.VolumeProjectionFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import javax.validation.Valid;
import java.lang.Object;

public class VolumeProjectionFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements VolumeProjectionFluent{

    private ConfigMapProjectionBuilder configMap;
    private DownwardAPIProjectionBuilder downwardAPI;
    private SecretProjectionBuilder secret;

    public VolumeProjectionFluentImpl(){
    }
    public VolumeProjectionFluentImpl(VolumeProjection instance){
            this.withConfigMap(instance.getConfigMap()); 
            this.withDownwardAPI(instance.getDownwardAPI()); 
            this.withSecret(instance.getSecret()); 
    }

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

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

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

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

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

    public VolumeProjectionFluent.ConfigMapNested withNewConfigMapLike(ConfigMapProjection item){
            return new ConfigMapNestedImpl(item);
    }

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

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

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

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

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

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

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

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

    public VolumeProjectionFluent.DownwardAPINested withNewDownwardAPILike(DownwardAPIProjection item){
            return new DownwardAPINestedImpl(item);
    }

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

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

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

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

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

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

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

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

    public VolumeProjectionFluent.SecretNested withNewSecretLike(SecretProjection item){
            return new SecretNestedImpl(item);
    }

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

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

    public VolumeProjectionFluent.SecretNested editOrNewSecretLike(SecretProjection item){
            return withNewSecretLike(getSecret() != null ? getSecret(): 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;
            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;
            return true;
    }


    public class ConfigMapNestedImpl extends ConfigMapProjectionFluentImpl> implements VolumeProjectionFluent.ConfigMapNested,io.alauda.kubernetes.api.builder.Nested{

            private final ConfigMapProjectionBuilder builder;
    
            ConfigMapNestedImpl(ConfigMapProjection item){
                    this.builder = new ConfigMapProjectionBuilder(this, item);
            }
            ConfigMapNestedImpl(){
                    this.builder = new ConfigMapProjectionBuilder(this);
            }
    
    public N and(){
            return (N) VolumeProjectionFluentImpl.this.withConfigMap(builder.build());
    }
    public N endConfigMap(){
            return and();
    }

}
    public class DownwardAPINestedImpl extends DownwardAPIProjectionFluentImpl> implements VolumeProjectionFluent.DownwardAPINested,io.alauda.kubernetes.api.builder.Nested{

            private final DownwardAPIProjectionBuilder builder;
    
            DownwardAPINestedImpl(DownwardAPIProjection item){
                    this.builder = new DownwardAPIProjectionBuilder(this, item);
            }
            DownwardAPINestedImpl(){
                    this.builder = new DownwardAPIProjectionBuilder(this);
            }
    
    public N and(){
            return (N) VolumeProjectionFluentImpl.this.withDownwardAPI(builder.build());
    }
    public N endDownwardAPI(){
            return and();
    }

}
    public class SecretNestedImpl extends SecretProjectionFluentImpl> implements VolumeProjectionFluent.SecretNested,io.alauda.kubernetes.api.builder.Nested{

            private final SecretProjectionBuilder builder;
    
            SecretNestedImpl(SecretProjection item){
                    this.builder = new SecretProjectionBuilder(this, item);
            }
            SecretNestedImpl(){
                    this.builder = new SecretProjectionBuilder(this);
            }
    
    public N and(){
            return (N) VolumeProjectionFluentImpl.this.withSecret(builder.build());
    }
    public N endSecret(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy