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
4 changes: 2 additions & 2 deletions librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ version: v0.16.0
repo: googleapis/google-cloud-python
sources:
googleapis:
commit: c73334a47800ba03cc65e46ade96c07f01db3446
sha256: 07be59c8bc1dfc420e352db0528641baa23943e7dd1659acac41ca55969fb259
commit: ff15be54722218705740b9fc6223d264c4cdb6dd
sha256: 13dc3b1a01767be8d486980d3ddcb7fe6f6b89c3da8d41c358d5c2536c86de3c
default:
output: packages
tag_format: '{name}-v{version}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,13 @@ def sample_row_keys(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> Awaitable[AsyncIterable[bigtable.SampleRowKeysResponse]]:
r"""Returns a sample of row keys in the table. The
returned row keys will delimit contiguous sections of
the table of approximately equal size, which can be used
to break up the data for distributed tasks like
mapreduces.
r"""Returns a sample of row keys in the table. The returned row keys
will delimit contiguous sections of the table of approximately
equal size, which can be used to break up the data for
distributed tasks like mapreduces.
If a ``row_range`` is provided in the request, the returned
samples will be restricted to the specified range.
Args:
request (Optional[Union[google.cloud.bigtable_v2.types.SampleRowKeysRequest, dict]]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -928,11 +928,13 @@ def sample_row_keys(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> Iterable[bigtable.SampleRowKeysResponse]:
r"""Returns a sample of row keys in the table. The
returned row keys will delimit contiguous sections of
the table of approximately equal size, which can be used
to break up the data for distributed tasks like
mapreduces.
r"""Returns a sample of row keys in the table. The returned row keys
will delimit contiguous sections of the table of approximately
equal size, which can be used to break up the data for
distributed tasks like mapreduces.
If a ``row_range`` is provided in the request, the returned
samples will be restricted to the specified range.
Args:
request (Union[google.cloud.bigtable_v2.types.SampleRowKeysRequest, dict]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,13 @@ def sample_row_keys(
) -> Callable[[bigtable.SampleRowKeysRequest], bigtable.SampleRowKeysResponse]:
r"""Return a callable for the sample row keys method over gRPC.
Returns a sample of row keys in the table. The
returned row keys will delimit contiguous sections of
the table of approximately equal size, which can be used
to break up the data for distributed tasks like
mapreduces.
Returns a sample of row keys in the table. The returned row keys
will delimit contiguous sections of the table of approximately
equal size, which can be used to break up the data for
distributed tasks like mapreduces.
If a ``row_range`` is provided in the request, the returned
samples will be restricted to the specified range.
Returns:
Callable[[~.SampleRowKeysRequest],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,13 @@ def sample_row_keys(
]:
r"""Return a callable for the sample row keys method over gRPC.
Returns a sample of row keys in the table. The
returned row keys will delimit contiguous sections of
the table of approximately equal size, which can be used
to break up the data for distributed tasks like
mapreduces.
Returns a sample of row keys in the table. The returned row keys
will delimit contiguous sections of the table of approximately
equal size, which can be used to break up the data for
distributed tasks like mapreduces.
If a ``row_range`` is provided in the request, the returned
samples will be restricted to the specified range.
Returns:
Callable[[~.SampleRowKeysRequest],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ class SampleRowKeysRequest(proto.Message):
This value specifies routing for replication.
If not specified, the "default" application
profile will be used.
row_range (google.cloud.bigtable_v2.types.RowRange):
Optional. The row range to sample. If not
specified, samples from all rows.
The output will always return the end key in the
range as the last sample returned.
"""

table_name: str = proto.Field(
Expand All @@ -376,30 +381,36 @@ class SampleRowKeysRequest(proto.Message):
proto.STRING,
number=2,
)
row_range: data.RowRange = proto.Field(
proto.MESSAGE,
number=6,
message=data.RowRange,
)


class SampleRowKeysResponse(proto.Message):
r"""Response message for Bigtable.SampleRowKeys.

Attributes:
row_key (bytes):
Sorted streamed sequence of sample row keys
in the table. The table might have contents
before the first row key in the list and after
the last one, but a key containing the empty
string indicates "end of table" and will be the
last response given, if present.
Note that row keys in this list may not have
ever been written to or read from, and users
should therefore not make any assumptions about
the row key structure that are specific to their
use case.
Sorted streamed sequence of sample row keys in the table,
restricted to the row_range if specified in the request. The
table might have contents before the first row key in the
list and after the last one, but a key containing the empty
string indicates "end of table" and will be the last
response given, if present and within the row-range
specified in the request. Note that row keys in this list
may not have ever been written to or read from, and users
should therefore not make any assumptions about the row key
structure that are specific to their use case.
offset_bytes (int):
Approximate total storage space used by all rows in the
table which precede ``row_key``. Buffering the contents of
all rows between two subsequent samples would require space
roughly equal to the difference in their ``offset_bytes``
fields.
table which precede ``row_key`` (and if a row-range is
specified in the request, which follow what would have been
the previous sample before the row-range start). Buffering
the contents of all rows between two subsequent samples
would require space roughly equal to the difference in their
``offset_bytes`` fields.
"""

row_key: bytes = proto.Field(
Expand Down
6 changes: 6 additions & 0 deletions packages/google-cloud-dlp/google/cloud/dlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
AnalyzeDataSourceRiskDetails,
AwsAccount,
AwsAccountRegex,
BatchContentItem,
BatchContentLocation,
BigQueryDiscoveryTarget,
BigQueryRegex,
BigQueryRegexes,
Expand Down Expand Up @@ -280,6 +282,7 @@
StoredInfoTypeState,
StoredInfoTypeStats,
StoredInfoTypeVersion,
StringValueBatch,
Table,
TableDataProfile,
TableLocation,
Expand Down Expand Up @@ -363,6 +366,8 @@
"AnalyzeDataSourceRiskDetails",
"AwsAccount",
"AwsAccountRegex",
"BatchContentItem",
"BatchContentLocation",
"BigQueryDiscoveryTarget",
"BigQueryRegex",
"BigQueryRegexes",
Expand Down Expand Up @@ -591,6 +596,7 @@
"StoredInfoTypeConfig",
"StoredInfoTypeStats",
"StoredInfoTypeVersion",
"StringValueBatch",
"Table",
"TableDataProfile",
"TableLocation",
Expand Down
6 changes: 6 additions & 0 deletions packages/google-cloud-dlp/google/cloud/dlp_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
AnalyzeDataSourceRiskDetails,
AwsAccount,
AwsAccountRegex,
BatchContentItem,
BatchContentLocation,
BigQueryDiscoveryTarget,
BigQueryRegex,
BigQueryRegexes,
Expand Down Expand Up @@ -284,6 +286,7 @@
StoredInfoTypeState,
StoredInfoTypeStats,
StoredInfoTypeVersion,
StringValueBatch,
Table,
TableDataProfile,
TableLocation,
Expand Down Expand Up @@ -449,6 +452,8 @@ def _get_version(dependency_name):
"AnalyzeDataSourceRiskDetails",
"AwsAccount",
"AwsAccountRegex",
"BatchContentItem",
"BatchContentLocation",
"BigQueryDiscoveryTarget",
"BigQueryField",
"BigQueryKey",
Expand Down Expand Up @@ -719,6 +724,7 @@ def _get_version(dependency_name):
"StoredInfoTypeStats",
"StoredInfoTypeVersion",
"StoredType",
"StringValueBatch",
"Table",
"TableDataProfile",
"TableLocation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
AnalyzeDataSourceRiskDetails,
AwsAccount,
AwsAccountRegex,
BatchContentItem,
BatchContentLocation,
BigQueryDiscoveryTarget,
BigQueryRegex,
BigQueryRegexes,
Expand Down Expand Up @@ -273,6 +275,7 @@
StoredInfoTypeState,
StoredInfoTypeStats,
StoredInfoTypeVersion,
StringValueBatch,
Table,
TableDataProfile,
TableLocation,
Expand Down Expand Up @@ -354,6 +357,8 @@
"AnalyzeDataSourceRiskDetails",
"AwsAccount",
"AwsAccountRegex",
"BatchContentItem",
"BatchContentLocation",
"BigQueryDiscoveryTarget",
"BigQueryRegex",
"BigQueryRegexes",
Expand Down Expand Up @@ -582,6 +587,7 @@
"StoredInfoTypeConfig",
"StoredInfoTypeStats",
"StoredInfoTypeVersion",
"StringValueBatch",
"Table",
"TableDataProfile",
"TableLocation",
Expand Down
76 changes: 75 additions & 1 deletion packages/google-cloud-dlp/google/cloud/dlp_v2/types/dlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,16 @@
"ContentMetadata",
"Conversation",
"ConversationMessage",
"BatchContentItem",
"StringValueBatch",
"Table",
"KeyValueMetadataProperty",
"InspectResult",
"Finding",
"Location",
"ContentLocation",
"ConversationLocation",
"BatchContentLocation",
"MetadataLocation",
"StorageMetadataLabel",
"KeyValueMetadataLabel",
Expand Down Expand Up @@ -1644,6 +1647,10 @@ class ContentItem(proto.Message):
messages are contiguous and ordered in
chronological order.

This field is a member of `oneof`_ ``data_item``.
batch_content_item (google.cloud.dlp_v2.types.BatchContentItem):
Represents a batch of items to inspect.

This field is a member of `oneof`_ ``data_item``.
content_metadata (google.cloud.dlp_v2.types.ContentMetadata):
User provided metadata for the content.
Expand Down Expand Up @@ -1672,6 +1679,12 @@ class ContentItem(proto.Message):
oneof="data_item",
message="Conversation",
)
batch_content_item: "BatchContentItem" = proto.Field(
proto.MESSAGE,
number=8,
oneof="data_item",
message="BatchContentItem",
)
content_metadata: "ContentMetadata" = proto.Field(
proto.MESSAGE,
number=6,
Expand Down Expand Up @@ -1725,7 +1738,7 @@ class ConversationMessage(proto.Message):
message_type (google.cloud.dlp_v2.types.ConversationMessage.MessageType):
The type of message.
participant_id (str):
Optional. The identifier of the participant, for example,
Optional. The identifier of the participant, for example
'test-user' or 'gemini'. The participant ID can contain
lowercase letters, numbers, and hyphens; that is, it must
match the regular expression:
Expand Down Expand Up @@ -1767,6 +1780,42 @@ class MessageType(proto.Enum):
)


class BatchContentItem(proto.Message):
r"""Represents a batch of content to inspect or redact.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes:
string_value_batch (google.cloud.dlp_v2.types.StringValueBatch):
Optional. Represents a batch of string values
to inspect or redact.

This field is a member of `oneof`_ ``batch``.
"""

string_value_batch: "StringValueBatch" = proto.Field(
proto.MESSAGE,
number=1,
oneof="batch",
message="StringValueBatch",
)


class StringValueBatch(proto.Message):
r"""Represents a batch of string values to inspect or redact.

Attributes:
values (MutableSequence[str]):
Optional. Represents string data to inspect
or redact.
"""

values: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=1,
)


class Table(proto.Message):
r"""Structured content to inspect. Up to 50,000 ``Value``\ s per request
allowed. See
Expand Down Expand Up @@ -2069,6 +2118,10 @@ class ContentLocation(proto.Message):
conversation_location (google.cloud.dlp_v2.types.ConversationLocation):
Location within a conversation.

This field is a member of `oneof`_ ``location``.
batch_content_location (google.cloud.dlp_v2.types.BatchContentLocation):
Location within a batch of content.

This field is a member of `oneof`_ ``location``.
container_timestamp (google.protobuf.timestamp_pb2.Timestamp):
Finding container modification timestamp, if applicable. For
Expand Down Expand Up @@ -2115,6 +2168,12 @@ class ContentLocation(proto.Message):
oneof="location",
message="ConversationLocation",
)
batch_content_location: "BatchContentLocation" = proto.Field(
proto.MESSAGE,
number=11,
oneof="location",
message="BatchContentLocation",
)
container_timestamp: timestamp_pb2.Timestamp = proto.Field(
proto.MESSAGE,
number=6,
Expand Down Expand Up @@ -2168,6 +2227,21 @@ class AllMessages(proto.Message):
)


class BatchContentLocation(proto.Message):
r"""Location within a batch of content.

Attributes:
item_index (int):
Matches an index of a batch item in the batch
provided in the request.
"""

item_index: int = proto.Field(
proto.INT32,
number=1,
)


class MetadataLocation(proto.Message):
r"""Metadata Location

Expand Down
Loading
Loading