|
16 | 16 | import synthtool as s |
17 | 17 | from synthtool import gcp |
18 | 18 |
|
19 | | -gapic = gcp.GAPICGenerator() |
| 19 | +gapic = gcp.GAPICBazel() |
20 | 20 | common = gcp.CommonTemplates() |
21 | | -versions = [ |
22 | | - ("v1beta1", "artman_firestore.yaml"), |
23 | | - ("v1", "artman_firestore_v1.yaml"), |
24 | | -] |
25 | | -admin_versions = [ |
26 | | - ("v1", "artman_firestore_v1.yaml"), |
27 | | -] |
| 21 | +versions = ["v1beta1", "v1"] |
| 22 | +admin_versions = ["v1"] |
28 | 23 |
|
29 | 24 |
|
30 | 25 | # ---------------------------------------------------------------------------- |
31 | 26 | # Generate firestore GAPIC layer |
32 | 27 | # ---------------------------------------------------------------------------- |
33 | | -for version, artman_config in versions: |
| 28 | +for version in versions: |
34 | 29 | library = gapic.py_library( |
35 | | - "firestore", |
36 | | - version, |
37 | | - config_path=f"/google/firestore/{artman_config}", |
38 | | - artman_output_name=f"firestore-{version}", |
| 30 | + service="firestore", |
| 31 | + version=version, |
| 32 | + bazel_target=f"//google/firestore/{version}:firestore-{version}-py", |
39 | 33 | include_protos=True, |
40 | 34 | ) |
41 | 35 |
|
|
59 | 53 | # ---------------------------------------------------------------------------- |
60 | 54 | # Generate firestore admin GAPIC layer |
61 | 55 | # ---------------------------------------------------------------------------- |
62 | | -for version, artman_config in admin_versions: |
| 56 | +for version in admin_versions: |
63 | 57 | library = gapic.py_library( |
64 | | - "firestore_admin", |
65 | | - f"{version}", |
66 | | - config_path=f"/google/firestore/admin/{artman_config}", |
67 | | - artman_output_name=f"firestore-admin-{version}", |
| 58 | + service="firestore_admin", |
| 59 | + version=version, |
| 60 | + bazel_target=f"//google/firestore/admin/{version}:firestore-admin-{version}-py", |
68 | 61 | include_protos=True, |
69 | 62 | ) |
70 | 63 | s.move(library / f"google/cloud/firestore_admin_{version}") |
|
76 | 69 | "'google-cloud-firestore'", |
77 | 70 | ) |
78 | 71 |
|
79 | | - s.replace( |
80 | | - "google/**/*.py", |
81 | | - f"from google\.cloud\.firestore\.admin_{version}.proto", |
82 | | - f"from google.cloud.firestore_admin_{version}.proto", |
83 | | - ) |
84 | | - |
85 | 72 | # ---------------------------------------------------------------------------- |
86 | 73 | # Add templated files |
87 | 74 | # ---------------------------------------------------------------------------- |
|
0 commit comments