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

import com.pulumi.azure.cosmosdb.inputs.SqlRoleDefinitionPermissionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SqlRoleDefinitionState Empty = new SqlRoleDefinitionState();

    /**
     * The name of the Cosmos DB Account. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="accountName")
    private @Nullable Output<String> accountName;

    /**
     * @return The name of the Cosmos DB Account. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> accountName() {
        return Optional.ofNullable(this.accountName);
    }

    /**
     * A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes.
     * 
     * &gt; **NOTE:** The resources referenced in assignable scopes need not exist.
     * 
     */
    @Import(name="assignableScopes")
    private @Nullable Output<List<String>> assignableScopes;

    /**
     * @return A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes.
     * 
     * &gt; **NOTE:** The resources referenced in assignable scopes need not exist.
     * 
     */
    public Optional<Output<List<String>>> assignableScopes() {
        return Optional.ofNullable(this.assignableScopes);
    }

    /**
     * An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A `permissions` block as defined below.
     * 
     */
    @Import(name="permissions")
    private @Nullable Output<List<SqlRoleDefinitionPermissionArgs>> permissions;

    /**
     * @return A `permissions` block as defined below.
     * 
     */
    public Optional<Output<List<SqlRoleDefinitionPermissionArgs>>> permissions() {
        return Optional.ofNullable(this.permissions);
    }

    /**
     * The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="roleDefinitionId")
    private @Nullable Output<String> roleDefinitionId;

    /**
     * @return The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> roleDefinitionId() {
        return Optional.ofNullable(this.roleDefinitionId);
    }

    /**
     * The type of the Cosmos DB SQL Role Definition. Possible values are `BuiltInRole` and `CustomRole`. Defaults to `CustomRole`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="type")
    private @Nullable Output<String> type;

    /**
     * @return The type of the Cosmos DB SQL Role Definition. Possible values are `BuiltInRole` and `CustomRole`. Defaults to `CustomRole`. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> type() {
        return Optional.ofNullable(this.type);
    }

    private SqlRoleDefinitionState() {}

    private SqlRoleDefinitionState(SqlRoleDefinitionState $) {
        this.accountName = $.accountName;
        this.assignableScopes = $.assignableScopes;
        this.name = $.name;
        this.permissions = $.permissions;
        this.resourceGroupName = $.resourceGroupName;
        this.roleDefinitionId = $.roleDefinitionId;
        this.type = $.type;
    }

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

    public static final class Builder {
        private SqlRoleDefinitionState $;

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

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

        /**
         * @param accountName The name of the Cosmos DB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder accountName(@Nullable Output<String> accountName) {
            $.accountName = accountName;
            return this;
        }

        /**
         * @param accountName The name of the Cosmos DB Account. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder accountName(String accountName) {
            return accountName(Output.of(accountName));
        }

        /**
         * @param assignableScopes A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes.
         * 
         * &gt; **NOTE:** The resources referenced in assignable scopes need not exist.
         * 
         * @return builder
         * 
         */
        public Builder assignableScopes(@Nullable Output<List<String>> assignableScopes) {
            $.assignableScopes = assignableScopes;
            return this;
        }

        /**
         * @param assignableScopes A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes.
         * 
         * &gt; **NOTE:** The resources referenced in assignable scopes need not exist.
         * 
         * @return builder
         * 
         */
        public Builder assignableScopes(List<String> assignableScopes) {
            return assignableScopes(Output.of(assignableScopes));
        }

        /**
         * @param assignableScopes A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes.
         * 
         * &gt; **NOTE:** The resources referenced in assignable scopes need not exist.
         * 
         * @return builder
         * 
         */
        public Builder assignableScopes(String... assignableScopes) {
            return assignableScopes(List.of(assignableScopes));
        }

        /**
         * @param name An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param permissions A `permissions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder permissions(@Nullable Output<List<SqlRoleDefinitionPermissionArgs>> permissions) {
            $.permissions = permissions;
            return this;
        }

        /**
         * @param permissions A `permissions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder permissions(List<SqlRoleDefinitionPermissionArgs> permissions) {
            return permissions(Output.of(permissions));
        }

        /**
         * @param permissions A `permissions` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder permissions(SqlRoleDefinitionPermissionArgs... permissions) {
            return permissions(List.of(permissions));
        }

        /**
         * @param resourceGroupName The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param roleDefinitionId The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder roleDefinitionId(@Nullable Output<String> roleDefinitionId) {
            $.roleDefinitionId = roleDefinitionId;
            return this;
        }

        /**
         * @param roleDefinitionId The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder roleDefinitionId(String roleDefinitionId) {
            return roleDefinitionId(Output.of(roleDefinitionId));
        }

        /**
         * @param type The type of the Cosmos DB SQL Role Definition. Possible values are `BuiltInRole` and `CustomRole`. Defaults to `CustomRole`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output<String> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of the Cosmos DB SQL Role Definition. Possible values are `BuiltInRole` and `CustomRole`. Defaults to `CustomRole`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public SqlRoleDefinitionState build() {
            return $;
        }
    }

}
