me.snowdrop.istio.api.model.v1.rbac.RoleRefBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.rbac;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class RoleRefBuilder extends RoleRefFluentImpl implements VisitableBuilder{
RoleRefFluent> fluent;
Boolean validationEnabled;
public RoleRefBuilder(){
this(true);
}
public RoleRefBuilder(Boolean validationEnabled){
this(new RoleRef(), validationEnabled);
}
public RoleRefBuilder(RoleRefFluent> fluent){
this(fluent, true);
}
public RoleRefBuilder(RoleRefFluent> fluent,Boolean validationEnabled){
this(fluent, new RoleRef(), validationEnabled);
}
public RoleRefBuilder(RoleRefFluent> fluent,RoleRef instance){
this(fluent, instance, true);
}
public RoleRefBuilder(RoleRefFluent> fluent,RoleRef instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withKind(instance.getKind());
fluent.withName(instance.getName());
this.validationEnabled = validationEnabled;
}
public RoleRefBuilder(RoleRef instance){
this(instance,true);
}
public RoleRefBuilder(RoleRef instance,Boolean validationEnabled){
this.fluent = this;
this.withKind(instance.getKind());
this.withName(instance.getName());
this.validationEnabled = validationEnabled;
}
public RoleRef build(){
RoleRef buildable = new RoleRef(fluent.getKind(),fluent.getName());
io.fabric8.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;
RoleRefBuilder that = (RoleRefBuilder) 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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy