Interface CancelTaskResponse.Builder

  • Method Details

    • id

      The ID of the task. Pass it as taskId to GetTask or CancelTask.

      Parameters:
      id - The ID of the task. Pass it as taskId to GetTask or CancelTask.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • arn

      The Amazon Resource Name (ARN) of the task.

      Parameters:
      arn - The Amazon Resource Name (ARN) of the task.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • agentContextId

      CancelTaskResponse.Builder agentContextId(String agentContextId)

      The agent context's ID.

      Parameters:
      agentContextId - The agent context's ID.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • type

      The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.

      Parameters:
      type - The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.

      Parameters:
      type - The type of the task. It is set by the inputConfiguration member that the task was started with: IMPORT_DATA_DICTIONARY, IMPORT_VERIFIED_QUERIES, or IMPORT_ONTOLOGY.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.

      Parameters:
      status - The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.

      Parameters:
      status - The status of the task. A task moves from PENDING to IN_PROGRESS and ends COMPLETED, FAILED, or CANCELLED. After CancelTask, it is CANCELLING until it stops.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • description

      CancelTaskResponse.Builder description(String description)

      The description of the task, as given to StartTask.

      Parameters:
      description - The description of the task, as given to StartTask.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdAt

      CancelTaskResponse.Builder createdAt(Instant createdAt)

      The date and time when the task was created.

      Parameters:
      createdAt - The date and time when the task was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • updatedAt

      CancelTaskResponse.Builder updatedAt(Instant updatedAt)

      The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.

      Parameters:
      updatedAt - The date and time when the task was last updated, such as when its status changed. Equal to createdAt until the task first changes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statusReasonCode

      CancelTaskResponse.Builder statusReasonCode(String statusReasonCode)

      The code for why the task failed. Present only when status is FAILED.

      Valid values:

      • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

      • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

      • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

      • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

      Parameters:
      statusReasonCode - The code for why the task failed. Present only when status is FAILED.

      Valid values:

      • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

      • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

      • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

      • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusReasonCode

      CancelTaskResponse.Builder statusReasonCode(TaskStatusReasonCode statusReasonCode)

      The code for why the task failed. Present only when status is FAILED.

      Valid values:

      • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

      • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

      • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

      • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

      Parameters:
      statusReasonCode - The code for why the task failed. Present only when status is FAILED.

      Valid values:

      • GRAPH_NOT_ACTIVE - The agent context was deleted, or was not yet available, while the task ran.

      • ONTOLOGY_INVALID - An ontology is missing, has no loadable source, or its source is unsafe or too large.

      • ONTOLOGY_IMPORT_UNAVAILABLE - An ontology couldn't be imported because of a temporary problem. Start a new task.

      • ONTOLOGY_ALREADY_IMPORTED - This ontology version is already imported into the agent context.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • statusMessage

      CancelTaskResponse.Builder statusMessage(String statusMessage)

      The reason the task failed. Present only when status is FAILED.

      Parameters:
      statusMessage - The reason the task failed. Present only when status is FAILED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statistics

      Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.

      Parameters:
      statistics - Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • statistics

      Counts of the documents that the task analyzed and the change sets that it created. The counts are final once the task is COMPLETED, FAILED, or CANCELLED.

      This is a convenience method that creates an instance of the TaskStatistics.Builder avoiding the need to create one manually via TaskStatistics.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to statistics(TaskStatistics).

      Parameters:
      statistics - a consumer that will call methods on TaskStatistics.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • inputConfiguration

      CancelTaskResponse.Builder inputConfiguration(TaskInputConfigurationSummary inputConfiguration)

      A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.

      Parameters:
      inputConfiguration - A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • inputConfiguration

      default CancelTaskResponse.Builder inputConfiguration(Consumer<TaskInputConfigurationSummary.Builder> inputConfiguration)

      A summary of the input that the task was started with. Each document is returned as its name, size, and content type, not its content, and each ontology is returned as its ARN and, if set, its version.

      This is a convenience method that creates an instance of the TaskInputConfigurationSummary.Builder avoiding the need to create one manually via TaskInputConfigurationSummary.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to inputConfiguration(TaskInputConfigurationSummary).

      Parameters:
      inputConfiguration - a consumer that will call methods on TaskInputConfigurationSummary.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • outputs

      What the task created, in creation order. Set when it finishes.

      Parameters:
      outputs - What the task created, in creation order. Set when it finishes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputs

      What the task created, in creation order. Set when it finishes.

      Parameters:
      outputs - What the task created, in creation order. Set when it finishes.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outputs

      What the task created, in creation order. Set when it finishes.

      This is a convenience method that creates an instance of the TaskOutput.Builder avoiding the need to create one manually via TaskOutput.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to outputs(List<TaskOutput>).

      Parameters:
      outputs - a consumer that will call methods on TaskOutput.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: