Class WorkRequest.Builder
- java.lang.Object
-
- com.oracle.bmc.osmanagementhub.model.WorkRequest.Builder
-
- Enclosing class:
- WorkRequest
public static class WorkRequest.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkRequest
build()
WorkRequest.Builder
childrenId(List<String> childrenId)
The list of OCIDs for the child work requests.WorkRequest.Builder
compartmentId(String compartmentId)
The OCID of the compartment that contains the work request.WorkRequest.Builder
contentChecksum(String contentChecksum)
The EventFingerprint associated with the content.WorkRequest.Builder
contentLocation(String contentLocation)
The location of the bundle in the filesystem of the resource associated to this work request.WorkRequest.Builder
copy(WorkRequest model)
WorkRequest.Builder
description(String description)
A short description about the work request.WorkRequest.Builder
displayName(String displayName)
A short display name for the work request.WorkRequest.Builder
eventId(String eventId)
The event id of the content.WorkRequest.Builder
id(String id)
The OCID of the work request.WorkRequest.Builder
initiatorId(String initiatorId)
The OCID of the resource that initiated the work request.WorkRequest.Builder
isManagedByAutonomousLinux(Boolean isManagedByAutonomousLinux)
Indicates whether this work request is managed by the Autonomous Linux service.WorkRequest.Builder
managementStation(WorkRequestManagementStationDetails managementStation)
WorkRequest.Builder
message(String message)
A progress or error message, if there is any.WorkRequest.Builder
moduleSpecs(List<ModuleSpecDetails> moduleSpecs)
The list of appstream modules being operated on.WorkRequest.Builder
operationType(WorkRequestOperationType operationType)
Type of the work request.WorkRequest.Builder
packageNames(List<String> packageNames)
A list of package names to be installed, updated, or removed.WorkRequest.Builder
parentId(String parentId)
The OCID of the parent work request, if there is any.WorkRequest.Builder
percentComplete(Float percentComplete)
The percentage complete of the operation tracked by this work request.WorkRequest.Builder
rebootTimeoutInMins(Integer rebootTimeoutInMins)
The number of minutes the service waits for the reboot to complete.WorkRequest.Builder
rerunOfId(String rerunOfId)
The OCID of the original work request that is being rerun.WorkRequest.Builder
resources(List<WorkRequestResource> resources)
The list of OCIDs for the resources affected by the work request.WorkRequest.Builder
retryIntervals(List<Integer> retryIntervals)
The amount of time in minutes to wait until retrying the work request.WorkRequest.Builder
retryOfId(String retryOfId)
The OCID of the original work request that is being retried.WorkRequest.Builder
status(OperationStatus status)
Status of the work request.WorkRequest.Builder
timeCreated(Date timeCreated)
The date and time the work request was created (in RFC 3339 format).WorkRequest.Builder
timeFinished(Date timeFinished)
The date and time the work request completed (in RFC 3339 format).WorkRequest.Builder
timeScheduled(Date timeScheduled)
The scheduled date and time to retry the work request (in RFC 3339 format).WorkRequest.Builder
timeStarted(Date timeStarted)
The date and time the work request started (in RFC 3339 format).WorkRequest.Builder
timeUpdated(Date timeUpdated)
The date and time the work request started (in RFC 3339 format).WorkRequest.Builder
windowsUpdateNames(List<String> windowsUpdateNames)
The UUIDs of the target Windows update (only used when operation type is INSTALL_WINDOWS_UPDATES).
-
-
-
Method Detail
-
operationType
public WorkRequest.Builder operationType(WorkRequestOperationType operationType)
Type of the work request.- Parameters:
operationType
- the value to set- Returns:
- this builder
-
status
public WorkRequest.Builder status(OperationStatus status)
Status of the work request.- Parameters:
status
- the value to set- Returns:
- this builder
-
id
public WorkRequest.Builder id(String id)
The OCID of the work request.- Parameters:
id
- the value to set- Returns:
- this builder
-
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
-
resources
public WorkRequest.Builder resources(List<WorkRequestResource> resources)
The list of OCIDs for the resources affected by the work request.- Parameters:
resources
- 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
-
managementStation
public WorkRequest.Builder managementStation(WorkRequestManagementStationDetails managementStation)
-
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
-
build
public WorkRequest build()
-
copy
public WorkRequest.Builder copy(WorkRequest model)
-
-