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

## Instance Methods

Close httplib2 connections.

Creates a new Attribute definition in the parent Consent store.

Deletes the specified Attribute definition. Fails if it is referenced by the latest revision of any Consent or User data mapping.

Gets the specified Attribute definition.

Lists the Attribute definitions in the given Consent store.

Retrieves the next page of results.

Updates the specified Attribute definition.

### Method Details

`close()`

    Close httplib2 connections.

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

    Creates a new Attribute definition in the parent Consent store.

    Args:
      parent: string, Required. The name of the consent store that this Attribute definition belongs to. (required)
      body: object, The request body.
        The object takes the form of:

    { # A client-defined consent attribute.
      "consentDefaultValues": [ # Default values of the attribute in consents. If no default values are specified, it defaults to an empty value.
        "A String",
      ],
      "dataMappingDefaultValue": "A String", # Default value of the attribute in user data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.
      "description": "A String", # A description of the attribute.
      "allowedValues": [ # Required. Possible values for the attribute. An empty list is invalid. The list can only be expanded after creation.
        "A String",
      ],
      "name": "A String", # Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
      "category": "A String", # Required. The category of the attribute. The value of this field cannot be changed after creation.
    }

      attributeDefinitionId: string, Required. The ID of the Attribute definition to create. The string must match the following regex: `_a-zA-Z{0,255}` and must not be a reserved keyword within the Common Expression Language as listed on https://github.com/google/cel-spec/blob/master/doc/langdef.md.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A client-defined consent attribute.
        "consentDefaultValues": [ # Default values of the attribute in consents. If no default values are specified, it defaults to an empty value.
          "A String",
        ],
        "dataMappingDefaultValue": "A String", # Default value of the attribute in user data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.
        "description": "A String", # A description of the attribute.
        "allowedValues": [ # Required. Possible values for the attribute. An empty list is invalid. The list can only be expanded after creation.
          "A String",
        ],
        "name": "A String", # Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
        "category": "A String", # Required. The category of the attribute. The value of this field cannot be changed after creation.
      }

`delete(name, x__xgafv=None)`

    Deletes the specified Attribute definition. Fails if it is referenced by the latest revision of any Consent or User data mapping.

    Args:
      name: string, Required. The resource name of the Attribute definition 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); } The JSON representation for `Empty` is empty JSON object `{}`.
      }

`get(name, x__xgafv=None)`

    Gets the specified Attribute definition.

    Args:
      name: string, Required. The resource name of the Attribute definition to get. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A client-defined consent attribute.
        "consentDefaultValues": [ # Default values of the attribute in consents. If no default values are specified, it defaults to an empty value.
          "A String",
        ],
        "dataMappingDefaultValue": "A String", # Default value of the attribute in user data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.
        "description": "A String", # A description of the attribute.
        "allowedValues": [ # Required. Possible values for the attribute. An empty list is invalid. The list can only be expanded after creation.
          "A String",
        ],
        "name": "A String", # Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
        "category": "A String", # Required. The category of the attribute. The value of this field cannot be changed after creation.
      }

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

    Lists the Attribute definitions in the given Consent store.

    Args:
      parent: string, Required. Name of the Consent store to retrieve attribute definitions from. (required)
      pageSize: integer, Limit on the number of attribute definitions to return in a single response. If zero the default page size of 100 is used.
      pageToken: string, Token to retrieve the next page of results or empty to get the first page.
      filter: string, Restricts the attributes returned to those matching a filter. Syntax: https://cloud.google.com/appengine/docs/standard/python/search/query_strings. The only field available for filtering is `category`.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Lists the Attribute definitions in the given Consent store.
        "attributeDefinitions": [ # The returned attribute definitions. The maximum number of attributes returned is determined by the value of page_size in the ListAttributeDefinitionsRequest.
          { # A client-defined consent attribute.
            "consentDefaultValues": [ # Default values of the attribute in consents. If no default values are specified, it defaults to an empty value.
              "A String",
            ],
            "dataMappingDefaultValue": "A String", # Default value of the attribute in user data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.
            "description": "A String", # A description of the attribute.
            "allowedValues": [ # Required. Possible values for the attribute. An empty list is invalid. The list can only be expanded after creation.
              "A String",
            ],
            "name": "A String", # Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
            "category": "A String", # Required. The category of the attribute. The value of this field cannot be changed after creation.
          },
        ],
        "nextPageToken": "A String", # Token to retrieve the next page of results or empty if there are no more results in the list.
      }

`list_next(previous_request, previous_response)`

    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 Attribute definition.

    Args:
      name: string, Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`. (required)
      body: object, The request body.
        The object takes the form of:

    { # A client-defined consent attribute.
      "consentDefaultValues": [ # Default values of the attribute in consents. If no default values are specified, it defaults to an empty value.
        "A String",
      ],
      "dataMappingDefaultValue": "A String", # Default value of the attribute in user data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.
      "description": "A String", # A description of the attribute.
      "allowedValues": [ # Required. Possible values for the attribute. An empty list is invalid. The list can only be expanded after creation.
        "A String",
      ],
      "name": "A String", # Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
      "category": "A String", # Required. The category of the attribute. The value of this field cannot be changed after creation.
    }

      updateMask: string, The update mask that applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. The `description`, `possible_values`, `consent_default_values`, and `data_mapping_default_value` fields are allowed to be updated. The updated `possible_values` must contain all values from the previous `possible_values`.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A client-defined consent attribute.
        "consentDefaultValues": [ # Default values of the attribute in consents. If no default values are specified, it defaults to an empty value.
          "A String",
        ],
        "dataMappingDefaultValue": "A String", # Default value of the attribute in user data mappings. If no default value is specified, it defaults to an empty value. This field is only applicable to attributes of the category `RESOURCE`.
        "description": "A String", # A description of the attribute.
        "allowedValues": [ # Required. Possible values for the attribute. An empty list is invalid. The list can only be expanded after creation.
          "A String",
        ],
        "name": "A String", # Resource name of the attribute definition, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_id}`.
        "category": "A String", # Required. The category of the attribute. The value of this field cannot be changed after creation.
      }