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

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
from ._inputs import *

__all__ = ['UserDataMappingArgs', 'UserDataMapping']

@pulumi.input_type
class UserDataMappingArgs:
    def __init__(__self__, *,
                 consent_store_id: pulumi.Input[str],
                 data_id: pulumi.Input[str],
                 dataset_id: pulumi.Input[str],
                 user_id: pulumi.Input[str],
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project: Optional[pulumi.Input[str]] = None,
                 resource_attributes: Optional[pulumi.Input[Sequence[pulumi.Input['AttributeArgs']]]] = None):
        """
        The set of arguments for constructing a UserDataMapping resource.
        :param pulumi.Input[str] data_id: A unique identifier for the mapped resource.
        :param pulumi.Input[str] user_id: User's UUID provided by the client.
        :param pulumi.Input[str] name: Resource name of the User data mapping, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
        :param pulumi.Input[Sequence[pulumi.Input['AttributeArgs']]] resource_attributes: Attributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute.
        """
        pulumi.set(__self__, "consent_store_id", consent_store_id)
        pulumi.set(__self__, "data_id", data_id)
        pulumi.set(__self__, "dataset_id", dataset_id)
        pulumi.set(__self__, "user_id", user_id)
        if location is not None:
            pulumi.set(__self__, "location", location)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if project is not None:
            pulumi.set(__self__, "project", project)
        if resource_attributes is not None:
            pulumi.set(__self__, "resource_attributes", resource_attributes)

    @property
    @pulumi.getter(name="consentStoreId")
    def consent_store_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "consent_store_id")

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

    @property
    @pulumi.getter(name="dataId")
    def data_id(self) -> pulumi.Input[str]:
        """
        A unique identifier for the mapped resource.
        """
        return pulumi.get(self, "data_id")

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

    @property
    @pulumi.getter(name="datasetId")
    def dataset_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "dataset_id")

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

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> pulumi.Input[str]:
        """
        User's UUID provided by the client.
        """
        return pulumi.get(self, "user_id")

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

    @property
    @pulumi.getter
    def location(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "location")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        Resource name of the User data mapping, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def project(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "project")

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

    @property
    @pulumi.getter(name="resourceAttributes")
    def resource_attributes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AttributeArgs']]]]:
        """
        Attributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute.
        """
        return pulumi.get(self, "resource_attributes")

    @resource_attributes.setter
    def resource_attributes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AttributeArgs']]]]):
        pulumi.set(self, "resource_attributes", value)


