
io.fabric8.kubernetes.api.model.APIGroupBuilder Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class APIGroupBuilder extends APIGroupFluentImpl implements VisitableBuilder{
APIGroupFluent> fluent;
Boolean validationEnabled;
public APIGroupBuilder(){
this(true);
}
public APIGroupBuilder(Boolean validationEnabled){
this(new APIGroup(), validationEnabled);
}
public APIGroupBuilder(APIGroupFluent> fluent){
this(fluent, true);
}
public APIGroupBuilder(APIGroupFluent> fluent,Boolean validationEnabled){
this(fluent, new APIGroup(), validationEnabled);
}
public APIGroupBuilder(APIGroupFluent> fluent,APIGroup instance){
this(fluent, instance, true);
}
public APIGroupBuilder(APIGroupFluent> fluent,APIGroup instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withApiVersion(instance.getApiVersion());
fluent.withKind(instance.getKind());
fluent.withName(instance.getName());
fluent.withPreferredVersion(instance.getPreferredVersion());
fluent.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs());
fluent.withVersions(instance.getVersions());
this.validationEnabled = validationEnabled;
}
public APIGroupBuilder(APIGroup instance){
this(instance,true);
}
public APIGroupBuilder(APIGroup instance,Boolean validationEnabled){
this.fluent = this;
this.withApiVersion(instance.getApiVersion());
this.withKind(instance.getKind());
this.withName(instance.getName());
this.withPreferredVersion(instance.getPreferredVersion());
this.withServerAddressByClientCIDRs(instance.getServerAddressByClientCIDRs());
this.withVersions(instance.getVersions());
this.validationEnabled = validationEnabled;
}
public APIGroup build(){
APIGroup buildable = new APIGroup(fluent.getApiVersion(),fluent.getKind(),fluent.getName(),fluent.getPreferredVersion(),fluent.getServerAddressByClientCIDRs(),fluent.getVersions());
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;
APIGroupBuilder that = (APIGroupBuilder) 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