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

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

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

import java.util.List;
import java.util.ArrayList;
import java.util.RandomAccess;
import java.util.Map;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import java.util.Map;
import java.util.List;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.HashMap;
import java.io.Serializable;
import java.util.Collection;
import io.fabric8.kubernetes.api.model.LocalObjectReference;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluent;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.model.EnvVarBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.model.EnvVarFluent;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.List;
import io.fabric8.kubernetes.api.model.EnvVarFluentImpl;
import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.model.LocalObjectReferenceFluentImpl;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.model.LocalObjectReferenceFluent;

public class SourceBuildStrategyFluentImpl> extends BaseFluent implements SourceBuildStrategyFluent{

     List> env = new ArrayList();     Boolean forcePull;     VisitableBuilder from;     Boolean incremental;     VisitableBuilder pullSecret;     String scripts;     Map additionalProperties = new HashMap();
public SourceBuildStrategyFluentImpl(){
    
}
public SourceBuildStrategyFluentImpl( SourceBuildStrategy instance ){
    this.withEnv(instance.getEnv()); this.withForcePull(instance.getForcePull()); this.withFrom(instance.getFrom()); this.withIncremental(instance.getIncremental()); this.withPullSecret(instance.getPullSecret()); this.withScripts(instance.getScripts()); 
}

    public T addToEnv( EnvVar ...items){
    for (EnvVar item : items) {EnvVarBuilder builder = new EnvVarBuilder(item);_visitables.add(builder);this.env.add(builder);} return (T)this;
    }
    public T removeFromEnv( EnvVar ...items){
    for (EnvVar item : items) {EnvVarBuilder builder = new EnvVarBuilder(item);_visitables.remove(builder);this.env.remove(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 T withEnv( EnvVar ...env){
    this.env.clear(); if (env != null) {for (EnvVar item :env){ this.addToEnv(item);}} return (T) this;
    }
    public EnvNested addNewEnv(){
    return new EnvNestedImpl();
    }
    public EnvNested addNewEnvLike( EnvVar item){
    return new EnvNestedImpl(item);
    }
    public Boolean isForcePull(){
    return this.forcePull;
    }
    public T withForcePull( Boolean forcePull){
    this.forcePull=forcePull; 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 FromNestedImpl();
    }
    public FromNested withNewFromLike( ObjectReference item){
    return new FromNestedImpl(item);
    }
    public FromNested editFrom(){
    return withNewFromLike(getFrom());
    }
    public Boolean isIncremental(){
    return this.incremental;
    }
    public T withIncremental( Boolean incremental){
    this.incremental=incremental; return (T) this;
    }
    public LocalObjectReference getPullSecret(){
    return this.pullSecret!=null?this.pullSecret.build():null;
    }
    public T withPullSecret( LocalObjectReference pullSecret){
    if (pullSecret!=null){ this.pullSecret= new LocalObjectReferenceBuilder(pullSecret); _visitables.add(this.pullSecret);} return (T) this;
    }
    public PullSecretNested withNewPullSecret(){
    return new PullSecretNestedImpl();
    }
    public PullSecretNested withNewPullSecretLike( LocalObjectReference item){
    return new PullSecretNestedImpl(item);
    }
    public PullSecretNested editPullSecret(){
    return withNewPullSecretLike(getPullSecret());
    }
    public T withNewPullSecret( String name){
    return withPullSecret(new LocalObjectReference(name));
    }
    public String getScripts(){
    return this.scripts;
    }
    public T withScripts( String scripts){
    this.scripts=scripts; return (T) this;
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public T addToAdditionalProperties( Map map){
    if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
    }
    public T removeFromAdditionalProperties( String key){
    if(key != null) {this.additionalProperties.remove(key);} return (T)this;
    }
    public T removeFromAdditionalProperties( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} 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 boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SourceBuildStrategyFluentImpl that = (SourceBuildStrategyFluentImpl) o;
if (env != null ? !env.equals(that.env) :that.env != null) return false;
if (forcePull != null ? !forcePull.equals(that.forcePull) :that.forcePull != null) return false;
if (from != null ? !from.equals(that.from) :that.from != null) return false;
if (incremental != null ? !incremental.equals(that.incremental) :that.incremental != null) return false;
if (pullSecret != null ? !pullSecret.equals(that.pullSecret) :that.pullSecret != null) return false;
if (scripts != null ? !scripts.equals(that.scripts) :that.scripts != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class EnvNestedImpl extends EnvVarFluentImpl> implements EnvNested{

        private final EnvVarBuilder builder;
    
             EnvNestedImpl (){
        this.builder = new EnvVarBuilder(this);
        }
             EnvNestedImpl ( EnvVar item){
        this.builder = new EnvVarBuilder(this, item);
        }
    
            public N endEnv(){
            return and();
        }
            public N and(){
            return (N) SourceBuildStrategyFluentImpl.this.addToEnv(builder.build());
        }
    
}
    public class FromNestedImpl extends ObjectReferenceFluentImpl> implements FromNested{

        private final ObjectReferenceBuilder builder;
    
             FromNestedImpl (){
        this.builder = new ObjectReferenceBuilder(this);
        }
             FromNestedImpl ( ObjectReference item){
        this.builder = new ObjectReferenceBuilder(this, item);
        }
    
            public N endFrom(){
            return and();
        }
            public N and(){
            return (N) SourceBuildStrategyFluentImpl.this.withFrom(builder.build());
        }
    
}
    public class PullSecretNestedImpl extends LocalObjectReferenceFluentImpl> implements PullSecretNested{

        private final LocalObjectReferenceBuilder builder;
    
             PullSecretNestedImpl (){
        this.builder = new LocalObjectReferenceBuilder(this);
        }
             PullSecretNestedImpl ( LocalObjectReference item){
        this.builder = new LocalObjectReferenceBuilder(this, item);
        }
    
            public N and(){
            return (N) SourceBuildStrategyFluentImpl.this.withPullSecret(builder.build());
        }
            public N endPullSecret(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy