io.kubernetes.client.openapi.models.RbacV1alpha1SubjectBuilder Maven / Gradle / Ivy
package io.kubernetes.client.openapi.models;
import io.kubernetes.client.fluent.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class RbacV1alpha1SubjectBuilder extends RbacV1alpha1SubjectFluentImpl implements VisitableBuilder {
RbacV1alpha1SubjectFluent> fluent;
Boolean validationEnabled;
public RbacV1alpha1SubjectBuilder() {
this(true);
}
public RbacV1alpha1SubjectBuilder(Boolean validationEnabled) {
this(new RbacV1alpha1Subject(), validationEnabled);
}
public RbacV1alpha1SubjectBuilder(RbacV1alpha1SubjectFluent> fluent) {
this(fluent, true);
}
public RbacV1alpha1SubjectBuilder(RbacV1alpha1SubjectFluent> fluent,Boolean validationEnabled) {
this(fluent, new RbacV1alpha1Subject(), validationEnabled);
}
public RbacV1alpha1SubjectBuilder(RbacV1alpha1SubjectFluent> fluent,RbacV1alpha1Subject instance) {
this(fluent, instance, true);
}
public RbacV1alpha1SubjectBuilder(RbacV1alpha1SubjectFluent> fluent,RbacV1alpha1Subject instance,Boolean validationEnabled) {
this.fluent = fluent;
fluent.withApiVersion(instance.getApiVersion());
fluent.withKind(instance.getKind());
fluent.withName(instance.getName());
fluent.withNamespace(instance.getNamespace());
this.validationEnabled = validationEnabled;
}
public RbacV1alpha1SubjectBuilder(RbacV1alpha1Subject instance) {
this(instance,true);
}
public RbacV1alpha1SubjectBuilder(RbacV1alpha1Subject instance,Boolean validationEnabled) {
this.fluent = this;
this.withApiVersion(instance.getApiVersion());
this.withKind(instance.getKind());
this.withName(instance.getName());
this.withNamespace(instance.getNamespace());
this.validationEnabled = validationEnabled;
}
public RbacV1alpha1Subject build() {
RbacV1alpha1Subject buildable = new RbacV1alpha1Subject();
buildable.setApiVersion(fluent.getApiVersion());
buildable.setKind(fluent.getKind());
buildable.setName(fluent.getName());
buildable.setNamespace(fluent.getNamespace());
return buildable;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
RbacV1alpha1SubjectBuilder that = (RbacV1alpha1SubjectBuilder) 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());
}
}