io.fabric8.tekton.triggers.v1alpha1.TriggerBuilder Maven / Gradle / Ivy
package io.fabric8.tekton.triggers.v1alpha1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
public class TriggerBuilder extends TriggerFluent implements VisitableBuilder{
public TriggerBuilder() {
this(new Trigger());
}
public TriggerBuilder(TriggerFluent> fluent) {
this(fluent, new Trigger());
}
public TriggerBuilder(TriggerFluent> fluent,Trigger instance) {
this.fluent = fluent;
fluent.copyInstance(instance);
}
public TriggerBuilder(Trigger instance) {
this.fluent = this;
this.copyInstance(instance);
}
TriggerFluent> fluent;
public Trigger build() {
Trigger buildable = new Trigger(fluent.getApiVersion(),fluent.getKind(),fluent.buildMetadata(),fluent.buildSpec());
buildable.setAdditionalProperties(fluent.getAdditionalProperties());
return buildable;
}
}