Skip to content

Commit a5c1f7f

Browse files
feat: add Deidentify action (#438)
* feat: add Deidentify action PiperOrigin-RevId: 471923438 Source-Link: googleapis/googleapis@62995d0 Source-Link: googleapis/googleapis-gen@96ba173 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTZiYTE3MzFjNzEyYTY5Mzk5NWRlNzUzNzg5NDg3ODFhZjI4MzczOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 0162465 commit a5c1f7f

File tree

9 files changed

+891
-178
lines changed

9 files changed

+891
-178
lines changed

packages/google-cloud-dlp/google/cloud/dlp/__init__.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
HybridInspectResponse,
8282
HybridInspectStatistics,
8383
ImageLocation,
84+
ImageTransformations,
8485
InfoTypeCategory,
8586
InfoTypeDescription,
8687
InfoTypeStats,
@@ -128,6 +129,7 @@
128129
RecordCondition,
129130
RecordLocation,
130131
RecordSuppression,
132+
RecordTransformation,
131133
RecordTransformations,
132134
RedactConfig,
133135
RedactImageRequest,
@@ -141,7 +143,6 @@
141143
ResourceVisibility,
142144
RiskAnalysisJobConfig,
143145
Schedule,
144-
SensitivityScore,
145146
StatisticalTable,
146147
StorageMetadataLabel,
147148
StoredInfoType,
@@ -153,9 +154,18 @@
153154
TableDataProfile,
154155
TableLocation,
155156
TimePartConfig,
157+
TransformationConfig,
158+
TransformationContainerType,
159+
TransformationDescription,
160+
TransformationDetails,
161+
TransformationDetailsStorageConfig,
156162
TransformationErrorHandling,
163+
TransformationLocation,
157164
TransformationOverview,
165+
TransformationResultStatus,
166+
TransformationResultStatusType,
158167
TransformationSummary,
168+
TransformationType,
159169
TransientCryptoKey,
160170
UnwrappedCryptoKey,
161171
UpdateDeidentifyTemplateRequest,
@@ -164,6 +174,7 @@
164174
UpdateStoredInfoTypeRequest,
165175
Value,
166176
ValueFrequency,
177+
VersionDescription,
167178
)
168179
from google.cloud.dlp_v2.types.storage import (
169180
BigQueryField,
@@ -187,6 +198,7 @@
187198
Likelihood,
188199
PartitionId,
189200
RecordKey,
201+
SensitivityScore,
190202
StorageConfig,
191203
StoredType,
192204
TableOptions,
@@ -256,6 +268,7 @@
256268
"HybridInspectResponse",
257269
"HybridInspectStatistics",
258270
"ImageLocation",
271+
"ImageTransformations",
259272
"InfoTypeCategory",
260273
"InfoTypeDescription",
261274
"InfoTypeStats",
@@ -300,6 +313,7 @@
300313
"RecordCondition",
301314
"RecordLocation",
302315
"RecordSuppression",
316+
"RecordTransformation",
303317
"RecordTransformations",
304318
"RedactConfig",
305319
"RedactImageRequest",
@@ -311,7 +325,6 @@
311325
"ReplaceWithInfoTypeConfig",
312326
"RiskAnalysisJobConfig",
313327
"Schedule",
314-
"SensitivityScore",
315328
"StatisticalTable",
316329
"StorageMetadataLabel",
317330
"StoredInfoType",
@@ -322,8 +335,14 @@
322335
"TableDataProfile",
323336
"TableLocation",
324337
"TimePartConfig",
338+
"TransformationConfig",
339+
"TransformationDescription",
340+
"TransformationDetails",
341+
"TransformationDetailsStorageConfig",
325342
"TransformationErrorHandling",
343+
"TransformationLocation",
326344
"TransformationOverview",
345+
"TransformationResultStatus",
327346
"TransformationSummary",
328347
"TransientCryptoKey",
329348
"UnwrappedCryptoKey",
@@ -333,6 +352,7 @@
333352
"UpdateStoredInfoTypeRequest",
334353
"Value",
335354
"ValueFrequency",
355+
"VersionDescription",
336356
"ContentOption",
337357
"DlpJobType",
338358
"EncryptionStatus",
@@ -342,6 +362,9 @@
342362
"RelationalOperator",
343363
"ResourceVisibility",
344364
"StoredInfoTypeState",
365+
"TransformationContainerType",
366+
"TransformationResultStatusType",
367+
"TransformationType",
345368
"BigQueryField",
346369
"BigQueryKey",
347370
"BigQueryOptions",
@@ -361,6 +384,7 @@
361384
"KindExpression",
362385
"PartitionId",
363386
"RecordKey",
387+
"SensitivityScore",
364388
"StorageConfig",
365389
"StoredType",
366390
"TableOptions",

packages/google-cloud-dlp/google/cloud/dlp_v2/__init__.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
HybridInspectResponse,
8181
HybridInspectStatistics,
8282
ImageLocation,
83+
ImageTransformations,
8384
InfoTypeCategory,
8485
InfoTypeDescription,
8586
InfoTypeStats,
@@ -127,6 +128,7 @@
127128
RecordCondition,
128129
RecordLocation,
129130
RecordSuppression,
131+
RecordTransformation,
130132
RecordTransformations,
131133
RedactConfig,
132134
RedactImageRequest,
@@ -140,7 +142,6 @@
140142
ResourceVisibility,
141143
RiskAnalysisJobConfig,
142144
Schedule,
143-
SensitivityScore,
144145
StatisticalTable,
145146
StorageMetadataLabel,
146147
StoredInfoType,
@@ -152,9 +153,18 @@
152153
TableDataProfile,
153154
TableLocation,
154155
TimePartConfig,
156+
TransformationConfig,
157+
TransformationContainerType,
158+
TransformationDescription,
159+
TransformationDetails,
160+
TransformationDetailsStorageConfig,
155161
TransformationErrorHandling,
162+
TransformationLocation,
156163
TransformationOverview,
164+
TransformationResultStatus,
165+
TransformationResultStatusType,
157166
TransformationSummary,
167+
TransformationType,
158168
TransientCryptoKey,
159169
UnwrappedCryptoKey,
160170
UpdateDeidentifyTemplateRequest,
@@ -163,6 +173,7 @@
163173
UpdateStoredInfoTypeRequest,
164174
Value,
165175
ValueFrequency,
176+
VersionDescription,
166177
)
167178
from .types.storage import (
168179
BigQueryField,
@@ -186,6 +197,7 @@
186197
Likelihood,
187198
PartitionId,
188199
RecordKey,
200+
SensitivityScore,
189201
StorageConfig,
190202
StoredType,
191203
TableOptions,
@@ -273,6 +285,7 @@
273285
"HybridInspectStatistics",
274286
"HybridOptions",
275287
"ImageLocation",
288+
"ImageTransformations",
276289
"InfoType",
277290
"InfoTypeCategory",
278291
"InfoTypeDescription",
@@ -326,6 +339,7 @@
326339
"RecordKey",
327340
"RecordLocation",
328341
"RecordSuppression",
342+
"RecordTransformation",
329343
"RecordTransformations",
330344
"RedactConfig",
331345
"RedactImageRequest",
@@ -354,9 +368,18 @@
354368
"TableLocation",
355369
"TableOptions",
356370
"TimePartConfig",
371+
"TransformationConfig",
372+
"TransformationContainerType",
373+
"TransformationDescription",
374+
"TransformationDetails",
375+
"TransformationDetailsStorageConfig",
357376
"TransformationErrorHandling",
377+
"TransformationLocation",
358378
"TransformationOverview",
379+
"TransformationResultStatus",
380+
"TransformationResultStatusType",
359381
"TransformationSummary",
382+
"TransformationType",
360383
"TransientCryptoKey",
361384
"UnwrappedCryptoKey",
362385
"UpdateDeidentifyTemplateRequest",
@@ -365,4 +388,5 @@
365388
"UpdateStoredInfoTypeRequest",
366389
"Value",
367390
"ValueFrequency",
391+
"VersionDescription",
368392
)

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/async_client.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ async def sample_deidentify_content():
446446
447447
Args:
448448
request (Union[google.cloud.dlp_v2.types.DeidentifyContentRequest, dict]):
449-
The request object. Request to de-identify a list of
450-
items.
449+
The request object. Request to de-identify a
450+
ContentItem.
451451
retry (google.api_core.retry.Retry): Designation of what errors, if any,
452452
should be retried.
453453
timeout (float): The timeout for this request.
@@ -540,7 +540,7 @@ async def sample_reidentify_content():
540540
541541
Returns:
542542
google.cloud.dlp_v2.types.ReidentifyContentResponse:
543-
Results of re-identifying a item.
543+
Results of re-identifying an item.
544544
"""
545545
# Create or coerce a protobuf request object.
546546
request = dlp.ReidentifyContentRequest(request)
@@ -590,7 +590,7 @@ async def list_info_types(
590590
metadata: Sequence[Tuple[str, str]] = (),
591591
) -> dlp.ListInfoTypesResponse:
592592
r"""Returns a list of the sensitive information types
593-
that the DLP API supports. See
593+
that DLP API supports. See
594594
https://cloud.google.com/dlp/docs/infotypes-reference to
595595
learn more.
596596
@@ -695,7 +695,7 @@ async def create_inspect_template(
695695
timeout: float = None,
696696
metadata: Sequence[Tuple[str, str]] = (),
697697
) -> dlp.InspectTemplate:
698-
r"""Creates an InspectTemplate for re-using frequently
698+
r"""Creates an InspectTemplate for reusing frequently
699699
used configuration for inspecting content, images, and
700700
storage. See
701701
https://cloud.google.com/dlp/docs/creating-templates to
@@ -1306,7 +1306,7 @@ async def create_deidentify_template(
13061306
timeout: float = None,
13071307
metadata: Sequence[Tuple[str, str]] = (),
13081308
) -> dlp.DeidentifyTemplate:
1309-
r"""Creates a DeidentifyTemplate for re-using frequently
1309+
r"""Creates a DeidentifyTemplate for reusing frequently
13101310
used configuration for de-identifying content, images,
13111311
and storage. See
13121312
https://cloud.google.com/dlp/docs/creating-templates-deid
@@ -3073,7 +3073,7 @@ async def delete_dlp_job(
30733073
) -> None:
30743074
r"""Deletes a long-running DlpJob. This method indicates
30753075
that the client is no longer interested in the DlpJob
3076-
result. The job will be cancelled if possible.
3076+
result. The job will be canceled if possible.
30773077
See https://cloud.google.com/dlp/docs/inspecting-storage
30783078
and
30793079
https://cloud.google.com/dlp/docs/compute-risk-analysis
@@ -3644,10 +3644,6 @@ async def sample_list_stored_info_types():
36443644
``projects/``\ PROJECT_ID\ ``/locations/``\ LOCATION_ID
36453645
- Projects scope, no location specified (defaults to
36463646
global): ``projects/``\ PROJECT_ID
3647-
- Organizations scope, location specified:
3648-
``organizations/``\ ORG_ID\ ``/locations/``\ LOCATION_ID
3649-
- Organizations scope, no location specified (defaults
3650-
to global): ``organizations/``\ ORG_ID
36513647
36523648
The following example ``parent`` string specifies a
36533649
parent project with the identifier ``example-project``,

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/client.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ def sample_deidentify_content():
752752
753753
Args:
754754
request (Union[google.cloud.dlp_v2.types.DeidentifyContentRequest, dict]):
755-
The request object. Request to de-identify a list of
756-
items.
755+
The request object. Request to de-identify a
756+
ContentItem.
757757
retry (google.api_core.retry.Retry): Designation of what errors, if any,
758758
should be retried.
759759
timeout (float): The timeout for this request.
@@ -837,7 +837,7 @@ def sample_reidentify_content():
837837
838838
Returns:
839839
google.cloud.dlp_v2.types.ReidentifyContentResponse:
840-
Results of re-identifying a item.
840+
Results of re-identifying an item.
841841
"""
842842
# Create or coerce a protobuf request object.
843843
# Minor optimization to avoid making a copy if the user passes
@@ -878,7 +878,7 @@ def list_info_types(
878878
metadata: Sequence[Tuple[str, str]] = (),
879879
) -> dlp.ListInfoTypesResponse:
880880
r"""Returns a list of the sensitive information types
881-
that the DLP API supports. See
881+
that DLP API supports. See
882882
https://cloud.google.com/dlp/docs/infotypes-reference to
883883
learn more.
884884
@@ -973,7 +973,7 @@ def create_inspect_template(
973973
timeout: float = None,
974974
metadata: Sequence[Tuple[str, str]] = (),
975975
) -> dlp.InspectTemplate:
976-
r"""Creates an InspectTemplate for re-using frequently
976+
r"""Creates an InspectTemplate for reusing frequently
977977
used configuration for inspecting content, images, and
978978
storage. See
979979
https://cloud.google.com/dlp/docs/creating-templates to
@@ -1554,7 +1554,7 @@ def create_deidentify_template(
15541554
timeout: float = None,
15551555
metadata: Sequence[Tuple[str, str]] = (),
15561556
) -> dlp.DeidentifyTemplate:
1557-
r"""Creates a DeidentifyTemplate for re-using frequently
1557+
r"""Creates a DeidentifyTemplate for reusing frequently
15581558
used configuration for de-identifying content, images,
15591559
and storage. See
15601560
https://cloud.google.com/dlp/docs/creating-templates-deid
@@ -3252,7 +3252,7 @@ def delete_dlp_job(
32523252
) -> None:
32533253
r"""Deletes a long-running DlpJob. This method indicates
32543254
that the client is no longer interested in the DlpJob
3255-
result. The job will be cancelled if possible.
3255+
result. The job will be canceled if possible.
32563256
See https://cloud.google.com/dlp/docs/inspecting-storage
32573257
and
32583258
https://cloud.google.com/dlp/docs/compute-risk-analysis
@@ -3804,10 +3804,6 @@ def sample_list_stored_info_types():
38043804
``projects/``\ PROJECT_ID\ ``/locations/``\ LOCATION_ID
38053805
- Projects scope, no location specified (defaults to
38063806
global): ``projects/``\ PROJECT_ID
3807-
- Organizations scope, location specified:
3808-
``organizations/``\ ORG_ID\ ``/locations/``\ LOCATION_ID
3809-
- Organizations scope, no location specified (defaults
3810-
to global): ``organizations/``\ ORG_ID
38113807
38123808
The following example ``parent`` string specifies a
38133809
parent project with the identifier ``example-project``,

