Skip to main content

MakeGenericLiteral

Creates a generic literal from a structpb.Struct.

def MakeGenericLiteral(
v: *structpb.Struct
) - > *core.Literal

Constructs a core.Literal object from a structpb.Struct, embedding the struct as a generic scalar value. This function is used to wrap a structured protocol buffer message into a generic literal type.

Parameters

NameTypeDescription
v*structpb.StructThe structpb.Struct to be wrapped as a generic literal. This represents a structured data value that needs to be embedded within a core.Literal.

Returns

TypeDescription
*core.LiteralA pointer to a core.Literal object containing the provided structpb.Struct as a generic scalar value.