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

annotations.io.fabric8.openshift.api.model.CustomBuildStrategyFluent Maven / Gradle / Ivy

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

import io.fabric8.kubernetes.api.model.ObjectReference;
import java.util.HashMap;
import java.util.Map;
import io.fabric8.kubernetes.api.model.EnvVar;
import java.util.List;
import java.util.ArrayList;
import io.fabric8.common.Nested;
import io.fabric8.kubernetes.api.model.EnvVarFluent;
import io.fabric8.common.Builder;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluent;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;
import io.fabric8.kubernetes.api.model.EnvVarBuilder;
import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder;

public class CustomBuildStrategyFluent> extends BaseFluent implements Fluent{

     List env = new ArrayList();     Boolean exposeDockerSocket;     ObjectReferenceBuilder from;     Map additionalProperties = new HashMap();

    public T addToEnv( EnvVar item){
    if (item != null) {EnvVarBuilder builder = new EnvVarBuilder(item);_visitables.add(builder);this.env.add(builder);} return (T)this;
    }
    public List getEnv(){
    return build(env);
    }
    public T withEnv( List env){
    this.env.clear();if (env != null) {for (EnvVar item : env){this.addToEnv(item);}} return (T) this;
    }
    public EnvNested addNewEnv(){
    return new EnvNested();
    }
    public Boolean isExposeDockerSocket(){
    return this.exposeDockerSocket;
    }
    public T withExposeDockerSocket( Boolean exposeDockerSocket){
    this.exposeDockerSocket=exposeDockerSocket; return (T) this;
    }
    public ObjectReference getFrom(){
    return this.from!=null?this.from.build():null;
    }
    public T withFrom( ObjectReference from){
    if (from!=null){ this.from= new ObjectReferenceBuilder(from); _visitables.add(this.from);} return (T) this;
    }
    public FromNested withNewFrom(){
    return new FromNested();
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public Map getAdditionalProperties(){
    return this.additionalProperties;
    }
    public T withAdditionalProperties( Map additionalProperties){
    this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
    }

    public class EnvNested extends EnvVarFluent> implements Nested{

        private final EnvVarBuilder builder = new EnvVarBuilder(this);
    
            public N endEnv(){
            return and();
        }
            public N and(){
            return (N) CustomBuildStrategyFluent.this.addToEnv(builder.build());
        }
    
}
    public class FromNested extends ObjectReferenceFluent> implements Nested{

        private final ObjectReferenceBuilder builder = new ObjectReferenceBuilder(this);
    
            public N endFrom(){
            return and();
        }
            public N and(){
            return (N) CustomBuildStrategyFluent.this.withFrom(builder.build());
        }
    
}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy