[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\Dataproc\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Dataproc\DataprocEmpty;
|
---|
| 21 | use Google\Service\Dataproc\GetIamPolicyRequest;
|
---|
| 22 | use Google\Service\Dataproc\ListOperationsResponse;
|
---|
| 23 | use Google\Service\Dataproc\Operation;
|
---|
| 24 | use Google\Service\Dataproc\Policy;
|
---|
| 25 | use Google\Service\Dataproc\SetIamPolicyRequest;
|
---|
| 26 | use Google\Service\Dataproc\TestIamPermissionsRequest;
|
---|
| 27 | use Google\Service\Dataproc\TestIamPermissionsResponse;
|
---|
| 28 |
|
---|
| 29 | /**
|
---|
| 30 | * The "operations" collection of methods.
|
---|
| 31 | * Typical usage is:
|
---|
| 32 | * <code>
|
---|
| 33 | * $dataprocService = new Google\Service\Dataproc(...);
|
---|
| 34 | * $operations = $dataprocService->projects_regions_operations;
|
---|
| 35 | * </code>
|
---|
| 36 | */
|
---|
| 37 | class ProjectsRegionsOperations extends \Google\Service\Resource
|
---|
| 38 | {
|
---|
| 39 | /**
|
---|
| 40 | * Starts asynchronous cancellation on a long-running operation. The server
|
---|
| 41 | * makes a best effort to cancel the operation, but success is not guaranteed.
|
---|
| 42 | * If the server doesn't support this method, it returns
|
---|
| 43 | * google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
|
---|
| 44 | * other methods to check whether the cancellation succeeded or whether the
|
---|
| 45 | * operation completed despite cancellation. On successful cancellation, the
|
---|
| 46 | * operation is not deleted; instead, it becomes an operation with an
|
---|
| 47 | * Operation.error value with a google.rpc.Status.code of 1, corresponding to
|
---|
| 48 | * Code.CANCELLED. (operations.cancel)
|
---|
| 49 | *
|
---|
| 50 | * @param string $name The name of the operation resource to be cancelled.
|
---|
| 51 | * @param array $optParams Optional parameters.
|
---|
| 52 | * @return DataprocEmpty
|
---|
| 53 | * @throws \Google\Service\Exception
|
---|
| 54 | */
|
---|
| 55 | public function cancel($name, $optParams = [])
|
---|
| 56 | {
|
---|
| 57 | $params = ['name' => $name];
|
---|
| 58 | $params = array_merge($params, $optParams);
|
---|
| 59 | return $this->call('cancel', [$params], DataprocEmpty::class);
|
---|
| 60 | }
|
---|
| 61 | /**
|
---|
| 62 | * Deletes a long-running operation. This method indicates that the client is no
|
---|
| 63 | * longer interested in the operation result. It does not cancel the operation.
|
---|
| 64 | * If the server doesn't support this method, it returns
|
---|
| 65 | * google.rpc.Code.UNIMPLEMENTED. (operations.delete)
|
---|
| 66 | *
|
---|
| 67 | * @param string $name The name of the operation resource to be deleted.
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | * @return DataprocEmpty
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function delete($name, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['name' => $name];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('delete', [$params], DataprocEmpty::class);
|
---|
| 77 | }
|
---|
| 78 | /**
|
---|
| 79 | * Gets the latest state of a long-running operation. Clients can use this
|
---|
| 80 | * method to poll the operation result at intervals as recommended by the API
|
---|
| 81 | * service. (operations.get)
|
---|
| 82 | *
|
---|
| 83 | * @param string $name The name of the operation resource.
|
---|
| 84 | * @param array $optParams Optional parameters.
|
---|
| 85 | * @return Operation
|
---|
| 86 | * @throws \Google\Service\Exception
|
---|
| 87 | */
|
---|
| 88 | public function get($name, $optParams = [])
|
---|
| 89 | {
|
---|
| 90 | $params = ['name' => $name];
|
---|
| 91 | $params = array_merge($params, $optParams);
|
---|
| 92 | return $this->call('get', [$params], Operation::class);
|
---|
| 93 | }
|
---|
| 94 | /**
|
---|
| 95 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
| 96 | * resource exists and does not have a policy set. (operations.getIamPolicy)
|
---|
| 97 | *
|
---|
| 98 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 99 | * requested. See Resource names
|
---|
| 100 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
| 101 | * value for this field.
|
---|
| 102 | * @param GetIamPolicyRequest $postBody
|
---|
| 103 | * @param array $optParams Optional parameters.
|
---|
| 104 | * @return Policy
|
---|
| 105 | * @throws \Google\Service\Exception
|
---|
| 106 | */
|
---|
| 107 | public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
|
---|
| 108 | {
|
---|
| 109 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 110 | $params = array_merge($params, $optParams);
|
---|
| 111 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
| 112 | }
|
---|
| 113 | /**
|
---|
| 114 | * Lists operations that match the specified filter in the request. If the
|
---|
| 115 | * server doesn't support this method, it returns UNIMPLEMENTED.
|
---|
| 116 | * (operations.listProjectsRegionsOperations)
|
---|
| 117 | *
|
---|
| 118 | * @param string $name The name of the operation's parent resource.
|
---|
| 119 | * @param array $optParams Optional parameters.
|
---|
| 120 | *
|
---|
| 121 | * @opt_param string filter The standard list filter.
|
---|
| 122 | * @opt_param int pageSize The standard list page size.
|
---|
| 123 | * @opt_param string pageToken The standard list page token.
|
---|
| 124 | * @return ListOperationsResponse
|
---|
| 125 | * @throws \Google\Service\Exception
|
---|
| 126 | */
|
---|
| 127 | public function listProjectsRegionsOperations($name, $optParams = [])
|
---|
| 128 | {
|
---|
| 129 | $params = ['name' => $name];
|
---|
| 130 | $params = array_merge($params, $optParams);
|
---|
| 131 | return $this->call('list', [$params], ListOperationsResponse::class);
|
---|
| 132 | }
|
---|
| 133 | /**
|
---|
| 134 | * Sets the access control policy on the specified resource. Replaces any
|
---|
| 135 | * existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
|
---|
| 136 | * errors. (operations.setIamPolicy)
|
---|
| 137 | *
|
---|
| 138 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
| 139 | * specified. See Resource names
|
---|
| 140 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
| 141 | * value for this field.
|
---|
| 142 | * @param SetIamPolicyRequest $postBody
|
---|
| 143 | * @param array $optParams Optional parameters.
|
---|
| 144 | * @return Policy
|
---|
| 145 | * @throws \Google\Service\Exception
|
---|
| 146 | */
|
---|
| 147 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
| 148 | {
|
---|
| 149 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 150 | $params = array_merge($params, $optParams);
|
---|
| 151 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
| 152 | }
|
---|
| 153 | /**
|
---|
| 154 | * Returns permissions that a caller has on the specified resource. If the
|
---|
| 155 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
| 156 | * NOT_FOUND error.Note: This operation is designed to be used for building
|
---|
| 157 | * permission-aware UIs and command-line tools, not for authorization checking.
|
---|
| 158 | * This operation may "fail open" without warning.
|
---|
| 159 | * (operations.testIamPermissions)
|
---|
| 160 | *
|
---|
| 161 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
| 162 | * being requested. See Resource names
|
---|
| 163 | * (https://cloud.google.com/apis/design/resource_names) for the appropriate
|
---|
| 164 | * value for this field.
|
---|
| 165 | * @param TestIamPermissionsRequest $postBody
|
---|
| 166 | * @param array $optParams Optional parameters.
|
---|
| 167 | * @return TestIamPermissionsResponse
|
---|
| 168 | * @throws \Google\Service\Exception
|
---|
| 169 | */
|
---|
| 170 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
| 171 | {
|
---|
| 172 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 173 | $params = array_merge($params, $optParams);
|
---|
| 174 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
| 175 | }
|
---|
| 176 | }
|
---|
| 177 |
|
---|
| 178 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 179 | class_alias(ProjectsRegionsOperations::class, 'Google_Service_Dataproc_Resource_ProjectsRegionsOperations');
|
---|