Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.2 (#153)
Browse files Browse the repository at this point in the history
* chore: use gapic-generator-python 0.65.2

PiperOrigin-RevId: 444333013

Source-Link: googleapis/googleapis@f91b6cf

Source-Link: googleapis/googleapis-gen@16eb360
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 27, 2022
1 parent 9e05ad1 commit 21b8f5a
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ async def create_workload(
from google.cloud import assuredworkloads_v1
def sample_create_workload():
async def sample_create_workload():
# Create a client
client = assuredworkloads_v1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
workload = assuredworkloads_v1.Workload()
Expand All @@ -249,7 +249,7 @@ def sample_create_workload():
print("Waiting for operation to complete...")
response = operation.result()
response = await operation.result()
# Handle the response
print(response)
Expand Down Expand Up @@ -355,9 +355,9 @@ async def update_workload(
from google.cloud import assuredworkloads_v1
def sample_update_workload():
async def sample_update_workload():
# Create a client
client = assuredworkloads_v1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
workload = assuredworkloads_v1.Workload()
Expand All @@ -370,7 +370,7 @@ def sample_update_workload():
)
# Make the request
response = client.update_workload(request=request)
response = await client.update_workload(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -470,17 +470,17 @@ async def delete_workload(
from google.cloud import assuredworkloads_v1
def sample_delete_workload():
async def sample_delete_workload():
# Create a client
client = assuredworkloads_v1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
request = assuredworkloads_v1.DeleteWorkloadRequest(
name="name_value",
)
# Make the request
client.delete_workload(request=request)
await client.delete_workload(request=request)
Args:
request (Union[google.cloud.assuredworkloads_v1.types.DeleteWorkloadRequest, dict]):
Expand Down Expand Up @@ -553,17 +553,17 @@ async def get_workload(
from google.cloud import assuredworkloads_v1
def sample_get_workload():
async def sample_get_workload():
# Create a client
client = assuredworkloads_v1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
request = assuredworkloads_v1.GetWorkloadRequest(
name="name_value",
)
# Make the request
response = client.get_workload(request=request)
response = await client.get_workload(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -652,9 +652,9 @@ async def list_workloads(
from google.cloud import assuredworkloads_v1
def sample_list_workloads():
async def sample_list_workloads():
# Create a client
client = assuredworkloads_v1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
request = assuredworkloads_v1.ListWorkloadsRequest(
Expand All @@ -665,7 +665,7 @@ def sample_list_workloads():
page_result = client.list_workloads(request=request)
# Handle the response
for response in page_result:
async for response in page_result:
print(response)
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ async def create_workload(
from google.cloud import assuredworkloads_v1beta1
def sample_create_workload():
async def sample_create_workload():
# Create a client
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
workload = assuredworkloads_v1beta1.Workload()
Expand All @@ -250,7 +250,7 @@ def sample_create_workload():
print("Waiting for operation to complete...")
response = operation.result()
response = await operation.result()
# Handle the response
print(response)
Expand Down Expand Up @@ -356,9 +356,9 @@ async def update_workload(
from google.cloud import assuredworkloads_v1beta1
def sample_update_workload():
async def sample_update_workload():
# Create a client
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
workload = assuredworkloads_v1beta1.Workload()
Expand All @@ -370,7 +370,7 @@ def sample_update_workload():
)
# Make the request
response = client.update_workload(request=request)
response = await client.update_workload(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -470,17 +470,17 @@ async def delete_workload(
from google.cloud import assuredworkloads_v1beta1
def sample_delete_workload():
async def sample_delete_workload():
# Create a client
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
request = assuredworkloads_v1beta1.DeleteWorkloadRequest(
name="name_value",
)
# Make the request
client.delete_workload(request=request)
await client.delete_workload(request=request)
Args:
request (Union[google.cloud.assuredworkloads_v1beta1.types.DeleteWorkloadRequest, dict]):
Expand Down Expand Up @@ -562,17 +562,17 @@ async def get_workload(
from google.cloud import assuredworkloads_v1beta1
def sample_get_workload():
async def sample_get_workload():
# Create a client
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
request = assuredworkloads_v1beta1.GetWorkloadRequest(
name="name_value",
)
# Make the request
response = client.get_workload(request=request)
response = await client.get_workload(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -670,9 +670,9 @@ async def list_workloads(
from google.cloud import assuredworkloads_v1beta1
def sample_list_workloads():
async def sample_list_workloads():
# Create a client
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceClient()
client = assuredworkloads_v1beta1.AssuredWorkloadsServiceAsyncClient()
# Initialize request argument(s)
request = assuredworkloads_v1beta1.ListWorkloadsRequest(
Expand All @@ -683,7 +683,7 @@ def sample_list_workloads():
page_result = client.list_workloads(request=request)
# Handle the response
for response in page_result:
async for response in page_result:
print(response)
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def test_create_workload_field_headers():
# a field header. Set these to a non-empty value.
request = assuredworkloads.CreateWorkloadRequest()

request.parent = "parent/value"
request.parent = "parent_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.create_workload), "__call__") as call:
Expand All @@ -792,7 +792,7 @@ def test_create_workload_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"parent=parent/value",
"parent=parent_value",
) in kw["metadata"]


Expand All @@ -806,7 +806,7 @@ async def test_create_workload_field_headers_async():
# a field header. Set these to a non-empty value.
request = assuredworkloads.CreateWorkloadRequest()

request.parent = "parent/value"
request.parent = "parent_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.create_workload), "__call__") as call:
Expand All @@ -824,7 +824,7 @@ async def test_create_workload_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"parent=parent/value",
"parent=parent_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1052,7 +1052,7 @@ def test_update_workload_field_headers():
# a field header. Set these to a non-empty value.
request = assuredworkloads.UpdateWorkloadRequest()

request.workload.name = "workload.name/value"
request.workload.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.update_workload), "__call__") as call:
Expand All @@ -1068,7 +1068,7 @@ def test_update_workload_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"workload.name=workload.name/value",
"workload.name=name_value",
) in kw["metadata"]


Expand All @@ -1082,7 +1082,7 @@ async def test_update_workload_field_headers_async():
# a field header. Set these to a non-empty value.
request = assuredworkloads.UpdateWorkloadRequest()

request.workload.name = "workload.name/value"
request.workload.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.update_workload), "__call__") as call:
Expand All @@ -1100,7 +1100,7 @@ async def test_update_workload_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"workload.name=workload.name/value",
"workload.name=name_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1286,7 +1286,7 @@ def test_delete_workload_field_headers():
# a field header. Set these to a non-empty value.
request = assuredworkloads.DeleteWorkloadRequest()

request.name = "name/value"
request.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.delete_workload), "__call__") as call:
Expand All @@ -1302,7 +1302,7 @@ def test_delete_workload_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand All @@ -1316,7 +1316,7 @@ async def test_delete_workload_field_headers_async():
# a field header. Set these to a non-empty value.
request = assuredworkloads.DeleteWorkloadRequest()

request.name = "name/value"
request.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.delete_workload), "__call__") as call:
Expand All @@ -1332,7 +1332,7 @@ async def test_delete_workload_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1548,7 +1548,7 @@ def test_get_workload_field_headers():
# a field header. Set these to a non-empty value.
request = assuredworkloads.GetWorkloadRequest()

request.name = "name/value"
request.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.get_workload), "__call__") as call:
Expand All @@ -1564,7 +1564,7 @@ def test_get_workload_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand All @@ -1578,7 +1578,7 @@ async def test_get_workload_field_headers_async():
# a field header. Set these to a non-empty value.
request = assuredworkloads.GetWorkloadRequest()

request.name = "name/value"
request.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.get_workload), "__call__") as call:
Expand All @@ -1596,7 +1596,7 @@ async def test_get_workload_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1780,7 +1780,7 @@ def test_list_workloads_field_headers():
# a field header. Set these to a non-empty value.
request = assuredworkloads.ListWorkloadsRequest()

request.parent = "parent/value"
request.parent = "parent_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.list_workloads), "__call__") as call:
Expand All @@ -1796,7 +1796,7 @@ def test_list_workloads_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"parent=parent/value",
"parent=parent_value",
) in kw["metadata"]


Expand All @@ -1810,7 +1810,7 @@ async def test_list_workloads_field_headers_async():
# a field header. Set these to a non-empty value.
request = assuredworkloads.ListWorkloadsRequest()

request.parent = "parent/value"
request.parent = "parent_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.list_workloads), "__call__") as call:
Expand All @@ -1828,7 +1828,7 @@ async def test_list_workloads_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"parent=parent/value",
"parent=parent_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1959,7 +1959,7 @@ def test_list_workloads_pager(transport_name: str = "grpc"):

assert pager._metadata == metadata

results = [i for i in pager]
results = list(pager)
assert len(results) == 6
assert all(isinstance(i, assuredworkloads.Workload) for i in results)

Expand Down
Loading

0 comments on commit 21b8f5a

Please sign in to comment.