annotations.io.alauda.kubernetes.api.model.ListMetaBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class ListMetaBuilder extends ListMetaFluentImpl implements VisitableBuilder{
ListMetaFluent> fluent;
Boolean validationEnabled;
public ListMetaBuilder(){
this(true);
}
public ListMetaBuilder(Boolean validationEnabled){
this(new ListMeta(), validationEnabled);
}
public ListMetaBuilder(ListMetaFluent> fluent){
this(fluent, true);
}
public ListMetaBuilder(ListMetaFluent> fluent,Boolean validationEnabled){
this(fluent, new ListMeta(), validationEnabled);
}
public ListMetaBuilder(ListMetaFluent> fluent,ListMeta instance){
this(fluent, instance, true);
}
public ListMetaBuilder(ListMetaFluent> fluent,ListMeta instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withResourceVersion(instance.getResourceVersion());
fluent.withSelfLink(instance.getSelfLink());
this.validationEnabled = validationEnabled;
}
public ListMetaBuilder(ListMeta instance){
this(instance,true);
}
public ListMetaBuilder(ListMeta instance,Boolean validationEnabled){
this.fluent = this;
this.withResourceVersion(instance.getResourceVersion());
this.withSelfLink(instance.getSelfLink());
this.validationEnabled = validationEnabled;
}
public ListMeta build(){
ListMeta buildable = new ListMeta(fluent.getResourceVersion(),fluent.getSelfLink());
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;
ListMetaBuilder that = (ListMetaBuilder) 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;
}
}