Class: Failure
coresdk.child_workflow.Failure
Used in ChildWorkflowResult to report non successful outcomes such as application failures, timeouts, terminations, and cancellations.
Implements
Constructors
constructor
• new Failure(properties?
)
Constructs a new Failure.
Parameters
Name | Type |
---|---|
properties? | IFailure |
Properties
failure
• Optional
failure: null
| IFailure
Failure failure.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this Failure to JSON.
Returns
Object
JSON object
create
▸ Static
create(properties?
): Failure
Creates a new Failure instance using the specified properties.
Parameters
Name | Type |
---|---|
properties? | IFailure |
Returns
Failure instance
decode
▸ Static
decode(reader
, length?
): Failure
Decodes a Failure message from the specified reader or buffer.
throws
{Error} If the payload is not a reader or valid buffer
throws
{$protobuf.util.ProtocolError} If required fields are missing
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | - |
Returns
Failure
decodeDelimited
▸ Static
decodeDelimited(reader
): Failure
Decodes a Failure message from the specified reader or buffer, length delimited.
throws
{Error} If the payload is not a reader or valid buffer
throws
{$protobuf.util.ProtocolError} If required fields are missing
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Failure
encode
▸ Static
encode(message
, writer?
): Writer
Encodes the specified Failure message. Does not implicitly {@link coresdk.child_workflow.Failure.verify|verify} messages.
Parameters
Name | Type | Description |
---|---|---|
message | IFailure | Failure message or plain object to encode |
writer? | Writer | - |
Returns
Writer
Writer
encodeDelimited
▸ Static
encodeDelimited(message
, writer?
): Writer
Encodes the specified Failure message, length delimited. Does not implicitly {@link coresdk.child_workflow.Failure.verify|verify} messages.
Parameters
Name | Type | Description |
---|---|---|
message | IFailure | Failure message or plain object to encode |
writer? | Writer | - |
Returns
Writer
Writer
fromObject
▸ Static
fromObject(object
): Failure
Creates a Failure message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
Failure
toObject
▸ Static
toObject(message
, options?
): Object
Creates a plain object from a Failure message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | Failure | Failure |
options? | IConversionOptions | - |
Returns
Object
Plain object