Skip to content

Commit 132d62a

Browse files
1 parent 78e31cd commit 132d62a

File tree

126 files changed

+183
-123450
lines changed

Some content is hidden

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

126 files changed

+183
-123450
lines changed

‎google/cloud/bigtable_v2/services/bigtable/async_client.py‎

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,11 @@ def read_rows(
391391
header_params["app_profile_id"] = request.app_profile_id
392392

393393
routing_param_regex = re.compile(
394-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
394+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
395395
)
396396
regex_match = routing_param_regex.match(request.authorized_view_name)
397-
if regex_match and regex_match.group("authorized_view_name"):
398-
header_params["authorized_view_name"] = regex_match.group(
399-
"authorized_view_name"
400-
)
397+
if regex_match and regex_match.group("table_name"):
398+
header_params["table_name"] = regex_match.group("table_name")
401399

402400
if header_params:
403401
metadata = tuple(metadata) + (
@@ -515,13 +513,11 @@ def sample_row_keys(
515513
header_params["app_profile_id"] = request.app_profile_id
516514

517515
routing_param_regex = re.compile(
518-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
516+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
519517
)
520518
regex_match = routing_param_regex.match(request.authorized_view_name)
521-
if regex_match and regex_match.group("authorized_view_name"):
522-
header_params["authorized_view_name"] = regex_match.group(
523-
"authorized_view_name"
524-
)
519+
if regex_match and regex_match.group("table_name"):
520+
header_params["table_name"] = regex_match.group("table_name")
525521

526522
if header_params:
527523
metadata = tuple(metadata) + (
@@ -660,13 +656,11 @@ async def mutate_row(
660656
header_params["app_profile_id"] = request.app_profile_id
661657

662658
routing_param_regex = re.compile(
663-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
659+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
664660
)
665661
regex_match = routing_param_regex.match(request.authorized_view_name)
666-
if regex_match and regex_match.group("authorized_view_name"):
667-
header_params["authorized_view_name"] = regex_match.group(
668-
"authorized_view_name"
669-
)
662+
if regex_match and regex_match.group("table_name"):
663+
header_params["table_name"] = regex_match.group("table_name")
670664

671665
if header_params:
672666
metadata = tuple(metadata) + (
@@ -799,13 +793,11 @@ def mutate_rows(
799793
header_params["app_profile_id"] = request.app_profile_id
800794

801795
routing_param_regex = re.compile(
802-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
796+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
803797
)
804798
regex_match = routing_param_regex.match(request.authorized_view_name)
805-
if regex_match and regex_match.group("authorized_view_name"):
806-
header_params["authorized_view_name"] = regex_match.group(
807-
"authorized_view_name"
808-
)
799+
if regex_match and regex_match.group("table_name"):
800+
header_params["table_name"] = regex_match.group("table_name")
809801

810802
if header_params:
811803
metadata = tuple(metadata) + (
@@ -979,13 +971,11 @@ async def check_and_mutate_row(
979971
header_params["app_profile_id"] = request.app_profile_id
980972

981973
routing_param_regex = re.compile(
982-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
974+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
983975
)
984976
regex_match = routing_param_regex.match(request.authorized_view_name)
985-
if regex_match and regex_match.group("authorized_view_name"):
986-
header_params["authorized_view_name"] = regex_match.group(
987-
"authorized_view_name"
988-
)
977+
if regex_match and regex_match.group("table_name"):
978+
header_params["table_name"] = regex_match.group("table_name")
989979

990980
if header_params:
991981
metadata = tuple(metadata) + (
@@ -1242,13 +1232,11 @@ async def read_modify_write_row(
12421232
header_params["app_profile_id"] = request.app_profile_id
12431233

12441234
routing_param_regex = re.compile(
1245-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
1235+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
12461236
)
12471237
regex_match = routing_param_regex.match(request.authorized_view_name)
1248-
if regex_match and regex_match.group("authorized_view_name"):
1249-
header_params["authorized_view_name"] = regex_match.group(
1250-
"authorized_view_name"
1251-
)
1238+
if regex_match and regex_match.group("table_name"):
1239+
header_params["table_name"] = regex_match.group("table_name")
12521240

12531241
if header_params:
12541242
metadata = tuple(metadata) + (

‎google/cloud/bigtable_v2/services/bigtable/client.py‎

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -867,13 +867,11 @@ def read_rows(
867867
header_params["app_profile_id"] = request.app_profile_id
868868

869869
routing_param_regex = re.compile(
870-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
870+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
871871
)
872872
regex_match = routing_param_regex.match(request.authorized_view_name)
873-
if regex_match and regex_match.group("authorized_view_name"):
874-
header_params["authorized_view_name"] = regex_match.group(
875-
"authorized_view_name"
876-
)
873+
if regex_match and regex_match.group("table_name"):
874+
header_params["table_name"] = regex_match.group("table_name")
877875

878876
if header_params:
879877
metadata = tuple(metadata) + (
@@ -988,13 +986,11 @@ def sample_row_keys(
988986
header_params["app_profile_id"] = request.app_profile_id
989987

990988
routing_param_regex = re.compile(
991-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
989+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
992990
)
993991
regex_match = routing_param_regex.match(request.authorized_view_name)
994-
if regex_match and regex_match.group("authorized_view_name"):
995-
header_params["authorized_view_name"] = regex_match.group(
996-
"authorized_view_name"
997-
)
992+
if regex_match and regex_match.group("table_name"):
993+
header_params["table_name"] = regex_match.group("table_name")
998994

999995
if header_params:
1000996
metadata = tuple(metadata) + (
@@ -1130,13 +1126,11 @@ def mutate_row(
11301126
header_params["app_profile_id"] = request.app_profile_id
11311127

11321128
routing_param_regex = re.compile(
1133-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
1129+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
11341130
)
11351131
regex_match = routing_param_regex.match(request.authorized_view_name)
1136-
if regex_match and regex_match.group("authorized_view_name"):
1137-
header_params["authorized_view_name"] = regex_match.group(
1138-
"authorized_view_name"
1139-
)
1132+
if regex_match and regex_match.group("table_name"):
1133+
header_params["table_name"] = regex_match.group("table_name")
11401134

11411135
if header_params:
11421136
metadata = tuple(metadata) + (
@@ -1266,13 +1260,11 @@ def mutate_rows(
12661260
header_params["app_profile_id"] = request.app_profile_id
12671261

12681262
routing_param_regex = re.compile(
1269-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
1263+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
12701264
)
12711265
regex_match = routing_param_regex.match(request.authorized_view_name)
1272-
if regex_match and regex_match.group("authorized_view_name"):
1273-
header_params["authorized_view_name"] = regex_match.group(
1274-
"authorized_view_name"
1275-
)
1266+
if regex_match and regex_match.group("table_name"):
1267+
header_params["table_name"] = regex_match.group("table_name")
12761268

12771269
if header_params:
12781270
metadata = tuple(metadata) + (
@@ -1443,13 +1435,11 @@ def check_and_mutate_row(
14431435
header_params["app_profile_id"] = request.app_profile_id
14441436

14451437
routing_param_regex = re.compile(
1446-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
1438+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
14471439
)
14481440
regex_match = routing_param_regex.match(request.authorized_view_name)
1449-
if regex_match and regex_match.group("authorized_view_name"):
1450-
header_params["authorized_view_name"] = regex_match.group(
1451-
"authorized_view_name"
1452-
)
1441+
if regex_match and regex_match.group("table_name"):
1442+
header_params["table_name"] = regex_match.group("table_name")
14531443

14541444
if header_params:
14551445
metadata = tuple(metadata) + (
@@ -1700,13 +1690,11 @@ def read_modify_write_row(
17001690
header_params["app_profile_id"] = request.app_profile_id
17011691

17021692
routing_param_regex = re.compile(
1703-
"^(?P<authorized_view_name>projects/[^/]+/instances/[^/]+/tables/[^/]+/authorizedViews/[^/]+)$"
1693+
"^(?P<table_name>projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$"
17041694
)
17051695
regex_match = routing_param_regex.match(request.authorized_view_name)
1706-
if regex_match and regex_match.group("authorized_view_name"):
1707-
header_params["authorized_view_name"] = regex_match.group(
1708-
"authorized_view_name"
1709-
)
1696+
if regex_match and regex_match.group("table_name"):
1697+
header_params["table_name"] = regex_match.group("table_name")
17101698

17111699
if header_params:
17121700
metadata = tuple(metadata) + (

‎google/cloud/bigtable_v2/types/types.py‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ class Type(proto.Message):
119119
map_type (google.cloud.bigtable_v2.types.Type.Map):
120120
Map
121121
122+
This field is a member of `oneof`_ ``kind``.
123+
proto_type (google.cloud.bigtable_v2.types.Type.Proto):
124+
Proto
125+
126+
This field is a member of `oneof`_ ``kind``.
127+
enum_type (google.cloud.bigtable_v2.types.Type.Enum):
128+
Enum
129+
122130
This field is a member of `oneof`_ ``kind``.
123131
"""
124132

@@ -351,6 +359,52 @@ class Field(proto.Message):
351359
message="Type.Struct.Field",
352360
)
353361

362+
class Proto(proto.Message):
363+
r"""A protobuf message type. Values of type ``Proto`` are stored in
364+
``Value.bytes_value``.
365+
366+
Attributes:
367+
schema_bundle_id (str):
368+
The ID of the schema bundle that this proto
369+
is defined in.
370+
message_name (str):
371+
The fully qualified name of the protobuf
372+
message, including package. In the format of
373+
"foo.bar.Message".
374+
"""
375+
376+
schema_bundle_id: str = proto.Field(
377+
proto.STRING,
378+
number=1,
379+
)
380+
message_name: str = proto.Field(
381+
proto.STRING,
382+
number=2,
383+
)
384+
385+
class Enum(proto.Message):
386+
r"""A protobuf enum type. Values of type ``Enum`` are stored in
387+
``Value.int_value``.
388+
389+
Attributes:
390+
schema_bundle_id (str):
391+
The ID of the schema bundle that this enum is
392+
defined in.
393+
enum_name (str):
394+
The fully qualified name of the protobuf enum
395+
message, including package. In the format of
396+
"foo.bar.EnumMessage".
397+
"""
398+
399+
schema_bundle_id: str = proto.Field(
400+
proto.STRING,
401+
number=1,
402+
)
403+
enum_name: str = proto.Field(
404+
proto.STRING,
405+
number=2,
406+
)
407+
354408
class Array(proto.Message):
355409
r"""An ordered list of elements of a given type. Values of type
356410
``Array`` are stored in ``Value.array_value``.
@@ -574,6 +628,18 @@ class HyperLogLogPlusPlusUniqueCount(proto.Message):
574628
oneof="kind",
575629
message=Map,
576630
)
631+
proto_type: Proto = proto.Field(
632+
proto.MESSAGE,
633+
number=13,
634+
oneof="kind",
635+
message=Proto,
636+
)
637+
enum_type: Enum = proto.Field(
638+
proto.MESSAGE,
639+
number=14,
640+
oneof="kind",
641+
message=Enum,
642+
)
577643

578644

579645
__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.

0 commit comments

Comments
 (0)