## Resource: ConsentArtifact

Documentation of a user's consent.

| JSON representation |
|---|
| ``` { "name": string, "userId": string, "userSignature": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Signature`) }, "guardianSignature": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Signature`) }, "witnessSignature": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Signature`) }, "consentContentScreenshots": [ { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Image`) } ], "consentContentVersion": string, "metadata": { string: string, ... } } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the Consent artifact, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/consentStores/{consentStoreId}/consentArtifacts/{consent_artifact_id}`. Cannot be changed after creation. |
| `userId` | `string` Required. User's UUID provided by the client. |
| `userSignature` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Signature`)`` Optional. User's signature. |
| `guardianSignature` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Signature`)`` Optional. A signature from a guardian. |
| `witnessSignature` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Signature`)`` Optional. A signature from a witness. |
| `consentContentScreenshots[]` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Image`)`` Optional. Screenshots, PDFs, or other binary information documenting the user's consent. |
| `consentContentVersion` | `string` Optional. An string indicating the version of the consent information shown to the user. |
| `metadata` | `map (key: string, value: string)` Optional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## Signature

User signature.

| JSON representation |
|---|
| ``` { "userId": string, "image": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Image`) }, "metadata": { string: string, ... }, "signatureTime": string } ``` |

| Fields ||
|---|---|
| `userId` | `string` Required. User's UUID provided by the client. |
| `image` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.consentStores.consentArtifacts#Image`)`` Optional. An image of the user's signature. |
| `metadata` | `map (key: string, value: string)` Optional. Metadata associated with the user's signature. For example, the user's name or the user's title. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `signatureTime` | ``string(`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Timestamp of the signature. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

## Image

Raw bytes representing consent artifact content.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "rawBytes": string, "gcsUri": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `rawBytes` | `string (https://developers.google.com/discovery/v1/type-format format)` Consent artifact content represented as a stream of bytes. This field is populated when returned in consentArtifacts.get response, but not included in consentArtifacts.create and ListConsentArtifact response. A base64-encoded string. |
| `gcsUri` | `string` Input only. Points to a Cloud Storage URI containing the consent artifact content. The URI must be in the following format: `gs://{bucket_id}/{objectId}`. The Cloud Healthcare API service account must have the `roles/storage.objectViewer` Cloud IAM role for this Cloud Storage location. The consent artifact content at this URI is copied to a Cloud Storage location managed by the Cloud Healthcare API. Responses to fetching requests return the consent artifact content in rawBytes. |
| End of mutually exclusive fields. ||

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