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

Commit

Permalink
feat: add support for hybrid jobs (via synth) (#10)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈


<details><summary>Log from Synthtool</summary>

```
2020-03-17 05:17:27,891 synthtool > Executing /tmpfs/src/git/autosynth/working_repo/synth.py.
2020-03-17 05:17:27,946 synthtool > Ensuring dependencies.
2020-03-17 05:17:27,950 synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:5ef340c8d9334719bc5c6981d95f4a5d2737b0a6a24f2b9a0d430e96fff85c5b
Status: Image is up to date for googleapis/artman:latest
2020-03-17 05:17:29,021 synthtool > Cloning googleapis.
2020-03-17 05:17:29,677 synthtool > Running generator for google/privacy/dlp/artman_dlp_v2.yaml.
2020-03-17 05:17:51,539 synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/dlp-v2.
2020-03-17 05:17:51,540 synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/privacy/dlp/v2/dlp.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/dlp-v2/google/cloud/dlp_v2/proto/dlp.proto
2020-03-17 05:17:51,541 synthtool > Copy: /home/kbuilder/.cache/synthtool/googleapis/google/privacy/dlp/v2/storage.proto to /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/dlp-v2/google/cloud/dlp_v2/proto/storage.proto
2020-03-17 05:17:51,541 synthtool > Placed proto files into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/dlp-v2/google/cloud/dlp_v2/proto.
2020-03-17 05:17:51,562 synthtool > Replaced 'google\\.cloud\\.privacy\\.dlp_v2' in google/cloud/dlp_v2/proto/storage_pb2.py.
2020-03-17 05:17:51,567 synthtool > Replaced 'google\\.cloud\\.privacy\\.dlp_v2' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,567 synthtool > Replaced 'google\\.cloud\\.privacy\\.dlp_v2' in google/cloud/dlp_v2/proto/dlp_pb2_grpc.py.
2020-03-17 05:17:51,571 synthtool > Replaced '# Generated by the protocol buffer compiler.  DO NOT EDIT!' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,572 synthtool > Replaced 'number regex.*\n(\\s+)latex:.*\n' in google/cloud/dlp_v2/proto/storage_pb2.py.
2020-03-17 05:17:51,573 synthtool > Replaced '(hotword_regex:)\n(\\s+Regular expression.*)\n' in google/cloud/dlp_v2/proto/storage_pb2.py.
2020-03-17 05:17:51,574 synthtool > Replaced '(likelihood_adjustment:)\n' in google/cloud/dlp_v2/proto/storage_pb2.py.
2020-03-17 05:17:51,576 synthtool > No replacements made in google/cloud/dlp_v2/proto/dlp_pb2.py for pattern (max_findings_per_item:)
(\s+Max number.*)
(\s+scanned. When.*)
(\s+maximum returned is 1000.*)
(\s+When set within.*)
, maybe replacement is no longer needed?
2020-03-17 05:17:51,581 synthtool > Replaced '(max_findings_per_request:)\n(\\s+Max number of.*)\n(\\s+When set .*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,584 synthtool > Replaced '(max_findings_per_info_type:)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,589 synthtool > Replaced '(snapshot_inspect_template:)\n(\\s+If run with an .*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,593 synthtool > Replaced '(processed_bytes:)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,597 synthtool > Replaced '(total_estimated_bytes:)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,601 synthtool > Replaced '(info_type_stats:)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,605 synthtool > Replaced '(Statistics of how many instances of each info type were found)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,609 synthtool > Replaced '(requested_options:)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,613 synthtool > Replaced '(sensitive_value_frequency_lower_bound:)\n(\\s+Lower bound.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,617 synthtool > Replaced '(sensitive_value_frequency_upper_bound:)\n(\\s+Upper bound.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,622 synthtool > Replaced '(bucket_size:)\n(\\s+Total number of equivalence.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,626 synthtool > Replaced '(bucket_values:)\n(\\s+Sample of equivalence.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,630 synthtool > Replaced '(offset_minutes:)\n(\\s+Set only.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,634 synthtool > Replaced '(result:)\n(\\s+A summary of the outcome of this inspect job.)' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,638 synthtool > Replaced '(storage_config:)\n(\\s+The data to scan.\n)' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,642 synthtool > Replaced '(inspect_config:)\n(\\s+How and what to scan for.\n)' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,647 synthtool > Replaced '(inspect_template_name:)\n(\\s+If provided, will be.*)\n(\\s+InspectConfig.*)\n(\\s+values persisted.*)\n(\\s+actions:)\n(\\s+Actions to.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,653 synthtool > Replaced '    (\\s+Set of values defining the equivalence class.*)\n    (\\s+quasi-identifier.*)\n    (\\s+message. The order.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,659 synthtool > Replaced '    (\\s+Size of the equivalence class, for example number of rows with)\n    (\\s+the above set of values.)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,663 synthtool > Replaced '(equivalence_class_size_lower_bound:)\n(\\s+Lower bound.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,668 synthtool > Replaced '(equivalence_class_size_upper_bound:)\n(\\s+Upper bound.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,672 synthtool > Replaced '(bucket_value_count:)\n(\\s+Total number of distinct equivalence.*)\n' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,677 synthtool > Replaced '(value_frequency_lower_bound:)\n\\s+(Lower bound.*)\n\\s+(bucket.\n)(\\s+value_frequency_upper.*)\n\\s+(Upper.*)\n\\s+(bucket.\n)(\\s+bucket_size:)\n\\s+(Total.*\n)(\\s+bucket_values:)\n\\s+(Sample of value.*)\n\\s+(of values.*\n)(\\s+bucket_value_count:)\n\\s+(Total number.*\n)' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,684 synthtool > No replacements made in google/cloud/dlp_v2/proto/dlp_pb2.py for pattern (DESCRIPTOR .*_TAGGEDFIELD,
\s+__module__.*
\s+,
\s+__doc__.*
)(\s+field:)
(\s+Identifies .*)
(\s+tag:)
(\s+Semantic.*)
(\s+determine.*)
(\s+reidentifiability.*)
(\s+info_type:)
(\s+A column.*)
(\s+public dataset.*)
(\s+available.*)
(\s+ages.*)
(\s+supported Info.*)
(\s+supported.*)
(\s+custom_tag:)
(\s+A col.*)
(\s+user must.*)
(\s+statist.*)
(\s+\(below.*)
(\s+inferred:)
(\s+If no semantic.*)
, maybe replacement is no longer needed?
2020-03-17 05:17:51,706 synthtool > No replacements made in google/cloud/dlp_v2/proto/dlp_pb2.py for pattern (\s+)__doc__ = """Attributes:, maybe replacement is no longer needed?
2020-03-17 05:17:51,710 synthtool > Replaced '(////////.*)\n\\s+(///////////////\n)' in google/cloud/dlp_v2/proto/dlp_pb2.py.
2020-03-17 05:17:51,713 synthtool > Replaced '^\\s+resource was created.' in google/cloud/dlp_v2/gapic/dlp_service_client.py.
2020-03-17 05:17:51,714 synthtool > Replaced '(\\s+)WHITESPACE \\(int\\).*\n' in google/cloud/dlp_v2/gapic/enums.py.
2020-03-17 05:17:51,716 synthtool > No replacements made in google/cloud/dlp_v2/gapic/enums.py for pattern .*:raw-latex:.*
, maybe replacement is no longer needed?
.coveragerc
.flake8
.github/CONTRIBUTING.md
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/support_request.md
.github/PULL_REQUEST_TEMPLATE.md
.github/release-please.yml
.gitignore
.kokoro/build.sh
.kokoro/continuous/common.cfg
.kokoro/continuous/continuous.cfg
.kokoro/docs/common.cfg
.kokoro/docs/docs.cfg
.kokoro/presubmit/common.cfg
.kokoro/presubmit/presubmit.cfg
.kokoro/publish-docs.sh
.kokoro/release.sh
.kokoro/release/common.cfg
.kokoro/release/release.cfg
.kokoro/trampoline.sh
CODE_OF_CONDUCT.md
CONTRIBUTING.rst
LICENSE
MANIFEST.in
docs/_static/custom.css
docs/_templates/layout.html
docs/conf.py.j2
noxfile.py.j2
renovate.json
setup.cfg
Running session blacken
Creating virtual environment (virtualenv) using python3.6 in .nox/blacken
pip install black==19.3b0
black docs google tests noxfile.py setup.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/__init__.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/__init__.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/__init__.py
reformatted /tmpfs/src/git/autosynth/working_repo/docs/conf.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/gapic/enums.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/gapic/dlp_service_client_config.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/gapic/transports/dlp_service_grpc_transport.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/proto/dlp_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/proto/storage_pb2_grpc.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/types.py
reformatted /tmpfs/src/git/autosynth/working_repo/noxfile.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/gapic/dlp_service_client.py
reformatted /tmpfs/src/git/autosynth/working_repo/tests/unit/gapic/v2/test_dlp_service_client_v2.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/proto/storage_pb2.py
reformatted /tmpfs/src/git/autosynth/working_repo/google/cloud/dlp_v2/proto/dlp_pb2.py
All done! ✨ 🍰 ✨
16 files reformatted, 6 files left unchanged.
Session blacken was successful.
2020-03-17 05:18:12,559 synthtool > Wrote metadata to synth.metadata.

```
</details>
  • Loading branch information
yoshi-automation committed Apr 22, 2020
1 parent 18bd556 commit ffad36e
Show file tree
Hide file tree
Showing 12 changed files with 3,414 additions and 749 deletions.
234 changes: 234 additions & 0 deletions google/cloud/dlp_v2/gapic/dlp_service_client.py
Expand Up @@ -2175,6 +2175,157 @@ def cancel_dlp_job(
request, retry=retry, timeout=timeout, metadata=metadata
)

def finish_dlp_job(
self,
name,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
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.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpServiceClient()
>>>
>>> name = client.dlp_job_path('[PROJECT]', '[DLP_JOB]')
>>>
>>> client.finish_dlp_job(name)
Args:
name (str): Required. The name of the DlpJob resource to be cancelled.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
failed for any reason.
google.api_core.exceptions.RetryError: If the request failed due
to a retryable error and retry attempts failed.
ValueError: If the parameters are invalid.
"""
# Wrap the transport method to add retry and timeout logic.
if "finish_dlp_job" not in self._inner_api_calls:
self._inner_api_calls[
"finish_dlp_job"
] = google.api_core.gapic_v1.method.wrap_method(
self.transport.finish_dlp_job,
default_retry=self._method_configs["FinishDlpJob"].retry,
default_timeout=self._method_configs["FinishDlpJob"].timeout,
client_info=self._client_info,
)

request = dlp_pb2.FinishDlpJobRequest(name=name)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [("name", name)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header
)
metadata.append(routing_metadata)

self._inner_api_calls["finish_dlp_job"](
request, retry=retry, timeout=timeout, metadata=metadata
)

def hybrid_inspect_dlp_job(
self,
name,
hybrid_item=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Inspect hybrid content and store findings to a job.
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.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpServiceClient()
>>>
>>> # TODO: Initialize `name`:
>>> name = ''
>>>
>>> response = client.hybrid_inspect_dlp_job(name)
Args:
name (str): Required. Resource name of the job to execute a hybrid inspect on, for
example ``projects/dlp-test-project/dlpJob/53234423``.
hybrid_item (Union[dict, ~google.cloud.dlp_v2.types.HybridContentItem]): The item to inspect.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.dlp_v2.types.HybridContentItem`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
Returns:
A :class:`~google.cloud.dlp_v2.types.HybridInspectResponse` instance.
Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
failed for any reason.
google.api_core.exceptions.RetryError: If the request failed due
to a retryable error and retry attempts failed.
ValueError: If the parameters are invalid.
"""
# Wrap the transport method to add retry and timeout logic.
if "hybrid_inspect_dlp_job" not in self._inner_api_calls:
self._inner_api_calls[
"hybrid_inspect_dlp_job"
] = google.api_core.gapic_v1.method.wrap_method(
self.transport.hybrid_inspect_dlp_job,
default_retry=self._method_configs["HybridInspectDlpJob"].retry,
default_timeout=self._method_configs["HybridInspectDlpJob"].timeout,
client_info=self._client_info,
)

request = dlp_pb2.HybridInspectDlpJobRequest(name=name, hybrid_item=hybrid_item)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [("name", name)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header
)
metadata.append(routing_metadata)

return self._inner_api_calls["hybrid_inspect_dlp_job"](
request, retry=retry, timeout=timeout, metadata=metadata
)

def list_job_triggers(
self,
parent,
Expand Down Expand Up @@ -2473,6 +2624,89 @@ def delete_job_trigger(
request, retry=retry, timeout=timeout, metadata=metadata
)

def hybrid_inspect_job_trigger(
self,
name,
hybrid_item=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
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.
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.
Example:
>>> from google.cloud import dlp_v2
>>>
>>> client = dlp_v2.DlpServiceClient()
>>>
>>> # TODO: Initialize `name`:
>>> name = ''
>>>
>>> response = client.hybrid_inspect_job_trigger(name)
Args:
name (str): Required. Resource name of the trigger to execute a hybrid inspect on,
for example ``projects/dlp-test-project/jobTriggers/53234423``.
hybrid_item (Union[dict, ~google.cloud.dlp_v2.types.HybridContentItem]): The item to inspect.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.dlp_v2.types.HybridContentItem`
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
Returns:
A :class:`~google.cloud.dlp_v2.types.HybridInspectResponse` instance.
Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
failed for any reason.
google.api_core.exceptions.RetryError: If the request failed due
to a retryable error and retry attempts failed.
ValueError: If the parameters are invalid.
"""
# Wrap the transport method to add retry and timeout logic.
if "hybrid_inspect_job_trigger" not in self._inner_api_calls:
self._inner_api_calls[
"hybrid_inspect_job_trigger"
] = google.api_core.gapic_v1.method.wrap_method(
self.transport.hybrid_inspect_job_trigger,
default_retry=self._method_configs["HybridInspectJobTrigger"].retry,
default_timeout=self._method_configs["HybridInspectJobTrigger"].timeout,
client_info=self._client_info,
)

request = dlp_pb2.HybridInspectJobTriggerRequest(
name=name, hybrid_item=hybrid_item
)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [("name", name)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header
)
metadata.append(routing_metadata)

return self._inner_api_calls["hybrid_inspect_job_trigger"](
request, retry=retry, timeout=timeout, metadata=metadata
)

def update_job_trigger(
self,
name,
Expand Down
15 changes: 15 additions & 0 deletions google/cloud/dlp_v2/gapic/dlp_service_client_config.py
Expand Up @@ -117,6 +117,16 @@
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"FinishDlpJob": {
"timeout_millis": 300000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"HybridInspectDlpJob": {
"timeout_millis": 300000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ListJobTriggers": {
"timeout_millis": 300000,
"retry_codes_name": "idempotent",
Expand All @@ -132,6 +142,11 @@
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"HybridInspectJobTrigger": {
"timeout_millis": 300000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"UpdateJobTrigger": {
"timeout_millis": 300000,
"retry_codes_name": "non_idempotent",
Expand Down
11 changes: 9 additions & 2 deletions google/cloud/dlp_v2/gapic/enums.py
Expand Up @@ -338,15 +338,20 @@ class ExclusionType(enum.IntEnum):
class DlpJob(object):
class JobState(enum.IntEnum):
"""
Possible states of a job.
Possible states of a job. New items may be added.
Attributes:
JOB_STATE_UNSPECIFIED (int): Unused.
PENDING (int): The job has not yet started.
RUNNING (int): The job is currently running.
RUNNING (int): The job is currently running. Once a job has finished it will transition
to FAILED or DONE.
DONE (int): The job is no longer running.
CANCELED (int): The job was canceled before it could complete.
FAILED (int): The job had an error and did not complete.
ACTIVE (int): The job is currently accepting findings via hybridInspect.
A hybrid job in ACTIVE state may continue to have findings added to it
through calling of hybridInspect. After the job has finished no more
calls to hybridInspect may be made. ACTIVE jobs can transition to DONE.
"""

JOB_STATE_UNSPECIFIED = 0
Expand All @@ -355,6 +360,7 @@ class JobState(enum.IntEnum):
DONE = 3
CANCELED = 4
FAILED = 5
ACTIVE = 6


class JobTrigger(object):
Expand Down Expand Up @@ -382,6 +388,7 @@ class OutputStorageConfig(object):
class OutputSchema(enum.IntEnum):
"""
Predefined schemas for storing findings.
Only for use with external storage.
Attributes:
OUTPUT_SCHEMA_UNSPECIFIED (int): Unused.
Expand Down
53 changes: 53 additions & 0 deletions google/cloud/dlp_v2/gapic/transports/dlp_service_grpc_transport.py
Expand Up @@ -426,6 +426,41 @@ def cancel_dlp_job(self):
"""
return self._stubs["dlp_service_stub"].CancelDlpJob

@property
def finish_dlp_job(self):
"""Return the gRPC stub for :meth:`DlpServiceClient.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.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["dlp_service_stub"].FinishDlpJob

@property
def hybrid_inspect_dlp_job(self):
"""Return the gRPC stub for :meth:`DlpServiceClient.hybrid_inspect_dlp_job`.
Inspect hybrid content and store findings to a job.
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: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["dlp_service_stub"].HybridInspectDlpJob

@property
def list_job_triggers(self):
"""Return the gRPC stub for :meth:`DlpServiceClient.list_job_triggers`.
Expand Down Expand Up @@ -468,6 +503,24 @@ def delete_job_trigger(self):
"""
return self._stubs["dlp_service_stub"].DeleteJobTrigger

@property
def hybrid_inspect_job_trigger(self):
"""Return the gRPC stub for :meth:`DlpServiceClient.hybrid_inspect_job_trigger`.
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.
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: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["dlp_service_stub"].HybridInspectJobTrigger

@property
def update_job_trigger(self):
"""Return the gRPC stub for :meth:`DlpServiceClient.update_job_trigger`.
Expand Down

0 comments on commit ffad36e

Please sign in to comment.