|
27 | 27 | Type, |
28 | 28 | Union, |
29 | 29 | ) |
30 | | -importpkg_resources |
| 30 | + |
| 31 | +fromgoogle.pubsub_v1importgapic_versionaspackage_version |
31 | 32 |
|
32 | 33 | fromgoogle.api_core.client_optionsimportClientOptions |
33 | 34 | fromgoogle.api_coreimportexceptionsascore_exceptions |
@@ -223,7 +224,7 @@ async def create_schema( |
223 | 224 | schema:Optional[gp_schema.Schema]=None, |
224 | 225 | schema_id:Optional[str]=None, |
225 | 226 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
226 | | -timeout:Optional[float]=None, |
| 227 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
227 | 228 | metadata:Sequence[Tuple[str,str]]= (), |
228 | 229 | )->gp_schema.Schema: |
229 | 230 | r"""Creates a schema. |
@@ -351,7 +352,7 @@ async def get_schema( |
351 | 352 | *, |
352 | 353 | name:Optional[str]=None, |
353 | 354 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
354 | | -timeout:Optional[float]=None, |
| 355 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
355 | 356 | metadata:Sequence[Tuple[str,str]]= (), |
356 | 357 | )->schema.Schema: |
357 | 358 | r"""Gets a schema. |
@@ -450,7 +451,7 @@ async def list_schemas( |
450 | 451 | *, |
451 | 452 | parent:Optional[str]=None, |
452 | 453 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
453 | | -timeout:Optional[float]=None, |
| 454 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
454 | 455 | metadata:Sequence[Tuple[str,str]]= (), |
455 | 456 | )->pagers.ListSchemasAsyncPager: |
456 | 457 | r"""Lists schemas in a project. |
@@ -564,7 +565,7 @@ async def delete_schema( |
564 | 565 | *, |
565 | 566 | name:Optional[str]=None, |
566 | 567 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
567 | | -timeout:Optional[float]=None, |
| 568 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
568 | 569 | metadata:Sequence[Tuple[str,str]]= (), |
569 | 570 | )->None: |
570 | 571 | r"""Deletes a schema. |
@@ -655,7 +656,7 @@ async def validate_schema( |
655 | 656 | parent:Optional[str]=None, |
656 | 657 | schema:Optional[gp_schema.Schema]=None, |
657 | 658 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
658 | | -timeout:Optional[float]=None, |
| 659 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
659 | 660 | metadata:Sequence[Tuple[str,str]]= (), |
660 | 661 | )->gp_schema.ValidateSchemaResponse: |
661 | 662 | r"""Validates a schema. |
@@ -769,7 +770,7 @@ async def validate_message( |
769 | 770 | request:Optional[Union[schema.ValidateMessageRequest,dict]]=None, |
770 | 771 | *, |
771 | 772 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
772 | | -timeout:Optional[float]=None, |
| 773 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
773 | 774 | metadata:Sequence[Tuple[str,str]]= (), |
774 | 775 | )->schema.ValidateMessageResponse: |
775 | 776 | r"""Validates a message against a schema. |
@@ -850,7 +851,7 @@ async def set_iam_policy( |
850 | 851 | request:Optional[iam_policy_pb2.SetIamPolicyRequest]=None, |
851 | 852 | *, |
852 | 853 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
853 | | -timeout:Optional[float]=None, |
| 854 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
854 | 855 | metadata:Sequence[Tuple[str,str]]= (), |
855 | 856 | )->policy_pb2.Policy: |
856 | 857 | r"""Sets the IAM access control policy on the specified function. |
@@ -969,7 +970,7 @@ async def get_iam_policy( |
969 | 970 | request:Optional[iam_policy_pb2.GetIamPolicyRequest]=None, |
970 | 971 | *, |
971 | 972 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
972 | | -timeout:Optional[float]=None, |
| 973 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
973 | 974 | metadata:Sequence[Tuple[str,str]]= (), |
974 | 975 | )->policy_pb2.Policy: |
975 | 976 | r"""Gets the IAM access control policy for a function. |
@@ -1090,7 +1091,7 @@ async def test_iam_permissions( |
1090 | 1091 | request:Optional[iam_policy_pb2.TestIamPermissionsRequest]=None, |
1091 | 1092 | *, |
1092 | 1093 | retry:OptionalRetry=gapic_v1.method.DEFAULT, |
1093 | | -timeout:Optional[float]=None, |
| 1094 | +timeout:Union[float,object]=gapic_v1.method.DEFAULT, |
1094 | 1095 | metadata:Sequence[Tuple[str,str]]= (), |
1095 | 1096 | )->iam_policy_pb2.TestIamPermissionsResponse: |
1096 | 1097 | r"""Tests the specified permissions against the IAM access control |
@@ -1151,14 +1152,9 @@ async def __aexit__(self, exc_type, exc, tb): |
1151 | 1152 | awaitself.transport.close() |
1152 | 1153 |
|
1153 | 1154 |
|
1154 | | -try: |
1155 | | -DEFAULT_CLIENT_INFO=gapic_v1.client_info.ClientInfo( |
1156 | | -client_library_version=pkg_resources.get_distribution( |
1157 | | -"google-cloud-pubsub", |
1158 | | - ).version, |
1159 | | - ) |
1160 | | -exceptpkg_resources.DistributionNotFound: |
1161 | | -DEFAULT_CLIENT_INFO=gapic_v1.client_info.ClientInfo() |
| 1155 | +DEFAULT_CLIENT_INFO=gapic_v1.client_info.ClientInfo( |
| 1156 | +client_library_version=package_version.__version__ |
| 1157 | +) |
1162 | 1158 |
|
1163 | 1159 |
|
1164 | 1160 | __all__= ("SchemaServiceAsyncClient",) |