# REST Resource: projects.locations.datasets.consentStores.attributeDefinitions

## Resource: AttributeDefinition

A client-defined consent attribute.

| JSON representation |
|---|
| ``` { "name": string, "description": string, "category": enum(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#Category`), "allowedValues": [ string ], "consentDefaultValues": [ string ], "dataMappingDefaultValue": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the Attribute definition, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/attributeDefinitions/{attributeDefinitionId}`. Cannot be changed after creation. |
| `description` | `string` Optional. A description of the attribute. |
| `category` | ``enum(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#Category`)`` Required. The category of the attribute. The value of this field cannot be changed after creation. |
| `allowedValues[]` | `string` Required. Possible values for the attribute. The number of allowed values must not exceed 500. An empty list is invalid. The list can only be expanded after creation. |
| `consentDefaultValues[]` | `string` Optional. Default values of the attribute in Consents. If no default values are specified, it defaults to an empty value. |
| `dataMappingDefaultValue` | `string` Optional. 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`. |

## Category

The category of the attribute.

| Enums ||
|---|---|
| `CATEGORY_UNSPECIFIED` | No category specified. This option is invalid. |
| `RESOURCE` | Specify this category when this attribute describes the properties of resources. For example, data anonymity or data type. |
| `REQUEST` | Specify this category when this attribute describes the properties of requests. For example, requester's role or requester's organization. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions/create` | Creates a new `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#AttributeDefinition` in the parent `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions/delete` | Deletes the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#AttributeDefinition`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions/get` | Gets the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#AttributeDefinition`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions/list` | Lists the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#AttributeDefinition` in the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores#ConsentStore`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions/patch` | Updates the specified `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.consentStores.attributeDefinitions#AttributeDefinition`. |