Class AsyncOperationResult

All Implemented Interfaces:
HasHandlers
Direct Known Subclasses:
AIResponse, AsyncMultipleValuesGenerationResult, AsyncSingleValueGenerationResult, BuildViaAIResponse, SuggestRecordSummaryTitleResult, SummarizeRecordsPartialResult, SummarizeRecordsResult, SummarizeValueResult

public class AsyncOperationResult extends RefDataClass
An object containing information about the result of an asynchronous operation.
  • Constructor Details

    • AsyncOperationResult

      public AsyncOperationResult()
    • AsyncOperationResult

      public AsyncOperationResult(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static AsyncOperationResult getOrCreateRef(JavaScriptObject jsObj)
    • setCancellationReason

      public AsyncOperationResult setCancellationReason(String cancellationReason)
      If this is a CANCELED-type result, an optional statement to be displayed to the user of the reason for cancellation.
      Parameters:
      cancellationReason - New cancellationReason value. Default value is null
      Returns:
      AsyncOperationResult instance, for chaining setter calls
      See Also:
    • getCancellationReason

      public String getCancellationReason()
      If this is a CANCELED-type result, an optional statement to be displayed to the user of the reason for cancellation.
      Returns:
      Current cancellationReason value. Default value is null
      See Also:
    • setDisabledMessage

      public AsyncOperationResult setDisabledMessage(String disabledMessage)
      If this is a DISABLED-type result, an optional statement to be displayed to the user that the operation was disabled. This may include information about the reason why the operation was disabled.

      It is recommended to use the past tense, because this message may continue to be displayed to the user when the conditions for the operation being disabled are no longer the case.

      Parameters:
      disabledMessage - New disabledMessage value. Default value is null
      Returns:
      AsyncOperationResult instance, for chaining setter calls
      See Also:
    • getDisabledMessage

      public String getDisabledMessage()
      If this is a DISABLED-type result, an optional statement to be displayed to the user that the operation was disabled. This may include information about the reason why the operation was disabled.

      It is recommended to use the past tense, because this message may continue to be displayed to the user when the conditions for the operation being disabled are no longer the case.

      Returns:
      Current disabledMessage value. Default value is null
      See Also:
    • setErrorMessage

      public AsyncOperationResult setErrorMessage(String errorMessage)
      If this is an ERROR-type result, an optional statement to be displayed to the user of the error that occurred.
      Parameters:
      errorMessage - New errorMessage value. Default value is null
      Returns:
      AsyncOperationResult instance, for chaining setter calls
      See Also:
    • getErrorMessage

      public String getErrorMessage()
      If this is an ERROR-type result, an optional statement to be displayed to the user of the error that occurred.
      Returns:
      Current errorMessage value. Default value is null
      See Also:
    • setType

      The result type.

      null is interpreted as a non-successful result type.

      Parameters:
      type - New type value. Default value is *initialized by the implementation*
      Returns:
      AsyncOperationResult instance, for chaining setter calls
    • getType

      public AsyncOperationResultType getType()
      The result type.

      null is interpreted as a non-successful result type.

      Returns:
      Current type value. Default value is *initialized by the implementation*