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 CertificateAuthorityService (v1).
24 *
25 * <p>
26 * The Certificate Authority Service API is a highly-available, scalable service
27 * that enables you to simplify and automate the management of private
28 * certificate authorities (CAs) while staying in control of your private keys.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://cloud.google.com/" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class CertificateAuthorityService extends \Google\Service
38{
39  /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
40  const CLOUD_PLATFORM =
41      "https://www.googleapis.com/auth/cloud-platform";
42
43  public $projects_locations;
44  public $projects_locations_caPools;
45  public $projects_locations_caPools_certificateAuthorities;
46  public $projects_locations_caPools_certificateAuthorities_certificateRevocationLists;
47  public $projects_locations_caPools_certificates;
48  public $projects_locations_certificateTemplates;
49  public $projects_locations_operations;
50
51  /**
52   * Constructs the internal representation of the CertificateAuthorityService
53   * 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://privateca.googleapis.com/';
63    $this->servicePath = '';
64    $this->batchPath = 'batch';
65    $this->version = 'v1';
66    $this->serviceName = 'privateca';
67
68    $this->projects_locations = new CertificateAuthorityService\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            ],'list' => [
85              'path' => 'v1/{+name}/locations',
86              'httpMethod' => 'GET',
87              'parameters' => [
88                'name' => [
89                  'location' => 'path',
90                  'type' => 'string',
91                  'required' => true,
92                ],
93                'filter' => [
94                  'location' => 'query',
95                  'type' => 'string',
96                ],
97                'pageSize' => [
98                  'location' => 'query',
99                  'type' => 'integer',
100                ],
101                'pageToken' => [
102                  'location' => 'query',
103                  'type' => 'string',
104                ],
105              ],
106            ],
107          ]
108        ]
109    );
110    $this->projects_locations_caPools = new CertificateAuthorityService\Resource\ProjectsLocationsCaPools(
111        $this,
112        $this->serviceName,
113        'caPools',
114        [
115          'methods' => [
116            'create' => [
117              'path' => 'v1/{+parent}/caPools',
118              'httpMethod' => 'POST',
119              'parameters' => [
120                'parent' => [
121                  'location' => 'path',
122                  'type' => 'string',
123                  'required' => true,
124                ],
125                'caPoolId' => [
126                  'location' => 'query',
127                  'type' => 'string',
128                ],
129                'requestId' => [
130                  'location' => 'query',
131                  'type' => 'string',
132                ],
133              ],
134            ],'delete' => [
135              'path' => 'v1/{+name}',
136              'httpMethod' => 'DELETE',
137              'parameters' => [
138                'name' => [
139                  'location' => 'path',
140                  'type' => 'string',
141                  'required' => true,
142                ],
143                'requestId' => [
144                  'location' => 'query',
145                  'type' => 'string',
146                ],
147              ],
148            ],'fetchCaCerts' => [
149              'path' => 'v1/{+caPool}:fetchCaCerts',
150              'httpMethod' => 'POST',
151              'parameters' => [
152                'caPool' => [
153                  'location' => 'path',
154                  'type' => 'string',
155                  'required' => true,
156                ],
157              ],
158            ],'get' => [
159              'path' => 'v1/{+name}',
160              'httpMethod' => 'GET',
161              'parameters' => [
162                'name' => [
163                  'location' => 'path',
164                  'type' => 'string',
165                  'required' => true,
166                ],
167              ],
168            ],'getIamPolicy' => [
169              'path' => 'v1/{+resource}:getIamPolicy',
170              'httpMethod' => 'GET',
171              'parameters' => [
172                'resource' => [
173                  'location' => 'path',
174                  'type' => 'string',
175                  'required' => true,
176                ],
177                'options.requestedPolicyVersion' => [
178                  'location' => 'query',
179                  'type' => 'integer',
180                ],
181              ],
182            ],'list' => [
183              'path' => 'v1/{+parent}/caPools',
184              'httpMethod' => 'GET',
185              'parameters' => [
186                'parent' => [
187                  'location' => 'path',
188                  'type' => 'string',
189                  'required' => true,
190                ],
191                'filter' => [
192                  'location' => 'query',
193                  'type' => 'string',
194                ],
195                'orderBy' => [
196                  'location' => 'query',
197                  'type' => 'string',
198                ],
199                'pageSize' => [
200                  'location' => 'query',
201                  'type' => 'integer',
202                ],
203                'pageToken' => [
204                  'location' => 'query',
205                  'type' => 'string',
206                ],
207              ],
208            ],'patch' => [
209              'path' => 'v1/{+name}',
210              'httpMethod' => 'PATCH',
211              'parameters' => [
212                'name' => [
213                  'location' => 'path',
214                  'type' => 'string',
215                  'required' => true,
216                ],
217                'requestId' => [
218                  'location' => 'query',
219                  'type' => 'string',
220                ],
221                'updateMask' => [
222                  'location' => 'query',
223                  'type' => 'string',
224                ],
225              ],
226            ],'setIamPolicy' => [
227              'path' => 'v1/{+resource}:setIamPolicy',
228              'httpMethod' => 'POST',
229              'parameters' => [
230                'resource' => [
231                  'location' => 'path',
232                  'type' => 'string',
233                  'required' => true,
234                ],
235              ],
236            ],'testIamPermissions' => [
237              'path' => 'v1/{+resource}:testIamPermissions',
238              'httpMethod' => 'POST',
239              'parameters' => [
240                'resource' => [
241                  'location' => 'path',
242                  'type' => 'string',
243                  'required' => true,
244                ],
245              ],
246            ],
247          ]
248        ]
249    );
250    $this->projects_locations_caPools_certificateAuthorities = new CertificateAuthorityService\Resource\ProjectsLocationsCaPoolsCertificateAuthorities(
251        $this,
252        $this->serviceName,
253        'certificateAuthorities',
254        [
255          'methods' => [
256            'activate' => [
257              'path' => 'v1/{+name}:activate',
258              'httpMethod' => 'POST',
259              'parameters' => [
260                'name' => [
261                  'location' => 'path',
262                  'type' => 'string',
263                  'required' => true,
264                ],
265              ],
266            ],'create' => [
267              'path' => 'v1/{+parent}/certificateAuthorities',
268              'httpMethod' => 'POST',
269              'parameters' => [
270                'parent' => [
271                  'location' => 'path',
272                  'type' => 'string',
273                  'required' => true,
274                ],
275                'certificateAuthorityId' => [
276                  'location' => 'query',
277                  'type' => 'string',
278                ],
279                'requestId' => [
280                  'location' => 'query',
281                  'type' => 'string',
282                ],
283              ],
284            ],'delete' => [
285              'path' => 'v1/{+name}',
286              'httpMethod' => 'DELETE',
287              'parameters' => [
288                'name' => [
289                  'location' => 'path',
290                  'type' => 'string',
291                  'required' => true,
292                ],
293                'ignoreActiveCertificates' => [
294                  'location' => 'query',
295                  'type' => 'boolean',
296                ],
297                'requestId' => [
298                  'location' => 'query',
299                  'type' => 'string',
300                ],
301                'skipGracePeriod' => [
302                  'location' => 'query',
303                  'type' => 'boolean',
304                ],
305              ],
306            ],'disable' => [
307              'path' => 'v1/{+name}:disable',
308              'httpMethod' => 'POST',
309              'parameters' => [
310                'name' => [
311                  'location' => 'path',
312                  'type' => 'string',
313                  'required' => true,
314                ],
315              ],
316            ],'enable' => [
317              'path' => 'v1/{+name}:enable',
318              'httpMethod' => 'POST',
319              'parameters' => [
320                'name' => [
321                  'location' => 'path',
322                  'type' => 'string',
323                  'required' => true,
324                ],
325              ],
326            ],'fetch' => [
327              'path' => 'v1/{+name}:fetch',
328              'httpMethod' => 'GET',
329              'parameters' => [
330                'name' => [
331                  'location' => 'path',
332                  'type' => 'string',
333                  'required' => true,
334                ],
335              ],
336            ],'get' => [
337              'path' => 'v1/{+name}',
338              'httpMethod' => 'GET',
339              'parameters' => [
340                'name' => [
341                  'location' => 'path',
342                  'type' => 'string',
343                  'required' => true,
344                ],
345              ],
346            ],'list' => [
347              'path' => 'v1/{+parent}/certificateAuthorities',
348              'httpMethod' => 'GET',
349              'parameters' => [
350                'parent' => [
351                  'location' => 'path',
352                  'type' => 'string',
353                  'required' => true,
354                ],
355                'filter' => [
356                  'location' => 'query',
357                  'type' => 'string',
358                ],
359                'orderBy' => [
360                  'location' => 'query',
361                  'type' => 'string',
362                ],
363                'pageSize' => [
364                  'location' => 'query',
365                  'type' => 'integer',
366                ],
367                'pageToken' => [
368                  'location' => 'query',
369                  'type' => 'string',
370                ],
371              ],
372            ],'patch' => [
373              'path' => 'v1/{+name}',
374              'httpMethod' => 'PATCH',
375              'parameters' => [
376                'name' => [
377                  'location' => 'path',
378                  'type' => 'string',
379                  'required' => true,
380                ],
381                'requestId' => [
382                  'location' => 'query',
383                  'type' => 'string',
384                ],
385                'updateMask' => [
386                  'location' => 'query',
387                  'type' => 'string',
388                ],
389              ],
390            ],'undelete' => [
391              'path' => 'v1/{+name}:undelete',
392              'httpMethod' => 'POST',
393              'parameters' => [
394                'name' => [
395                  'location' => 'path',
396                  'type' => 'string',
397                  'required' => true,
398                ],
399              ],
400            ],
401          ]
402        ]
403    );
404    $this->projects_locations_caPools_certificateAuthorities_certificateRevocationLists = new CertificateAuthorityService\Resource\ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationLists(
405        $this,
406        $this->serviceName,
407        'certificateRevocationLists',
408        [
409          'methods' => [
410            'get' => [
411              'path' => 'v1/{+name}',
412              'httpMethod' => 'GET',
413              'parameters' => [
414                'name' => [
415                  'location' => 'path',
416                  'type' => 'string',
417                  'required' => true,
418                ],
419              ],
420            ],'getIamPolicy' => [
421              'path' => 'v1/{+resource}:getIamPolicy',
422              'httpMethod' => 'GET',
423              'parameters' => [
424                'resource' => [
425                  'location' => 'path',
426                  'type' => 'string',
427                  'required' => true,
428                ],
429                'options.requestedPolicyVersion' => [
430                  'location' => 'query',
431                  'type' => 'integer',
432                ],
433              ],
434            ],'list' => [
435              'path' => 'v1/{+parent}/certificateRevocationLists',
436              'httpMethod' => 'GET',
437              'parameters' => [
438                'parent' => [
439                  'location' => 'path',
440                  'type' => 'string',
441                  'required' => true,
442                ],
443                'filter' => [
444                  'location' => 'query',
445                  'type' => 'string',
446                ],
447                'orderBy' => [
448                  'location' => 'query',
449                  'type' => 'string',
450                ],
451                'pageSize' => [
452                  'location' => 'query',
453                  'type' => 'integer',
454                ],
455                'pageToken' => [
456                  'location' => 'query',
457                  'type' => 'string',
458                ],
459              ],
460            ],'patch' => [
461              'path' => 'v1/{+name}',
462              'httpMethod' => 'PATCH',
463              'parameters' => [
464                'name' => [
465                  'location' => 'path',
466                  'type' => 'string',
467                  'required' => true,
468                ],
469                'requestId' => [
470                  'location' => 'query',
471                  'type' => 'string',
472                ],
473                'updateMask' => [
474                  'location' => 'query',
475                  'type' => 'string',
476                ],
477              ],
478            ],'setIamPolicy' => [
479              'path' => 'v1/{+resource}:setIamPolicy',
480              'httpMethod' => 'POST',
481              'parameters' => [
482                'resource' => [
483                  'location' => 'path',
484                  'type' => 'string',
485                  'required' => true,
486                ],
487              ],
488            ],'testIamPermissions' => [
489              'path' => 'v1/{+resource}:testIamPermissions',
490              'httpMethod' => 'POST',
491              'parameters' => [
492                'resource' => [
493                  'location' => 'path',
494                  'type' => 'string',
495                  'required' => true,
496                ],
497              ],
498            ],
499          ]
500        ]
501    );
502    $this->projects_locations_caPools_certificates = new CertificateAuthorityService\Resource\ProjectsLocationsCaPoolsCertificates(
503        $this,
504        $this->serviceName,
505        'certificates',
506        [
507          'methods' => [
508            'create' => [
509              'path' => 'v1/{+parent}/certificates',
510              'httpMethod' => 'POST',
511              'parameters' => [
512                'parent' => [
513                  'location' => 'path',
514                  'type' => 'string',
515                  'required' => true,
516                ],
517                'certificateId' => [
518                  'location' => 'query',
519                  'type' => 'string',
520                ],
521                'issuingCertificateAuthorityId' => [
522                  'location' => 'query',
523                  'type' => 'string',
524                ],
525                'requestId' => [
526                  'location' => 'query',
527                  'type' => 'string',
528                ],
529                'validateOnly' => [
530                  'location' => 'query',
531                  'type' => 'boolean',
532                ],
533              ],
534            ],'get' => [
535              'path' => 'v1/{+name}',
536              'httpMethod' => 'GET',
537              'parameters' => [
538                'name' => [
539                  'location' => 'path',
540                  'type' => 'string',
541                  'required' => true,
542                ],
543              ],
544            ],'list' => [
545              'path' => 'v1/{+parent}/certificates',
546              'httpMethod' => 'GET',
547              'parameters' => [
548                'parent' => [
549                  'location' => 'path',
550                  'type' => 'string',
551                  'required' => true,
552                ],
553                'filter' => [
554                  'location' => 'query',
555                  'type' => 'string',
556                ],
557                'orderBy' => [
558                  'location' => 'query',
559                  'type' => 'string',
560                ],
561                'pageSize' => [
562                  'location' => 'query',
563                  'type' => 'integer',
564                ],
565                'pageToken' => [
566                  'location' => 'query',
567                  'type' => 'string',
568                ],
569              ],
570            ],'patch' => [
571              'path' => 'v1/{+name}',
572              'httpMethod' => 'PATCH',
573              'parameters' => [
574                'name' => [
575                  'location' => 'path',
576                  'type' => 'string',
577                  'required' => true,
578                ],
579                'requestId' => [
580                  'location' => 'query',
581                  'type' => 'string',
582                ],
583                'updateMask' => [
584                  'location' => 'query',
585                  'type' => 'string',
586                ],
587              ],
588            ],'revoke' => [
589              'path' => 'v1/{+name}:revoke',
590              'httpMethod' => 'POST',
591              'parameters' => [
592                'name' => [
593                  'location' => 'path',
594                  'type' => 'string',
595                  'required' => true,
596                ],
597              ],
598            ],
599          ]
600        ]
601    );
602    $this->projects_locations_certificateTemplates = new CertificateAuthorityService\Resource\ProjectsLocationsCertificateTemplates(
603        $this,
604        $this->serviceName,
605        'certificateTemplates',
606        [
607          'methods' => [
608            'create' => [
609              'path' => 'v1/{+parent}/certificateTemplates',
610              'httpMethod' => 'POST',
611              'parameters' => [
612                'parent' => [
613                  'location' => 'path',
614                  'type' => 'string',
615                  'required' => true,
616                ],
617                'certificateTemplateId' => [
618                  'location' => 'query',
619                  'type' => 'string',
620                ],
621                'requestId' => [
622                  'location' => 'query',
623                  'type' => 'string',
624                ],
625              ],
626            ],'delete' => [
627              'path' => 'v1/{+name}',
628              'httpMethod' => 'DELETE',
629              'parameters' => [
630                'name' => [
631                  'location' => 'path',
632                  'type' => 'string',
633                  'required' => true,
634                ],
635                'requestId' => [
636                  'location' => 'query',
637                  'type' => 'string',
638                ],
639              ],
640            ],'get' => [
641              'path' => 'v1/{+name}',
642              'httpMethod' => 'GET',
643              'parameters' => [
644                'name' => [
645                  'location' => 'path',
646                  'type' => 'string',
647                  'required' => true,
648                ],
649              ],
650            ],'getIamPolicy' => [
651              'path' => 'v1/{+resource}:getIamPolicy',
652              'httpMethod' => 'GET',
653              'parameters' => [
654                'resource' => [
655                  'location' => 'path',
656                  'type' => 'string',
657                  'required' => true,
658                ],
659                'options.requestedPolicyVersion' => [
660                  'location' => 'query',
661                  'type' => 'integer',
662                ],
663              ],
664            ],'list' => [
665              'path' => 'v1/{+parent}/certificateTemplates',
666              'httpMethod' => 'GET',
667              'parameters' => [
668                'parent' => [
669                  'location' => 'path',
670                  'type' => 'string',
671                  'required' => true,
672                ],
673                'filter' => [
674                  'location' => 'query',
675                  'type' => 'string',
676                ],
677                'orderBy' => [
678                  'location' => 'query',
679                  'type' => 'string',
680                ],
681                'pageSize' => [
682                  'location' => 'query',
683                  'type' => 'integer',
684                ],
685                'pageToken' => [
686                  'location' => 'query',
687                  'type' => 'string',
688                ],
689              ],
690            ],'patch' => [
691              'path' => 'v1/{+name}',
692              'httpMethod' => 'PATCH',
693              'parameters' => [
694                'name' => [
695                  'location' => 'path',
696                  'type' => 'string',
697                  'required' => true,
698                ],
699                'requestId' => [
700                  'location' => 'query',
701                  'type' => 'string',
702                ],
703                'updateMask' => [
704                  'location' => 'query',
705                  'type' => 'string',
706                ],
707              ],
708            ],'setIamPolicy' => [
709              'path' => 'v1/{+resource}:setIamPolicy',
710              'httpMethod' => 'POST',
711              'parameters' => [
712                'resource' => [
713                  'location' => 'path',
714                  'type' => 'string',
715                  'required' => true,
716                ],
717              ],
718            ],'testIamPermissions' => [
719              'path' => 'v1/{+resource}:testIamPermissions',
720              'httpMethod' => 'POST',
721              'parameters' => [
722                'resource' => [
723                  'location' => 'path',
724                  'type' => 'string',
725                  'required' => true,
726                ],
727              ],
728            ],
729          ]
730        ]
731    );
732    $this->projects_locations_operations = new CertificateAuthorityService\Resource\ProjectsLocationsOperations(
733        $this,
734        $this->serviceName,
735        'operations',
736        [
737          'methods' => [
738            'cancel' => [
739              'path' => 'v1/{+name}:cancel',
740              'httpMethod' => 'POST',
741              'parameters' => [
742                'name' => [
743                  'location' => 'path',
744                  'type' => 'string',
745                  'required' => true,
746                ],
747              ],
748            ],'delete' => [
749              'path' => 'v1/{+name}',
750              'httpMethod' => 'DELETE',
751              'parameters' => [
752                'name' => [
753                  'location' => 'path',
754                  'type' => 'string',
755                  'required' => true,
756                ],
757              ],
758            ],'get' => [
759              'path' => 'v1/{+name}',
760              'httpMethod' => 'GET',
761              'parameters' => [
762                'name' => [
763                  'location' => 'path',
764                  'type' => 'string',
765                  'required' => true,
766                ],
767              ],
768            ],'list' => [
769              'path' => 'v1/{+name}/operations',
770              'httpMethod' => 'GET',
771              'parameters' => [
772                'name' => [
773                  'location' => 'path',
774                  'type' => 'string',
775                  'required' => true,
776                ],
777                'filter' => [
778                  'location' => 'query',
779                  'type' => 'string',
780                ],
781                'pageSize' => [
782                  'location' => 'query',
783                  'type' => 'integer',
784                ],
785                'pageToken' => [
786                  'location' => 'query',
787                  'type' => 'string',
788                ],
789              ],
790            ],
791          ]
792        ]
793    );
794  }
795}
796
797// Adding a class alias for backwards compatibility with the previous class name.
798class_alias(CertificateAuthorityService::class, 'Google_Service_CertificateAuthorityService');
799