Class ResourceAction.Builder
- java.lang.Object
-
- com.oracle.bmc.optimizer.model.ResourceAction.Builder
-
- Enclosing class:
- ResourceAction
public static class ResourceAction.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceAction.Builder
action(Action action)
ResourceAction
build()
ResourceAction.Builder
categoryId(String categoryId)
The unique OCID associated with the category.ResourceAction.Builder
compartmentId(String compartmentId)
The OCID of the compartment.ResourceAction.Builder
compartmentName(String compartmentName)
The name associated with the compartment.ResourceAction.Builder
copy(ResourceAction model)
ResourceAction.Builder
estimatedCostSaving(Double estimatedCostSaving)
The estimated cost savings, in dollars, for the resource action.ResourceAction.Builder
extendedMetadata(Map<String,Object> extendedMetadata)
Additional metadata key/value pairs that you provide.ResourceAction.Builder
id(String id)
The unique OCID associated with the resource action.ResourceAction.Builder
lifecycleState(LifecycleState lifecycleState)
The resource action’s current state.ResourceAction.Builder
metadata(Map<String,String> metadata)
Custom metadata key/value pairs for the resource action.ResourceAction.Builder
name(String name)
The name assigned to the resource.ResourceAction.Builder
recommendationId(String recommendationId)
The unique OCID associated with the recommendation.ResourceAction.Builder
resourceId(String resourceId)
The unique OCID associated with the resource.ResourceAction.Builder
resourceType(String resourceType)
The kind of resource.ResourceAction.Builder
status(Status status)
The current status of the resource action.ResourceAction.Builder
timeCreated(Date timeCreated)
The date and time the resource action details were created, in the format defined by RFC3339.ResourceAction.Builder
timeStatusBegin(Date timeStatusBegin)
The date and time that the resource action entered its current status.ResourceAction.Builder
timeStatusEnd(Date timeStatusEnd)
The date and time the current status will change.ResourceAction.Builder
timeUpdated(Date timeUpdated)
The date and time the resource action details were last updated, in the format defined by RFC3339.
-
-
-
Method Detail
-
id
public ResourceAction.Builder id(String id)
The unique OCID associated with the resource action.- Parameters:
id
- the value to set- Returns:
- this builder
-
categoryId
public ResourceAction.Builder categoryId(String categoryId)
The unique OCID associated with the category.- Parameters:
categoryId
- the value to set- Returns:
- this builder
-
recommendationId
public ResourceAction.Builder recommendationId(String recommendationId)
The unique OCID associated with the recommendation.- Parameters:
recommendationId
- the value to set- Returns:
- this builder
-
resourceId
public ResourceAction.Builder resourceId(String resourceId)
The unique OCID associated with the resource.- Parameters:
resourceId
- the value to set- Returns:
- this builder
-
name
public ResourceAction.Builder name(String name)
The name assigned to the resource.- Parameters:
name
- the value to set- Returns:
- this builder
-
resourceType
public ResourceAction.Builder resourceType(String resourceType)
The kind of resource.- Parameters:
resourceType
- the value to set- Returns:
- this builder
-
compartmentId
public ResourceAction.Builder compartmentId(String compartmentId)
The OCID of the compartment.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
compartmentName
public ResourceAction.Builder compartmentName(String compartmentName)
The name associated with the compartment.- Parameters:
compartmentName
- the value to set- Returns:
- this builder
-
action
public ResourceAction.Builder action(Action action)
-
lifecycleState
public ResourceAction.Builder lifecycleState(LifecycleState lifecycleState)
The resource action’s current state.- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
estimatedCostSaving
public ResourceAction.Builder estimatedCostSaving(Double estimatedCostSaving)
The estimated cost savings, in dollars, for the resource action.- Parameters:
estimatedCostSaving
- the value to set- Returns:
- this builder
-
status
public ResourceAction.Builder status(Status status)
The current status of the resource action.- Parameters:
status
- the value to set- Returns:
- this builder
-
timeStatusBegin
public ResourceAction.Builder timeStatusBegin(Date timeStatusBegin)
The date and time that the resource action entered its current status.The format is defined by RFC3339.
For example, "The status of the resource action changed from pending to current(ignored) on this date and time."
- Parameters:
timeStatusBegin
- the value to set- Returns:
- this builder
-
timeStatusEnd
public ResourceAction.Builder timeStatusEnd(Date timeStatusEnd)
The date and time the current status will change.The format is defined by RFC3339.
For example, "The current postponed status of the resource action will end and change to pending on this date and time."
- Parameters:
timeStatusEnd
- the value to set- Returns:
- this builder
-
metadata
public ResourceAction.Builder metadata(Map<String,String> metadata)
Custom metadata key/value pairs for the resource action.*Metadata Example**
"metadata" : { "cpuRecommendedShape": "VM.Standard1.1", "computeMemoryUtilization": "26.05734124418388", "currentShape": "VM.Standard1.2", "instanceRecommendedShape": "VM.Standard1.1", "computeCpuUtilization": "7.930035319720132", "memoryRecommendedShape": "None" }
- Parameters:
metadata
- the value to set- Returns:
- this builder
-
extendedMetadata
public ResourceAction.Builder extendedMetadata(Map<String,Object> extendedMetadata)
Additional metadata key/value pairs that you provide.They serve the same purpose and functionality as fields in the metadata object.
They are distinguished from metadata fields in that these can be nested JSON objects (whereas metadata fields are string/string maps only).
For example:
{"CurrentShape": {"name":"VM.Standard2.16"}, "RecommendedShape": {"name":"VM.Standard2.8"}}
- Parameters:
extendedMetadata
- the value to set- Returns:
- this builder
-
timeCreated
public ResourceAction.Builder timeCreated(Date timeCreated)
The date and time the resource action details were created, in the format defined by RFC3339.- Parameters:
timeCreated
- the value to set- Returns:
- this builder
-
timeUpdated
public ResourceAction.Builder timeUpdated(Date timeUpdated)
The date and time the resource action details were last updated, in the format defined by RFC3339.- Parameters:
timeUpdated
- the value to set- Returns:
- this builder
-
build
public ResourceAction build()
-
copy
public ResourceAction.Builder copy(ResourceAction model)
-
-