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

io.alauda.kubernetes.api.model.OriginCodeRepositoryFluentImpl Maven / Gradle / Ivy

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

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

public class OriginCodeRepositoryFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements OriginCodeRepositoryFluent{

    private String cloneURL;
    private String codeRepoServiceType;
    private String createdAt;
    private Map data = new LinkedHashMap();
    private String description;
    private String fullName;
    private String htmlURL;
    private String id;
    private String language;
    private String name;
    private OwnerInRepositoryBuilder owner;
    private Boolean _private;
    private String pushedAt;
    private Integer size;
    private String sizeHumanize;
    private String sshURL;
    private String updatedAt;

    public OriginCodeRepositoryFluentImpl(){
    }
    public OriginCodeRepositoryFluentImpl(OriginCodeRepository instance){
            this.withCloneURL(instance.getCloneURL()); 
            this.withCodeRepoServiceType(instance.getCodeRepoServiceType()); 
            this.withCreatedAt(instance.getCreatedAt()); 
            this.withData(instance.getData()); 
            this.withDescription(instance.getDescription()); 
            this.withFullName(instance.getFullName()); 
            this.withHtmlURL(instance.getHtmlURL()); 
            this.withId(instance.getId()); 
            this.withLanguage(instance.getLanguage()); 
            this.withName(instance.getName()); 
            this.withOwner(instance.getOwner()); 
            this.withPrivate(instance.getPrivate()); 
            this.withPushedAt(instance.getPushedAt()); 
            this.withSize(instance.getSize()); 
            this.withSizeHumanize(instance.getSizeHumanize()); 
            this.withSshURL(instance.getSshURL()); 
            this.withUpdatedAt(instance.getUpdatedAt()); 
    }

    public String getCloneURL(){
            return this.cloneURL;
    }

    public A withCloneURL(String cloneURL){
            this.cloneURL=cloneURL; return (A) this;
    }

    public Boolean hasCloneURL(){
            return this.cloneURL!=null;
    }

    public String getCodeRepoServiceType(){
            return this.codeRepoServiceType;
    }

    public A withCodeRepoServiceType(String codeRepoServiceType){
            this.codeRepoServiceType=codeRepoServiceType; return (A) this;
    }

    public Boolean hasCodeRepoServiceType(){
            return this.codeRepoServiceType!=null;
    }

    public String getCreatedAt(){
            return this.createdAt;
    }

    public A withCreatedAt(String createdAt){
            this.createdAt=createdAt; return (A) this;
    }

    public Boolean hasCreatedAt(){
            return this.createdAt!=null;
    }

    public A addToData(String key,String value){
            if(key != null && value != null) {this.data.put(key, value);} return (A)this;
    }

    public A addToData(Map map){
            if(map != null) { this.data.putAll(map);} return (A)this;
    }

    public A removeFromData(String key){
            if(key != null) {this.data.remove(key);} return (A)this;
    }

    public A removeFromData(Map map){
            if(map != null) { for(Object key : map.keySet()) {this.data.remove(key);}} return (A)this;
    }

    public Map getData(){
            return this.data;
    }

    public A withData(Map data){
            this.data.clear();
            if (data != null) {this.data.putAll(data);} return (A) this;
    }

    public Boolean hasData(){
            return this.data!=null;
    }

    public String getDescription(){
            return this.description;
    }

    public A withDescription(String description){
            this.description=description; return (A) this;
    }

    public Boolean hasDescription(){
            return this.description!=null;
    }

    public String getFullName(){
            return this.fullName;
    }

    public A withFullName(String fullName){
            this.fullName=fullName; return (A) this;
    }

    public Boolean hasFullName(){
            return this.fullName!=null;
    }

    public String getHtmlURL(){
            return this.htmlURL;
    }

    public A withHtmlURL(String htmlURL){
            this.htmlURL=htmlURL; return (A) this;
    }

    public Boolean hasHtmlURL(){
            return this.htmlURL!=null;
    }

    public String getId(){
            return this.id;
    }

    public A withId(String id){
            this.id=id; return (A) this;
    }

    public Boolean hasId(){
            return this.id!=null;
    }

    public String getLanguage(){
            return this.language;
    }

    public A withLanguage(String language){
            this.language=language; return (A) this;
    }

    public Boolean hasLanguage(){
            return this.language!=null;
    }

    public String getName(){
            return this.name;
    }

    public A withName(String name){
            this.name=name; return (A) this;
    }

    public Boolean hasName(){
            return this.name!=null;
    }

    
/**
 * This method has been deprecated, please use method buildOwner instead.
 */
@Deprecated public OwnerInRepository getOwner(){
            return this.owner!=null?this.owner.build():null;
    }

    public OwnerInRepository buildOwner(){
            return this.owner!=null?this.owner.build():null;
    }

    public A withOwner(OwnerInRepository owner){
            _visitables.remove(this.owner);
            if (owner!=null){ this.owner= new OwnerInRepositoryBuilder(owner); _visitables.add(this.owner);} return (A) this;
    }

