io.strimzi.api.kafka.model.PasswordBuilder Maven / Gradle / Ivy
package io.strimzi.api.kafka.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
/**
* Allows to reference a password from another
*/
public class PasswordBuilder extends io.strimzi.api.kafka.model.PasswordFluentImpl implements io.fabric8.kubernetes.api.builder.VisitableBuilder {
io.strimzi.api.kafka.model.PasswordFluent> fluent;
java.lang.Boolean validationEnabled;
public PasswordBuilder() {
this(true);
}
public PasswordBuilder(java.lang.Boolean validationEnabled) {
this(new Password(), validationEnabled);
}
public PasswordBuilder(io.strimzi.api.kafka.model.PasswordFluent> fluent) {
this(fluent, true);
}
public PasswordBuilder(io.strimzi.api.kafka.model.PasswordFluent> fluent,java.lang.Boolean validationEnabled) {
this(fluent, new Password(), validationEnabled);
}
public PasswordBuilder(io.strimzi.api.kafka.model.PasswordFluent> fluent,io.strimzi.api.kafka.model.Password instance) {
this(fluent, instance, true);
}
public PasswordBuilder(io.strimzi.api.kafka.model.PasswordFluent> fluent,io.strimzi.api.kafka.model.Password instance,java.lang.Boolean validationEnabled) {
this.fluent = fluent;
fluent.withValueFrom(instance.getValueFrom());
this.validationEnabled = validationEnabled;
}
public PasswordBuilder(io.strimzi.api.kafka.model.Password instance) {
this(instance,true);
}
public PasswordBuilder(io.strimzi.api.kafka.model.Password instance,java.lang.Boolean validationEnabled) {
this.fluent = this;
this.withValueFrom(instance.getValueFrom());
this.validationEnabled = validationEnabled;
}
public io.strimzi.api.kafka.model.Password build() {
Password buildable = new Password();
buildable.setValueFrom(fluent.getValueFrom());
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;
PasswordBuilder that = (PasswordBuilder) 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());
}
}