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 | namespace Google\Service\DLP\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\DLP\GooglePrivacyDlpV2RedactImageRequest;
|
---|
21 | use Google\Service\DLP\GooglePrivacyDlpV2RedactImageResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "image" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $dlpService = new Google\Service\DLP(...);
|
---|
28 | * $image = $dlpService->projects_image;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class ProjectsImage extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Redacts potentially sensitive info from an image. This method has limits on
|
---|
35 | * input size, processing time, and output size. See
|
---|
36 | * https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-
|
---|
37 | * data-images to learn more. When no InfoTypes or CustomInfoTypes are specified
|
---|
38 | * in this request, the system will automatically choose what detectors to run.
|
---|
39 | * By default this may be all types, but may change over time as detectors are
|
---|
40 | * updated. (image.redact)
|
---|
41 | *
|
---|
42 | * @param string $parent Parent resource name. The format of this value varies
|
---|
43 | * depending on whether you have [specified a processing
|
---|
44 | * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
|
---|
45 | * location): + Projects scope, location specified:
|
---|
46 | * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
|
---|
47 | * specified (defaults to global): `projects/{project_id}` The following example
|
---|
48 | * `parent` string specifies a parent project with the identifier `example-
|
---|
49 | * project`, and specifies the `europe-west3` location for processing data:
|
---|
50 | * parent=projects/example-project/locations/europe-west3
|
---|
51 | * @param GooglePrivacyDlpV2RedactImageRequest $postBody
|
---|
52 | * @param array $optParams Optional parameters.
|
---|
53 | * @return GooglePrivacyDlpV2RedactImageResponse
|
---|
54 | * @throws \Google\Service\Exception
|
---|
55 | */
|
---|
56 | public function redact($parent, GooglePrivacyDlpV2RedactImageRequest $postBody, $optParams = [])
|
---|
57 | {
|
---|
58 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
59 | $params = array_merge($params, $optParams);
|
---|
60 | return $this->call('redact', [$params], GooglePrivacyDlpV2RedactImageResponse::class);
|
---|
61 | }
|
---|
62 | }
|
---|
63 |
|
---|
64 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
65 | class_alias(ProjectsImage::class, 'Google_Service_DLP_Resource_ProjectsImage');
|
---|