io.alauda.kubernetes.api.model.CodeRepoBindingSpecFluentImpl Maven / Gradle / Ivy
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.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class CodeRepoBindingSpecFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements CodeRepoBindingSpecFluent{
private CodeRepoBindingAccountBuilder account;
private LocalObjectReferenceBuilder codeRepoService;
public CodeRepoBindingSpecFluentImpl(){
}
public CodeRepoBindingSpecFluentImpl(CodeRepoBindingSpec instance){
this.withAccount(instance.getAccount());
this.withCodeRepoService(instance.getCodeRepoService());
}
/**
* This method has been deprecated, please use method buildAccount instead.
*/
@Deprecated public CodeRepoBindingAccount getAccount(){
return this.account!=null?this.account.build():null;
}
public CodeRepoBindingAccount buildAccount(){
return this.account!=null?this.account.build():null;
}
public A withAccount(CodeRepoBindingAccount account){
_visitables.remove(this.account);
if (account!=null){ this.account= new CodeRepoBindingAccountBuilder(account); _visitables.add(this.account);} return (A) this;
}
public Boolean hasAccount(){
return this.account!=null;
}
public CodeRepoBindingSpecFluent.AccountNested withNewAccount(){
return new AccountNestedImpl();
}
public CodeRepoBindingSpecFluent.AccountNested withNewAccountLike(CodeRepoBindingAccount item){
return new AccountNestedImpl(item);
}
public CodeRepoBindingSpecFluent.AccountNested editAccount(){
return withNewAccountLike(getAccount());
}
public CodeRepoBindingSpecFluent.AccountNested editOrNewAccount(){
return withNewAccountLike(getAccount() != null ? getAccount(): new CodeRepoBindingAccountBuilder().build());
}
public CodeRepoBindingSpecFluent.AccountNested editOrNewAccountLike(CodeRepoBindingAccount item){
return withNewAccountLike(getAccount() != null ? getAccount(): item);
}
/**
* This method has been deprecated, please use method buildCodeRepoService instead.
*/
@Deprecated public LocalObjectReference getCodeRepoService(){
return this.codeRepoService!=null?this.codeRepoService.build():null;
}
public LocalObjectReference buildCodeRepoService(){
return this.codeRepoService!=null?this.codeRepoService.build():null;
}
public A withCodeRepoService(LocalObjectReference codeRepoService){
_visitables.remove(this.codeRepoService);
if (codeRepoService!=null){ this.codeRepoService= new LocalObjectReferenceBuilder(codeRepoService); _visitables.add(this.codeRepoService);} return (A) this;
}
public Boolean hasCodeRepoService(){
return this.codeRepoService!=null;
}
public CodeRepoBindingSpecFluent.CodeRepoServiceNested withNewCodeRepoService(){
return new CodeRepoServiceNestedImpl();
}
public CodeRepoBindingSpecFluent.CodeRepoServiceNested withNewCodeRepoServiceLike(LocalObjectReference item){
return new CodeRepoServiceNestedImpl(item);
}
public CodeRepoBindingSpecFluent.CodeRepoServiceNested editCodeRepoService(){
return withNewCodeRepoServiceLike(getCodeRepoService());
}
public CodeRepoBindingSpecFluent.CodeRepoServiceNested editOrNewCodeRepoService(){
return withNewCodeRepoServiceLike(getCodeRepoService() != null ? getCodeRepoService(): new LocalObjectReferenceBuilder().build());
}
public CodeRepoBindingSpecFluent.CodeRepoServiceNested editOrNewCodeRepoServiceLike(LocalObjectReference item){
return withNewCodeRepoServiceLike(getCodeRepoService() != null ? getCodeRepoService(): item);
}
public A withNewCodeRepoService(String name){
return (A)withCodeRepoService(new LocalObjectReference(name));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
CodeRepoBindingSpecFluentImpl that = (CodeRepoBindingSpecFluentImpl) o;
if (account != null ? !account.equals(that.account) :that.account != null) return false;
if (codeRepoService != null ? !codeRepoService.equals(that.codeRepoService) :that.codeRepoService != null) return false;
return true;
}
public class AccountNestedImpl extends CodeRepoBindingAccountFluentImpl> implements CodeRepoBindingSpecFluent.AccountNested,io.alauda.kubernetes.api.builder.Nested{
private final CodeRepoBindingAccountBuilder builder;
AccountNestedImpl(CodeRepoBindingAccount item){
this.builder = new CodeRepoBindingAccountBuilder(this, item);
}
AccountNestedImpl(){
this.builder = new CodeRepoBindingAccountBuilder(this);
}
public N and(){
return (N) CodeRepoBindingSpecFluentImpl.this.withAccount(builder.build());
}
public N endAccount(){
return and();
}
}
public class CodeRepoServiceNestedImpl extends LocalObjectReferenceFluentImpl> implements CodeRepoBindingSpecFluent.CodeRepoServiceNested,io.alauda.kubernetes.api.builder.Nested{
private final LocalObjectReferenceBuilder builder;
CodeRepoServiceNestedImpl(LocalObjectReference item){
this.builder = new LocalObjectReferenceBuilder(this, item);
}
CodeRepoServiceNestedImpl(){
this.builder = new LocalObjectReferenceBuilder(this);
}
public N and(){
return (N) CodeRepoBindingSpecFluentImpl.this.withCodeRepoService(builder.build());
}
public N endCodeRepoService(){
return and();
}
}
}