Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Jul 27, 2024
1 parent 0963b4c commit d7ddba0
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 82 deletions.
116 changes: 68 additions & 48 deletions google/cloud/bigtable_v2/services/bigtable/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,13 @@ def read_rows(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -441,11 +443,13 @@ def sample_row_keys(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -563,11 +567,13 @@ async def mutate_row(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -679,11 +685,13 @@ def mutate_rows(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -838,11 +846,13 @@ async def check_and_mutate_row(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -936,9 +946,11 @@ async def ping_and_warm(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -1062,11 +1074,13 @@ async def read_modify_write_row(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -1172,11 +1186,13 @@ def generate_initial_change_stream_partitions(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -1274,11 +1290,13 @@ def read_change_stream(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down Expand Up @@ -1377,11 +1395,13 @@ def execute_query(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("instance_name", request.instance_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("instance_name", request.instance_name),)
),
)

# Validate the universe domain.
self._client._validate_universe_domain()
Expand Down
72 changes: 38 additions & 34 deletions google/cloud/bigtable_v2/services/bigtable/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,9 @@ def read_rows(
)

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -933,9 +933,9 @@ def sample_row_keys(
)

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1070,9 +1070,9 @@ def mutate_row(
)

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1201,9 +1201,9 @@ def mutate_rows(
)

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1375,9 +1375,9 @@ def check_and_mutate_row(
)

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1477,9 +1477,9 @@ def ping_and_warm(
header_params["app_profile_id"] = request.app_profile_id

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1620,9 +1620,9 @@ def read_modify_write_row(
)

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1725,11 +1725,13 @@ def generate_initial_change_stream_partitions(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1824,11 +1826,13 @@ def read_change_stream(

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (
gapic_v1.routing_header.to_grpc_metadata(
(("table_name", request.table_name),)
),
)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down Expand Up @@ -1933,9 +1937,9 @@ def execute_query(
header_params["app_profile_id"] = request.app_profile_id

if header_params:
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(header_params),
)
metadata = tuple(metadata)
if all(m[0] != gapic_v1.routing_header.ROUTING_METADATA_KEY for m in metadata):
metadata += (gapic_v1.routing_header.to_grpc_metadata(header_params),)

# Validate the universe domain.
self._validate_universe_domain()
Expand Down

0 comments on commit d7ddba0

Please sign in to comment.