1818import functools
1919import os
2020import re
21- from typing import Callable , Dict , Optional , Sequence , Tuple , Type , Union
21+ from typing import Dict , Optional , Sequence , Tuple , Type , Union
2222import pkg_resources
2323
2424from google .api_core import client_options as client_options_lib # type: ignore
@@ -407,7 +407,7 @@ def __init__(
407407
408408 def create_topic (
409409 self ,
410- request : pubsub .Topic = None ,
410+ request : Union [ pubsub .Topic , dict ] = None ,
411411 * ,
412412 name : str = None ,
413413 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -420,7 +420,7 @@ def create_topic(
420420
421421
422422 Args:
423- request (google.pubsub_v1.types.Topic):
423+ request (Union[ google.pubsub_v1.types.Topic, dict] ):
424424 The request object. A topic resource.
425425 name (str):
426426 Required. The name of the topic. It must have the format
@@ -485,7 +485,7 @@ def create_topic(
485485
486486 def update_topic (
487487 self ,
488- request : pubsub .UpdateTopicRequest = None ,
488+ request : Union [ pubsub .UpdateTopicRequest , dict ] = None ,
489489 * ,
490490 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
491491 timeout : TimeoutType = gapic_v1 .method .DEFAULT ,
@@ -496,7 +496,7 @@ def update_topic(
496496
497497
498498 Args:
499- request (google.pubsub_v1.types.UpdateTopicRequest):
499+ request (Union[ google.pubsub_v1.types.UpdateTopicRequest, dict] ):
500500 The request object. Request for the UpdateTopic method.
501501 retry (google.api_core.retry.Retry): Designation of what errors, if any,
502502 should be retried.
@@ -537,7 +537,7 @@ def update_topic(
537537
538538 def publish (
539539 self ,
540- request : pubsub .PublishRequest = None ,
540+ request : Union [ pubsub .PublishRequest , dict ] = None ,
541541 * ,
542542 topic : str = None ,
543543 messages : Sequence [pubsub .PubsubMessage ] = None ,
@@ -550,7 +550,7 @@ def publish(
550550
551551
552552 Args:
553- request (google.pubsub_v1.types.PublishRequest):
553+ request (Union[ google.pubsub_v1.types.PublishRequest, dict] ):
554554 The request object. Request for the Publish method.
555555 topic (str):
556556 Required. The messages in the request will be published
@@ -617,7 +617,7 @@ def publish(
617617
618618 def get_topic (
619619 self ,
620- request : pubsub .GetTopicRequest = None ,
620+ request : Union [ pubsub .GetTopicRequest , dict ] = None ,
621621 * ,
622622 topic : str = None ,
623623 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -628,7 +628,7 @@ def get_topic(
628628
629629
630630 Args:
631- request (google.pubsub_v1.types.GetTopicRequest):
631+ request (Union[ google.pubsub_v1.types.GetTopicRequest, dict] ):
632632 The request object. Request for the GetTopic method.
633633 topic (str):
634634 Required. The name of the topic to get. Format is
@@ -687,7 +687,7 @@ def get_topic(
687687
688688 def list_topics (
689689 self ,
690- request : pubsub .ListTopicsRequest = None ,
690+ request : Union [ pubsub .ListTopicsRequest , dict ] = None ,
691691 * ,
692692 project : str = None ,
693693 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -698,7 +698,7 @@ def list_topics(
698698
699699
700700 Args:
701- request (google.pubsub_v1.types.ListTopicsRequest):
701+ request (Union[ google.pubsub_v1.types.ListTopicsRequest, dict] ):
702702 The request object. Request for the `ListTopics` method.
703703 project (str):
704704 Required. The name of the project in which to list
@@ -767,7 +767,7 @@ def list_topics(
767767
768768 def list_topic_subscriptions (
769769 self ,
770- request : pubsub .ListTopicSubscriptionsRequest = None ,
770+ request : Union [ pubsub .ListTopicSubscriptionsRequest , dict ] = None ,
771771 * ,
772772 topic : str = None ,
773773 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -779,7 +779,7 @@ def list_topic_subscriptions(
779779
780780
781781 Args:
782- request (google.pubsub_v1.types.ListTopicSubscriptionsRequest):
782+ request (Union[ google.pubsub_v1.types.ListTopicSubscriptionsRequest, dict] ):
783783 The request object. Request for the
784784 `ListTopicSubscriptions` method.
785785 topic (str):
@@ -850,7 +850,7 @@ def list_topic_subscriptions(
850850
851851 def list_topic_snapshots (
852852 self ,
853- request : pubsub .ListTopicSnapshotsRequest = None ,
853+ request : Union [ pubsub .ListTopicSnapshotsRequest , dict ] = None ,
854854 * ,
855855 topic : str = None ,
856856 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -866,7 +866,7 @@ def list_topic_snapshots(
866866
867867
868868 Args:
869- request (google.pubsub_v1.types.ListTopicSnapshotsRequest):
869+ request (Union[ google.pubsub_v1.types.ListTopicSnapshotsRequest, dict] ):
870870 The request object. Request for the `ListTopicSnapshots`
871871 method.
872872 topic (str):
@@ -937,7 +937,7 @@ def list_topic_snapshots(
937937
938938 def delete_topic (
939939 self ,
940- request : pubsub .DeleteTopicRequest = None ,
940+ request : Union [ pubsub .DeleteTopicRequest , dict ] = None ,
941941 * ,
942942 topic : str = None ,
943943 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -953,7 +953,7 @@ def delete_topic(
953953
954954
955955 Args:
956- request (google.pubsub_v1.types.DeleteTopicRequest):
956+ request (Union[ google.pubsub_v1.types.DeleteTopicRequest, dict] ):
957957 The request object. Request for the `DeleteTopic`
958958 method.
959959 topic (str):
@@ -1008,7 +1008,7 @@ def delete_topic(
10081008
10091009 def detach_subscription (
10101010 self ,
1011- request : pubsub .DetachSubscriptionRequest = None ,
1011+ request : Union [ pubsub .DetachSubscriptionRequest , dict ] = None ,
10121012 * ,
10131013 retry : retries .Retry = gapic_v1 .method .DEFAULT ,
10141014 timeout : TimeoutType = gapic_v1 .method .DEFAULT ,
@@ -1022,7 +1022,7 @@ def detach_subscription(
10221022
10231023
10241024 Args:
1025- request (google.pubsub_v1.types.DetachSubscriptionRequest):
1025+ request (Union[ google.pubsub_v1.types.DetachSubscriptionRequest, dict] ):
10261026 The request object. Request for the DetachSubscription
10271027 method.
10281028 retry (google.api_core.retry.Retry): Designation of what errors, if any,
0 commit comments