diff --git a/synth.py b/synth.py index ff84827c..7fb28831 100644 --- a/synth.py +++ b/synth.py @@ -18,20 +18,42 @@ gapic = gcp.GAPICGenerator() common = gcp.CommonTemplates() +versions = [ + ("v1", "artman_datastore.yaml") +] +admin_versions = [ + ("v1", "artman_datastore_admin.yaml") +] # ---------------------------------------------------------------------------- # Generate datastore GAPIC layer # ---------------------------------------------------------------------------- -library = gapic.py_library( - "datastore", - "v1", - config_path="/google/datastore/artman_datastore.yaml", - artman_output_name="datastore-v1", - include_protos=True, -) - -s.move(library / "google/cloud/datastore_v1/proto") -s.move(library / "google/cloud/datastore_v1/gapic") +for version, artman_config in versions: + library = gapic.py_library( + "datastore", + f"{version}", + config_path=f"/google/datastore/{artman_config}", + artman_output_name=f"datastore-{version}", + include_protos=True, + ) + + s.move(library / f"google/cloud/datastore_{version}/proto") + s.move(library / f"google/cloud/datastore_{version}/gapic") + +# ---------------------------------------------------------------------------- +# Generate datastore admin GAPIC layer +# ---------------------------------------------------------------------------- +for version, artman_config in admin_versions: + library = gapic.py_library( + "datastore_admin", + f"{version}", + config_path=f"/google/datastore/admin/{artman_config}", + artman_output_name=f"datastore-admin-{version}", + include_protos=True, + ) + + s.move(library / f"google/cloud/datastore_admin_{version}/proto") + s.move(library / f"google/cloud/datastore_admin_{version}/gapic") # ---------------------------------------------------------------------------- # Add templated files