annotations.me.snowdrop.applicationcrd.api.model.SchemaFluentImpl Maven / Gradle / Ivy
package me.snowdrop.applicationcrd.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class SchemaFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements SchemaFluent{
private ApplicationBuilder application;
private ApplicationListBuilder applicationList;
public SchemaFluentImpl(){
}
public SchemaFluentImpl(Schema instance){
this.withApplication(instance.getApplication());
this.withApplicationList(instance.getApplicationList());
}
/**
* This method has been deprecated, please use method buildApplication instead.
* @return The buildable object.
*/
@Deprecated public Application getApplication(){
return this.application!=null?this.application.build():null;
}
public Application buildApplication(){
return this.application!=null?this.application.build():null;
}
public A withApplication(Application application){
_visitables.get("application").remove(this.application);
if (application!=null){ this.application= new ApplicationBuilder(application); _visitables.get("application").add(this.application);} return (A) this;
}
public Boolean hasApplication(){
return this.application != null;
}
public SchemaFluent.ApplicationNested withNewApplication(){
return new ApplicationNestedImpl();
}
public SchemaFluent.ApplicationNested withNewApplicationLike(Application item){
return new ApplicationNestedImpl(item);
}
public SchemaFluent.ApplicationNested editApplication(){
return withNewApplicationLike(getApplication());
}
public SchemaFluent.ApplicationNested editOrNewApplication(){
return withNewApplicationLike(getApplication() != null ? getApplication(): new ApplicationBuilder().build());
}
public SchemaFluent.ApplicationNested editOrNewApplicationLike(Application item){
return withNewApplicationLike(getApplication() != null ? getApplication(): item);
}
/**
* This method has been deprecated, please use method buildApplicationList instead.
* @return The buildable object.
*/
@Deprecated public ApplicationList getApplicationList(){
return this.applicationList!=null?this.applicationList.build():null;
}
public ApplicationList buildApplicationList(){
return this.applicationList!=null?this.applicationList.build():null;
}
public A withApplicationList(ApplicationList applicationList){
_visitables.get("applicationList").remove(this.applicationList);
if (applicationList!=null){ this.applicationList= new ApplicationListBuilder(applicationList); _visitables.get("applicationList").add(this.applicationList);} return (A) this;
}
public Boolean hasApplicationList(){
return this.applicationList != null;
}
public SchemaFluent.ApplicationListNested withNewApplicationList(){
return new ApplicationListNestedImpl();
}
public SchemaFluent.ApplicationListNested withNewApplicationListLike(ApplicationList item){
return new ApplicationListNestedImpl(item);
}
public SchemaFluent.ApplicationListNested editApplicationList(){
return withNewApplicationListLike(getApplicationList());
}
public SchemaFluent.ApplicationListNested editOrNewApplicationList(){
return withNewApplicationListLike(getApplicationList() != null ? getApplicationList(): new ApplicationListBuilder().build());
}
public SchemaFluent.ApplicationListNested editOrNewApplicationListLike(ApplicationList item){
return withNewApplicationListLike(getApplicationList() != null ? getApplicationList(): 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;
SchemaFluentImpl that = (SchemaFluentImpl) o;
if (application != null ? !application.equals(that.application) :that.application != null) return false;
if (applicationList != null ? !applicationList.equals(that.applicationList) :that.applicationList != null) return false;
return true;
}
public class ApplicationNestedImpl extends ApplicationFluentImpl> implements SchemaFluent.ApplicationNested,io.fabric8.kubernetes.api.builder.Nested{
private final ApplicationBuilder builder;
ApplicationNestedImpl(Application item){
this.builder = new ApplicationBuilder(this, item);
}
ApplicationNestedImpl(){
this.builder = new ApplicationBuilder(this);
}
public N and(){
return (N) SchemaFluentImpl.this.withApplication(builder.build());
}
public N endApplication(){
return and();
}
}
public class ApplicationListNestedImpl extends ApplicationListFluentImpl> implements SchemaFluent.ApplicationListNested,io.fabric8.kubernetes.api.builder.Nested{
private final ApplicationListBuilder builder;
ApplicationListNestedImpl(ApplicationList item){
this.builder = new ApplicationListBuilder(this, item);
}
ApplicationListNestedImpl(){
this.builder = new ApplicationListBuilder(this);
}
public N and(){
return (N) SchemaFluentImpl.this.withApplicationList(builder.build());
}
public N endApplicationList(){
return and();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy