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