# Argument

- [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#SCHEMA_REPRESENTATION)
- [Status](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Status)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Status.SCHEMA_REPRESENTATION)
- [DateTime](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#DateTime)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#DateTime.SCHEMA_REPRESENTATION)
- [Date](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Date)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Date.SCHEMA_REPRESENTATION)
- [TimeOfDay](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#TimeOfDay)
  - [JSON representation](https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#TimeOfDay.SCHEMA_REPRESENTATION)

| JSON representation ||
|---|---|
| ``` { "name": string, "rawText": string, "textValue": string, "status": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Status`) }, // Union field `value` can be only one of the following: "intValue": string, "floatValue": number, "boolValue": boolean, "datetimeValue": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#DateTime`) }, "placeValue": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Location`) }, "extension": { "@type": string, field1: ..., ... }, "structuredValue": { object } // End of list of possible types for union field `value`. } ``` |

| Fields ||
|---|---|---|
| `name` | `string` name of the argument being provided for the input. |
| `rawText` | `string` The raw text, typed or spoken, that provided the value for the argument. |
| `textValue` | `string` Specified when query pattern includes a `$org.schema.type.Text` type or expected input has a built-in intent: `actions.intent.TEXT`, or `actions.intent.OPTION`. Note that for the `OPTION` intent, we set the `textValue` as option key, the `rawText` above will indicate the raw span in user's query. |
| `status` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Status`)`` Specified when an error was encountered while computing the argument. For example, the built-in intent "actions.intent.PLACE" can return an error status if the user denied the permission to access their device location. |
| Union field `value`. One of the following is specified. `value` can be only one of the following: |||
| `intValue` | `string (https://developers.google.com/discovery/v1/type-format format)` Specified when query pattern includes a $org.schema.type.Number type or expected input has a built-in intent: "assistant.intent.action.NUMBER". |
| `floatValue` | `number` Specified for built-in intent: "actions.intent.NUMBER" |
| `boolValue` | `boolean` Specified when query pattern includes a `$org.schema.type.YesNo` type or expected input has a built-in intent: `actions.intent.CONFIRMATION`. NOTE: if the boolean value is missing, it represents `false`. |
| `datetimeValue` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#DateTime`)`` Specified for the built-in intent: `actions.intent.DATETIME`. |
| `placeValue` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Location`)`` Specified when query pattern includes a $org.schema.type.Location type or expected input has a built-in intent: "actions.intent.PLACE". |
| `extension` | `object` Extension whose type depends on the argument. For example, if the argument name is `SIGN_IN` for the `actions.intent.SIGN_IN` intent, then this extension will contain a `https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/SignInValue` value. An object containing fields of an arbitrary type. An additional field `"@type"` contains a URI identifying the type. Example: `{ "id": 1234, "@type": "types.example.com/standard/id" }`. |
| `structuredValue` | ``object (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Struct` format)`` Specified when Google needs to pass data value in JSON format. |

## Status

The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).

| JSON representation ||
|---|---|
| ``` { "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } ``` |

| Fields ||
|---|---|
| `code` | `integer` The status code, which should be an enum value of `google.rpc.Code`. |
| `message` | `string` A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the `https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Status.FIELDS.details` field, or localized by the client. |
| `details[]` | `object` A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field `"@type"` contains a URI identifying the type. Example: `{ "id": 1234, "@type": "types.example.com/standard/id" }`. |

## DateTime

date and time argument value parsed from user input. Does not include time zone information.

| JSON representation ||
|---|---|
| ``` { "date": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Date`) }, "time": { object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#TimeOfDay`) } } ``` |

| Fields ||
|---|---|
| `date` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Date`)`` date value |
| `time` | ``object (`https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#TimeOfDay`)`` time value |

## Date

Represents a whole or partial calendar date, e.g. a birthday. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. This can represent:

- A full date, with non-zero year, month and day values
- A month and day value, with a zero year, e.g. an anniversary
- A year on its own, with zero month and day values
- A year and month value, with a zero day, e.g. a credit card expiration date

Related types are `https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#TimeOfDay` and `google.protobuf.Timestamp`.

| JSON representation ||
|---|---|
| ``` { "year": integer, "month": integer, "day": integer } ``` |

| Fields ||
|---|---|
| `year` | `integer` Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. |
| `month` | `integer` Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day. |
| `day` | `integer` Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. |

## TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are `https://developers.google.com/assistant/df-asdk/reference/webhook/rest/Shared.Types/Argument#Date` and `google.protobuf.Timestamp`.

| JSON representation ||
|---|---|
| ``` { "hours": integer, "minutes": integer, "seconds": integer, "nanos": integer } ``` |

| Fields ||
|---|---|
| `hours` | `integer` Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
| `minutes` | `integer` Minutes of hour of day. Must be from 0 to 59. |
| `seconds` | `integer` Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds. |
| `nanos` | `integer` Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. |