|
34 | 34 | from google.api_core.client_options import ClientOptions |
35 | 35 | from google.auth import credentials as ga_credentials # type: ignore |
36 | 36 | from google.oauth2 import service_account # type: ignore |
37 | | -import pkg_resources |
| 37 | + |
| 38 | +from google.cloud.bigquery_data_exchange_v1beta1 import gapic_version as package_version |
38 | 39 |
|
39 | 40 | try: |
40 | 41 | OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] |
@@ -240,7 +241,7 @@ async def list_data_exchanges( |
240 | 241 | *, |
241 | 242 | parent: Optional[str] = None, |
242 | 243 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
243 | | - timeout: Optional[float] = None, |
| 244 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
244 | 245 | metadata: Sequence[Tuple[str, str]] = (), |
245 | 246 | ) -> pagers.ListDataExchangesAsyncPager: |
246 | 247 | r"""Lists all data exchanges in a given project and |
@@ -356,7 +357,7 @@ async def list_org_data_exchanges( |
356 | 357 | *, |
357 | 358 | organization: Optional[str] = None, |
358 | 359 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
359 | | - timeout: Optional[float] = None, |
| 360 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
360 | 361 | metadata: Sequence[Tuple[str, str]] = (), |
361 | 362 | ) -> pagers.ListOrgDataExchangesAsyncPager: |
362 | 363 | r"""Lists all data exchanges from projects in a given |
@@ -477,7 +478,7 @@ async def get_data_exchange( |
477 | 478 | *, |
478 | 479 | name: Optional[str] = None, |
479 | 480 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
480 | | - timeout: Optional[float] = None, |
| 481 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
481 | 482 | metadata: Sequence[Tuple[str, str]] = (), |
482 | 483 | ) -> dataexchange.DataExchange: |
483 | 484 | r"""Gets the details of a data exchange. |
@@ -582,7 +583,7 @@ async def create_data_exchange( |
582 | 583 | parent: Optional[str] = None, |
583 | 584 | data_exchange: Optional[dataexchange.DataExchange] = None, |
584 | 585 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
585 | | - timeout: Optional[float] = None, |
| 586 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
586 | 587 | metadata: Sequence[Tuple[str, str]] = (), |
587 | 588 | ) -> dataexchange.DataExchange: |
588 | 589 | r"""Creates a new data exchange. |
@@ -702,7 +703,7 @@ async def update_data_exchange( |
702 | 703 | data_exchange: Optional[dataexchange.DataExchange] = None, |
703 | 704 | update_mask: Optional[field_mask_pb2.FieldMask] = None, |
704 | 705 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
705 | | - timeout: Optional[float] = None, |
| 706 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
706 | 707 | metadata: Sequence[Tuple[str, str]] = (), |
707 | 708 | ) -> dataexchange.DataExchange: |
708 | 709 | r"""Updates an existing data exchange. |
@@ -823,7 +824,7 @@ async def delete_data_exchange( |
823 | 824 | *, |
824 | 825 | name: Optional[str] = None, |
825 | 826 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
826 | | - timeout: Optional[float] = None, |
| 827 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
827 | 828 | metadata: Sequence[Tuple[str, str]] = (), |
828 | 829 | ) -> None: |
829 | 830 | r"""Deletes an existing data exchange. |
@@ -914,7 +915,7 @@ async def list_listings( |
914 | 915 | *, |
915 | 916 | parent: Optional[str] = None, |
916 | 917 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
917 | | - timeout: Optional[float] = None, |
| 918 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
918 | 919 | metadata: Sequence[Tuple[str, str]] = (), |
919 | 920 | ) -> pagers.ListListingsAsyncPager: |
920 | 921 | r"""Lists all listings in a given project and location. |
@@ -1029,7 +1030,7 @@ async def get_listing( |
1029 | 1030 | *, |
1030 | 1031 | name: Optional[str] = None, |
1031 | 1032 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1032 | | - timeout: Optional[float] = None, |
| 1033 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1033 | 1034 | metadata: Sequence[Tuple[str, str]] = (), |
1034 | 1035 | ) -> dataexchange.Listing: |
1035 | 1036 | r"""Gets the details of a listing. |
@@ -1135,7 +1136,7 @@ async def create_listing( |
1135 | 1136 | parent: Optional[str] = None, |
1136 | 1137 | listing: Optional[dataexchange.Listing] = None, |
1137 | 1138 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1138 | | - timeout: Optional[float] = None, |
| 1139 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1139 | 1140 | metadata: Sequence[Tuple[str, str]] = (), |
1140 | 1141 | ) -> dataexchange.Listing: |
1141 | 1142 | r"""Creates a new listing. |
@@ -1253,7 +1254,7 @@ async def update_listing( |
1253 | 1254 | listing: Optional[dataexchange.Listing] = None, |
1254 | 1255 | update_mask: Optional[field_mask_pb2.FieldMask] = None, |
1255 | 1256 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1256 | | - timeout: Optional[float] = None, |
| 1257 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1257 | 1258 | metadata: Sequence[Tuple[str, str]] = (), |
1258 | 1259 | ) -> dataexchange.Listing: |
1259 | 1260 | r"""Updates an existing listing. |
@@ -1372,7 +1373,7 @@ async def delete_listing( |
1372 | 1373 | *, |
1373 | 1374 | name: Optional[str] = None, |
1374 | 1375 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1375 | | - timeout: Optional[float] = None, |
| 1376 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1376 | 1377 | metadata: Sequence[Tuple[str, str]] = (), |
1377 | 1378 | ) -> None: |
1378 | 1379 | r"""Deletes a listing. |
@@ -1461,7 +1462,7 @@ async def subscribe_listing( |
1461 | 1462 | *, |
1462 | 1463 | name: Optional[str] = None, |
1463 | 1464 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1464 | | - timeout: Optional[float] = None, |
| 1465 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1465 | 1466 | metadata: Sequence[Tuple[str, str]] = (), |
1466 | 1467 | ) -> dataexchange.SubscribeListingResponse: |
1467 | 1468 | r"""Subscribes to a listing. |
@@ -1574,7 +1575,7 @@ async def get_iam_policy( |
1574 | 1575 | request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None, |
1575 | 1576 | *, |
1576 | 1577 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1577 | | - timeout: Optional[float] = None, |
| 1578 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1578 | 1579 | metadata: Sequence[Tuple[str, str]] = (), |
1579 | 1580 | ) -> policy_pb2.Policy: |
1580 | 1581 | r"""Gets the IAM policy. |
@@ -1717,7 +1718,7 @@ async def set_iam_policy( |
1717 | 1718 | request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None, |
1718 | 1719 | *, |
1719 | 1720 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1720 | | - timeout: Optional[float] = None, |
| 1721 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1721 | 1722 | metadata: Sequence[Tuple[str, str]] = (), |
1722 | 1723 | ) -> policy_pb2.Policy: |
1723 | 1724 | r"""Sets the IAM policy. |
@@ -1860,7 +1861,7 @@ async def test_iam_permissions( |
1860 | 1861 | request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None, |
1861 | 1862 | *, |
1862 | 1863 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1863 | | - timeout: Optional[float] = None, |
| 1864 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1864 | 1865 | metadata: Sequence[Tuple[str, str]] = (), |
1865 | 1866 | ) -> iam_policy_pb2.TestIamPermissionsResponse: |
1866 | 1867 | r"""Returns the permissions that a caller has. |
@@ -1943,7 +1944,7 @@ async def get_location( |
1943 | 1944 | request: Optional[locations_pb2.GetLocationRequest] = None, |
1944 | 1945 | *, |
1945 | 1946 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
1946 | | - timeout: Optional[float] = None, |
| 1947 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1947 | 1948 | metadata: Sequence[Tuple[str, str]] = (), |
1948 | 1949 | ) -> locations_pb2.Location: |
1949 | 1950 | r"""Gets information about a location. |
@@ -1997,7 +1998,7 @@ async def list_locations( |
1997 | 1998 | request: Optional[locations_pb2.ListLocationsRequest] = None, |
1998 | 1999 | *, |
1999 | 2000 | retry: OptionalRetry = gapic_v1.method.DEFAULT, |
2000 | | - timeout: Optional[float] = None, |
| 2001 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2001 | 2002 | metadata: Sequence[Tuple[str, str]] = (), |
2002 | 2003 | ) -> locations_pb2.ListLocationsResponse: |
2003 | 2004 | r"""Lists information about the supported locations for this service. |
@@ -2053,14 +2054,9 @@ async def __aexit__(self, exc_type, exc, tb): |
2053 | 2054 | await self.transport.close() |
2054 | 2055 |
|
2055 | 2056 |
|
2056 | | -try: |
2057 | | - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
2058 | | - gapic_version=pkg_resources.get_distribution( |
2059 | | - "google-cloud-bigquery-data-exchange", |
2060 | | - ).version, |
2061 | | - ) |
2062 | | -except pkg_resources.DistributionNotFound: |
2063 | | - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() |
| 2057 | +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
| 2058 | + gapic_version=package_version.__version__ |
| 2059 | +) |
2064 | 2060 |
|
2065 | 2061 |
|
2066 | 2062 | __all__ = ("AnalyticsHubServiceAsyncClient",) |
0 commit comments