Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

feat: added deidentify replacement dictionaries #296

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions google/cloud/dlp/__init__.py
Expand Up @@ -117,6 +117,7 @@
from google.cloud.dlp_v2.types.dlp import RedactImageResponse
from google.cloud.dlp_v2.types.dlp import ReidentifyContentRequest
from google.cloud.dlp_v2.types.dlp import ReidentifyContentResponse
from google.cloud.dlp_v2.types.dlp import ReplaceDictionaryConfig
from google.cloud.dlp_v2.types.dlp import ReplaceValueConfig
from google.cloud.dlp_v2.types.dlp import ReplaceWithInfoTypeConfig
from google.cloud.dlp_v2.types.dlp import RiskAnalysisJobConfig
Expand Down Expand Up @@ -276,6 +277,7 @@
"RedactImageResponse",
"ReidentifyContentRequest",
"ReidentifyContentResponse",
"ReplaceDictionaryConfig",
"ReplaceValueConfig",
"ReplaceWithInfoTypeConfig",
"RiskAnalysisJobConfig",
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/dlp_v2/__init__.py
Expand Up @@ -117,6 +117,7 @@
from .types.dlp import RedactImageResponse
from .types.dlp import ReidentifyContentRequest
from .types.dlp import ReidentifyContentResponse
from .types.dlp import ReplaceDictionaryConfig
from .types.dlp import ReplaceValueConfig
from .types.dlp import ReplaceWithInfoTypeConfig
from .types.dlp import RiskAnalysisJobConfig
Expand Down Expand Up @@ -303,6 +304,7 @@
"ReidentifyContentRequest",
"ReidentifyContentResponse",
"RelationalOperator",
"ReplaceDictionaryConfig",
"ReplaceValueConfig",
"ReplaceWithInfoTypeConfig",
"RiskAnalysisJobConfig",
Expand Down
24 changes: 7 additions & 17 deletions google/cloud/dlp_v2/services/dlp_service/async_client.py
Expand Up @@ -1716,10 +1716,6 @@ async def hybrid_inspect_job_trigger(
trigger. The inspection will be processed
asynchronously. To review the findings monitor the jobs
within the trigger.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Args:
request (Union[google.cloud.dlp_v2.types.HybridInspectJobTriggerRequest, dict]):
Expand Down Expand Up @@ -2154,15 +2150,16 @@ async def create_dlp_job(
on the ``request`` instance; if ``request`` is provided, this
should not be set.
inspect_job (:class:`google.cloud.dlp_v2.types.InspectJobConfig`):
Set to control what and how to
inspect.
An inspection job scans a storage
repository for InfoTypes.

This corresponds to the ``inspect_job`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
risk_job (:class:`google.cloud.dlp_v2.types.RiskAnalysisJobConfig`):
Set to choose what metric to
calculate.
A risk analysis job calculates re-
dentification risk metrics for a
BigQuery table.

This corresponds to the ``risk_job`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -3036,12 +3033,8 @@ async def hybrid_inspect_dlp_job(
metadata: Sequence[Tuple[str, str]] = (),
) -> dlp.HybridInspectResponse:
r"""Inspect hybrid content and store findings to a job.
To review the findings inspect the job. Inspection will
To review the findings, inspect the job. Inspection will
occur asynchronously.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Args:
request (Union[google.cloud.dlp_v2.types.HybridInspectDlpJobRequest, dict]):
Expand Down Expand Up @@ -3114,10 +3107,7 @@ async def finish_dlp_job(
) -> None:
r"""Finish a running hybrid DlpJob. Triggers the
finalization steps and running of any enabled actions
that have not yet run. Early access feature is in a pre-
release state and might change or have limited support.
For more information, see
https://cloud.google.com/products#product-launch-stages.
that have not yet run.

Args:
request (Union[google.cloud.dlp_v2.types.FinishDlpJobRequest, dict]):
Expand Down
24 changes: 7 additions & 17 deletions google/cloud/dlp_v2/services/dlp_service/client.py
Expand Up @@ -1883,10 +1883,6 @@ def hybrid_inspect_job_trigger(
trigger. The inspection will be processed
asynchronously. To review the findings monitor the jobs
within the trigger.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Args:
request (Union[google.cloud.dlp_v2.types.HybridInspectJobTriggerRequest, dict]):
Expand Down Expand Up @@ -2294,15 +2290,16 @@ def create_dlp_job(
on the ``request`` instance; if ``request`` is provided, this
should not be set.
inspect_job (google.cloud.dlp_v2.types.InspectJobConfig):
Set to control what and how to
inspect.
An inspection job scans a storage
repository for InfoTypes.

This corresponds to the ``inspect_job`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
risk_job (google.cloud.dlp_v2.types.RiskAnalysisJobConfig):
Set to choose what metric to
calculate.
A risk analysis job calculates re-
dentification risk metrics for a
BigQuery table.

This corresponds to the ``risk_job`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -3117,12 +3114,8 @@ def hybrid_inspect_dlp_job(
metadata: Sequence[Tuple[str, str]] = (),
) -> dlp.HybridInspectResponse:
r"""Inspect hybrid content and store findings to a job.
To review the findings inspect the job. Inspection will
To review the findings, inspect the job. Inspection will
occur asynchronously.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Args:
request (Union[google.cloud.dlp_v2.types.HybridInspectDlpJobRequest, dict]):
Expand Down Expand Up @@ -3195,10 +3188,7 @@ def finish_dlp_job(
) -> None:
r"""Finish a running hybrid DlpJob. Triggers the
finalization steps and running of any enabled actions
that have not yet run. Early access feature is in a pre-
release state and might change or have limited support.
For more information, see
https://cloud.google.com/products#product-launch-stages.
that have not yet run.

Args:
request (Union[google.cloud.dlp_v2.types.FinishDlpJobRequest, dict]):
Expand Down
15 changes: 2 additions & 13 deletions google/cloud/dlp_v2/services/dlp_service/transports/grpc.py
Expand Up @@ -749,10 +749,6 @@ def hybrid_inspect_job_trigger(
trigger. The inspection will be processed
asynchronously. To review the findings monitor the jobs
within the trigger.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Returns:
Callable[[~.HybridInspectJobTriggerRequest],
Expand Down Expand Up @@ -1179,12 +1175,8 @@ def hybrid_inspect_dlp_job(
r"""Return a callable for the hybrid inspect dlp job method over gRPC.

Inspect hybrid content and store findings to a job.
To review the findings inspect the job. Inspection will
To review the findings, inspect the job. Inspection will
occur asynchronously.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Returns:
Callable[[~.HybridInspectDlpJobRequest],
Expand All @@ -1210,10 +1202,7 @@ def finish_dlp_job(self) -> Callable[[dlp.FinishDlpJobRequest], empty_pb2.Empty]

Finish a running hybrid DlpJob. Triggers the
finalization steps and running of any enabled actions
that have not yet run. Early access feature is in a pre-
release state and might change or have limited support.
For more information, see
https://cloud.google.com/products#product-launch-stages.
that have not yet run.

Returns:
Callable[[~.FinishDlpJobRequest],
Expand Down
Expand Up @@ -766,10 +766,6 @@ def hybrid_inspect_job_trigger(
trigger. The inspection will be processed
asynchronously. To review the findings monitor the jobs
within the trigger.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Returns:
Callable[[~.HybridInspectJobTriggerRequest],
Expand Down Expand Up @@ -1208,12 +1204,8 @@ def hybrid_inspect_dlp_job(
r"""Return a callable for the hybrid inspect dlp job method over gRPC.

Inspect hybrid content and store findings to a job.
To review the findings inspect the job. Inspection will
To review the findings, inspect the job. Inspection will
occur asynchronously.
Early access feature is in a pre-release state and might
change or have limited support. For more information,
see
https://cloud.google.com/products#product-launch-stages.

Returns:
Callable[[~.HybridInspectDlpJobRequest],
Expand Down Expand Up @@ -1241,10 +1233,7 @@ def finish_dlp_job(

Finish a running hybrid DlpJob. Triggers the
finalization steps and running of any enabled actions
that have not yet run. Early access feature is in a pre-
release state and might change or have limited support.
For more information, see
https://cloud.google.com/products#product-launch-stages.
that have not yet run.

Returns:
Callable[[~.FinishDlpJobRequest],
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/dlp_v2/types/__init__.py
Expand Up @@ -114,6 +114,7 @@
RedactImageResponse,
ReidentifyContentRequest,
ReidentifyContentResponse,
ReplaceDictionaryConfig,
ReplaceValueConfig,
ReplaceWithInfoTypeConfig,
RiskAnalysisJobConfig,
Expand Down Expand Up @@ -274,6 +275,7 @@
"RedactImageResponse",
"ReidentifyContentRequest",
"ReidentifyContentResponse",
"ReplaceDictionaryConfig",
"ReplaceValueConfig",
"ReplaceWithInfoTypeConfig",
"RiskAnalysisJobConfig",
Expand Down