|
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 | 21 |
|
22 | 22 | # ---------------------------------------------------------------------------- |
23 | 23 | # Generate error_reporting GAPIC layer |
24 | 24 | # ---------------------------------------------------------------------------- |
25 | 25 | library = gapic.py_library( |
26 | | - "errorreporting", |
27 | | - "v1beta1", |
28 | | - config_path="/google/devtools/clouderrorreporting" "/artman_errorreporting.yaml", |
29 | | - artman_output_name="error-reporting-v1beta1", |
| 26 | + service="errorreporting", |
| 27 | + version="v1beta1", |
| 28 | + bazel_target="//google/devtools/clouderrorreporting/v1beta1:devtools-clouderrorreporting-v1beta1-py", |
30 | 29 | include_protos=True, |
31 | 30 | ) |
32 | 31 |
|
| 32 | +s.move(library / "google/cloud/devtools/clouderrorreporting_v1beta1/proto", |
| 33 | + "google/cloud/errorreporting_v1beta1/proto") |
33 | 34 | s.move(library / "google/cloud/errorreporting_v1beta1/proto") |
34 | 35 | s.move(library / "google/cloud/errorreporting_v1beta1/gapic") |
35 | 36 | s.move(library / "tests/unit/gapic/v1beta1") |
36 | 37 | s.move(library / "tests/system/gapic/v1beta1") |
37 | 38 |
|
| 39 | +s.replace( |
| 40 | + [ |
| 41 | + "google/cloud/errorreporting_v1beta1/gapic/error_group_service_client.py", |
| 42 | + "google/cloud/errorreporting_v1beta1/gapic/error_stats_service_client.py", |
| 43 | + "google/cloud/errorreporting_v1beta1/gapic/ereport_errors_service_client.py", |
| 44 | + ], |
| 45 | + "google-cloud-devtools-clouderrorreporting", |
| 46 | + "google-cloud-error-reporting", |
| 47 | +) |
| 48 | + |
38 | 49 | # Fix up imports |
39 | 50 | s.replace( |
40 | 51 | "google/**/*.py", |
41 | | - r"from google.devtools.clouderrorreporting_v1beta1.proto import ", |
| 52 | + r"from google.cloud.devtools.clouderrorreporting_v1beta1.proto import ", |
42 | 53 | r"from google.cloud.errorreporting_v1beta1.proto import ", |
43 | 54 | ) |
44 | 55 |
|
|
0 commit comments