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

io.kubernetes.client.openapi.models.V1MutatingWebhookBuilder Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

import io.kubernetes.client.fluent.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class V1MutatingWebhookBuilder extends V1MutatingWebhookFluentImpl implements VisitableBuilder {

    V1MutatingWebhookFluent fluent;
    Boolean validationEnabled;

    public V1MutatingWebhookBuilder() { 
        this(true);
    }


    public V1MutatingWebhookBuilder(Boolean validationEnabled) { 
        this(new V1MutatingWebhook(), validationEnabled);
    }


    public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent) { 
        this(fluent, true);
    }


    public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent,Boolean validationEnabled) { 
        this(fluent, new V1MutatingWebhook(), validationEnabled);
    }


    public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent,V1MutatingWebhook instance) { 
        this(fluent, instance, true);
    }


    public V1MutatingWebhookBuilder(V1MutatingWebhookFluent fluent,V1MutatingWebhook instance,Boolean validationEnabled) { 
        this.fluent = fluent; 
        fluent.withAdmissionReviewVersions(instance.getAdmissionReviewVersions());

        fluent.withClientConfig(instance.getClientConfig());

        fluent.withFailurePolicy(instance.getFailurePolicy());

        fluent.withMatchPolicy(instance.getMatchPolicy());

        fluent.withName(instance.getName());

        fluent.withNamespaceSelector(instance.getNamespaceSelector());

        fluent.withObjectSelector(instance.getObjectSelector());

        fluent.withReinvocationPolicy(instance.getReinvocationPolicy());

        fluent.withRules(instance.getRules());

        fluent.withSideEffects(instance.getSideEffects());

        fluent.withTimeoutSeconds(instance.getTimeoutSeconds());

        this.validationEnabled = validationEnabled; 
    }


    public V1MutatingWebhookBuilder(V1MutatingWebhook instance) { 
        this(instance,true);
    }


    public V1MutatingWebhookBuilder(V1MutatingWebhook instance,Boolean validationEnabled) { 
        this.fluent = this; 
        this.withAdmissionReviewVersions(instance.getAdmissionReviewVersions());

        this.withClientConfig(instance.getClientConfig());

        this.withFailurePolicy(instance.getFailurePolicy());

        this.withMatchPolicy(instance.getMatchPolicy());

        this.withName(instance.getName());

        this.withNamespaceSelector(instance.getNamespaceSelector());

        this.withObjectSelector(instance.getObjectSelector());

        this.withReinvocationPolicy(instance.getReinvocationPolicy());

        this.withRules(instance.getRules());

        this.withSideEffects(instance.getSideEffects());

        this.withTimeoutSeconds(instance.getTimeoutSeconds());

        this.validationEnabled = validationEnabled; 
    }


    public V1MutatingWebhook build() {
        V1MutatingWebhook buildable = new V1MutatingWebhook();
        buildable.setAdmissionReviewVersions(fluent.getAdmissionReviewVersions());
        buildable.setClientConfig(fluent.getClientConfig());
        buildable.setFailurePolicy(fluent.getFailurePolicy());
        buildable.setMatchPolicy(fluent.getMatchPolicy());
        buildable.setName(fluent.getName());
        buildable.setNamespaceSelector(fluent.getNamespaceSelector());
        buildable.setObjectSelector(fluent.getObjectSelector());
        buildable.setReinvocationPolicy(fluent.getReinvocationPolicy());
        buildable.setRules(fluent.getRules());
        buildable.setSideEffects(fluent.getSideEffects());
        buildable.setTimeoutSeconds(fluent.getTimeoutSeconds());
        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;
        V1MutatingWebhookBuilder that = (V1MutatingWebhookBuilder) 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;
    }

    public int hashCode() {
        return java.util.Objects.hash(fluent,  validationEnabled,  super.hashCode());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy