Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,14 @@ class TimestampGranularity(proto.Enum):
MILLIS (1):
The table keeps data versioned at a
granularity of 1ms.
MICROS (2):
The table keeps data versioned at a
granularity of 1us.
"""

TIMESTAMP_GRANULARITY_UNSPECIFIED = 0
MILLIS = 1
MICROS = 2

class View(proto.Enum):
r"""Defines a view over a table's fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,36 @@ class Mutation(proto.Message):
Deletes cells from the entire row.

This field is a member of `oneof`_ ``mutation``.
timestamp_origin (google.cloud.bigtable_v2.types.Mutation.TimestampOrigin):
Optional. The origin of the timestamp in this
mutation.
"""

class TimestampOrigin(proto.Enum):
r"""Represents the origin of the timestamp in the mutation.

Values:
TIMESTAMP_ORIGIN_UNSPECIFIED (0):
Default value. Should not be explicitly set.
USER_SPECIFIED (1):
Indicates that the timestamp was explicitly provided by the
user (either ``>0`` or ``-1`` for server-assigned). The
server will reject the mutation if the timestamp's precision
does not match the table's granularity. (e.g., a millisecond
table only allows timestamps that are multiples of 1000).
CLIENT_AUTO_GENERATED (2):
Indicates that the timestamp was
auto-generated by the client library. The server
will truncate the timestamp's precision to match
the table's granularity.
(e.g., zeroing the last 3 digits for a
millisecond table).
"""

TIMESTAMP_ORIGIN_UNSPECIFIED = 0
USER_SPECIFIED = 1
CLIENT_AUTO_GENERATED = 2

class SetCell(proto.Message):
r"""A Mutation which sets the value of the specified cell.

Expand Down Expand Up @@ -1295,6 +1323,11 @@ class DeleteFromRow(proto.Message):
oneof="mutation",
message=DeleteFromRow,
)
timestamp_origin: TimestampOrigin = proto.Field(
proto.ENUM,
number=7,
enum=TimestampOrigin,
)


class ReadModifyWriteRule(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
import tempfile
from unittest import mock

import google.cloud.storage._media.requests.upload as upload_mod
import pytest # type: ignore

import google.cloud.storage._media.requests.upload as upload_mod

URL_PREFIX = "https://www.googleapis.com/upload/storage/v1/b/{BUCKET}/o"
SIMPLE_URL = URL_PREFIX + "?uploadType=media&name={OBJECT}"
MULTIPART_URL = URL_PREFIX + "?uploadType=multipart"
Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-storage/tests/system/test_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import mock
import pytest
from google.api_core import exceptions

from google.cloud.storage._helpers import _base64_md5hash
from google.cloud.storage.exceptions import DataCorruption

Expand Down
Loading