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

annotations.io.fabric8.openshift.api.model.GitSourceRevisionFluentImpl Maven / Gradle / Ivy

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

import java.util.HashMap;
import java.io.Serializable;
import java.util.Map;
import java.util.Map;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;

public class GitSourceRevisionFluentImpl> extends BaseFluent implements GitSourceRevisionFluent{

     VisitableBuilder author;     String commit;     VisitableBuilder committer;     String message;     Map additionalProperties = new HashMap();
public GitSourceRevisionFluentImpl(){
    
}
public GitSourceRevisionFluentImpl( GitSourceRevision instance ){
    this.withAuthor(instance.getAuthor()); this.withCommit(instance.getCommit()); this.withCommitter(instance.getCommitter()); this.withMessage(instance.getMessage()); 
}

    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 AuthorNestedImpl();
    }
    public AuthorNested withNewAuthorLike( SourceControlUser item){
    return new AuthorNestedImpl(item);
    }
    public AuthorNested editAuthor(){
    return withNewAuthorLike(getAuthor());
    }
    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 CommitterNestedImpl();
    }
    public CommitterNested withNewCommitterLike( SourceControlUser item){
    return new CommitterNestedImpl(item);
    }
    public CommitterNested editCommitter(){
    return withNewCommitterLike(getCommitter());
    }
    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 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;
GitSourceRevisionFluentImpl that = (GitSourceRevisionFluentImpl) o;
if (author != null ? !author.equals(that.author) :that.author != null) return false;
if (commit != null ? !commit.equals(that.commit) :that.commit != null) return false;
if (committer != null ? !committer.equals(that.committer) :that.committer != null) return false;
if (message != null ? !message.equals(that.message) :that.message != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class AuthorNestedImpl extends SourceControlUserFluentImpl> implements AuthorNested{

        private final SourceControlUserBuilder builder;
    
             AuthorNestedImpl (){
        this.builder = new SourceControlUserBuilder(this);
        }
             AuthorNestedImpl ( SourceControlUser item){
        this.builder = new SourceControlUserBuilder(this, item);
        }
    
            public N and(){
            return (N) GitSourceRevisionFluentImpl.this.withAuthor(builder.build());
        }
            public N endAuthor(){
            return and();
        }
    
}
    public class CommitterNestedImpl extends SourceControlUserFluentImpl> implements CommitterNested{

        private final SourceControlUserBuilder builder;
    
             CommitterNestedImpl (){
        this.builder = new SourceControlUserBuilder(this);
        }
             CommitterNestedImpl ( SourceControlUser item){
        this.builder = new SourceControlUserBuilder(this, item);
        }
    
            public N and(){
            return (N) GitSourceRevisionFluentImpl.this.withCommitter(builder.build());
        }
            public N endCommitter(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy