UnmarshalAutomationSpec
Deserializes stored automation spec bytes.
def UnmarshalAutomationSpec(
specBytes: []byte,
automationType: string
) - > *taskpb.TriggerAutomationSpec, error
Deserializes stored automation spec bytes. This function is used to reconstruct a TriggerAutomationSpec object from its byte representation, optionally setting its type based on a provided string.
Parameters
| Name | Type | Description |
|---|---|---|
| specBytes | []byte | The byte slice containing the serialized automation specification data. |
| 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. |