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

annotations.io.alauda.devops.api.model.SourceRevisionFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.devops.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class SourceRevisionFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements SourceRevisionFluent{

    private GitSourceRevisionBuilder git;
    private String type;

    public SourceRevisionFluentImpl(){
    }
    public SourceRevisionFluentImpl(SourceRevision instance){
            this.withGit(instance.getGit()); 
            this.withType(instance.getType()); 
    }

    
/**
 * This method has been deprecated, please use method buildGit instead.
 */
@Deprecated public GitSourceRevision getGit(){
            return this.git!=null?this.git.build():null;
    }

    public GitSourceRevision buildGit(){
            return this.git!=null?this.git.build():null;
    }

    public A withGit(GitSourceRevision git){
            _visitables.remove(this.git);
            if (git!=null){ this.git= new GitSourceRevisionBuilder(git); _visitables.add(this.git);} return (A) this;
    }

    public Boolean hasGit(){
            return this.git!=null;
    }

    public SourceRevisionFluent.GitNested withNewGit(){
            return new GitNestedImpl();
    }

    public SourceRevisionFluent.GitNested withNewGitLike(GitSourceRevision item){
            return new GitNestedImpl(item);
    }

    public SourceRevisionFluent.GitNested editGit(){
            return withNewGitLike(getGit());
    }

    public SourceRevisionFluent.GitNested editOrNewGit(){
            return withNewGitLike(getGit() != null ? getGit(): new GitSourceRevisionBuilder().build());
    }

    public SourceRevisionFluent.GitNested editOrNewGitLike(GitSourceRevision item){
            return withNewGitLike(getGit() != null ? getGit(): item);
    }

    public String getType(){
            return this.type;
    }

    public A withType(String type){
            this.type=type; return (A) this;
    }

    public Boolean hasType(){
            return this.type!=null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            SourceRevisionFluentImpl that = (SourceRevisionFluentImpl) o;
            if (git != null ? !git.equals(that.git) :that.git != null) return false;
            if (type != null ? !type.equals(that.type) :that.type != null) return false;
            return true;
    }


    public class GitNestedImpl extends GitSourceRevisionFluentImpl> implements SourceRevisionFluent.GitNested,io.alauda.kubernetes.api.builder.Nested{

            private final GitSourceRevisionBuilder builder;
    
            GitNestedImpl(GitSourceRevision item){
                    this.builder = new GitSourceRevisionBuilder(this, item);
            }
            GitNestedImpl(){
                    this.builder = new GitSourceRevisionBuilder(this);
            }
    
    public N and(){
            return (N) SourceRevisionFluentImpl.this.withGit(builder.build());
    }
    public N endGit(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy