Skip to main content

UnmarshalAutomationSpec

Deserializes stored automation spec bytes.

def UnmarshalAutomationSpec(
specBytes: []byte,
automationType: string
) - > *taskpb.TriggerAutomationSpec, error

Deserializes stored automation spec bytes into a TriggerAutomationSpec object. This function is used to reconstruct an automation specification from its byte representation, optionally setting its type if provided.

Parameters

NameTypeDescription
specBytes[]byteThe byte array containing the serialized automation specification.
automationTypestringAn optional string representing the type of automation. If provided and valid, it will set the Type field of the TriggerAutomationSpec.

Returns

TypeDescription
*taskpb.TriggerAutomationSpec, errorThe deserialized TriggerAutomationSpec object and an error if unmarshaling fails.