Class WorkRequest.Builder

  • Enclosing class:
    WorkRequest

    public static class WorkRequest.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • description

        public WorkRequest.Builder description​(String description)
        A short description about the work request.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • displayName

        public WorkRequest.Builder displayName​(String displayName)
        A short display name for the work request.
        Parameters:
        displayName - the value to set
        Returns:
        this builder
      • message

        public WorkRequest.Builder message​(String message)
        A progress or error message, if there is any.
        Parameters:
        message - the value to set
        Returns:
        this builder
      • parentId

        public WorkRequest.Builder parentId​(String parentId)
        The OCID of the parent work request, if there is any.
        Parameters:
        parentId - the value to set
        Returns:
        this builder
      • childrenId

        public WorkRequest.Builder childrenId​(List<String> childrenId)
        The list of OCIDs for the child work requests.
        Parameters:
        childrenId - 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 it affects. If the work request affects multiple resources the different compartments, the services selects the compartment of the primary resource.

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

        public WorkRequest.Builder packageNames​(List<String> packageNames)
        A list of package names to be installed, updated, or removed.
        Parameters:
        packageNames - the value to set
        Returns:
        this builder
      • windowsUpdateNames

        public WorkRequest.Builder windowsUpdateNames​(List<String> windowsUpdateNames)
        The UUIDs of the target Windows update (only used when operation type is INSTALL_WINDOWS_UPDATES).
        Parameters:
        windowsUpdateNames - the value to set
        Returns:
        this builder
      • moduleSpecs

        public WorkRequest.Builder moduleSpecs​(List<ModuleSpecDetails> moduleSpecs)
        The list of appstream modules being operated on.
        Parameters:
        moduleSpecs - 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
      • timeCreated

        public WorkRequest.Builder timeCreated​(Date timeCreated)
        The date and time the work request was created (in RFC 3339 format).
        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeUpdated

        public WorkRequest.Builder timeUpdated​(Date timeUpdated)
        The date and time the work request started (in RFC 3339 format).
        Parameters:
        timeUpdated - the value to set
        Returns:
        this builder
      • timeStarted

        public WorkRequest.Builder timeStarted​(Date timeStarted)
        The date and time the work request started (in RFC 3339 format).
        Parameters:
        timeStarted - the value to set
        Returns:
        this builder
      • timeFinished

        public WorkRequest.Builder timeFinished​(Date timeFinished)
        The date and time the work request completed (in RFC 3339 format).
        Parameters:
        timeFinished - the value to set
        Returns:
        this builder
      • initiatorId

        public WorkRequest.Builder initiatorId​(String initiatorId)
        The OCID of the resource that initiated the work request.
        Parameters:
        initiatorId - the value to set
        Returns:
        this builder
      • timeScheduled

        public WorkRequest.Builder timeScheduled​(Date timeScheduled)
        The scheduled date and time to retry the work request (in RFC 3339 format).
        Parameters:
        timeScheduled - the value to set
        Returns:
        this builder
      • contentLocation

        public WorkRequest.Builder contentLocation​(String contentLocation)
        The location of the bundle in the filesystem of the resource associated to this work request.
        Parameters:
        contentLocation - the value to set
        Returns:
        this builder
      • eventId

        public WorkRequest.Builder eventId​(String eventId)
        The event id of the content.

        This property is required when the work request type is IMPORT_CONTENT or REMOVE_CONTENT.

        Parameters:
        eventId - the value to set
        Returns:
        this builder
      • contentChecksum

        public WorkRequest.Builder contentChecksum​(String contentChecksum)
        The EventFingerprint associated with the content.

        This property is required when the work request type is IMPORT_CONTENT or REMOVE_CONTENT.

        Parameters:
        contentChecksum - the value to set
        Returns:
        this builder
      • retryOfId

        public WorkRequest.Builder retryOfId​(String retryOfId)
        The OCID of the original work request that is being retried.
        Parameters:
        retryOfId - the value to set
        Returns:
        this builder
      • rerunOfId

        public WorkRequest.Builder rerunOfId​(String rerunOfId)
        The OCID of the original work request that is being rerun.
        Parameters:
        rerunOfId - the value to set
        Returns:
        this builder
      • retryIntervals

        public WorkRequest.Builder retryIntervals​(List<Integer> retryIntervals)
        The amount of time in minutes to wait until retrying the work request.

        If set, the service will automatically retry a failed work request after the interval. For example, An interval set to [2,5,10]. If the initial execution of the work request fails, the service waits 2 minutes and then retries. If that fails, the service waits 5 minutes and then retries. If that fails, the service waits 10 minutes and then retries.

        Parameters:
        retryIntervals - the value to set
        Returns:
        this builder
      • isManagedByAutonomousLinux

        public WorkRequest.Builder isManagedByAutonomousLinux​(Boolean isManagedByAutonomousLinux)
        Indicates whether this work request is managed by the Autonomous Linux service.
        Parameters:
        isManagedByAutonomousLinux - the value to set
        Returns:
        this builder
      • rebootTimeoutInMins

        public WorkRequest.Builder rebootTimeoutInMins​(Integer rebootTimeoutInMins)
        The number of minutes the service waits for the reboot to complete.

        If the managed instance doesn’t reboot within the timeout, the service marks the reboot job as failed.

        Parameters:
        rebootTimeoutInMins - the value to set
        Returns:
        this builder