Record Class DurableExecutionOutput
java.lang.Object
java.lang.Record
software.amazon.lambda.durable.model.DurableExecutionOutput
- Record Components:
status- the execution status (SUCCEEDED, FAILED, or PENDING)result- the serialized result on success, or null otherwiseerror- the error details on failure, or null otherwise
public record DurableExecutionOutput(ExecutionStatus status, String result, software.amazon.awssdk.services.lambda.model.ErrorObject error)
extends Record
Output payload returned by the Lambda handler to the Durable Functions backend.
-
Constructor Summary
ConstructorsConstructorDescriptionDurableExecutionOutput(ExecutionStatus status, String result, software.amazon.awssdk.services.lambda.model.ErrorObject error) Creates an instance of aDurableExecutionOutputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.software.amazon.awssdk.services.lambda.model.ErrorObjecterror()Returns the value of theerrorrecord component.static DurableExecutionOutputfailure(software.amazon.awssdk.services.lambda.model.ErrorObject errorObject) Creates a failed output with the given error details.final inthashCode()Returns a hash code value for this object.static DurableExecutionOutputpending()Creates a pending output indicating the execution was suspended.result()Returns the value of theresultrecord component.status()Returns the value of thestatusrecord component.static DurableExecutionOutputCreates a successful output with the given serialized result.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DurableExecutionOutput
public DurableExecutionOutput(ExecutionStatus status, String result, software.amazon.awssdk.services.lambda.model.ErrorObject error) Creates an instance of aDurableExecutionOutputrecord class.
-
-
Method Details
-
success
Creates a successful output with the given serialized result. -
pending
Creates a pending output indicating the execution was suspended. -
failure
public static DurableExecutionOutput failure(software.amazon.awssdk.services.lambda.model.ErrorObject errorObject) Creates a failed output with the given error details. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
error
public software.amazon.awssdk.services.lambda.model.ErrorObject error()Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-