[e3d4e0a] | 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\GooglePrivacyDlpV2DeidentifyContentRequest;
|
---|
| 21 | use Google\Service\DLP\GooglePrivacyDlpV2DeidentifyContentResponse;
|
---|
| 22 | use Google\Service\DLP\GooglePrivacyDlpV2InspectContentRequest;
|
---|
| 23 | use Google\Service\DLP\GooglePrivacyDlpV2InspectContentResponse;
|
---|
| 24 | use Google\Service\DLP\GooglePrivacyDlpV2ReidentifyContentRequest;
|
---|
| 25 | use Google\Service\DLP\GooglePrivacyDlpV2ReidentifyContentResponse;
|
---|
| 26 |
|
---|
| 27 | /**
|
---|
| 28 | * The "content" collection of methods.
|
---|
| 29 | * Typical usage is:
|
---|
| 30 | * <code>
|
---|
| 31 | * $dlpService = new Google\Service\DLP(...);
|
---|
| 32 | * $content = $dlpService->projects_content;
|
---|
| 33 | * </code>
|
---|
| 34 | */
|
---|
| 35 | class ProjectsContent extends \Google\Service\Resource
|
---|
| 36 | {
|
---|
| 37 | /**
|
---|
| 38 | * De-identifies potentially sensitive info from a ContentItem. This method has
|
---|
| 39 | * limits on input size and output size. See https://cloud.google.com/sensitive-
|
---|
| 40 | * data-protection/docs/deidentify-sensitive-data to learn more. When no
|
---|
| 41 | * InfoTypes or CustomInfoTypes are specified in this request, the system will
|
---|
| 42 | * automatically choose what detectors to run. By default this may be all types,
|
---|
| 43 | * but may change over time as detectors are updated. (content.deidentify)
|
---|
| 44 | *
|
---|
| 45 | * @param string $parent Parent resource name. The format of this value varies
|
---|
| 46 | * depending on whether you have [specified a processing
|
---|
| 47 | * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
|
---|
| 48 | * location): + Projects scope, location specified:
|
---|
| 49 | * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
|
---|
| 50 | * specified (defaults to global): `projects/{project_id}` The following example
|
---|
| 51 | * `parent` string specifies a parent project with the identifier `example-
|
---|
| 52 | * project`, and specifies the `europe-west3` location for processing data:
|
---|
| 53 | * parent=projects/example-project/locations/europe-west3
|
---|
| 54 | * @param GooglePrivacyDlpV2DeidentifyContentRequest $postBody
|
---|
| 55 | * @param array $optParams Optional parameters.
|
---|
| 56 | * @return GooglePrivacyDlpV2DeidentifyContentResponse
|
---|
| 57 | * @throws \Google\Service\Exception
|
---|
| 58 | */
|
---|
| 59 | public function deidentify($parent, GooglePrivacyDlpV2DeidentifyContentRequest $postBody, $optParams = [])
|
---|
| 60 | {
|
---|
| 61 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 62 | $params = array_merge($params, $optParams);
|
---|
| 63 | return $this->call('deidentify', [$params], GooglePrivacyDlpV2DeidentifyContentResponse::class);
|
---|
| 64 | }
|
---|
| 65 | /**
|
---|
| 66 | * Finds potentially sensitive info in content. This method has limits on input
|
---|
| 67 | * size, processing time, and output size. When no InfoTypes or CustomInfoTypes
|
---|
| 68 | * are specified in this request, the system will automatically choose what
|
---|
| 69 | * detectors to run. By default this may be all types, but may change over time
|
---|
| 70 | * as detectors are updated. For how to guides, see
|
---|
| 71 | * https://cloud.google.com/sensitive-data-protection/docs/inspecting-images and
|
---|
| 72 | * https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,
|
---|
| 73 | * (content.inspect)
|
---|
| 74 | *
|
---|
| 75 | * @param string $parent Parent resource name. The format of this value varies
|
---|
| 76 | * depending on whether you have [specified a processing
|
---|
| 77 | * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
|
---|
| 78 | * location): + Projects scope, location specified:
|
---|
| 79 | * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
|
---|
| 80 | * specified (defaults to global): `projects/{project_id}` The following example
|
---|
| 81 | * `parent` string specifies a parent project with the identifier `example-
|
---|
| 82 | * project`, and specifies the `europe-west3` location for processing data:
|
---|
| 83 | * parent=projects/example-project/locations/europe-west3
|
---|
| 84 | * @param GooglePrivacyDlpV2InspectContentRequest $postBody
|
---|
| 85 | * @param array $optParams Optional parameters.
|
---|
| 86 | * @return GooglePrivacyDlpV2InspectContentResponse
|
---|
| 87 | * @throws \Google\Service\Exception
|
---|
| 88 | */
|
---|
| 89 | public function inspect($parent, GooglePrivacyDlpV2InspectContentRequest $postBody, $optParams = [])
|
---|
| 90 | {
|
---|
| 91 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 92 | $params = array_merge($params, $optParams);
|
---|
| 93 | return $this->call('inspect', [$params], GooglePrivacyDlpV2InspectContentResponse::class);
|
---|
| 94 | }
|
---|
| 95 | /**
|
---|
| 96 | * Re-identifies content that has been de-identified. See
|
---|
| 97 | * https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-
|
---|
| 98 | * identification_in_free_text_code_example to learn more. (content.reidentify)
|
---|
| 99 | *
|
---|
| 100 | * @param string $parent Required. Parent resource name. The format of this
|
---|
| 101 | * value varies depending on whether you have [specified a processing
|
---|
| 102 | * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-
|
---|
| 103 | * location): + Projects scope, location specified:
|
---|
| 104 | * `projects/{project_id}/locations/{location_id}` + Projects scope, no location
|
---|
| 105 | * specified (defaults to global): `projects/{project_id}` The following example
|
---|
| 106 | * `parent` string specifies a parent project with the identifier `example-
|
---|
| 107 | * project`, and specifies the `europe-west3` location for processing data:
|
---|
| 108 | * parent=projects/example-project/locations/europe-west3
|
---|
| 109 | * @param GooglePrivacyDlpV2ReidentifyContentRequest $postBody
|
---|
| 110 | * @param array $optParams Optional parameters.
|
---|
| 111 | * @return GooglePrivacyDlpV2ReidentifyContentResponse
|
---|
| 112 | * @throws \Google\Service\Exception
|
---|
| 113 | */
|
---|
| 114 | public function reidentify($parent, GooglePrivacyDlpV2ReidentifyContentRequest $postBody, $optParams = [])
|
---|
| 115 | {
|
---|
| 116 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 117 | $params = array_merge($params, $optParams);
|
---|
| 118 | return $this->call('reidentify', [$params], GooglePrivacyDlpV2ReidentifyContentResponse::class);
|
---|
| 119 | }
|
---|
| 120 | }
|
---|
| 121 |
|
---|
| 122 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 123 | class_alias(ProjectsContent::class, 'Google_Service_DLP_Resource_ProjectsContent');
|
---|