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

io.fabric8.openshift.api.model.BuildRequestFluentImpl 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 java.util.Map;
import java.util.List;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.HashMap;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import java.io.Serializable;
import java.util.Collection;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.model.ObjectReference;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluent;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl;
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.ObjectReferenceFluentImpl;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.model.EnvVarFluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluent;
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.ObjectMetaFluent;
import io.fabric8.kubernetes.api.model.ObjectMetaFluentImpl;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;

public class BuildRequestFluentImpl> extends BaseFluent implements BuildRequestFluent{

     String apiVersion;     VisitableBuilder binary;     List> env = new ArrayList();     VisitableBuilder from;     String kind;     Integer lastVersion;     VisitableBuilder metadata;     VisitableBuilder revision;     VisitableBuilder triggeredByImage;     Map additionalProperties = new HashMap();
public BuildRequestFluentImpl(){
    
}
public BuildRequestFluentImpl( BuildRequest instance ){
    this.withApiVersion(instance.getApiVersion()); this.withBinary(instance.getBinary()); this.withEnv(instance.getEnv()); this.withFrom(instance.getFrom()); this.withKind(instance.getKind()); this.withLastVersion(instance.getLastVersion()); this.withMetadata(instance.getMetadata()); this.withRevision(instance.getRevision()); this.withTriggeredByImage(instance.getTriggeredByImage()); 
}

    public String getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion( String apiVersion){
    this.apiVersion=apiVersion; return (T) this;
    }
    public BinaryBuildSource getBinary(){
    return this.binary!=null?this.binary.build():null;
    }
    public T withBinary( BinaryBuildSource binary){
    if (binary!=null){ this.binary= new BinaryBuildSourceBuilder(binary); _visitables.add(this.binary);} return (T) this;
    }
    public BinaryNested withNewBinary(){
    return new BinaryNestedImpl();
    }
    public BinaryNested withNewBinaryLike( BinaryBuildSource item){
    return new BinaryNestedImpl(item);
    }
    public BinaryNested editBinary(){
    return withNewBinaryLike(getBinary());
    }
    public T withNewBinary( String asFile){
    return withBinary(new BinaryBuildSource(asFile));
    }
    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 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 String getKind(){
    return this.kind;
    }
    public T withKind( String kind){
    this.kind=kind; return (T) this;
    }
    public Integer getLastVersion(){
    return this.lastVersion;
    }
    public T withLastVersion( Integer lastVersion){
    this.lastVersion=lastVersion; return (T) this;
    }
    public ObjectMeta getMetadata(){
    return this.metadata!=null?this.metadata.build():null;
    }
    public T withMetadata( ObjectMeta metadata){
    if (metadata!=null){ this.metadata= new ObjectMetaBuilder(metadata); _visitables.add(this.metadata);} return (T) this;
    }
    public MetadataNested withNewMetadata(){
    return new MetadataNestedImpl();
    }
    public MetadataNested withNewMetadataLike( ObjectMeta item){
    return new MetadataNestedImpl(item);
    }
    public MetadataNested editMetadata(){
    return withNewMetadataLike(getMetadata());
    }
    public SourceRevision getRevision(){
    return this.revision!=null?this.revision.build():null;
    }
    public T withRevision( SourceRevision revision){
    if (revision!=null){ this.revision= new SourceRevisionBuilder(revision); _visitables.add(this.revision);} return (T) this;
    }
    public RevisionNested withNewRevision(){
    return new RevisionNestedImpl();
    }
    public RevisionNested withNewRevisionLike( SourceRevision item){
    return new RevisionNestedImpl(item);
    }
    public RevisionNested editRevision(){
    return withNewRevisionLike(getRevision());
    }
    public ObjectReference getTriggeredByImage(){
    return this.triggeredByImage!=null?this.triggeredByImage.build():null;
    }
    public T withTriggeredByImage( ObjectReference triggeredByImage){
    if (triggeredByImage!=null){ this.triggeredByImage= new ObjectReferenceBuilder(triggeredByImage); _visitables.add(this.triggeredByImage);} return (T) this;
    }
    public TriggeredByImageNested withNewTriggeredByImage(){
    return new TriggeredByImageNestedImpl();
    }
    public TriggeredByImageNested withNewTriggeredByImageLike( ObjectReference item){
    return new TriggeredByImageNestedImpl(item);
    }
    public TriggeredByImageNested editTriggeredByImage(){
    return withNewTriggeredByImageLike(getTriggeredByImage());
    }
    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;
BuildRequestFluentImpl that = (BuildRequestFluentImpl) o;
if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
if (binary != null ? !binary.equals(that.binary) :that.binary != null) return false;
if (env != null ? !env.equals(that.env) :that.env != null) return false;
if (from != null ? !from.equals(that.from) :that.from != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (lastVersion != null ? !lastVersion.equals(that.lastVersion) :that.lastVersion != null) return false;
if (metadata != null ? !metadata.equals(that.metadata) :that.metadata != null) return false;
if (revision != null ? !revision.equals(that.revision) :that.revision != null) return false;
if (triggeredByImage != null ? !triggeredByImage.equals(that.triggeredByImage) :that.triggeredByImage != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class BinaryNestedImpl extends BinaryBuildSourceFluentImpl> implements BinaryNested{

        private final BinaryBuildSourceBuilder builder;
    
             BinaryNestedImpl (){
        this.builder = new BinaryBuildSourceBuilder(this);
        }
             BinaryNestedImpl ( BinaryBuildSource item){
        this.builder = new BinaryBuildSourceBuilder(this, item);
        }
    
            public N and(){
            return (N) BuildRequestFluentImpl.this.withBinary(builder.build());
        }
            public N endBinary(){
            return and();
        }
    
}
    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) BuildRequestFluentImpl.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) BuildRequestFluentImpl.this.withFrom(builder.build());
        }
    
}
    public class MetadataNestedImpl extends ObjectMetaFluentImpl> implements MetadataNested{

        private final ObjectMetaBuilder builder;
    
             MetadataNestedImpl ( ObjectMeta item){
        this.builder = new ObjectMetaBuilder(this, item);
        }
             MetadataNestedImpl (){
        this.builder = new ObjectMetaBuilder(this);
        }
    
            public N and(){
            return (N) BuildRequestFluentImpl.this.withMetadata(builder.build());
        }
            public N endMetadata(){
            return and();
        }
    
}
    public class RevisionNestedImpl extends SourceRevisionFluentImpl> implements RevisionNested{

        private final SourceRevisionBuilder builder;
    
             RevisionNestedImpl (){
        this.builder = new SourceRevisionBuilder(this);
        }
             RevisionNestedImpl ( SourceRevision item){
        this.builder = new SourceRevisionBuilder(this, item);
        }
    
            public N endRevision(){
            return and();
        }
            public N and(){
            return (N) BuildRequestFluentImpl.this.withRevision(builder.build());
        }
    
}
    public class TriggeredByImageNestedImpl extends ObjectReferenceFluentImpl> implements TriggeredByImageNested{

        private final ObjectReferenceBuilder builder;
    
             TriggeredByImageNestedImpl (){
        this.builder = new ObjectReferenceBuilder(this);
        }
             TriggeredByImageNestedImpl ( ObjectReference item){
        this.builder = new ObjectReferenceBuilder(this, item);
        }
    
            public N and(){
            return (N) BuildRequestFluentImpl.this.withTriggeredByImage(builder.build());
        }
            public N endTriggeredByImage(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy