Class WorkRequest.Builder

  • Enclosing class:
    WorkRequest

    public static class WorkRequest.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • operationType

        public WorkRequest.Builder operationType​(OperationType operationType)
        The asynchronous operation tracked by this work request.
        Parameters:
        operationType - the value to set
        Returns:
        this builder
      • compartmentId

        public WorkRequest.Builder compartmentId​(String compartmentId)
        The OCID of the compartment that contains the work request.

        Work requests should be scoped to the same compartment as the resource the work request affects. If the work request affects multiple resources, and those resources aren’t in the same compartment, it’s up to the service team to pick the primary resource whose compartment should be used.

        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • percentComplete

        public WorkRequest.Builder percentComplete​(Float percentComplete)
        The percentage complete of the operation tracked by this work request.
        Parameters:
        percentComplete - the value to set
        Returns:
        this builder
      • timeAccepted

        public WorkRequest.Builder timeAccepted​(Date timeAccepted)
        The date and time the request was created (formatted according to RFC3339).
        Parameters:
        timeAccepted - the value to set
        Returns:
        this builder
      • timeStarted

        public WorkRequest.Builder timeStarted​(Date timeStarted)
        The date and time the work request transitioned from ACCEPTED to IN_PROGRESS (formatted according to RFC3339).
        Parameters:
        timeStarted - the value to set
        Returns:
        this builder
      • timeFinished

        public WorkRequest.Builder timeFinished​(Date timeFinished)
        The date and time the work request reached a terminal state, either FAILED or SUCCEEDED (formatted according to RFC3339).
        Parameters:
        timeFinished - the value to set
        Returns:
        this builder
      • timeLastUpdated

        public WorkRequest.Builder timeLastUpdated​(Date timeLastUpdated)
        The date and time the work request percentage was last updated.

        (formatted according to RFC3339).

        Parameters:
        timeLastUpdated - the value to set
        Returns:
        this builder
      • totalTaskCount

        public WorkRequest.Builder totalTaskCount​(Integer totalTaskCount)
        The total number of tasks to be executed for this work request.
        Parameters:
        totalTaskCount - the value to set
        Returns:
        this builder
      • completedTaskCount

        public WorkRequest.Builder completedTaskCount​(Integer completedTaskCount)
        The number of tasks had been executed to a terminal state.
        Parameters:
        completedTaskCount - the value to set
        Returns:
        this builder