annotations.io.alauda.kubernetes.api.model.SecretKeySetRefBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class SecretKeySetRefBuilder extends SecretKeySetRefFluentImpl implements VisitableBuilder{
SecretKeySetRefFluent> fluent;
Boolean validationEnabled;
public SecretKeySetRefBuilder(){
this(true);
}
public SecretKeySetRefBuilder(Boolean validationEnabled){
this(new SecretKeySetRef(), validationEnabled);
}
public SecretKeySetRefBuilder(SecretKeySetRefFluent> fluent){
this(fluent, true);
}
public SecretKeySetRefBuilder(SecretKeySetRefFluent> fluent,Boolean validationEnabled){
this(fluent, new SecretKeySetRef(), validationEnabled);
}
public SecretKeySetRefBuilder(SecretKeySetRefFluent> fluent,SecretKeySetRef instance){
this(fluent, instance, true);
}
public SecretKeySetRefBuilder(SecretKeySetRefFluent> fluent,SecretKeySetRef instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withApiTokenKey(instance.getApiTokenKey());
fluent.withName(instance.getName());
fluent.withUsernameKey(instance.getUsernameKey());
this.validationEnabled = validationEnabled;
}
public SecretKeySetRefBuilder(SecretKeySetRef instance){
this(instance,true);
}
public SecretKeySetRefBuilder(SecretKeySetRef instance,Boolean validationEnabled){
this.fluent = this;
this.withApiTokenKey(instance.getApiTokenKey());
this.withName(instance.getName());
this.withUsernameKey(instance.getUsernameKey());
this.validationEnabled = validationEnabled;
}
public SecretKeySetRef build(){
SecretKeySetRef buildable = new SecretKeySetRef(fluent.getApiTokenKey(),fluent.getName(),fluent.getUsernameKey());
io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
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;
SecretKeySetRefBuilder that = (SecretKeySetRefBuilder) 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;
}
}