Any
| Name | Tag | Type | Label | Description |
|---|---|---|---|---|
type_url | 1 | string | optional | Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to
simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional
restriction (for the text format) that the content of the reference
must consist only of alphanumeric characters, percent-encoded escapes, and
characters in the following set (not including the outer backticks):
In the original design of |
value | 2 | bytes | optional | Holds a Protobuf serialization of the type described by type_url. |
Anycontains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.In its binary encoding, an
Anyis an ordinary message; but in other wire forms like JSON, it has a special encoding. The format of the type URL is described on thetype_urlfield.Protobuf APIs provide utilities to interact with
Anyvalues:Anywrapper around it.Anymessage, either into an existing message or a new one. Unpack operations must check the type of the value they unpack against the declaredtype_url.Anycontains a message of the given type, i.e. whether it can 'unpack' that type.The JSON format representation of an
Anyfollows one of these cases:Anyis the same as that of the message, with an additional@typefield which contains the type URL.@typewhich contains the type URL and a keyvaluewhich contains the JSON-serialized value.The text format representation of an
Anyis like a message with one field whose name is the type URL in brackets. For example, anAnycontaining afoo.Barmessage may be written[type.googleapis.com/foo.Bar] { a: 2 }.