Skip to content

Commit 7b43e94

Browse files
chore: use gapic-generator-python 0.65.2 (googleapis#673)
* chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: googleapis/googleapis@f91b6cf Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 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>
1 parent d3ba0a0 commit 7b43e94

6 files changed

Lines changed: 220 additions & 220 deletions

File tree

google/pubsub_v1/services/publisher/async_client.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,17 @@ async def create_topic(
224224
225225
from google import pubsub_v1
226226
227-
def sample_create_topic():
227+
async def sample_create_topic():
228228
# Create a client
229-
client = pubsub_v1.PublisherClient()
229+
client = pubsub_v1.PublisherAsyncClient()
230230
231231
# Initialize request argument(s)
232232
request = pubsub_v1.Topic(
233233
name="name_value",
234234
)
235235
236236
# Make the request
237-
response = client.create_topic(request=request)
237+
response = await client.create_topic(request=request)
238238
239239
# Handle the response
240240
print(response)
@@ -332,9 +332,9 @@ async def update_topic(
332332
333333
from google import pubsub_v1
334334
335-
def sample_update_topic():
335+
async def sample_update_topic():
336336
# Create a client
337-
client = pubsub_v1.PublisherClient()
337+
client = pubsub_v1.PublisherAsyncClient()
338338
339339
# Initialize request argument(s)
340340
topic = pubsub_v1.Topic()
@@ -345,7 +345,7 @@ def sample_update_topic():
345345
)
346346
347347
# Make the request
348-
response = client.update_topic(request=request)
348+
response = await client.update_topic(request=request)
349349
350350
# Handle the response
351351
print(response)
@@ -420,17 +420,17 @@ async def publish(
420420
421421
from google import pubsub_v1
422422
423-
def sample_publish():
423+
async def sample_publish():
424424
# Create a client
425-
client = pubsub_v1.PublisherClient()
425+
client = pubsub_v1.PublisherAsyncClient()
426426
427427
# Initialize request argument(s)
428428
request = pubsub_v1.PublishRequest(
429429
topic="topic_value",
430430
)
431431
432432
# Make the request
433-
response = client.publish(request=request)
433+
response = await client.publish(request=request)
434434
435435
# Handle the response
436436
print(response)
@@ -536,17 +536,17 @@ async def get_topic(
536536
537537
from google import pubsub_v1
538538
539-
def sample_get_topic():
539+
async def sample_get_topic():
540540
# Create a client
541-
client = pubsub_v1.PublisherClient()
541+
client = pubsub_v1.PublisherAsyncClient()
542542
543543
# Initialize request argument(s)
544544
request = pubsub_v1.GetTopicRequest(
545545
topic="topic_value",
546546
)
547547
548548
# Make the request
549-
response = client.get_topic(request=request)
549+
response = await client.get_topic(request=request)
550550
551551
# Handle the response
552552
print(response)
@@ -640,9 +640,9 @@ async def list_topics(
640640
641641
from google import pubsub_v1
642642
643-
def sample_list_topics():
643+
async def sample_list_topics():
644644
# Create a client
645-
client = pubsub_v1.PublisherClient()
645+
client = pubsub_v1.PublisherAsyncClient()
646646
647647
# Initialize request argument(s)
648648
request = pubsub_v1.ListTopicsRequest(
@@ -653,7 +653,7 @@ def sample_list_topics():
653653
page_result = client.list_topics(request=request)
654654
655655
# Handle the response
656-
for response in page_result:
656+
async for response in page_result:
657657
print(response)
658658
659659
Args:
@@ -759,9 +759,9 @@ async def list_topic_subscriptions(
759759
760760
from google import pubsub_v1
761761
762-
def sample_list_topic_subscriptions():
762+
async def sample_list_topic_subscriptions():
763763
# Create a client
764-
client = pubsub_v1.PublisherClient()
764+
client = pubsub_v1.PublisherAsyncClient()
765765
766766
# Initialize request argument(s)
767767
request = pubsub_v1.ListTopicSubscriptionsRequest(
@@ -772,7 +772,7 @@ def sample_list_topic_subscriptions():
772772
page_result = client.list_topic_subscriptions(request=request)
773773
774774
# Handle the response
775-
for response in page_result:
775+
async for response in page_result:
776776
print(response)
777777
778778
Args:
@@ -884,9 +884,9 @@ async def list_topic_snapshots(
884884
885885
from google import pubsub_v1
886886
887-
def sample_list_topic_snapshots():
887+
async def sample_list_topic_snapshots():
888888
# Create a client
889-
client = pubsub_v1.PublisherClient()
889+
client = pubsub_v1.PublisherAsyncClient()
890890
891891
# Initialize request argument(s)
892892
request = pubsub_v1.ListTopicSnapshotsRequest(
@@ -897,7 +897,7 @@ def sample_list_topic_snapshots():
897897
page_result = client.list_topic_snapshots(request=request)
898898
899899
# Handle the response
900-
for response in page_result:
900+
async for response in page_result:
901901
print(response)
902902
903903
Args:
@@ -1009,17 +1009,17 @@ async def delete_topic(
10091009
10101010
from google import pubsub_v1
10111011
1012-
def sample_delete_topic():
1012+
async def sample_delete_topic():
10131013
# Create a client
1014-
client = pubsub_v1.PublisherClient()
1014+
client = pubsub_v1.PublisherAsyncClient()
10151015
10161016
# Initialize request argument(s)
10171017
request = pubsub_v1.DeleteTopicRequest(
10181018
topic="topic_value",
10191019
)
10201020
10211021
# Make the request
1022-
client.delete_topic(request=request)
1022+
await client.delete_topic(request=request)
10231023
10241024
Args:
10251025
request (Union[google.pubsub_v1.types.DeleteTopicRequest, dict]):
@@ -1105,17 +1105,17 @@ async def detach_subscription(
11051105
11061106
from google import pubsub_v1
11071107
1108-
def sample_detach_subscription():
1108+
async def sample_detach_subscription():
11091109
# Create a client
1110-
client = pubsub_v1.PublisherClient()
1110+
client = pubsub_v1.PublisherAsyncClient()
11111111
11121112
# Initialize request argument(s)
11131113
request = pubsub_v1.DetachSubscriptionRequest(
11141114
subscription="subscription_value",
11151115
)
11161116
11171117
# Make the request
1118-
response = client.detach_subscription(request=request)
1118+
response = await client.detach_subscription(request=request)
11191119
11201120
# Handle the response
11211121
print(response)

google/pubsub_v1/services/schema_service/async_client.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ async def create_schema(
222222
223223
from google import pubsub_v1
224224
225-
def sample_create_schema():
225+
async def sample_create_schema():
226226
# Create a client
227-
client = pubsub_v1.SchemaServiceClient()
227+
client = pubsub_v1.SchemaServiceAsyncClient()
228228
229229
# Initialize request argument(s)
230230
schema = pubsub_v1.Schema()
@@ -236,7 +236,7 @@ def sample_create_schema():
236236
)
237237
238238
# Make the request
239-
response = client.create_schema(request=request)
239+
response = await client.create_schema(request=request)
240240
241241
# Handle the response
242242
print(response)
@@ -343,17 +343,17 @@ async def get_schema(
343343
344344
from google import pubsub_v1
345345
346-
def sample_get_schema():
346+
async def sample_get_schema():
347347
# Create a client
348-
client = pubsub_v1.SchemaServiceClient()
348+
client = pubsub_v1.SchemaServiceAsyncClient()
349349
350350
# Initialize request argument(s)
351351
request = pubsub_v1.GetSchemaRequest(
352352
name="name_value",
353353
)
354354
355355
# Make the request
356-
response = client.get_schema(request=request)
356+
response = await client.get_schema(request=request)
357357
358358
# Handle the response
359359
print(response)
@@ -435,9 +435,9 @@ async def list_schemas(
435435
436436
from google import pubsub_v1
437437
438-
def sample_list_schemas():
438+
async def sample_list_schemas():
439439
# Create a client
440-
client = pubsub_v1.SchemaServiceClient()
440+
client = pubsub_v1.SchemaServiceAsyncClient()
441441
442442
# Initialize request argument(s)
443443
request = pubsub_v1.ListSchemasRequest(
@@ -448,7 +448,7 @@ def sample_list_schemas():
448448
page_result = client.list_schemas(request=request)
449449
450450
# Handle the response
451-
for response in page_result:
451+
async for response in page_result:
452452
print(response)
453453
454454
Args:
@@ -542,17 +542,17 @@ async def delete_schema(
542542
543543
from google import pubsub_v1
544544
545-
def sample_delete_schema():
545+
async def sample_delete_schema():
546546
# Create a client
547-
client = pubsub_v1.SchemaServiceClient()
547+
client = pubsub_v1.SchemaServiceAsyncClient()
548548
549549
# Initialize request argument(s)
550550
request = pubsub_v1.DeleteSchemaRequest(
551551
name="name_value",
552552
)
553553
554554
# Make the request
555-
client.delete_schema(request=request)
555+
await client.delete_schema(request=request)
556556
557557
Args:
558558
request (Union[google.pubsub_v1.types.DeleteSchemaRequest, dict]):
@@ -626,9 +626,9 @@ async def validate_schema(
626626
627627
from google import pubsub_v1
628628
629-
def sample_validate_schema():
629+
async def sample_validate_schema():
630630
# Create a client
631-
client = pubsub_v1.SchemaServiceClient()
631+
client = pubsub_v1.SchemaServiceAsyncClient()
632632
633633
# Initialize request argument(s)
634634
schema = pubsub_v1.Schema()
@@ -640,7 +640,7 @@ def sample_validate_schema():
640640
)
641641
642642
# Make the request
643-
response = client.validate_schema(request=request)
643+
response = await client.validate_schema(request=request)
644644
645645
# Handle the response
646646
print(response)
@@ -733,9 +733,9 @@ async def validate_message(
733733
734734
from google import pubsub_v1
735735
736-
def sample_validate_message():
736+
async def sample_validate_message():
737737
# Create a client
738-
client = pubsub_v1.SchemaServiceClient()
738+
client = pubsub_v1.SchemaServiceAsyncClient()
739739
740740
# Initialize request argument(s)
741741
request = pubsub_v1.ValidateMessageRequest(
@@ -744,7 +744,7 @@ def sample_validate_message():
744744
)
745745
746746
# Make the request
747-
response = client.validate_message(request=request)
747+
response = await client.validate_message(request=request)
748748
749749
# Handle the response
750750
print(response)

0 commit comments

Comments
 (0)