source: vendor/google/apiclient-services/src/CloudFunctions.php

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

Upload project files

  • Property mode set to 100644
File size: 11.4 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;
19
20use Google\Client;
21
22/**
23 * Service definition for CloudFunctions (v2).
24 *
25 * <p>
26 * Manages lightweight user-provided functions executed in response to events.</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/functions" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class CloudFunctions extends \Google\Service
36{
37 /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
38 const CLOUD_PLATFORM =
39 "https://www.googleapis.com/auth/cloud-platform";
40
41 public $projects_locations;
42 public $projects_locations_functions;
43 public $projects_locations_operations;
44 public $projects_locations_runtimes;
45 public $rootUrlTemplate;
46
47 /**
48 * Constructs the internal representation of the CloudFunctions service.
49 *
50 * @param Client|array $clientOrConfig The client used to deliver requests, or a
51 * config array to pass to a new Client instance.
52 * @param string $rootUrl The root URL used for requests to the service.
53 */
54 public function __construct($clientOrConfig = [], $rootUrl = null)
55 {
56 parent::__construct($clientOrConfig);
57 $this->rootUrl = $rootUrl ?: 'https://cloudfunctions.googleapis.com/';
58 $this->rootUrlTemplate = $rootUrl ?: 'https://cloudfunctions.UNIVERSE_DOMAIN/';
59 $this->servicePath = '';
60 $this->batchPath = 'batch';
61 $this->version = 'v2';
62 $this->serviceName = 'cloudfunctions';
63
64 $this->projects_locations = new CloudFunctions\Resource\ProjectsLocations(
65 $this,
66 $this->serviceName,
67 'locations',
68 [
69 'methods' => [
70 'list' => [
71 'path' => 'v2/{+name}/locations',
72 'httpMethod' => 'GET',
73 'parameters' => [
74 'name' => [
75 'location' => 'path',
76 'type' => 'string',
77 'required' => true,
78 ],
79 'filter' => [
80 'location' => 'query',
81 'type' => 'string',
82 ],
83 'pageSize' => [
84 'location' => 'query',
85 'type' => 'integer',
86 ],
87 'pageToken' => [
88 'location' => 'query',
89 'type' => 'string',
90 ],
91 ],
92 ],
93 ]
94 ]
95 );
96 $this->projects_locations_functions = new CloudFunctions\Resource\ProjectsLocationsFunctions(
97 $this,
98 $this->serviceName,
99 'functions',
100 [
101 'methods' => [
102 'abortFunctionUpgrade' => [
103 'path' => 'v2/{+name}:abortFunctionUpgrade',
104 'httpMethod' => 'POST',
105 'parameters' => [
106 'name' => [
107 'location' => 'path',
108 'type' => 'string',
109 'required' => true,
110 ],
111 ],
112 ],'commitFunctionUpgrade' => [
113 'path' => 'v2/{+name}:commitFunctionUpgrade',
114 'httpMethod' => 'POST',
115 'parameters' => [
116 'name' => [
117 'location' => 'path',
118 'type' => 'string',
119 'required' => true,
120 ],
121 ],
122 ],'create' => [
123 'path' => 'v2/{+parent}/functions',
124 'httpMethod' => 'POST',
125 'parameters' => [
126 'parent' => [
127 'location' => 'path',
128 'type' => 'string',
129 'required' => true,
130 ],
131 'functionId' => [
132 'location' => 'query',
133 'type' => 'string',
134 ],
135 ],
136 ],'delete' => [
137 'path' => 'v2/{+name}',
138 'httpMethod' => 'DELETE',
139 'parameters' => [
140 'name' => [
141 'location' => 'path',
142 'type' => 'string',
143 'required' => true,
144 ],
145 ],
146 ],'generateDownloadUrl' => [
147 'path' => 'v2/{+name}:generateDownloadUrl',
148 'httpMethod' => 'POST',
149 'parameters' => [
150 'name' => [
151 'location' => 'path',
152 'type' => 'string',
153 'required' => true,
154 ],
155 ],
156 ],'generateUploadUrl' => [
157 'path' => 'v2/{+parent}/functions:generateUploadUrl',
158 'httpMethod' => 'POST',
159 'parameters' => [
160 'parent' => [
161 'location' => 'path',
162 'type' => 'string',
163 'required' => true,
164 ],
165 ],
166 ],'get' => [
167 'path' => 'v2/{+name}',
168 'httpMethod' => 'GET',
169 'parameters' => [
170 'name' => [
171 'location' => 'path',
172 'type' => 'string',
173 'required' => true,
174 ],
175 'revision' => [
176 'location' => 'query',
177 'type' => 'string',
178 ],
179 ],
180 ],'getIamPolicy' => [
181 'path' => 'v2/{+resource}:getIamPolicy',
182 'httpMethod' => 'GET',
183 'parameters' => [
184 'resource' => [
185 'location' => 'path',
186 'type' => 'string',
187 'required' => true,
188 ],
189 'options.requestedPolicyVersion' => [
190 'location' => 'query',
191 'type' => 'integer',
192 ],
193 ],
194 ],'list' => [
195 'path' => 'v2/{+parent}/functions',
196 'httpMethod' => 'GET',
197 'parameters' => [
198 'parent' => [
199 'location' => 'path',
200 'type' => 'string',
201 'required' => true,
202 ],
203 'filter' => [
204 'location' => 'query',
205 'type' => 'string',
206 ],
207 'orderBy' => [
208 'location' => 'query',
209 'type' => 'string',
210 ],
211 'pageSize' => [
212 'location' => 'query',
213 'type' => 'integer',
214 ],
215 'pageToken' => [
216 'location' => 'query',
217 'type' => 'string',
218 ],
219 ],
220 ],'patch' => [
221 'path' => 'v2/{+name}',
222 'httpMethod' => 'PATCH',
223 'parameters' => [
224 'name' => [
225 'location' => 'path',
226 'type' => 'string',
227 'required' => true,
228 ],
229 'updateMask' => [
230 'location' => 'query',
231 'type' => 'string',
232 ],
233 ],
234 ],'redirectFunctionUpgradeTraffic' => [
235 'path' => 'v2/{+name}:redirectFunctionUpgradeTraffic',
236 'httpMethod' => 'POST',
237 'parameters' => [
238 'name' => [
239 'location' => 'path',
240 'type' => 'string',
241 'required' => true,
242 ],
243 ],
244 ],'rollbackFunctionUpgradeTraffic' => [
245 'path' => 'v2/{+name}:rollbackFunctionUpgradeTraffic',
246 'httpMethod' => 'POST',
247 'parameters' => [
248 'name' => [
249 'location' => 'path',
250 'type' => 'string',
251 'required' => true,
252 ],
253 ],
254 ],'setIamPolicy' => [
255 'path' => 'v2/{+resource}:setIamPolicy',
256 'httpMethod' => 'POST',
257 'parameters' => [
258 'resource' => [
259 'location' => 'path',
260 'type' => 'string',
261 'required' => true,
262 ],
263 ],
264 ],'setupFunctionUpgradeConfig' => [
265 'path' => 'v2/{+name}:setupFunctionUpgradeConfig',
266 'httpMethod' => 'POST',
267 'parameters' => [
268 'name' => [
269 'location' => 'path',
270 'type' => 'string',
271 'required' => true,
272 ],
273 ],
274 ],'testIamPermissions' => [
275 'path' => 'v2/{+resource}:testIamPermissions',
276 'httpMethod' => 'POST',
277 'parameters' => [
278 'resource' => [
279 'location' => 'path',
280 'type' => 'string',
281 'required' => true,
282 ],
283 ],
284 ],
285 ]
286 ]
287 );
288 $this->projects_locations_operations = new CloudFunctions\Resource\ProjectsLocationsOperations(
289 $this,
290 $this->serviceName,
291 'operations',
292 [
293 'methods' => [
294 'get' => [
295 'path' => 'v2/{+name}',
296 'httpMethod' => 'GET',
297 'parameters' => [
298 'name' => [
299 'location' => 'path',
300 'type' => 'string',
301 'required' => true,
302 ],
303 ],
304 ],'list' => [
305 'path' => 'v2/{+name}/operations',
306 'httpMethod' => 'GET',
307 'parameters' => [
308 'name' => [
309 'location' => 'path',
310 'type' => 'string',
311 'required' => true,
312 ],
313 'filter' => [
314 'location' => 'query',
315 'type' => 'string',
316 ],
317 'pageSize' => [
318 'location' => 'query',
319 'type' => 'integer',
320 ],
321 'pageToken' => [
322 'location' => 'query',
323 'type' => 'string',
324 ],
325 ],
326 ],
327 ]
328 ]
329 );
330 $this->projects_locations_runtimes = new CloudFunctions\Resource\ProjectsLocationsRuntimes(
331 $this,
332 $this->serviceName,
333 'runtimes',
334 [
335 'methods' => [
336 'list' => [
337 'path' => 'v2/{+parent}/runtimes',
338 'httpMethod' => 'GET',
339 'parameters' => [
340 'parent' => [
341 'location' => 'path',
342 'type' => 'string',
343 'required' => true,
344 ],
345 'filter' => [
346 'location' => 'query',
347 'type' => 'string',
348 ],
349 ],
350 ],
351 ]
352 ]
353 );
354 }
355}
356
357// Adding a class alias for backwards compatibility with the previous class name.
358class_alias(CloudFunctions::class, 'Google_Service_CloudFunctions');
Note: See TracBrowser for help on using the repository browser.