Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
avoid re-creating proto
  • Loading branch information
daniel-sanche committed Sep 7, 2023
commit 27f655ab2fb61ae850ad34c269b41a4ef2a765fc
27 changes: 18 additions & 9 deletions google/cloud/bigtable_v2/services/bigtable/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def read_rows(
"the individual field arguments should be set."
)

request = bigtable.ReadRowsRequest(request)
if not isinstance(request, bigtable.ReadRowsRequest):
request = bigtable.ReadRowsRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -362,7 +363,8 @@ def sample_row_keys(
"the individual field arguments should be set."
)

request = bigtable.SampleRowKeysRequest(request)
if not isinstance(request, bigtable.SampleRowKeysRequest):
request = bigtable.SampleRowKeysRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -469,7 +471,8 @@ async def mutate_row(
"the individual field arguments should be set."
)

request = bigtable.MutateRowRequest(request)
if not isinstance(request, bigtable.MutateRowRequest):
request = bigtable.MutateRowRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -577,7 +580,8 @@ def mutate_rows(
"the individual field arguments should be set."
)

request = bigtable.MutateRowsRequest(request)
if not isinstance(request, bigtable.MutateRowsRequest):
request = bigtable.MutateRowsRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -721,7 +725,8 @@ async def check_and_mutate_row(
"the individual field arguments should be set."
)

request = bigtable.CheckAndMutateRowRequest(request)
if not isinstance(request, bigtable.CheckAndMutateRowRequest):
request = bigtable.CheckAndMutateRowRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -819,7 +824,8 @@ async def ping_and_warm(
"the individual field arguments should be set."
)

request = bigtable.PingAndWarmRequest(request)
if not isinstance(request, bigtable.PingAndWarmRequest):
request = bigtable.PingAndWarmRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -932,7 +938,8 @@ async def read_modify_write_row(
"the individual field arguments should be set."
)

request = bigtable.ReadModifyWriteRowRequest(request)
if not isinstance(request, bigtable.ReadModifyWriteRowRequest):
request = bigtable.ReadModifyWriteRowRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -1036,7 +1043,8 @@ def generate_initial_change_stream_partitions(
"the individual field arguments should be set."
)

request = bigtable.GenerateInitialChangeStreamPartitionsRequest(request)
if not isinstance(request, bigtable.GenerateInitialChangeStreamPartitionsRequest):
request = bigtable.GenerateInitialChangeStreamPartitionsRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down Expand Up @@ -1134,7 +1142,8 @@ def read_change_stream(
"the individual field arguments should be set."
)

request = bigtable.ReadChangeStreamRequest(request)
if not isinstance(request, bigtable.ReadChangeStreamRequest):
request = bigtable.ReadChangeStreamRequest(request)

# If we have keyword arguments corresponding to fields on the
# request, apply these.
Expand Down