# DiscoveryMetadata

- [JSON representation](https://docs.cloud.google.com/number-registry/reference/rest/v1alpha/DiscoveryMetadata#SCHEMA_REPRESENTATION)
- [ResourceState](https://docs.cloud.google.com/number-registry/reference/rest/v1alpha/DiscoveryMetadata#ResourceState)

Metadata about a discovered resource, tracking event times, state, and source information.

| JSON representation |
|---|
| ``` { "eventTime": string, "createTime": string, "updateTime": string, "state": enum (`https://docs.cloud.google.com/number-registry/reference/rest/v1alpha/DiscoveryMetadata#ResourceState`), "resource": string, "resourceUri": string, "sourceId": string, "sourceSubId": string } ``` |

| Fields ||
|---|---|
| `eventTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the event happened. 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"`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the resource was created. 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"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the resource was last modified. 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"`. |
| `state` | ``enum (`https://docs.cloud.google.com/number-registry/reference/rest/v1alpha/DiscoveryMetadata#ResourceState`)`` Output only. The state of the resource. |
| `resource` | `string` Output only. The resource name of the discovered resource, should be API-agnostic. Example: "projects/{project_number}/networks/{network_id}". |
| `resourceUri` | `string` Output only. The resource uri of the discovered resource. |
| `sourceId` | `string` Output only. The canonical google.aip.dev/122 name of the source resource. |
| `sourceSubId` | `string` Output only. A single source resource can be the source of multiple CNR resources. This sub_id is used to distinguish between the different CNR resources derived from the same upstream resource. For example, a single subnetwork can be the source of multiple Ranges, one for each protocol. In this case, the sub_id could be "private-ipv4" or "private-ipv6". |

## ResourceState

The state of the resource.

| Enums ||
|---|---|
| `RESOURCE_STATE_UNSPECIFIED` | Unspecified state. |
| `INVALID` | The resource is in an invalid state. |
| `EXISTS` | The resource exists in the backing store (is not tombstoned or completely missing) and there were no failures reading out the resource level metadata. |
| `DOES_NOT_EXIST` | Resource does not exist or has been deleted or soft-deleted. |
| `ERROR` | There was an error reading out the resource level metadata. |