|
1 | 1 | from abc import ABC, abstractmethod |
2 | | -from typing import List, Optional |
| 2 | +from typing import List |
3 | 3 |
|
4 | | -from google.api_core.client_options import ClientOptions |
5 | | -from google.protobuf.field_mask_pb2 import FieldMask |
6 | | - |
7 | | -from google.cloud.pubsublite.endpoints import regional_endpoint |
8 | | -from google.cloud.pubsublite.internal.wire.admin_client_impl import AdminClientImpl |
9 | 4 | from google.cloud.pubsublite.location import CloudRegion |
10 | 5 | from google.cloud.pubsublite.paths import TopicPath, LocationPath, SubscriptionPath |
11 | | -from google.cloud.pubsublite_v1 import Topic, Subscription, AdminServiceClient |
12 | | -from google.auth.credentials import Credentials |
| 6 | +from google.cloud.pubsublite_v1 import Topic, Subscription |
| 7 | +from google.protobuf.field_mask_pb2 import FieldMask |
13 | 8 |
|
14 | 9 |
|
15 | 10 | class AdminClient(ABC): |
@@ -66,16 +61,3 @@ def update_subscription( |
66 | 61 | @abstractmethod |
67 | 62 | def delete_subscription(self, subscription_path: SubscriptionPath): |
68 | 63 | """Delete a subscription and all associated messages.""" |
69 | | - |
70 | | - |
71 | | -def make_admin_client( |
72 | | - region: CloudRegion, |
73 | | - credentials: Optional[Credentials] = None, |
74 | | - client_options: Optional[ClientOptions] = None, |
75 | | -) -> AdminClient: |
76 | | - if client_options is None: |
77 | | - client_options = ClientOptions(api_endpoint=regional_endpoint(region)) |
78 | | - return AdminClientImpl( |
79 | | - AdminServiceClient(client_options=client_options, credentials=credentials), |
80 | | - region, |
81 | | - ) |
0 commit comments