![JAR search and dependency download from the Maven repository](/logo.png)
annotations.io.alauda.devops.api.model.UserRestrictionBuilder 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 UserRestrictionBuilder extends UserRestrictionFluentImpl implements VisitableBuilder{
UserRestrictionFluent> fluent;
Boolean validationEnabled;
public UserRestrictionBuilder(){
this(true);
}
public UserRestrictionBuilder(Boolean validationEnabled){
this(new UserRestriction(), validationEnabled);
}
public UserRestrictionBuilder(UserRestrictionFluent> fluent){
this(fluent, true);
}
public UserRestrictionBuilder(UserRestrictionFluent> fluent,Boolean validationEnabled){
this(fluent, new UserRestriction(), validationEnabled);
}
public UserRestrictionBuilder(UserRestrictionFluent> fluent,UserRestriction instance){
this(fluent, instance, true);
}
public UserRestrictionBuilder(UserRestrictionFluent> fluent,UserRestriction instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withGroups(instance.getGroups());
fluent.withLabels(instance.getLabels());
fluent.withUsers(instance.getUsers());
this.validationEnabled = validationEnabled;
}
public UserRestrictionBuilder(UserRestriction instance){
this(instance,true);
}
public UserRestrictionBuilder(UserRestriction instance,Boolean validationEnabled){
this.fluent = this;
this.withGroups(instance.getGroups());
this.withLabels(instance.getLabels());
this.withUsers(instance.getUsers());
this.validationEnabled = validationEnabled;
}
public UserRestriction build(){
UserRestriction buildable = new UserRestriction(fluent.getGroups(),fluent.getLabels(),fluent.getUsers());
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;
UserRestrictionBuilder that = (UserRestrictionBuilder) 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