class UserDataMapping(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 consent_store_id: Optional[pulumi.Input[str]] = None,
                 data_id: Optional[pulumi.Input[str]] = None,
                 dataset_id: Optional[pulumi.Input[str]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project: Optional[pulumi.Input[str]] = None,
                 resource_attributes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeArgs']]]]] = None,
                 user_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Creates a new User data mapping in the parent consent store.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] data_id: A unique identifier for the mapped resource.
        :param pulumi.Input[str] name: Resource name of the User data mapping, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
        :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeArgs']]]] resource_attributes: Attributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute.
        :param pulumi.Input[str] user_id: User's UUID provided by the client.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: UserDataMappingArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Creates a new User data mapping in the parent consent store.

        :param str resource_name: The name of the resource.
        :param UserDataMappingArgs 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(UserDataMappingArgs, 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,
                 consent_store_id: Optional[pulumi.Input[str]] = None,
                 data_id: Optional[pulumi.Input[str]] = None,
                 dataset_id: Optional[pulumi.Input[str]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project: Optional[pulumi.Input[str]] = None,
                 resource_attributes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AttributeArgs']]]]] = None,
                 user_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        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__ = UserDataMappingArgs.__new__(UserDataMappingArgs)

            if consent_store_id is None and not opts.urn:
                raise TypeError("Missing required property 'consent_store_id'")
            __props__.__dict__["consent_store_id"] = consent_store_id
            if data_id is None and not opts.urn:
                raise TypeError("Missing required property 'data_id'")
            __props__.__dict__["data_id"] = data_id
            if dataset_id is None and not opts.urn:
                raise TypeError("Missing required property 'dataset_id'")
            __props__.__dict__["dataset_id"] = dataset_id
            __props__.__dict__["location"] = location
            __props__.__dict__["name"] = name
            __props__.__dict__["project"] = project
            __props__.__dict__["resource_attributes"] = resource_attributes
            if user_id is None and not opts.urn:
                raise TypeError("Missing required property 'user_id'")
            __props__.__dict__["user_id"] = user_id
            __props__.__dict__["archive_time"] = None
            __props__.__dict__["archived"] = None
        super(UserDataMapping, __self__).__init__(
            'google-native:healthcare/v1beta1:UserDataMapping',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'UserDataMapping':
        """
        Get an existing UserDataMapping 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = UserDataMappingArgs.__new__(UserDataMappingArgs)

        __props__.__dict__["archive_time"] = None
        __props__.__dict__["archived"] = None
        __props__.__dict__["data_id"] = None
        __props__.__dict__["name"] = None
        __props__.__dict__["resource_attributes"] = None
        __props__.__dict__["user_id"] = None
        return UserDataMapping(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="archiveTime")
    def archive_time(self) -> pulumi.Output[str]:
        """
        Indicates the time when this mapping was archived.
        """
        return pulumi.get(self, "archive_time")

    @property
    @pulumi.getter
    def archived(self) -> pulumi.Output[bool]:
        """
        Indicates whether this mapping is archived.
        """
        return pulumi.get(self, "archived")

    @property
    @pulumi.getter(name="dataId")
    def data_id(self) -> pulumi.Output[str]:
        """
        A unique identifier for the mapped resource.
        """
        return pulumi.get(self, "data_id")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        Resource name of the User data mapping, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/userDataMappings/{user_data_mapping_id}`.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="resourceAttributes")
    def resource_attributes(self) -> pulumi.Output[Sequence['outputs.AttributeResponse']]:
        """
        Attributes of the resource. Only explicitly set attributes are displayed here. Attribute definitions with defaults set implicitly apply to these User data mappings. Attributes listed here must be single valued, that is, exactly one value is specified for the field "values" in each Attribute.
        """
        return pulumi.get(self, "resource_attributes")

    @property
    @pulumi.getter(name="userId")
    def user_id(self) -> pulumi.Output[str]:
        """
        User's UUID provided by the client.
        """
        return pulumi.get(self, "user_id")


[((47, 5, 47, 41), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((56, 5, 56, 33), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((68, 5, 68, 36), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((77, 5, 77, 33), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((119, 5, 119, 45), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((248, 5, 248, 38), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((264, 5, 264, 33), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((280, 5, 280, 45), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((288, 5, 288, 33), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((33, 8, 33, 66), 'pulumi.set', 'pulumi.set', ({(33, 19, 33, 27): '__self__', (33, 29, 33, 47): '"""consent_store_id"""', (33, 49, 33, 65): 'consent_store_id'}, {}), "(__self__, 'consent_store_id', consent_store_id)", False, 'import pulumi\n'), ((34, 8, 34, 48), 'pulumi.set', 'pulumi.set', ({(34, 19, 34, 27): '__self__', (34, 29, 34, 38): '"""data_id"""', (34, 40, 34, 47): 'data_id'}, {}), "(__self__, 'data_id', data_id)", False, 'import pulumi\n'), ((35, 8, 35, 54), 'pulumi.set', 'pulumi.set', ({(35, 19, 35, 27): '__self__', (35, 29, 35, 41): '"""dataset_id"""', (35, 43, 35, 53): 'dataset_id'}, {}), "(__self__, 'dataset_id', dataset_id)", False, 'import pulumi\n'), ((36, 8, 36, 48), 'pulumi.set', 'pulumi.set', ({(36, 19, 36, 27): '__self__', (36, 29, 36, 38): '"""user_id"""', (36, 40, 36, 47): 'user_id'}, {}), "(__self__, 'user_id', user_id)", False, 'import pulumi\n'), ((49, 15, 49, 51), 'pulumi.get', 'pulumi.get', ({(49, 26, 49, 30): 'self', (49, 32, 49, 50): '"""consent_store_id"""'}, {}), "(self, 'consent_store_id')", False, 'import pulumi\n'), ((53, 8, 53, 51), 'pulumi.set', 'pulumi.set', ({(53, 19, 53, 23): 'self', (53, 25, 53, 43): '"""consent_store_id"""', (53, 45, 53, 50): 'value'}, {}), "(self, 'consent_store_id', value)", False, 'import pulumi\n'), ((61, 15, 61, 42), 'pulumi.get', 'pulumi.get', ({(61, 26, 61, 30): 'self', (61, 32, 61, 41): '"""data_id"""'}, {}), "(self, 'data_id')", False, 'import pulumi\n'), ((65, 8, 65, 42), 'pulumi.set', 'pulumi.set', ({(65, 19, 65, 23): 'self', (65, 25, 65, 34): '"""data_id"""', (65, 36, 65, 41): 'value'}, {}), "(self, 'data_id', value)", False, 'import pulumi\n'), ((70, 15, 70, 45), 'pulumi.get', 'pulumi.get', ({(70, 26, 70, 30): 'self', (70, 32, 70, 44): '"""dataset_id"""'}, {}), "(self, 'dataset_id')", False, 'import pulumi\n'), ((74, 8, 74, 45), 'pulumi.set', 'pulumi.set', ({(74, 19, 74, 23): 'self', (74, 25, 74, 37): '"""dataset_id"""', (74, 39, 74, 44): 'value'}, {}), "(self, 'dataset_id', value)", False, 'import pulumi\n'), ((82, 15, 82, 42), 'pulumi.get', 'pulumi.get', ({(82, 26, 82, 30): 'self', (82, 32, 82, 41): '"""user_id"""'}, {}), "(self, 'user_id')", False, 'import pulumi\n'), ((86, 8, 86, 42), 'pulumi.set', 'pulumi.set', ({(86, 19, 86, 23): 'self', (86, 25, 86, 34): '"""user_id"""', (86, 36, 86, 41): 'value'}, {}), "(self, 'user_id', value)", False, 'import pulumi\n'), ((91, 15, 91, 43), 'pulumi.get', 'pulumi.get', ({(91, 26, 91, 30): 'self', (91, 32, 91, 42): '"""location"""'}, {}), "(self, 'location')", False, 'import pulumi\n'), ((95, 8, 95, 43), 'pulumi.set', 'pulumi.set', ({(95, 19, 95, 23): 'self', (95, 25, 95, 35): '"""location"""', (95, 37, 95, 42): 'value'}, {}), "(self, 'location', value)", False, 'import pulumi\n'), ((103, 15, 103, 39), 'pulumi.get', 'pulumi.get', ({(103, 26, 103, 30): 'self', (103, 32, 103, 38): '"""name"""'}, {}), "(self, 'name')", False, 'import pulumi\n'), ((107, 8, 107, 39), 'pulumi.set', 'pulumi.set', ({(107, 19, 107, 23): 'self', (107, 25, 107, 31): '"""name"""', (107, 33, 107, 38): 'value'}, {}), "(self, 'name', value)", False, 'import pulumi\n'), ((112, 15, 112, 42), 'pulumi.get', 'pulumi.get', ({(112, 26, 112, 30): 'self', (112, 32, 112, 41): '"""project"""'}, {}), "(self, 'project')", False, 'import pulumi\n'), ((116, 8, 116, 42), 'pulumi.set', 'pulumi.set', ({(116, 19, 116, 23): 'self', (116, 25, 116, 34): '"""project"""', (116, 36, 116, 41): 'value'}, {}), "(self, 'project', value)", False, 'import pulumi\n'), ((124, 15, 124, 54), 'pulumi.get', 'pulumi.get', ({(124, 26, 124, 30): 'self', (124, 32, 124, 53): '"""resource_attributes"""'}, {}), "(self, 'resource_attributes')", False, 'import pulumi\n'), ((128, 8, 128, 54), 'pulumi.set', 'pulumi.set', ({(128, 19, 128, 23): 'self', (128, 25, 128, 46): '"""resource_attributes"""', (128, 48, 128, 53): 'value'}, {}), "(self, 'resource_attributes', value)", False, 'import pulumi\n'), ((253, 15, 253, 47), 'pulumi.get', 'pulumi.get', ({(253, 26, 253, 30): 'self', (253, 32, 253, 46): '"""archive_time"""'}, {}), "(self, 'archive_time')", False, 'import pulumi\n'), ((261, 15, 261, 43), 'pulumi.get', 'pulumi.get', ({(261, 26, 261, 30): 'self', (261, 32, 261, 42): '"""archived"""'}, {}), "(self, 'archived')", False, 'import pulumi\n'), ((269, 15, 269, 42), 'pulumi.get', 'pulumi.get', ({(269, 26, 269, 30): 'self', (269, 32, 269, 41): '"""data_id"""'}, {}), "(self, 'data_id')", False, 'import pulumi\n'), ((277, 15, 277, 39), 'pulumi.get', 'pulumi.get', ({(277, 26, 277, 30): 'self', (277, 32, 277, 38): '"""name"""'}, {}), "(self, 'name')", False, 'import pulumi\n'), ((285, 15, 285, 54), 'pulumi.get', 'pulumi.get', ({(285, 26, 285, 30): 'self', (285, 32, 285, 53): '"""resource_attributes"""'}, {}), "(self, 'resource_attributes')", False, 'import pulumi\n'), ((293, 15, 293, 42), 'pulumi.get', 'pulumi.get', ({(293, 26, 293, 30): 'self', (293, 32, 293, 41): '"""user_id"""'}, {}), "(self, 'user_id')", False, 'import pulumi\n'), ((38, 12, 38, 54), 'pulumi.set', 'pulumi.set', ({(38, 23, 38, 31): '__self__', (38, 33, 38, 43): '"""location"""', (38, 45, 38, 53): 'location'}, {}), "(__self__, 'location', location)", False, 'import pulumi\n'), ((40, 12, 40, 46), 'pulumi.set', 'pulumi.set', ({(40, 23, 40, 31): '__self__', (40, 33, 40, 39): '"""name"""', (40, 41, 40, 45): 'name'}, {}), "(__self__, 'name', name)", False, 'import pulumi\n'), ((42, 12, 42, 52), 'pulumi.set', 'pulumi.set', ({(42, 23, 42, 31): '__self__', (42, 33, 42, 42): '"""project"""', (42, 44, 42, 51): 'project'}, {}), "(__self__, 'project', project)", False, 'import pulumi\n'), ((44, 12, 44, 76), 'pulumi.set', 'pulumi.set', ({(44, 23, 44, 31): '__self__', (44, 33, 44, 54): '"""resource_attributes"""', (44, 56, 44, 75): 'resource_attributes'}, {}), "(__self__, 'resource_attributes', resource_attributes)", False, 'import pulumi\n'), ((189, 19, 189, 43), 'pulumi.ResourceOptions', 'pulumi.ResourceOptions', ({}, {}), '()', False, 'import pulumi\n'), ((235, 50, 235, 79), 'pulumi.ResourceOptions', 'pulumi.ResourceOptions', (), '', False, 'import pulumi\n')]