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