[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service\Genomics\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Genomics\CancelOperationRequest;
|
---|
| 21 | use Google\Service\Genomics\GenomicsEmpty;
|
---|
| 22 | use Google\Service\Genomics\ListOperationsResponse;
|
---|
| 23 | use Google\Service\Genomics\Operation;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "operations" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $genomicsService = new Google\Service\Genomics(...);
|
---|
| 30 | * $operations = $genomicsService->projects_operations;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class ProjectsOperations extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Starts asynchronous cancellation on a long-running operation. The server
|
---|
| 37 | * makes a best effort to cancel the operation, but success is not guaranteed.
|
---|
| 38 | * Clients may use Operations.GetOperation or Operations.ListOperations to check
|
---|
| 39 | * whether the cancellation succeeded or the operation completed despite
|
---|
| 40 | * cancellation. Authorization requires the following [Google
|
---|
| 41 | * IAM](https://cloud.google.com/iam) permission: * `genomics.operations.cancel`
|
---|
| 42 | * (operations.cancel)
|
---|
| 43 | *
|
---|
| 44 | * @param string $name The name of the operation resource to be cancelled.
|
---|
| 45 | * @param CancelOperationRequest $postBody
|
---|
| 46 | * @param array $optParams Optional parameters.
|
---|
| 47 | * @return GenomicsEmpty
|
---|
| 48 | */
|
---|
| 49 | public function cancel($name, CancelOperationRequest $postBody, $optParams = [])
|
---|
| 50 | {
|
---|
| 51 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 52 | $params = array_merge($params, $optParams);
|
---|
| 53 | return $this->call('cancel', [$params], GenomicsEmpty::class);
|
---|
| 54 | }
|
---|
| 55 | /**
|
---|
| 56 | * Gets the latest state of a long-running operation. Clients can use this
|
---|
| 57 | * method to poll the operation result at intervals as recommended by the API
|
---|
| 58 | * service. Authorization requires the following [Google
|
---|
| 59 | * IAM](https://cloud.google.com/iam) permission: * `genomics.operations.get`
|
---|
| 60 | * (operations.get)
|
---|
| 61 | *
|
---|
| 62 | * @param string $name The name of the operation resource.
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | * @return Operation
|
---|
| 65 | */
|
---|
| 66 | public function get($name, $optParams = [])
|
---|
| 67 | {
|
---|
| 68 | $params = ['name' => $name];
|
---|
| 69 | $params = array_merge($params, $optParams);
|
---|
| 70 | return $this->call('get', [$params], Operation::class);
|
---|
| 71 | }
|
---|
| 72 | /**
|
---|
| 73 | * Lists operations that match the specified filter in the request.
|
---|
| 74 | * Authorization requires the following [Google
|
---|
| 75 | * IAM](https://cloud.google.com/iam) permission: * `genomics.operations.list`
|
---|
| 76 | * (operations.listProjectsOperations)
|
---|
| 77 | *
|
---|
| 78 | * @param string $name The name of the operation's parent resource.
|
---|
| 79 | * @param array $optParams Optional parameters.
|
---|
| 80 | *
|
---|
| 81 | * @opt_param string filter A string for filtering Operations. In v2alpha1, the
|
---|
| 82 | * following filter fields are supported: * createTime: The time this job was
|
---|
| 83 | * created * events: The set of event (names) that have occurred while running
|
---|
| 84 | * the pipeline. The : operator can be used to determine if a particular event
|
---|
| 85 | * has occurred. * error: If the pipeline is running, this value is NULL. Once
|
---|
| 86 | * the pipeline finishes, the value is the standard Google error code. *
|
---|
| 87 | * labels.key or labels."key with space" where key is a label key. * done: If
|
---|
| 88 | * the pipeline is running, this value is false. Once the pipeline finishes, the
|
---|
| 89 | * value is true. Examples: * `projectId = my-project AND createTime >=
|
---|
| 90 | * 1432140000` * `projectId = my-project AND createTime >= 1432140000 AND
|
---|
| 91 | * createTime <= 1432150000 AND status = RUNNING` * `projectId = my-project AND
|
---|
| 92 | * labels.color = *` * `projectId = my-project AND labels.color = red`
|
---|
| 93 | * @opt_param int pageSize The maximum number of results to return. The maximum
|
---|
| 94 | * value is 256.
|
---|
| 95 | * @opt_param string pageToken The standard list page token.
|
---|
| 96 | * @return ListOperationsResponse
|
---|
| 97 | */
|
---|
| 98 | public function listProjectsOperations($name, $optParams = [])
|
---|
| 99 | {
|
---|
| 100 | $params = ['name' => $name];
|
---|
| 101 | $params = array_merge($params, $optParams);
|
---|
| 102 | return $this->call('list', [$params], ListOperationsResponse::class);
|
---|
| 103 | }
|
---|
| 104 | }
|
---|
| 105 |
|
---|
| 106 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 107 | class_alias(ProjectsOperations::class, 'Google_Service_Genomics_Resource_ProjectsOperations');
|
---|