|
15 | 15 | from __future__ import absolute_import |
16 | 16 | import sys |
17 | 17 |
|
18 | | -from google.api_core.protobuf_helpers import get_messages |
19 | | - |
20 | 18 | from google.api import http_pb2 |
21 | | -from google.cloud.bigtable_admin_v2.proto import bigtable_instance_admin_pb2 |
22 | | -from google.cloud.bigtable_admin_v2.proto import bigtable_table_admin_pb2 |
23 | | -from google.cloud.bigtable_admin_v2.proto import instance_pb2 |
24 | | -from google.cloud.bigtable_admin_v2.proto import table_pb2 |
25 | 19 | from google.iam.v1 import iam_policy_pb2 |
26 | 20 | from google.iam.v1 import policy_pb2 |
27 | 21 | from google.iam.v1.logging import audit_data_pb2 |
|
34 | 28 | from google.protobuf import timestamp_pb2 |
35 | 29 | from google.rpc import status_pb2 |
36 | 30 |
|
| 31 | +from google.api_core.protobuf_helpers import get_messages |
| 32 | +from google.cloud.bigtable_admin_v2.proto import bigtable_instance_admin_pb2 |
| 33 | +from google.cloud.bigtable_admin_v2.proto import bigtable_table_admin_pb2 |
| 34 | +from google.cloud.bigtable_admin_v2.proto import instance_pb2 |
| 35 | +from google.cloud.bigtable_admin_v2.proto import table_pb2 |
| 36 | + |
| 37 | + |
| 38 | +_shared_modules = [ |
| 39 | + http_pb2, |
| 40 | + iam_policy_pb2, |
| 41 | + policy_pb2, |
| 42 | + audit_data_pb2, |
| 43 | + operations_pb2, |
| 44 | + any_pb2, |
| 45 | + descriptor_pb2, |
| 46 | + duration_pb2, |
| 47 | + empty_pb2, |
| 48 | + field_mask_pb2, |
| 49 | + timestamp_pb2, |
| 50 | + status_pb2, |
| 51 | +] |
| 52 | + |
| 53 | +_local_modules = [ |
| 54 | + bigtable_instance_admin_pb2, |
| 55 | + bigtable_table_admin_pb2, |
| 56 | + instance_pb2, |
| 57 | + table_pb2, |
| 58 | +] |
| 59 | + |
37 | 60 | names = [] |
38 | | -for module in ( |
39 | | - http_pb2, |
40 | | - bigtable_instance_admin_pb2, |
41 | | - bigtable_table_admin_pb2, |
42 | | - instance_pb2, |
43 | | - table_pb2, |
44 | | - iam_policy_pb2, |
45 | | - policy_pb2, |
46 | | - audit_data_pb2, |
47 | | - operations_pb2, |
48 | | - any_pb2, |
49 | | - descriptor_pb2, |
50 | | - duration_pb2, |
51 | | - empty_pb2, |
52 | | - field_mask_pb2, |
53 | | - timestamp_pb2, |
54 | | - status_pb2, |
55 | | -): |
| 61 | + |
| 62 | +for module in _shared_modules: |
| 63 | + for name, message in get_messages(module).items(): |
| 64 | + setattr(sys.modules[__name__], name, message) |
| 65 | + names.append(name) |
| 66 | + |
| 67 | +for module in _local_modules: |
56 | 68 | for name, message in get_messages(module).items(): |
57 | 69 | message.__module__ = 'google.cloud.bigtable_admin_v2.types' |
58 | 70 | setattr(sys.modules[__name__], name, message) |
|
0 commit comments