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

annotations.io.alauda.kubernetes.api.model.CodeRepositoryStatusFluentImpl 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.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class CodeRepositoryStatusFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements CodeRepositoryStatusFluent{

    private ServiceStatusBuilder serviceStatus;
    private CodeRepositoryStatusRepositoryBuilder repository;

    public CodeRepositoryStatusFluentImpl(){
    }
    public CodeRepositoryStatusFluentImpl(CodeRepositoryStatus instance){
            this.withServiceStatus(instance.getServiceStatus()); 
            this.withRepository(instance.getRepository()); 
    }

    
/**
 * This method has been deprecated, please use method buildServiceStatus instead.
 */
@Deprecated public ServiceStatus getServiceStatus(){
            return this.serviceStatus!=null?this.serviceStatus.build():null;
    }

    public ServiceStatus buildServiceStatus(){
            return this.serviceStatus!=null?this.serviceStatus.build():null;
    }

    public A withServiceStatus(ServiceStatus serviceStatus){
            _visitables.remove(this.serviceStatus);
            if (serviceStatus!=null){ this.serviceStatus= new ServiceStatusBuilder(serviceStatus); _visitables.add(this.serviceStatus);} return (A) this;
    }

    public Boolean hasServiceStatus(){
            return this.serviceStatus!=null;
    }

    public CodeRepositoryStatusFluent.ServiceStatusNested withNewServiceStatus(){
            return new ServiceStatusNestedImpl();
    }

    public CodeRepositoryStatusFluent.ServiceStatusNested withNewServiceStatusLike(ServiceStatus item){
            return new ServiceStatusNestedImpl(item);
    }

    public CodeRepositoryStatusFluent.ServiceStatusNested editServiceStatus(){
            return withNewServiceStatusLike(getServiceStatus());
    }

    public CodeRepositoryStatusFluent.ServiceStatusNested editOrNewServiceStatus(){
            return withNewServiceStatusLike(getServiceStatus() != null ? getServiceStatus(): new ServiceStatusBuilder().build());
    }

    public CodeRepositoryStatusFluent.ServiceStatusNested editOrNewServiceStatusLike(ServiceStatus item){
            return withNewServiceStatusLike(getServiceStatus() != null ? getServiceStatus(): item);
    }

    
/**
 * This method has been deprecated, please use method buildRepository instead.
 */
@Deprecated public CodeRepositoryStatusRepository getRepository(){
            return this.repository!=null?this.repository.build():null;
    }

    public CodeRepositoryStatusRepository buildRepository(){
            return this.repository!=null?this.repository.build():null;
    }

    public A withRepository(CodeRepositoryStatusRepository repository){
            _visitables.remove(this.repository);
            if (repository!=null){ this.repository= new CodeRepositoryStatusRepositoryBuilder(repository); _visitables.add(this.repository);} return (A) this;
    }

    public Boolean hasRepository(){
            return this.repository!=null;
    }

    public CodeRepositoryStatusFluent.RepositoryNested withNewRepository(){
            return new RepositoryNestedImpl();
    }

    public CodeRepositoryStatusFluent.RepositoryNested withNewRepositoryLike(CodeRepositoryStatusRepository item){
            return new RepositoryNestedImpl(item);
    }

    public CodeRepositoryStatusFluent.RepositoryNested editRepository(){
            return withNewRepositoryLike(getRepository());
    }

    public CodeRepositoryStatusFluent.RepositoryNested editOrNewRepository(){
            return withNewRepositoryLike(getRepository() != null ? getRepository(): new CodeRepositoryStatusRepositoryBuilder().build());
    }

    public CodeRepositoryStatusFluent.RepositoryNested editOrNewRepositoryLike(CodeRepositoryStatusRepository item){
            return withNewRepositoryLike(getRepository() != null ? getRepository(): item);
    }

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


    public class ServiceStatusNestedImpl extends ServiceStatusFluentImpl> implements CodeRepositoryStatusFluent.ServiceStatusNested,io.alauda.kubernetes.api.builder.Nested{

            private final ServiceStatusBuilder builder;
    
            ServiceStatusNestedImpl(ServiceStatus item){
                    this.builder = new ServiceStatusBuilder(this, item);
            }
            ServiceStatusNestedImpl(){
                    this.builder = new ServiceStatusBuilder(this);
            }
    
    public N and(){
            return (N) CodeRepositoryStatusFluentImpl.this.withServiceStatus(builder.build());
    }
    public N endServiceStatus(){
            return and();
    }

}
    public class RepositoryNestedImpl extends CodeRepositoryStatusRepositoryFluentImpl> implements CodeRepositoryStatusFluent.RepositoryNested,io.alauda.kubernetes.api.builder.Nested{

            private final CodeRepositoryStatusRepositoryBuilder builder;
    
            RepositoryNestedImpl(CodeRepositoryStatusRepository item){
                    this.builder = new CodeRepositoryStatusRepositoryBuilder(this, item);
            }
            RepositoryNestedImpl(){
                    this.builder = new CodeRepositoryStatusRepositoryBuilder(this);
            }
    
    public N and(){
            return (N) CodeRepositoryStatusFluentImpl.this.withRepository(builder.build());
    }
    public N endRepository(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy