From d92bc04fa1a1b3df512505fa7308201188fdbfa9 Mon Sep 17 00:00:00 2001 From: michaelbausor Date: Wed, 11 Apr 2018 07:40:22 -0700 Subject: [PATCH] Refresh Dlp (#1001) * Refresh Dlp * Revert oneof documentation * Fix missing * --- Dlp/src/V2/Gapic/DlpServiceGapicClient.php | 42 ++++----- .../dlp_service_rest_client_config.php | 89 +++++++++++++++++++ 2 files changed, 111 insertions(+), 20 deletions(-) diff --git a/Dlp/src/V2/Gapic/DlpServiceGapicClient.php b/Dlp/src/V2/Gapic/DlpServiceGapicClient.php index d5571fdd645d..42a8997f605b 100644 --- a/Dlp/src/V2/Gapic/DlpServiceGapicClient.php +++ b/Dlp/src/V2/Gapic/DlpServiceGapicClient.php @@ -90,7 +90,7 @@ use Grpc\ChannelCredentials; /** - * Service Description: The DLP API is a service that allows clients + * Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients * to detect the presence of Personally Identifiable Information (PII) and other * privacy-sensitive data in user-supplied, unstructured data streams, like text * blocks or images. @@ -480,7 +480,7 @@ public static function parseName($formattedName, $template = null) * @type CredentialsLoader $credentialsLoader * A CredentialsLoader object created using the Google\Auth library. * @type string[] $scopes A string array of scopes to use when acquiring credentials. - * Defaults to the scopes for the DLP API. + * Defaults to the scopes for the Cloud Data Loss Prevention (DLP) API. * @type string $clientConfigPath * Path to a JSON file containing client method configuration, including retry settings. * Specify this setting to specify the retry behavior of all methods on the client. @@ -722,7 +722,7 @@ public function deidentifyContent($parent, $optionalArgs = []) } /** - * Re-identify content that has been de-identified. + * Re-identifies content that has been de-identified. * * Sample code: * ``` @@ -807,7 +807,9 @@ public function reidentifyContent($parent, $optionalArgs = []) } /** - * Returns sensitive information types DLP supports. + * Returns a list of the sensitive information types that the DLP API + * supports. For more information, see [Listing supported predefined + * infoTypes](https://cloud.google.com/dlp/docs/listing-infotypes). * * Sample code: * ``` @@ -861,7 +863,7 @@ public function listInfoTypes($optionalArgs = []) } /** - * Creates an inspect template for re-using frequently used configuration + * Creates an InspectTemplate for re-using frequently used configuration * for inspecting content, images, and storage. * * Sample code: @@ -919,7 +921,7 @@ public function createInspectTemplate($parent, $optionalArgs = []) } /** - * Updates the inspect template. + * Updates the InspectTemplate. * * Sample code: * ``` @@ -974,7 +976,7 @@ public function updateInspectTemplate($name, $optionalArgs = []) } /** - * Gets an inspect template. + * Gets an InspectTemplate. * * Sample code: * ``` @@ -1022,7 +1024,7 @@ public function getInspectTemplate($optionalArgs = []) } /** - * Lists inspect templates. + * Lists InspectTemplates. * * Sample code: * ``` @@ -1093,7 +1095,7 @@ public function listInspectTemplates($parent, $optionalArgs = []) } /** - * Deletes inspect templates. + * Deletes an InspectTemplate. * * Sample code: * ``` @@ -1136,8 +1138,8 @@ public function deleteInspectTemplate($name, $optionalArgs = []) } /** - * Creates an Deidentify template for re-using frequently used configuration - * for Deidentifying content, images, and storage. + * Creates a DeidentifyTemplate for re-using frequently used configuration + * for de-identifying content, images, and storage. * * Sample code: * ``` @@ -1194,7 +1196,7 @@ public function createDeidentifyTemplate($parent, $optionalArgs = []) } /** - * Updates the inspect template. + * Updates the DeidentifyTemplate. * * Sample code: * ``` @@ -1249,7 +1251,7 @@ public function updateDeidentifyTemplate($name, $optionalArgs = []) } /** - * Gets an inspect template. + * Gets a DeidentifyTemplate. * * Sample code: * ``` @@ -1294,7 +1296,7 @@ public function getDeidentifyTemplate($name, $optionalArgs = []) } /** - * Lists inspect templates. + * Lists DeidentifyTemplates. * * Sample code: * ``` @@ -1365,7 +1367,7 @@ public function listDeidentifyTemplates($parent, $optionalArgs = []) } /** - * Deletes inspect templates. + * Deletes a DeidentifyTemplate. * * Sample code: * ``` @@ -1408,8 +1410,8 @@ public function deleteDeidentifyTemplate($name, $optionalArgs = []) } /** - * Create a new job to inspect storage or calculate risk metrics [How-to - * guide](https://cloud.google.com/dlp/docs/compute-risk-analysis). + * Creates a new job to inspect storage or calculate risk metrics. + * [How-to guide](https://cloud.google.com/dlp/docs/compute-risk-analysis). * * Sample code: * ``` @@ -1661,7 +1663,7 @@ public function deleteDlpJob($name, $optionalArgs = []) } /** - * Starts asynchronous cancellation on a long-running DlpJob. The server + * Starts asynchronous cancellation on a long-running DlpJob. The server * makes a best effort to cancel the DlpJob, but success is not * guaranteed. * @@ -1931,8 +1933,8 @@ public function updateJobTrigger($name, $optionalArgs = []) } /** - * Creates a job to run DLP actions such as scanning storage for sensitive - * information on a set schedule. + * Creates a job trigger to run DLP actions such as scanning storage for + * sensitive information on a set schedule. * * Sample code: * ``` diff --git a/Dlp/src/V2/resources/dlp_service_rest_client_config.php b/Dlp/src/V2/resources/dlp_service_rest_client_config.php index fb05cf570589..f6b27fde38a4 100644 --- a/Dlp/src/V2/resources/dlp_service_rest_client_config.php +++ b/Dlp/src/V2/resources/dlp_service_rest_client_config.php @@ -2,6 +2,95 @@ return [ 'interfaces' => [ + 'google.longrunning.Operations' => [ + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=inspect/operations}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta1/{name=inspect/operations}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=inspect/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta1/{name=inspect/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=inspect/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta1/{name=inspect/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=inspect/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta1/{name=inspect/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta1/{name=riskAnalysis/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], 'google.privacy.dlp.v2.DlpService' => [ 'InspectContent' => [ 'method' => 'post',