source: vendor/google/apiclient-services/src/DLP/Resource/ProjectsDeidentifyTemplates.php@ f9c482b

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

Upload new project files

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