org.jclouds.googlecomputeengine.domain
Class Operation
java.lang.Object
org.jclouds.googlecomputeengine.domain.Resource
org.jclouds.googlecomputeengine.domain.Operation
@Beta
public class Operation
- extends Resource
Describes an operation being executed on some Resource
- Author:
- David Alves
- See Also:
| Nested classes/interfaces inherited from class org.jclouds.googlecomputeengine.domain.Resource |
Resource.Kind |
|
Constructor Summary |
protected |
Operation(String id,
Date creationTimestamp,
URI selfLink,
String name,
String description,
URI targetLink,
String targetId,
String clientOperationId,
Operation.Status status,
String statusMessage,
String user,
Integer progress,
Date insertTime,
Date startTime,
Date endTime,
Integer httpErrorStatusCode,
String httpErrorMessage,
String operationType,
List<Operation.Error> errors,
URI region,
URI zone)
|
Operation
protected Operation(String id,
Date creationTimestamp,
URI selfLink,
String name,
String description,
URI targetLink,
String targetId,
String clientOperationId,
Operation.Status status,
String statusMessage,
String user,
Integer progress,
Date insertTime,
Date startTime,
Date endTime,
Integer httpErrorStatusCode,
String httpErrorMessage,
String operationType,
@Nullable
List<Operation.Error> errors,
URI region,
URI zone)
getTargetLink
public URI getTargetLink()
- Returns:
- URL of the resource the operation is mutating.
getClientOperationId
public com.google.common.base.Optional<String> getClientOperationId()
- Returns:
- An optional identifier specified by the client when the mutation was initiated. Must be unique for all
operation resources in the project.
getTargetId
public com.google.common.base.Optional<String> getTargetId()
- Returns:
- unique target id which identifies a particular incarnation of the target.
getRegion
public com.google.common.base.Optional<URI> getRegion()
- Returns:
- region this operation is in, if any.
getZone
public com.google.common.base.Optional<URI> getZone()
- Returns:
- zone this operation is in, if any.
getStatus
public Operation.Status getStatus()
- Returns:
- Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
getStatusMessage
public com.google.common.base.Optional<String> getStatusMessage()
- Returns:
- An optional textual description of the current status of the operation.
getUser
public String getUser()
- Returns:
- User who requested the operation, for example "user@example.com".
getProgress
public com.google.common.base.Optional<Integer> getProgress()
- Returns:
- an optional progress indicator that ranges from 0 to 100. This should not be used to guess at when the
operation will be complete. This number should be monotonically increasing as the operation progresses
(output only).
getInsertTime
public Date getInsertTime()
- Returns:
- the time that this operation was requested.
getStartTime
public com.google.common.base.Optional<Date> getStartTime()
- Returns:
- the time that this operation was started by the server.
getEndTime
public com.google.common.base.Optional<Date> getEndTime()
- Returns:
- the time that this operation was completed.
getHttpError
public com.google.common.base.Optional<org.jclouds.http.HttpResponse> getHttpError()
- Returns:
- if operation fails, the HttpResponse with error status code returned and the message, e.g. NOT_FOUND.
getOperationType
public String getOperationType()
- Returns:
- type of the operation. Examples include insert, update, and delete.
getErrors
public List<Operation.Error> getErrors()
- Returns:
- if error occurred during processing of this operation, this field will be populated.
string
protected com.google.common.base.Objects.ToStringHelper string()
-
- Overrides:
string in class Resource
toString
public String toString()
-
- Overrides:
toString in class Resource
builder
public static Operation.Builder builder()
toBuilder
public Operation.Builder toBuilder()
- Overrides:
toBuilder in class Resource
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.