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

io.fabric8.openshift.api.model.GitSourceRevisionFluent 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 GitSourceRevisionFluent> extends BaseFluent implements Fluent{

     SourceControlUserBuilder author;     String commit;     SourceControlUserBuilder committer;     String message;     Map additionalProperties = new HashMap();

    public SourceControlUser getAuthor(){
    return this.author!=null?this.author.build():null;
    }
    public T withAuthor( SourceControlUser author){
    if (author!=null){ this.author= new SourceControlUserBuilder(author); _visitables.add(this.author);} return (T) this;
    }
    public AuthorNested withNewAuthor(){
    return new AuthorNested();
    }
    public T withNewAuthor( String email,  String name){
    return withAuthor(new SourceControlUser(email, name));
    }
    public String getCommit(){
    return this.commit;
    }
    public T withCommit( String commit){
    this.commit=commit; return (T) this;
    }
    public SourceControlUser getCommitter(){
    return this.committer!=null?this.committer.build():null;
    }
    public T withCommitter( SourceControlUser committer){
    if (committer!=null){ this.committer= new SourceControlUserBuilder(committer); _visitables.add(this.committer);} return (T) this;
    }
    public CommitterNested withNewCommitter(){
    return new CommitterNested();
    }
    public T withNewCommitter( String email,  String name){
    return withCommitter(new SourceControlUser(email, name));
    }
    public String getMessage(){
    return this.message;
    }
    public T withMessage( String message){
    this.message=message; 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 AuthorNested extends SourceControlUserFluent> implements Nested{

        private final SourceControlUserBuilder builder = new SourceControlUserBuilder(this);
    
            public N endAuthor(){
            return and();
        }
            public N and(){
            return (N) GitSourceRevisionFluent.this.withAuthor(builder.build());
        }
    
}
    public class CommitterNested extends SourceControlUserFluent> implements Nested{

        private final SourceControlUserBuilder builder = new SourceControlUserBuilder(this);
    
            public N endCommitter(){
            return and();
        }
            public N and(){
            return (N) GitSourceRevisionFluent.this.withCommitter(builder.build());
        }
    
}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy