Standard library
protobuf.types.any
Modules
Module protobuf.types.any
ballerina/protobuf.types.any
1.2.1
Overview
This module provides APIs to represent google/protobuf/any.proto
.
For information on the operations, which you can perform with the protobuf module, see the below Functions.
Functions
pack
Isolated Function
Generate and return the generic 'any:Any
record that is used to represent protobuf Any
type.
Parameters
- message ValueType - The record or the scalar value to be packed as Any type
Return Type
- Any - Any value representation of the given message
unpack
Isolated Function
Unpack and return the specified Ballerina value
Parameters
- anyValue Any - Any value to be unpacked
- targetTypeOfAny ValueTypeDesc (default <>) - Type descriptor of the return value
Return Type
- targetTypeOfAny|Error - Return a value of the given type
Records
protobuf.types.any: Any
Closed record
Represent protobuf Any
type.
Fields
- typeUrl string - The URL identifier of the message
- value ValueType - The Any data message
protobuf.types.any: ContextAny
Closed record
Context representation of the Any
type.
Fields
- content Any - Any data content
protobuf.types.any: ContextAnyStream
Closed record
Streaming representation of the Any
type.
Fields
Types
Errors
protobuf.types.any: TypeMismatchError
Distinct
Type mismatch error that returns when a user specifies an incorrect type.