# AdRequest

- [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#SCHEMA_REPRESENTATION)
- [RequestMetadata](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#RequestMetadata)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#RequestMetadata.SCHEMA_REPRESENTATION)
- [ResponseMetadata](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#ResponseMetadata)
  - [JSON representation](https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#ResponseMetadata.SCHEMA_REPRESENTATION)

Details of an ad request to an ad server.

| JSON representation |
|---|
| ``` { "uri": string, "requestMetadata": { object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#RequestMetadata`) }, "responseMetadata": { object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#ResponseMetadata`) } } ``` |

| Fields ||
|---|---|
| `uri` | `string` The ad tag URI processed with integrated macros. |
| `requestMetadata` | ``object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#RequestMetadata`)`` The request metadata used to make the ad request. |
| `responseMetadata` | ``object (`https://docs.cloud.google.com/video-stitcher/docs/reference/rest/v1/AdRequest#ResponseMetadata`)`` The response metadata received from the ad request. |

## RequestMetadata

Metadata for an ad request.

| JSON representation |
|---|
| ``` { "headers": { object } } ``` |

| Fields ||
|---|---|
| `headers` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` The HTTP headers of the ad request. |

## ResponseMetadata

Metadata for the response of an ad request.

| JSON representation |
|---|
| ``` { "error": string, "headers": { object }, "statusCode": string, "sizeBytes": integer, "duration": string, "body": string } ``` |

| Fields ||
|---|---|
| `error` | `string` Error message received when making the ad request. |
| `headers` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` Headers from the response. |
| `statusCode` | `string` Status code for the response. |
| `sizeBytes` | `integer` Size in bytes of the response. |
| `duration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Total time elapsed for the response. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `body` | `string` The body of the response. |