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

io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsBuilder Maven / Gradle / Ivy

There is a newer version: 7.0.1
Show newest version
package io.fabric8.kubernetes.api.model.flowcontrol.v1beta1;

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

public class PolicyRulesWithSubjectsBuilder extends io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsFluentImpl implements io.fabric8.kubernetes.api.builder.VisitableBuilder {

    io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsFluent fluent;
    java.lang.Boolean validationEnabled;

    public PolicyRulesWithSubjectsBuilder() {
        this(true);
    }

    public PolicyRulesWithSubjectsBuilder(java.lang.Boolean validationEnabled) {
        this(new PolicyRulesWithSubjects(), validationEnabled);
    }

    public PolicyRulesWithSubjectsBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsFluent fluent) {
        this(fluent, true);
    }

    public PolicyRulesWithSubjectsBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsFluent fluent,java.lang.Boolean validationEnabled) {
        this(fluent, new PolicyRulesWithSubjects(), validationEnabled);
    }

    public PolicyRulesWithSubjectsBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsFluent fluent,io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjects instance) {
        this(fluent, instance, true);
    }

    public PolicyRulesWithSubjectsBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjectsFluent fluent,io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjects instance,java.lang.Boolean validationEnabled) {
        this.fluent = fluent; 
        fluent.withNonResourceRules(instance.getNonResourceRules()); 
        fluent.withResourceRules(instance.getResourceRules()); 
        fluent.withSubjects(instance.getSubjects()); 
        this.validationEnabled = validationEnabled; 
    }

    public PolicyRulesWithSubjectsBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjects instance) {
        this(instance,true);
    }

    public PolicyRulesWithSubjectsBuilder(io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjects instance,java.lang.Boolean validationEnabled) {
        this.fluent = this; 
        this.withNonResourceRules(instance.getNonResourceRules()); 
        this.withResourceRules(instance.getResourceRules()); 
        this.withSubjects(instance.getSubjects()); 
        this.validationEnabled = validationEnabled; 
    }

    public io.fabric8.kubernetes.api.model.flowcontrol.v1beta1.PolicyRulesWithSubjects build() {
        PolicyRulesWithSubjects buildable = new PolicyRulesWithSubjects(fluent.getNonResourceRules(),fluent.getResourceRules(),fluent.getSubjects());
        return buildable;
    }

    public boolean equals(java.lang.Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        PolicyRulesWithSubjectsBuilder that = (PolicyRulesWithSubjectsBuilder) 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 - 2025 Weber Informatics LLC | Privacy Policy