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

annotations.me.snowdrop.servicecatalog.api.model.BearerTokenAuthConfigBuilder 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 BearerTokenAuthConfigBuilder extends BearerTokenAuthConfigFluentImpl implements VisitableBuilder{

    BearerTokenAuthConfigFluent fluent;
    Boolean validationEnabled;
    Validator validator;

    public BearerTokenAuthConfigBuilder(){
            this(true);
    }
    public BearerTokenAuthConfigBuilder(Boolean validationEnabled){
            this(new BearerTokenAuthConfig(), validationEnabled);
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfigFluent fluent){
            this(fluent, true);
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfigFluent fluent,Boolean validationEnabled){
            this(fluent, new BearerTokenAuthConfig(), validationEnabled);
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfigFluent fluent,BearerTokenAuthConfig instance){
            this(fluent, instance, true);
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfigFluent fluent,BearerTokenAuthConfig instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withSecretRef(instance.getSecretRef()); 
            this.validationEnabled = validationEnabled; 
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfig instance){
            this(instance,true);
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfig instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withSecretRef(instance.getSecretRef()); 
            this.validationEnabled = validationEnabled; 
    }
    public BearerTokenAuthConfigBuilder(Validator validator){
            this(new BearerTokenAuthConfig(), true);
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfigFluent fluent,BearerTokenAuthConfig instance,Validator validator){
            this.fluent = fluent; 
            fluent.withSecretRef(instance.getSecretRef()); 
            this.validator = validator;
            this.validationEnabled = validator != null; 
    }
    public BearerTokenAuthConfigBuilder(BearerTokenAuthConfig instance,Validator validator){
            this.fluent = this; 
            this.withSecretRef(instance.getSecretRef()); 
            this.validator = validator; 
            this.validationEnabled = validator != null; 
    }

    public BearerTokenAuthConfig build(){
            BearerTokenAuthConfig buildable = new BearerTokenAuthConfig(fluent.getSecretRef());
            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;
            BearerTokenAuthConfigBuilder that = (BearerTokenAuthConfigBuilder) 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