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

io.fabric8.openshift.api.model.SecretSpecFluentImpl Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package io.fabric8.openshift.api.model;

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

public class SecretSpecFluentImpl> extends BaseFluent implements SecretSpecFluent{

    private String mountPath;
    private VisitableBuilder 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 LocalObjectReference getSecretSource(){
            return this.secretSource!=null?this.secretSource.build():null;
    }

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

    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 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,Nested{

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

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy