# TimeTarget

- [JSON representation](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/TimeTarget#SCHEMA_REPRESENTATION)

A target publish or event time. Can be used for seeking to or retrieving the corresponding cursor.

| JSON representation |
|---|
| ``` { // Union field `time` can be only one of the following: "publishTime": string, "eventTime": string // End of list of possible types for union field `time`. } ``` |

| Fields ||
|---|---|
| Union field `time`. The type of message time to query. `time` can be only one of the following: ||
| `publishTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Request the cursor of the first message with publish time greater than or equal to `publishTime`. All messages thereafter are guaranteed to have publish times \>= `publishTime`. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |
| `eventTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Request the cursor of the first message with event time greater than or equal to `eventTime`. If messages are missing an event time, the publish time is used as a fallback. As event times are user supplied, subsequent messages may have event times less than `eventTime` and should be filtered by the client, if necessary. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: `"2014-10-02T15:01:23Z"` and `"2014-10-02T15:01:23.045123456Z"`. |