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
18/**
19 * Service definition for DLP (v2).
20 *
21 * <p>
22 * Provides methods for detection, risk analysis, and de-identification of
23 * privacy-sensitive fragments in text, images, and Google Cloud Platform
24 * storage repositories.</p>
25 *
26 * <p>
27 * For more information about this service, see the API
28 * <a href="https://cloud.google.com/dlp/docs/" target="_blank">Documentation</a>
29 * </p>
30 *
31 * @author Google, Inc.
32 */
33class Google_Service_DLP extends Google_Service
34{
35  /** View and manage your data across Google Cloud Platform services. */
36  const CLOUD_PLATFORM =
37      "https://www.googleapis.com/auth/cloud-platform";
38
39  public $infoTypes;
40  public $organizations_deidentifyTemplates;
41  public $organizations_inspectTemplates;
42  public $organizations_storedInfoTypes;
43  public $projects_content;
44  public $projects_deidentifyTemplates;
45  public $projects_dlpJobs;
46  public $projects_image;
47  public $projects_inspectTemplates;
48  public $projects_jobTriggers;
49  public $projects_storedInfoTypes;
50
51  /**
52   * Constructs the internal representation of the DLP service.
53   *
54   * @param Google_Client $client
55   */
56  public function __construct(Google_Client $client)
57  {
58    parent::__construct($client);
59    $this->rootUrl = 'https://dlp.googleapis.com/';
60    $this->servicePath = '';
61    $this->batchPath = 'batch';
62    $this->version = 'v2';
63    $this->serviceName = 'dlp';
64
65    $this->infoTypes = new Google_Service_DLP_Resource_InfoTypes(
66        $this,
67        $this->serviceName,
68        'infoTypes',
69        array(
70          'methods' => array(
71            'list' => array(
72              'path' => 'v2/infoTypes',
73              'httpMethod' => 'GET',
74              'parameters' => array(
75                'languageCode' => array(
76                  'location' => 'query',
77                  'type' => 'string',
78                ),
79                'filter' => array(
80                  'location' => 'query',
81                  'type' => 'string',
82                ),
83              ),
84            ),
85          )
86        )
87    );
88    $this->organizations_deidentifyTemplates = new Google_Service_DLP_Resource_OrganizationsDeidentifyTemplates(
89        $this,
90        $this->serviceName,
91        'deidentifyTemplates',
92        array(
93          'methods' => array(
94            'create' => array(
95              'path' => 'v2/{+parent}/deidentifyTemplates',
96              'httpMethod' => 'POST',
97              'parameters' => array(
98                'parent' => array(
99                  'location' => 'path',
100                  'type' => 'string',
101                  'required' => true,
102                ),
103              ),
104            ),'delete' => array(
105              'path' => 'v2/{+name}',
106              'httpMethod' => 'DELETE',
107              'parameters' => array(
108                'name' => array(
109                  'location' => 'path',
110                  'type' => 'string',
111                  'required' => true,
112                ),
113              ),
114            ),'get' => array(
115              'path' => 'v2/{+name}',
116              'httpMethod' => 'GET',
117              'parameters' => array(
118                'name' => array(
119                  'location' => 'path',
120                  'type' => 'string',
121                  'required' => true,
122                ),
123              ),
124            ),'list' => array(
125              'path' => 'v2/{+parent}/deidentifyTemplates',
126              'httpMethod' => 'GET',
127              'parameters' => array(
128                'parent' => array(
129                  'location' => 'path',
130                  'type' => 'string',
131                  'required' => true,
132                ),
133                'pageToken' => array(
134                  'location' => 'query',
135                  'type' => 'string',
136                ),
137                'orderBy' => array(
138                  'location' => 'query',
139                  'type' => 'string',
140                ),
141                'pageSize' => array(
142                  'location' => 'query',
143                  'type' => 'integer',
144                ),
145              ),
146            ),'patch' => array(
147              'path' => 'v2/{+name}',
148              'httpMethod' => 'PATCH',
149              'parameters' => array(
150                'name' => array(
151                  'location' => 'path',
152                  'type' => 'string',
153                  'required' => true,
154                ),
155              ),
156            ),
157          )
158        )
159    );
160    $this->organizations_inspectTemplates = new Google_Service_DLP_Resource_OrganizationsInspectTemplates(
161        $this,
162        $this->serviceName,
163        'inspectTemplates',
164        array(
165          'methods' => array(
166            'create' => array(
167              'path' => 'v2/{+parent}/inspectTemplates',
168              'httpMethod' => 'POST',
169              'parameters' => array(
170                'parent' => array(
171                  'location' => 'path',
172                  'type' => 'string',
173                  'required' => true,
174                ),
175              ),
176            ),'delete' => array(
177              'path' => 'v2/{+name}',
178              'httpMethod' => 'DELETE',
179              'parameters' => array(
180                'name' => array(
181                  'location' => 'path',
182                  'type' => 'string',
183                  'required' => true,
184                ),
185              ),
186            ),'get' => array(
187              'path' => 'v2/{+name}',
188              'httpMethod' => 'GET',
189              'parameters' => array(
190                'name' => array(
191                  'location' => 'path',
192                  'type' => 'string',
193                  'required' => true,
194                ),
195              ),
196            ),'list' => array(
197              'path' => 'v2/{+parent}/inspectTemplates',
198              'httpMethod' => 'GET',
199              'parameters' => array(
200                'parent' => array(
201                  'location' => 'path',
202                  'type' => 'string',
203                  'required' => true,
204                ),
205                'pageToken' => array(
206                  'location' => 'query',
207                  'type' => 'string',
208                ),
209                'orderBy' => array(
210                  'location' => 'query',
211                  'type' => 'string',
212                ),
213                'pageSize' => array(
214                  'location' => 'query',
215                  'type' => 'integer',
216                ),
217              ),
218            ),'patch' => array(
219              'path' => 'v2/{+name}',
220              'httpMethod' => 'PATCH',
221              'parameters' => array(
222                'name' => array(
223                  'location' => 'path',
224                  'type' => 'string',
225                  'required' => true,
226                ),
227              ),
228            ),
229          )
230        )
231    );
232    $this->organizations_storedInfoTypes = new Google_Service_DLP_Resource_OrganizationsStoredInfoTypes(
233        $this,
234        $this->serviceName,
235        'storedInfoTypes',
236        array(
237          'methods' => array(
238            'create' => array(
239              'path' => 'v2/{+parent}/storedInfoTypes',
240              'httpMethod' => 'POST',
241              'parameters' => array(
242                'parent' => array(
243                  'location' => 'path',
244                  'type' => 'string',
245                  'required' => true,
246                ),
247              ),
248            ),'delete' => array(
249              'path' => 'v2/{+name}',
250              'httpMethod' => 'DELETE',
251              'parameters' => array(
252                'name' => array(
253                  'location' => 'path',
254                  'type' => 'string',
255                  'required' => true,
256                ),
257              ),
258            ),'get' => array(
259              'path' => 'v2/{+name}',
260              'httpMethod' => 'GET',
261              'parameters' => array(
262                'name' => array(
263                  'location' => 'path',
264                  'type' => 'string',
265                  'required' => true,
266                ),
267              ),
268            ),'list' => array(
269              'path' => 'v2/{+parent}/storedInfoTypes',
270              'httpMethod' => 'GET',
271              'parameters' => array(
272                'parent' => array(
273                  'location' => 'path',
274                  'type' => 'string',
275                  'required' => true,
276                ),
277                'pageToken' => array(
278                  'location' => 'query',
279                  'type' => 'string',
280                ),
281                'orderBy' => array(
282                  'location' => 'query',
283                  'type' => 'string',
284                ),
285                'pageSize' => array(
286                  'location' => 'query',
287                  'type' => 'integer',
288                ),
289              ),
290            ),'patch' => array(
291              'path' => 'v2/{+name}',
292              'httpMethod' => 'PATCH',
293              'parameters' => array(
294                'name' => array(
295                  'location' => 'path',
296                  'type' => 'string',
297                  'required' => true,
298                ),
299              ),
300            ),
301          )
302        )
303    );
304    $this->projects_content = new Google_Service_DLP_Resource_ProjectsContent(
305        $this,
306        $this->serviceName,
307        'content',
308        array(
309          'methods' => array(
310            'deidentify' => array(
311              'path' => 'v2/{+parent}/content:deidentify',
312              'httpMethod' => 'POST',
313              'parameters' => array(
314                'parent' => array(
315                  'location' => 'path',
316                  'type' => 'string',
317                  'required' => true,
318                ),
319              ),
320            ),'inspect' => array(
321              'path' => 'v2/{+parent}/content:inspect',
322              'httpMethod' => 'POST',
323              'parameters' => array(
324                'parent' => array(
325                  'location' => 'path',
326                  'type' => 'string',
327                  'required' => true,
328                ),
329              ),
330            ),'reidentify' => array(
331              'path' => 'v2/{+parent}/content:reidentify',
332              'httpMethod' => 'POST',
333              'parameters' => array(
334                'parent' => array(
335                  'location' => 'path',
336                  'type' => 'string',
337                  'required' => true,
338                ),
339              ),
340            ),
341          )
342        )
343    );
344    $this->projects_deidentifyTemplates = new Google_Service_DLP_Resource_ProjectsDeidentifyTemplates(
345        $this,
346        $this->serviceName,
347        'deidentifyTemplates',
348        array(
349          'methods' => array(
350            'create' => array(
351              'path' => 'v2/{+parent}/deidentifyTemplates',
352              'httpMethod' => 'POST',
353              'parameters' => array(
354                'parent' => array(
355                  'location' => 'path',
356                  'type' => 'string',
357                  'required' => true,
358                ),
359              ),
360            ),'delete' => array(
361              'path' => 'v2/{+name}',
362              'httpMethod' => 'DELETE',
363              'parameters' => array(
364                'name' => array(
365                  'location' => 'path',
366                  'type' => 'string',
367                  'required' => true,
368                ),
369              ),
370            ),'get' => array(
371              'path' => 'v2/{+name}',
372              'httpMethod' => 'GET',
373              'parameters' => array(
374                'name' => array(
375                  'location' => 'path',
376                  'type' => 'string',
377                  'required' => true,
378                ),
379              ),
380            ),'list' => array(
381              'path' => 'v2/{+parent}/deidentifyTemplates',
382              'httpMethod' => 'GET',
383              'parameters' => array(
384                'parent' => array(
385                  'location' => 'path',
386                  'type' => 'string',
387                  'required' => true,
388                ),
389                'pageToken' => array(
390                  'location' => 'query',
391                  'type' => 'string',
392                ),
393                'orderBy' => array(
394                  'location' => 'query',
395                  'type' => 'string',
396                ),
397                'pageSize' => array(
398                  'location' => 'query',
399                  'type' => 'integer',
400                ),
401              ),
402            ),'patch' => array(
403              'path' => 'v2/{+name}',
404              'httpMethod' => 'PATCH',
405              'parameters' => array(
406                'name' => array(
407                  'location' => 'path',
408                  'type' => 'string',
409                  'required' => true,
410                ),
411              ),
412            ),
413          )
414        )
415    );
416    $this->projects_dlpJobs = new Google_Service_DLP_Resource_ProjectsDlpJobs(
417        $this,
418        $this->serviceName,
419        'dlpJobs',
420        array(
421          'methods' => array(
422            'cancel' => array(
423              'path' => 'v2/{+name}:cancel',
424              'httpMethod' => 'POST',
425              'parameters' => array(
426                'name' => array(
427                  'location' => 'path',
428                  'type' => 'string',
429                  'required' => true,
430                ),
431              ),
432            ),'create' => array(
433              'path' => 'v2/{+parent}/dlpJobs',
434              'httpMethod' => 'POST',
435              'parameters' => array(
436                'parent' => array(
437                  'location' => 'path',
438                  'type' => 'string',
439                  'required' => true,
440                ),
441              ),
442            ),'delete' => array(
443              'path' => 'v2/{+name}',
444              'httpMethod' => 'DELETE',
445              'parameters' => array(
446                'name' => array(
447                  'location' => 'path',
448                  'type' => 'string',
449                  'required' => true,
450                ),
451              ),
452            ),'get' => array(
453              'path' => 'v2/{+name}',
454              'httpMethod' => 'GET',
455              'parameters' => array(
456                'name' => array(
457                  'location' => 'path',
458                  'type' => 'string',
459                  'required' => true,
460                ),
461              ),
462            ),'list' => array(
463              'path' => 'v2/{+parent}/dlpJobs',
464              'httpMethod' => 'GET',
465              'parameters' => array(
466                'parent' => array(
467                  'location' => 'path',
468                  'type' => 'string',
469                  'required' => true,
470                ),
471                'orderBy' => array(
472                  'location' => 'query',
473                  'type' => 'string',
474                ),
475                'type' => array(
476                  'location' => 'query',
477                  'type' => 'string',
478                ),
479                'filter' => array(
480                  'location' => 'query',
481                  'type' => 'string',
482                ),
483                'pageToken' => array(
484                  'location' => 'query',
485                  'type' => 'string',
486                ),
487                'pageSize' => array(
488                  'location' => 'query',
489                  'type' => 'integer',
490                ),
491              ),
492            ),
493          )
494        )
495    );
496    $this->projects_image = new Google_Service_DLP_Resource_ProjectsImage(
497        $this,
498        $this->serviceName,
499        'image',
500        array(
501          'methods' => array(
502            'redact' => array(
503              'path' => 'v2/{+parent}/image:redact',
504              'httpMethod' => 'POST',
505              'parameters' => array(
506                'parent' => array(
507                  'location' => 'path',
508                  'type' => 'string',
509                  'required' => true,
510                ),
511              ),
512            ),
513          )
514        )
515    );
516    $this->projects_inspectTemplates = new Google_Service_DLP_Resource_ProjectsInspectTemplates(
517        $this,
518        $this->serviceName,
519        'inspectTemplates',
520        array(
521          'methods' => array(
522            'create' => array(
523              'path' => 'v2/{+parent}/inspectTemplates',
524              'httpMethod' => 'POST',
525              'parameters' => array(
526                'parent' => array(
527                  'location' => 'path',
528                  'type' => 'string',
529                  'required' => true,
530                ),
531              ),
532            ),'delete' => array(
533              'path' => 'v2/{+name}',
534              'httpMethod' => 'DELETE',
535              'parameters' => array(
536                'name' => array(
537                  'location' => 'path',
538                  'type' => 'string',
539                  'required' => true,
540                ),
541              ),
542            ),'get' => array(
543              'path' => 'v2/{+name}',
544              'httpMethod' => 'GET',
545              'parameters' => array(
546                'name' => array(
547                  'location' => 'path',
548                  'type' => 'string',
549                  'required' => true,
550                ),
551              ),
552            ),'list' => array(
553              'path' => 'v2/{+parent}/inspectTemplates',
554              'httpMethod' => 'GET',
555              'parameters' => array(
556                'parent' => array(
557                  'location' => 'path',
558                  'type' => 'string',
559                  'required' => true,
560                ),
561                'pageToken' => array(
562                  'location' => 'query',
563                  'type' => 'string',
564                ),
565                'orderBy' => array(
566                  'location' => 'query',
567                  'type' => 'string',
568                ),
569                'pageSize' => array(
570                  'location' => 'query',
571                  'type' => 'integer',
572                ),
573              ),
574            ),'patch' => array(
575              'path' => 'v2/{+name}',
576              'httpMethod' => 'PATCH',
577              'parameters' => array(
578                'name' => array(
579                  'location' => 'path',
580                  'type' => 'string',
581                  'required' => true,
582                ),
583              ),
584            ),
585          )
586        )
587    );
588    $this->projects_jobTriggers = new Google_Service_DLP_Resource_ProjectsJobTriggers(
589        $this,
590        $this->serviceName,
591        'jobTriggers',
592        array(
593          'methods' => array(
594            'activate' => array(
595              'path' => 'v2/{+name}:activate',
596              'httpMethod' => 'POST',
597              'parameters' => array(
598                'name' => array(
599                  'location' => 'path',
600                  'type' => 'string',
601                  'required' => true,
602                ),
603              ),
604            ),'create' => array(
605              'path' => 'v2/{+parent}/jobTriggers',
606              'httpMethod' => 'POST',
607              'parameters' => array(
608                'parent' => array(
609                  'location' => 'path',
610                  'type' => 'string',
611                  'required' => true,
612                ),
613              ),
614            ),'delete' => array(
615              'path' => 'v2/{+name}',
616              'httpMethod' => 'DELETE',
617              'parameters' => array(
618                'name' => array(
619                  'location' => 'path',
620                  'type' => 'string',
621                  'required' => true,
622                ),
623              ),
624            ),'get' => array(
625              'path' => 'v2/{+name}',
626              'httpMethod' => 'GET',
627              'parameters' => array(
628                'name' => array(
629                  'location' => 'path',
630                  'type' => 'string',
631                  'required' => true,
632                ),
633              ),
634            ),'list' => array(
635              'path' => 'v2/{+parent}/jobTriggers',
636              'httpMethod' => 'GET',
637              'parameters' => array(
638                'parent' => array(
639                  'location' => 'path',
640                  'type' => 'string',
641                  'required' => true,
642                ),
643                'pageToken' => array(
644                  'location' => 'query',
645                  'type' => 'string',
646                ),
647                'orderBy' => array(
648                  'location' => 'query',
649                  'type' => 'string',
650                ),
651                'pageSize' => array(
652                  'location' => 'query',
653                  'type' => 'integer',
654                ),
655                'filter' => array(
656                  'location' => 'query',
657                  'type' => 'string',
658                ),
659              ),
660            ),'patch' => array(
661              'path' => 'v2/{+name}',
662              'httpMethod' => 'PATCH',
663              'parameters' => array(
664                'name' => array(
665                  'location' => 'path',
666                  'type' => 'string',
667                  'required' => true,
668                ),
669              ),
670            ),
671          )
672        )
673    );
674    $this->projects_storedInfoTypes = new Google_Service_DLP_Resource_ProjectsStoredInfoTypes(
675        $this,
676        $this->serviceName,
677        'storedInfoTypes',
678        array(
679          'methods' => array(
680            'create' => array(
681              'path' => 'v2/{+parent}/storedInfoTypes',
682              'httpMethod' => 'POST',
683              'parameters' => array(
684                'parent' => array(
685                  'location' => 'path',
686                  'type' => 'string',
687                  'required' => true,
688                ),
689              ),
690            ),'delete' => array(
691              'path' => 'v2/{+name}',
692              'httpMethod' => 'DELETE',
693              'parameters' => array(
694                'name' => array(
695                  'location' => 'path',
696                  'type' => 'string',
697                  'required' => true,
698                ),
699              ),
700            ),'get' => array(
701              'path' => 'v2/{+name}',
702              'httpMethod' => 'GET',
703              'parameters' => array(
704                'name' => array(
705                  'location' => 'path',
706                  'type' => 'string',
707                  'required' => true,
708                ),
709              ),
710            ),'list' => array(
711              'path' => 'v2/{+parent}/storedInfoTypes',
712              'httpMethod' => 'GET',
713              'parameters' => array(
714                'parent' => array(
715                  'location' => 'path',
716                  'type' => 'string',
717                  'required' => true,
718                ),
719                'pageToken' => array(
720                  'location' => 'query',
721                  'type' => 'string',
722                ),
723                'orderBy' => array(
724                  'location' => 'query',
725                  'type' => 'string',
726                ),
727                'pageSize' => array(
728                  'location' => 'query',
729                  'type' => 'integer',
730                ),
731              ),
732            ),'patch' => array(
733              'path' => 'v2/{+name}',
734              'httpMethod' => 'PATCH',
735              'parameters' => array(
736                'name' => array(
737                  'location' => 'path',
738                  'type' => 'string',
739                  'required' => true,
740                ),
741              ),
742            ),
743          )
744        )
745    );
746  }
747}
748