Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 16a82eb

Browse files
1 parent c61b422 commit 16a82eb

128 files changed

Lines changed: 92 additions & 123205 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google/cloud/bigtable_v2/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
from .types.data import ColumnMetadata
5151
from .types.data import ColumnRange
5252
from .types.data import Family
53+
from .types.data import Idempotency
5354
from .types.data import Mutation
5455
from .types.data import PartialResultSet
5556
from .types.data import ProtoFormat
@@ -93,6 +94,7 @@
9394
"FullReadStatsView",
9495
"GenerateInitialChangeStreamPartitionsRequest",
9596
"GenerateInitialChangeStreamPartitionsResponse",
97+
"Idempotency",
9698
"MutateRowRequest",
9799
"MutateRowResponse",
98100
"MutateRowsRequest",

google/cloud/bigtable_v2/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
ColumnMetadata,
4646
ColumnRange,
4747
Family,
48+
Idempotency,
4849
Mutation,
4950
PartialResultSet,
5051
ProtoFormat,
@@ -110,6 +111,7 @@
110111
"ColumnMetadata",
111112
"ColumnRange",
112113
"Family",
114+
"Idempotency",
113115
"Mutation",
114116
"PartialResultSet",
115117
"ProtoFormat",

google/cloud/bigtable_v2/types/bigtable.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ class MutateRowRequest(proto.Message):
457457
meaning that earlier mutations can be masked by
458458
later ones. Must contain at least one entry and
459459
at most 100000.
460+
idempotency (google.cloud.bigtable_v2.types.Idempotency):
461+
Optional parameter for ensuring a MutateRow
462+
request is only applied once. Currently
463+
applicable only for certain aggregate types.
460464
"""
461465

462466
table_name: str = proto.Field(
@@ -480,6 +484,11 @@ class MutateRowRequest(proto.Message):
480484
number=3,
481485
message=data.Mutation,
482486
)
487+
idempotency: data.Idempotency = proto.Field(
488+
proto.MESSAGE,
489+
number=8,
490+
message=data.Idempotency,
491+
)
483492

484493

485494
class MutateRowResponse(proto.Message):

google/cloud/bigtable_v2/types/data.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"ProtoRows",
5252
"ProtoRowsBatch",
5353
"PartialResultSet",
54+
"Idempotency",
5455
},
5556
)
5657

@@ -1609,4 +1610,36 @@ class PartialResultSet(proto.Message):
16091610
)
16101611

16111612

1613+
class Idempotency(proto.Message):
1614+
r"""Parameters on mutations where clients want to ensure
1615+
idempotency (i.e. at-most-once semantics). This is currently
1616+
only needed for certain aggregate types.
1617+
1618+
Attributes:
1619+
token (bytes):
1620+
Unique token used to identify replays of this
1621+
mutation. Must be at least 8 bytes long.
1622+
start_time (google.protobuf.timestamp_pb2.Timestamp):
1623+
Client-assigned timestamp when the mutation's
1624+
first attempt was sent. Used to reject mutations
1625+
that arrive after idempotency protection may
1626+
have expired. May cause spurious rejections if
1627+
clock skew is too high.
1628+
1629+
Leave unset or zero to always accept the
1630+
mutation, at the risk of double counting if the
1631+
protection for previous attempts has expired.
1632+
"""
1633+
1634+
token: bytes = proto.Field(
1635+
proto.BYTES,
1636+
number=1,
1637+
)
1638+
start_time: timestamp_pb2.Timestamp = proto.Field(
1639+
proto.MESSAGE,
1640+
number=2,
1641+
message=timestamp_pb2.Timestamp,
1642+
)
1643+
1644+
16121645
__all__ = tuple(sorted(__protobuf__.manifest))

owl-bot-staging/bigtable/v2/.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/.flake8

Lines changed: 0 additions & 34 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

owl-bot-staging/bigtable/v2/MANIFEST.in

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)