|
38 | 38 | from google.auth.transport import mtls # type: ignore
|
39 | 39 | from google.auth.transport.grpc import SslCredentials # type: ignore
|
40 | 40 | from google.oauth2 import service_account # type: ignore
|
41 |
| -import pkg_resources |
| 41 | + |
| 42 | +from google.cloud.datastream_v1 import gapic_version as package_version |
42 | 43 |
|
43 | 44 | try:
|
44 | 45 | OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
|
@@ -565,7 +566,7 @@ def list_connection_profiles(
|
565 | 566 | *,
|
566 | 567 | parent: Optional[str] = None,
|
567 | 568 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
568 |
| - timeout: Optional[float] = None, |
| 569 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
569 | 570 | metadata: Sequence[Tuple[str, str]] = (),
|
570 | 571 | ) -> pagers.ListConnectionProfilesPager:
|
571 | 572 | r"""Use this method to list connection profiles created
|
@@ -681,7 +682,7 @@ def get_connection_profile(
|
681 | 682 | *,
|
682 | 683 | name: Optional[str] = None,
|
683 | 684 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
684 |
| - timeout: Optional[float] = None, |
| 685 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
685 | 686 | metadata: Sequence[Tuple[str, str]] = (),
|
686 | 687 | ) -> datastream_resources.ConnectionProfile:
|
687 | 688 | r"""Use this method to get details about a connection
|
@@ -789,7 +790,7 @@ def create_connection_profile(
|
789 | 790 | connection_profile: Optional[datastream_resources.ConnectionProfile] = None,
|
790 | 791 | connection_profile_id: Optional[str] = None,
|
791 | 792 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
792 |
| - timeout: Optional[float] = None, |
| 793 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
793 | 794 | metadata: Sequence[Tuple[str, str]] = (),
|
794 | 795 | ) -> operation.Operation:
|
795 | 796 | r"""Use this method to create a connection profile in a
|
@@ -938,7 +939,7 @@ def update_connection_profile(
|
938 | 939 | connection_profile: Optional[datastream_resources.ConnectionProfile] = None,
|
939 | 940 | update_mask: Optional[field_mask_pb2.FieldMask] = None,
|
940 | 941 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
941 |
| - timeout: Optional[float] = None, |
| 942 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
942 | 943 | metadata: Sequence[Tuple[str, str]] = (),
|
943 | 944 | ) -> operation.Operation:
|
944 | 945 | r"""Use this method to update the parameters of a
|
@@ -1081,7 +1082,7 @@ def delete_connection_profile(
|
1081 | 1082 | *,
|
1082 | 1083 | name: Optional[str] = None,
|
1083 | 1084 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1084 |
| - timeout: Optional[float] = None, |
| 1085 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1085 | 1086 | metadata: Sequence[Tuple[str, str]] = (),
|
1086 | 1087 | ) -> operation.Operation:
|
1087 | 1088 | r"""Use this method to delete a connection profile.
|
@@ -1208,7 +1209,7 @@ def discover_connection_profile(
|
1208 | 1209 | ] = None,
|
1209 | 1210 | *,
|
1210 | 1211 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1211 |
| - timeout: Optional[float] = None, |
| 1212 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1212 | 1213 | metadata: Sequence[Tuple[str, str]] = (),
|
1213 | 1214 | ) -> datastream.DiscoverConnectionProfileResponse:
|
1214 | 1215 | r"""Use this method to discover a connection profile.
|
@@ -1303,7 +1304,7 @@ def list_streams(
|
1303 | 1304 | *,
|
1304 | 1305 | parent: Optional[str] = None,
|
1305 | 1306 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1306 |
| - timeout: Optional[float] = None, |
| 1307 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1307 | 1308 | metadata: Sequence[Tuple[str, str]] = (),
|
1308 | 1309 | ) -> pagers.ListStreamsPager:
|
1309 | 1310 | r"""Use this method to list streams in a project and
|
@@ -1417,7 +1418,7 @@ def get_stream(
|
1417 | 1418 | *,
|
1418 | 1419 | name: Optional[str] = None,
|
1419 | 1420 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1420 |
| - timeout: Optional[float] = None, |
| 1421 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1421 | 1422 | metadata: Sequence[Tuple[str, str]] = (),
|
1422 | 1423 | ) -> datastream_resources.Stream:
|
1423 | 1424 | r"""Use this method to get details about a stream.
|
@@ -1521,7 +1522,7 @@ def create_stream(
|
1521 | 1522 | stream: Optional[datastream_resources.Stream] = None,
|
1522 | 1523 | stream_id: Optional[str] = None,
|
1523 | 1524 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1524 |
| - timeout: Optional[float] = None, |
| 1525 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1525 | 1526 | metadata: Sequence[Tuple[str, str]] = (),
|
1526 | 1527 | ) -> operation.Operation:
|
1527 | 1528 | r"""Use this method to create a stream.
|
@@ -1663,7 +1664,7 @@ def update_stream(
|
1663 | 1664 | stream: Optional[datastream_resources.Stream] = None,
|
1664 | 1665 | update_mask: Optional[field_mask_pb2.FieldMask] = None,
|
1665 | 1666 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1666 |
| - timeout: Optional[float] = None, |
| 1667 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1667 | 1668 | metadata: Sequence[Tuple[str, str]] = (),
|
1668 | 1669 | ) -> operation.Operation:
|
1669 | 1670 | r"""Use this method to update the configuration of a
|
@@ -1802,7 +1803,7 @@ def delete_stream(
|
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 | ) -> operation.Operation:
|
1808 | 1809 | r"""Use this method to delete a stream.
|
@@ -1926,7 +1927,7 @@ def get_stream_object(
|
1926 | 1927 | *,
|
1927 | 1928 | name: Optional[str] = None,
|
1928 | 1929 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
1929 |
| - timeout: Optional[float] = None, |
| 1930 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
1930 | 1931 | metadata: Sequence[Tuple[str, str]] = (),
|
1931 | 1932 | ) -> datastream_resources.StreamObject:
|
1932 | 1933 | r"""Use this method to get details about a stream object.
|
@@ -2027,7 +2028,7 @@ def lookup_stream_object(
|
2027 | 2028 | request: Optional[Union[datastream.LookupStreamObjectRequest, dict]] = None,
|
2028 | 2029 | *,
|
2029 | 2030 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2030 |
| - timeout: Optional[float] = None, |
| 2031 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2031 | 2032 | metadata: Sequence[Tuple[str, str]] = (),
|
2032 | 2033 | ) -> datastream_resources.StreamObject:
|
2033 | 2034 | r"""Use this method to look up a stream object by its
|
@@ -2115,7 +2116,7 @@ def list_stream_objects(
|
2115 | 2116 | *,
|
2116 | 2117 | parent: Optional[str] = None,
|
2117 | 2118 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2118 |
| - timeout: Optional[float] = None, |
| 2119 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2119 | 2120 | metadata: Sequence[Tuple[str, str]] = (),
|
2120 | 2121 | ) -> pagers.ListStreamObjectsPager:
|
2121 | 2122 | r"""Use this method to list the objects of a specific
|
@@ -2231,7 +2232,7 @@ def start_backfill_job(
|
2231 | 2232 | *,
|
2232 | 2233 | object_: Optional[str] = None,
|
2233 | 2234 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2234 |
| - timeout: Optional[float] = None, |
| 2235 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2235 | 2236 | metadata: Sequence[Tuple[str, str]] = (),
|
2236 | 2237 | ) -> datastream.StartBackfillJobResponse:
|
2237 | 2238 | r"""Use this method to start a backfill job for the
|
@@ -2336,7 +2337,7 @@ def stop_backfill_job(
|
2336 | 2337 | *,
|
2337 | 2338 | object_: Optional[str] = None,
|
2338 | 2339 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2339 |
| - timeout: Optional[float] = None, |
| 2340 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2340 | 2341 | metadata: Sequence[Tuple[str, str]] = (),
|
2341 | 2342 | ) -> datastream.StopBackfillJobResponse:
|
2342 | 2343 | r"""Use this method to stop a backfill job for the
|
@@ -2440,7 +2441,7 @@ def fetch_static_ips(
|
2440 | 2441 | *,
|
2441 | 2442 | name: Optional[str] = None,
|
2442 | 2443 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2443 |
| - timeout: Optional[float] = None, |
| 2444 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2444 | 2445 | metadata: Sequence[Tuple[str, str]] = (),
|
2445 | 2446 | ) -> pagers.FetchStaticIpsPager:
|
2446 | 2447 | r"""The FetchStaticIps API call exposes the static IP
|
@@ -2561,7 +2562,7 @@ def create_private_connection(
|
2561 | 2562 | private_connection: Optional[datastream_resources.PrivateConnection] = None,
|
2562 | 2563 | private_connection_id: Optional[str] = None,
|
2563 | 2564 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2564 |
| - timeout: Optional[float] = None, |
| 2565 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2565 | 2566 | metadata: Sequence[Tuple[str, str]] = (),
|
2566 | 2567 | ) -> operation.Operation:
|
2567 | 2568 | r"""Use this method to create a private connectivity
|
@@ -2703,7 +2704,7 @@ def get_private_connection(
|
2703 | 2704 | *,
|
2704 | 2705 | name: Optional[str] = None,
|
2705 | 2706 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2706 |
| - timeout: Optional[float] = None, |
| 2707 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2707 | 2708 | metadata: Sequence[Tuple[str, str]] = (),
|
2708 | 2709 | ) -> datastream_resources.PrivateConnection:
|
2709 | 2710 | r"""Use this method to get details about a private
|
@@ -2808,7 +2809,7 @@ def list_private_connections(
|
2808 | 2809 | *,
|
2809 | 2810 | parent: Optional[str] = None,
|
2810 | 2811 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2811 |
| - timeout: Optional[float] = None, |
| 2812 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2812 | 2813 | metadata: Sequence[Tuple[str, str]] = (),
|
2813 | 2814 | ) -> pagers.ListPrivateConnectionsPager:
|
2814 | 2815 | r"""Use this method to list private connectivity
|
@@ -2927,7 +2928,7 @@ def delete_private_connection(
|
2927 | 2928 | *,
|
2928 | 2929 | name: Optional[str] = None,
|
2929 | 2930 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
2930 |
| - timeout: Optional[float] = None, |
| 2931 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
2931 | 2932 | metadata: Sequence[Tuple[str, str]] = (),
|
2932 | 2933 | ) -> operation.Operation:
|
2933 | 2934 | r"""Use this method to delete a private connectivity
|
@@ -3056,7 +3057,7 @@ def create_route(
|
3056 | 3057 | route: Optional[datastream_resources.Route] = None,
|
3057 | 3058 | route_id: Optional[str] = None,
|
3058 | 3059 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3059 |
| - timeout: Optional[float] = None, |
| 3060 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3060 | 3061 | metadata: Sequence[Tuple[str, str]] = (),
|
3061 | 3062 | ) -> operation.Operation:
|
3062 | 3063 | r"""Use this method to create a route for a private
|
@@ -3194,7 +3195,7 @@ def get_route(
|
3194 | 3195 | *,
|
3195 | 3196 | name: Optional[str] = None,
|
3196 | 3197 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3197 |
| - timeout: Optional[float] = None, |
| 3198 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3198 | 3199 | metadata: Sequence[Tuple[str, str]] = (),
|
3199 | 3200 | ) -> datastream_resources.Route:
|
3200 | 3201 | r"""Use this method to get details about a route.
|
@@ -3297,7 +3298,7 @@ def list_routes(
|
3297 | 3298 | *,
|
3298 | 3299 | parent: Optional[str] = None,
|
3299 | 3300 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3300 |
| - timeout: Optional[float] = None, |
| 3301 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3301 | 3302 | metadata: Sequence[Tuple[str, str]] = (),
|
3302 | 3303 | ) -> pagers.ListRoutesPager:
|
3303 | 3304 | r"""Use this method to list routes created for a private
|
@@ -3411,7 +3412,7 @@ def delete_route(
|
3411 | 3412 | *,
|
3412 | 3413 | name: Optional[str] = None,
|
3413 | 3414 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3414 |
| - timeout: Optional[float] = None, |
| 3415 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3415 | 3416 | metadata: Sequence[Tuple[str, str]] = (),
|
3416 | 3417 | ) -> operation.Operation:
|
3417 | 3418 | r"""Use this method to delete a route.
|
@@ -3546,7 +3547,7 @@ def list_operations(
|
3546 | 3547 | request: Optional[operations_pb2.ListOperationsRequest] = None,
|
3547 | 3548 | *,
|
3548 | 3549 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3549 |
| - timeout: Optional[float] = None, |
| 3550 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3550 | 3551 | metadata: Sequence[Tuple[str, str]] = (),
|
3551 | 3552 | ) -> operations_pb2.ListOperationsResponse:
|
3552 | 3553 | r"""Lists operations that match the specified filter in the request.
|
@@ -3600,7 +3601,7 @@ def get_operation(
|
3600 | 3601 | request: Optional[operations_pb2.GetOperationRequest] = None,
|
3601 | 3602 | *,
|
3602 | 3603 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3603 |
| - timeout: Optional[float] = None, |
| 3604 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3604 | 3605 | metadata: Sequence[Tuple[str, str]] = (),
|
3605 | 3606 | ) -> operations_pb2.Operation:
|
3606 | 3607 | r"""Gets the latest state of a long-running operation.
|
@@ -3654,7 +3655,7 @@ def delete_operation(
|
3654 | 3655 | request: Optional[operations_pb2.DeleteOperationRequest] = None,
|
3655 | 3656 | *,
|
3656 | 3657 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3657 |
| - timeout: Optional[float] = None, |
| 3658 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3658 | 3659 | metadata: Sequence[Tuple[str, str]] = (),
|
3659 | 3660 | ) -> None:
|
3660 | 3661 | r"""Deletes a long-running operation.
|
@@ -3709,7 +3710,7 @@ def cancel_operation(
|
3709 | 3710 | request: Optional[operations_pb2.CancelOperationRequest] = None,
|
3710 | 3711 | *,
|
3711 | 3712 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3712 |
| - timeout: Optional[float] = None, |
| 3713 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3713 | 3714 | metadata: Sequence[Tuple[str, str]] = (),
|
3714 | 3715 | ) -> None:
|
3715 | 3716 | r"""Starts asynchronous cancellation on a long-running operation.
|
@@ -3763,7 +3764,7 @@ def get_location(
|
3763 | 3764 | request: Optional[locations_pb2.GetLocationRequest] = None,
|
3764 | 3765 | *,
|
3765 | 3766 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3766 |
| - timeout: Optional[float] = None, |
| 3767 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3767 | 3768 | metadata: Sequence[Tuple[str, str]] = (),
|
3768 | 3769 | ) -> locations_pb2.Location:
|
3769 | 3770 | r"""Gets information about a location.
|
@@ -3817,7 +3818,7 @@ def list_locations(
|
3817 | 3818 | request: Optional[locations_pb2.ListLocationsRequest] = None,
|
3818 | 3819 | *,
|
3819 | 3820 | retry: OptionalRetry = gapic_v1.method.DEFAULT,
|
3820 |
| - timeout: Optional[float] = None, |
| 3821 | + timeout: Union[float, object] = gapic_v1.method.DEFAULT, |
3821 | 3822 | metadata: Sequence[Tuple[str, str]] = (),
|
3822 | 3823 | ) -> locations_pb2.ListLocationsResponse:
|
3823 | 3824 | r"""Lists information about the supported locations for this service.
|
@@ -3867,14 +3868,9 @@ def list_locations(
|
3867 | 3868 | return response
|
3868 | 3869 |
|
3869 | 3870 |
|
3870 |
| -try: |
3871 |
| - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
3872 |
| - gapic_version=pkg_resources.get_distribution( |
3873 |
| - "google-cloud-datastream", |
3874 |
| - ).version, |
3875 |
| - ) |
3876 |
| -except pkg_resources.DistributionNotFound: |
3877 |
| - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() |
| 3871 | +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
| 3872 | + gapic_version=package_version.__version__ |
| 3873 | +) |
3878 | 3874 |
|
3879 | 3875 |
|
3880 | 3876 | __all__ = ("DatastreamClient",)
|
0 commit comments