    public Boolean hasOwner(){
            return this.owner!=null;
    }

    public OriginCodeRepositoryFluent.OwnerNested withNewOwner(){
            return new OwnerNestedImpl();
    }

    public OriginCodeRepositoryFluent.OwnerNested withNewOwnerLike(OwnerInRepository item){
            return new OwnerNestedImpl(item);
    }

    public OriginCodeRepositoryFluent.OwnerNested editOwner(){
            return withNewOwnerLike(getOwner());
    }

    public OriginCodeRepositoryFluent.OwnerNested editOrNewOwner(){
            return withNewOwnerLike(getOwner() != null ? getOwner(): new OwnerInRepositoryBuilder().build());
    }

    public OriginCodeRepositoryFluent.OwnerNested editOrNewOwnerLike(OwnerInRepository item){
            return withNewOwnerLike(getOwner() != null ? getOwner(): item);
    }

    public A withNewOwner(String id,String name,String type){
            return (A)withOwner(new OwnerInRepository(id, name, type));
    }

    public Boolean isPrivate(){
            return this._private;
    }

    public A withPrivate(Boolean _private){
            this._private=_private; return (A) this;
    }

    public Boolean hasPrivate(){
            return this._private!=null;
    }

    public String getPushedAt(){
            return this.pushedAt;
    }

    public A withPushedAt(String pushedAt){
            this.pushedAt=pushedAt; return (A) this;
    }

    public Boolean hasPushedAt(){
            return this.pushedAt!=null;
    }

    public Integer getSize(){
            return this.size;
    }

    public A withSize(Integer size){
            this.size=size; return (A) this;
    }

    public Boolean hasSize(){
            return this.size!=null;
    }

    public String getSizeHumanize(){
            return this.sizeHumanize;
    }

    public A withSizeHumanize(String sizeHumanize){
            this.sizeHumanize=sizeHumanize; return (A) this;
    }

    public Boolean hasSizeHumanize(){
            return this.sizeHumanize!=null;
    }

    public String getSshURL(){
            return this.sshURL;
    }

    public A withSshURL(String sshURL){
            this.sshURL=sshURL; return (A) this;
    }

    public Boolean hasSshURL(){
            return this.sshURL!=null;
    }

    public String getUpdatedAt(){
            return this.updatedAt;
    }

    public A withUpdatedAt(String updatedAt){
            this.updatedAt=updatedAt; return (A) this;
    }

    public Boolean hasUpdatedAt(){
            return this.updatedAt!=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;
            OriginCodeRepositoryFluentImpl that = (OriginCodeRepositoryFluentImpl) o;
            if (cloneURL != null ? !cloneURL.equals(that.cloneURL) :that.cloneURL != null) return false;
            if (codeRepoServiceType != null ? !codeRepoServiceType.equals(that.codeRepoServiceType) :that.codeRepoServiceType != null) return false;
            if (createdAt != null ? !createdAt.equals(that.createdAt) :that.createdAt != null) return false;
            if (data != null ? !data.equals(that.data) :that.data != null) return false;
            if (description != null ? !description.equals(that.description) :that.description != null) return false;
            if (fullName != null ? !fullName.equals(that.fullName) :that.fullName != null) return false;
            if (htmlURL != null ? !htmlURL.equals(that.htmlURL) :that.htmlURL != null) return false;
            if (id != null ? !id.equals(that.id) :that.id != null) return false;
            if (language != null ? !language.equals(that.language) :that.language != null) return false;
            if (name != null ? !name.equals(that.name) :that.name != null) return false;
            if (owner != null ? !owner.equals(that.owner) :that.owner != null) return false;
            if (_private != null ? !_private.equals(that._private) :that._private != null) return false;
            if (pushedAt != null ? !pushedAt.equals(that.pushedAt) :that.pushedAt != null) return false;
            if (size != null ? !size.equals(that.size) :that.size != null) return false;
            if (sizeHumanize != null ? !sizeHumanize.equals(that.sizeHumanize) :that.sizeHumanize != null) return false;
            if (sshURL != null ? !sshURL.equals(that.sshURL) :that.sshURL != null) return false;
            if (updatedAt != null ? !updatedAt.equals(that.updatedAt) :that.updatedAt != null) return false;
            return true;
    }


    public class OwnerNestedImpl extends OwnerInRepositoryFluentImpl> implements OriginCodeRepositoryFluent.OwnerNested,io.alauda.kubernetes.api.builder.Nested{

            private final OwnerInRepositoryBuilder builder;
    
            OwnerNestedImpl(OwnerInRepository item){
                    this.builder = new OwnerInRepositoryBuilder(this, item);
            }
            OwnerNestedImpl(){
                    this.builder = new OwnerInRepositoryBuilder(this);
            }
    
    public N and(){
            return (N) OriginCodeRepositoryFluentImpl.this.withOwner(builder.build());
    }
    public N endOwner(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy