Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b72522a

Browse files
chore: use gapic-generator-python 0.51.2 (googleapis#505)
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
1 parent 7e623e5 commit b72522a

File tree

13 files changed

+116
-126
lines changed

13 files changed

+116
-126
lines changed

google/pubsub_v1/services/publisher/client.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import functools
1919
import os
2020
import re
21-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
21+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2222
import pkg_resources
2323

2424
from 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,

google/pubsub_v1/services/publisher/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def __init__(
123123
**scopes_kwargs, quota_project_id=quota_project_id
124124
)
125125

126-
# If the credentials is service account credentials, then always try to use self signed JWT.
126+
# If the credentials are service account credentials, then always try to use self signed JWT.
127127
if (
128128
always_use_jwt_access
129129
and isinstance(credentials, service_account.Credentials)

google/pubsub_v1/services/publisher/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ def __init__(
8484
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8585
If provided, it overrides the ``host`` argument and tries to create
8686
a mutual TLS channel with client SSL credentials from
87-
``client_cert_source`` or applicatin default SSL credentials.
87+
``client_cert_source`` or application default SSL credentials.
8888
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8989
Deprecated. A callback to provide client SSL certificate bytes and
9090
private key bytes, both in PEM format. It is ignored if
9191
``api_mtls_endpoint`` is None.
9292
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
93-
for grpc channel. It is ignored if ``channel`` is provided.
93+
for the grpc channel. It is ignored if ``channel`` is provided.
9494
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9595
A callback to provide client certificate bytes and private key bytes,
96-
both in PEM format. It is used to configure mutual TLS channel. It is
96+
both in PEM format. It is used to configure a mutual TLS channel. It is
9797
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9898
quota_project_id (Optional[str]): An optional project to use for billing
9999
and quota.

google/pubsub_v1/services/publisher/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ def __init__(
131131
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
132132
If provided, it overrides the ``host`` argument and tries to create
133133
a mutual TLS channel with client SSL credentials from
134-
``client_cert_source`` or applicatin default SSL credentials.
134+
``client_cert_source`` or application default SSL credentials.
135135
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
136136
Deprecated. A callback to provide client SSL certificate bytes and
137137
private key bytes, both in PEM format. It is ignored if
138138
``api_mtls_endpoint`` is None.
139139
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
140-
for grpc channel. It is ignored if ``channel`` is provided.
140+
for the grpc channel. It is ignored if ``channel`` is provided.
141141
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
142142
A callback to provide client certificate bytes and private key bytes,
143-
both in PEM format. It is used to configure mutual TLS channel. It is
143+
both in PEM format. It is used to configure a mutual TLS channel. It is
144144
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
145145
quota_project_id (Optional[str]): An optional project to use for billing
146146
and quota.

google/pubsub_v1/services/schema_service/client.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -350,7 +350,7 @@ def __init__(
350350

351351
def create_schema(
352352
self,
353-
request: gp_schema.CreateSchemaRequest = None,
353+
request: Union[gp_schema.CreateSchemaRequest, dict] = None,
354354
*,
355355
parent: str = None,
356356
schema: gp_schema.Schema = None,
@@ -362,7 +362,7 @@ def create_schema(
362362
r"""Creates a schema.
363363
364364
Args:
365-
request (google.pubsub_v1.types.CreateSchemaRequest):
365+
request (Union[google.pubsub_v1.types.CreateSchemaRequest, dict]):
366366
The request object. Request for the CreateSchema method.
367367
parent (str):
368368
Required. The name of the project in which to create the
@@ -445,7 +445,7 @@ def create_schema(
445445

446446
def get_schema(
447447
self,
448-
request: schema.GetSchemaRequest = None,
448+
request: Union[schema.GetSchemaRequest, dict] = None,
449449
*,
450450
name: str = None,
451451
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -455,7 +455,7 @@ def get_schema(
455455
r"""Gets a schema.
456456
457457
Args:
458-
request (google.pubsub_v1.types.GetSchemaRequest):
458+
request (Union[google.pubsub_v1.types.GetSchemaRequest, dict]):
459459
The request object. Request for the GetSchema method.
460460
name (str):
461461
Required. The name of the schema to get. Format is
@@ -513,7 +513,7 @@ def get_schema(
513513

514514
def list_schemas(
515515
self,
516-
request: schema.ListSchemasRequest = None,
516+
request: Union[schema.ListSchemasRequest, dict] = None,
517517
*,
518518
parent: str = None,
519519
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -523,7 +523,7 @@ def list_schemas(
523523
r"""Lists schemas in a project.
524524
525525
Args:
526-
request (google.pubsub_v1.types.ListSchemasRequest):
526+
request (Union[google.pubsub_v1.types.ListSchemasRequest, dict]):
527527
The request object. Request for the `ListSchemas`
528528
method.
529529
parent (str):
@@ -592,7 +592,7 @@ def list_schemas(
592592

593593
def delete_schema(
594594
self,
595-
request: schema.DeleteSchemaRequest = None,
595+
request: Union[schema.DeleteSchemaRequest, dict] = None,
596596
*,
597597
name: str = None,
598598
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -602,7 +602,7 @@ def delete_schema(
602602
r"""Deletes a schema.
603603
604604
Args:
605-
request (google.pubsub_v1.types.DeleteSchemaRequest):
605+
request (Union[google.pubsub_v1.types.DeleteSchemaRequest, dict]):
606606
The request object. Request for the `DeleteSchema`
607607
method.
608608
name (str):
@@ -656,7 +656,7 @@ def delete_schema(
656656

657657
def validate_schema(
658658
self,
659-
request: gp_schema.ValidateSchemaRequest = None,
659+
request: Union[gp_schema.ValidateSchemaRequest, dict] = None,
660660
*,
661661
parent: str = None,
662662
schema: gp_schema.Schema = None,
@@ -667,7 +667,7 @@ def validate_schema(
667667
r"""Validates a schema.
668668
669669
Args:
670-
request (google.pubsub_v1.types.ValidateSchemaRequest):
670+
request (Union[google.pubsub_v1.types.ValidateSchemaRequest, dict]):
671671
The request object. Request for the `ValidateSchema`
672672
method.
673673
parent (str):
@@ -737,7 +737,7 @@ def validate_schema(
737737

738738
def validate_message(
739739
self,
740-
request: schema.ValidateMessageRequest = None,
740+
request: Union[schema.ValidateMessageRequest, dict] = None,
741741
*,
742742
retry: retries.Retry = gapic_v1.method.DEFAULT,
743743
timeout: float = None,
@@ -746,7 +746,7 @@ def validate_message(
746746
r"""Validates a message against a schema.
747747
748748
Args:
749-
request (google.pubsub_v1.types.ValidateMessageRequest):
749+
request (Union[google.pubsub_v1.types.ValidateMessageRequest, dict]):
750750
The request object. Request for the `ValidateMessage`
751751
method.
752752
retry (google.api_core.retry.Retry): Designation of what errors, if any,

google/pubsub_v1/services/schema_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(
124124
**scopes_kwargs, quota_project_id=quota_project_id
125125
)
126126

127-
# If the credentials is service account credentials, then always try to use self signed JWT.
127+
# If the credentials are service account credentials, then always try to use self signed JWT.
128128
if (
129129
always_use_jwt_access
130130
and isinstance(credentials, service_account.Credentials)

google/pubsub_v1/services/schema_service/transports/grpc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ def __init__(
8484
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8585
If provided, it overrides the ``host`` argument and tries to create
8686
a mutual TLS channel with client SSL credentials from
87-
``client_cert_source`` or applicatin default SSL credentials.
87+
``client_cert_source`` or application default SSL credentials.
8888
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8989
Deprecated. A callback to provide client SSL certificate bytes and
9090
private key bytes, both in PEM format. It is ignored if
9191
``api_mtls_endpoint`` is None.
9292
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
93-
for grpc channel. It is ignored if ``channel`` is provided.
93+
for the grpc channel. It is ignored if ``channel`` is provided.
9494
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9595
A callback to provide client certificate bytes and private key bytes,
96-
both in PEM format. It is used to configure mutual TLS channel. It is
96+
both in PEM format. It is used to configure a mutual TLS channel. It is
9797
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9898
quota_project_id (Optional[str]): An optional project to use for billing
9999
and quota.

google/pubsub_v1/services/schema_service/transports/grpc_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ def __init__(
131131
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
132132
If provided, it overrides the ``host`` argument and tries to create
133133
a mutual TLS channel with client SSL credentials from
134-
``client_cert_source`` or applicatin default SSL credentials.
134+
``client_cert_source`` or application default SSL credentials.
135135
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
136136
Deprecated. A callback to provide client SSL certificate bytes and
137137
private key bytes, both in PEM format. It is ignored if
138138
``api_mtls_endpoint`` is None.
139139
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
140-
for grpc channel. It is ignored if ``channel`` is provided.
140+
for the grpc channel. It is ignored if ``channel`` is provided.
141141
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
142142
A callback to provide client certificate bytes and private key bytes,
143-
both in PEM format. It is used to configure mutual TLS channel. It is
143+
both in PEM format. It is used to configure a mutual TLS channel. It is
144144
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
145145
quota_project_id (Optional[str]): An optional project to use for billing
146146
and quota.

0 commit comments

Comments
 (0)