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
| Name | Type | Description |
|---|---|---|
| specBytes | []byte | The byte array containing the serialized automation specification. |
| automationType | string | An optional string representing the type of automation. If provided and valid, it will set the Type field of the TriggerAutomationSpec. |
Returns
| Type | Description |
|---|---|
*taskpb.TriggerAutomationSpec, error | The deserialized TriggerAutomationSpec object and an error if unmarshaling fails. |