|
27 | 27 | Type,
|
28 | 28 | Union,
|
29 | 29 | )
|
30 |
| -import pkg_resources |
| 30 | + |
| 31 | +from google.cloud.bigtable_admin_v2 import gapic_version as package_version |
31 | 32 |
|
32 | 33 | from google.api_core.client_options import ClientOptions
|
33 | 34 | from google.api_core import exceptions as core_exceptions
|
@@ -255,7 +256,7 @@ async def create_instance(
|
255 | 256 | instance: Optional[gba_instance.Instance] = None,
|
256 | 257 | clusters: Optional[MutableMapping[str, gba_instance.Cluster]] = None,
|
257 | 258 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
258 |
| - timeout: Optional[float] = None, |
| 259 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
259 | 260 | metadata: Sequence[Tuple[str, str]] = (),
|
260 | 261 | ) -> operation_async.AsyncOperation:
|
261 | 262 | r"""Create an instance within a project.
|
@@ -386,7 +387,7 @@ async def get_instance(
|
386 | 387 | *,
|
387 | 388 | name: Optional[str] = None,
|
388 | 389 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
389 |
| - timeout: Optional[float] = None, |
| 390 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
390 | 391 | metadata: Sequence[Tuple[str, str]] = (),
|
391 | 392 | ) -> instance.Instance:
|
392 | 393 | r"""Gets information about an instance.
|
@@ -478,7 +479,7 @@ async def list_instances(
|
478 | 479 | *,
|
479 | 480 | parent: Optional[str] = None,
|
480 | 481 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
481 |
| - timeout: Optional[float] = None, |
| 482 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
482 | 483 | metadata: Sequence[Tuple[str, str]] = (),
|
483 | 484 | ) -> bigtable_instance_admin.ListInstancesResponse:
|
484 | 485 | r"""Lists information about instances in a project.
|
@@ -564,7 +565,7 @@ async def update_instance(
|
564 | 565 | request: Optional[Union[instance.Instance, dict]] = None,
|
565 | 566 | *,
|
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 | ) -> instance.Instance:
|
570 | 571 | r"""Updates an instance within a project. This method
|
@@ -642,7 +643,7 @@ async def partial_update_instance(
|
642 | 643 | instance: Optional[gba_instance.Instance] = None,
|
643 | 644 | update_mask: Optional[field_mask_pb2.FieldMask] = None,
|
644 | 645 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
645 |
| - timeout: Optional[float] = None, |
| 646 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
646 | 647 | metadata: Sequence[Tuple[str, str]] = (),
|
647 | 648 | ) -> operation_async.AsyncOperation:
|
648 | 649 | r"""Partially updates an instance within a project. This
|
@@ -757,7 +758,7 @@ async def delete_instance(
|
757 | 758 | *,
|
758 | 759 | name: Optional[str] = None,
|
759 | 760 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
760 |
| - timeout: Optional[float] = None, |
| 761 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
761 | 762 | metadata: Sequence[Tuple[str, str]] = (),
|
762 | 763 | ) -> None:
|
763 | 764 | r"""Delete an instance from a project.
|
@@ -829,7 +830,7 @@ async def create_cluster(
|
829 | 830 | cluster_id: Optional[str] = None,
|
830 | 831 | cluster: Optional[instance.Cluster] = None,
|
831 | 832 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
832 |
| - timeout: Optional[float] = None, |
| 833 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
833 | 834 | metadata: Sequence[Tuple[str, str]] = (),
|
834 | 835 | ) -> operation_async.AsyncOperation:
|
835 | 836 | r"""Creates a cluster within an instance.
|
@@ -946,7 +947,7 @@ async def get_cluster(
|
946 | 947 | *,
|
947 | 948 | name: Optional[str] = None,
|
948 | 949 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
949 |
| - timeout: Optional[float] = None, |
| 950 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
950 | 951 | metadata: Sequence[Tuple[str, str]] = (),
|
951 | 952 | ) -> instance.Cluster:
|
952 | 953 | r"""Gets information about a cluster.
|
@@ -1037,7 +1038,7 @@ async def list_clusters(
|
1037 | 1038 | *,
|
1038 | 1039 | parent: Optional[str] = None,
|
1039 | 1040 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1040 |
| - timeout: Optional[float] = None, |
| 1041 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1041 | 1042 | metadata: Sequence[Tuple[str, str]] = (),
|
1042 | 1043 | ) -> bigtable_instance_admin.ListClustersResponse:
|
1043 | 1044 | r"""Lists information about clusters in an instance.
|
@@ -1125,7 +1126,7 @@ async def update_cluster(
|
1125 | 1126 | request: Optional[Union[instance.Cluster, dict]] = None,
|
1126 | 1127 | *,
|
1127 | 1128 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1128 |
| - timeout: Optional[float] = None, |
| 1129 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1129 | 1130 | metadata: Sequence[Tuple[str, str]] = (),
|
1130 | 1131 | ) -> operation_async.AsyncOperation:
|
1131 | 1132 | r"""Updates a cluster within an instance.
|
@@ -1211,7 +1212,7 @@ async def partial_update_cluster(
|
1211 | 1212 | cluster: Optional[instance.Cluster] = None,
|
1212 | 1213 | update_mask: Optional[field_mask_pb2.FieldMask] = None,
|
1213 | 1214 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1214 |
| - timeout: Optional[float] = None, |
| 1215 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1215 | 1216 | metadata: Sequence[Tuple[str, str]] = (),
|
1216 | 1217 | ) -> operation_async.AsyncOperation:
|
1217 | 1218 | r"""Partially updates a cluster within a project. This method is the
|
@@ -1325,7 +1326,7 @@ async def delete_cluster(
|
1325 | 1326 | *,
|
1326 | 1327 | name: Optional[str] = None,
|
1327 | 1328 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1328 |
| - timeout: Optional[float] = None, |
| 1329 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1329 | 1330 | metadata: Sequence[Tuple[str, str]] = (),
|
1330 | 1331 | ) -> None:
|
1331 | 1332 | r"""Deletes a cluster from an instance.
|
@@ -1397,7 +1398,7 @@ async def create_app_profile(
|
1397 | 1398 | app_profile_id: Optional[str] = None,
|
1398 | 1399 | app_profile: Optional[instance.AppProfile] = None,
|
1399 | 1400 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1400 |
| - timeout: Optional[float] = None, |
| 1401 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1401 | 1402 | metadata: Sequence[Tuple[str, str]] = (),
|
1402 | 1403 | ) -> instance.AppProfile:
|
1403 | 1404 | r"""Creates an app profile within an instance.
|
@@ -1497,7 +1498,7 @@ async def get_app_profile(
|
1497 | 1498 | *,
|
1498 | 1499 | name: Optional[str] = None,
|
1499 | 1500 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1500 |
| - timeout: Optional[float] = None, |
| 1501 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1501 | 1502 | metadata: Sequence[Tuple[str, str]] = (),
|
1502 | 1503 | ) -> instance.AppProfile:
|
1503 | 1504 | r"""Gets information about an app profile.
|
@@ -1587,7 +1588,7 @@ async def list_app_profiles(
|
1587 | 1588 | *,
|
1588 | 1589 | parent: Optional[str] = None,
|
1589 | 1590 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1590 |
| - timeout: Optional[float] = None, |
| 1591 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1591 | 1592 | metadata: Sequence[Tuple[str, str]] = (),
|
1592 | 1593 | ) -> pagers.ListAppProfilesAsyncPager:
|
1593 | 1594 | r"""Lists information about app profiles in an instance.
|
@@ -1692,7 +1693,7 @@ async def update_app_profile(
|
1692 | 1693 | app_profile: Optional[instance.AppProfile] = None,
|
1693 | 1694 | update_mask: Optional[field_mask_pb2.FieldMask] = None,
|
1694 | 1695 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1695 |
| - timeout: Optional[float] = None, |
| 1696 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1696 | 1697 | metadata: Sequence[Tuple[str, str]] = (),
|
1697 | 1698 | ) -> operation_async.AsyncOperation:
|
1698 | 1699 | r"""Updates an app profile within an instance.
|
@@ -1802,7 +1803,7 @@ async def delete_app_profile(
|
1802 | 1803 | *,
|
1803 | 1804 | name: Optional[str] = None,
|
1804 | 1805 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1805 |
| - timeout: Optional[float] = None, |
| 1806 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1806 | 1807 | metadata: Sequence[Tuple[str, str]] = (),
|
1807 | 1808 | ) -> None:
|
1808 | 1809 | r"""Deletes an app profile from an instance.
|
@@ -1870,7 +1871,7 @@ async def get_iam_policy(
|
1870 | 1871 | *,
|
1871 | 1872 | resource: Optional[str] = None,
|
1872 | 1873 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1873 |
| - timeout: Optional[float] = None, |
| 1874 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1874 | 1875 | metadata: Sequence[Tuple[str, str]] = (),
|
1875 | 1876 | ) -> policy_pb2.Policy:
|
1876 | 1877 | r"""Gets the access control policy for an instance
|
@@ -2021,7 +2022,7 @@ async def set_iam_policy(
|
2021 | 2022 | *,
|
2022 | 2023 | resource: Optional[str] = None,
|
2023 | 2024 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2024 |
| - timeout: Optional[float] = None, |
| 2025 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2025 | 2026 | metadata: Sequence[Tuple[str, str]] = (),
|
2026 | 2027 | ) -> policy_pb2.Policy:
|
2027 | 2028 | r"""Sets the access control policy on an instance
|
@@ -2162,7 +2163,7 @@ async def test_iam_permissions(
|
2162 | 2163 | resource: Optional[str] = None,
|
2163 | 2164 | permissions: Optional[MutableSequence[str]] = None,
|
2164 | 2165 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2165 |
| - timeout: Optional[float] = None, |
| 2166 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2166 | 2167 | metadata: Sequence[Tuple[str, str]] = (),
|
2167 | 2168 | ) -> iam_policy_pb2.TestIamPermissionsResponse:
|
2168 | 2169 | r"""Returns permissions that the caller has on the
|
@@ -2263,7 +2264,7 @@ async def list_hot_tablets(
|
2263 | 2264 | *,
|
2264 | 2265 | parent: Optional[str] = None,
|
2265 | 2266 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2266 |
| - timeout: Optional[float] = None, |
| 2267 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2267 | 2268 | metadata: Sequence[Tuple[str, str]] = (),
|
2268 | 2269 | ) -> pagers.ListHotTabletsAsyncPager:
|
2269 | 2270 | r"""Lists hot tablets in a cluster, within the time range
|
@@ -2364,14 +2365,9 @@ async def __aexit__(self, exc_type, exc, tb):
|
2364 | 2365 | await self.transport.close()
|
2365 | 2366 |
|
2366 | 2367 |
|
2367 |
| -try: |
2368 |
| - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
2369 |
| - gapic_version=pkg_resources.get_distribution( |
2370 |
| - "google-cloud-bigtable-admin", |
2371 |
| - ).version, |
2372 |
| - ) |
2373 |
| -except pkg_resources.DistributionNotFound: |
2374 |
| - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() |
| 2368 | +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
| 2369 | + gapic_version=package_version.__version__ |
| 2370 | +) |
2375 | 2371 |
|
2376 | 2372 |
|
2377 | 2373 | __all__ = ("BigtableInstanceAdminAsyncClient",)
|
0 commit comments