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 Connectors (v1).
24 *
25 * <p>
26 * Enables users to create and manage connections to Google Cloud services and
27 * third-party business applications using the Connectors interface.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class Connectors extends \Google\Service
37{
38  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
39  const CLOUD_PLATFORM =
40      "https://www.googleapis.com/auth/cloud-platform";
41
42  public $projects_locations;
43  public $projects_locations_connections;
44  public $projects_locations_connections_runtimeActionSchemas;
45  public $projects_locations_connections_runtimeEntitySchemas;
46  public $projects_locations_global_providers;
47  public $projects_locations_global_providers_connectors;
48  public $projects_locations_global_providers_connectors_versions;
49  public $projects_locations_operations;
50  public $projects_locations_providers;
51
52  /**
53   * Constructs the internal representation of the Connectors service.
54   *
55   * @param Client|array $clientOrConfig The client used to deliver requests, or a
56   *                                     config array to pass to a new Client instance.
57   * @param string $rootUrl The root URL used for requests to the service.
58   */
59  public function __construct($clientOrConfig = [], $rootUrl = null)
60  {
61    parent::__construct($clientOrConfig);
62    $this->rootUrl = $rootUrl ?: 'https://connectors.googleapis.com/';
63    $this->servicePath = '';
64    $this->batchPath = 'batch';
65    $this->version = 'v1';
66    $this->serviceName = 'connectors';
67
68    $this->projects_locations = new Connectors\Resource\ProjectsLocations(
69        $this,
70        $this->serviceName,
71        'locations',
72        [
73          'methods' => [
74            'get' => [
75              'path' => 'v1/{+name}',
76              'httpMethod' => 'GET',
77              'parameters' => [
78                'name' => [
79                  'location' => 'path',
80                  'type' => 'string',
81                  'required' => true,
82                ],
83              ],
84            ],'getRuntimeConfig' => [
85              'path' => 'v1/{+name}',
86              'httpMethod' => 'GET',
87              'parameters' => [
88                'name' => [
89                  'location' => 'path',
90                  'type' => 'string',
91                  'required' => true,
92                ],
93              ],
94            ],'list' => [
95              'path' => 'v1/{+name}/locations',
96              'httpMethod' => 'GET',
97              'parameters' => [
98                'name' => [
99                  'location' => 'path',
100                  'type' => 'string',
101                  'required' => true,
102                ],
103                'filter' => [
104                  'location' => 'query',
105                  'type' => 'string',
106                ],
107                'pageSize' => [
108                  'location' => 'query',
109                  'type' => 'integer',
110                ],
111                'pageToken' => [
112                  'location' => 'query',
113                  'type' => 'string',
114                ],
115              ],
116            ],
117          ]
118        ]
119    );
120    $this->projects_locations_connections = new Connectors\Resource\ProjectsLocationsConnections(
121        $this,
122        $this->serviceName,
123        'connections',
124        [
125          'methods' => [
126            'create' => [
127              'path' => 'v1/{+parent}/connections',
128              'httpMethod' => 'POST',
129              'parameters' => [
130                'parent' => [
131                  'location' => 'path',
132                  'type' => 'string',
133                  'required' => true,
134                ],
135                'connectionId' => [
136                  'location' => 'query',
137                  'type' => 'string',
138                ],
139              ],
140            ],'delete' => [
141              'path' => 'v1/{+name}',
142              'httpMethod' => 'DELETE',
143              'parameters' => [
144                'name' => [
145                  'location' => 'path',
146                  'type' => 'string',
147                  'required' => true,
148                ],
149              ],
150            ],'get' => [
151              'path' => 'v1/{+name}',
152              'httpMethod' => 'GET',
153              'parameters' => [
154                'name' => [
155                  'location' => 'path',
156                  'type' => 'string',
157                  'required' => true,
158                ],
159                'view' => [
160                  'location' => 'query',
161                  'type' => 'string',
162                ],
163              ],
164            ],'getConnectionSchemaMetadata' => [
165              'path' => 'v1/{+name}',
166              'httpMethod' => 'GET',
167              'parameters' => [
168                'name' => [
169                  'location' => 'path',
170                  'type' => 'string',
171                  'required' => true,
172                ],
173              ],
174            ],'getIamPolicy' => [
175              'path' => 'v1/{+resource}:getIamPolicy',
176              'httpMethod' => 'GET',
177              'parameters' => [
178                'resource' => [
179                  'location' => 'path',
180                  'type' => 'string',
181                  'required' => true,
182                ],
183                'options.requestedPolicyVersion' => [
184                  'location' => 'query',
185                  'type' => 'integer',
186                ],
187              ],
188            ],'list' => [
189              'path' => 'v1/{+parent}/connections',
190              'httpMethod' => 'GET',
191              'parameters' => [
192                'parent' => [
193                  'location' => 'path',
194                  'type' => 'string',
195                  'required' => true,
196                ],
197                'filter' => [
198                  'location' => 'query',
199                  'type' => 'string',
200                ],
201                'orderBy' => [
202                  'location' => 'query',
203                  'type' => 'string',
204                ],
205                'pageSize' => [
206                  'location' => 'query',
207                  'type' => 'integer',
208                ],
209                'pageToken' => [
210                  'location' => 'query',
211                  'type' => 'string',
212                ],
213                'view' => [
214                  'location' => 'query',
215                  'type' => 'string',
216                ],
217              ],
218            ],'patch' => [
219              'path' => 'v1/{+name}',
220              'httpMethod' => 'PATCH',
221              'parameters' => [
222                'name' => [
223                  'location' => 'path',
224                  'type' => 'string',
225                  'required' => true,
226                ],
227                'updateMask' => [
228                  'location' => 'query',
229                  'type' => 'string',
230                ],
231              ],
232            ],'setIamPolicy' => [
233              'path' => 'v1/{+resource}:setIamPolicy',
234              'httpMethod' => 'POST',
235              'parameters' => [
236                'resource' => [
237                  'location' => 'path',
238                  'type' => 'string',
239                  'required' => true,
240                ],
241              ],
242            ],'testIamPermissions' => [
243              'path' => 'v1/{+resource}:testIamPermissions',
244              'httpMethod' => 'POST',
245              'parameters' => [
246                'resource' => [
247                  'location' => 'path',
248                  'type' => 'string',
249                  'required' => true,
250                ],
251              ],
252            ],
253          ]
254        ]
255    );
256    $this->projects_locations_connections_runtimeActionSchemas = new Connectors\Resource\ProjectsLocationsConnectionsRuntimeActionSchemas(
257        $this,
258        $this->serviceName,
259        'runtimeActionSchemas',
260        [
261          'methods' => [
262            'list' => [
263              'path' => 'v1/{+parent}/runtimeActionSchemas',
264              'httpMethod' => 'GET',
265              'parameters' => [
266                'parent' => [
267                  'location' => 'path',
268                  'type' => 'string',
269                  'required' => true,
270                ],
271                'filter' => [
272                  'location' => 'query',
273                  'type' => 'string',
274                ],
275                'pageSize' => [
276                  'location' => 'query',
277                  'type' => 'integer',
278                ],
279                'pageToken' => [
280                  'location' => 'query',
281                  'type' => 'string',
282                ],
283              ],
284            ],
285          ]
286        ]
287    );
288    $this->projects_locations_connections_runtimeEntitySchemas = new Connectors\Resource\ProjectsLocationsConnectionsRuntimeEntitySchemas(
289        $this,
290        $this->serviceName,
291        'runtimeEntitySchemas',
292        [
293          'methods' => [
294            'list' => [
295              'path' => 'v1/{+parent}/runtimeEntitySchemas',
296              'httpMethod' => 'GET',
297              'parameters' => [
298                'parent' => [
299                  'location' => 'path',
300                  'type' => 'string',
301                  'required' => true,
302                ],
303                'filter' => [
304                  'location' => 'query',
305                  'type' => 'string',
306                ],
307                'pageSize' => [
308                  'location' => 'query',
309                  'type' => 'integer',
310                ],
311                'pageToken' => [
312                  'location' => 'query',
313                  'type' => 'string',
314                ],
315              ],
316            ],
317          ]
318        ]
319    );
320    $this->projects_locations_global_providers = new Connectors\Resource\ProjectsLocationsConnectorsGlobalProviders(
321        $this,
322        $this->serviceName,
323        'providers',
324        [
325          'methods' => [
326            'get' => [
327              'path' => 'v1/{+name}',
328              'httpMethod' => 'GET',
329              'parameters' => [
330                'name' => [
331                  'location' => 'path',
332                  'type' => 'string',
333                  'required' => true,
334                ],
335              ],
336            ],'list' => [
337              'path' => 'v1/{+parent}/providers',
338              'httpMethod' => 'GET',
339              'parameters' => [
340                'parent' => [
341                  'location' => 'path',
342                  'type' => 'string',
343                  'required' => true,
344                ],
345                'pageSize' => [
346                  'location' => 'query',
347                  'type' => 'integer',
348                ],
349                'pageToken' => [
350                  'location' => 'query',
351                  'type' => 'string',
352                ],
353              ],
354            ],
355          ]
356        ]
357    );
358    $this->projects_locations_global_providers_connectors = new Connectors\Resource\ProjectsLocationsConnectorsGlobalProvidersConnectors(
359        $this,
360        $this->serviceName,
361        'connectors',
362        [
363          'methods' => [
364            'get' => [
365              'path' => 'v1/{+name}',
366              'httpMethod' => 'GET',
367              'parameters' => [
368                'name' => [
369                  'location' => 'path',
370                  'type' => 'string',
371                  'required' => true,
372                ],
373              ],
374            ],'list' => [
375              'path' => 'v1/{+parent}/connectors',
376              'httpMethod' => 'GET',
377              'parameters' => [
378                'parent' => [
379                  'location' => 'path',
380                  'type' => 'string',
381                  'required' => true,
382                ],
383                'pageSize' => [
384                  'location' => 'query',
385                  'type' => 'integer',
386                ],
387                'pageToken' => [
388                  'location' => 'query',
389                  'type' => 'string',
390                ],
391              ],
392            ],
393          ]
394        ]
395    );
396    $this->projects_locations_global_providers_connectors_versions = new Connectors\Resource\ProjectsLocationsConnectorsGlobalProvidersConnectorsVersions(
397        $this,
398        $this->serviceName,
399        'versions',
400        [
401          'methods' => [
402            'get' => [
403              'path' => 'v1/{+name}',
404              'httpMethod' => 'GET',
405              'parameters' => [
406                'name' => [
407                  'location' => 'path',
408                  'type' => 'string',
409                  'required' => true,
410                ],
411                'view' => [
412                  'location' => 'query',
413                  'type' => 'string',
414                ],
415              ],
416            ],'list' => [
417              'path' => 'v1/{+parent}/versions',
418              'httpMethod' => 'GET',
419              'parameters' => [
420                'parent' => [
421                  'location' => 'path',
422                  'type' => 'string',
423                  'required' => true,
424                ],
425                'pageSize' => [
426                  'location' => 'query',
427                  'type' => 'integer',
428                ],
429                'pageToken' => [
430                  'location' => 'query',
431                  'type' => 'string',
432                ],
433                'view' => [
434                  'location' => 'query',
435                  'type' => 'string',
436                ],
437              ],
438            ],
439          ]
440        ]
441    );
442    $this->projects_locations_operations = new Connectors\Resource\ProjectsLocationsOperations(
443        $this,
444        $this->serviceName,
445        'operations',
446        [
447          'methods' => [
448            'cancel' => [
449              'path' => 'v1/{+name}:cancel',
450              'httpMethod' => 'POST',
451              'parameters' => [
452                'name' => [
453                  'location' => 'path',
454                  'type' => 'string',
455                  'required' => true,
456                ],
457              ],
458            ],'delete' => [
459              'path' => 'v1/{+name}',
460              'httpMethod' => 'DELETE',
461              'parameters' => [
462                'name' => [
463                  'location' => 'path',
464                  'type' => 'string',
465                  'required' => true,
466                ],
467              ],
468            ],'get' => [
469              'path' => 'v1/{+name}',
470              'httpMethod' => 'GET',
471              'parameters' => [
472                'name' => [
473                  'location' => 'path',
474                  'type' => 'string',
475                  'required' => true,
476                ],
477              ],
478            ],'list' => [
479              'path' => 'v1/{+name}/operations',
480              'httpMethod' => 'GET',
481              'parameters' => [
482                'name' => [
483                  'location' => 'path',
484                  'type' => 'string',
485                  'required' => true,
486                ],
487                'filter' => [
488                  'location' => 'query',
489                  'type' => 'string',
490                ],
491                'pageSize' => [
492                  'location' => 'query',
493                  'type' => 'integer',
494                ],
495                'pageToken' => [
496                  'location' => 'query',
497                  'type' => 'string',
498                ],
499              ],
500            ],
501          ]
502        ]
503    );
504    $this->projects_locations_providers = new Connectors\Resource\ProjectsLocationsProviders(
505        $this,
506        $this->serviceName,
507        'providers',
508        [
509          'methods' => [
510            'getIamPolicy' => [
511              'path' => 'v1/{+resource}:getIamPolicy',
512              'httpMethod' => 'GET',
513              'parameters' => [
514                'resource' => [
515                  'location' => 'path',
516                  'type' => 'string',
517                  'required' => true,
518                ],
519                'options.requestedPolicyVersion' => [
520                  'location' => 'query',
521                  'type' => 'integer',
522                ],
523              ],
524            ],'setIamPolicy' => [
525              'path' => 'v1/{+resource}:setIamPolicy',
526              'httpMethod' => 'POST',
527              'parameters' => [
528                'resource' => [
529                  'location' => 'path',
530                  'type' => 'string',
531                  'required' => true,
532                ],
533              ],
534            ],'testIamPermissions' => [
535              'path' => 'v1/{+resource}:testIamPermissions',
536              'httpMethod' => 'POST',
537              'parameters' => [
538                'resource' => [
539                  'location' => 'path',
540                  'type' => 'string',
541                  'required' => true,
542                ],
543              ],
544            ],
545          ]
546        ]
547    );
548  }
549}
550
551// Adding a class alias for backwards compatibility with the previous class name.
552class_alias(Connectors::class, 'Google_Service_Connectors');
553