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

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

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

import java.util.HashMap;
import java.util.Map;
import io.fabric8.common.Nested;
import io.fabric8.common.Builder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;

public class BuildTriggerPolicyFluent> extends BaseFluent implements Fluent{

     WebHookTriggerBuilder generic;     WebHookTriggerBuilder github;     ImageChangeTriggerBuilder imageChange;     String type;     Map additionalProperties = new HashMap();

    public WebHookTrigger getGeneric(){
    return this.generic!=null?this.generic.build():null;
    }
    public T withGeneric( WebHookTrigger generic){
    if (generic!=null){ this.generic= new WebHookTriggerBuilder(generic); _visitables.add(this.generic);} return (T) this;
    }
    public GenericNested withNewGeneric(){
    return new GenericNested();
    }
    public T withNewGeneric( String secret){
    return withGeneric(new WebHookTrigger(secret));
    }
    public WebHookTrigger getGithub(){
    return this.github!=null?this.github.build():null;
    }
    public T withGithub( WebHookTrigger github){
    if (github!=null){ this.github= new WebHookTriggerBuilder(github); _visitables.add(this.github);} return (T) this;
    }
    public GithubNested withNewGithub(){
    return new GithubNested();
    }
    public T withNewGithub( String secret){
    return withGithub(new WebHookTrigger(secret));
    }
    public ImageChangeTrigger getImageChange(){
    return this.imageChange!=null?this.imageChange.build():null;
    }
    public T withImageChange( ImageChangeTrigger imageChange){
    if (imageChange!=null){ this.imageChange= new ImageChangeTriggerBuilder(imageChange); _visitables.add(this.imageChange);} return (T) this;
    }
    public ImageChangeNested withNewImageChange(){
    return new ImageChangeNested();
    }
    public T withNewImageChange( String lastTriggeredImageID){
    return withImageChange(new ImageChangeTrigger(lastTriggeredImageID));
    }
    public String getType(){
    return this.type;
    }
    public T withType( String type){
    this.type=type; return (T) this;
    }
    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 GenericNested extends WebHookTriggerFluent> implements Nested{

        private final WebHookTriggerBuilder builder = new WebHookTriggerBuilder(this);
    
            public N endGeneric(){
            return and();
        }
            public N and(){
            return (N) BuildTriggerPolicyFluent.this.withGeneric(builder.build());
        }
    
}
    public class GithubNested extends WebHookTriggerFluent> implements Nested{

        private final WebHookTriggerBuilder builder = new WebHookTriggerBuilder(this);
    
            public N and(){
            return (N) BuildTriggerPolicyFluent.this.withGithub(builder.build());
        }
            public N endGithub(){
            return and();
        }
    
}
    public class ImageChangeNested extends ImageChangeTriggerFluent> implements Nested{

        private final ImageChangeTriggerBuilder builder = new ImageChangeTriggerBuilder(this);
    
            public N and(){
            return (N) BuildTriggerPolicyFluent.this.withImageChange(builder.build());
        }
            public N endImageChange(){
            return and();
        }
    
}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy