# REST Resource: projects.locations.datasets.annotationStores.annotations

## Resource: Annotation

An annotation record.

| JSON representation |
|---|
| ``` { "name": string, "annotationSource": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#AnnotationSource`) }, "customData": { string: string, ... }, // Union field `data` can be only one of the following: "resourceAnnotation": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#ResourceAnnotation`) }, "imageAnnotation": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#ImageAnnotation`) }, "textAnnotation": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#SensitiveTextAnnotation`) } // End of list of possible types for union field `data`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the Annotation, of the form `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/annotationStores/{annotationStoreId}/annotations/{annotationId}`. |
| `annotationSource` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#AnnotationSource`)`` Required. Details of the source. |
| `customData` | `map (key: string, value: string)` Additional information for this annotation record, such as annotator and verifier information or study campaign. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| Union field `data`. `data` can be only one of the following: ||
| `resourceAnnotation` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#ResourceAnnotation`)`` Annotations for resource. For example, classification tags. |
| `imageAnnotation` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#ImageAnnotation`)`` Annotations for images. For example, bounding polygons. |
| `textAnnotation` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#SensitiveTextAnnotation`)`` Annotations for sensitive texts. For example, a range that describes the location of sensitive text. |

## AnnotationSource

AnnotationSource holds the source information of the annotation.

| JSON representation |
|---|
| ``` { // Union field `source` can be only one of the following: "cloudHealthcareSource": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#CloudHealthcareSource`) } // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| Union field `source`. `source` can be only one of the following: ||
| `cloudHealthcareSource` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#CloudHealthcareSource`)`` Cloud Healthcare API resource. |

## CloudHealthcareSource

Cloud Healthcare API resource.

| JSON representation |
|---|
| ``` { "name": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Full path of a Cloud Healthcare API resource. |

## ResourceAnnotation

Resource level annotation.

| JSON representation |
|---|
| ``` { "label": string } ``` |

| Fields ||
|---|---|
| `label` | `string` A description of the annotation record. |

## ImageAnnotation

Image annotation.

| JSON representation |
|---|
| ``` { "boundingPolys": [ { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#BoundingPoly`) } ], "frameIndex": integer } ``` |

| Fields ||
|---|---|
| `boundingPolys[]` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#BoundingPoly`)`` The list of polygons outlining the sensitive regions in the image. |
| `frameIndex` | `integer` 0-based index of the image frame. For example, an image frame in a DICOM instance. |

## BoundingPoly

A bounding polygon for the detected image annotation.

| JSON representation |
|---|
| ``` { "vertices": [ { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Vertex`) } ], "label": string } ``` |

| Fields ||
|---|---|
| `vertices[]` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Vertex`)`` List of the vertices of this polygon. |
| `label` | `string` A description of this polygon. |

## Vertex

A 2D coordinate in an image. The origin is the top-left.

| JSON representation |
|---|
| ``` { "x": number, "y": number } ``` |

| Fields ||
|---|---|
| `x` | `number` X coordinate. |
| `y` | `number` Y coordinate. |

## SensitiveTextAnnotation

A TextAnnotation specifies a text range that includes sensitive information.

| JSON representation |
|---|
| ``` { "details": { string: { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Detail`) }, ... } } ``` |

| Fields ||
|---|---|
| `details` | ``map (key: string, value: object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Detail`))`` Maps from a resource slice. For example, FHIR resource field path to a set of sensitive text findings. For example, Appointment.Narrative text1 --\> {findings_1, findings_2, findings_3} An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |

## Detail

Contains multiple sensitive information findings for each resource slice.

| JSON representation |
|---|
| ``` { "findings": [ { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Finding`) } ] } ``` |

| Fields ||
|---|---|
| `findings[]` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Finding`)`` |

## Finding

| JSON representation |
|---|
| ``` { "infoType": string, "start": string, "end": string, "quote": string } ``` |

| Fields ||
|---|---|
| `infoType` | `string` The type of information stored in this text range. For example, HumanName, BirthDate, or Address. |
| `start` | `string (https://developers.google.com/discovery/v1/type-format format)` Zero-based starting index of the found text, inclusively. |
| `end` | `string (https://developers.google.com/discovery/v1/type-format format)` Zero-based ending index of the found text, exclusively. |
| `quote` | `string` The snippet of the sensitive text. This field is only populated during deidentification if `storeQuote` is set to true in `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores#DeidentifyConfig`. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations/create` | Creates a new `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation` record. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations/delete` | Deletes an `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation` or returns NOT_FOUND if it does not exist. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations/get` | Gets an `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation`. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations/list` | Lists the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation` in the given `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores#AnnotationStore` for a source resource. |
| ### `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations/patch` | Updates the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.annotationStores.annotations#Annotation`. |