[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\RemoteBuildExecution\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\RemoteBuildExecution\BuildBazelRemoteExecutionV2WaitExecutionRequest;
|
---|
| 21 | use Google\Service\RemoteBuildExecution\GoogleLongrunningOperation;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "operations" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $remotebuildexecutionService = new Google\Service\RemoteBuildExecution(...);
|
---|
| 28 | * $operations = $remotebuildexecutionService->operations;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class Operations extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Wait for an execution operation to complete. When the client initially makes
|
---|
| 35 | * the request, the server immediately responds with the current status of the
|
---|
| 36 | * execution. The server will leave the request stream open until the operation
|
---|
| 37 | * completes, and then respond with the completed operation. The server MAY
|
---|
| 38 | * choose to stream additional updates as execution progresses, such as to
|
---|
| 39 | * provide an update as to the state of the execution.
|
---|
| 40 | * (operations.waitExecution)
|
---|
| 41 | *
|
---|
| 42 | * @param string $name The name of the Operation returned by Execute.
|
---|
| 43 | * @param BuildBazelRemoteExecutionV2WaitExecutionRequest $postBody
|
---|
| 44 | * @param array $optParams Optional parameters.
|
---|
| 45 | * @return GoogleLongrunningOperation
|
---|
| 46 | */
|
---|
| 47 | public function waitExecution($name, BuildBazelRemoteExecutionV2WaitExecutionRequest $postBody, $optParams = [])
|
---|
| 48 | {
|
---|
| 49 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 50 | $params = array_merge($params, $optParams);
|
---|
| 51 | return $this->call('waitExecution', [$params], GoogleLongrunningOperation::class);
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 56 | class_alias(Operations::class, 'Google_Service_RemoteBuildExecution_Resource_Operations');
|
---|