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

io.alauda.devops.api.model.SecretSpecFluentImpl Maven / Gradle / Ivy

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

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

public class SecretSpecFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements SecretSpecFluent{

    private String mountPath;
    private LocalObjectReferenceBuilder secretSource;

    public SecretSpecFluentImpl(){
    }
    public SecretSpecFluentImpl(SecretSpec instance){
            this.withMountPath(instance.getMountPath()); 
            this.withSecretSource(instance.getSecretSource()); 
    }

    public String getMountPath(){
            return this.mountPath;
    }

    public A withMountPath(String mountPath){
            this.mountPath=mountPath; return (A) this;
    }

    public Boolean hasMountPath(){
            return this.mountPath!=null;
    }

    
/**
 * This method has been deprecated, please use method buildSecretSource instead.
 */
@Deprecated public LocalObjectReference getSecretSource(){
            return this.secretSource!=null?this.secretSource.build():null;
    }

    public LocalObjectReference buildSecretSource(){
            return this.secretSource!=null?this.secretSource.build():null;
    }

    public A withSecretSource(LocalObjectReference secretSource){
            _visitables.remove(this.secretSource);
            if (secretSource!=null){ this.secretSource= new LocalObjectReferenceBuilder(secretSource); _visitables.add(this.secretSource);} return (A) this;
    }

    public Boolean hasSecretSource(){
            return this.secretSource!=null;
    }

    public SecretSpecFluent.SecretSourceNested withNewSecretSource(){
            return new SecretSourceNestedImpl();
    }

    public SecretSpecFluent.SecretSourceNested withNewSecretSourceLike(LocalObjectReference item){
            return new SecretSourceNestedImpl(item);
    }

    public SecretSpecFluent.SecretSourceNested editSecretSource(){
            return withNewSecretSourceLike(getSecretSource());
    }

    public SecretSpecFluent.SecretSourceNested editOrNewSecretSource(){
            return withNewSecretSourceLike(getSecretSource() != null ? getSecretSource(): new LocalObjectReferenceBuilder().build());
    }

    public SecretSpecFluent.SecretSourceNested editOrNewSecretSourceLike(LocalObjectReference item){
            return withNewSecretSourceLike(getSecretSource() != null ? getSecretSource(): item);
    }

    public A withNewSecretSource(String name){
            return (A)withSecretSource(new LocalObjectReference(name));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            SecretSpecFluentImpl that = (SecretSpecFluentImpl) o;
            if (mountPath != null ? !mountPath.equals(that.mountPath) :that.mountPath != null) return false;
            if (secretSource != null ? !secretSource.equals(that.secretSource) :that.secretSource != null) return false;
            return true;
    }


    public class SecretSourceNestedImpl extends LocalObjectReferenceFluentImpl> implements SecretSpecFluent.SecretSourceNested,io.alauda.kubernetes.api.builder.Nested{

            private final LocalObjectReferenceBuilder builder;
    
            SecretSourceNestedImpl(LocalObjectReference item){
                    this.builder = new LocalObjectReferenceBuilder(this, item);
            }
            SecretSourceNestedImpl(){
                    this.builder = new LocalObjectReferenceBuilder(this);
            }
    
    public N and(){
            return (N) SecretSpecFluentImpl.this.withSecretSource(builder.build());
    }
    public N endSecretSource(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy