All Downloads are FREE. Search and download functionalities are using the official Maven repository.

annotations.me.snowdrop.servicecatalog.api.model.ServiceInstancePropertiesStateBuilder Maven / Gradle / Ivy

The newest version!
package me.snowdrop.servicecatalog.api.model;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
import javax.validation.Validator;

public class ServiceInstancePropertiesStateBuilder extends ServiceInstancePropertiesStateFluentImpl implements VisitableBuilder{

    ServiceInstancePropertiesStateFluent fluent;
    Boolean validationEnabled;
    Validator validator;

    public ServiceInstancePropertiesStateBuilder(){
            this(true);
    }
    public ServiceInstancePropertiesStateBuilder(Boolean validationEnabled){
            this(new ServiceInstancePropertiesState(), validationEnabled);
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesStateFluent fluent){
            this(fluent, true);
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesStateFluent fluent,Boolean validationEnabled){
            this(fluent, new ServiceInstancePropertiesState(), validationEnabled);
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesStateFluent fluent,ServiceInstancePropertiesState instance){
            this(fluent, instance, true);
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesStateFluent fluent,ServiceInstancePropertiesState instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withClusterServicePlanExternalID(instance.getClusterServicePlanExternalID()); 
            fluent.withClusterServicePlanExternalName(instance.getClusterServicePlanExternalName()); 
            fluent.withParameterChecksum(instance.getParameterChecksum()); 
            fluent.withParameters(instance.getParameters()); 
            fluent.withUserInfo(instance.getUserInfo()); 
            this.validationEnabled = validationEnabled; 
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesState instance){
            this(instance,true);
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesState instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withClusterServicePlanExternalID(instance.getClusterServicePlanExternalID()); 
            this.withClusterServicePlanExternalName(instance.getClusterServicePlanExternalName()); 
            this.withParameterChecksum(instance.getParameterChecksum()); 
            this.withParameters(instance.getParameters()); 
            this.withUserInfo(instance.getUserInfo()); 
            this.validationEnabled = validationEnabled; 
    }
    public ServiceInstancePropertiesStateBuilder(Validator validator){
            this(new ServiceInstancePropertiesState(), true);
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesStateFluent fluent,ServiceInstancePropertiesState instance,Validator validator){
            this.fluent = fluent; 
            fluent.withClusterServicePlanExternalID(instance.getClusterServicePlanExternalID()); 
            fluent.withClusterServicePlanExternalName(instance.getClusterServicePlanExternalName()); 
            fluent.withParameterChecksum(instance.getParameterChecksum()); 
            fluent.withParameters(instance.getParameters()); 
            fluent.withUserInfo(instance.getUserInfo()); 
            this.validator = validator;
            this.validationEnabled = validator != null; 
    }
    public ServiceInstancePropertiesStateBuilder(ServiceInstancePropertiesState instance,Validator validator){
            this.fluent = this; 
            this.withClusterServicePlanExternalID(instance.getClusterServicePlanExternalID()); 
            this.withClusterServicePlanExternalName(instance.getClusterServicePlanExternalName()); 
            this.withParameterChecksum(instance.getParameterChecksum()); 
            this.withParameters(instance.getParameters()); 
            this.withUserInfo(instance.getUserInfo()); 
            this.validator = validator; 
            this.validationEnabled = validator != null; 
    }

    public ServiceInstancePropertiesState build(){
            ServiceInstancePropertiesState buildable = new ServiceInstancePropertiesState(fluent.getClusterServicePlanExternalID(),fluent.getClusterServicePlanExternalName(),fluent.getParameterChecksum(),fluent.getParameters(),fluent.getUserInfo());
            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;
            ServiceInstancePropertiesStateBuilder that = (ServiceInstancePropertiesStateBuilder) 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