18
18
import functools
19
19
import os
20
20
import re
21
- from typing import Callable , Dict , Optional , Sequence , Tuple , Type , Union
21
+ from typing import Dict , Optional , Sequence , Tuple , Type , Union
22
22
import pkg_resources
23
23
24
24
from google .api_core import client_options as client_options_lib # type: ignore
@@ -407,7 +407,7 @@ def __init__(
407
407
408
408
def create_topic (
409
409
self ,
410
- request : pubsub .Topic = None ,
410
+ request : Union [ pubsub .Topic , dict ] = None ,
411
411
* ,
412
412
name : str = None ,
413
413
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -420,7 +420,7 @@ def create_topic(
420
420
421
421
422
422
Args:
423
- request (google.pubsub_v1.types.Topic):
423
+ request (Union[ google.pubsub_v1.types.Topic, dict] ):
424
424
The request object. A topic resource.
425
425
name (str):
426
426
Required. The name of the topic. It must have the format
@@ -485,7 +485,7 @@ def create_topic(
485
485
486
486
def update_topic (
487
487
self ,
488
- request : pubsub .UpdateTopicRequest = None ,
488
+ request : Union [ pubsub .UpdateTopicRequest , dict ] = None ,
489
489
* ,
490
490
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
491
491
timeout : TimeoutType = gapic_v1 .method .DEFAULT ,
@@ -496,7 +496,7 @@ def update_topic(
496
496
497
497
498
498
Args:
499
- request (google.pubsub_v1.types.UpdateTopicRequest):
499
+ request (Union[ google.pubsub_v1.types.UpdateTopicRequest, dict] ):
500
500
The request object. Request for the UpdateTopic method.
501
501
retry (google.api_core.retry.Retry): Designation of what errors, if any,
502
502
should be retried.
@@ -537,7 +537,7 @@ def update_topic(
537
537
538
538
def publish (
539
539
self ,
540
- request : pubsub .PublishRequest = None ,
540
+ request : Union [ pubsub .PublishRequest , dict ] = None ,
541
541
* ,
542
542
topic : str = None ,
543
543
messages : Sequence [pubsub .PubsubMessage ] = None ,
@@ -550,7 +550,7 @@ def publish(
550
550
551
551
552
552
Args:
553
- request (google.pubsub_v1.types.PublishRequest):
553
+ request (Union[ google.pubsub_v1.types.PublishRequest, dict] ):
554
554
The request object. Request for the Publish method.
555
555
topic (str):
556
556
Required. The messages in the request will be published
@@ -617,7 +617,7 @@ def publish(
617
617
618
618
def get_topic (
619
619
self ,
620
- request : pubsub .GetTopicRequest = None ,
620
+ request : Union [ pubsub .GetTopicRequest , dict ] = None ,
621
621
* ,
622
622
topic : str = None ,
623
623
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -628,7 +628,7 @@ def get_topic(
628
628
629
629
630
630
Args:
631
- request (google.pubsub_v1.types.GetTopicRequest):
631
+ request (Union[ google.pubsub_v1.types.GetTopicRequest, dict] ):
632
632
The request object. Request for the GetTopic method.
633
633
topic (str):
634
634
Required. The name of the topic to get. Format is
@@ -687,7 +687,7 @@ def get_topic(
687
687
688
688
def list_topics (
689
689
self ,
690
- request : pubsub .ListTopicsRequest = None ,
690
+ request : Union [ pubsub .ListTopicsRequest , dict ] = None ,
691
691
* ,
692
692
project : str = None ,
693
693
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -698,7 +698,7 @@ def list_topics(
698
698
699
699
700
700
Args:
701
- request (google.pubsub_v1.types.ListTopicsRequest):
701
+ request (Union[ google.pubsub_v1.types.ListTopicsRequest, dict] ):
702
702
The request object. Request for the `ListTopics` method.
703
703
project (str):
704
704
Required. The name of the project in which to list
@@ -767,7 +767,7 @@ def list_topics(
767
767
768
768
def list_topic_subscriptions (
769
769
self ,
770
- request : pubsub .ListTopicSubscriptionsRequest = None ,
770
+ request : Union [ pubsub .ListTopicSubscriptionsRequest , dict ] = None ,
771
771
* ,
772
772
topic : str = None ,
773
773
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -779,7 +779,7 @@ def list_topic_subscriptions(
779
779
780
780
781
781
Args:
782
- request (google.pubsub_v1.types.ListTopicSubscriptionsRequest):
782
+ request (Union[ google.pubsub_v1.types.ListTopicSubscriptionsRequest, dict] ):
783
783
The request object. Request for the
784
784
`ListTopicSubscriptions` method.
785
785
topic (str):
@@ -850,7 +850,7 @@ def list_topic_subscriptions(
850
850
851
851
def list_topic_snapshots (
852
852
self ,
853
- request : pubsub .ListTopicSnapshotsRequest = None ,
853
+ request : Union [ pubsub .ListTopicSnapshotsRequest , dict ] = None ,
854
854
* ,
855
855
topic : str = None ,
856
856
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -866,7 +866,7 @@ def list_topic_snapshots(
866
866
867
867
868
868
Args:
869
- request (google.pubsub_v1.types.ListTopicSnapshotsRequest):
869
+ request (Union[ google.pubsub_v1.types.ListTopicSnapshotsRequest, dict] ):
870
870
The request object. Request for the `ListTopicSnapshots`
871
871
method.
872
872
topic (str):
@@ -937,7 +937,7 @@ def list_topic_snapshots(
937
937
938
938
def delete_topic (
939
939
self ,
940
- request : pubsub .DeleteTopicRequest = None ,
940
+ request : Union [ pubsub .DeleteTopicRequest , dict ] = None ,
941
941
* ,
942
942
topic : str = None ,
943
943
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
@@ -953,7 +953,7 @@ def delete_topic(
953
953
954
954
955
955
Args:
956
- request (google.pubsub_v1.types.DeleteTopicRequest):
956
+ request (Union[ google.pubsub_v1.types.DeleteTopicRequest, dict] ):
957
957
The request object. Request for the `DeleteTopic`
958
958
method.
959
959
topic (str):
@@ -1008,7 +1008,7 @@ def delete_topic(
1008
1008
1009
1009
def detach_subscription (
1010
1010
self ,
1011
- request : pubsub .DetachSubscriptionRequest = None ,
1011
+ request : Union [ pubsub .DetachSubscriptionRequest , dict ] = None ,
1012
1012
* ,
1013
1013
retry : retries .Retry = gapic_v1 .method .DEFAULT ,
1014
1014
timeout : TimeoutType = gapic_v1 .method .DEFAULT ,
@@ -1022,7 +1022,7 @@ def detach_subscription(
1022
1022
1023
1023
1024
1024
Args:
1025
- request (google.pubsub_v1.types.DetachSubscriptionRequest):
1025
+ request (Union[ google.pubsub_v1.types.DetachSubscriptionRequest, dict] ):
1026
1026
The request object. Request for the DetachSubscription
1027
1027
method.
1028
1028
retry (google.api_core.retry.Retry): Designation of what errors, if any,
0 commit comments