io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectBuilder Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model.flowcontrol.v1beta1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class SubjectBuilder extends io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectFluentImpl implements io.fabric8.kubernetes.api.builder.VisitableBuilder {
io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectFluent> fluent;
java.lang.Boolean validationEnabled;
public SubjectBuilder() {
this(true);
}
public SubjectBuilder(java.lang.Boolean validationEnabled) {
this(new Subject(), validationEnabled);
}
public SubjectBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectFluent> fluent) {
this(fluent, true);
}
public SubjectBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectFluent> fluent,java.lang.Boolean validationEnabled) {
this(fluent, new Subject(), validationEnabled);
}
public SubjectBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectFluent> fluent,io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.Subject instance) {
this(fluent, instance, true);
}
public SubjectBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.SubjectFluent> fluent,io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.Subject instance,java.lang.Boolean validationEnabled) {
this.fluent = fluent;
fluent.withGroup(instance.getGroup());
fluent.withKind(instance.getKind());
fluent.withServiceAccount(instance.getServiceAccount());
fluent.withUser(instance.getUser());
this.validationEnabled = validationEnabled;
}
public SubjectBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.Subject instance) {
this(instance,true);
}
public SubjectBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.Subject instance,java.lang.Boolean validationEnabled) {
this.fluent = this;
this.withGroup(instance.getGroup());
this.withKind(instance.getKind());
this.withServiceAccount(instance.getServiceAccount());
this.withUser(instance.getUser());
this.validationEnabled = validationEnabled;
}
public io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.Subject build() {
Subject buildable = new Subject(fluent.getGroup(),fluent.getKind(),fluent.getServiceAccount(),fluent.getUser());
return buildable;
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
SubjectBuilder that = (SubjectBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(fluent, validationEnabled, super.hashCode());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy