Argument

JSON representation
{
  "name": string,
  "rawText": string,
  "textValue": string,
  "status": {
    object(Status)
  },

  // Union field value can be only one of the following:
  "intValue": string,
  "floatValue": number,
  "boolValue": boolean,
  "datetimeValue": {
    object(DateTime)
  },
  "placeValue": {
    object(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(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 (int64 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(DateTime)

Specified for the built-in intent: actions.intent.DATETIME.

placeValue

object(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 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 (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. The error model is designed to be:

  • Simple to use and understand for most users
  • Flexible enough to meet unexpected needs

Overview

The Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.

Language mapping

The Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.

Other uses

The error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.

Example uses of this error model include:

  • Partial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.

  • Workflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.

  • Batch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.

  • Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.

  • Logging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.

JSON representation
{
  "code": number,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
Fields
code

number

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 google.rpc.Status.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(Date)
  },
  "time": {
    object(TimeOfDay)
  }
}
Fields
date

object(Date)

Date value

time

object(TimeOfDay)

Time value

Date

Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and google.protobuf.Timestamp.

JSON representation
{
  "year": number,
  "month": number,
  "day": number
}
Fields
year

number

Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.

month

number

Month of year. Must be from 1 to 12, or 0 if specifying a date without a month.

day

number

Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year/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 google.type.Date and google.protobuf.Timestamp.

JSON representation
{
  "hours": number,
  "minutes": number,
  "seconds": number,
  "nanos": number
}
Fields
hours

number

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

number

Minutes of hour of day. Must be from 0 to 59.

seconds

number

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

number

Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.