source: vendor/google/apiclient-services/src/DLP/Resource/ProjectsLocationsInspectTemplates.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload project files

  • Property mode set to 100644
File size: 7.9 KB
Line 
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\DLP\Resource;
19
20use Google\Service\DLP\GooglePrivacyDlpV2CreateInspectTemplateRequest;
21use Google\Service\DLP\GooglePrivacyDlpV2InspectTemplate;
22use Google\Service\DLP\GooglePrivacyDlpV2ListInspectTemplatesResponse;
23use Google\Service\DLP\GooglePrivacyDlpV2UpdateInspectTemplateRequest;
24use Google\Service\DLP\GoogleProtobufEmpty;
25
26/**
27 * The "inspectTemplates" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $dlpService = new Google\Service\DLP(...);
31 * $inspectTemplates = $dlpService->projects_locations_inspectTemplates;
32 * </code>
33 */
34class ProjectsLocationsInspectTemplates extends \Google\Service\Resource
35{
36 /**
37 * Creates an InspectTemplate for reusing frequently used configuration for
38 * inspecting content, images, and storage. See
39 * https://cloud.google.com/sensitive-data-protection/docs/creating-templates to
40 * learn more. (inspectTemplates.create)
41 *
42 * @param string $parent Required. Parent resource name. The format of this
43 * value varies depending on the scope of the request (project or organization)
44 * and whether you have [specified a processing
45 * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
46 * location): + Projects scope, location specified:
47 * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
48 * specified (defaults to global): `projects/{project_id}` + Organizations
49 * scope, location specified: `organizations/{org_id}/locations/{location_id}` +
50 * Organizations scope, no location specified (defaults to global):
51 * `organizations/{org_id}` The following example `parent` string specifies a
52 * parent project with the identifier `example-project`, and specifies the
53 * `europe-west3` location for processing data: parent=projects/example-
54 * project/locations/europe-west3
55 * @param GooglePrivacyDlpV2CreateInspectTemplateRequest $postBody
56 * @param array $optParams Optional parameters.
57 * @return GooglePrivacyDlpV2InspectTemplate
58 * @throws \Google\Service\Exception
59 */
60 public function create($parent, GooglePrivacyDlpV2CreateInspectTemplateRequest $postBody, $optParams = [])
61 {
62 $params = ['parent' => $parent, 'postBody' => $postBody];
63 $params = array_merge($params, $optParams);
64 return $this->call('create', [$params], GooglePrivacyDlpV2InspectTemplate::class);
65 }
66 /**
67 * Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-
68 * protection/docs/creating-templates to learn more. (inspectTemplates.delete)
69 *
70 * @param string $name Required. Resource name of the organization and
71 * inspectTemplate to be deleted, for example
72 * `organizations/433245324/inspectTemplates/432452342` or projects/project-
73 * id/inspectTemplates/432452342.
74 * @param array $optParams Optional parameters.
75 * @return GoogleProtobufEmpty
76 * @throws \Google\Service\Exception
77 */
78 public function delete($name, $optParams = [])
79 {
80 $params = ['name' => $name];
81 $params = array_merge($params, $optParams);
82 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
83 }
84 /**
85 * Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-
86 * protection/docs/creating-templates to learn more. (inspectTemplates.get)
87 *
88 * @param string $name Required. Resource name of the organization and
89 * inspectTemplate to be read, for example
90 * `organizations/433245324/inspectTemplates/432452342` or projects/project-
91 * id/inspectTemplates/432452342.
92 * @param array $optParams Optional parameters.
93 * @return GooglePrivacyDlpV2InspectTemplate
94 * @throws \Google\Service\Exception
95 */
96 public function get($name, $optParams = [])
97 {
98 $params = ['name' => $name];
99 $params = array_merge($params, $optParams);
100 return $this->call('get', [$params], GooglePrivacyDlpV2InspectTemplate::class);
101 }
102 /**
103 * Lists InspectTemplates. See https://cloud.google.com/sensitive-data-
104 * protection/docs/creating-templates to learn more.
105 * (inspectTemplates.listProjectsLocationsInspectTemplates)
106 *
107 * @param string $parent Required. Parent resource name. The format of this
108 * value varies depending on the scope of the request (project or organization)
109 * and whether you have [specified a processing
110 * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
111 * location): + Projects scope, location specified:
112 * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
113 * specified (defaults to global): `projects/{project_id}` + Organizations
114 * scope, location specified: `organizations/{org_id}/locations/{location_id}` +
115 * Organizations scope, no location specified (defaults to global):
116 * `organizations/{org_id}` The following example `parent` string specifies a
117 * parent project with the identifier `example-project`, and specifies the
118 * `europe-west3` location for processing data: parent=projects/example-
119 * project/locations/europe-west3
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string locationId Deprecated. This field has no effect.
123 * @opt_param string orderBy Comma-separated list of fields to order by,
124 * followed by `asc` or `desc` postfix. This list is case insensitive. The
125 * default sorting order is ascending. Redundant space characters are
126 * insignificant. Example: `name asc,update_time, create_time desc` Supported
127 * fields are: - `create_time`: corresponds to the time the template was
128 * created. - `update_time`: corresponds to the time the template was last
129 * updated. - `name`: corresponds to the template's name. - `display_name`:
130 * corresponds to the template's display name.
131 * @opt_param int pageSize Size of the page. This value can be limited by the
132 * server. If zero server returns a page of max size 100.
133 * @opt_param string pageToken Page token to continue retrieval. Comes from the
134 * previous call to `ListInspectTemplates`.
135 * @return GooglePrivacyDlpV2ListInspectTemplatesResponse
136 * @throws \Google\Service\Exception
137 */
138 public function listProjectsLocationsInspectTemplates($parent, $optParams = [])
139 {
140 $params = ['parent' => $parent];
141 $params = array_merge($params, $optParams);
142 return $this->call('list', [$params], GooglePrivacyDlpV2ListInspectTemplatesResponse::class);
143 }
144 /**
145 * Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-
146 * protection/docs/creating-templates to learn more. (inspectTemplates.patch)
147 *
148 * @param string $name Required. Resource name of organization and
149 * inspectTemplate to be updated, for example
150 * `organizations/433245324/inspectTemplates/432452342` or projects/project-
151 * id/inspectTemplates/432452342.
152 * @param GooglePrivacyDlpV2UpdateInspectTemplateRequest $postBody
153 * @param array $optParams Optional parameters.
154 * @return GooglePrivacyDlpV2InspectTemplate
155 * @throws \Google\Service\Exception
156 */
157 public function patch($name, GooglePrivacyDlpV2UpdateInspectTemplateRequest $postBody, $optParams = [])
158 {
159 $params = ['name' => $name, 'postBody' => $postBody];
160 $params = array_merge($params, $optParams);
161 return $this->call('patch', [$params], GooglePrivacyDlpV2InspectTemplate::class);
162 }
163}
164
165// Adding a class alias for backwards compatibility with the previous class name.
166class_alias(ProjectsLocationsInspectTemplates::class, 'Google_Service_DLP_Resource_ProjectsLocationsInspectTemplates');
Note: See TracBrowser for help on using the repository browser.