# Cloud Healthcare API . projects . locations . datasets . consentStores . userDataMappings

## Instance Methods

Archives the specified User data mapping.

Close httplib2 connections.

Creates a new User data mapping in the parent consent store.

Deletes the specified User data mapping.

Gets the specified User data mapping.

Lists the User data mappings in the specified consent store.

Retrieves the next page of results.

Updates the specified User data mapping.

### Method Details

`archive(name, body=None, x__xgafv=None)`

    Archives the specified User data mapping.

    Args:
      name: string, Required. The resource name of the User data mapping to archive. (required)
      body: object, The request body.
        The object takes the form of:

    { # Archives the specified User data mapping.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Archives the specified User data mapping.
    }

`close()`

    Close httplib2 connections.

`create(parent, body=None, x__xgafv=None)`

    Creates a new User data mapping in the parent consent store.

    Args:
      parent: string, Required. Name of the consent store. (required)
      body: object, The request body.
        The object takes the form of:

    { # Maps a resource to the associated user and Attributes.
      "archiveTime": "A String", # Output only. Indicates the time when this mapping was archived.
      "archived": True or False, # Output only. Indicates whether this mapping is archived.
      "dataId": "A String", # Required. A unique identifier for the mapped resource.
      "name": "A String", # 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}`.
      "resourceAttributes": [ # 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.
        { # An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
          "attributeDefinitionId": "A String", # Indicates the name of an attribute defined in the consent store.
          "values": [ # Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
            "A String",
          ],
        },
      ],
      "userId": "A String", # Required. User's UUID provided by the client.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Maps a resource to the associated user and Attributes.
      "archiveTime": "A String", # Output only. Indicates the time when this mapping was archived.
      "archived": True or False, # Output only. Indicates whether this mapping is archived.
      "dataId": "A String", # Required. A unique identifier for the mapped resource.
      "name": "A String", # 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}`.
      "resourceAttributes": [ # 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.
        { # An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
          "attributeDefinitionId": "A String", # Indicates the name of an attribute defined in the consent store.
          "values": [ # Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
            "A String",
          ],
        },
      ],
      "userId": "A String", # Required. User's UUID provided by the client.
    }

`delete(name, x__xgafv=None)`

    Deletes the specified User data mapping.

    Args:
      name: string, Required. The resource name of the User data mapping to delete. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
    }

`get(name, x__xgafv=None)`

    Gets the specified User data mapping.

    Args:
      name: string, Required. The resource name of the User data mapping to retrieve. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Maps a resource to the associated user and Attributes.
      "archiveTime": "A String", # Output only. Indicates the time when this mapping was archived.
      "archived": True or False, # Output only. Indicates whether this mapping is archived.
      "dataId": "A String", # Required. A unique identifier for the mapped resource.
      "name": "A String", # 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}`.
      "resourceAttributes": [ # 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.
        { # An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
          "attributeDefinitionId": "A String", # Indicates the name of an attribute defined in the consent store.
          "values": [ # Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
            "A String",
          ],
        },
      ],
      "userId": "A String", # Required. User's UUID provided by the client.
    }

`list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)`

    Lists the User data mappings in the specified consent store.

    Args:
      parent: string, Required. Name of the consent store to retrieve User data mappings from. (required)
      filter: string, Optional. Restricts the User data mappings returned to those matching a filter. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `"query text"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `"Comment = great"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in `yyyy-mm-dd` form. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, it's just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The fields available for filtering are: - data_id - user_id. For example, `filter=user_id=\"user123\"`. - archived - archive_time
      pageSize: integer, Optional. Limit on the number of User data mappings to return in a single response. If not specified, 100 is used. May not be larger than 1000.
      pageToken: string, Optional. Token to retrieve the next page of results, or empty to get the first page.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        {
      "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list.
      "userDataMappings": [ # The returned User data mappings. The maximum number of User data mappings returned is determined by the value of page_size in the ListUserDataMappingsRequest.
        { # Maps a resource to the associated user and Attributes.
          "archiveTime": "A String", # Output only. Indicates the time when this mapping was archived.
          "archived": True or False, # Output only. Indicates whether this mapping is archived.
          "dataId": "A String", # Required. A unique identifier for the mapped resource.
          "name": "A String", # 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}`.
          "resourceAttributes": [ # 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.
            { # An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
              "attributeDefinitionId": "A String", # Indicates the name of an attribute defined in the consent store.
              "values": [ # Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
                "A String",
              ],
            },
          ],
          "userId": "A String", # Required. User's UUID provided by the client.
        },
      ],
    }

`list_next()`

    Retrieves the next page of results.

            Args:
              previous_request: The request for the previous page. (required)
              previous_response: The response from the request for the previous page. (required)

            Returns:
              A request object that you can call 'execute()' on to request the next
              page. Returns None if there are no more items in the collection.

`patch(name, body=None, updateMask=None, x__xgafv=None)`

    Updates the specified User data mapping.

    Args:
      name: string, 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}`. (required)
      body: object, The request body.
        The object takes the form of:

    { # Maps a resource to the associated user and Attributes.
      "archiveTime": "A String", # Output only. Indicates the time when this mapping was archived.
      "archived": True or False, # Output only. Indicates whether this mapping is archived.
      "dataId": "A String", # Required. A unique identifier for the mapped resource.
      "name": "A String", # 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}`.
      "resourceAttributes": [ # 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.
        { # An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
          "attributeDefinitionId": "A String", # Indicates the name of an attribute defined in the consent store.
          "values": [ # Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
            "A String",
          ],
        },
      ],
      "userId": "A String", # Required. User's UUID provided by the client.
    }

      updateMask: string, Required. The update mask that applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. Only the `data_id`, `user_id` and `resource_attributes` fields can be updated.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Maps a resource to the associated user and Attributes.
      "archiveTime": "A String", # Output only. Indicates the time when this mapping was archived.
      "archived": True or False, # Output only. Indicates whether this mapping is archived.
      "dataId": "A String", # Required. A unique identifier for the mapped resource.
      "name": "A String", # 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}`.
      "resourceAttributes": [ # 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.
        { # An attribute value for a Consent or User data mapping. Each Attribute must have a corresponding AttributeDefinition in the consent store that defines the default and allowed values.
          "attributeDefinitionId": "A String", # Indicates the name of an attribute defined in the consent store.
          "values": [ # Required. The value of the attribute. Must be an acceptable value as defined in the consent store. For example, if the consent store defines "data type" with acceptable values "questionnaire" and "step-count", when the attribute name is data type, this field must contain one of those values.
            "A String",
          ],
        },
      ],
      "userId": "A String", # Required. User's UUID provided by the client.
    }