packages/google-cloud-dlp/google/cloud/dlp_v2/services/dlp_service/transports/grpc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def list_info_types(
378378
r"""Return a callable for the list info types method over gRPC.
379379
380380
Returns a list of the sensitive information types
381-
that the DLP API supports. See
381+
that DLP API supports. See
382382
https://cloud.google.com/dlp/docs/infotypes-reference to
383383
learn more.
384384
@@ -406,7 +406,7 @@ def create_inspect_template(
406406
) -> Callable[[dlp.CreateInspectTemplateRequest], dlp.InspectTemplate]:
407407
r"""Return a callable for the create inspect template method over gRPC.
408408
409-
Creates an InspectTemplate for re-using frequently
409+
Creates an InspectTemplate for reusing frequently
410410
used configuration for inspecting content, images, and
411411
storage. See
412412
https://cloud.google.com/dlp/docs/creating-templates to
@@ -548,7 +548,7 @@ def create_deidentify_template(
548548
) -> Callable[[dlp.CreateDeidentifyTemplateRequest], dlp.DeidentifyTemplate]:
549549
r"""Return a callable for the create deidentify template method over gRPC.
550550
551-
Creates a DeidentifyTemplate for re-using frequently
551+
Creates a DeidentifyTemplate for reusing frequently
552552
used configuration for de-identifying content, images,
553553
and storage. See
554554
https://cloud.google.com/dlp/docs/creating-templates-deid
@@ -987,7 +987,7 @@ def delete_dlp_job(self) -> Callable[[dlp.DeleteDlpJobRequest], empty_pb2.Empty]
987987
988988
Deletes a long-running DlpJob. This method indicates
989989
that the client is no longer interested in the DlpJob
990-
result. The job will be cancelled if possible.
990+
result. The job will be canceled if possible.
991991
See https://cloud.google.com/dlp/docs/inspecting-storage
992992
and
993993
https://cloud.google.com/dlp/docs/compute-risk-analysis

0 commit comments

Comments
 (0)