Skip to main content

MakeGenericLiteral

Constructs a core.Literal object from a structpb.Struct by wrapping it as a generic scalar value.

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 literal type.

Parameters

NameTypeDescription
v*structpb.StructThe structpb.Struct to be embedded as a generic literal value within the core.Literal object.

Returns

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