annotations.me.snowdrop.servicecatalog.api.model.ServiceInstanceSpecFluentImpl Maven / Gradle / Ivy
The newest version!
package me.snowdrop.servicecatalog.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.ArrayList;
import java.lang.String;
import io.fabric8.kubernetes.api.builder.Predicate;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import java.lang.StringBuffer;
import javax.validation.Valid;
import java.lang.Long;
import java.util.Collection;
import java.lang.Object;
import java.util.Map;
public class ServiceInstanceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ServiceInstanceSpecFluent{
private String clusterServiceClassExternalID;
private String clusterServiceClassExternalName;
private String clusterServiceClassName;
private ClusterObjectReferenceBuilder clusterServiceClassRef;
private String clusterServicePlanExternalID;
private String clusterServicePlanExternalName;
private String clusterServicePlanName;
private ClusterObjectReferenceBuilder clusterServicePlanRef;
private String externalID;
private Map parameters;
private List parametersFrom;
private Long updateRequests;
private UserInfoBuilder userInfo;
public ServiceInstanceSpecFluentImpl(){
}
public ServiceInstanceSpecFluentImpl(ServiceInstanceSpec instance){
this.withClusterServiceClassExternalID(instance.getClusterServiceClassExternalID());
this.withClusterServiceClassExternalName(instance.getClusterServiceClassExternalName());
this.withClusterServiceClassName(instance.getClusterServiceClassName());
this.withClusterServiceClassRef(instance.getClusterServiceClassRef());
this.withClusterServicePlanExternalID(instance.getClusterServicePlanExternalID());
this.withClusterServicePlanExternalName(instance.getClusterServicePlanExternalName());
this.withClusterServicePlanName(instance.getClusterServicePlanName());
this.withClusterServicePlanRef(instance.getClusterServicePlanRef());
this.withExternalID(instance.getExternalID());
this.withParameters(instance.getParameters());
this.withParametersFrom(instance.getParametersFrom());
this.withUpdateRequests(instance.getUpdateRequests());
this.withUserInfo(instance.getUserInfo());
}
public String getClusterServiceClassExternalID(){
return this.clusterServiceClassExternalID;
}
public A withClusterServiceClassExternalID(String clusterServiceClassExternalID){
this.clusterServiceClassExternalID=clusterServiceClassExternalID; return (A) this;
}
public Boolean hasClusterServiceClassExternalID(){
return this.clusterServiceClassExternalID != null;
}
public A withNewClusterServiceClassExternalID(String arg1){
return (A)withClusterServiceClassExternalID(new String(arg1));
}
public A withNewClusterServiceClassExternalID(StringBuilder arg1){
return (A)withClusterServiceClassExternalID(new String(arg1));
}
public A withNewClusterServiceClassExternalID(StringBuffer arg1){
return (A)withClusterServiceClassExternalID(new String(arg1));
}
public String getClusterServiceClassExternalName(){
return this.clusterServiceClassExternalName;
}
public A withClusterServiceClassExternalName(String clusterServiceClassExternalName){
this.clusterServiceClassExternalName=clusterServiceClassExternalName; return (A) this;
}
public Boolean hasClusterServiceClassExternalName(){
return this.clusterServiceClassExternalName != null;
}
public A withNewClusterServiceClassExternalName(String arg1){
return (A)withClusterServiceClassExternalName(new String(arg1));
}
public A withNewClusterServiceClassExternalName(StringBuilder arg1){
return (A)withClusterServiceClassExternalName(new String(arg1));
}
public A withNewClusterServiceClassExternalName(StringBuffer arg1){
return (A)withClusterServiceClassExternalName(new String(arg1));
}
public String getClusterServiceClassName(){
return this.clusterServiceClassName;
}
public A withClusterServiceClassName(String clusterServiceClassName){
this.clusterServiceClassName=clusterServiceClassName; return (A) this;
}
public Boolean hasClusterServiceClassName(){
return this.clusterServiceClassName != null;
}
public A withNewClusterServiceClassName(String arg1){
return (A)withClusterServiceClassName(new String(arg1));
}
public A withNewClusterServiceClassName(StringBuilder arg1){
return (A)withClusterServiceClassName(new String(arg1));
}
public A withNewClusterServiceClassName(StringBuffer arg1){
return (A)withClusterServiceClassName(new String(arg1));
}
/**
* This method has been deprecated, please use method buildClusterServiceClassRef instead.
* @return The buildable object.
*/
@Deprecated public ClusterObjectReference getClusterServiceClassRef(){
return this.clusterServiceClassRef!=null?this.clusterServiceClassRef.build():null;
}
public ClusterObjectReference buildClusterServiceClassRef(){
return this.clusterServiceClassRef!=null?this.clusterServiceClassRef.build():null;
}
public A withClusterServiceClassRef(ClusterObjectReference clusterServiceClassRef){
_visitables.get("clusterServiceClassRef").remove(this.clusterServiceClassRef);
if (clusterServiceClassRef!=null){ this.clusterServiceClassRef= new ClusterObjectReferenceBuilder(clusterServiceClassRef); _visitables.get("clusterServiceClassRef").add(this.clusterServiceClassRef);} return (A) this;
}
public Boolean hasClusterServiceClassRef(){
return this.clusterServiceClassRef != null;
}
public A withNewClusterServiceClassRef(String name){
return (A)withClusterServiceClassRef(new ClusterObjectReference(name));
}
public ServiceInstanceSpecFluent.ClusterServiceClassRefNested withNewClusterServiceClassRef(){
return new ClusterServiceClassRefNestedImpl();
}
public ServiceInstanceSpecFluent.ClusterServiceClassRefNested withNewClusterServiceClassRefLike(ClusterObjectReference item){
return new ClusterServiceClassRefNestedImpl(item);
}
public ServiceInstanceSpecFluent.ClusterServiceClassRefNested editClusterServiceClassRef(){
return withNewClusterServiceClassRefLike(getClusterServiceClassRef());
}
public ServiceInstanceSpecFluent.ClusterServiceClassRefNested editOrNewClusterServiceClassRef(){
return withNewClusterServiceClassRefLike(getClusterServiceClassRef() != null ? getClusterServiceClassRef(): new ClusterObjectReferenceBuilder().build());
}
public ServiceInstanceSpecFluent.ClusterServiceClassRefNested editOrNewClusterServiceClassRefLike(ClusterObjectReference item){
return withNewClusterServiceClassRefLike(getClusterServiceClassRef() != null ? getClusterServiceClassRef(): item);
}
public String getClusterServicePlanExternalID(){
return this.clusterServicePlanExternalID;
}
public A withClusterServicePlanExternalID(String clusterServicePlanExternalID){
this.clusterServicePlanExternalID=clusterServicePlanExternalID; return (A) this;
}
public Boolean hasClusterServicePlanExternalID(){
return this.clusterServicePlanExternalID != null;
}
public A withNewClusterServicePlanExternalID(String arg1){
return (A)withClusterServicePlanExternalID(new String(arg1));
}
public A withNewClusterServicePlanExternalID(StringBuilder arg1){
return (A)withClusterServicePlanExternalID(new String(arg1));
}
public A withNewClusterServicePlanExternalID(StringBuffer arg1){
return (A)withClusterServicePlanExternalID(new String(arg1));
}
public String getClusterServicePlanExternalName(){
return this.clusterServicePlanExternalName;
}
public A withClusterServicePlanExternalName(String clusterServicePlanExternalName){
this.clusterServicePlanExternalName=clusterServicePlanExternalName; return (A) this;
}
public Boolean hasClusterServicePlanExternalName(){
return this.clusterServicePlanExternalName != null;
}
public A withNewClusterServicePlanExternalName(String arg1){
return (A)withClusterServicePlanExternalName(new String(arg1));
}
public A withNewClusterServicePlanExternalName(StringBuilder arg1){
return (A)withClusterServicePlanExternalName(new String(arg1));
}
public A withNewClusterServicePlanExternalName(StringBuffer arg1){
return (A)withClusterServicePlanExternalName(new String(arg1));
}
public String getClusterServicePlanName(){
return this.clusterServicePlanName;
}
public A withClusterServicePlanName(String clusterServicePlanName){
this.clusterServicePlanName=clusterServicePlanName; return (A) this;
}
public Boolean hasClusterServicePlanName(){
return this.clusterServicePlanName != null;
}
public A withNewClusterServicePlanName(String arg1){
return (A)withClusterServicePlanName(new String(arg1));
}
public A withNewClusterServicePlanName(StringBuilder arg1){
return (A)withClusterServicePlanName(new String(arg1));
}
public A withNewClusterServicePlanName(StringBuffer arg1){
return (A)withClusterServicePlanName(new String(arg1));
}
/**
* This method has been deprecated, please use method buildClusterServicePlanRef instead.
* @return The buildable object.
*/
@Deprecated public ClusterObjectReference getClusterServicePlanRef(){
return this.clusterServicePlanRef!=null?this.clusterServicePlanRef.build():null;
}
public ClusterObjectReference buildClusterServicePlanRef(){
return this.clusterServicePlanRef!=null?this.clusterServicePlanRef.build():null;
}
public A withClusterServicePlanRef(ClusterObjectReference clusterServicePlanRef){
_visitables.get("clusterServicePlanRef").remove(this.clusterServicePlanRef);
if (clusterServicePlanRef!=null){ this.clusterServicePlanRef= new ClusterObjectReferenceBuilder(clusterServicePlanRef); _visitables.get("clusterServicePlanRef").add(this.clusterServicePlanRef);} return (A) this;
}
public Boolean hasClusterServicePlanRef(){
return this.clusterServicePlanRef != null;
}
public A withNewClusterServicePlanRef(String name){
return (A)withClusterServicePlanRef(new ClusterObjectReference(name));
}
public ServiceInstanceSpecFluent.ClusterServicePlanRefNested withNewClusterServicePlanRef(){
return new ClusterServicePlanRefNestedImpl();
}
public ServiceInstanceSpecFluent.ClusterServicePlanRefNested withNewClusterServicePlanRefLike(ClusterObjectReference item){
return new ClusterServicePlanRefNestedImpl(item);
}
public ServiceInstanceSpecFluent.ClusterServicePlanRefNested editClusterServicePlanRef(){
return withNewClusterServicePlanRefLike(getClusterServicePlanRef());
}
public ServiceInstanceSpecFluent.ClusterServicePlanRefNested editOrNewClusterServicePlanRef(){
return withNewClusterServicePlanRefLike(getClusterServicePlanRef() != null ? getClusterServicePlanRef(): new ClusterObjectReferenceBuilder().build());
}
public ServiceInstanceSpecFluent.ClusterServicePlanRefNested editOrNewClusterServicePlanRefLike(ClusterObjectReference item){
return withNewClusterServicePlanRefLike(getClusterServicePlanRef() != null ? getClusterServicePlanRef(): item);
}
public String getExternalID(){
return this.externalID;
}
public A withExternalID(String externalID){
this.externalID=externalID; return (A) this;
}
public Boolean hasExternalID(){
return this.externalID != null;
}
public A withNewExternalID(String arg1){
return (A)withExternalID(new String(arg1));
}
public A withNewExternalID(StringBuilder arg1){
return (A)withExternalID(new String(arg1));
}
public A withNewExternalID(StringBuffer arg1){
return (A)withExternalID(new String(arg1));
}
public A addToParameters(String key,Object value){
if(this.parameters == null && key != null && value != null) { this.parameters = new LinkedHashMap(); }
if(key != null && value != null) {this.parameters.put(key, value);} return (A)this;
}
public A addToParameters(Map map){
if(this.parameters == null && map != null) { this.parameters = new LinkedHashMap(); }
if(map != null) { this.parameters.putAll(map);} return (A)this;
}
public A removeFromParameters(String key){
if(this.parameters == null) { return (A) this; }
if(key != null && this.parameters != null) {this.parameters.remove(key);} return (A)this;
}
public A removeFromParameters(Map map){
if(this.parameters == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.parameters != null){this.parameters.remove(key);}}} return (A)this;
}
public Map getParameters(){
return this.parameters;
}
public A withParameters(Map parameters){
if (parameters == null) { this.parameters = null;} else {this.parameters = new LinkedHashMap(parameters);} return (A) this;
}
public Boolean hasParameters(){
return this.parameters != null;
}
public A addToParametersFrom(int index,ParametersFromSource item){
if (this.parametersFrom == null) {this.parametersFrom = new ArrayList();}
ParametersFromSourceBuilder builder = new ParametersFromSourceBuilder(item);_visitables.get("parametersFrom").add(index >= 0 ? index : _visitables.get("parametersFrom").size(), builder);this.parametersFrom.add(index >= 0 ? index : parametersFrom.size(), builder); return (A)this;
}
public A setToParametersFrom(int index,ParametersFromSource item){
if (this.parametersFrom == null) {this.parametersFrom = new ArrayList();}
ParametersFromSourceBuilder builder = new ParametersFromSourceBuilder(item);
if (index < 0 || index >= _visitables.get("parametersFrom").size()) { _visitables.get("parametersFrom").add(builder); } else { _visitables.get("parametersFrom").set(index, builder);}
if (index < 0 || index >= parametersFrom.size()) { parametersFrom.add(builder); } else { parametersFrom.set(index, builder);}
return (A)this;
}
public A addToParametersFrom(ParametersFromSource... items){
if (this.parametersFrom == null) {this.parametersFrom = new ArrayList();}
for (ParametersFromSource item : items) {ParametersFromSourceBuilder builder = new ParametersFromSourceBuilder(item);_visitables.get("parametersFrom").add(builder);this.parametersFrom.add(builder);} return (A)this;
}
public A addAllToParametersFrom(Collection items){
if (this.parametersFrom == null) {this.parametersFrom = new ArrayList();}
for (ParametersFromSource item : items) {ParametersFromSourceBuilder builder = new ParametersFromSourceBuilder(item);_visitables.get("parametersFrom").add(builder);this.parametersFrom.add(builder);} return (A)this;
}
public A removeFromParametersFrom(ParametersFromSource... items){
for (ParametersFromSource item : items) {ParametersFromSourceBuilder builder = new ParametersFromSourceBuilder(item);_visitables.get("parametersFrom").remove(builder);if (this.parametersFrom != null) {this.parametersFrom.remove(builder);}} return (A)this;
}
public A removeAllFromParametersFrom(Collection items){
for (ParametersFromSource item : items) {ParametersFromSourceBuilder builder = new ParametersFromSourceBuilder(item);_visitables.get("parametersFrom").remove(builder);if (this.parametersFrom != null) {this.parametersFrom.remove(builder);}} return (A)this;
}
/**
* This method has been deprecated, please use method buildParametersFrom instead.
* @return The buildable object.
*/
@Deprecated public List getParametersFrom(){
return build(parametersFrom);
}
public List buildParametersFrom(){
return build(parametersFrom);
}
public ParametersFromSource buildParametersFrom(int index){
return this.parametersFrom.get(index).build();
}
public ParametersFromSource buildFirstParametersFrom(){
return this.parametersFrom.get(0).build();
}
public ParametersFromSource buildLastParametersFrom(){
return this.parametersFrom.get(parametersFrom.size() - 1).build();
}
public ParametersFromSource buildMatchingParametersFrom(io.fabric8.kubernetes.api.builder.Predicate predicate){
for (ParametersFromSourceBuilder item: parametersFrom) { if(predicate.apply(item)){return item.build();} } return null;
}
public Boolean hasMatchingParametersFrom(io.fabric8.kubernetes.api.builder.Predicate predicate){
for (ParametersFromSourceBuilder item: parametersFrom) { if(predicate.apply(item)){return true;} } return false;
}
public A withParametersFrom(List parametersFrom){
if (this.parametersFrom != null) { _visitables.get("parametersFrom").removeAll(this.parametersFrom);}
if (parametersFrom != null) {this.parametersFrom = new ArrayList(); for (ParametersFromSource item : parametersFrom){this.addToParametersFrom(item);}} else { this.parametersFrom = null;} return (A) this;
}
public A withParametersFrom(ParametersFromSource... parametersFrom){
if (this.parametersFrom != null) {this.parametersFrom.clear();}
if (parametersFrom != null) {for (ParametersFromSource item :parametersFrom){ this.addToParametersFrom(item);}} return (A) this;
}
public Boolean hasParametersFrom(){
return parametersFrom != null && !parametersFrom.isEmpty();
}
public ServiceInstanceSpecFluent.ParametersFromNested addNewParametersFrom(){
return new ParametersFromNestedImpl();
}
public ServiceInstanceSpecFluent.ParametersFromNested addNewParametersFromLike(ParametersFromSource item){
return new ParametersFromNestedImpl(-1, item);
}
public ServiceInstanceSpecFluent.ParametersFromNested setNewParametersFromLike(int index,ParametersFromSource item){
return new ParametersFromNestedImpl(index, item);
}
public ServiceInstanceSpecFluent.ParametersFromNested editParametersFrom(int index){
if (parametersFrom.size() <= index) throw new RuntimeException("Can't edit parametersFrom. Index exceeds size.");
return setNewParametersFromLike(index, buildParametersFrom(index));
}
public ServiceInstanceSpecFluent.ParametersFromNested editFirstParametersFrom(){
if (parametersFrom.size() == 0) throw new RuntimeException("Can't edit first parametersFrom. The list is empty.");
return setNewParametersFromLike(0, buildParametersFrom(0));
}
public ServiceInstanceSpecFluent.ParametersFromNested editLastParametersFrom(){
int index = parametersFrom.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last parametersFrom. The list is empty.");
return setNewParametersFromLike(index, buildParametersFrom(index));
}
public ServiceInstanceSpecFluent.ParametersFromNested editMatchingParametersFrom(io.fabric8.kubernetes.api.builder.Predicate predicate){
int index = -1;
for (int i=0;i withNewUserInfo(){
return new UserInfoNestedImpl();
}
public ServiceInstanceSpecFluent.UserInfoNested withNewUserInfoLike(UserInfo item){
return new UserInfoNestedImpl(item);
}
public ServiceInstanceSpecFluent.UserInfoNested editUserInfo(){
return withNewUserInfoLike(getUserInfo());
}
public ServiceInstanceSpecFluent.UserInfoNested editOrNewUserInfo(){
return withNewUserInfoLike(getUserInfo() != null ? getUserInfo(): new UserInfoBuilder().build());
}
public ServiceInstanceSpecFluent.UserInfoNested editOrNewUserInfoLike(UserInfo item){
return withNewUserInfoLike(getUserInfo() != null ? getUserInfo(): 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;
ServiceInstanceSpecFluentImpl that = (ServiceInstanceSpecFluentImpl) o;
if (clusterServiceClassExternalID != null ? !clusterServiceClassExternalID.equals(that.clusterServiceClassExternalID) :that.clusterServiceClassExternalID != null) return false;
if (clusterServiceClassExternalName != null ? !clusterServiceClassExternalName.equals(that.clusterServiceClassExternalName) :that.clusterServiceClassExternalName != null) return false;
if (clusterServiceClassName != null ? !clusterServiceClassName.equals(that.clusterServiceClassName) :that.clusterServiceClassName != null) return false;
if (clusterServiceClassRef != null ? !clusterServiceClassRef.equals(that.clusterServiceClassRef) :that.clusterServiceClassRef != null) return false;
if (clusterServicePlanExternalID != null ? !clusterServicePlanExternalID.equals(that.clusterServicePlanExternalID) :that.clusterServicePlanExternalID != null) return false;
if (clusterServicePlanExternalName != null ? !clusterServicePlanExternalName.equals(that.clusterServicePlanExternalName) :that.clusterServicePlanExternalName != null) return false;
if (clusterServicePlanName != null ? !clusterServicePlanName.equals(that.clusterServicePlanName) :that.clusterServicePlanName != null) return false;
if (clusterServicePlanRef != null ? !clusterServicePlanRef.equals(that.clusterServicePlanRef) :that.clusterServicePlanRef != null) return false;
if (externalID != null ? !externalID.equals(that.externalID) :that.externalID != null) return false;
if (parameters != null ? !parameters.equals(that.parameters) :that.parameters != null) return false;
if (parametersFrom != null ? !parametersFrom.equals(that.parametersFrom) :that.parametersFrom != null) return false;
if (updateRequests != null ? !updateRequests.equals(that.updateRequests) :that.updateRequests != null) return false;
if (userInfo != null ? !userInfo.equals(that.userInfo) :that.userInfo != null) return false;
return true;
}
public class ClusterServiceClassRefNestedImpl extends ClusterObjectReferenceFluentImpl> implements ServiceInstanceSpecFluent.ClusterServiceClassRefNested,io.fabric8.kubernetes.api.builder.Nested{
private final ClusterObjectReferenceBuilder builder;
ClusterServiceClassRefNestedImpl(ClusterObjectReference item){
this.builder = new ClusterObjectReferenceBuilder(this, item);
}
ClusterServiceClassRefNestedImpl(){
this.builder = new ClusterObjectReferenceBuilder(this);
}
public N and(){
return (N) ServiceInstanceSpecFluentImpl.this.withClusterServiceClassRef(builder.build());
}
public N endClusterServiceClassRef(){
return and();
}
}
public class ClusterServicePlanRefNestedImpl extends ClusterObjectReferenceFluentImpl> implements ServiceInstanceSpecFluent.ClusterServicePlanRefNested,io.fabric8.kubernetes.api.builder.Nested{
private final ClusterObjectReferenceBuilder builder;
ClusterServicePlanRefNestedImpl(ClusterObjectReference item){
this.builder = new ClusterObjectReferenceBuilder(this, item);
}
ClusterServicePlanRefNestedImpl(){
this.builder = new ClusterObjectReferenceBuilder(this);
}
public N and(){
return (N) ServiceInstanceSpecFluentImpl.this.withClusterServicePlanRef(builder.build());
}
public N endClusterServicePlanRef(){
return and();
}
}
public class ParametersFromNestedImpl extends ParametersFromSourceFluentImpl> implements ServiceInstanceSpecFluent.ParametersFromNested,io.fabric8.kubernetes.api.builder.Nested{
private final ParametersFromSourceBuilder builder;
private final int index;
ParametersFromNestedImpl(int index,ParametersFromSource item){
this.index = index;
this.builder = new ParametersFromSourceBuilder(this, item);
}
ParametersFromNestedImpl(){
this.index = -1;
this.builder = new ParametersFromSourceBuilder(this);
}
public N and(){
return (N) ServiceInstanceSpecFluentImpl.this.setToParametersFrom(index, builder.build());
}
public N endParametersFrom(){
return and();
}
}
public class UserInfoNestedImpl extends UserInfoFluentImpl> implements ServiceInstanceSpecFluent.UserInfoNested,io.fabric8.kubernetes.api.builder.Nested{
private final UserInfoBuilder builder;
UserInfoNestedImpl(UserInfo item){
this.builder = new UserInfoBuilder(this, item);
}
UserInfoNestedImpl(){
this.builder = new UserInfoBuilder(this);
}
public N and(){
return (N) ServiceInstanceSpecFluentImpl.this.withUserInfo(builder.build());
}
public N endUserInfo(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy