annotations.me.snowdrop.applicationcrd.api.model.GroupKindBuilder Maven / Gradle / Ivy
package me.snowdrop.applicationcrd.api.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
import javax.validation.Validator;
public class GroupKindBuilder extends GroupKindFluentImpl implements VisitableBuilder{
GroupKindFluent> fluent;
Boolean validationEnabled;
Validator validator;
public GroupKindBuilder(){
this(true);
}
public GroupKindBuilder(Boolean validationEnabled){
this(new GroupKind(), validationEnabled);
}
public GroupKindBuilder(GroupKindFluent> fluent){
this(fluent, true);
}
public GroupKindBuilder(GroupKindFluent> fluent,Boolean validationEnabled){
this(fluent, new GroupKind(), validationEnabled);
}
public GroupKindBuilder(GroupKindFluent> fluent,GroupKind instance){
this(fluent, instance, true);
}
public GroupKindBuilder(GroupKindFluent> fluent,GroupKind instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withGroup(instance.getGroup());
fluent.withKind(instance.getKind());
this.validationEnabled = validationEnabled;
}
public GroupKindBuilder(GroupKind instance){
this(instance,true);
}
public GroupKindBuilder(GroupKind instance,Boolean validationEnabled){
this.fluent = this;
this.withGroup(instance.getGroup());
this.withKind(instance.getKind());
this.validationEnabled = validationEnabled;
}
public GroupKindBuilder(Validator validator){
this(new GroupKind(), true);
}
public GroupKindBuilder(GroupKindFluent> fluent,GroupKind instance,Validator validator){
this.fluent = fluent;
fluent.withGroup(instance.getGroup());
fluent.withKind(instance.getKind());
this.validator = validator;
this.validationEnabled = validator != null;
}
public GroupKindBuilder(GroupKind instance,Validator validator){
this.fluent = this;
this.withGroup(instance.getGroup());
this.withKind(instance.getKind());
this.validator = validator;
this.validationEnabled = validator != null;
}
public GroupKind build(){
GroupKind buildable = new GroupKind(fluent.getGroup(),fluent.getKind());
if (validationEnabled) {io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable, validator);}
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;
GroupKindBuilder that = (GroupKindBuilder) 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 - 2024 Weber Informatics LLC | Privacy Policy