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