protobuf.types.any
Modules
Module protobuf.types.any

ballerina/protobuf.types.any Ballerina library
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
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
function unpack(Any anyValue, ValueTypeDesc targetTypeOfAny) returns targetTypeOfAny|Error
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
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
Context representation of the Any
type.
Fields
- content Any - Any data content
protobuf.types.any: ContextAnyStream
Streaming representation of the Any
type.
Fields
Errors
protobuf.types.any: TypeMismatchError
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: 15 days ago
Version: 1.7.0
License: Apache-2.0
Compatibility
Platform: java21
Ballerina version: 2201.11.0
GraalVM compatible: Yes
Pull count
Total: 123850
Current verison: 126
Weekly downloads
Keywords
wrappers
Contributors
Dependencies