annotations.io.fabric8.openshift.api.model.DockerBuildStrategyFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model;
import java.util.List;
import java.util.ArrayList;
import java.util.RandomAccess;
import java.util.Map;
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 DockerBuildStrategyFluentImpl> extends BaseFluent implements DockerBuildStrategyFluent{
String dockerfilePath; List> env = new ArrayList(); Boolean forcePull; VisitableBuilder from; Boolean noCache; VisitableBuilder pullSecret; Map additionalProperties = new HashMap();
public DockerBuildStrategyFluentImpl(){
}
public DockerBuildStrategyFluentImpl( DockerBuildStrategy instance ){
this.withDockerfilePath(instance.getDockerfilePath()); this.withEnv(instance.getEnv()); this.withForcePull(instance.getForcePull()); this.withFrom(instance.getFrom()); this.withNoCache(instance.getNoCache()); this.withPullSecret(instance.getPullSecret());
}
public String getDockerfilePath(){
return this.dockerfilePath;
}
public T withDockerfilePath( String dockerfilePath){
this.dockerfilePath=dockerfilePath; return (T) this;
}
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 isNoCache(){
return this.noCache;
}
public T withNoCache( Boolean noCache){
this.noCache=noCache; 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 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;
DockerBuildStrategyFluentImpl that = (DockerBuildStrategyFluentImpl) o;
if (dockerfilePath != null ? !dockerfilePath.equals(that.dockerfilePath) :that.dockerfilePath != null) return false;
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 (noCache != null ? !noCache.equals(that.noCache) :that.noCache != null) return false;
if (pullSecret != null ? !pullSecret.equals(that.pullSecret) :that.pullSecret != 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) DockerBuildStrategyFluentImpl.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) DockerBuildStrategyFluentImpl.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) DockerBuildStrategyFluentImpl.this.withPullSecret(builder.build());
}
public N endPullSecret(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy