diff --git a/packages/google-privacy-dlp/linkinator.config.json b/packages/google-privacy-dlp/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-privacy-dlp/linkinator.config.json +++ b/packages/google-privacy-dlp/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js index a9a38c7b2a2..1609743fa7b 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.activate_job_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js index 6cfeab34a22..b40ab6b7669 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.cancel_dlp_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js index 607a63014bd..2e383d1e30c 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_deidentify_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js index 61593cda9a4..38181d0f06f 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_dlp_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js index ec349da01be..e15f5f3f51f 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_inspect_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js index 307cb91ff8a..41a52f6c8d4 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_job_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js index 119d7c7d94e..b6347744286 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.create_stored_info_type.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js index 664b6966f7b..c74b1d6d481 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.deidentify_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js index 3d261ccb58f..a3cefacc462 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_deidentify_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js index eb3f6721cf8..95626de2c06 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_dlp_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js index a6964419503..32491b9419a 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_inspect_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js index f8e8197c854..13bdcbcb4b0 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_job_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js index ef962af651e..896147e78f8 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.delete_stored_info_type.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js index 0b10c42cb89..4575f5f84f9 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.finish_dlp_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js index 34769a83f11..0319f743347 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_deidentify_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js index 2f4ea7ffa4c..2b66d79c909 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_dlp_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js index edab8b37d2f..4d227030676 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_inspect_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js index 85e5ad053c0..c9ddadf4386 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_job_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js index 110257aebd3..412c49d097e 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.get_stored_info_type.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js index 3907b7e8e96..6c1922f21f7 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js index 045e47ae622..b2c73438baf 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js index e498bb4c00b..5d86ed26aea 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.inspect_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js index d33cd83ed55..96f34d667da 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_deidentify_templates.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js index 7e6e99c9590..b36ccbb1575 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_dlp_jobs.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js index 2c9fe9b98e8..81ca34da153 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_info_types.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js index edbc260abb5..7ce4eaaeffd 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_inspect_templates.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js index a0529bac964..353618f6e20 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_job_triggers.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js index 179e14d5788..83719ffbe9f 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_stored_info_types.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js index 70af805da44..a52edf70e6c 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.redact_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js index d8fe0e31bbb..a6889f0b062 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.reidentify_content.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js index f1d3b6abc23..a873150ed22 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_deidentify_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js index fb9808bcc5a..c3ec03a7763 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_inspect_template.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js index 18286cd3f1d..fc1a0a72c30 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_job_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js index 89613b9c904..fd011481a8b 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.update_stored_info_type.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json new file mode 100644 index 00000000000..ee897ad8156 --- /dev/null +++ b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata.google.privacy.dlp.v2.json @@ -0,0 +1,1671 @@ +{ + "clientLibrary": { + "name": "nodejs-dlp", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.privacy.dlp.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "dlp_v2_generated_DlpService_InspectContent_async", + "title": "DlpService inspectContent Sample", + "origin": "API_DEFINITION", + "description": " Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", + "canonical": true, + "file": "dlp_service.inspect_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InspectContent", + "fullName": "google.privacy.dlp.v2.DlpService.InspectContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "inspect_config", + "type": ".google.privacy.dlp.v2.InspectConfig" + }, + { + "name": "item", + "type": ".google.privacy.dlp.v2.ContentItem" + }, + { + "name": "inspect_template_name", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.InspectContentResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "InspectContent", + "fullName": "google.privacy.dlp.v2.DlpService.InspectContent", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_RedactImage_async", + "title": "DlpService redactImage Sample", + "origin": "API_DEFINITION", + "description": " Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", + "canonical": true, + "file": "dlp_service.redact_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RedactImage", + "fullName": "google.privacy.dlp.v2.DlpService.RedactImage", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + }, + { + "name": "inspect_config", + "type": ".google.privacy.dlp.v2.InspectConfig" + }, + { + "name": "image_redaction_configs", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "include_findings", + "type": "TYPE_BOOL" + }, + { + "name": "byte_item", + "type": ".google.privacy.dlp.v2.ByteContentItem" + } + ], + "resultType": ".google.privacy.dlp.v2.RedactImageResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "RedactImage", + "fullName": "google.privacy.dlp.v2.DlpService.RedactImage", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_DeidentifyContent_async", + "title": "DlpService deidentifyContent Sample", + "origin": "API_DEFINITION", + "description": " De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", + "canonical": true, + "file": "dlp_service.deidentify_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 92, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeidentifyContent", + "fullName": "google.privacy.dlp.v2.DlpService.DeidentifyContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "deidentify_config", + "type": ".google.privacy.dlp.v2.DeidentifyConfig" + }, + { + "name": "inspect_config", + "type": ".google.privacy.dlp.v2.InspectConfig" + }, + { + "name": "item", + "type": ".google.privacy.dlp.v2.ContentItem" + }, + { + "name": "inspect_template_name", + "type": "TYPE_STRING" + }, + { + "name": "deidentify_template_name", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.DeidentifyContentResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "DeidentifyContent", + "fullName": "google.privacy.dlp.v2.DlpService.DeidentifyContent", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ReidentifyContent_async", + "title": "DlpService reidentifyContent Sample", + "origin": "API_DEFINITION", + "description": " Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", + "canonical": true, + "file": "dlp_service.reidentify_content.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 99, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReidentifyContent", + "fullName": "google.privacy.dlp.v2.DlpService.ReidentifyContent", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "reidentify_config", + "type": ".google.privacy.dlp.v2.DeidentifyConfig" + }, + { + "name": "inspect_config", + "type": ".google.privacy.dlp.v2.InspectConfig" + }, + { + "name": "item", + "type": ".google.privacy.dlp.v2.ContentItem" + }, + { + "name": "inspect_template_name", + "type": "TYPE_STRING" + }, + { + "name": "reidentify_template_name", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ReidentifyContentResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ReidentifyContent", + "fullName": "google.privacy.dlp.v2.DlpService.ReidentifyContent", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ListInfoTypes_async", + "title": "DlpService listInfoTypes Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of the sensitive information types that the DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + "canonical": true, + "file": "dlp_service.list_info_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInfoTypes", + "fullName": "google.privacy.dlp.v2.DlpService.ListInfoTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "language_code", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ListInfoTypesResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ListInfoTypes", + "fullName": "google.privacy.dlp.v2.DlpService.ListInfoTypes", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_CreateInspectTemplate_async", + "title": "DlpService createInspectTemplate Sample", + "origin": "API_DEFINITION", + "description": " Creates an InspectTemplate for re-using frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "canonical": true, + "file": "dlp_service.create_inspect_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.CreateInspectTemplate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "inspect_template", + "type": ".google.privacy.dlp.v2.InspectTemplate" + }, + { + "name": "template_id", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.InspectTemplate", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "CreateInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.CreateInspectTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_UpdateInspectTemplate_async", + "title": "DlpService updateInspectTemplate Sample", + "origin": "API_DEFINITION", + "description": " Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "canonical": true, + "file": "dlp_service.update_inspect_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateInspectTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "inspect_template", + "type": ".google.privacy.dlp.v2.InspectTemplate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.privacy.dlp.v2.InspectTemplate", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "UpdateInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateInspectTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_GetInspectTemplate_async", + "title": "DlpService getInspectTemplate Sample", + "origin": "API_DEFINITION", + "description": " Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "canonical": true, + "file": "dlp_service.get_inspect_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.GetInspectTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.InspectTemplate", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "GetInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.GetInspectTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ListInspectTemplates_async", + "title": "DlpService listInspectTemplates Sample", + "origin": "API_DEFINITION", + "description": " Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "canonical": true, + "file": "dlp_service.list_inspect_templates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInspectTemplates", + "fullName": "google.privacy.dlp.v2.DlpService.ListInspectTemplates", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ListInspectTemplatesResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ListInspectTemplates", + "fullName": "google.privacy.dlp.v2.DlpService.ListInspectTemplates", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_DeleteInspectTemplate_async", + "title": "DlpService deleteInspectTemplate Sample", + "origin": "API_DEFINITION", + "description": " Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "canonical": true, + "file": "dlp_service.delete_inspect_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteInspectTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "DeleteInspectTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteInspectTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async", + "title": "DlpService createDeidentifyTemplate Sample", + "origin": "API_DEFINITION", + "description": " Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "canonical": true, + "file": "dlp_service.create_deidentify_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "deidentify_template", + "type": ".google.privacy.dlp.v2.DeidentifyTemplate" + }, + { + "name": "template_id", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.DeidentifyTemplate", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "CreateDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async", + "title": "DlpService updateDeidentifyTemplate Sample", + "origin": "API_DEFINITION", + "description": " Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "canonical": true, + "file": "dlp_service.update_deidentify_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "deidentify_template", + "type": ".google.privacy.dlp.v2.DeidentifyTemplate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.privacy.dlp.v2.DeidentifyTemplate", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "UpdateDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_GetDeidentifyTemplate_async", + "title": "DlpService getDeidentifyTemplate Sample", + "origin": "API_DEFINITION", + "description": " Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "canonical": true, + "file": "dlp_service.get_deidentify_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.GetDeidentifyTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.DeidentifyTemplate", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "GetDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.GetDeidentifyTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ListDeidentifyTemplates_async", + "title": "DlpService listDeidentifyTemplates Sample", + "origin": "API_DEFINITION", + "description": " Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "canonical": true, + "file": "dlp_service.list_deidentify_templates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 90, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDeidentifyTemplates", + "fullName": "google.privacy.dlp.v2.DlpService.ListDeidentifyTemplates", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ListDeidentifyTemplates", + "fullName": "google.privacy.dlp.v2.DlpService.ListDeidentifyTemplates", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async", + "title": "DlpService deleteDeidentifyTemplate Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "canonical": true, + "file": "dlp_service.delete_deidentify_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "DeleteDeidentifyTemplate", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplate", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_CreateJobTrigger_async", + "title": "DlpService createJobTrigger Sample", + "origin": "API_DEFINITION", + "description": " Creates a job trigger to run DLP actions such as scanning storage for sensitive information on a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "canonical": true, + "file": "dlp_service.create_job_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.CreateJobTrigger", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "job_trigger", + "type": ".google.privacy.dlp.v2.JobTrigger" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.JobTrigger", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "CreateJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.CreateJobTrigger", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_UpdateJobTrigger_async", + "title": "DlpService updateJobTrigger Sample", + "origin": "API_DEFINITION", + "description": " Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "canonical": true, + "file": "dlp_service.update_job_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateJobTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "job_trigger", + "type": ".google.privacy.dlp.v2.JobTrigger" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.privacy.dlp.v2.JobTrigger", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "UpdateJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateJobTrigger", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_HybridInspectJobTrigger_async", + "title": "DlpService hybridInspectJobTrigger Sample", + "origin": "API_DEFINITION", + "description": " Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.", + "canonical": true, + "file": "dlp_service.hybrid_inspect_job_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "HybridInspectJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.HybridInspectJobTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "hybrid_item", + "type": ".google.privacy.dlp.v2.HybridContentItem" + } + ], + "resultType": ".google.privacy.dlp.v2.HybridInspectResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "HybridInspectJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.HybridInspectJobTrigger", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_GetJobTrigger_async", + "title": "DlpService getJobTrigger Sample", + "origin": "API_DEFINITION", + "description": " Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "canonical": true, + "file": "dlp_service.get_job_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.GetJobTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.JobTrigger", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "GetJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.GetJobTrigger", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ListJobTriggers_async", + "title": "DlpService listJobTriggers Sample", + "origin": "API_DEFINITION", + "description": " Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "canonical": true, + "file": "dlp_service.list_job_triggers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 114, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListJobTriggers", + "fullName": "google.privacy.dlp.v2.DlpService.ListJobTriggers", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "type", + "type": ".google.privacy.dlp.v2.DlpJobType" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ListJobTriggersResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ListJobTriggers", + "fullName": "google.privacy.dlp.v2.DlpService.ListJobTriggers", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_DeleteJobTrigger_async", + "title": "DlpService deleteJobTrigger Sample", + "origin": "API_DEFINITION", + "description": " Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "canonical": true, + "file": "dlp_service.delete_job_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteJobTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "DeleteJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteJobTrigger", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ActivateJobTrigger_async", + "title": "DlpService activateJobTrigger Sample", + "origin": "API_DEFINITION", + "description": " Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", + "canonical": true, + "file": "dlp_service.activate_job_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ActivateJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.ActivateJobTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.DlpJob", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ActivateJobTrigger", + "fullName": "google.privacy.dlp.v2.DlpService.ActivateJobTrigger", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_CreateDlpJob_async", + "title": "DlpService createDlpJob Sample", + "origin": "API_DEFINITION", + "description": " Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.", + "canonical": true, + "file": "dlp_service.create_dlp_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.CreateDlpJob", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "inspect_job", + "type": ".google.privacy.dlp.v2.InspectJobConfig" + }, + { + "name": "risk_job", + "type": ".google.privacy.dlp.v2.RiskAnalysisJobConfig" + }, + { + "name": "job_id", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.DlpJob", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "CreateDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.CreateDlpJob", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ListDlpJobs_async", + "title": "DlpService listDlpJobs Sample", + "origin": "API_DEFINITION", + "description": " Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + "canonical": true, + "file": "dlp_service.list_dlp_jobs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 114, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDlpJobs", + "fullName": "google.privacy.dlp.v2.DlpService.ListDlpJobs", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "type", + "type": ".google.privacy.dlp.v2.DlpJobType" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ListDlpJobsResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ListDlpJobs", + "fullName": "google.privacy.dlp.v2.DlpService.ListDlpJobs", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_GetDlpJob_async", + "title": "DlpService getDlpJob Sample", + "origin": "API_DEFINITION", + "description": " Gets the latest state of a long-running DlpJob. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + "canonical": true, + "file": "dlp_service.get_dlp_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.GetDlpJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.DlpJob", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "GetDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.GetDlpJob", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_DeleteDlpJob_async", + "title": "DlpService deleteDlpJob Sample", + "origin": "API_DEFINITION", + "description": " Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be cancelled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + "canonical": true, + "file": "dlp_service.delete_dlp_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteDlpJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "DeleteDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteDlpJob", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_CancelDlpJob_async", + "title": "DlpService cancelDlpJob Sample", + "origin": "API_DEFINITION", + "description": " Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to cancel the DlpJob, but success is not guaranteed. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + "canonical": true, + "file": "dlp_service.cancel_dlp_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.CancelDlpJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "CancelDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.CancelDlpJob", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_CreateStoredInfoType_async", + "title": "DlpService createStoredInfoType Sample", + "origin": "API_DEFINITION", + "description": " Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "canonical": true, + "file": "dlp_service.create_stored_info_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.CreateStoredInfoType", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "config", + "type": ".google.privacy.dlp.v2.StoredInfoTypeConfig" + }, + { + "name": "stored_info_type_id", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.StoredInfoType", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "CreateStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.CreateStoredInfoType", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_UpdateStoredInfoType_async", + "title": "DlpService updateStoredInfoType Sample", + "origin": "API_DEFINITION", + "description": " Updates the stored infoType by creating a new version. The existing version will continue to be used until the new version is ready. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "canonical": true, + "file": "dlp_service.update_stored_info_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateStoredInfoType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "config", + "type": ".google.privacy.dlp.v2.StoredInfoTypeConfig" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.privacy.dlp.v2.StoredInfoType", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "UpdateStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.UpdateStoredInfoType", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_GetStoredInfoType_async", + "title": "DlpService getStoredInfoType Sample", + "origin": "API_DEFINITION", + "description": " Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "canonical": true, + "file": "dlp_service.get_stored_info_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.GetStoredInfoType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.StoredInfoType", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "GetStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.GetStoredInfoType", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_ListStoredInfoTypes_async", + "title": "DlpService listStoredInfoTypes Sample", + "origin": "API_DEFINITION", + "description": " Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "canonical": true, + "file": "dlp_service.list_stored_info_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 91, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListStoredInfoTypes", + "fullName": "google.privacy.dlp.v2.DlpService.ListStoredInfoTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "location_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.privacy.dlp.v2.ListStoredInfoTypesResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "ListStoredInfoTypes", + "fullName": "google.privacy.dlp.v2.DlpService.ListStoredInfoTypes", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_DeleteStoredInfoType_async", + "title": "DlpService deleteStoredInfoType Sample", + "origin": "API_DEFINITION", + "description": " Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "canonical": true, + "file": "dlp_service.delete_stored_info_type.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteStoredInfoType", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "DeleteStoredInfoType", + "fullName": "google.privacy.dlp.v2.DlpService.DeleteStoredInfoType", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_HybridInspectDlpJob_async", + "title": "DlpService hybridInspectDlpJob Sample", + "origin": "API_DEFINITION", + "description": " Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.", + "canonical": true, + "file": "dlp_service.hybrid_inspect_dlp_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "HybridInspectDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.HybridInspectDlpJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "hybrid_item", + "type": ".google.privacy.dlp.v2.HybridContentItem" + } + ], + "resultType": ".google.privacy.dlp.v2.HybridInspectResponse", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "HybridInspectDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.HybridInspectDlpJob", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + }, + { + "regionTag": "dlp_v2_generated_DlpService_FinishDlpJob_async", + "title": "DlpService finishDlpJob Sample", + "origin": "API_DEFINITION", + "description": " Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.", + "canonical": true, + "file": "dlp_service.finish_dlp_job.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FinishDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.FinishDlpJob", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DlpServiceClient", + "fullName": "google.privacy.dlp.v2.DlpServiceClient" + }, + "method": { + "shortName": "FinishDlpJob", + "fullName": "google.privacy.dlp.v2.DlpService.FinishDlpJob", + "service": { + "shortName": "DlpService", + "fullName": "google.privacy.dlp.v2.DlpService" + } + } + } + } + ] +} diff --git a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts index e635f178482..2beb3a2f68f 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts @@ -6051,9 +6051,8 @@ export class DlpServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.dlpServiceStub!.then(stub => { + if (this.dlpServiceStub && !this._terminated) { + return this.dlpServiceStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts b/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts index a84f16d84f4..ac95d104e82 100644 --- a/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts +++ b/packages/google-privacy-dlp/test/gapic_dlp_service_v2.ts @@ -151,12 +151,27 @@ describe('v2.DlpServiceClient', () => { assert(client.dlpServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new dlpserviceModule.v2.DlpServiceClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.dlpServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dlpServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -302,6 +317,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes inspectContent with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.inspectContent(request), expectedError); + }); }); describe('redactImage', () => { @@ -413,6 +444,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes redactImage with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.redactImage(request), expectedError); + }); }); describe('deidentifyContent', () => { @@ -524,6 +571,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deidentifyContent with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deidentifyContent(request), expectedError); + }); }); describe('reidentifyContent', () => { @@ -635,6 +698,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes reidentifyContent with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.reidentifyContent(request), expectedError); + }); }); describe('listInfoTypes', () => { @@ -746,6 +825,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes listInfoTypes with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.listInfoTypes(request), expectedError); + }); }); describe('createInspectTemplate', () => { @@ -861,6 +956,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createInspectTemplate(request), + expectedError + ); + }); }); describe('updateInspectTemplate', () => { @@ -976,6 +1090,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateInspectTemplate(request), + expectedError + ); + }); }); describe('getInspectTemplate', () => { @@ -1088,6 +1221,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetInspectTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getInspectTemplate(request), expectedError); + }); }); describe('deleteInspectTemplate', () => { @@ -1203,6 +1352,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteInspectTemplate(request), + expectedError + ); + }); }); describe('createDeidentifyTemplate', () => { @@ -1318,6 +1486,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createDeidentifyTemplate(request), + expectedError + ); + }); }); describe('updateDeidentifyTemplate', () => { @@ -1433,6 +1620,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateDeidentifyTemplate(request), + expectedError + ); + }); }); describe('getDeidentifyTemplate', () => { @@ -1548,6 +1754,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDeidentifyTemplate(request), + expectedError + ); + }); }); describe('deleteDeidentifyTemplate', () => { @@ -1663,6 +1888,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteDeidentifyTemplate(request), + expectedError + ); + }); }); describe('createJobTrigger', () => { @@ -1774,6 +2018,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateJobTriggerRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createJobTrigger(request), expectedError); + }); }); describe('updateJobTrigger', () => { @@ -1885,6 +2145,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateJobTrigger(request), expectedError); + }); }); describe('hybridInspectJobTrigger', () => { @@ -2000,6 +2276,25 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes hybridInspectJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.hybridInspectJobTrigger(request), + expectedError + ); + }); }); describe('getJobTrigger', () => { @@ -2111,6 +2406,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetJobTriggerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getJobTrigger(request), expectedError); + }); }); describe('deleteJobTrigger', () => { @@ -2222,6 +2533,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteJobTrigger(request), expectedError); + }); }); describe('activateJobTrigger', () => { @@ -2334,6 +2661,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes activateJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.activateJobTrigger(request), expectedError); + }); }); describe('createDlpJob', () => { @@ -2445,6 +2788,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDlpJobRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createDlpJob(request), expectedError); + }); }); describe('getDlpJob', () => { @@ -2553,6 +2912,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDlpJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDlpJob(request), expectedError); + }); }); describe('deleteDlpJob', () => { @@ -2664,6 +3039,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDlpJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteDlpJob(request), expectedError); + }); }); describe('cancelDlpJob', () => { @@ -2775,6 +3166,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes cancelDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CancelDlpJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelDlpJob(request), expectedError); + }); }); describe('createStoredInfoType', () => { @@ -2887,6 +3294,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createStoredInfoType(request), expectedError); + }); }); describe('updateStoredInfoType', () => { @@ -2999,6 +3422,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateStoredInfoType(request), expectedError); + }); }); describe('getStoredInfoType', () => { @@ -3110,6 +3549,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getStoredInfoType(request), expectedError); + }); }); describe('deleteStoredInfoType', () => { @@ -3222,6 +3677,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteStoredInfoType(request), expectedError); + }); }); describe('hybridInspectDlpJob', () => { @@ -3334,6 +3805,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes hybridInspectDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.hybridInspectDlpJob(request), expectedError); + }); }); describe('finishDlpJob', () => { @@ -3445,6 +3932,22 @@ describe('v2.DlpServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes finishDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.FinishDlpJobRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.finishDlpJob(request), expectedError); + }); }); describe('listInspectTemplates', () => {