diff --git a/internal/gapicgen/cmd/genbot/local.go b/internal/gapicgen/cmd/genbot/local.go index 671608056062..fc1e6e16b39f 100644 --- a/internal/gapicgen/cmd/genbot/local.go +++ b/internal/gapicgen/cmd/genbot/local.go @@ -38,7 +38,6 @@ type localConfig struct { onlyGapics bool regenOnly bool forceAll bool - genModule bool genAlias bool } @@ -75,7 +74,6 @@ func genLocal(ctx context.Context, c localConfig) error { LocalMode: true, RegenOnly: c.regenOnly, ForceAll: c.forceAll, - GenModule: c.genModule, GenAlias: c.genAlias, } if _, err := generator.Generate(ctx, conf); err != nil { diff --git a/internal/gapicgen/cmd/genbot/main.go b/internal/gapicgen/cmd/genbot/main.go index eaef78bdb5f6..24a0e14470c7 100644 --- a/internal/gapicgen/cmd/genbot/main.go +++ b/internal/gapicgen/cmd/genbot/main.go @@ -54,7 +54,6 @@ func main() { gapicToGenerate := flag.String("gapic", os.Getenv("GAPIC_TO_GENERATE"), `Specifies which gapic to generate. The value should be in the form of an import path (Ex: cloud.google.com/go/pubsub/apiv1). The default "" generates all gapics.`) onlyGapics := flag.Bool("only-gapics", strToBool(os.Getenv("ONLY_GAPICS")), "Enabling stops regenerating genproto.") regenOnly := flag.Bool("regen-only", strToBool(os.Getenv("REGEN_ONLY")), "Enabling means no vetting, manifest updates, or compilation.") - genModule := flag.Bool("generate-module", strToBool(os.Getenv("GENERATE_MODULE")), "Enabling means a new module will be generated for API being generated.") genAlias := flag.Bool("generate-alias", strToBool(os.Getenv("GENERATE_ALIAS")), "Enabling means alias files will be generated.") flag.Parse() @@ -69,7 +68,6 @@ func main() { onlyGapics: *onlyGapics, regenOnly: *regenOnly, forceAll: *forceAll, - genModule: *genModule, genAlias: *genAlias, }); err != nil { log.Fatal(err) diff --git a/internal/gapicgen/generator/config.go b/internal/gapicgen/generator/config.go index 07dfb19362e5..40ea995ed035 100644 --- a/internal/gapicgen/generator/config.go +++ b/internal/gapicgen/generator/config.go @@ -112,236 +112,88 @@ func isMigrated(importPath string) bool { var MicrogenGapicConfigs = []*MicrogenConfig{ { - InputDirectoryPath: "google/cloud/texttospeech/v1", - stopGeneration: true, - Pkg: "texttospeech", - ImportPath: "cloud.google.com/go/texttospeech/apiv1", - GRPCServiceConfigPath: "texttospeech_grpc_service_config.json", - ApiServiceConfigPath: "texttospeech_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/asset/v1", - Pkg: "asset", - ImportPath: "cloud.google.com/go/asset/apiv1", - GRPCServiceConfigPath: "cloudasset_grpc_service_config.json", - ApiServiceConfigPath: "cloudasset_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/billing/v1", - stopGeneration: true, - Pkg: "billing", - ImportPath: "cloud.google.com/go/billing/apiv1", - GRPCServiceConfigPath: "cloud_billing_grpc_service_config.json", - ApiServiceConfigPath: "cloudbilling_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/language/v1", - stopGeneration: true, - Pkg: "language", - ImportPath: "cloud.google.com/go/language/apiv1", - GRPCServiceConfigPath: "language_grpc_service_config.json", - ApiServiceConfigPath: "language_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/language/v1beta2", - stopGeneration: true, - Pkg: "language", - ImportPath: "cloud.google.com/go/language/apiv1beta2", - GRPCServiceConfigPath: "language_grpc_service_config.json", - ApiServiceConfigPath: "language_v1beta2.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/memcache/v1", - stopGeneration: true, - Pkg: "memcache", - ImportPath: "cloud.google.com/go/memcache/apiv1", - GRPCServiceConfigPath: "memcache_grpc_service_config.json", - ApiServiceConfigPath: "memcache_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/memcache/v1beta2", - stopGeneration: true, - Pkg: "memcache", - ImportPath: "cloud.google.com/go/memcache/apiv1beta2", - GRPCServiceConfigPath: "memcache_grpc_service_config.json", - ApiServiceConfigPath: "memcache_v1beta2.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/phishingprotection/v1beta1", - stopGeneration: true, - Pkg: "phishingprotection", - ImportPath: "cloud.google.com/go/phishingprotection/apiv1beta1", - GRPCServiceConfigPath: "phishingprotection_grpc_service_config.json", - ApiServiceConfigPath: "phishingprotection_v1beta1.yaml", + InputDirectoryPath: "google/cloud/advisorynotifications/v1", + Pkg: "advisorynotifications", + ImportPath: "cloud.google.com/go/advisorynotifications/apiv1", + GRPCServiceConfigPath: "advisorynotifications_v1_grpc_service_config.json", + ApiServiceConfigPath: "advisorynotifications_v1.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/translate/v3", - Pkg: "translate", - ImportPath: "cloud.google.com/go/translate/apiv3", - GRPCServiceConfigPath: "translate_grpc_service_config.json", - ApiServiceConfigPath: "translate_v3.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/scheduler/v1", - stopGeneration: true, - Pkg: "scheduler", - ImportPath: "cloud.google.com/go/scheduler/apiv1", - GRPCServiceConfigPath: "cloudscheduler_grpc_service_config.json", - ApiServiceConfigPath: "cloudscheduler_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/scheduler/v1beta1", - stopGeneration: true, - Pkg: "scheduler", - ImportPath: "cloud.google.com/go/scheduler/apiv1beta1", - GRPCServiceConfigPath: "cloudscheduler_grpc_service_config.json", - ApiServiceConfigPath: "cloudscheduler_v1beta1.yaml", + InputDirectoryPath: "google/cloud/alloydb/v1", + Pkg: "alloydb", + ImportPath: "cloud.google.com/go/alloydb/apiv1", + GRPCServiceConfigPath: "alloydb_v1_grpc_service_config.json", + ApiServiceConfigPath: "alloydb_v1.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/speech/v1", - stopGeneration: true, - Pkg: "speech", - ImportPath: "cloud.google.com/go/speech/apiv1", - GRPCServiceConfigPath: "speech_grpc_service_config.json", - ApiServiceConfigPath: "speech_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/speech/v1p1beta1", - stopGeneration: true, - Pkg: "speech", - ImportPath: "cloud.google.com/go/speech/apiv1p1beta1", - GRPCServiceConfigPath: "speech_grpc_service_config.json", - ApiServiceConfigPath: "speech_v1p1beta1.yaml", - ReleaseLevel: "beta", + InputDirectoryPath: "google/cloud/alloydb/v1alpha", + Pkg: "alloydb", + ImportPath: "cloud.google.com/go/alloydb/apiv1alpha", + GRPCServiceConfigPath: "alloydb_v1alpha_grpc_service_config.json", + ApiServiceConfigPath: "alloydb_v1alpha.yaml", + ReleaseLevel: "alpha", }, { - InputDirectoryPath: "google/cloud/bigquery/connection/v1beta1", - stopGeneration: true, - Pkg: "connection", - ImportPath: "cloud.google.com/go/bigquery/connection/apiv1beta1", - GRPCServiceConfigPath: "bigqueryconnection_grpc_service_config.json", - ApiServiceConfigPath: "bigqueryconnection_v1beta1.yaml", + InputDirectoryPath: "google/cloud/alloydb/v1beta", + Pkg: "alloydb", + ImportPath: "cloud.google.com/go/alloydb/apiv1beta", + GRPCServiceConfigPath: "alloydb_v1beta_grpc_service_config.json", + ApiServiceConfigPath: "alloydb_v1beta.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/bigquery/connection/v1", - stopGeneration: true, - Pkg: "connection", - ImportPath: "cloud.google.com/go/bigquery/connection/apiv1", - GRPCServiceConfigPath: "bigqueryconnection_grpc_service_config.json", - ApiServiceConfigPath: "bigqueryconnection_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/bigquery/dataexchange/v1beta1", - stopGeneration: true, - Pkg: "dataexchange", - ImportPath: "cloud.google.com/go/bigquery/dataexchange/apiv1beta1", - GRPCServiceConfigPath: "analyticshub_v1beta1_grpc_service_config.json", - ApiServiceConfigPath: "analyticshub_v1beta1.yaml", - NumericEnumsDisabled: true, + InputDirectoryPath: "google/cloud/apigeeregistry/v1", + Pkg: "apigeeregistry", + ImportPath: "cloud.google.com/go/apigeeregistry/apiv1", + GRPCServiceConfigPath: "apigeeregistry_grpc_service_config.json", + ApiServiceConfigPath: "apigeeregistry_v1.yaml", ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/bigquery/datatransfer/v1", - stopGeneration: true, - Pkg: "datatransfer", - ImportPath: "cloud.google.com/go/bigquery/datatransfer/apiv1", - GRPCServiceConfigPath: "bigquerydatatransfer_grpc_service_config.json", - ApiServiceConfigPath: "bigquerydatatransfer_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/bigquery/migration/v2alpha", - stopGeneration: true, - Pkg: "migration", - ImportPath: "cloud.google.com/go/bigquery/migration/apiv2alpha", - GRPCServiceConfigPath: "bigquerymigration_grpc_service_config.json", - ApiServiceConfigPath: "bigquerymigration_v2alpha.yaml", NumericEnumsDisabled: true, - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/bigquery/migration/v2", - stopGeneration: true, - Pkg: "migration", - ImportPath: "cloud.google.com/go/bigquery/migration/apiv2", - GRPCServiceConfigPath: "bigquerymigration_grpc_service_config.json", - ApiServiceConfigPath: "bigquerymigration_v2.yaml", - ReleaseLevel: "beta", Transports: []string{"grpc"}, - NumericEnumsDisabled: true, }, { - InputDirectoryPath: "google/cloud/bigquery/reservation/v1", - stopGeneration: true, - Pkg: "reservation", - ImportPath: "cloud.google.com/go/bigquery/reservation/apiv1", - GRPCServiceConfigPath: "bigqueryreservation_grpc_service_config.json", - ApiServiceConfigPath: "bigqueryreservation_v1.yaml", + InputDirectoryPath: "google/cloud/asset/v1", + Pkg: "asset", + ImportPath: "cloud.google.com/go/asset/apiv1", + GRPCServiceConfigPath: "cloudasset_grpc_service_config.json", + ApiServiceConfigPath: "cloudasset_v1.yaml", ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/cloud/bigquery/storage/v1beta1", - stopGeneration: true, - Pkg: "storage", - ImportPath: "cloud.google.com/go/bigquery/storage/apiv1beta1", - GRPCServiceConfigPath: "bigquerystorage_grpc_service_config.json", - ApiServiceConfigPath: "bigquerystorage_v1beta1.yaml", + InputDirectoryPath: "google/cloud/asset/v1p2beta1", + Pkg: "asset", + ImportPath: "cloud.google.com/go/asset/apiv1p2beta1", + GRPCServiceConfigPath: "cloudasset_grpc_service_config.json", + ApiServiceConfigPath: "cloudasset_v1p2beta1.yaml", ReleaseLevel: "beta", - NumericEnumsDisabled: true, }, { - InputDirectoryPath: "google/cloud/bigquery/storage/v1beta2", - stopGeneration: true, - Pkg: "storage", - ImportPath: "cloud.google.com/go/bigquery/storage/apiv1beta2", - GRPCServiceConfigPath: "bigquerystorage_grpc_service_config.json", - ApiServiceConfigPath: "bigquerystorage_v1beta2.yaml", + InputDirectoryPath: "google/cloud/asset/v1p5beta1", + Pkg: "asset", + ImportPath: "cloud.google.com/go/asset/apiv1p5beta1", + GRPCServiceConfigPath: "cloudasset_grpc_service_config.json", + ApiServiceConfigPath: "cloudasset_v1p5beta1.yaml", ReleaseLevel: "beta", - NumericEnumsDisabled: true, }, { - InputDirectoryPath: "google/cloud/bigquery/storage/v1", - stopGeneration: true, - Pkg: "storage", - ImportPath: "cloud.google.com/go/bigquery/storage/apiv1", - GRPCServiceConfigPath: "bigquerystorage_grpc_service_config.json", - ApiServiceConfigPath: "bigquerystorage_v1.yaml", - ReleaseLevel: "ga", + InputDirectoryPath: "google/cloud/bigquery/analyticshub/v1", + Pkg: "analyticshub", + ImportPath: "cloud.google.com/go/bigquery/analyticshub/apiv1", + GRPCServiceConfigPath: "analyticshub_v1_grpc_service_config.json", + ApiServiceConfigPath: "analyticshub_v1.yaml", + ReleaseLevel: "beta", NumericEnumsDisabled: true, - Transports: []string{"grpc"}, }, { - InputDirectoryPath: "google/cloud/iot/v1", - stopGeneration: true, - Pkg: "iot", - ImportPath: "cloud.google.com/go/iot/apiv1", - GRPCServiceConfigPath: "cloudiot_grpc_service_config.json", - ApiServiceConfigPath: "cloudiot_v1.yaml", + InputDirectoryPath: "google/devtools/cloudbuild/v1", + Pkg: "cloudbuild", + ImportPath: "cloud.google.com/go/cloudbuild/apiv1/v2", + GRPCServiceConfigPath: "cloudbuild_grpc_service_config.json", + ApiServiceConfigPath: "cloudbuild_v1.yaml", ReleaseLevel: "ga", }, - { - InputDirectoryPath: "google/cloud/recommender/v1beta1", - stopGeneration: true, - Pkg: "recommender", - ImportPath: "cloud.google.com/go/recommender/apiv1beta1", - GRPCServiceConfigPath: "recommender_grpc_service_config.json", - ApiServiceConfigPath: "recommender_v1beta1.yaml", - ReleaseLevel: "beta", - }, { InputDirectoryPath: "google/cloud/tasks/v2", Pkg: "cloudtasks", @@ -367,133 +219,73 @@ var MicrogenGapicConfigs = []*MicrogenConfig{ ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/videointelligence/v1", - stopGeneration: true, - Pkg: "videointelligence", - ImportPath: "cloud.google.com/go/videointelligence/apiv1", - GRPCServiceConfigPath: "videointelligence_grpc_service_config.json", - ApiServiceConfigPath: "videointelligence_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/vision/v1", - Pkg: "vision", - ImportPath: "cloud.google.com/go/vision/v2/apiv1", - GRPCServiceConfigPath: "vision_grpc_service_config.json", - ApiServiceConfigPath: "vision_v1.yaml", + InputDirectoryPath: "google/cloud/compute/v1", + Pkg: "compute", + ImportPath: "cloud.google.com/go/compute/apiv1", + GRPCServiceConfigPath: "", + ApiServiceConfigPath: "compute_v1.yaml", ReleaseLevel: "ga", + NumericEnumsDisabled: true, + Transports: []string{"rest"}, }, { - InputDirectoryPath: "google/cloud/webrisk/v1", - stopGeneration: true, - Pkg: "webrisk", - ImportPath: "cloud.google.com/go/webrisk/apiv1", - GRPCServiceConfigPath: "webrisk_grpc_service_config.json", - ApiServiceConfigPath: "webrisk_v1.yaml", + InputDirectoryPath: "google/devtools/clouddebugger/v2", + Pkg: "debugger", + ImportPath: "cloud.google.com/go/debugger/apiv2", + GRPCServiceConfigPath: "clouddebugger_grpc_service_config.json", + ApiServiceConfigPath: "clouddebugger_v2.yaml", ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/cloud/webrisk/v1beta1", - stopGeneration: true, - Pkg: "webrisk", - ImportPath: "cloud.google.com/go/webrisk/apiv1beta1", - GRPCServiceConfigPath: "webrisk_grpc_service_config.json", - ApiServiceConfigPath: "webrisk_v1beta1.yaml", + InputDirectoryPath: "google/cloud/dialogflow/v2beta1", + Pkg: "dialogflow", + ImportPath: "cloud.google.com/go/dialogflow/apiv2beta1", + GRPCServiceConfigPath: "dialogflow_grpc_service_config.json", + ApiServiceConfigPath: "dialogflow_v2beta1.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/secretmanager/v1", - stopGeneration: true, - Pkg: "secretmanager", - ImportPath: "cloud.google.com/go/secretmanager/apiv1", - GRPCServiceConfigPath: "secretmanager_grpc_service_config.json", - ApiServiceConfigPath: "secretmanager_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/osconfig/v1", - stopGeneration: true, - Pkg: "osconfig", - ImportPath: "cloud.google.com/go/osconfig/apiv1", - GRPCServiceConfigPath: "osconfig_grpc_service_config.json", - ApiServiceConfigPath: "osconfig_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/osconfig/v1alpha", - stopGeneration: true, - Pkg: "osconfig", - ImportPath: "cloud.google.com/go/osconfig/apiv1alpha", - GRPCServiceConfigPath: "osconfig_grpc_service_config.json", - ApiServiceConfigPath: "osconfig_v1alpha.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/osconfig/v1beta", - stopGeneration: true, - Pkg: "osconfig", - ImportPath: "cloud.google.com/go/osconfig/apiv1beta", - GRPCServiceConfigPath: "osconfig_grpc_service_config.json", - ApiServiceConfigPath: "osconfig_v1beta.yaml", + InputDirectoryPath: "google/devtools/clouderrorreporting/v1beta1", + Pkg: "errorreporting", + ImportPath: "cloud.google.com/go/errorreporting/apiv1beta1", + GRPCServiceConfigPath: "errorreporting_grpc_service_config.json", + ApiServiceConfigPath: "clouderrorreporting_v1beta1.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/osconfig/agentendpoint/v1", - stopGeneration: true, - Pkg: "agentendpoint", - ImportPath: "cloud.google.com/go/osconfig/agentendpoint/apiv1", - GRPCServiceConfigPath: "agentendpoint_grpc_service_config.json", - ApiServiceConfigPath: "osconfig_v1.yaml", - ReleaseLevel: "ga", - // Do not generate REST until numeric enums are supported. - Transports: []string{"grpc"}, - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/osconfig/agentendpoint/v1beta", - stopGeneration: true, - Pkg: "agentendpoint", - ImportPath: "cloud.google.com/go/osconfig/agentendpoint/apiv1beta", - GRPCServiceConfigPath: "agentendpoint_grpc_service_config.json", - ApiServiceConfigPath: "osconfig_v1beta.yaml", + InputDirectoryPath: "google/cloud/eventarc/publishing/v1", + Pkg: "publishing", + ImportPath: "cloud.google.com/go/eventarc/publishing/apiv1", + GRPCServiceConfigPath: "eventarcpublishing_grpc_service_config.json", + ApiServiceConfigPath: "eventarcpublishing_v1.yaml", ReleaseLevel: "beta", - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/datacatalog/v1", - stopGeneration: true, - Pkg: "datacatalog", - ImportPath: "cloud.google.com/go/datacatalog/apiv1", - GRPCServiceConfigPath: "datacatalog_grpc_service_config.json", - ApiServiceConfigPath: "datacatalog_v1.yaml", - ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/cloud/datacatalog/v1beta1", - stopGeneration: true, - Pkg: "datacatalog", - ImportPath: "cloud.google.com/go/datacatalog/apiv1beta1", - GRPCServiceConfigPath: "datacatalog_grpc_service_config.json", - ApiServiceConfigPath: "datacatalog_v1beta1.yaml", + InputDirectoryPath: "google/cloud/kms/inventory/v1", + Pkg: "inventory", + ImportPath: "cloud.google.com/go/kms/inventory/apiv1", + GRPCServiceConfigPath: "kmsinventory_grpc_service_config.json", + ApiServiceConfigPath: "kmsinventory_v1.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/dataproc/v1", - stopGeneration: true, - Pkg: "dataproc", - ImportPath: "cloud.google.com/go/dataproc/apiv1", - GRPCServiceConfigPath: "dataproc_grpc_service_config.json", - ApiServiceConfigPath: "dataproc_v1.yaml", + InputDirectoryPath: "google/monitoring/v3", + Pkg: "monitoring", + ImportPath: "cloud.google.com/go/monitoring/apiv3/v2", + GRPCServiceConfigPath: "monitoring_grpc_service_config.json", + ApiServiceConfigPath: "monitoring.yaml", ReleaseLevel: "ga", + NumericEnumsDisabled: true, + Transports: []string{"grpc"}, }, { - InputDirectoryPath: "google/cloud/kms/v1", - stopGeneration: true, - Pkg: "kms", - ImportPath: "cloud.google.com/go/kms/apiv1", - GRPCServiceConfigPath: "cloudkms_grpc_service_config.json", - ApiServiceConfigPath: "cloudkms_v1.yaml", + InputDirectoryPath: "google/cloud/networkconnectivity/v1", + Pkg: "networkconnectivity", + ImportPath: "cloud.google.com/go/networkconnectivity/apiv1", + GRPCServiceConfigPath: "networkconnectivity_v1_grpc_service_config.json", + ApiServiceConfigPath: "networkconnectivity_v1.yaml", ReleaseLevel: "ga", + Transports: []string{"grpc"}, }, { InputDirectoryPath: "google/cloud/oslogin/v1", @@ -518,6 +310,7 @@ var MicrogenGapicConfigs = []*MicrogenConfig{ GRPCServiceConfigPath: "recaptchaenterprise_grpc_service_config.json", ApiServiceConfigPath: "recaptchaenterprise_v1.yaml", ReleaseLevel: "ga", + NumericEnumsDisabled: false, Transports: []string{"grpc"}, }, { @@ -529,38 +322,30 @@ var MicrogenGapicConfigs = []*MicrogenConfig{ ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/redis/v1", - stopGeneration: true, - Pkg: "redis", - ImportPath: "cloud.google.com/go/redis/apiv1", - GRPCServiceConfigPath: "redis_grpc_service_config.json", - ApiServiceConfigPath: "redis_v1.yaml", + InputDirectoryPath: "google/cloud/resourcemanager/v2", + Pkg: "resourcemanager", + ImportPath: "cloud.google.com/go/resourcemanager/apiv2", + GRPCServiceConfigPath: "", + ApiServiceConfigPath: "cloudresourcemanager_v2.yaml", ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/cloud/redis/v1beta1", - stopGeneration: true, - Pkg: "redis", - ImportPath: "cloud.google.com/go/redis/apiv1beta1", - GRPCServiceConfigPath: "redis_grpc_service_config.json", - ApiServiceConfigPath: "redis_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/devtools/clouddebugger/v2", - Pkg: "debugger", - ImportPath: "cloud.google.com/go/debugger/apiv2", - GRPCServiceConfigPath: "clouddebugger_grpc_service_config.json", - ApiServiceConfigPath: "clouddebugger_v2.yaml", + InputDirectoryPath: "google/api/serviceusage/v1", + Pkg: "serviceusage", + ImportPath: "cloud.google.com/go/serviceusage/apiv1", + GRPCServiceConfigPath: "serviceusage_grpc_service_config.json", + ApiServiceConfigPath: "serviceusage_v1.yaml", ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/devtools/clouderrorreporting/v1beta1", - Pkg: "errorreporting", - ImportPath: "cloud.google.com/go/errorreporting/apiv1beta1", - GRPCServiceConfigPath: "errorreporting_grpc_service_config.json", - ApiServiceConfigPath: "clouderrorreporting_v1beta1.yaml", - ReleaseLevel: "beta", + InputDirectoryPath: "google/storage/v2", + Pkg: "storage", + ImportPath: "cloud.google.com/go/storage/internal/apiv2", + GRPCServiceConfigPath: "", + ApiServiceConfigPath: "storage_v2.yaml", + ReleaseLevel: "alpha", + NumericEnumsDisabled: true, + Transports: []string{"grpc"}, }, { InputDirectoryPath: "google/devtools/cloudtrace/v1", @@ -579,1502 +364,35 @@ var MicrogenGapicConfigs = []*MicrogenConfig{ ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/privacy/dlp/v2", - stopGeneration: true, - Pkg: "dlp", - ImportPath: "cloud.google.com/go/dlp/apiv2", - GRPCServiceConfigPath: "dlp_grpc_service_config.json", - ApiServiceConfigPath: "dlp_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/datastore/admin/v1", - stopGeneration: true, - Pkg: "admin", - ImportPath: "cloud.google.com/go/datastore/admin/apiv1", - GRPCServiceConfigPath: "datastore_admin_grpc_service_config.json", - ApiServiceConfigPath: "datastore_v1.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/spanner/admin/database/v1", - stopGeneration: true, - Pkg: "database", - ImportPath: "cloud.google.com/go/spanner/admin/database/apiv1", - GRPCServiceConfigPath: "spanner_admin_database_grpc_service_config.json", - ApiServiceConfigPath: "spanner.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/spanner/admin/instance/v1", - stopGeneration: true, - Pkg: "instance", - ImportPath: "cloud.google.com/go/spanner/admin/instance/apiv1", - GRPCServiceConfigPath: "spanner_admin_instance_grpc_service_config.json", - ApiServiceConfigPath: "spanner_admin_instance.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/spanner/v1", - stopGeneration: true, - Pkg: "spanner", - ImportPath: "cloud.google.com/go/spanner/apiv1", - GRPCServiceConfigPath: "spanner_grpc_service_config.json", - ApiServiceConfigPath: "spanner.yaml", + InputDirectoryPath: "google/cloud/translate/v3", + Pkg: "translate", + ImportPath: "cloud.google.com/go/translate/apiv3", + GRPCServiceConfigPath: "translate_grpc_service_config.json", + ApiServiceConfigPath: "translate_v3.yaml", ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/cloud/securitycenter/settings/v1beta1", - stopGeneration: true, - Pkg: "settings", - ImportPath: "cloud.google.com/go/securitycenter/settings/apiv1beta1", - GRPCServiceConfigPath: "securitycenter_settings_grpc_service_config.json", - ApiServiceConfigPath: "securitycenter_settings.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/securitycenter/v1", - stopGeneration: true, - Pkg: "securitycenter", - ImportPath: "cloud.google.com/go/securitycenter/apiv1", - GRPCServiceConfigPath: "securitycenter_grpc_service_config.json", - ApiServiceConfigPath: "securitycenter_v1.yaml", + InputDirectoryPath: "google/cloud/vision/v1", + Pkg: "vision", + ImportPath: "cloud.google.com/go/vision/v2/apiv1", + GRPCServiceConfigPath: "vision_grpc_service_config.json", + ApiServiceConfigPath: "vision_v1.yaml", ReleaseLevel: "ga", }, { - InputDirectoryPath: "google/cloud/securitycenter/v1beta1", - stopGeneration: true, - Pkg: "securitycenter", - ImportPath: "cloud.google.com/go/securitycenter/apiv1beta1", - GRPCServiceConfigPath: "securitycenter_grpc_service_config.json", - ApiServiceConfigPath: "securitycenter_v1beta1.yaml", + InputDirectoryPath: "google/cloud/vision/v1p1beta1", + Pkg: "vision", + ImportPath: "cloud.google.com/go/vision/v2/apiv1p1beta1", + GRPCServiceConfigPath: "vision_grpc_service_config.json", + ApiServiceConfigPath: "vision_v1p1beta1.yaml", ReleaseLevel: "beta", }, { - InputDirectoryPath: "google/cloud/securitycenter/v1p1beta1", - stopGeneration: true, - Pkg: "securitycenter", - ImportPath: "cloud.google.com/go/securitycenter/apiv1p1beta1", - GRPCServiceConfigPath: "securitycenter_grpc_service_config.json", - ApiServiceConfigPath: "securitycenter_v1p1beta1.yaml", + InputDirectoryPath: "google/cloud/workstations/v1beta", + Pkg: "workstations", + ImportPath: "cloud.google.com/go/workstations/apiv1beta", + GRPCServiceConfigPath: "workstations_grpc_service_config.json", + ApiServiceConfigPath: "workstations_v1beta.yaml", ReleaseLevel: "beta", }, - { - InputDirectoryPath: "google/firestore/admin/v1", - stopGeneration: true, - Pkg: "apiv1", - ImportPath: "cloud.google.com/go/firestore/apiv1/admin", - GRPCServiceConfigPath: "firestore_admin_grpc_service_config.json", - ApiServiceConfigPath: "firestore_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/firestore/v1", - stopGeneration: true, - Pkg: "firestore", - ImportPath: "cloud.google.com/go/firestore/apiv1", - GRPCServiceConfigPath: "firestore_grpc_service_config.json", - ApiServiceConfigPath: "firestore_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/devtools/cloudbuild/v1", - Pkg: "cloudbuild", - ImportPath: "cloud.google.com/go/cloudbuild/apiv1/v2", - GRPCServiceConfigPath: "cloudbuild_grpc_service_config.json", - ApiServiceConfigPath: "cloudbuild_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/dialogflow/cx/v3beta1", - stopGeneration: true, - Pkg: "cx", - ImportPath: "cloud.google.com/go/dialogflow/cx/apiv3beta1", - GRPCServiceConfigPath: "dialogflow_grpc_service_config.json", - ApiServiceConfigPath: "dialogflow_v3beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/dialogflow/cx/v3", - stopGeneration: true, - Pkg: "cx", - ImportPath: "cloud.google.com/go/dialogflow/cx/apiv3", - GRPCServiceConfigPath: "dialogflow_grpc_service_config.json", - ApiServiceConfigPath: "dialogflow_v3.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/dialogflow/v2", - stopGeneration: true, - Pkg: "dialogflow", - ImportPath: "cloud.google.com/go/dialogflow/apiv2", - GRPCServiceConfigPath: "dialogflow_grpc_service_config.json", - ApiServiceConfigPath: "dialogflow_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/iam/credentials/v1", - stopGeneration: true, - Pkg: "credentials", - ImportPath: "cloud.google.com/go/iam/credentials/apiv1", - GRPCServiceConfigPath: "iamcredentials_grpc_service_config.json", - ApiServiceConfigPath: "iamcredentials_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/longrunning", - stopGeneration: true, - Pkg: "longrunning", - ImportPath: "cloud.google.com/go/longrunning/autogen", - GRPCServiceConfigPath: "longrunning_grpc_service_config.json", - ApiServiceConfigPath: "longrunning.yaml", - ReleaseLevel: "alpha", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/devtools/containeranalysis/v1beta1", - stopGeneration: true, - Pkg: "containeranalysis", - ImportPath: "cloud.google.com/go/containeranalysis/apiv1beta1", - GRPCServiceConfigPath: "containeranalysis_grpc_service_config.json", - ApiServiceConfigPath: "containeranalysis_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - // The grafeas v1beta1 client must be generated in the same package as containeranalysis v1beta1, - // but the proto is in a sub-directory of the containeranalysis v1beta1 protos. - InputDirectoryPath: "google/devtools/containeranalysis/v1beta1/grafeas", - stopGeneration: true, - Pkg: "containeranalysis", - ImportPath: "cloud.google.com/go/containeranalysis/apiv1beta1", - GRPCServiceConfigPath: "../containeranalysis_grpc_service_config.json", - ApiServiceConfigPath: "../containeranalysis_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/recommender/v1", - stopGeneration: true, - Pkg: "recommender", - ImportPath: "cloud.google.com/go/recommender/apiv1", - GRPCServiceConfigPath: "recommender_grpc_service_config.json", - ApiServiceConfigPath: "recommender_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/videointelligence/v1beta2", - stopGeneration: true, - Pkg: "videointelligence", - ImportPath: "cloud.google.com/go/videointelligence/apiv1beta2", - GRPCServiceConfigPath: "videointelligence_grpc_service_config.json", - ApiServiceConfigPath: "../videointelligence_v1beta2.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/asset/v1p2beta1", - Pkg: "asset", - ImportPath: "cloud.google.com/go/asset/apiv1p2beta1", - GRPCServiceConfigPath: "cloudasset_grpc_service_config.json", - ApiServiceConfigPath: "cloudasset_v1p2beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/asset/v1p5beta1", - Pkg: "asset", - ImportPath: "cloud.google.com/go/asset/apiv1p5beta1", - GRPCServiceConfigPath: "cloudasset_grpc_service_config.json", - ApiServiceConfigPath: "cloudasset_v1p5beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/monitoring/v3", - Pkg: "monitoring", - ImportPath: "cloud.google.com/go/monitoring/apiv3/v2", - GRPCServiceConfigPath: "monitoring_grpc_service_config.json", - ApiServiceConfigPath: "monitoring.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/vision/v1p1beta1", - Pkg: "vision", - ImportPath: "cloud.google.com/go/vision/v2/apiv1p1beta1", - GRPCServiceConfigPath: "vision_grpc_service_config.json", - ApiServiceConfigPath: "vision_v1p1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/logging/v2", - stopGeneration: true, - Pkg: "logging", - ImportPath: "cloud.google.com/go/logging/apiv2", - GRPCServiceConfigPath: "logging_grpc_service_config.json", - ApiServiceConfigPath: "logging_v2.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/talent/v4", - stopGeneration: true, - Pkg: "talent", - ImportPath: "cloud.google.com/go/talent/apiv4", - GRPCServiceConfigPath: "talent_grpc_service_config.json", - ApiServiceConfigPath: "jobs_v4.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/talent/v4beta1", - stopGeneration: true, - Pkg: "talent", - ImportPath: "cloud.google.com/go/talent/apiv4beta1", - GRPCServiceConfigPath: "talent_grpc_service_config.json", - ApiServiceConfigPath: "jobs_v4beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/pubsub/v1", - stopGeneration: true, - Pkg: "pubsub", - ImportPath: "cloud.google.com/go/pubsub/apiv1", - GRPCServiceConfigPath: "pubsub_grpc_service_config.json", - ApiServiceConfigPath: "pubsub_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/pubsublite/v1", - stopGeneration: true, - Pkg: "pubsublite", - ImportPath: "cloud.google.com/go/pubsublite/apiv1", - GRPCServiceConfigPath: "pubsublite_grpc_service_config.json", - ApiServiceConfigPath: "pubsublite_v1.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/automl/v1", - stopGeneration: true, - Pkg: "automl", - ImportPath: "cloud.google.com/go/automl/apiv1", - GRPCServiceConfigPath: "automl_grpc_service_config.json", - ApiServiceConfigPath: "automl_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/automl/v1beta1", - stopGeneration: true, - Pkg: "automl", - ImportPath: "cloud.google.com/go/automl/apiv1beta1", - GRPCServiceConfigPath: "automl_grpc_service_config.json", - ApiServiceConfigPath: "automl_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/container/v1", - stopGeneration: true, - Pkg: "container", - ImportPath: "cloud.google.com/go/container/apiv1", - GRPCServiceConfigPath: "container_grpc_service_config.json", - ApiServiceConfigPath: "container_v1.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/servicedirectory/v1", - stopGeneration: true, - Pkg: "servicedirectory", - ImportPath: "cloud.google.com/go/servicedirectory/apiv1", - GRPCServiceConfigPath: "servicedirectory_grpc_service_config.json", - ApiServiceConfigPath: "servicedirectory_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/servicedirectory/v1beta1", - stopGeneration: true, - Pkg: "servicedirectory", - ImportPath: "cloud.google.com/go/servicedirectory/apiv1beta1", - GRPCServiceConfigPath: "servicedirectory_grpc_service_config.json", - ApiServiceConfigPath: "servicedirectory_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/gaming/v1", - stopGeneration: true, - Pkg: "gaming", - ImportPath: "cloud.google.com/go/gaming/apiv1", - GRPCServiceConfigPath: "gaming_grpc_service_config.json", - ApiServiceConfigPath: "gameservices_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/gaming/v1beta", - stopGeneration: true, - Pkg: "gaming", - ImportPath: "cloud.google.com/go/gaming/apiv1beta", - GRPCServiceConfigPath: "gaming_grpc_service_config.json", - ApiServiceConfigPath: "gameservices_v1beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/policytroubleshooter/v1", - stopGeneration: true, - Pkg: "policytroubleshooter", - ImportPath: "cloud.google.com/go/policytroubleshooter/apiv1", - GRPCServiceConfigPath: "checker_grpc_service_config.json", - ApiServiceConfigPath: "policytroubleshooter_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/monitoring/dashboard/v1", - stopGeneration: true, - Pkg: "dashboard", - ImportPath: "cloud.google.com/go/monitoring/dashboard/apiv1", - GRPCServiceConfigPath: "dashboards_grpc_service_config.json", - ApiServiceConfigPath: "monitoring.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/functions/v1", - stopGeneration: true, - Pkg: "functions", - ImportPath: "cloud.google.com/go/functions/apiv1", - GRPCServiceConfigPath: "functions_grpc_service_config.json", - ApiServiceConfigPath: "cloudfunctions_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/networkconnectivity/v1", - Pkg: "networkconnectivity", - ImportPath: "cloud.google.com/go/networkconnectivity/apiv1", - GRPCServiceConfigPath: "networkconnectivity_v1_grpc_service_config.json", - ApiServiceConfigPath: "networkconnectivity_v1.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/networkconnectivity/v1alpha1", - stopGeneration: true, - Pkg: "networkconnectivity", - ImportPath: "cloud.google.com/go/networkconnectivity/apiv1alpha1", - GRPCServiceConfigPath: "networkconnectivity_grpc_service_config.json", - ApiServiceConfigPath: "networkconnectivity_v1alpha1.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/notebooks/v1beta1", - stopGeneration: true, - Pkg: "notebooks", - ImportPath: "cloud.google.com/go/notebooks/apiv1beta1", - GRPCServiceConfigPath: "notebooks_grpc_service_config.json", - ApiServiceConfigPath: "notebooks_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/billing/budgets/v1", - stopGeneration: true, - Pkg: "budgets", - ImportPath: "cloud.google.com/go/billing/budgets/apiv1", - GRPCServiceConfigPath: "billingbudgets_grpc_service_config.json", - ApiServiceConfigPath: "billingbudgets.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/billing/budgets/v1beta1", - stopGeneration: true, - Pkg: "budgets", - ImportPath: "cloud.google.com/go/billing/budgets/apiv1beta1", - GRPCServiceConfigPath: "billingbudgets_grpc_service_config.json", - ApiServiceConfigPath: "billingbudgets.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/video/transcoder/v1", - stopGeneration: true, - Pkg: "transcoder", - ImportPath: "cloud.google.com/go/video/transcoder/apiv1", - GRPCServiceConfigPath: "transcoder_grpc_service_config.json", - ApiServiceConfigPath: "transcoder_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/workflows/v1beta", - stopGeneration: true, - Pkg: "workflows", - ImportPath: "cloud.google.com/go/workflows/apiv1beta", - GRPCServiceConfigPath: "workflows_grpc_service_config.json", - ApiServiceConfigPath: "workflows_v1beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/workflows/executions/v1", - stopGeneration: true, - Pkg: "executions", - ImportPath: "cloud.google.com/go/workflows/executions/apiv1", - GRPCServiceConfigPath: "executions_grpc_service_config.json", - ApiServiceConfigPath: "workflowexecutions_v1.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/workflows/executions/v1beta", - stopGeneration: true, - Pkg: "executions", - ImportPath: "cloud.google.com/go/workflows/executions/apiv1beta", - GRPCServiceConfigPath: "executions_grpc_service_config.json", - ApiServiceConfigPath: "workflowexecutions_v1beta.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/security/privateca/v1", - stopGeneration: true, - Pkg: "privateca", - ImportPath: "cloud.google.com/go/security/privateca/apiv1", - GRPCServiceConfigPath: "privateca_grpc_service_config.json", - ApiServiceConfigPath: "privateca_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/assuredworkloads/v1beta1", - stopGeneration: true, - Pkg: "assuredworkloads", - ImportPath: "cloud.google.com/go/assuredworkloads/apiv1beta1", - GRPCServiceConfigPath: "assuredworkloads_grpc_service_config.json", - ApiServiceConfigPath: "assuredworkloads_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/accessapproval/v1", - stopGeneration: true, - Pkg: "accessapproval", - ImportPath: "cloud.google.com/go/accessapproval/apiv1", - GRPCServiceConfigPath: "accessapproval_grpc_service_config.json", - ApiServiceConfigPath: "accessapproval_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/websecurityscanner/v1", - stopGeneration: true, - Pkg: "websecurityscanner", - ImportPath: "cloud.google.com/go/websecurityscanner/apiv1", - GRPCServiceConfigPath: "websecurityscanner_grpc_service_config.json", - ApiServiceConfigPath: "websecurityscanner_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/managedidentities/v1", - stopGeneration: true, - Pkg: "managedidentities", - ImportPath: "cloud.google.com/go/managedidentities/apiv1", - GRPCServiceConfigPath: "managedidentities_grpc_service_config.json", - ApiServiceConfigPath: "managedidentities_v1.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/devtools/artifactregistry/v1beta2", - stopGeneration: true, - Pkg: "artifactregistry", - ImportPath: "cloud.google.com/go/artifactregistry/apiv1beta2", - GRPCServiceConfigPath: "artifactregistry_grpc_service_config.json", - ApiServiceConfigPath: "artifactregistry_v1beta2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/retail/v2", - stopGeneration: true, - Pkg: "retail", - ImportPath: "cloud.google.com/go/retail/apiv2", - GRPCServiceConfigPath: "retail_grpc_service_config.json", - ApiServiceConfigPath: "retail_v2.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/appengine/v1", - stopGeneration: true, - Pkg: "appengine", - ImportPath: "cloud.google.com/go/appengine/apiv1", - ApiServiceConfigPath: "appengine_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/binaryauthorization/v1beta1", - stopGeneration: true, - Pkg: "binaryauthorization", - ImportPath: "cloud.google.com/go/binaryauthorization/apiv1beta1", - GRPCServiceConfigPath: "binaryauthorization_grpc_service_config.json", - ApiServiceConfigPath: "binaryauthorization_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/channel/v1", - stopGeneration: true, - Pkg: "channel", - ImportPath: "cloud.google.com/go/channel/apiv1", - GRPCServiceConfigPath: "cloudchannel_grpc_service_config.json", - ApiServiceConfigPath: "cloudchannel_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/resourcemanager/v2", - Pkg: "resourcemanager", - ImportPath: "cloud.google.com/go/resourcemanager/apiv2", - ApiServiceConfigPath: "cloudresourcemanager_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/resourcemanager/v3", - stopGeneration: true, - Pkg: "resourcemanager", - ImportPath: "cloud.google.com/go/resourcemanager/apiv3", - GRPCServiceConfigPath: "cloudresourcemanager_v3_grpc_service_config.json", - ApiServiceConfigPath: "cloudresourcemanager_v3.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/datalabeling/v1beta1", - stopGeneration: true, - Pkg: "datalabeling", - ImportPath: "cloud.google.com/go/datalabeling/apiv1beta1", - GRPCServiceConfigPath: "datalabeling_grpc_service_config.json", - ApiServiceConfigPath: "datalabeling_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/dataqna/v1alpha", - stopGeneration: true, - Pkg: "dataqna", - ImportPath: "cloud.google.com/go/dataqna/apiv1alpha", - GRPCServiceConfigPath: "dataqna_grpc_service_config.json", - ApiServiceConfigPath: "dataqna_v1alpha.yaml", - ReleaseLevel: "alpha", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/documentai/v1", - stopGeneration: true, - Pkg: "documentai", - ImportPath: "cloud.google.com/go/documentai/apiv1", - GRPCServiceConfigPath: "documentai_v1_grpc_service_config.json", - ApiServiceConfigPath: "documentai_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/documentai/v1beta3", - stopGeneration: true, - Pkg: "documentai", - ImportPath: "cloud.google.com/go/documentai/apiv1beta3", - GRPCServiceConfigPath: "documentai_v1beta3_grpc_service_config.json", - ApiServiceConfigPath: "documentai_v1beta3.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/api/servicemanagement/v1", - stopGeneration: true, - Pkg: "servicemanagement", - ImportPath: "cloud.google.com/go/servicemanagement/apiv1", - GRPCServiceConfigPath: "servicemanagement_grpc_service_config.json", - ApiServiceConfigPath: "servicemanagement_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/domains/v1beta1", - stopGeneration: true, - Pkg: "domains", - ImportPath: "cloud.google.com/go/domains/apiv1beta1", - GRPCServiceConfigPath: "domains_grpc_service_config.json", - ApiServiceConfigPath: "domains_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/mediatranslation/v1beta1", - stopGeneration: true, - Pkg: "mediatranslation", - ImportPath: "cloud.google.com/go/mediatranslation/apiv1beta1", - GRPCServiceConfigPath: "mediatranslation_grpc_service_config.json", - ApiServiceConfigPath: "mediatranslation_v1beta1.yaml", - ReleaseLevel: "beta", - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/api/servicecontrol/v1", - stopGeneration: true, - Pkg: "servicecontrol", - ImportPath: "cloud.google.com/go/servicecontrol/apiv1", - ApiServiceConfigPath: "servicecontrol.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/orgpolicy/v2", - stopGeneration: true, - Pkg: "orgpolicy", - ImportPath: "cloud.google.com/go/orgpolicy/apiv2", - GRPCServiceConfigPath: "orgpolicy_grpc_service_config.json", - ApiServiceConfigPath: "orgpolicy_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/recommendationengine/v1beta1", - stopGeneration: true, - Pkg: "recommendationengine", - ImportPath: "cloud.google.com/go/recommendationengine/apiv1beta1", - GRPCServiceConfigPath: "recommendationengine_grpc_service_config.json", - ApiServiceConfigPath: "recommendationengine_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/gkehub/v1beta1", - stopGeneration: true, - Pkg: "gkehub", - ImportPath: "cloud.google.com/go/gkehub/apiv1beta1", - GRPCServiceConfigPath: "membership_grpc_service_config.json", - ApiServiceConfigPath: "gkehub_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/apigateway/v1", - stopGeneration: true, - Pkg: "apigateway", - ImportPath: "cloud.google.com/go/apigateway/apiv1", - GRPCServiceConfigPath: "apigateway_grpc_service_config.json", - ApiServiceConfigPath: "apigateway_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/metastore/v1", - stopGeneration: true, - Pkg: "metastore", - ImportPath: "cloud.google.com/go/metastore/apiv1", - GRPCServiceConfigPath: "metastore_grpc_service_config.json", - ApiServiceConfigPath: "metastore_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/metastore/v1alpha", - stopGeneration: true, - Pkg: "metastore", - ImportPath: "cloud.google.com/go/metastore/apiv1alpha", - GRPCServiceConfigPath: "metastore_grpc_service_config.json", - ApiServiceConfigPath: "metastore_v1alpha.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/metastore/v1beta", - stopGeneration: true, - Pkg: "metastore", - ImportPath: "cloud.google.com/go/metastore/apiv1beta", - GRPCServiceConfigPath: "metastore_grpc_service_config.json", - ApiServiceConfigPath: "metastore_v1beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/resourcesettings/v1", - stopGeneration: true, - Pkg: "resourcesettings", - ImportPath: "cloud.google.com/go/resourcesettings/apiv1", - GRPCServiceConfigPath: "resourcesettings_grpc_service_config.json", - ApiServiceConfigPath: "resourcesettings_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/clouddms/v1", - stopGeneration: true, - Pkg: "clouddms", - ImportPath: "cloud.google.com/go/clouddms/apiv1", - GRPCServiceConfigPath: "library_grpc_service_config.json", - ApiServiceConfigPath: "datamigration_v1.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/essentialcontacts/v1", - stopGeneration: true, - Pkg: "essentialcontacts", - ImportPath: "cloud.google.com/go/essentialcontacts/apiv1", - GRPCServiceConfigPath: "essentialcontacts_v1_grpc_service_config.json", - ApiServiceConfigPath: "essentialcontacts_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/api/serviceusage/v1", - Pkg: "serviceusage", - ImportPath: "cloud.google.com/go/serviceusage/apiv1", - GRPCServiceConfigPath: "serviceusage_grpc_service_config.json", - ApiServiceConfigPath: "serviceusage_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/shell/v1", - stopGeneration: true, - Pkg: "shell", - ImportPath: "cloud.google.com/go/shell/apiv1", - GRPCServiceConfigPath: "cloudshell_grpc_service_config.json", - ApiServiceConfigPath: "cloudshell_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/vpcaccess/v1", - stopGeneration: true, - Pkg: "vpcaccess", - ImportPath: "cloud.google.com/go/vpcaccess/apiv1", - GRPCServiceConfigPath: "vpcaccess_grpc_service_config.json", - ApiServiceConfigPath: "vpcaccess_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/privatecatalog/v1beta1", - stopGeneration: true, - Pkg: "privatecatalog", - ImportPath: "cloud.google.com/go/privatecatalog/apiv1beta1", - GRPCServiceConfigPath: "cloudprivatecatalog_grpc_service_config.json", - ApiServiceConfigPath: "cloudprivatecatalog_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/tpu/v1", - stopGeneration: true, - Pkg: "tpu", - ImportPath: "cloud.google.com/go/tpu/apiv1", - GRPCServiceConfigPath: "tpu_grpc_service_config.json", - ApiServiceConfigPath: "tpu_v1.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/apigeeconnect/v1", - stopGeneration: true, - Pkg: "apigeeconnect", - ImportPath: "cloud.google.com/go/apigeeconnect/apiv1", - GRPCServiceConfigPath: "connection_grpc_service_config.json", - ApiServiceConfigPath: "apigeeconnect_v1.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/lifesciences/v2beta", - stopGeneration: true, - Pkg: "lifesciences", - ImportPath: "cloud.google.com/go/lifesciences/apiv2beta", - GRPCServiceConfigPath: "lifesciences_grpc_service_config.json", - ApiServiceConfigPath: "lifesciences_v2beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/aiplatform/v1", - stopGeneration: true, - Pkg: "aiplatform", - ImportPath: "cloud.google.com/go/aiplatform/apiv1", - GRPCServiceConfigPath: "aiplatform_grpc_service_config.json", - ApiServiceConfigPath: "aiplatform_v1.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/aiplatform/v1beta1", - stopGeneration: true, - Pkg: "aiplatform", - ImportPath: "cloud.google.com/go/aiplatform/apiv1beta1", - GRPCServiceConfigPath: "aiplatform_grpc_service_config.json", - ApiServiceConfigPath: "aiplatform_v1beta1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/gkeconnect/gateway/v1beta1", - stopGeneration: true, - Pkg: "gateway", - ImportPath: "cloud.google.com/go/gkeconnect/gateway/apiv1beta1", - GRPCServiceConfigPath: "connectgw_grpc_service_config.json", - ApiServiceConfigPath: "connectgateway_v1beta1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/datastream/v1alpha1", - stopGeneration: true, - Pkg: "datastream", - ImportPath: "cloud.google.com/go/datastream/apiv1alpha1", - GRPCServiceConfigPath: "datastream_grpc_service_config.json", - ApiServiceConfigPath: "datastream_v1alpha1.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/dataflow/v1beta3", - stopGeneration: true, - Pkg: "dataflow", - ImportPath: "cloud.google.com/go/dataflow/apiv1beta3", - GRPCServiceConfigPath: "dataflow_grpc_service_config.json", - ApiServiceConfigPath: "dataflow_v1beta3.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/eventarc/v1", - stopGeneration: true, - Pkg: "eventarc", - ImportPath: "cloud.google.com/go/eventarc/apiv1", - GRPCServiceConfigPath: "eventarc_grpc_service_config.json", - ApiServiceConfigPath: "eventarc_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/networkmanagement/v1", - stopGeneration: true, - Pkg: "networkmanagement", - ImportPath: "cloud.google.com/go/networkmanagement/apiv1", - GRPCServiceConfigPath: "networkmanagement_grpc_service_config.json", - ApiServiceConfigPath: "networkmanagement_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/iap/v1", - stopGeneration: true, - Pkg: "iap", - ImportPath: "cloud.google.com/go/iap/apiv1", - GRPCServiceConfigPath: "iap_grpc_service_config.json", - ApiServiceConfigPath: "iap_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/datafusion/v1", - stopGeneration: true, - Pkg: "datafusion", - ImportPath: "cloud.google.com/go/datafusion/apiv1", - GRPCServiceConfigPath: "datafusion_grpc_service_config.json", - ApiServiceConfigPath: "datafusion_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/storagetransfer/v1", - stopGeneration: true, - Pkg: "storagetransfer", - ImportPath: "cloud.google.com/go/storagetransfer/apiv1", - GRPCServiceConfigPath: "storagetransfer_grpc_service_config.json", - ApiServiceConfigPath: "storagetransfer_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/networksecurity/v1beta1", - stopGeneration: true, - Pkg: "networksecurity", - ImportPath: "cloud.google.com/go/networksecurity/apiv1beta1", - GRPCServiceConfigPath: "networksecurity_v1beta1_grpc_service_config.json", - ApiServiceConfigPath: "networksecurity_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/monitoring/metricsscope/v1", - stopGeneration: true, - Pkg: "metricsscope", - ImportPath: "cloud.google.com/go/monitoring/metricsscope/apiv1", - GRPCServiceConfigPath: "metricsscopes_grpc_service_config.json", - ApiServiceConfigPath: "monitoring.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/identity/accesscontextmanager/v1", - stopGeneration: true, - Pkg: "accesscontextmanager", - ImportPath: "cloud.google.com/go/accesscontextmanager/apiv1", - GRPCServiceConfigPath: "accesscontextmanager_grpc_service_config.json", - ApiServiceConfigPath: "accesscontextmanager_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/contactcenterinsights/v1", - stopGeneration: true, - Pkg: "contactcenterinsights", - ImportPath: "cloud.google.com/go/contactcenterinsights/apiv1", - GRPCServiceConfigPath: "contactcenterinsights_grpc_service_config.json", - ApiServiceConfigPath: "contactcenterinsights_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/orchestration/airflow/service/v1", - stopGeneration: true, - Pkg: "service", - ImportPath: "cloud.google.com/go/orchestration/airflow/service/apiv1", - GRPCServiceConfigPath: "composer_grpc_service_config.json", - ApiServiceConfigPath: "composer_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/filestore/v1", - stopGeneration: true, - Pkg: "filestore", - ImportPath: "cloud.google.com/go/filestore/apiv1", - GRPCServiceConfigPath: "file_grpc_service_config.json", - ApiServiceConfigPath: "file_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/deploy/v1", - stopGeneration: true, - Pkg: "deploy", - ImportPath: "cloud.google.com/go/deploy/apiv1", - GRPCServiceConfigPath: "clouddeploy_grpc_service_config.json", - ApiServiceConfigPath: "clouddeploy_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/ids/v1", - stopGeneration: true, - Pkg: "ids", - ImportPath: "cloud.google.com/go/ids/apiv1", - GRPCServiceConfigPath: "ids_grpc_service_config.json", - ApiServiceConfigPath: "ids_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/vmmigration/v1", - stopGeneration: true, - Pkg: "vmmigration", - ImportPath: "cloud.google.com/go/vmmigration/apiv1", - GRPCServiceConfigPath: "vmmigration_v1_grpc_service_config.json", - ApiServiceConfigPath: "vmmigration_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/eventarc/publishing/v1", - Pkg: "publishing", - ImportPath: "cloud.google.com/go/eventarc/publishing/apiv1", - GRPCServiceConfigPath: "eventarcpublishing_grpc_service_config.json", - ApiServiceConfigPath: "eventarcpublishing_v1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/video/livestream/v1", - stopGeneration: true, - Pkg: "livestream", - ImportPath: "cloud.google.com/go/video/livestream/apiv1", - GRPCServiceConfigPath: "livestream_grpc_service_config.json", - ApiServiceConfigPath: "livestream_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/dataplex/v1", - stopGeneration: true, - Pkg: "dataplex", - ImportPath: "cloud.google.com/go/dataplex/apiv1", - GRPCServiceConfigPath: "dataplex_grpc_service_config.json", - ApiServiceConfigPath: "dataplex_v1.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/video/stitcher/v1", - stopGeneration: true, - Pkg: "stitcher", - ImportPath: "cloud.google.com/go/video/stitcher/apiv1", - GRPCServiceConfigPath: "videostitcher_grpc_service_config.json", - ApiServiceConfigPath: "videostitcher_v1.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/certificatemanager/v1", - stopGeneration: true, - Pkg: "certificatemanager", - ImportPath: "cloud.google.com/go/certificatemanager/apiv1", - GRPCServiceConfigPath: "certificatemanager_grpc_service_config.json", - ApiServiceConfigPath: "certificatemanager_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/optimization/v1", - stopGeneration: true, - Pkg: "optimization", - ImportPath: "cloud.google.com/go/optimization/apiv1", - GRPCServiceConfigPath: "cloudoptimization_grpc_service_config.json", - ApiServiceConfigPath: "cloudoptimization_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/run/v2", - stopGeneration: true, - Pkg: "run", - ImportPath: "cloud.google.com/go/run/apiv2", - GRPCServiceConfigPath: "run_grpc_service_config.json", - ApiServiceConfigPath: "run_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/assuredworkloads/v1", - stopGeneration: true, - Pkg: "assuredworkloads", - ImportPath: "cloud.google.com/go/assuredworkloads/apiv1", - GRPCServiceConfigPath: "assuredworkloads_grpc_service_config.json", - ApiServiceConfigPath: "assuredworkloads_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/binaryauthorization/v1", - stopGeneration: true, - Pkg: "binaryauthorization", - ImportPath: "cloud.google.com/go/binaryauthorization/apiv1", - GRPCServiceConfigPath: "binaryauthorization_grpc_service_config.json", - ApiServiceConfigPath: "binaryauthorization_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/datastream/v1", - stopGeneration: true, - Pkg: "datastream", - ImportPath: "cloud.google.com/go/datastream/apiv1", - GRPCServiceConfigPath: "datastream_grpc_service_config.json", - ApiServiceConfigPath: "datastream_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/notebooks/v1", - stopGeneration: true, - Pkg: "notebooks", - ImportPath: "cloud.google.com/go/notebooks/apiv1", - GRPCServiceConfigPath: "notebooks_grpc_service_config.json", - ApiServiceConfigPath: "notebooks_v1.yaml", - ReleaseLevel: "ga", - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/workflows/v1", - stopGeneration: true, - Pkg: "workflows", - ImportPath: "cloud.google.com/go/workflows/apiv1", - GRPCServiceConfigPath: "workflows_grpc_service_config.json", - ApiServiceConfigPath: "workflows_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/gkebackup/v1", - stopGeneration: true, - Pkg: "gkebackup", - ImportPath: "cloud.google.com/go/gkebackup/apiv1", - GRPCServiceConfigPath: "gkebackup_grpc_service_config.json", - ApiServiceConfigPath: "gkebackup_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/gkemulticloud/v1", - stopGeneration: true, - Pkg: "gkemulticloud", - ImportPath: "cloud.google.com/go/gkemulticloud/apiv1", - GRPCServiceConfigPath: "gkemulticloud_grpc_service_config.json", - ApiServiceConfigPath: "gkemulticloud_v1.yaml", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/retail/v2alpha", - stopGeneration: true, - Pkg: "retail", - ImportPath: "cloud.google.com/go/retail/apiv2alpha", - GRPCServiceConfigPath: "retail_grpc_service_config.json", - ApiServiceConfigPath: "retail_v2alpha.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/retail/v2beta", - stopGeneration: true, - Pkg: "retail", - ImportPath: "cloud.google.com/go/retail/apiv2beta", - GRPCServiceConfigPath: "retail_grpc_service_config.json", - ApiServiceConfigPath: "retail_v2beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/batch/v1", - stopGeneration: true, - Pkg: "batch", - ImportPath: "cloud.google.com/go/batch/apiv1", - GRPCServiceConfigPath: "batch_v1_grpc_service_config.json", - ApiServiceConfigPath: "batch_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/baremetalsolution/v2", - stopGeneration: true, - Pkg: "baremetalsolution", - ImportPath: "cloud.google.com/go/baremetalsolution/apiv2", - GRPCServiceConfigPath: "baremetalsolution_grpc_service_config.json", - ApiServiceConfigPath: "baremetalsolution_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/videointelligence/v1p3beta1", - stopGeneration: true, - Pkg: "videointelligence", - ImportPath: "cloud.google.com/go/videointelligence/apiv1p3beta1", - GRPCServiceConfigPath: "videointelligence_grpc_service_config.json", - ApiServiceConfigPath: "videointelligence_v1p3beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/functions/v2beta", - stopGeneration: true, - Pkg: "functions", - ImportPath: "cloud.google.com/go/functions/apiv2beta", - GRPCServiceConfigPath: "functions_grpc_service_config.json", - ApiServiceConfigPath: "cloudfunctions_v2beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/dataform/v1alpha2", - stopGeneration: true, - Pkg: "dataform", - ImportPath: "cloud.google.com/go/dataform/apiv1alpha2", - GRPCServiceConfigPath: "dataform_grpc_service_config.json", - ApiServiceConfigPath: "dataform_v1alpha2.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/functions/v2", - stopGeneration: true, - Pkg: "functions", - ImportPath: "cloud.google.com/go/functions/apiv2", - GRPCServiceConfigPath: "functions_grpc_service_config.json", - ApiServiceConfigPath: "cloudfunctions_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/beyondcorp/appconnections/v1", - stopGeneration: true, - Pkg: "appconnections", - ImportPath: "cloud.google.com/go/beyondcorp/appconnections/apiv1", - GRPCServiceConfigPath: "beyondcorp-appconnections_grpc_service_config.json", - ApiServiceConfigPath: "beyondcorp_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/beyondcorp/appconnectors/v1", - stopGeneration: true, - Pkg: "appconnectors", - ImportPath: "cloud.google.com/go/beyondcorp/appconnectors/apiv1", - GRPCServiceConfigPath: "beyondcorp-appconnectors_grpc_service_config.json", - ApiServiceConfigPath: "beyondcorp_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/beyondcorp/appgateways/v1", - stopGeneration: true, - Pkg: "appgateways", - ImportPath: "cloud.google.com/go/beyondcorp/appgateways/apiv1", - GRPCServiceConfigPath: "beyondcorp-appgateways_grpc_service_config.json", - ApiServiceConfigPath: "beyondcorp_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/beyondcorp/clientconnectorservices/v1", - stopGeneration: true, - Pkg: "clientconnectorservices", - ImportPath: "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1", - GRPCServiceConfigPath: "beyondcorp-clientconnectorservices_grpc_service_config.json", - ApiServiceConfigPath: "beyondcorp_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/cloud/beyondcorp/clientgateways/v1", - stopGeneration: true, - Pkg: "clientgateways", - ImportPath: "cloud.google.com/go/beyondcorp/clientgateways/apiv1", - GRPCServiceConfigPath: "beyondcorp-clientgateways_grpc_service_config.json", - ApiServiceConfigPath: "beyondcorp_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/devtools/artifactregistry/v1", - stopGeneration: true, - Pkg: "artifactregistry", - ImportPath: "cloud.google.com/go/artifactregistry/apiv1", - GRPCServiceConfigPath: "artifactregistry_grpc_service_config.json", - ApiServiceConfigPath: "artifactregistry_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/apigeeregistry/v1", - Pkg: "apigeeregistry", - ImportPath: "cloud.google.com/go/apigeeregistry/apiv1", - GRPCServiceConfigPath: "apigeeregistry_grpc_service_config.json", - ApiServiceConfigPath: "apigeeregistry_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - Transports: []string{"grpc"}, - }, - { - InputDirectoryPath: "google/api/apikeys/v2", - stopGeneration: true, - Pkg: "apikeys", - ImportPath: "cloud.google.com/go/apikeys/apiv2", - GRPCServiceConfigPath: "apikeys_grpc_service_config.json", - ApiServiceConfigPath: "apikeys_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/dialogflow/v2beta1", - Pkg: "dialogflow", - ImportPath: "cloud.google.com/go/dialogflow/apiv2beta1", - GRPCServiceConfigPath: "dialogflow_grpc_service_config.json", - ApiServiceConfigPath: "dialogflow_v2beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/iam/v1", - stopGeneration: true, - Pkg: "iam", - ImportPath: "cloud.google.com/go/iam/apiv1", - ApiServiceConfigPath: "iam_meta_api.yaml", - ReleaseLevel: "ga", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/iam/v2", - stopGeneration: true, - Pkg: "iam", - ImportPath: "cloud.google.com/go/iam/apiv2", - GRPCServiceConfigPath: "iam_grpc_service_config.json", - ApiServiceConfigPath: "iam_v2.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/security/publicca/v1beta1", - stopGeneration: true, - Pkg: "publicca", - ImportPath: "cloud.google.com/go/security/publicca/apiv1beta1", - GRPCServiceConfigPath: "publicca_v1beta1_grpc_service_config.json", - ApiServiceConfigPath: "publicca_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/edgecontainer/v1", - stopGeneration: true, - Pkg: "edgecontainer", - ImportPath: "cloud.google.com/go/edgecontainer/apiv1", - GRPCServiceConfigPath: "edgecontainer_grpc_service_config.json", - ApiServiceConfigPath: "edgecontainer_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/bigquery/datapolicies/v1beta1", - stopGeneration: true, - Pkg: "datapolicies", - ImportPath: "cloud.google.com/go/bigquery/datapolicies/apiv1beta1", - GRPCServiceConfigPath: "datapolicies_v1beta1_grpc_service_config.json", - ApiServiceConfigPath: "bigquerydatapolicy_v1beta1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/bigquery/analyticshub/v1", - Pkg: "analyticshub", - ImportPath: "cloud.google.com/go/bigquery/analyticshub/apiv1", - GRPCServiceConfigPath: "analyticshub_v1_grpc_service_config.json", - ApiServiceConfigPath: "analyticshub_v1.yaml", - NumericEnumsDisabled: true, - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/speech/v2", - stopGeneration: true, - Pkg: "speech", - ImportPath: "cloud.google.com/go/speech/apiv2", - GRPCServiceConfigPath: "speech_grpc_service_config.json", - ApiServiceConfigPath: "speech_v2.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/dataform/v1beta1", - stopGeneration: true, - Pkg: "dataform", - ImportPath: "cloud.google.com/go/dataform/apiv1beta1", - GRPCServiceConfigPath: "dataform_grpc_service_config.json", - ApiServiceConfigPath: "dataform_v1beta1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/maps/routing/v2", - stopGeneration: true, - Pkg: "routing", - ImportPath: "cloud.google.com/go/maps/routing/apiv2", - GRPCServiceConfigPath: "library_grpc_service_config.json", - ApiServiceConfigPath: "routes_v2.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/maps/addressvalidation/v1", - stopGeneration: true, - Pkg: "addressvalidation", - ImportPath: "cloud.google.com/go/maps/addressvalidation/apiv1", - GRPCServiceConfigPath: "addressvalidation_grpc_service_config.json", - ApiServiceConfigPath: "addressvalidation_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/cloud/vmwareengine/v1", - stopGeneration: true, - Pkg: "vmwareengine", - ImportPath: "cloud.google.com/go/vmwareengine/apiv1", - GRPCServiceConfigPath: "vmwareengine_grpc_service_config.json", - ApiServiceConfigPath: "vmwareengine_v1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/bigquery/datapolicies/v1", - stopGeneration: true, - Pkg: "datapolicies", - ImportPath: "cloud.google.com/go/bigquery/datapolicies/apiv1", - GRPCServiceConfigPath: "datapolicies_v1_grpc_service_config.json", - ApiServiceConfigPath: "bigquerydatapolicy_v1.yaml", - ReleaseLevel: "beta", - NumericEnumsDisabled: true, - }, - { - InputDirectoryPath: "google/cloud/datacatalog/lineage/v1", - stopGeneration: true, - Pkg: "lineage", - ImportPath: "cloud.google.com/go/datacatalog/lineage/apiv1", - GRPCServiceConfigPath: "lineage_grpc_service_config.json", - ApiServiceConfigPath: "datalineage_v1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/maps/mapsplatformdatasets/v1alpha", - stopGeneration: true, - Pkg: "mapsplatformdatasets", - ImportPath: "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha", - GRPCServiceConfigPath: "mapsplatformdatasets_grpc_service_config.json", - ApiServiceConfigPath: "mapsplatformdatasets_v1alpha.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/discoveryengine/v1beta", - stopGeneration: true, - Pkg: "discoveryengine", - ImportPath: "cloud.google.com/go/discoveryengine/apiv1beta", - GRPCServiceConfigPath: "discoveryengine_grpc_service_config.json", - ApiServiceConfigPath: "discoveryengine_v1beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/advisorynotifications/v1", - Pkg: "advisorynotifications", - ImportPath: "cloud.google.com/go/advisorynotifications/apiv1", - GRPCServiceConfigPath: "advisorynotifications_v1_grpc_service_config.json", - ApiServiceConfigPath: "advisorynotifications_v1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/alloydb/v1", - Pkg: "alloydb", - ImportPath: "cloud.google.com/go/alloydb/apiv1", - GRPCServiceConfigPath: "alloydb_v1_grpc_service_config.json", - ApiServiceConfigPath: "alloydb_v1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/alloydb/v1beta", - Pkg: "alloydb", - ImportPath: "cloud.google.com/go/alloydb/apiv1beta", - GRPCServiceConfigPath: "alloydb_v1beta_grpc_service_config.json", - ApiServiceConfigPath: "alloydb_v1beta.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/alloydb/v1alpha", - Pkg: "alloydb", - ImportPath: "cloud.google.com/go/alloydb/apiv1alpha", - GRPCServiceConfigPath: "alloydb_v1alpha_grpc_service_config.json", - ApiServiceConfigPath: "alloydb_v1alpha.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/kms/inventory/v1", - Pkg: "inventory", - ImportPath: "cloud.google.com/go/kms/inventory/apiv1", - GRPCServiceConfigPath: "kmsinventory_grpc_service_config.json", - ApiServiceConfigPath: "kmsinventory_v1.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/devtools/cloudbuild/v2", - stopGeneration: true, - Pkg: "cloudbuild", - ImportPath: "cloud.google.com/go/cloudbuild/apiv2", - GRPCServiceConfigPath: "cloudbuild_grpc_service_config.json", - ApiServiceConfigPath: "cloudbuild_v2.yaml", - ReleaseLevel: "beta", - }, - { - InputDirectoryPath: "google/cloud/workstations/v1beta", - Pkg: "workstations", - ImportPath: "cloud.google.com/go/workstations/apiv1beta", - GRPCServiceConfigPath: "workstations_grpc_service_config.json", - ApiServiceConfigPath: "workstations_v1beta.yaml", - ReleaseLevel: "beta", - }, - - // Non-Cloud APIs - { - InputDirectoryPath: "google/analytics/admin/v1alpha", - stopGeneration: true, - Pkg: "admin", - ImportPath: "cloud.google.com/go/analytics/admin/apiv1alpha", - GRPCServiceConfigPath: "admin_grpc_service_config.json", - ApiServiceConfigPath: "analyticsadmin_v1alpha.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/area120/tables/v1alpha1", - stopGeneration: true, - Pkg: "tables", - ImportPath: "cloud.google.com/go/area120/tables/apiv1alpha1", - GRPCServiceConfigPath: "tables_grpc_service_config.json", - ApiServiceConfigPath: "area120tables_v1alpha1.yaml", - ReleaseLevel: "alpha", - }, - { - InputDirectoryPath: "google/cloud/gsuiteaddons/v1", - stopGeneration: true, - Pkg: "gsuiteaddons", - ImportPath: "cloud.google.com/go/gsuiteaddons/apiv1", - GRPCServiceConfigPath: "gsuiteaddons_grpc_service_config.json", - ApiServiceConfigPath: "gsuiteaddons_v1.yaml", - ReleaseLevel: "ga", - }, - { - InputDirectoryPath: "google/storage/v2", - Pkg: "storage", - ImportPath: "cloud.google.com/go/storage/internal/apiv2", - // The retry configuration is explicitly excluded in order to disable - // GAPIC-level retries and allow the veneer layer to handle retries. - ApiServiceConfigPath: "storage_v2.yaml", - ReleaseLevel: "alpha", - stubsDir: "stubs", - Transports: []string{"grpc"}, - NumericEnumsDisabled: true, - }, } diff --git a/internal/gapicgen/generator/config_test.go b/internal/gapicgen/generator/config_test.go index 09abbb0e2089..73454ba0f9f7 100644 --- a/internal/gapicgen/generator/config_test.go +++ b/internal/gapicgen/generator/config_test.go @@ -15,6 +15,8 @@ package generator import ( + "fmt" + "sort" "strings" "testing" ) @@ -83,3 +85,23 @@ func TestMicrogenConfigs(t *testing.T) { } } } + +func TestI(t *testing.T) { + sort.Slice(MicrogenGapicConfigs, func(i, j int) bool { + return MicrogenGapicConfigs[i].ImportPath < MicrogenGapicConfigs[j].ImportPath + }) + for _, v := range MicrogenGapicConfigs { + if v.stopGeneration { + continue + } + var t strings.Builder + for i, v := range v.Transports { + if i != 0 { + t.WriteString(",") + } + t.WriteString(fmt.Sprintf("%q", v)) + } + fmt.Printf("{\nInputDirectoryPath: %q,\nPkg: %q,\nImportPath: %q,\nGRPCServiceConfigPath: %q,\nApiServiceConfigPath: %q,\nReleaseLevel: %q,\nNumericEnumsDisabled: %v,\nTransports: []string{%v},\n},\n", + v.InputDirectoryPath, v.Pkg, v.ImportPath, v.GRPCServiceConfigPath, v.ApiServiceConfigPath, v.ReleaseLevel, v.NumericEnumsDisabled, t.String()) + } +} diff --git a/internal/gapicgen/generator/gapics.go b/internal/gapicgen/generator/gapics.go index 142ff0daed3a..7f6f596702d5 100644 --- a/internal/gapicgen/generator/gapics.go +++ b/internal/gapicgen/generator/gapics.go @@ -17,7 +17,6 @@ package generator import ( "context" _ "embed" - "encoding/json" "fmt" "html/template" "log" @@ -50,7 +49,6 @@ type GapicGenerator struct { gapicToGenerate string regenOnly bool onlyGenerateGapic bool - genModule bool modifiedPkgs []string forceAll bool genAlias bool @@ -66,7 +64,6 @@ func NewGapicGenerator(c *Config, modifiedPkgs []string) *GapicGenerator { gapicToGenerate: c.GapicToGenerate, regenOnly: c.RegenOnly, onlyGenerateGapic: c.OnlyGenerateGapic, - genModule: c.GenModule, modifiedPkgs: modifiedPkgs, forceAll: c.ForceAll, genAlias: c.GenAlias, @@ -82,7 +79,6 @@ type modInfo struct { // Regen generates gapics. func (g *GapicGenerator) Regen(ctx context.Context) error { log.Println("regenerating gapics") - var newMods []modInfo for _, c := range MicrogenGapicConfigs { if !g.shouldGenerateConfig(c) { continue @@ -90,16 +86,6 @@ func (g *GapicGenerator) Regen(ctx context.Context) error { modImportPath := filepath.Join("cloud.google.com/go", strings.Split(strings.TrimPrefix(c.ImportPath, "cloud.google.com/go/"), "/")[0]) modPath := filepath.Join(g.googleCloudDir, modImportPath) - if g.genModule { - if err := generateModule(modPath, modImportPath); err != nil { - return err - } - newMods = append(newMods, modInfo{ - path: filepath.Join(g.googleCloudDir, strings.TrimPrefix(modImportPath, "cloud.google.com/go")), - importPath: modImportPath, - serviceImportPath: c.ImportPath, - }) - } if err := g.microgen(c); err != nil { return err } @@ -111,11 +97,6 @@ func (g *GapicGenerator) Regen(ctx context.Context) error { return err } } - if g.genModule { - if err := gocmd.ModTidy(modPath); err != nil { - return nil - } - } } if err := g.copyMicrogenFiles(); err != nil { @@ -131,17 +112,6 @@ func (g *GapicGenerator) Regen(ctx context.Context) error { return nil } - manifest, err := g.manifest(MicrogenGapicConfigs) - if err != nil { - return err - } - - if g.genModule { - for _, modInfo := range newMods { - generateReadmeAndChanges(modInfo.path, modInfo.importPath, manifest[modInfo.serviceImportPath].Description) - } - } - if !g.onlyGenerateGapic { if err := g.regenSnippets(ctx); err != nil { return err @@ -192,7 +162,7 @@ func (g *GapicGenerator) regenSnippets(ctx context.Context) error { log.Println("regenerating snippets") snippetDir := filepath.Join(g.googleCloudDir, "internal", "generated", "snippets") - apiShortnames, err := ParseAPIShortnames(g.googleapisDir, MicrogenGapicConfigs, ManualEntries) + apiShortnames, err := ParseAPIShortnames(g.googleapisDir, MicrogenGapicConfigs) if err != nil { return err } @@ -399,235 +369,9 @@ func (g *GapicGenerator) genVersionFile(conf *MicrogenConfig) error { if err := t.Execute(f, versionData); err != nil { return err } - - if g.genModule { - os.MkdirAll(filepath.Join(g.googleCloudDir, rootModInternal), os.ModePerm) - - f2, err := os.Create(filepath.Join(g.googleCloudDir, rootModInternal, "version.go")) - if err != nil { - return err - } - defer f2.Close() - - t2 := template.Must(template.New("internal_version").Parse(internalVersionTmpl)) - internalVersionData := struct { - Year int - }{ - Year: time.Now().Year(), - } - if err := t2.Execute(f2, internalVersionData); err != nil { - return err - } - } return nil } -// ManifestEntry is used for JSON marshaling in manifest. -type ManifestEntry struct { - DistributionName string `json:"distribution_name"` - Description string `json:"description"` - Language string `json:"language"` - ClientLibraryType string `json:"client_library_type"` - DocsURL string `json:"docs_url"` - ReleaseLevel string `json:"release_level"` - LibraryType LibraryType `json:"library_type"` -} - -type LibraryType string - -const ( - GapicAutoLibraryType LibraryType = "GAPIC_AUTO" - GapicManualLibraryType LibraryType = "GAPIC_MANUAL" - CoreLibraryType LibraryType = "CORE" - AgentLibraryType LibraryType = "AGENT" - OtherLibraryType LibraryType = "OTHER" -) - -// TODO: consider getting Description from the gapic, if there is one. -var ManualEntries = []ManifestEntry{ - // Pure manual clients. - { - DistributionName: "cloud.google.com/go/bigquery", - Description: "BigQuery", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/bigtable", - Description: "Cloud BigTable", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigtable/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/datastore", - Description: "Cloud Datastore", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/datastore/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/iam", - Description: "Cloud IAM", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/iam/latest", - ReleaseLevel: "ga", - LibraryType: CoreLibraryType, - }, - { - DistributionName: "cloud.google.com/go/storage", - Description: "Cloud Storage (GCS)", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/storage/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/rpcreplay", - Description: "RPC Replay", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/rpcreplay", - ReleaseLevel: "ga", - LibraryType: OtherLibraryType, - }, - { - DistributionName: "cloud.google.com/go/profiler", - Description: "Cloud Profiler", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/profiler/latest", - ReleaseLevel: "ga", - LibraryType: AgentLibraryType, - }, - { - DistributionName: "cloud.google.com/go/compute/metadata", - Description: "Service Metadata API", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/compute/latest/metadata", - ReleaseLevel: "ga", - LibraryType: CoreLibraryType, - }, - { - DistributionName: "cloud.google.com/go/functions/metadata", - Description: "Cloud Functions", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/functions/latest/metadata", - ReleaseLevel: "alpha", - LibraryType: CoreLibraryType, - }, - // Manuals with a GAPIC. - { - DistributionName: "cloud.google.com/go/errorreporting", - Description: "Cloud Error Reporting API", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/errorreporting/latest", - ReleaseLevel: "beta", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/firestore", - Description: "Cloud Firestore API", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/firestore/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/logging", - Description: "Cloud Logging API", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/logging/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/pubsub", - Description: "Cloud PubSub", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsub/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/spanner", - Description: "Cloud Spanner", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, - { - DistributionName: "cloud.google.com/go/pubsublite", - Description: "Cloud PubSub Lite", - Language: "Go", - ClientLibraryType: "manual", - DocsURL: "https://cloud.google.com/go/docs/reference/cloud.google.com/go/pubsublite/latest", - ReleaseLevel: "ga", - LibraryType: GapicManualLibraryType, - }, -} - -// manifest writes a manifest file with info about all of the confs. -func (g *GapicGenerator) manifest(confs []*MicrogenConfig) (map[string]ManifestEntry, error) { - log.Println("updating gapic manifest") - entries := map[string]ManifestEntry{} // Key is the package name. - f, err := os.Create(filepath.Join(g.googleCloudDir, "internal", ".repo-metadata-full.json")) - if err != nil { - return nil, err - } - defer f.Close() - for _, manual := range ManualEntries { - entries[manual.DistributionName] = manual - } - for _, conf := range confs { - yamlPath := filepath.Join(g.googleapisDir, conf.InputDirectoryPath, conf.ApiServiceConfigPath) - yamlFile, err := os.Open(yamlPath) - if err != nil { - return nil, err - } - yamlConfig := struct { - Title string `yaml:"title"` // We only need the title field. - }{} - if err := yaml.NewDecoder(yamlFile).Decode(&yamlConfig); err != nil { - return nil, fmt.Errorf("decode: %v", err) - } - docURL, err := docURL(g.googleCloudDir, conf.ImportPath) - if err != nil { - return nil, fmt.Errorf("unable to build docs URL: %v", err) - } - entry := ManifestEntry{ - DistributionName: conf.ImportPath, - Description: yamlConfig.Title, - Language: "Go", - ClientLibraryType: "generated", - DocsURL: docURL, - ReleaseLevel: conf.ReleaseLevel, - LibraryType: GapicAutoLibraryType, - } - entries[conf.ImportPath] = entry - } - enc := json.NewEncoder(f) - enc.SetIndent("", " ") - return entries, enc.Encode(entries) -} - // copyMicrogenFiles takes microgen files from gocloudDir/cloud.google.com/go // and places them in gocloudDir. func (g *GapicGenerator) copyMicrogenFiles() error { @@ -679,7 +423,7 @@ import _ "google.golang.org/genproto/protobuf/api" return err } -func ParseAPIShortnames(googleapisDir string, confs []*MicrogenConfig, manualEntries []ManifestEntry) (map[string]string, error) { +func ParseAPIShortnames(googleapisDir string, confs []*MicrogenConfig) (map[string]string, error) { shortnames := map[string]string{} for _, conf := range confs { @@ -708,15 +452,6 @@ func ParseAPIShortnames(googleapisDir string, confs []*MicrogenConfig, manualEnt shortname := strings.TrimSuffix(config.Name, ".googleapis.com") shortnames[conf.ImportPath] = shortname } - - // Do our best for manuals. - for _, manual := range manualEntries { - p := strings.TrimPrefix(manual.DistributionName, "cloud.google.com/go/") - if strings.Contains(p, "/") { - p = p[0:strings.Index(p, "/")] - } - shortnames[manual.DistributionName] = p - } return shortnames, nil } diff --git a/internal/gapicgen/generator/generator.go b/internal/gapicgen/generator/generator.go index e967b7604e33..0cca200137d0 100644 --- a/internal/gapicgen/generator/generator.go +++ b/internal/gapicgen/generator/generator.go @@ -21,7 +21,6 @@ package generator import ( "context" "fmt" - "io/ioutil" "os" "path/filepath" @@ -39,7 +38,6 @@ type Config struct { LocalMode bool RegenOnly bool ForceAll bool - GenModule bool GenAlias bool } @@ -80,7 +78,7 @@ func Generate(ctx context.Context, conf *Config) ([]*git.ChangeInfo, error) { func gatherChanges(googleapisDir, genprotoDir string) ([]*git.ChangeInfo, error) { // Get the last processed googleapis hash. - lastHash, err := ioutil.ReadFile(filepath.Join(genprotoDir, "regen.txt")) + lastHash, err := os.ReadFile(filepath.Join(genprotoDir, "regen.txt")) if err != nil { return nil, err } diff --git a/internal/gapicgen/generator/genproto.go b/internal/gapicgen/generator/genproto.go index 5e7dc06f53b1..b8cd943bfe11 100644 --- a/internal/gapicgen/generator/genproto.go +++ b/internal/gapicgen/generator/genproto.go @@ -18,7 +18,6 @@ import ( "context" "errors" "fmt" - "io/ioutil" "log" "os" "path/filepath" @@ -117,7 +116,7 @@ func (g *GenprotoGenerator) Regen(ctx context.Context) error { } // Get the last processed googleapis hash. - lastHash, err := ioutil.ReadFile(filepath.Join(g.genprotoDir, "regen.txt")) + lastHash, err := os.ReadFile(filepath.Join(g.genprotoDir, "regen.txt")) if err != nil { return err } @@ -174,7 +173,7 @@ func (g *GenprotoGenerator) Regen(ctx context.Context) error { // goPkg reports the import path declared in the given file's `go_package` // option. If the option is missing, goPkg returns empty string. func goPkg(fileName string) (string, error) { - content, err := ioutil.ReadFile(fileName) + content, err := os.ReadFile(fileName) if err != nil { return "", err }