Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.2 (#203)
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 28, 2022
1 parent b5f077e commit ad08285
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 @@ -227,17 +227,17 @@ async def create_budget(
from google.cloud.billing import budgets_v1
def sample_create_budget():
async def sample_create_budget():
# Create a client
client = budgets_v1.BudgetServiceClient()
client = budgets_v1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1.CreateBudgetRequest(
parent="parent_value",
)
# Make the request
response = client.create_budget(request=request)
response = await client.create_budget(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -341,16 +341,16 @@ async def update_budget(
from google.cloud.billing import budgets_v1
def sample_update_budget():
async def sample_update_budget():
# Create a client
client = budgets_v1.BudgetServiceClient()
client = budgets_v1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1.UpdateBudgetRequest(
)
# Make the request
response = client.update_budget(request=request)
response = await client.update_budget(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -472,17 +472,17 @@ async def get_budget(
from google.cloud.billing import budgets_v1
def sample_get_budget():
async def sample_get_budget():
# Create a client
client = budgets_v1.BudgetServiceClient()
client = budgets_v1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1.GetBudgetRequest(
name="name_value",
)
# Make the request
response = client.get_budget(request=request)
response = await client.get_budget(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -588,9 +588,9 @@ async def list_budgets(
from google.cloud.billing import budgets_v1
def sample_list_budgets():
async def sample_list_budgets():
# Create a client
client = budgets_v1.BudgetServiceClient()
client = budgets_v1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1.ListBudgetsRequest(
Expand All @@ -601,7 +601,7 @@ def sample_list_budgets():
page_result = client.list_budgets(request=request)
# Handle the response
for response in page_result:
async for response in page_result:
print(response)
Args:
Expand Down Expand Up @@ -706,17 +706,17 @@ async def delete_budget(
from google.cloud.billing import budgets_v1
def sample_delete_budget():
async def sample_delete_budget():
# Create a client
client = budgets_v1.BudgetServiceClient()
client = budgets_v1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1.DeleteBudgetRequest(
name="name_value",
)
# Make the request
client.delete_budget(request=request)
await client.delete_budget(request=request)
Args:
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ async def create_budget(
from google.cloud.billing import budgets_v1beta1
def sample_create_budget():
async def sample_create_budget():
# Create a client
client = budgets_v1beta1.BudgetServiceClient()
client = budgets_v1beta1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1beta1.CreateBudgetRequest(
parent="parent_value",
)
# Make the request
response = client.create_budget(request=request)
response = await client.create_budget(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -306,16 +306,16 @@ async def update_budget(
from google.cloud.billing import budgets_v1beta1
def sample_update_budget():
async def sample_update_budget():
# Create a client
client = budgets_v1beta1.BudgetServiceClient()
client = budgets_v1beta1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1beta1.UpdateBudgetRequest(
)
# Make the request
response = client.update_budget(request=request)
response = await client.update_budget(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -401,17 +401,17 @@ async def get_budget(
from google.cloud.billing import budgets_v1beta1
def sample_get_budget():
async def sample_get_budget():
# Create a client
client = budgets_v1beta1.BudgetServiceClient()
client = budgets_v1beta1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1beta1.GetBudgetRequest(
name="name_value",
)
# Make the request
response = client.get_budget(request=request)
response = await client.get_budget(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -495,9 +495,9 @@ async def list_budgets(
from google.cloud.billing import budgets_v1beta1
def sample_list_budgets():
async def sample_list_budgets():
# Create a client
client = budgets_v1beta1.BudgetServiceClient()
client = budgets_v1beta1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1beta1.ListBudgetsRequest(
Expand All @@ -508,7 +508,7 @@ def sample_list_budgets():
page_result = client.list_budgets(request=request)
# Handle the response
for response in page_result:
async for response in page_result:
print(response)
Args:
Expand Down Expand Up @@ -590,17 +590,17 @@ async def delete_budget(
from google.cloud.billing import budgets_v1beta1
def sample_delete_budget():
async def sample_delete_budget():
# Create a client
client = budgets_v1beta1.BudgetServiceClient()
client = budgets_v1beta1.BudgetServiceAsyncClient()
# Initialize request argument(s)
request = budgets_v1beta1.DeleteBudgetRequest(
name="name_value",
)
# Make the request
client.delete_budget(request=request)
await client.delete_budget(request=request)
Args:
request (Union[google.cloud.billing.budgets_v1beta1.types.DeleteBudgetRequest, dict]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def test_create_budget_field_headers():
# a field header. Set these to a non-empty value.
request = budget_service.CreateBudgetRequest()

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_budget), "__call__") as call:
Expand All @@ -772,7 +772,7 @@ def test_create_budget_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"parent=parent/value",
"parent=parent_value",
) in kw["metadata"]


Expand All @@ -786,7 +786,7 @@ async def test_create_budget_field_headers_async():
# a field header. Set these to a non-empty value.
request = budget_service.CreateBudgetRequest()

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_budget), "__call__") as call:
Expand All @@ -802,7 +802,7 @@ async def test_create_budget_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 @@ -1002,7 +1002,7 @@ def test_update_budget_field_headers():
# a field header. Set these to a non-empty value.
request = budget_service.UpdateBudgetRequest()

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

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


Expand All @@ -1032,7 +1032,7 @@ async def test_update_budget_field_headers_async():
# a field header. Set these to a non-empty value.
request = budget_service.UpdateBudgetRequest()

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

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


Expand Down Expand Up @@ -1248,7 +1248,7 @@ def test_get_budget_field_headers():
# a field header. Set these to a non-empty value.
request = budget_service.GetBudgetRequest()

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_budget), "__call__") as call:
Expand All @@ -1264,7 +1264,7 @@ def test_get_budget_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand All @@ -1278,7 +1278,7 @@ async def test_get_budget_field_headers_async():
# a field header. Set these to a non-empty value.
request = budget_service.GetBudgetRequest()

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_budget), "__call__") as call:
Expand All @@ -1294,7 +1294,7 @@ async def test_get_budget_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 @@ -1476,7 +1476,7 @@ def test_list_budgets_field_headers():
# a field header. Set these to a non-empty value.
request = budget_service.ListBudgetsRequest()

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_budgets), "__call__") as call:
Expand All @@ -1492,7 +1492,7 @@ def test_list_budgets_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"parent=parent/value",
"parent=parent_value",
) in kw["metadata"]


Expand All @@ -1506,7 +1506,7 @@ async def test_list_budgets_field_headers_async():
# a field header. Set these to a non-empty value.
request = budget_service.ListBudgetsRequest()

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_budgets), "__call__") as call:
Expand All @@ -1524,7 +1524,7 @@ async def test_list_budgets_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 @@ -1655,7 +1655,7 @@ def test_list_budgets_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, budget_model.Budget) for i in results)

Expand Down Expand Up @@ -1888,7 +1888,7 @@ def test_delete_budget_field_headers():
# a field header. Set these to a non-empty value.
request = budget_service.DeleteBudgetRequest()

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_budget), "__call__") as call:
Expand All @@ -1904,7 +1904,7 @@ def test_delete_budget_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand All @@ -1918,7 +1918,7 @@ async def test_delete_budget_field_headers_async():
# a field header. Set these to a non-empty value.
request = budget_service.DeleteBudgetRequest()

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_budget), "__call__") as call:
Expand All @@ -1934,7 +1934,7 @@ async def test_delete_budget_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand Down
Loading

0 comments on commit ad08285

Please sign in to comment.