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\GooglePrivacyDlpV2RedactImageRequest; 21use 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->image; 29 * </code> 30 */ 31class ProjectsLocationsImage 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/dlp/docs/redacting-sensitive-data-images to learn 37 * more. When no InfoTypes or CustomInfoTypes are specified in this request, the 38 * system will automatically choose what detectors to run. By default this may 39 * be all types, but may change over time as detectors are updated. 40 * (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/dlp/docs/specifying-location): + Projects 45 * scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + 46 * Projects scope, no location specified (defaults to global): 47 * `projects/`PROJECT_ID The following example `parent` string specifies a 48 * parent project with the identifier `example-project`, and specifies the 49 * `europe-west3` location for processing data: parent=projects/example- 50 * project/locations/europe-west3 51 * @param GooglePrivacyDlpV2RedactImageRequest $postBody 52 * @param array $optParams Optional parameters. 53 * @return GooglePrivacyDlpV2RedactImageResponse 54 */ 55 public function redact($parent, GooglePrivacyDlpV2RedactImageRequest $postBody, $optParams = []) 56 { 57 $params = ['parent' => $parent, 'postBody' => $postBody]; 58 $params = array_merge($params, $optParams); 59 return $this->call('redact', [$params], GooglePrivacyDlpV2RedactImageResponse::class); 60 } 61} 62 63// Adding a class alias for backwards compatibility with the previous class name. 64class_alias(ProjectsLocationsImage::class, 'Google_Service_DLP_Resource_ProjectsLocationsImage'); 65