source: vendor/google/apiclient-services/src/CloudRun/Resource/ProjectsLocationsOperations.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload new project files

  • Property mode set to 100644
File size: 5.2 KB
Line 
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
18namespace Google\Service\CloudRun\Resource;
19
20use Google\Service\CloudRun\GoogleLongrunningListOperationsResponse;
21use Google\Service\CloudRun\GoogleLongrunningOperation;
22use Google\Service\CloudRun\GoogleLongrunningWaitOperationRequest;
23use Google\Service\CloudRun\GoogleProtobufEmpty;
24
25/**
26 * The "operations" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $runService = new Google\Service\CloudRun(...);
30 * $operations = $runService->projects_locations_operations;
31 * </code>
32 */
33class ProjectsLocationsOperations extends \Google\Service\Resource
34{
35 /**
36 * Deletes a long-running operation. This method indicates that the client is no
37 * longer interested in the operation result. It does not cancel the operation.
38 * If the server doesn't support this method, it returns
39 * `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
40 *
41 * @param string $name The name of the operation resource to be deleted.
42 * @param array $optParams Optional parameters.
43 * @return GoogleProtobufEmpty
44 * @throws \Google\Service\Exception
45 */
46 public function delete($name, $optParams = [])
47 {
48 $params = ['name' => $name];
49 $params = array_merge($params, $optParams);
50 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
51 }
52 /**
53 * Gets the latest state of a long-running operation. Clients can use this
54 * method to poll the operation result at intervals as recommended by the API
55 * service. (operations.get)
56 *
57 * @param string $name The name of the operation resource.
58 * @param array $optParams Optional parameters.
59 * @return GoogleLongrunningOperation
60 * @throws \Google\Service\Exception
61 */
62 public function get($name, $optParams = [])
63 {
64 $params = ['name' => $name];
65 $params = array_merge($params, $optParams);
66 return $this->call('get', [$params], GoogleLongrunningOperation::class);
67 }
68 /**
69 * Lists operations that match the specified filter in the request. If the
70 * server doesn't support this method, it returns `UNIMPLEMENTED`.
71 * (operations.listProjectsLocationsOperations)
72 *
73 * @param string $name Required. To query for all of the operations for a
74 * project.
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param string filter Optional. A filter for matching the completed or in-
78 * progress operations. The supported formats of *filter* are: To query for only
79 * completed operations: done:true To query for only ongoing operations:
80 * done:false Must be empty to query for all of the latest operations for the
81 * given parent project.
82 * @opt_param int pageSize The maximum number of records that should be
83 * returned. Requested page size cannot exceed 100. If not set or set to less
84 * than or equal to 0, the default page size is 100. .
85 * @opt_param string pageToken Token identifying which result to start with,
86 * which is returned by a previous list call.
87 * @return GoogleLongrunningListOperationsResponse
88 * @throws \Google\Service\Exception
89 */
90 public function listProjectsLocationsOperations($name, $optParams = [])
91 {
92 $params = ['name' => $name];
93 $params = array_merge($params, $optParams);
94 return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
95 }
96 /**
97 * Waits until the specified long-running operation is done or reaches at most a
98 * specified timeout, returning the latest state. If the operation is already
99 * done, the latest state is immediately returned. If the timeout specified is
100 * greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If
101 * the server does not support this method, it returns
102 * `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort
103 * basis. It may return the latest state before the specified timeout (including
104 * immediately), meaning even an immediate response is no guarantee that the
105 * operation is done. (operations.wait)
106 *
107 * @param string $name The name of the operation resource to wait on.
108 * @param GoogleLongrunningWaitOperationRequest $postBody
109 * @param array $optParams Optional parameters.
110 * @return GoogleLongrunningOperation
111 * @throws \Google\Service\Exception
112 */
113 public function wait($name, GoogleLongrunningWaitOperationRequest $postBody, $optParams = [])
114 {
115 $params = ['name' => $name, 'postBody' => $postBody];
116 $params = array_merge($params, $optParams);
117 return $this->call('wait', [$params], GoogleLongrunningOperation::class);
118 }
119}
120
121// Adding a class alias for backwards compatibility with the previous class name.
122class_alias(ProjectsLocationsOperations::class, 'Google_Service_CloudRun_Resource_ProjectsLocationsOperations');
Note: See TracBrowser for help on using the repository browser.