Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions dlp/google/cloud/dlp_v2/gapic/dlp_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ def get_inspect_template(self,
def list_inspect_templates(self,
parent,
page_size=None,
order_by=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None):
Expand Down Expand Up @@ -893,6 +894,19 @@ def list_inspect_templates(self,
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
order_by (str): Optional comma separated list of fields to order by,
followed by ``asc`` or ``desc`` postfix. This list is case-insensitive,
default sorting order is ascending, redundant space characters are
insignificant.

Example: ``name asc,update_time, create_time desc``

Supported fields are:

- ``create_time``: corresponds to time the template was created.
- ``update_time``: corresponds to time the template was last updated.
- ``name``: corresponds to template's name.
- ``display_name``: corresponds to template's display name.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down Expand Up @@ -930,6 +944,7 @@ def list_inspect_templates(self,
request = dlp_pb2.ListInspectTemplatesRequest(
parent=parent,
page_size=page_size,
order_by=order_by,
)
iterator = google.api_core.page_iterator.GRPCIterator(
client=None,
Expand Down Expand Up @@ -1206,6 +1221,7 @@ def list_deidentify_templates(
self,
parent,
page_size=None,
order_by=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None):
Expand Down Expand Up @@ -1243,6 +1259,19 @@ def list_deidentify_templates(
resource, this parameter does not affect the return value. If page
streaming is performed per-page, this determines the maximum number
of resources in a page.
order_by (str): Optional comma separated list of fields to order by,
followed by ``asc`` or ``desc`` postfix. This list is case-insensitive,
default sorting order is ascending, redundant space characters are
insignificant.

Example: ``name asc,update_time, create_time desc``

Supported fields are:

- ``create_time``: corresponds to time the template was created.
- ``update_time``: corresponds to time the template was last updated.
- ``name``: corresponds to template's name.
- ``display_name``: corresponds to template's display name.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down Expand Up @@ -1280,6 +1309,7 @@ def list_deidentify_templates(
request = dlp_pb2.ListDeidentifyTemplatesRequest(
parent=parent,
page_size=page_size,
order_by=order_by,
)
iterator = google.api_core.page_iterator.GRPCIterator(
client=None,
Expand Down Expand Up @@ -1761,9 +1791,11 @@ def list_job_triggers(self,

Supported fields are:

- ``create_time``: corresponds to time the triggeredJob was created.
- ``update_time``: corresponds to time the triggeredJob was last updated.
- ``create_time``: corresponds to time the JobTrigger was created.
- ``update_time``: corresponds to time the JobTrigger was last updated.
- ``name``: corresponds to JobTrigger's name.
- ``display_name``: corresponds to JobTrigger's display name.
- ``status``: corresponds to JobTrigger's status.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will not
be retried.
Expand Down
42 changes: 42 additions & 0 deletions dlp/google/cloud/dlp_v2/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,36 @@ class ContentOption(enum.IntEnum):
CONTENT_IMAGE = 2


class MatchingType(enum.IntEnum):
"""
Type of the match which can be applied to different ways of matching, like
Dictionary, regular expression and intersecting with findings of another
info type.

Attributes:
MATCHING_TYPE_UNSPECIFIED (int): Invalid.
MATCHING_TYPE_FULL_MATCH (int): Full match.

- Dictionary: join of Dictionary results matched complete finding quote
- Regex: all regex matches fill a finding quote start to end
- Exclude info type: completely inside affecting info types findings
MATCHING_TYPE_PARTIAL_MATCH (int): Partial match.

- Dictionary: at least one of the tokens in the finding matches
- Regex: substring of the finding matches
- Exclude info type: intersects with affecting info types findings
MATCHING_TYPE_INVERSE_MATCH (int): Inverse match.

- Dictionary: no tokens in the finding match the dictionary
- Regex: finding doesn't match the regex
- Exclude info type: no intersection with affecting info types findings
"""
MATCHING_TYPE_UNSPECIFIED = 0
MATCHING_TYPE_FULL_MATCH = 1
MATCHING_TYPE_PARTIAL_MATCH = 2
MATCHING_TYPE_INVERSE_MATCH = 3


class InfoTypeSupportedBy(enum.IntEnum):
"""
Parts of the APIs which use certain infoTypes.
Expand Down Expand Up @@ -169,6 +199,18 @@ class StoredInfoTypeState(enum.IntEnum):
INVALID = 4


class CustomInfoType(object):
class ExclusionType(enum.IntEnum):
"""
Attributes:
EXCLUSION_TYPE_UNSPECIFIED (int): A finding of this custom info type will not be excluded from results.
EXCLUSION_TYPE_EXCLUDE (int): A finding of this custom info type will be excluded from final results,
but can still affect rule execution.
"""
EXCLUSION_TYPE_UNSPECIFIED = 0
EXCLUSION_TYPE_EXCLUDE = 1


class CloudStorageOptions(object):
class SampleMethod(enum.IntEnum):
"""
Expand Down
1,032 changes: 706 additions & 326 deletions dlp/google/cloud/dlp_v2/proto/dlp_pb2.py

Large diffs are not rendered by default.

Loading