Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
54 changes: 27 additions & 27 deletions google/pubsub_v1/services/publisher/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,17 @@ async def create_topic(

from google import pubsub_v1

def sample_create_topic():
async def sample_create_topic():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.Topic(
name="name_value",
)

# Make the request
response = client.create_topic(request=request)
response = await client.create_topic(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -332,9 +332,9 @@ async def update_topic(

from google import pubsub_v1

def sample_update_topic():
async def sample_update_topic():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
topic = pubsub_v1.Topic()
Expand All @@ -345,7 +345,7 @@ def sample_update_topic():
)

# Make the request
response = client.update_topic(request=request)
response = await client.update_topic(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -420,17 +420,17 @@ async def publish(

from google import pubsub_v1

def sample_publish():
async def sample_publish():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.PublishRequest(
topic="topic_value",
)

# Make the request
response = client.publish(request=request)
response = await client.publish(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -536,17 +536,17 @@ async def get_topic(

from google import pubsub_v1

def sample_get_topic():
async def sample_get_topic():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.GetTopicRequest(
topic="topic_value",
)

# Make the request
response = client.get_topic(request=request)
response = await client.get_topic(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -640,9 +640,9 @@ async def list_topics(

from google import pubsub_v1

def sample_list_topics():
async def sample_list_topics():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.ListTopicsRequest(
Expand All @@ -653,7 +653,7 @@ def sample_list_topics():
page_result = client.list_topics(request=request)

# Handle the response
for response in page_result:
async for response in page_result:
print(response)

Args:
Expand Down Expand Up @@ -759,9 +759,9 @@ async def list_topic_subscriptions(

from google import pubsub_v1

def sample_list_topic_subscriptions():
async def sample_list_topic_subscriptions():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.ListTopicSubscriptionsRequest(
Expand All @@ -772,7 +772,7 @@ def sample_list_topic_subscriptions():
page_result = client.list_topic_subscriptions(request=request)

# Handle the response
for response in page_result:
async for response in page_result:
print(response)

Args:
Expand Down Expand Up @@ -884,9 +884,9 @@ async def list_topic_snapshots(

from google import pubsub_v1

def sample_list_topic_snapshots():
async def sample_list_topic_snapshots():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.ListTopicSnapshotsRequest(
Expand All @@ -897,7 +897,7 @@ def sample_list_topic_snapshots():
page_result = client.list_topic_snapshots(request=request)

# Handle the response
for response in page_result:
async for response in page_result:
print(response)

Args:
Expand Down Expand Up @@ -1009,17 +1009,17 @@ async def delete_topic(

from google import pubsub_v1

def sample_delete_topic():
async def sample_delete_topic():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.DeleteTopicRequest(
topic="topic_value",
)

# Make the request
client.delete_topic(request=request)
await client.delete_topic(request=request)

Args:
request (Union[google.pubsub_v1.types.DeleteTopicRequest, dict]):
Expand Down Expand Up @@ -1105,17 +1105,17 @@ async def detach_subscription(

from google import pubsub_v1

def sample_detach_subscription():
async def sample_detach_subscription():
# Create a client
client = pubsub_v1.PublisherClient()
client = pubsub_v1.PublisherAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.DetachSubscriptionRequest(
subscription="subscription_value",
)

# Make the request
response = client.detach_subscription(request=request)
response = await client.detach_subscription(request=request)

# Handle the response
print(response)
Expand Down
36 changes: 18 additions & 18 deletions google/pubsub_v1/services/schema_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ async def create_schema(

from google import pubsub_v1

def sample_create_schema():
async def sample_create_schema():
# Create a client
client = pubsub_v1.SchemaServiceClient()
client = pubsub_v1.SchemaServiceAsyncClient()

# Initialize request argument(s)
schema = pubsub_v1.Schema()
Expand All @@ -236,7 +236,7 @@ def sample_create_schema():
)

# Make the request
response = client.create_schema(request=request)
response = await client.create_schema(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -343,17 +343,17 @@ async def get_schema(

from google import pubsub_v1

def sample_get_schema():
async def sample_get_schema():
# Create a client
client = pubsub_v1.SchemaServiceClient()
client = pubsub_v1.SchemaServiceAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.GetSchemaRequest(
name="name_value",
)

# Make the request
response = client.get_schema(request=request)
response = await client.get_schema(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -435,9 +435,9 @@ async def list_schemas(

from google import pubsub_v1

def sample_list_schemas():
async def sample_list_schemas():
# Create a client
client = pubsub_v1.SchemaServiceClient()
client = pubsub_v1.SchemaServiceAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.ListSchemasRequest(
Expand All @@ -448,7 +448,7 @@ def sample_list_schemas():
page_result = client.list_schemas(request=request)

# Handle the response
for response in page_result:
async for response in page_result:
print(response)

Args:
Expand Down Expand Up @@ -542,17 +542,17 @@ async def delete_schema(

from google import pubsub_v1

def sample_delete_schema():
async def sample_delete_schema():
# Create a client
client = pubsub_v1.SchemaServiceClient()
client = pubsub_v1.SchemaServiceAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.DeleteSchemaRequest(
name="name_value",
)

# Make the request
client.delete_schema(request=request)
await client.delete_schema(request=request)

Args:
request (Union[google.pubsub_v1.types.DeleteSchemaRequest, dict]):
Expand Down Expand Up @@ -626,9 +626,9 @@ async def validate_schema(

from google import pubsub_v1

def sample_validate_schema():
async def sample_validate_schema():
# Create a client
client = pubsub_v1.SchemaServiceClient()
client = pubsub_v1.SchemaServiceAsyncClient()

# Initialize request argument(s)
schema = pubsub_v1.Schema()
Expand All @@ -640,7 +640,7 @@ def sample_validate_schema():
)

# Make the request
response = client.validate_schema(request=request)
response = await client.validate_schema(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -733,9 +733,9 @@ async def validate_message(

from google import pubsub_v1

def sample_validate_message():
async def sample_validate_message():
# Create a client
client = pubsub_v1.SchemaServiceClient()
client = pubsub_v1.SchemaServiceAsyncClient()

# Initialize request argument(s)
request = pubsub_v1.ValidateMessageRequest(
Expand All @@ -744,7 +744,7 @@ def sample_validate_message():
)

# Make the request
response = client.validate_message(request=request)
response = await client.validate_message(request=request)

# Handle the response
print(response)
Expand Down
Loading