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 Eventarc (v1).
24 *
25 * <p>
26</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://cloud.google.com/eventarc" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class Eventarc 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_channelConnections;
43  public $projects_locations_channels;
44  public $projects_locations_operations;
45  public $projects_locations_providers;
46  public $projects_locations_triggers;
47
48  /**
49   * Constructs the internal representation of the Eventarc service.
50   *
51   * @param Client|array $clientOrConfig The client used to deliver requests, or a
52   *                                     config array to pass to a new Client instance.
53   * @param string $rootUrl The root URL used for requests to the service.
54   */
55  public function __construct($clientOrConfig = [], $rootUrl = null)
56  {
57    parent::__construct($clientOrConfig);
58    $this->rootUrl = $rootUrl ?: 'https://eventarc.googleapis.com/';
59    $this->servicePath = '';
60    $this->batchPath = 'batch';
61    $this->version = 'v1';
62    $this->serviceName = 'eventarc';
63
64    $this->projects_locations = new Eventarc\Resource\ProjectsLocations(
65        $this,
66        $this->serviceName,
67        'locations',
68        [
69          'methods' => [
70            'get' => [
71              'path' => 'v1/{+name}',
72              'httpMethod' => 'GET',
73              'parameters' => [
74                'name' => [
75                  'location' => 'path',
76                  'type' => 'string',
77                  'required' => true,
78                ],
79              ],
80            ],'list' => [
81              'path' => 'v1/{+name}/locations',
82              'httpMethod' => 'GET',
83              'parameters' => [
84                'name' => [
85                  'location' => 'path',
86                  'type' => 'string',
87                  'required' => true,
88                ],
89                'filter' => [
90                  'location' => 'query',
91                  'type' => 'string',
92                ],
93                'pageSize' => [
94                  'location' => 'query',
95                  'type' => 'integer',
96                ],
97                'pageToken' => [
98                  'location' => 'query',
99                  'type' => 'string',
100                ],
101              ],
102            ],
103          ]
104        ]
105    );
106    $this->projects_locations_channelConnections = new Eventarc\Resource\ProjectsLocationsChannelConnections(
107        $this,
108        $this->serviceName,
109        'channelConnections',
110        [
111          'methods' => [
112            'getIamPolicy' => [
113              'path' => 'v1/{+resource}:getIamPolicy',
114              'httpMethod' => 'GET',
115              'parameters' => [
116                'resource' => [
117                  'location' => 'path',
118                  'type' => 'string',
119                  'required' => true,
120                ],
121                'options.requestedPolicyVersion' => [
122                  'location' => 'query',
123                  'type' => 'integer',
124                ],
125              ],
126            ],'setIamPolicy' => [
127              'path' => 'v1/{+resource}:setIamPolicy',
128              'httpMethod' => 'POST',
129              'parameters' => [
130                'resource' => [
131                  'location' => 'path',
132                  'type' => 'string',
133                  'required' => true,
134                ],
135              ],
136            ],'testIamPermissions' => [
137              'path' => 'v1/{+resource}:testIamPermissions',
138              'httpMethod' => 'POST',
139              'parameters' => [
140                'resource' => [
141                  'location' => 'path',
142                  'type' => 'string',
143                  'required' => true,
144                ],
145              ],
146            ],
147          ]
148        ]
149    );
150    $this->projects_locations_channels = new Eventarc\Resource\ProjectsLocationsChannels(
151        $this,
152        $this->serviceName,
153        'channels',
154        [
155          'methods' => [
156            'getIamPolicy' => [
157              'path' => 'v1/{+resource}:getIamPolicy',
158              'httpMethod' => 'GET',
159              'parameters' => [
160                'resource' => [
161                  'location' => 'path',
162                  'type' => 'string',
163                  'required' => true,
164                ],
165                'options.requestedPolicyVersion' => [
166                  'location' => 'query',
167                  'type' => 'integer',
168                ],
169              ],
170            ],'setIamPolicy' => [
171              'path' => 'v1/{+resource}:setIamPolicy',
172              'httpMethod' => 'POST',
173              'parameters' => [
174                'resource' => [
175                  'location' => 'path',
176                  'type' => 'string',
177                  'required' => true,
178                ],
179              ],
180            ],'testIamPermissions' => [
181              'path' => 'v1/{+resource}:testIamPermissions',
182              'httpMethod' => 'POST',
183              'parameters' => [
184                'resource' => [
185                  'location' => 'path',
186                  'type' => 'string',
187                  'required' => true,
188                ],
189              ],
190            ],
191          ]
192        ]
193    );
194    $this->projects_locations_operations = new Eventarc\Resource\ProjectsLocationsOperations(
195        $this,
196        $this->serviceName,
197        'operations',
198        [
199          'methods' => [
200            'cancel' => [
201              'path' => 'v1/{+name}:cancel',
202              'httpMethod' => 'POST',
203              'parameters' => [
204                'name' => [
205                  'location' => 'path',
206                  'type' => 'string',
207                  'required' => true,
208                ],
209              ],
210            ],'delete' => [
211              'path' => 'v1/{+name}',
212              'httpMethod' => 'DELETE',
213              'parameters' => [
214                'name' => [
215                  'location' => 'path',
216                  'type' => 'string',
217                  'required' => true,
218                ],
219              ],
220            ],'get' => [
221              'path' => 'v1/{+name}',
222              'httpMethod' => 'GET',
223              'parameters' => [
224                'name' => [
225                  'location' => 'path',
226                  'type' => 'string',
227                  'required' => true,
228                ],
229              ],
230            ],'list' => [
231              'path' => 'v1/{+name}/operations',
232              'httpMethod' => 'GET',
233              'parameters' => [
234                'name' => [
235                  'location' => 'path',
236                  'type' => 'string',
237                  'required' => true,
238                ],
239                'filter' => [
240                  'location' => 'query',
241                  'type' => 'string',
242                ],
243                'pageSize' => [
244                  'location' => 'query',
245                  'type' => 'integer',
246                ],
247                'pageToken' => [
248                  'location' => 'query',
249                  'type' => 'string',
250                ],
251              ],
252            ],
253          ]
254        ]
255    );
256    $this->projects_locations_providers = new Eventarc\Resource\ProjectsLocationsProviders(
257        $this,
258        $this->serviceName,
259        'providers',
260        [
261          'methods' => [
262            'get' => [
263              'path' => 'v1/{+name}',
264              'httpMethod' => 'GET',
265              'parameters' => [
266                'name' => [
267                  'location' => 'path',
268                  'type' => 'string',
269                  'required' => true,
270                ],
271              ],
272            ],'list' => [
273              'path' => 'v1/{+parent}/providers',
274              'httpMethod' => 'GET',
275              'parameters' => [
276                'parent' => [
277                  'location' => 'path',
278                  'type' => 'string',
279                  'required' => true,
280                ],
281                'filter' => [
282                  'location' => 'query',
283                  'type' => 'string',
284                ],
285                'orderBy' => [
286                  'location' => 'query',
287                  'type' => 'string',
288                ],
289                'pageSize' => [
290                  'location' => 'query',
291                  'type' => 'integer',
292                ],
293                'pageToken' => [
294                  'location' => 'query',
295                  'type' => 'string',
296                ],
297              ],
298            ],
299          ]
300        ]
301    );
302    $this->projects_locations_triggers = new Eventarc\Resource\ProjectsLocationsTriggers(
303        $this,
304        $this->serviceName,
305        'triggers',
306        [
307          'methods' => [
308            'create' => [
309              'path' => 'v1/{+parent}/triggers',
310              'httpMethod' => 'POST',
311              'parameters' => [
312                'parent' => [
313                  'location' => 'path',
314                  'type' => 'string',
315                  'required' => true,
316                ],
317                'triggerId' => [
318                  'location' => 'query',
319                  'type' => 'string',
320                ],
321                'validateOnly' => [
322                  'location' => 'query',
323                  'type' => 'boolean',
324                ],
325              ],
326            ],'delete' => [
327              'path' => 'v1/{+name}',
328              'httpMethod' => 'DELETE',
329              'parameters' => [
330                'name' => [
331                  'location' => 'path',
332                  'type' => 'string',
333                  'required' => true,
334                ],
335                'allowMissing' => [
336                  'location' => 'query',
337                  'type' => 'boolean',
338                ],
339                'etag' => [
340                  'location' => 'query',
341                  'type' => 'string',
342                ],
343                'validateOnly' => [
344                  'location' => 'query',
345                  'type' => 'boolean',
346                ],
347              ],
348            ],'get' => [
349              'path' => 'v1/{+name}',
350              'httpMethod' => 'GET',
351              'parameters' => [
352                'name' => [
353                  'location' => 'path',
354                  'type' => 'string',
355                  'required' => true,
356                ],
357              ],
358            ],'getIamPolicy' => [
359              'path' => 'v1/{+resource}:getIamPolicy',
360              'httpMethod' => 'GET',
361              'parameters' => [
362                'resource' => [
363                  'location' => 'path',
364                  'type' => 'string',
365                  'required' => true,
366                ],
367                'options.requestedPolicyVersion' => [
368                  'location' => 'query',
369                  'type' => 'integer',
370                ],
371              ],
372            ],'list' => [
373              'path' => 'v1/{+parent}/triggers',
374              'httpMethod' => 'GET',
375              'parameters' => [
376                'parent' => [
377                  'location' => 'path',
378                  'type' => 'string',
379                  'required' => true,
380                ],
381                'filter' => [
382                  'location' => 'query',
383                  'type' => 'string',
384                ],
385                'orderBy' => [
386                  'location' => 'query',
387                  'type' => 'string',
388                ],
389                'pageSize' => [
390                  'location' => 'query',
391                  'type' => 'integer',
392                ],
393                'pageToken' => [
394                  'location' => 'query',
395                  'type' => 'string',
396                ],
397              ],
398            ],'patch' => [
399              'path' => 'v1/{+name}',
400              'httpMethod' => 'PATCH',
401              'parameters' => [
402                'name' => [
403                  'location' => 'path',
404                  'type' => 'string',
405                  'required' => true,
406                ],
407                'allowMissing' => [
408                  'location' => 'query',
409                  'type' => 'boolean',
410                ],
411                'updateMask' => [
412                  'location' => 'query',
413                  'type' => 'string',
414                ],
415                'validateOnly' => [
416                  'location' => 'query',
417                  'type' => 'boolean',
418                ],
419              ],
420            ],'setIamPolicy' => [
421              'path' => 'v1/{+resource}:setIamPolicy',
422              'httpMethod' => 'POST',
423              'parameters' => [
424                'resource' => [
425                  'location' => 'path',
426                  'type' => 'string',
427                  'required' => true,
428                ],
429              ],
430            ],'testIamPermissions' => [
431              'path' => 'v1/{+resource}:testIamPermissions',
432              'httpMethod' => 'POST',
433              'parameters' => [
434                'resource' => [
435                  'location' => 'path',
436                  'type' => 'string',
437                  'required' => true,
438                ],
439              ],
440            ],
441          ]
442        ]
443    );
444  }
445}
446
447// Adding a class alias for backwards compatibility with the previous class name.
448class_alias(Eventarc::class, 'Google_Service_Eventarc');
449