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

annotations.io.alauda.kubernetes.api.model.OriginCodeRepositoryBuilder Maven / Gradle / Ivy

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

import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class OriginCodeRepositoryBuilder extends OriginCodeRepositoryFluentImpl implements VisitableBuilder{

    OriginCodeRepositoryFluent fluent;
    Boolean validationEnabled;

    public OriginCodeRepositoryBuilder(){
            this(true);
    }
    public OriginCodeRepositoryBuilder(Boolean validationEnabled){
            this(new OriginCodeRepository(), validationEnabled);
    }
    public OriginCodeRepositoryBuilder(OriginCodeRepositoryFluent fluent){
            this(fluent, true);
    }
    public OriginCodeRepositoryBuilder(OriginCodeRepositoryFluent fluent,Boolean validationEnabled){
            this(fluent, new OriginCodeRepository(), validationEnabled);
    }
    public OriginCodeRepositoryBuilder(OriginCodeRepositoryFluent fluent,OriginCodeRepository instance){
            this(fluent, instance, true);
    }
    public OriginCodeRepositoryBuilder(OriginCodeRepositoryFluent fluent,OriginCodeRepository instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withCloneURL(instance.getCloneURL()); 
            fluent.withCodeRepoServiceType(instance.getCodeRepoServiceType()); 
            fluent.withCreatedAt(instance.getCreatedAt()); 
            fluent.withData(instance.getData()); 
            fluent.withDescription(instance.getDescription()); 
            fluent.withFullName(instance.getFullName()); 
            fluent.withHtmlURL(instance.getHtmlURL()); 
            fluent.withId(instance.getId()); 
            fluent.withLanguage(instance.getLanguage()); 
            fluent.withName(instance.getName()); 
            fluent.withOwner(instance.getOwner()); 
            fluent.withPrivate(instance.getPrivate()); 
            fluent.withPushedAt(instance.getPushedAt()); 
            fluent.withSize(instance.getSize()); 
            fluent.withSizeHumanize(instance.getSizeHumanize()); 
            fluent.withSshURL(instance.getSshURL()); 
            fluent.withUpdatedAt(instance.getUpdatedAt()); 
            this.validationEnabled = validationEnabled; 
    }
    public OriginCodeRepositoryBuilder(OriginCodeRepository instance){
            this(instance,true);
    }
    public OriginCodeRepositoryBuilder(OriginCodeRepository instance,Boolean validationEnabled){
            this.fluent = this; 
            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()); 
            this.validationEnabled = validationEnabled; 
    }

    public OriginCodeRepository build(){
            OriginCodeRepository buildable = new OriginCodeRepository(fluent.getCloneURL(),fluent.getCodeRepoServiceType(),fluent.getCreatedAt(),fluent.getData(),fluent.getDescription(),fluent.getFullName(),fluent.getHtmlURL(),fluent.getId(),fluent.getLanguage(),fluent.getName(),fluent.getOwner(),fluent.isPrivate(),fluent.getPushedAt(),fluent.getSize(),fluent.getSizeHumanize(),fluent.getSshURL(),fluent.getUpdatedAt());
            io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            OriginCodeRepositoryBuilder that = (OriginCodeRepositoryBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy