io.fabric8.tekton.triggers.v1alpha1.TriggerTemplateSpecFluentImpl Maven / Gradle / Ivy
package io.fabric8.tekton.triggers.v1alpha1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.util.ArrayList;
import java.lang.String;
import java.util.function.Predicate;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.List;
import java.lang.Boolean;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaimFluentImpl;
import java.util.Collection;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import java.lang.Object;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import java.util.Iterator;
import java.lang.Integer;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class TriggerTemplateSpecFluentImpl> extends BaseFluent implements TriggerTemplateSpecFluent{
public TriggerTemplateSpecFluentImpl() {
}
public TriggerTemplateSpecFluentImpl(TriggerTemplateSpec instance) {
this.withParams(instance.getParams());
this.withResourcetemplates(instance.getResourcetemplates());
}
private ArrayList params = new ArrayList();
private ArrayList> resourcetemplates = new ArrayList>();
public A addToParams(Integer index,ParamSpec item) {
if (this.params == null) {this.params = new ArrayList();}
ParamSpecBuilder builder = new ParamSpecBuilder(item);_visitables.get("params").add(index >= 0 ? index : _visitables.get("params").size(), builder);this.params.add(index >= 0 ? index : params.size(), builder); return (A)this;
}
public A setToParams(Integer index,ParamSpec item) {
if (this.params == null) {this.params = new ArrayList();}
ParamSpecBuilder builder = new ParamSpecBuilder(item);
if (index < 0 || index >= _visitables.get("params").size()) { _visitables.get("params").add(builder); } else { _visitables.get("params").set(index, builder);}
if (index < 0 || index >= params.size()) { params.add(builder); } else { params.set(index, builder);}
return (A)this;
}
public A addToParams(io.fabric8.tekton.triggers.v1alpha1.ParamSpec... items) {
if (this.params == null) {this.params = new ArrayList();}
for (ParamSpec item : items) {ParamSpecBuilder builder = new ParamSpecBuilder(item);_visitables.get("params").add(builder);this.params.add(builder);} return (A)this;
}
public A addAllToParams(Collection items) {
if (this.params == null) {this.params = new ArrayList();}
for (ParamSpec item : items) {ParamSpecBuilder builder = new ParamSpecBuilder(item);_visitables.get("params").add(builder);this.params.add(builder);} return (A)this;
}
public A removeFromParams(io.fabric8.tekton.triggers.v1alpha1.ParamSpec... items) {
for (ParamSpec item : items) {ParamSpecBuilder builder = new ParamSpecBuilder(item);_visitables.get("params").remove(builder);if (this.params != null) {this.params.remove(builder);}} return (A)this;
}
public A removeAllFromParams(Collection items) {
for (ParamSpec item : items) {ParamSpecBuilder builder = new ParamSpecBuilder(item);_visitables.get("params").remove(builder);if (this.params != null) {this.params.remove(builder);}} return (A)this;
}
public A removeMatchingFromParams(Predicate predicate) {
if (params == null) return (A) this;
final Iterator each = params.iterator();
final List visitables = _visitables.get("params");
while (each.hasNext()) {
ParamSpecBuilder builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
/**
* This method has been deprecated, please use method buildParams instead.
* @return The buildable object.
*/
@Deprecated
public List getParams() {
return params != null ? build(params) : null;
}
public List buildParams() {
return params != null ? build(params) : null;
}
public ParamSpec buildParam(Integer index) {
return this.params.get(index).build();
}
public ParamSpec buildFirstParam() {
return this.params.get(0).build();
}
public ParamSpec buildLastParam() {
return this.params.get(params.size() - 1).build();
}
public ParamSpec buildMatchingParam(Predicate predicate) {
for (ParamSpecBuilder item: params) { if(predicate.test(item)){ return item.build();} } return null;
}
public Boolean hasMatchingParam(Predicate predicate) {
for (ParamSpecBuilder item: params) { if(predicate.test(item)){ return true;} } return false;
}
public A withParams(List params) {
if (this.params != null) { _visitables.get("params").removeAll(this.params);}
if (params != null) {this.params = new ArrayList(); for (ParamSpec item : params){this.addToParams(item);}} else { this.params = null;} return (A) this;
}
public A withParams(io.fabric8.tekton.triggers.v1alpha1.ParamSpec... params) {
if (this.params != null) {this.params.clear();}
if (params != null) {for (ParamSpec item :params){ this.addToParams(item);}} return (A) this;
}
public Boolean hasParams() {
return params != null && !params.isEmpty();
}
public A addNewParam(String _default,String description,String name) {
return (A)addToParams(new ParamSpec(_default, description, name));
}
public TriggerTemplateSpecFluent.ParamsNested addNewParam() {
return new TriggerTemplateSpecFluentImpl.ParamsNestedImpl();
}
public TriggerTemplateSpecFluent.ParamsNested addNewParamLike(ParamSpec item) {
return new TriggerTemplateSpecFluentImpl.ParamsNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.ParamsNested setNewParamLike(Integer index,ParamSpec item) {
return new TriggerTemplateSpecFluentImpl.ParamsNestedImpl(index, item);
}
public TriggerTemplateSpecFluent.ParamsNested editParam(Integer index) {
if (params.size() <= index) throw new RuntimeException("Can't edit params. Index exceeds size.");
return setNewParamLike(index, buildParam(index));
}
public TriggerTemplateSpecFluent.ParamsNested editFirstParam() {
if (params.size() == 0) throw new RuntimeException("Can't edit first params. The list is empty.");
return setNewParamLike(0, buildParam(0));
}
public TriggerTemplateSpecFluent.ParamsNested editLastParam() {
int index = params.size() - 1;
if (index < 0) throw new RuntimeException("Can't edit last params. The list is empty.");
return setNewParamLike(index, buildParam(index));
}
public TriggerTemplateSpecFluent.ParamsNested editMatchingParam(Predicate predicate) {
int index = -1;
for (int i=0;i builder) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder); return (A)this;
}
public A addToResourcetemplates(Integer index,VisitableBuilder extends HasMetadata,?> builder) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
_visitables.get("resourcetemplates").add(index, builder);this.resourcetemplates.add(index, builder); return (A)this;
}
public A addToResourcetemplates(Integer index,HasMetadata item) {
if (item instanceof TriggerTemplate){addToTriggerTemplateResourcetemplates(index, (TriggerTemplate)item);}
else if (item instanceof ClusterInterceptor){addToClusterInterceptorResourcetemplates(index, (ClusterInterceptor)item);}
else if (item instanceof TriggerBinding){addToTriggerBindingResourcetemplates(index, (TriggerBinding)item);}
else if (item instanceof ClusterTriggerBinding){addToClusterTriggerBindingResourcetemplates(index, (ClusterTriggerBinding)item);}
else if (item instanceof PersistentVolumeClaim){addToPersistentVolumeClaimResourcetemplates(index, (PersistentVolumeClaim)item);}
else if (item instanceof EventListener){addToEventListenerResourcetemplates(index, (EventListener)item);}
else if (item instanceof Trigger){addToTriggerResourcetemplates(index, (Trigger)item);}
return (A)this;
}
public A setToResourcetemplates(Integer index,HasMetadata item) {
if (item instanceof TriggerTemplate){setToTriggerTemplateResourcetemplates(index, (TriggerTemplate)item);}
else if (item instanceof ClusterInterceptor){setToClusterInterceptorResourcetemplates(index, (ClusterInterceptor)item);}
else if (item instanceof TriggerBinding){setToTriggerBindingResourcetemplates(index, (TriggerBinding)item);}
else if (item instanceof ClusterTriggerBinding){setToClusterTriggerBindingResourcetemplates(index, (ClusterTriggerBinding)item);}
else if (item instanceof PersistentVolumeClaim){setToPersistentVolumeClaimResourcetemplates(index, (PersistentVolumeClaim)item);}
else if (item instanceof EventListener){setToEventListenerResourcetemplates(index, (EventListener)item);}
else if (item instanceof Trigger){setToTriggerResourcetemplates(index, (Trigger)item);}
return (A)this;
}
public A addToResourcetemplates(io.fabric8.kubernetes.api.model.HasMetadata... items) {
if (items != null && items.length > 0 && this.resourcetemplates== null) {this.resourcetemplates = new ArrayList>();}
for (HasMetadata item : items) {
if (item instanceof TriggerTemplate){addToTriggerTemplateResourcetemplates((TriggerTemplate)item);}
else if (item instanceof ClusterInterceptor){addToClusterInterceptorResourcetemplates((ClusterInterceptor)item);}
else if (item instanceof TriggerBinding){addToTriggerBindingResourcetemplates((TriggerBinding)item);}
else if (item instanceof ClusterTriggerBinding){addToClusterTriggerBindingResourcetemplates((ClusterTriggerBinding)item);}
else if (item instanceof PersistentVolumeClaim){addToPersistentVolumeClaimResourcetemplates((PersistentVolumeClaim)item);}
else if (item instanceof EventListener){addToEventListenerResourcetemplates((EventListener)item);}
else if (item instanceof Trigger){addToTriggerResourcetemplates((Trigger)item);}
else { VisitableBuilder extends HasMetadata,?> builder = builderOf(item); _visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder); }
} return (A)this;
}
public A addAllToResourcetemplates(Collection items) {
if (items != null && items.size() > 0 && this.resourcetemplates== null) {this.resourcetemplates = new ArrayList>();}
for (HasMetadata item : items) {
if (item instanceof TriggerTemplate){addToTriggerTemplateResourcetemplates((TriggerTemplate)item);}
else if (item instanceof ClusterInterceptor){addToClusterInterceptorResourcetemplates((ClusterInterceptor)item);}
else if (item instanceof TriggerBinding){addToTriggerBindingResourcetemplates((TriggerBinding)item);}
else if (item instanceof ClusterTriggerBinding){addToClusterTriggerBindingResourcetemplates((ClusterTriggerBinding)item);}
else if (item instanceof PersistentVolumeClaim){addToPersistentVolumeClaimResourcetemplates((PersistentVolumeClaim)item);}
else if (item instanceof EventListener){addToEventListenerResourcetemplates((EventListener)item);}
else if (item instanceof Trigger){addToTriggerResourcetemplates((Trigger)item);}
else { VisitableBuilder extends HasMetadata,?> builder = builderOf(item); _visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder); }
} return (A)this;
}
public A removeFromResourcetemplates(VisitableBuilder extends HasMetadata,?> builder) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
_visitables.get("resourcetemplates").remove(builder);this.resourcetemplates.remove(builder); return (A)this;
}
public A removeFromResourcetemplates(io.fabric8.kubernetes.api.model.HasMetadata... items) {
for (HasMetadata item : items) {if (item instanceof TriggerTemplate){removeFromTriggerTemplateResourcetemplates((TriggerTemplate)item);}
else if (item instanceof ClusterInterceptor){removeFromClusterInterceptorResourcetemplates((ClusterInterceptor)item);}
else if (item instanceof TriggerBinding){removeFromTriggerBindingResourcetemplates((TriggerBinding)item);}
else if (item instanceof ClusterTriggerBinding){removeFromClusterTriggerBindingResourcetemplates((ClusterTriggerBinding)item);}
else if (item instanceof PersistentVolumeClaim){removeFromPersistentVolumeClaimResourcetemplates((PersistentVolumeClaim)item);}
else if (item instanceof EventListener){removeFromEventListenerResourcetemplates((EventListener)item);}
else if (item instanceof Trigger){removeFromTriggerResourcetemplates((Trigger)item);}
else { VisitableBuilder extends HasMetadata,?> builder = builderOf(item); _visitables.get("resourcetemplates").remove(builder);this.resourcetemplates.remove(builder); }
} return (A)this;
}
public A removeAllFromResourcetemplates(Collection items) {
for (HasMetadata item : items) {if (item instanceof TriggerTemplate){removeFromTriggerTemplateResourcetemplates((TriggerTemplate)item);}
else if (item instanceof ClusterInterceptor){removeFromClusterInterceptorResourcetemplates((ClusterInterceptor)item);}
else if (item instanceof TriggerBinding){removeFromTriggerBindingResourcetemplates((TriggerBinding)item);}
else if (item instanceof ClusterTriggerBinding){removeFromClusterTriggerBindingResourcetemplates((ClusterTriggerBinding)item);}
else if (item instanceof PersistentVolumeClaim){removeFromPersistentVolumeClaimResourcetemplates((PersistentVolumeClaim)item);}
else if (item instanceof EventListener){removeFromEventListenerResourcetemplates((EventListener)item);}
else if (item instanceof Trigger){removeFromTriggerResourcetemplates((Trigger)item);}
else { VisitableBuilder extends HasMetadata,?> builder = builderOf(item); _visitables.get("resourcetemplates").remove(builder);this.resourcetemplates.remove(builder); }
} return (A)this;
}
/**
* This method has been deprecated, please use method buildResourcetemplates instead.
* @return The buildable object.
*/
@Deprecated
public List getResourcetemplates() {
return build(resourcetemplates);
}
public List buildResourcetemplates() {
return build(resourcetemplates);
}
public HasMetadata buildResourcetemplate(Integer index) {
return this.resourcetemplates.get(index).build();
}
public HasMetadata buildFirstResourcetemplate() {
return this.resourcetemplates.get(0).build();
}
public HasMetadata buildLastResourcetemplate() {
return this.resourcetemplates.get(resourcetemplates.size() - 1).build();
}
public HasMetadata buildMatchingResourcetemplate(Predicate> predicate) {
for (VisitableBuilder extends HasMetadata,?> item: resourcetemplates) { if(predicate.test(item)){ return item.build();} } return null;
}
public Boolean hasMatchingResourcetemplate(Predicate> predicate) {
for (VisitableBuilder extends HasMetadata,?> item: resourcetemplates) { if(predicate.test(item)){ return true;} } return false;
}
public A withResourcetemplates(List resourcetemplates) {
if (resourcetemplates != null) {this.resourcetemplates = new ArrayList(); for (HasMetadata item : resourcetemplates){this.addToResourcetemplates(item);}} else { this.resourcetemplates = null;} return (A) this;
}
public A withResourcetemplates(io.fabric8.kubernetes.api.model.HasMetadata... resourcetemplates) {
if (this.resourcetemplates != null) {this.resourcetemplates.clear();}
if (resourcetemplates != null) {for (HasMetadata item :resourcetemplates){ this.addToResourcetemplates(item);}} return (A) this;
}
public Boolean hasResourcetemplates() {
return resourcetemplates != null && !resourcetemplates.isEmpty();
}
public A addToTriggerTemplateResourcetemplates(Integer index,TriggerTemplate item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
TriggerTemplateBuilder builder = new TriggerTemplateBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToTriggerTemplateResourcetemplates(Integer index,TriggerTemplate item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
TriggerTemplateBuilder builder = new TriggerTemplateBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToTriggerTemplateResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.TriggerTemplate... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (TriggerTemplate item : items) {TriggerTemplateBuilder builder = new TriggerTemplateBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToTriggerTemplateResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (TriggerTemplate item : items) {TriggerTemplateBuilder builder = new TriggerTemplateBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromTriggerTemplateResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.TriggerTemplate... items) {
for (TriggerTemplate item : items) {TriggerTemplateBuilder builder = new TriggerTemplateBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromTriggerTemplateResourcetemplates(Collection items) {
for (TriggerTemplate item : items) {TriggerTemplateBuilder builder = new TriggerTemplateBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromTriggerTemplateResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.TriggerTemplateResourcetemplatesNested addNewTriggerTemplateResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.TriggerTemplateResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.TriggerTemplateResourcetemplatesNested addNewTriggerTemplateResourcetemplateLike(TriggerTemplate item) {
return new TriggerTemplateSpecFluentImpl.TriggerTemplateResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.TriggerTemplateResourcetemplatesNested setNewTriggerTemplateResourcetemplateLike(Integer index,TriggerTemplate item) {
return new TriggerTemplateSpecFluentImpl.TriggerTemplateResourcetemplatesNestedImpl(index, item);
}
public A addToClusterInterceptorResourcetemplates(Integer index,ClusterInterceptor item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
ClusterInterceptorBuilder builder = new ClusterInterceptorBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToClusterInterceptorResourcetemplates(Integer index,ClusterInterceptor item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
ClusterInterceptorBuilder builder = new ClusterInterceptorBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToClusterInterceptorResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.ClusterInterceptor... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (ClusterInterceptor item : items) {ClusterInterceptorBuilder builder = new ClusterInterceptorBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToClusterInterceptorResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (ClusterInterceptor item : items) {ClusterInterceptorBuilder builder = new ClusterInterceptorBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromClusterInterceptorResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.ClusterInterceptor... items) {
for (ClusterInterceptor item : items) {ClusterInterceptorBuilder builder = new ClusterInterceptorBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromClusterInterceptorResourcetemplates(Collection items) {
for (ClusterInterceptor item : items) {ClusterInterceptorBuilder builder = new ClusterInterceptorBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromClusterInterceptorResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.ClusterInterceptorResourcetemplatesNested addNewClusterInterceptorResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.ClusterInterceptorResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.ClusterInterceptorResourcetemplatesNested addNewClusterInterceptorResourcetemplateLike(ClusterInterceptor item) {
return new TriggerTemplateSpecFluentImpl.ClusterInterceptorResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.ClusterInterceptorResourcetemplatesNested setNewClusterInterceptorResourcetemplateLike(Integer index,ClusterInterceptor item) {
return new TriggerTemplateSpecFluentImpl.ClusterInterceptorResourcetemplatesNestedImpl(index, item);
}
public A addToTriggerBindingResourcetemplates(Integer index,TriggerBinding item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
TriggerBindingBuilder builder = new TriggerBindingBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToTriggerBindingResourcetemplates(Integer index,TriggerBinding item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
TriggerBindingBuilder builder = new TriggerBindingBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToTriggerBindingResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.TriggerBinding... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (TriggerBinding item : items) {TriggerBindingBuilder builder = new TriggerBindingBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToTriggerBindingResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (TriggerBinding item : items) {TriggerBindingBuilder builder = new TriggerBindingBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromTriggerBindingResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.TriggerBinding... items) {
for (TriggerBinding item : items) {TriggerBindingBuilder builder = new TriggerBindingBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromTriggerBindingResourcetemplates(Collection items) {
for (TriggerBinding item : items) {TriggerBindingBuilder builder = new TriggerBindingBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromTriggerBindingResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.TriggerBindingResourcetemplatesNested addNewTriggerBindingResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.TriggerBindingResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.TriggerBindingResourcetemplatesNested addNewTriggerBindingResourcetemplateLike(TriggerBinding item) {
return new TriggerTemplateSpecFluentImpl.TriggerBindingResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.TriggerBindingResourcetemplatesNested setNewTriggerBindingResourcetemplateLike(Integer index,TriggerBinding item) {
return new TriggerTemplateSpecFluentImpl.TriggerBindingResourcetemplatesNestedImpl(index, item);
}
public A addToClusterTriggerBindingResourcetemplates(Integer index,ClusterTriggerBinding item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
ClusterTriggerBindingBuilder builder = new ClusterTriggerBindingBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToClusterTriggerBindingResourcetemplates(Integer index,ClusterTriggerBinding item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
ClusterTriggerBindingBuilder builder = new ClusterTriggerBindingBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToClusterTriggerBindingResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.ClusterTriggerBinding... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (ClusterTriggerBinding item : items) {ClusterTriggerBindingBuilder builder = new ClusterTriggerBindingBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToClusterTriggerBindingResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (ClusterTriggerBinding item : items) {ClusterTriggerBindingBuilder builder = new ClusterTriggerBindingBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromClusterTriggerBindingResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.ClusterTriggerBinding... items) {
for (ClusterTriggerBinding item : items) {ClusterTriggerBindingBuilder builder = new ClusterTriggerBindingBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromClusterTriggerBindingResourcetemplates(Collection items) {
for (ClusterTriggerBinding item : items) {ClusterTriggerBindingBuilder builder = new ClusterTriggerBindingBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromClusterTriggerBindingResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.ClusterTriggerBindingResourcetemplatesNested addNewClusterTriggerBindingResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.ClusterTriggerBindingResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.ClusterTriggerBindingResourcetemplatesNested addNewClusterTriggerBindingResourcetemplateLike(ClusterTriggerBinding item) {
return new TriggerTemplateSpecFluentImpl.ClusterTriggerBindingResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.ClusterTriggerBindingResourcetemplatesNested setNewClusterTriggerBindingResourcetemplateLike(Integer index,ClusterTriggerBinding item) {
return new TriggerTemplateSpecFluentImpl.ClusterTriggerBindingResourcetemplatesNestedImpl(index, item);
}
public A addToPersistentVolumeClaimResourcetemplates(Integer index,PersistentVolumeClaim item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
PersistentVolumeClaimBuilder builder = new PersistentVolumeClaimBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToPersistentVolumeClaimResourcetemplates(Integer index,PersistentVolumeClaim item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
PersistentVolumeClaimBuilder builder = new PersistentVolumeClaimBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToPersistentVolumeClaimResourcetemplates(io.fabric8.kubernetes.api.model.PersistentVolumeClaim... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (PersistentVolumeClaim item : items) {PersistentVolumeClaimBuilder builder = new PersistentVolumeClaimBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToPersistentVolumeClaimResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (PersistentVolumeClaim item : items) {PersistentVolumeClaimBuilder builder = new PersistentVolumeClaimBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromPersistentVolumeClaimResourcetemplates(io.fabric8.kubernetes.api.model.PersistentVolumeClaim... items) {
for (PersistentVolumeClaim item : items) {PersistentVolumeClaimBuilder builder = new PersistentVolumeClaimBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromPersistentVolumeClaimResourcetemplates(Collection items) {
for (PersistentVolumeClaim item : items) {PersistentVolumeClaimBuilder builder = new PersistentVolumeClaimBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromPersistentVolumeClaimResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.PersistentVolumeClaimResourcetemplatesNested addNewPersistentVolumeClaimResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.PersistentVolumeClaimResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.PersistentVolumeClaimResourcetemplatesNested addNewPersistentVolumeClaimResourcetemplateLike(PersistentVolumeClaim item) {
return new TriggerTemplateSpecFluentImpl.PersistentVolumeClaimResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.PersistentVolumeClaimResourcetemplatesNested setNewPersistentVolumeClaimResourcetemplateLike(Integer index,PersistentVolumeClaim item) {
return new TriggerTemplateSpecFluentImpl.PersistentVolumeClaimResourcetemplatesNestedImpl(index, item);
}
public A addToEventListenerResourcetemplates(Integer index,EventListener item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
EventListenerBuilder builder = new EventListenerBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToEventListenerResourcetemplates(Integer index,EventListener item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
EventListenerBuilder builder = new EventListenerBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToEventListenerResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.EventListener... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (EventListener item : items) {EventListenerBuilder builder = new EventListenerBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToEventListenerResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (EventListener item : items) {EventListenerBuilder builder = new EventListenerBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromEventListenerResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.EventListener... items) {
for (EventListener item : items) {EventListenerBuilder builder = new EventListenerBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromEventListenerResourcetemplates(Collection items) {
for (EventListener item : items) {EventListenerBuilder builder = new EventListenerBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromEventListenerResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.EventListenerResourcetemplatesNested addNewEventListenerResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.EventListenerResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.EventListenerResourcetemplatesNested addNewEventListenerResourcetemplateLike(EventListener item) {
return new TriggerTemplateSpecFluentImpl.EventListenerResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.EventListenerResourcetemplatesNested setNewEventListenerResourcetemplateLike(Integer index,EventListener item) {
return new TriggerTemplateSpecFluentImpl.EventListenerResourcetemplatesNestedImpl(index, item);
}
public A addToTriggerResourcetemplates(Integer index,Trigger item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
TriggerBuilder builder = new TriggerBuilder(item);_visitables.get("resourcetemplates").add(index >= 0 ? index : _visitables.get("resourcetemplates").size(), builder);this.resourcetemplates.add(index >= 0 ? index : resourcetemplates.size(), builder); return (A)this;
}
public A setToTriggerResourcetemplates(Integer index,Trigger item) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
TriggerBuilder builder = new TriggerBuilder(item);
if (index < 0 || index >= _visitables.get("resourcetemplates").size()) { _visitables.get("resourcetemplates").add(builder); } else { _visitables.get("resourcetemplates").set(index, builder);}
if (index < 0 || index >= resourcetemplates.size()) { resourcetemplates.add(builder); } else { resourcetemplates.set(index, builder);}
return (A)this;
}
public A addToTriggerResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.Trigger... items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (Trigger item : items) {TriggerBuilder builder = new TriggerBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A addAllToTriggerResourcetemplates(Collection items) {
if (this.resourcetemplates == null) {this.resourcetemplates = new ArrayList>();}
for (Trigger item : items) {TriggerBuilder builder = new TriggerBuilder(item);_visitables.get("resourcetemplates").add(builder);this.resourcetemplates.add(builder);} return (A)this;
}
public A removeFromTriggerResourcetemplates(io.fabric8.tekton.triggers.v1alpha1.Trigger... items) {
for (Trigger item : items) {TriggerBuilder builder = new TriggerBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeAllFromTriggerResourcetemplates(Collection items) {
for (Trigger item : items) {TriggerBuilder builder = new TriggerBuilder(item);_visitables.get("resourcetemplates").remove(builder);if (this.resourcetemplates != null) {this.resourcetemplates.remove(builder);}} return (A)this;
}
public A removeMatchingFromTriggerResourcetemplates(Predicate> predicate) {
if (resourcetemplates == null) return (A) this;
final Iterator> each = resourcetemplates.iterator();
final List visitables = _visitables.get("resourcetemplates");
while (each.hasNext()) {
VisitableBuilder extends HasMetadata,?> builder = each.next();
if (predicate.test(builder)) {
visitables.remove(builder);
each.remove();
}
}
return (A)this;
}
public TriggerTemplateSpecFluent.TriggerResourcetemplatesNested addNewTriggerResourcetemplate() {
return new TriggerTemplateSpecFluentImpl.TriggerResourcetemplatesNestedImpl();
}
public TriggerTemplateSpecFluent.TriggerResourcetemplatesNested addNewTriggerResourcetemplateLike(Trigger item) {
return new TriggerTemplateSpecFluentImpl.TriggerResourcetemplatesNestedImpl(-1, item);
}
public TriggerTemplateSpecFluent.TriggerResourcetemplatesNested setNewTriggerResourcetemplateLike(Integer index,Trigger item) {
return new TriggerTemplateSpecFluentImpl.TriggerResourcetemplatesNestedImpl(index, item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TriggerTemplateSpecFluentImpl that = (TriggerTemplateSpecFluentImpl) o;
if (params != null ? !params.equals(that.params) :that.params != null) return false;
if (resourcetemplates != null ? !resourcetemplates.equals(that.resourcetemplates) :that.resourcetemplates != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(params, resourcetemplates, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (params != null && !params.isEmpty()) { sb.append("params:"); sb.append(params + ","); }
if (resourcetemplates != null && !resourcetemplates.isEmpty()) { sb.append("resourcetemplates:"); sb.append(resourcetemplates); }
sb.append("}");
return sb.toString();
}
class ParamsNestedImpl extends ParamSpecFluentImpl> implements TriggerTemplateSpecFluent.ParamsNested,Nested{
ParamsNestedImpl(Integer index,ParamSpec item) {
this.index = index;
this.builder = new ParamSpecBuilder(this, item);
}
ParamsNestedImpl() {
this.index = -1;
this.builder = new ParamSpecBuilder(this);
}
ParamSpecBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToParams(index,builder.build());
}
public N endParam() {
return and();
}
}
class TriggerTemplateResourcetemplatesNestedImpl extends TriggerTemplateFluentImpl> implements TriggerTemplateSpecFluent.TriggerTemplateResourcetemplatesNested,Nested{
TriggerTemplateResourcetemplatesNestedImpl(Integer index,TriggerTemplate item) {
this.index = index;
this.builder = new TriggerTemplateBuilder(this, item);
}
TriggerTemplateResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new TriggerTemplateBuilder(this);
}
TriggerTemplateBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endTriggerTemplateResourcetemplate() {
return and();
}
}
class ClusterInterceptorResourcetemplatesNestedImpl extends ClusterInterceptorFluentImpl> implements TriggerTemplateSpecFluent.ClusterInterceptorResourcetemplatesNested,Nested{
ClusterInterceptorResourcetemplatesNestedImpl(Integer index,ClusterInterceptor item) {
this.index = index;
this.builder = new ClusterInterceptorBuilder(this, item);
}
ClusterInterceptorResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new ClusterInterceptorBuilder(this);
}
ClusterInterceptorBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endClusterInterceptorResourcetemplate() {
return and();
}
}
class TriggerBindingResourcetemplatesNestedImpl extends TriggerBindingFluentImpl> implements TriggerTemplateSpecFluent.TriggerBindingResourcetemplatesNested,Nested{
TriggerBindingResourcetemplatesNestedImpl(Integer index,TriggerBinding item) {
this.index = index;
this.builder = new TriggerBindingBuilder(this, item);
}
TriggerBindingResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new TriggerBindingBuilder(this);
}
TriggerBindingBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endTriggerBindingResourcetemplate() {
return and();
}
}
class ClusterTriggerBindingResourcetemplatesNestedImpl extends ClusterTriggerBindingFluentImpl> implements TriggerTemplateSpecFluent.ClusterTriggerBindingResourcetemplatesNested,Nested{
ClusterTriggerBindingResourcetemplatesNestedImpl(Integer index,ClusterTriggerBinding item) {
this.index = index;
this.builder = new ClusterTriggerBindingBuilder(this, item);
}
ClusterTriggerBindingResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new ClusterTriggerBindingBuilder(this);
}
ClusterTriggerBindingBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endClusterTriggerBindingResourcetemplate() {
return and();
}
}
class PersistentVolumeClaimResourcetemplatesNestedImpl extends PersistentVolumeClaimFluentImpl> implements TriggerTemplateSpecFluent.PersistentVolumeClaimResourcetemplatesNested,Nested{
PersistentVolumeClaimResourcetemplatesNestedImpl(Integer index,PersistentVolumeClaim item) {
this.index = index;
this.builder = new PersistentVolumeClaimBuilder(this, item);
}
PersistentVolumeClaimResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new PersistentVolumeClaimBuilder(this);
}
PersistentVolumeClaimBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endPersistentVolumeClaimResourcetemplate() {
return and();
}
}
class EventListenerResourcetemplatesNestedImpl extends EventListenerFluentImpl> implements TriggerTemplateSpecFluent.EventListenerResourcetemplatesNested,Nested{
EventListenerResourcetemplatesNestedImpl(Integer index,EventListener item) {
this.index = index;
this.builder = new EventListenerBuilder(this, item);
}
EventListenerResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new EventListenerBuilder(this);
}
EventListenerBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endEventListenerResourcetemplate() {
return and();
}
}
class TriggerResourcetemplatesNestedImpl extends TriggerFluentImpl> implements TriggerTemplateSpecFluent.TriggerResourcetemplatesNested,Nested{
TriggerResourcetemplatesNestedImpl(Integer index,Trigger item) {
this.index = index;
this.builder = new TriggerBuilder(this, item);
}
TriggerResourcetemplatesNestedImpl() {
this.index = -1;
this.builder = new TriggerBuilder(this);
}
TriggerBuilder builder;
Integer index;
public N and() {
return (N) TriggerTemplateSpecFluentImpl.this.setToResourcetemplates(index,builder.build());
}
public N endTriggerResourcetemplate() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy