# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = ['AccountSettingUserPreferenceV2Args', 'AccountSettingUserPreferenceV2']

@pulumi.input_type
class AccountSettingUserPreferenceV2Args:
    def __init__(__self__, *,
                 boolean_val: Optional[pulumi.Input['AccountSettingUserPreferenceV2BooleanValArgs']] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 string_val: Optional[pulumi.Input['AccountSettingUserPreferenceV2StringValArgs']] = None,
                 user_id: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a AccountSettingUserPreferenceV2 resource.
        :param pulumi.Input[_builtins.str] name: Name of the setting
        :param pulumi.Input[_builtins.str] user_id: User ID of the user
        """
        if boolean_val is not None:
            pulumi.set(__self__, "boolean_val", boolean_val)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if string_val is not None:
            pulumi.set(__self__, "string_val", string_val)
        if user_id is not None:
            pulumi.set(__self__, "user_id", user_id)

    @_builtins.property
    @pulumi.getter(name="booleanVal")
    def boolean_val(self) -> Optional[pulumi.Input['AccountSettingUserPreferenceV2BooleanValArgs']]:
        return pulumi.get(self, "boolean_val")

    @boolean_val.setter
    def boolean_val(self, value: Optional[pulumi.Input['AccountSettingUserPreferenceV2BooleanValArgs']]):
        pulumi.set(self, "boolean_val", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Name of the setting
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="stringVal")
    def string_val(self) -> Optional[pulumi.Input['AccountSettingUserPreferenceV2StringValArgs']]:
        return pulumi.get(self, "string_val")

    @string_val.setter
    def string_val(self, value: Optional[pulumi.Input['AccountSettingUserPreferenceV2StringValArgs']]):
        pulumi.set(self, "string_val", value)

    @_builtins.property
    @pulumi.getter(name="userId")
    def user_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        User ID of the user
        """
        return pulumi.get(self, "user_id")

    @user_id.setter
    def user_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "user_id", value)


@pulumi.input_type
class _AccountSettingUserPreferenceV2State:
    def __init__(__self__, *,
                 boolean_val: Optional[pulumi.Input['AccountSettingUserPreferenceV2BooleanValArgs']] = None,
                 effective_boolean_val: Optional[pulumi.Input['AccountSettingUserPreferenceV2EffectiveBooleanValArgs']] = None,
                 effective_string_val: Optional[pulumi.Input['AccountSettingUserPreferenceV2EffectiveStringValArgs']] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 string_val: Optional[pulumi.Input['AccountSettingUserPreferenceV2StringValArgs']] = None,
                 user_id: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering AccountSettingUserPreferenceV2 resources.
        :param pulumi.Input['AccountSettingUserPreferenceV2EffectiveBooleanValArgs'] effective_boolean_val: (BooleanMessage)
        :param pulumi.Input['AccountSettingUserPreferenceV2EffectiveStringValArgs'] effective_string_val: (StringMessage)
        :param pulumi.Input[_builtins.str] name: Name of the setting
        :param pulumi.Input[_builtins.str] user_id: User ID of the user
        """
        if boolean_val is not None:
            pulumi.set(__self__, "boolean_val", boolean_val)
        if effective_boolean_val is not None:
            pulumi.set(__self__, "effective_boolean_val", effective_boolean_val)
        if effective_string_val is not None:
            pulumi.set(__self__, "effective_string_val", effective_string_val)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if string_val is not None:
            pulumi.set(__self__, "string_val", string_val)
        if user_id is not None:
            pulumi.set(__self__, "user_id", user_id)

    @_builtins.property
    @pulumi.getter(name="booleanVal")
    def boolean_val(self) -> Optional[pulumi.Input['AccountSettingUserPreferenceV2BooleanValArgs']]:
        return pulumi.get(self, "boolean_val")

    @boolean_val.setter
    def boolean_val(self, value: Optional[pulumi.Input['AccountSettingUserPreferenceV2BooleanValArgs']]):
        pulumi.set(self, "boolean_val", value)

    @_builtins.property
    @pulumi.getter(name="effectiveBooleanVal")
    def effective_boolean_val(self) -> Optional[pulumi.Input['AccountSettingUserPreferenceV2EffectiveBooleanValArgs']]:
        """
        (BooleanMessage)
        """
        return pulumi.get(self, "effective_boolean_val")

    @effective_boolean_val.setter
    def effective_boolean_val(self, value: Optional[pulumi.Input['AccountSettingUserPreferenceV2EffectiveBooleanValArgs']]):
        pulumi.set(self, "effective_boolean_val", value)

    @_builtins.property
    @pulumi.getter(name="effectiveStringVal")
    def effective_string_val(self) -> Optional[pulumi.Input['AccountSettingUserPreferenceV2EffectiveStringValArgs']]:
        """
        (StringMessage)
        """
        return pulumi.get(self, "effective_string_val")

    @effective_string_val.setter
    def effective_string_val(self, value: Optional[pulumi.Input['AccountSettingUserPreferenceV2EffectiveStringValArgs']]):
        pulumi.set(self, "effective_string_val", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Name of the setting
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="stringVal")
    def string_val(self) -> Optional[pulumi.Input['AccountSettingUserPreferenceV2StringValArgs']]:
        return pulumi.get(self, "string_val")

    @string_val.setter
    def string_val(self, value: Optional[pulumi.Input['AccountSettingUserPreferenceV2StringValArgs']]):
        pulumi.set(self, "string_val", value)

    @_builtins.property
    @pulumi.getter(name="userId")
    def user_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        User ID of the user
        """
        return pulumi.get(self, "user_id")

    @user_id.setter
    def user_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "user_id", value)


@pulumi.type_token("databricks:index/accountSettingUserPreferenceV2:AccountSettingUserPreferenceV2")
class AccountSettingUserPreferenceV2(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 boolean_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2BooleanValArgs', 'AccountSettingUserPreferenceV2BooleanValArgsDict']]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 string_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2StringValArgs', 'AccountSettingUserPreferenceV2StringValArgsDict']]] = None,
                 user_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

        User preference is a configurable value that determines how a feature or behavior works for a specific user within the Databricks platform.

        See user settings-metadata API for list of user preferences that can be modified using this resource.

        ## Example Usage

        Setting an account user preference:

        ```python
        import pulumi
        import pulumi_databricks as databricks

        theme_setting = databricks.index.AccountUserSettingV2("theme_setting",
            user_id=<user-id>,
            name=enableDarkMode,
            string_val={
                value: dark,
            })
        ```

        Setting a boolean user preference:

        ```python
        import pulumi
        import pulumi_databricks as databricks

        enable_line_numbers = databricks.index.AccountUserSettingV2("enable_line_numbers",
            user_id=<user-id>,
            name=enableLineNumbers,
            boolean_val={
                value: True,
            })
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] name: Name of the setting
        :param pulumi.Input[_builtins.str] user_id: User ID of the user
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[AccountSettingUserPreferenceV2Args] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

        User preference is a configurable value that determines how a feature or behavior works for a specific user within the Databricks platform.

        See user settings-metadata API for list of user preferences that can be modified using this resource.

        ## Example Usage

        Setting an account user preference:

        ```python
        import pulumi
        import pulumi_databricks as databricks

        theme_setting = databricks.index.AccountUserSettingV2("theme_setting",
            user_id=<user-id>,
            name=enableDarkMode,
            string_val={
                value: dark,
            })
        ```

        Setting a boolean user preference:

        ```python
        import pulumi
        import pulumi_databricks as databricks

        enable_line_numbers = databricks.index.AccountUserSettingV2("enable_line_numbers",
            user_id=<user-id>,
            name=enableLineNumbers,
            boolean_val={
                value: True,
            })
        ```

        :param str resource_name: The name of the resource.
        :param AccountSettingUserPreferenceV2Args args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(AccountSettingUserPreferenceV2Args, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 boolean_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2BooleanValArgs', 'AccountSettingUserPreferenceV2BooleanValArgsDict']]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 string_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2StringValArgs', 'AccountSettingUserPreferenceV2StringValArgsDict']]] = None,
                 user_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = AccountSettingUserPreferenceV2Args.__new__(AccountSettingUserPreferenceV2Args)

            __props__.__dict__["boolean_val"] = boolean_val
            __props__.__dict__["name"] = name
            __props__.__dict__["string_val"] = string_val
            __props__.__dict__["user_id"] = user_id
            __props__.__dict__["effective_boolean_val"] = None
            __props__.__dict__["effective_string_val"] = None
        super(AccountSettingUserPreferenceV2, __self__).__init__(
            'databricks:index/accountSettingUserPreferenceV2:AccountSettingUserPreferenceV2',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            boolean_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2BooleanValArgs', 'AccountSettingUserPreferenceV2BooleanValArgsDict']]] = None,
            effective_boolean_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2EffectiveBooleanValArgs', 'AccountSettingUserPreferenceV2EffectiveBooleanValArgsDict']]] = None,
            effective_string_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2EffectiveStringValArgs', 'AccountSettingUserPreferenceV2EffectiveStringValArgsDict']]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            string_val: Optional[pulumi.Input[Union['AccountSettingUserPreferenceV2StringValArgs', 'AccountSettingUserPreferenceV2StringValArgsDict']]] = None,
            user_id: Optional[pulumi.Input[_builtins.str]] = None) -> 'AccountSettingUserPreferenceV2':
        """
        Get an existing AccountSettingUserPreferenceV2 resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['AccountSettingUserPreferenceV2EffectiveBooleanValArgs', 'AccountSettingUserPreferenceV2EffectiveBooleanValArgsDict']] effective_boolean_val: (BooleanMessage)
        :param pulumi.Input[Union['AccountSettingUserPreferenceV2EffectiveStringValArgs', 'AccountSettingUserPreferenceV2EffectiveStringValArgsDict']] effective_string_val: (StringMessage)
        :param pulumi.Input[_builtins.str] name: Name of the setting
        :param pulumi.Input[_builtins.str] user_id: User ID of the user
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _AccountSettingUserPreferenceV2State.__new__(_AccountSettingUserPreferenceV2State)

        __props__.__dict__["boolean_val"] = boolean_val
        __props__.__dict__["effective_boolean_val"] = effective_boolean_val
        __props__.__dict__["effective_string_val"] = effective_string_val
        __props__.__dict__["name"] = name
        __props__.__dict__["string_val"] = string_val
        __props__.__dict__["user_id"] = user_id
        return AccountSettingUserPreferenceV2(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="booleanVal")
    def boolean_val(self) -> pulumi.Output[Optional['outputs.AccountSettingUserPreferenceV2BooleanVal']]:
        return pulumi.get(self, "boolean_val")

    @_builtins.property
    @pulumi.getter(name="effectiveBooleanVal")
    def effective_boolean_val(self) -> pulumi.Output['outputs.AccountSettingUserPreferenceV2EffectiveBooleanVal']:
        """
        (BooleanMessage)
        """
        return pulumi.get(self, "effective_boolean_val")

    @_builtins.property
    @pulumi.getter(name="effectiveStringVal")
    def effective_string_val(self) -> pulumi.Output['outputs.AccountSettingUserPreferenceV2EffectiveStringVal']:
        """
        (StringMessage)
        """
        return pulumi.get(self, "effective_string_val")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        Name of the setting
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="stringVal")
    def string_val(self) -> pulumi.Output[Optional['outputs.AccountSettingUserPreferenceV2StringVal']]:
        return pulumi.get(self, "string_val")

    @_builtins.property
    @pulumi.getter(name="userId")
    def user_id(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        User ID of the user
        """
        return pulumi.get(self, "user_id")

