io.dekorate.servicebinding.model.ServiceBuilder Maven / Gradle / Ivy
package io.dekorate.servicebinding.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Boolean;
public class ServiceBuilder extends ServiceFluentImpl implements VisitableBuilder{
public ServiceBuilder() {
this(false);
}
public ServiceBuilder(Boolean validationEnabled) {
this(new Service(), validationEnabled);
}
public ServiceBuilder(ServiceFluent> fluent) {
this(fluent, false);
}
public ServiceBuilder(ServiceFluent> fluent,Boolean validationEnabled) {
this(fluent, new Service(), validationEnabled);
}
public ServiceBuilder(ServiceFluent> fluent,Service instance) {
this(fluent, instance, false);
}
public ServiceBuilder(ServiceFluent> fluent,Service instance,Boolean validationEnabled) {
this.fluent = fluent;
fluent.withGroup(instance.getGroup());
fluent.withVersion(instance.getVersion());
fluent.withKind(instance.getKind());
fluent.withName(instance.getName());
fluent.withId(instance.getId());
fluent.withNamespace(instance.getNamespace());
fluent.withEnvVarPrefix(instance.getEnvVarPrefix());
this.validationEnabled = validationEnabled;
}
public ServiceBuilder(Service instance) {
this(instance,false);
}
public ServiceBuilder(Service instance,Boolean validationEnabled) {
this.fluent = this;
this.withGroup(instance.getGroup());
this.withVersion(instance.getVersion());
this.withKind(instance.getKind());
this.withName(instance.getName());
this.withId(instance.getId());
this.withNamespace(instance.getNamespace());
this.withEnvVarPrefix(instance.getEnvVarPrefix());
this.validationEnabled = validationEnabled;
}
ServiceFluent> fluent;
Boolean validationEnabled;
public Service build() {
Service buildable = new Service(fluent.getGroup(),fluent.getVersion(),fluent.getKind(),fluent.getName(),fluent.getId(),fluent.getNamespace(),fluent.getEnvVarPrefix());
return buildable;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy