Operation
extends Message
in package
This resource represents a long-running operation that is the result of a network API call.
Generated from protobuf message google.longrunning.Operation
Table of Contents
Properties
- $done : mixed
- If the value is `false`, it means the operation is still in progress.
- $metadata : mixed
- Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time.
- $name : mixed
- The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
- $result : mixed
Methods
- __construct() : mixed
- Constructor.
- clearMetadata() : mixed
- getDone() : bool
- If the value is `false`, it means the operation is still in progress.
- getError() : Status|null
- The error result of the operation in case of failure or cancellation.
- getMetadata() : Any|null
- Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time.
- getName() : string
- The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
- getResponse() : Any|null
- The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
- getResult() : string
- hasError() : mixed
- hasMetadata() : mixed
- hasResponse() : mixed
- setDone() : $this
- If the value is `false`, it means the operation is still in progress.
- setError() : $this
- The error result of the operation in case of failure or cancellation.
- setMetadata() : $this
- Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time.
- setName() : $this
- The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
- setResponse() : $this
- The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
Properties
$done
If the value is `false`, it means the operation is still in progress.
protected
mixed
$done
= false
If true, the operation is completed, and either error or response is
available.
Generated from protobuf field bool done = 3 [json_name = "done"];
$metadata
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time.
protected
mixed
$metadata
= null
Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
Generated from protobuf field .google.protobuf.Any metadata = 2 [json_name = "metadata"];
$name
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
protected
mixed
$name
= ''
Generated from protobuf field string name = 1 [json_name = "name"];
$result
protected
mixed
$result
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ Optional. Data for populating the Message object.
@type string $name The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. @type \Google\Protobuf\Any $metadata Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. @type bool $done If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. @type \Google\Rpc\Status $error The error result of the operation in case of failure or cancellation. @type \Google\Protobuf\Any $response The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.}
clearMetadata()
public
clearMetadata() : mixed
getDone()
If the value is `false`, it means the operation is still in progress.
public
getDone() : bool
If true, the operation is completed, and either error or response is
available.
Generated from protobuf field bool done = 3 [json_name = "done"];
Return values
boolgetError()
The error result of the operation in case of failure or cancellation.
public
getError() : Status|null
Generated from protobuf field .google.rpc.Status error = 4 [json_name = "error"];
Return values
Status|nullgetMetadata()
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time.
public
getMetadata() : Any|null
Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
Generated from protobuf field .google.protobuf.Any metadata = 2 [json_name = "metadata"];
Return values
Any|nullgetName()
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
public
getName() : string
Generated from protobuf field string name = 1 [json_name = "name"];
Return values
stringgetResponse()
The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
public
getResponse() : Any|null
Generated from protobuf field .google.protobuf.Any response = 5 [json_name = "response"];
Return values
Any|nullgetResult()
public
getResult() : string
Return values
stringhasError()
public
hasError() : mixed
hasMetadata()
public
hasMetadata() : mixed
hasResponse()
public
hasResponse() : mixed
setDone()
If the value is `false`, it means the operation is still in progress.
public
setDone(bool $var) : $this
If true, the operation is completed, and either error or response is
available.
Generated from protobuf field bool done = 3 [json_name = "done"];
Parameters
- $var : bool
Return values
$thissetError()
The error result of the operation in case of failure or cancellation.
public
setError(Status $var) : $this
Generated from protobuf field .google.rpc.Status error = 4 [json_name = "error"];
Parameters
- $var : Status
Return values
$thissetMetadata()
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time.
public
setMetadata(Any $var) : $this
Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
Generated from protobuf field .google.protobuf.Any metadata = 2 [json_name = "metadata"];
Parameters
- $var : Any
Return values
$thissetName()
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
public
setName(string $var) : $this
Generated from protobuf field string name = 1 [json_name = "name"];
Parameters
- $var : string
Return values
$thissetResponse()
The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
public
setResponse(Any $var) : $this
Generated from protobuf field .google.protobuf.Any response = 5 [json_name = "response"];
Parameters
- $var : Any