Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.65.2 (#101)
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 849d379 commit e447735
Show file tree
Hide file tree
Showing 18 changed files with 1,589 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ async def launch_flex_template(
from google.cloud import dataflow_v1beta3
def sample_launch_flex_template():
async def sample_launch_flex_template():
# Create a client
client = dataflow_v1beta3.FlexTemplatesServiceClient()
client = dataflow_v1beta3.FlexTemplatesServiceAsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.LaunchFlexTemplateRequest(
)
# Make the request
response = client.launch_flex_template(request=request)
response = await client.launch_flex_template(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -258,6 +258,17 @@ def sample_launch_flex_template():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
)
),
)

# Send the request.
response = await rpc(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,17 @@ def sample_launch_flex_template():
# and friendly error handling.
rpc = self._transport._wrapped_methods[self._transport.launch_flex_template]

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
)
),
)

# Send the request.
response = rpc(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,16 @@ async def create_job(
from google.cloud import dataflow_v1beta3
def sample_create_job():
async def sample_create_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.CreateJobRequest(
)
# Make the request
response = client.create_job(request=request)
response = await client.create_job(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -264,6 +264,17 @@ def sample_create_job():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
)
),
)

# Send the request.
response = await rpc(
request,
Expand Down Expand Up @@ -295,16 +306,16 @@ async def get_job(
from google.cloud import dataflow_v1beta3
def sample_get_job():
async def sample_get_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.GetJobRequest(
)
# Make the request
response = client.get_job(request=request)
response = await client.get_job(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -336,6 +347,18 @@ def sample_get_job():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
("job_id", request.job_id),
)
),
)

# Send the request.
response = await rpc(
request,
Expand Down Expand Up @@ -368,16 +391,16 @@ async def update_job(
from google.cloud import dataflow_v1beta3
def sample_update_job():
async def sample_update_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.UpdateJobRequest(
)
# Make the request
response = client.update_job(request=request)
response = await client.update_job(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -409,6 +432,18 @@ def sample_update_job():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
("job_id", request.job_id),
)
),
)

# Send the request.
response = await rpc(
request,
Expand Down Expand Up @@ -442,9 +477,9 @@ async def list_jobs(
from google.cloud import dataflow_v1beta3
def sample_list_jobs():
async def sample_list_jobs():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.ListJobsRequest(
Expand All @@ -454,7 +489,7 @@ def sample_list_jobs():
page_result = client.list_jobs(request=request)
# Handle the response
for response in page_result:
async for response in page_result:
print(response)
Args:
Expand Down Expand Up @@ -493,6 +528,17 @@ def sample_list_jobs():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
)
),
)

# Send the request.
response = await rpc(
request,
Expand Down Expand Up @@ -527,9 +573,9 @@ async def aggregated_list_jobs(
from google.cloud import dataflow_v1beta3
def sample_aggregated_list_jobs():
async def sample_aggregated_list_jobs():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.ListJobsRequest(
Expand All @@ -539,7 +585,7 @@ def sample_aggregated_list_jobs():
page_result = client.aggregated_list_jobs(request=request)
# Handle the response
for response in page_result:
async for response in page_result:
print(response)
Args:
Expand Down Expand Up @@ -578,6 +624,14 @@ def sample_aggregated_list_jobs():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(("project_id", request.project_id),)
),
)

# Send the request.
response = await rpc(
request,
Expand Down Expand Up @@ -613,16 +667,16 @@ async def check_active_jobs(
from google.cloud import dataflow_v1beta3
def sample_check_active_jobs():
async def sample_check_active_jobs():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.CheckActiveJobsRequest(
)
# Make the request
response = client.check_active_jobs(request=request)
response = await client.check_active_jobs(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -677,16 +731,16 @@ async def snapshot_job(
from google.cloud import dataflow_v1beta3
def sample_snapshot_job():
async def sample_snapshot_job():
# Create a client
client = dataflow_v1beta3.JobsV1Beta3Client()
client = dataflow_v1beta3.JobsV1Beta3AsyncClient()
# Initialize request argument(s)
request = dataflow_v1beta3.SnapshotJobRequest(
)
# Make the request
response = client.snapshot_job(request=request)
response = await client.snapshot_job(request=request)
# Handle the response
print(response)
Expand Down Expand Up @@ -716,6 +770,18 @@ def sample_snapshot_job():
client_info=DEFAULT_CLIENT_INFO,
)

# Certain fields should be provided within the metadata header;
# add these here.
metadata = tuple(metadata) + (
gapic_v1.routing_header.to_grpc_metadata(
(
("project_id", request.project_id),
("location", request.location),
("job_id", request.job_id),
)
),
)

# Send the request.
response = await rpc(
request,
Expand Down
Loading

0 comments on commit e447735

Please sign in to comment.