
annotations.io.alauda.devops.api.model.ServiceAccountRestrictionBuilder Maven / Gradle / Ivy
package io.alauda.devops.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class ServiceAccountRestrictionBuilder extends ServiceAccountRestrictionFluentImpl implements VisitableBuilder{
ServiceAccountRestrictionFluent> fluent;
Boolean validationEnabled;
public ServiceAccountRestrictionBuilder(){
this(true);
}
public ServiceAccountRestrictionBuilder(Boolean validationEnabled){
this(new ServiceAccountRestriction(), validationEnabled);
}
public ServiceAccountRestrictionBuilder(ServiceAccountRestrictionFluent> fluent){
this(fluent, true);
}
public ServiceAccountRestrictionBuilder(ServiceAccountRestrictionFluent> fluent,Boolean validationEnabled){
this(fluent, new ServiceAccountRestriction(), validationEnabled);
}
public ServiceAccountRestrictionBuilder(ServiceAccountRestrictionFluent> fluent,ServiceAccountRestriction instance){
this(fluent, instance, true);
}
public ServiceAccountRestrictionBuilder(ServiceAccountRestrictionFluent> fluent,ServiceAccountRestriction instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withNamespaces(instance.getNamespaces());
fluent.withServiceaccounts(instance.getServiceaccounts());
this.validationEnabled = validationEnabled;
}
public ServiceAccountRestrictionBuilder(ServiceAccountRestriction instance){
this(instance,true);
}
public ServiceAccountRestrictionBuilder(ServiceAccountRestriction instance,Boolean validationEnabled){
this.fluent = this;
this.withNamespaces(instance.getNamespaces());
this.withServiceaccounts(instance.getServiceaccounts());
this.validationEnabled = validationEnabled;
}
public ServiceAccountRestriction build(){
ServiceAccountRestriction buildable = new ServiceAccountRestriction(fluent.getNamespaces(),fluent.getServiceaccounts());
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;
ServiceAccountRestrictionBuilder that = (ServiceAccountRestrictionBuilder) 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