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\FirebaseAppDistribution\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\FirebaseAppDistribution\GoogleLongrunningCancelOperationRequest;
|
---|
21 | use Google\Service\FirebaseAppDistribution\GoogleLongrunningListOperationsResponse;
|
---|
22 | use Google\Service\FirebaseAppDistribution\GoogleLongrunningOperation;
|
---|
23 | use Google\Service\FirebaseAppDistribution\GoogleLongrunningWaitOperationRequest;
|
---|
24 | use Google\Service\FirebaseAppDistribution\GoogleProtobufEmpty;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "operations" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $firebaseappdistributionService = new Google\Service\FirebaseAppDistribution(...);
|
---|
31 | * $operations = $firebaseappdistributionService->projects_apps_releases_operations;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsAppsReleasesOperations extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Starts asynchronous cancellation on a long-running operation. The server
|
---|
38 | * makes a best effort to cancel the operation, but success is not guaranteed.
|
---|
39 | * If the server doesn't support this method, it returns
|
---|
40 | * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
|
---|
41 | * other methods to check whether the cancellation succeeded or whether the
|
---|
42 | * operation completed despite cancellation. On successful cancellation, the
|
---|
43 | * operation is not deleted; instead, it becomes an operation with an
|
---|
44 | * Operation.error value with a google.rpc.Status.code of `1`, corresponding to
|
---|
45 | * `Code.CANCELLED`. (operations.cancel)
|
---|
46 | *
|
---|
47 | * @param string $name The name of the operation resource to be cancelled.
|
---|
48 | * @param GoogleLongrunningCancelOperationRequest $postBody
|
---|
49 | * @param array $optParams Optional parameters.
|
---|
50 | * @return GoogleProtobufEmpty
|
---|
51 | * @throws \Google\Service\Exception
|
---|
52 | */
|
---|
53 | public function cancel($name, GoogleLongrunningCancelOperationRequest $postBody, $optParams = [])
|
---|
54 | {
|
---|
55 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
56 | $params = array_merge($params, $optParams);
|
---|
57 | return $this->call('cancel', [$params], GoogleProtobufEmpty::class);
|
---|
58 | }
|
---|
59 | /**
|
---|
60 | * Deletes a long-running operation. This method indicates that the client is no
|
---|
61 | * longer interested in the operation result. It does not cancel the operation.
|
---|
62 | * If the server doesn't support this method, it returns
|
---|
63 | * `google.rpc.Code.UNIMPLEMENTED`. (operations.delete)
|
---|
64 | *
|
---|
65 | * @param string $name The name of the operation resource to be deleted.
|
---|
66 | * @param array $optParams Optional parameters.
|
---|
67 | * @return GoogleProtobufEmpty
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function delete($name, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['name' => $name];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('delete', [$params], GoogleProtobufEmpty::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Gets the latest state of a long-running operation. Clients can use this
|
---|
78 | * method to poll the operation result at intervals as recommended by the API
|
---|
79 | * service. (operations.get)
|
---|
80 | *
|
---|
81 | * @param string $name The name of the operation resource.
|
---|
82 | * @param array $optParams Optional parameters.
|
---|
83 | * @return GoogleLongrunningOperation
|
---|
84 | * @throws \Google\Service\Exception
|
---|
85 | */
|
---|
86 | public function get($name, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['name' => $name];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('get', [$params], GoogleLongrunningOperation::class);
|
---|
91 | }
|
---|
92 | /**
|
---|
93 | * Lists operations that match the specified filter in the request. If the
|
---|
94 | * server doesn't support this method, it returns `UNIMPLEMENTED`.
|
---|
95 | * (operations.listProjectsAppsReleasesOperations)
|
---|
96 | *
|
---|
97 | * @param string $name The name of the operation's parent resource.
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param string filter The standard list filter.
|
---|
101 | * @opt_param int pageSize The standard list page size.
|
---|
102 | * @opt_param string pageToken The standard list page token.
|
---|
103 | * @return GoogleLongrunningListOperationsResponse
|
---|
104 | * @throws \Google\Service\Exception
|
---|
105 | */
|
---|
106 | public function listProjectsAppsReleasesOperations($name, $optParams = [])
|
---|
107 | {
|
---|
108 | $params = ['name' => $name];
|
---|
109 | $params = array_merge($params, $optParams);
|
---|
110 | return $this->call('list', [$params], GoogleLongrunningListOperationsResponse::class);
|
---|
111 | }
|
---|
112 | /**
|
---|
113 | * Waits until the specified long-running operation is done or reaches at most a
|
---|
114 | * specified timeout, returning the latest state. If the operation is already
|
---|
115 | * done, the latest state is immediately returned. If the timeout specified is
|
---|
116 | * greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If
|
---|
117 | * the server does not support this method, it returns
|
---|
118 | * `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort
|
---|
119 | * basis. It may return the latest state before the specified timeout (including
|
---|
120 | * immediately), meaning even an immediate response is no guarantee that the
|
---|
121 | * operation is done. (operations.wait)
|
---|
122 | *
|
---|
123 | * @param string $name The name of the operation resource to wait on.
|
---|
124 | * @param GoogleLongrunningWaitOperationRequest $postBody
|
---|
125 | * @param array $optParams Optional parameters.
|
---|
126 | * @return GoogleLongrunningOperation
|
---|
127 | * @throws \Google\Service\Exception
|
---|
128 | */
|
---|
129 | public function wait($name, GoogleLongrunningWaitOperationRequest $postBody, $optParams = [])
|
---|
130 | {
|
---|
131 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
132 | $params = array_merge($params, $optParams);
|
---|
133 | return $this->call('wait', [$params], GoogleLongrunningOperation::class);
|
---|
134 | }
|
---|
135 | }
|
---|
136 |
|
---|
137 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
138 | class_alias(ProjectsAppsReleasesOperations::class, 'Google_Service_FirebaseAppDistribution_Resource_ProjectsAppsReleasesOperations');
|
---|