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

annotations.io.fabric8.knative.legacysources.v1alpha1.ApiServerSourceSpecBuilder Maven / Gradle / Ivy

package io.fabric8.knative.legacysources.v1alpha1;

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

public class ApiServerSourceSpecBuilder extends ApiServerSourceSpecFluentImpl implements VisitableBuilder{

    ApiServerSourceSpecFluent fluent;
    Boolean validationEnabled;

    public ApiServerSourceSpecBuilder(){
            this(true);
    }
    public ApiServerSourceSpecBuilder(Boolean validationEnabled){
            this(new ApiServerSourceSpec(), validationEnabled);
    }
    public ApiServerSourceSpecBuilder(ApiServerSourceSpecFluent fluent){
            this(fluent, true);
    }
    public ApiServerSourceSpecBuilder(ApiServerSourceSpecFluent fluent,Boolean validationEnabled){
            this(fluent, new ApiServerSourceSpec(), validationEnabled);
    }
    public ApiServerSourceSpecBuilder(ApiServerSourceSpecFluent fluent,ApiServerSourceSpec instance){
            this(fluent, instance, true);
    }
    public ApiServerSourceSpecBuilder(ApiServerSourceSpecFluent fluent,ApiServerSourceSpec instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withMode(instance.getMode()); 
            fluent.withResources(instance.getResources()); 
            fluent.withServiceAccountName(instance.getServiceAccountName()); 
            fluent.withSink(instance.getSink()); 
            this.validationEnabled = validationEnabled; 
    }
    public ApiServerSourceSpecBuilder(ApiServerSourceSpec instance){
            this(instance,true);
    }
    public ApiServerSourceSpecBuilder(ApiServerSourceSpec instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withMode(instance.getMode()); 
            this.withResources(instance.getResources()); 
            this.withServiceAccountName(instance.getServiceAccountName()); 
            this.withSink(instance.getSink()); 
            this.validationEnabled = validationEnabled; 
    }

    public ApiServerSourceSpec build(){
            ApiServerSourceSpec buildable = new ApiServerSourceSpec(fluent.getMode(),fluent.getResources(),fluent.getServiceAccountName(),fluent.getSink());
            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;
            ApiServerSourceSpecBuilder that = (ApiServerSourceSpecBuilder) 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