annotations.me.snowdrop.istio.api.model.v1.rbac.ServiceRoleBuilder 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 ServiceRoleBuilder extends ServiceRoleFluentImpl implements VisitableBuilder{
ServiceRoleFluent> fluent;
Boolean validationEnabled;
public ServiceRoleBuilder(){
this(true);
}
public ServiceRoleBuilder(Boolean validationEnabled){
this(new ServiceRole(), validationEnabled);
}
public ServiceRoleBuilder(ServiceRoleFluent> fluent){
this(fluent, true);
}
public ServiceRoleBuilder(ServiceRoleFluent> fluent,Boolean validationEnabled){
this(fluent, new ServiceRole(), validationEnabled);
}
public ServiceRoleBuilder(ServiceRoleFluent> fluent,ServiceRole instance){
this(fluent, instance, true);
}
public ServiceRoleBuilder(ServiceRoleFluent> fluent,ServiceRole instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withRules(instance.getRules());
this.validationEnabled = validationEnabled;
}
public ServiceRoleBuilder(ServiceRole instance){
this(instance,true);
}
public ServiceRoleBuilder(ServiceRole instance,Boolean validationEnabled){
this.fluent = this;
this.withRules(instance.getRules());
this.validationEnabled = validationEnabled;
}
public ServiceRole build(){
ServiceRole buildable = new ServiceRole(fluent.getRules());
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;
ServiceRoleBuilder that = (ServiceRoleBuilder) 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