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

com.pulumi.consul.inputs.AclAuthMethodNamespaceRuleArgs Maven / Gradle / Ivy

There is a newer version: 3.13.0-alpha.1727221178
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.consul.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class AclAuthMethodNamespaceRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final AclAuthMethodNamespaceRuleArgs Empty = new AclAuthMethodNamespaceRuleArgs();

    /**
     * If the namespace rule's `selector` matches then this is used to control the namespace where the token is created.
     * 
     */
    @Import(name="bindNamespace", required=true)
    private Output bindNamespace;

    /**
     * @return If the namespace rule's `selector` matches then this is used to control the namespace where the token is created.
     * 
     */
    public Output bindNamespace() {
        return this.bindNamespace;
    }

    /**
     * Specifies the expression used to match this namespace rule against valid identities returned from an auth method validation.
     * 
     */
    @Import(name="selector")
    private @Nullable Output selector;

    /**
     * @return Specifies the expression used to match this namespace rule against valid identities returned from an auth method validation.
     * 
     */
    public Optional> selector() {
        return Optional.ofNullable(this.selector);
    }

    private AclAuthMethodNamespaceRuleArgs() {}

    private AclAuthMethodNamespaceRuleArgs(AclAuthMethodNamespaceRuleArgs $) {
        this.bindNamespace = $.bindNamespace;
        this.selector = $.selector;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(AclAuthMethodNamespaceRuleArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private AclAuthMethodNamespaceRuleArgs $;

        public Builder() {
            $ = new AclAuthMethodNamespaceRuleArgs();
        }

        public Builder(AclAuthMethodNamespaceRuleArgs defaults) {
            $ = new AclAuthMethodNamespaceRuleArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param bindNamespace If the namespace rule's `selector` matches then this is used to control the namespace where the token is created.
         * 
         * @return builder
         * 
         */
        public Builder bindNamespace(Output bindNamespace) {
            $.bindNamespace = bindNamespace;
            return this;
        }

        /**
         * @param bindNamespace If the namespace rule's `selector` matches then this is used to control the namespace where the token is created.
         * 
         * @return builder
         * 
         */
        public Builder bindNamespace(String bindNamespace) {
            return bindNamespace(Output.of(bindNamespace));
        }

        /**
         * @param selector Specifies the expression used to match this namespace rule against valid identities returned from an auth method validation.
         * 
         * @return builder
         * 
         */
        public Builder selector(@Nullable Output selector) {
            $.selector = selector;
            return this;
        }

        /**
         * @param selector Specifies the expression used to match this namespace rule against valid identities returned from an auth method validation.
         * 
         * @return builder
         * 
         */
        public Builder selector(String selector) {
            return selector(Output.of(selector));
        }

        public AclAuthMethodNamespaceRuleArgs build() {
            if ($.bindNamespace == null) {
                throw new MissingRequiredPropertyException("AclAuthMethodNamespaceRuleArgs", "bindNamespace");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy