Package com.vmware.nsx_policy.model
Class PolicyTask.Builder
- java.lang.Object
-
- com.vmware.nsx_policy.model.PolicyTask.Builder
-
- Enclosing class:
- PolicyTask
public static final class PolicyTask.Builder extends java.lang.Object
Builder class forPolicyTask
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Constructor with parameters for the required properties ofPolicyTask
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicyTask
build()
PolicyTask.Builder
setAsyncResponseAvailable(java.lang.Boolean asyncResponseAvailable)
True if response for asynchronous request is available This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setCancelable(java.lang.Boolean cancelable)
True if this task can be canceled This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setDescription(java.lang.String description)
Description of the task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setEndTime(java.lang.Long endTime)
The end time of the task in epoch milliseconds format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setFailureMsg(java.lang.String failureMsg)
This property holds the reason of the task failure, if any.PolicyTask.Builder
setId(java.lang.String id)
Identifier for this task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setLinks(java.util.List<ResourceLink> links)
The server will populate this field when returing the resource.PolicyTask.Builder
setMessage(java.lang.String message)
A message describing the disposition of the task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setProgress(java.lang.Long progress)
Task progress if known, from 0 to 100 format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setRequestMethod(java.lang.String requestMethod)
HTTP request method This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setRequestUri(java.lang.String requestUri)
URI of the method invocation that spawned this task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setSchema(java.lang.String schema)
Schema for this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setSelf(SelfResourceLink self)
PolicyTask.Builder
setStartTime(java.lang.Long startTime)
The start time of the task in epoch milliseconds format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setStatus(java.lang.String status)
Possible values are:PolicyTask.STATUS_RUNNING
PolicyTask.STATUS_ERROR
PolicyTask.STATUS_SUCCESS
PolicyTask.STATUS_CANCELING
PolicyTask.STATUS_CANCELED
PolicyTask.STATUS_KILLED
Current status of the task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.PolicyTask.Builder
setUser(java.lang.String user)
Name of the user who created this task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.
-
-
-
Constructor Detail
-
Builder
public Builder()
Constructor with parameters for the required properties ofPolicyTask
.
-
-
Method Detail
-
setLinks
public PolicyTask.Builder setLinks(java.util.List<ResourceLink> links)
The server will populate this field when returing the resource. Ignored on PUT and POST. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
links
- New value for the property.
-
setSchema
public PolicyTask.Builder setSchema(java.lang.String schema)
Schema for this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
schema
- New value for the property.
-
setSelf
public PolicyTask.Builder setSelf(SelfResourceLink self)
- Parameters:
self
- New value for the property.
-
setAsyncResponseAvailable
public PolicyTask.Builder setAsyncResponseAvailable(java.lang.Boolean asyncResponseAvailable)
True if response for asynchronous request is available This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
asyncResponseAvailable
- New value for the property.
-
setCancelable
public PolicyTask.Builder setCancelable(java.lang.Boolean cancelable)
True if this task can be canceled This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
cancelable
- New value for the property.
-
setDescription
public PolicyTask.Builder setDescription(java.lang.String description)
Description of the task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
description
- New value for the property.
-
setEndTime
public PolicyTask.Builder setEndTime(java.lang.Long endTime)
The end time of the task in epoch milliseconds format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
endTime
- New value for the property.
-
setId
public PolicyTask.Builder setId(java.lang.String id)
Identifier for this task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
id
- New value for the property.
-
setMessage
public PolicyTask.Builder setMessage(java.lang.String message)
A message describing the disposition of the task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
message
- New value for the property.
-
setProgress
public PolicyTask.Builder setProgress(java.lang.Long progress)
Task progress if known, from 0 to 100 format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
progress
- New value for the property.
-
setRequestMethod
public PolicyTask.Builder setRequestMethod(java.lang.String requestMethod)
HTTP request method This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
requestMethod
- New value for the property.
-
setRequestUri
public PolicyTask.Builder setRequestUri(java.lang.String requestUri)
URI of the method invocation that spawned this task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
requestUri
- New value for the property.
-
setStartTime
public PolicyTask.Builder setStartTime(java.lang.Long startTime)
The start time of the task in epoch milliseconds format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
startTime
- New value for the property.
-
setStatus
public PolicyTask.Builder setStatus(java.lang.String status)
Possible values are: Current status of the task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
status
- New value for the property.
-
setUser
public PolicyTask.Builder setUser(java.lang.String user)
Name of the user who created this task This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
user
- New value for the property.
-
setFailureMsg
public PolicyTask.Builder setFailureMsg(java.lang.String failureMsg)
This property holds the reason of the task failure, if any. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
failureMsg
- New value for the property.
-
build
public PolicyTask build()
-
-