// *** 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.azure.hpc.inputs;

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


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

    public static final CacheDefaultAccessPolicyAccessRuleArgs Empty = new CacheDefaultAccessPolicyAccessRuleArgs();

    /**
     * The access level for this rule. Possible values are: `rw`, `ro`, `no`.
     * 
     */
    @Import(name="access", required=true)
    private Output<String> access;

    /**
     * @return The access level for this rule. Possible values are: `rw`, `ro`, `no`.
     * 
     */
    public Output<String> access() {
        return this.access;
    }

    /**
     * The anonymous GID used when `root_squash_enabled` is `true`.
     * 
     */
    @Import(name="anonymousGid")
    private @Nullable Output<Integer> anonymousGid;

    /**
     * @return The anonymous GID used when `root_squash_enabled` is `true`.
     * 
     */
    public Optional<Output<Integer>> anonymousGid() {
        return Optional.ofNullable(this.anonymousGid);
    }

    /**
     * The anonymous UID used when `root_squash_enabled` is `true`.
     * 
     */
    @Import(name="anonymousUid")
    private @Nullable Output<Integer> anonymousUid;

    /**
     * @return The anonymous UID used when `root_squash_enabled` is `true`.
     * 
     */
    public Optional<Output<Integer>> anonymousUid() {
        return Optional.ofNullable(this.anonymousUid);
    }

    /**
     * The filter applied to the `scope` for this rule. The filter&#39;s format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
     * 
     */
    @Import(name="filter")
    private @Nullable Output<String> filter;

    /**
     * @return The filter applied to the `scope` for this rule. The filter&#39;s format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
     * 
     */
    public Optional<Output<String>> filter() {
        return Optional.ofNullable(this.filter);
    }

    /**
     * Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
     * 
     */
    @Import(name="rootSquashEnabled")
    private @Nullable Output<Boolean> rootSquashEnabled;

    /**
     * @return Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
     * 
     */
    public Optional<Output<Boolean>> rootSquashEnabled() {
        return Optional.ofNullable(this.rootSquashEnabled);
    }

    /**
     * The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
     * 
     * &gt; **Note:** Each `access_rule` should set a unique `scope`.
     * 
     */
    @Import(name="scope", required=true)
    private Output<String> scope;

    /**
     * @return The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
     * 
     * &gt; **Note:** Each `access_rule` should set a unique `scope`.
     * 
     */
    public Output<String> scope() {
        return this.scope;
    }

    /**
     * Whether allow access to subdirectories under the root export?
     * 
     */
    @Import(name="submountAccessEnabled")
    private @Nullable Output<Boolean> submountAccessEnabled;

    /**
     * @return Whether allow access to subdirectories under the root export?
     * 
     */
    public Optional<Output<Boolean>> submountAccessEnabled() {
        return Optional.ofNullable(this.submountAccessEnabled);
    }

    /**
     * Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
     * 
     */
    @Import(name="suidEnabled")
    private @Nullable Output<Boolean> suidEnabled;

    /**
     * @return Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
     * 
     */
    public Optional<Output<Boolean>> suidEnabled() {
        return Optional.ofNullable(this.suidEnabled);
    }

    private CacheDefaultAccessPolicyAccessRuleArgs() {}

    private CacheDefaultAccessPolicyAccessRuleArgs(CacheDefaultAccessPolicyAccessRuleArgs $) {
        this.access = $.access;
        this.anonymousGid = $.anonymousGid;
        this.anonymousUid = $.anonymousUid;
        this.filter = $.filter;
        this.rootSquashEnabled = $.rootSquashEnabled;
        this.scope = $.scope;
        this.submountAccessEnabled = $.submountAccessEnabled;
        this.suidEnabled = $.suidEnabled;
    }

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

    public static final class Builder {
        private CacheDefaultAccessPolicyAccessRuleArgs $;

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

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

        /**
         * @param access The access level for this rule. Possible values are: `rw`, `ro`, `no`.
         * 
         * @return builder
         * 
         */
        public Builder access(Output<String> access) {
            $.access = access;
            return this;
        }

        /**
         * @param access The access level for this rule. Possible values are: `rw`, `ro`, `no`.
         * 
         * @return builder
         * 
         */
        public Builder access(String access) {
            return access(Output.of(access));
        }

        /**
         * @param anonymousGid The anonymous GID used when `root_squash_enabled` is `true`.
         * 
         * @return builder
         * 
         */
        public Builder anonymousGid(@Nullable Output<Integer> anonymousGid) {
            $.anonymousGid = anonymousGid;
            return this;
        }

        /**
         * @param anonymousGid The anonymous GID used when `root_squash_enabled` is `true`.
         * 
         * @return builder
         * 
         */
        public Builder anonymousGid(Integer anonymousGid) {
            return anonymousGid(Output.of(anonymousGid));
        }

        /**
         * @param anonymousUid The anonymous UID used when `root_squash_enabled` is `true`.
         * 
         * @return builder
         * 
         */
        public Builder anonymousUid(@Nullable Output<Integer> anonymousUid) {
            $.anonymousUid = anonymousUid;
            return this;
        }

        /**
         * @param anonymousUid The anonymous UID used when `root_squash_enabled` is `true`.
         * 
         * @return builder
         * 
         */
        public Builder anonymousUid(Integer anonymousUid) {
            return anonymousUid(Output.of(anonymousUid));
        }

        /**
         * @param filter The filter applied to the `scope` for this rule. The filter&#39;s format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
         * 
         * @return builder
         * 
         */
        public Builder filter(@Nullable Output<String> filter) {
            $.filter = filter;
            return this;
        }

        /**
         * @param filter The filter applied to the `scope` for this rule. The filter&#39;s format depends on its scope: `default` scope matches all clients and has no filter value; `network` scope takes a CIDR format; `host` takes an IP address or fully qualified domain name. If a client does not match any filter rule and there is no default rule, access is denied.
         * 
         * @return builder
         * 
         */
        public Builder filter(String filter) {
            return filter(Output.of(filter));
        }

        /**
         * @param rootSquashEnabled Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
         * 
         * @return builder
         * 
         */
        public Builder rootSquashEnabled(@Nullable Output<Boolean> rootSquashEnabled) {
            $.rootSquashEnabled = rootSquashEnabled;
            return this;
        }

        /**
         * @param rootSquashEnabled Whether to enable [root squash](https://docs.microsoft.com/azure/hpc-cache/access-policies#root-squash)?
         * 
         * @return builder
         * 
         */
        public Builder rootSquashEnabled(Boolean rootSquashEnabled) {
            return rootSquashEnabled(Output.of(rootSquashEnabled));
        }

        /**
         * @param scope The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
         * 
         * &gt; **Note:** Each `access_rule` should set a unique `scope`.
         * 
         * @return builder
         * 
         */
        public Builder scope(Output<String> scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope The scope of this rule. The `scope` and (potentially) the `filter` determine which clients match the rule. Possible values are: `default`, `network`, `host`.
         * 
         * &gt; **Note:** Each `access_rule` should set a unique `scope`.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param submountAccessEnabled Whether allow access to subdirectories under the root export?
         * 
         * @return builder
         * 
         */
        public Builder submountAccessEnabled(@Nullable Output<Boolean> submountAccessEnabled) {
            $.submountAccessEnabled = submountAccessEnabled;
            return this;
        }

        /**
         * @param submountAccessEnabled Whether allow access to subdirectories under the root export?
         * 
         * @return builder
         * 
         */
        public Builder submountAccessEnabled(Boolean submountAccessEnabled) {
            return submountAccessEnabled(Output.of(submountAccessEnabled));
        }

        /**
         * @param suidEnabled Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
         * 
         * @return builder
         * 
         */
        public Builder suidEnabled(@Nullable Output<Boolean> suidEnabled) {
            $.suidEnabled = suidEnabled;
            return this;
        }

        /**
         * @param suidEnabled Whether [SUID](https://docs.microsoft.com/azure/hpc-cache/access-policies#suid) is allowed?
         * 
         * @return builder
         * 
         */
        public Builder suidEnabled(Boolean suidEnabled) {
            return suidEnabled(Output.of(suidEnabled));
        }

        public CacheDefaultAccessPolicyAccessRuleArgs build() {
            $.access = Objects.requireNonNull($.access, "expected parameter 'access' to be non-null");
            $.scope = Objects.requireNonNull($.scope, "expected parameter 'scope' to be non-null");
            return $;
        }
    }

}
