Note: There is a newer version (1.8.0) of this package available. Click here to view docs for the latest version.
Ballerina library
protobuf.types.any
Modules
Module protobuf.types.any
ballerina/protobuf.types.any Ballerina library
1.7.0
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
unpack
Isolated Function
function unpack(Any anyValue, ValueTypeDesc targetTypeOfAny) returns targetTypeOfAny|ErrorUnpack 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(default "") - The URL identifier of the message
- value ValueType(default ()) - 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
Errors
protobuf.types.any: TypeMismatchError
Distinct
Type mismatch error that returns when a user specifies an incorrect type.
Union types
Type descriptor types
protobuf.types.any: ValueTypeDesc
ValueTypeDesc
Type descriptor of ValueType.
Import
import ballerina/protobuf.types.any;Metadata
Released date: 11 months ago
Version: 1.7.0
License: Apache-2.0
Compatibility
Platform: java21
Ballerina version: 2201.11.0-20241209-162400-0c015833
GraalVM compatible: Yes
Pull count
Total: 8
Current verison: 0
Weekly downloads
Keywords
wrappers
Contributors
Dependencies