Skip to content

Commit 500c1a6

Browse files
authored
chore: start generating new libs (#4172)
Changes: feat(privatecatalog): start generating apiv1beta1 feat(shell): start generating apiv1 feat(vpcaccess): start generating apiv1 chore(internal): fix language config pathing chore(internal): support generating multiple apis locally
1 parent 8a28ff6 commit 500c1a6

File tree

15 files changed

+2653
-3
lines changed

15 files changed

+2653
-3
lines changed

internal/.repo-metadata-full.json

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@
622622
},
623623
"cloud.google.com/go/language/apiv1beta2": {
624624
"distribution_name": "cloud.google.com/go/language/apiv1beta2",
625-
"description": "Cloud Natural Language API",
625+
"description": "Google Cloud Natural Language API",
626626
"language": "Go",
627627
"client_library_type": "generated",
628628
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/language/apiv1beta2",
@@ -845,6 +845,15 @@
845845
"release_level": "ga",
846846
"library_type": ""
847847
},
848+
"cloud.google.com/go/privatecatalog/apiv1beta1": {
849+
"distribution_name": "cloud.google.com/go/privatecatalog/apiv1beta1",
850+
"description": "Cloud Private Catalog API",
851+
"language": "Go",
852+
"client_library_type": "generated",
853+
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/privatecatalog/apiv1beta1",
854+
"release_level": "beta",
855+
"library_type": ""
856+
},
848857
"cloud.google.com/go/profiler": {
849858
"distribution_name": "cloud.google.com/go/profiler",
850859
"description": "Cloud Profiler",
@@ -1124,6 +1133,15 @@
11241133
"release_level": "beta",
11251134
"library_type": ""
11261135
},
1136+
"cloud.google.com/go/shell/apiv1": {
1137+
"distribution_name": "cloud.google.com/go/shell/apiv1",
1138+
"description": "Cloud Shell API",
1139+
"language": "Go",
1140+
"client_library_type": "generated",
1141+
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/shell/apiv1",
1142+
"release_level": "beta",
1143+
"library_type": ""
1144+
},
11271145
"cloud.google.com/go/spanner": {
11281146
"distribution_name": "cloud.google.com/go/spanner",
11291147
"description": "Cloud Spanner",
@@ -1286,6 +1304,15 @@
12861304
"release_level": "beta",
12871305
"library_type": ""
12881306
},
1307+
"cloud.google.com/go/vpcaccess/apiv1": {
1308+
"distribution_name": "cloud.google.com/go/vpcaccess/apiv1",
1309+
"description": "Serverless VPC Access API",
1310+
"language": "Go",
1311+
"client_library_type": "generated",
1312+
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/vpcaccess/apiv1",
1313+
"release_level": "beta",
1314+
"library_type": ""
1315+
},
12891316
"cloud.google.com/go/webrisk/apiv1": {
12901317
"distribution_name": "cloud.google.com/go/webrisk/apiv1",
12911318
"description": "Web Risk API",

internal/gapicgen/generator/config.go

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var microgenGapicConfigs = []*microgenConfig{
7979
pkg: "language",
8080
importPath: "cloud.google.com/go/language/apiv1",
8181
gRPCServiceConfigPath: "google/cloud/language/v1/language_grpc_service_config.json",
82-
apiServiceConfigPath: "google/cloud/language/language_v1.yaml",
82+
apiServiceConfigPath: "google/cloud/language/v1/language_v1.yaml",
8383
releaseLevel: "ga",
8484
},
8585
{
@@ -1099,6 +1099,32 @@ var microgenGapicConfigs = []*microgenConfig{
10991099
// GA after 2021/06/18
11001100
releaseLevel: "beta",
11011101
},
1102+
{
1103+
inputDirectoryPath: "google/cloud/shell/v1",
1104+
pkg: "shell",
1105+
importPath: "cloud.google.com/go/shell/apiv1",
1106+
gRPCServiceConfigPath: "google/cloud/shell/v1/cloudshell_grpc_service_config.json",
1107+
apiServiceConfigPath: "google/cloud/shell/v1/cloudshell_v1.yaml",
1108+
// GA after 2021/06/26
1109+
releaseLevel: "beta",
1110+
},
1111+
{
1112+
inputDirectoryPath: "google/cloud/vpcaccess/v1",
1113+
pkg: "vpcaccess",
1114+
importPath: "cloud.google.com/go/vpcaccess/apiv1",
1115+
gRPCServiceConfigPath: "google/cloud/vpcaccess/v1/vpcaccess_grpc_service_config.json",
1116+
apiServiceConfigPath: "google/cloud/vpcaccess/v1/vpcaccess_v1.yaml",
1117+
// GA after 2021/06/26
1118+
releaseLevel: "beta",
1119+
},
1120+
{
1121+
inputDirectoryPath: "google/cloud/privatecatalog/v1beta1",
1122+
pkg: "privatecatalog",
1123+
importPath: "cloud.google.com/go/privatecatalog/apiv1beta1",
1124+
gRPCServiceConfigPath: "google/cloud/privatecatalog/v1beta1/cloudprivatecatalog_grpc_service_config.json",
1125+
apiServiceConfigPath: "google/cloud/privatecatalog/v1beta1/cloudprivatecatalog_v1beta1.yaml",
1126+
releaseLevel: "beta",
1127+
},
11021128

11031129
// Non-Cloud APIs
11041130
{

internal/gapicgen/generator/gapics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (g *GapicGenerator) Regen(ctx context.Context) error {
6464
// config has a block on it. Or if generating a single gapic and it does
6565
// not match the specified import path.
6666
if (c.stopGeneration && g.gapicToGenerate == "") ||
67-
(g.gapicToGenerate != "" && g.gapicToGenerate != c.importPath) {
67+
(g.gapicToGenerate != "" && !strings.Contains(g.gapicToGenerate, c.importPath)) {
6868
continue
6969
}
7070
if err := g.microgen(c); err != nil {

privatecatalog/apiv1beta1/doc.go

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"schema": "1.0",
3+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods.",
4+
"language": "go",
5+
"protoPackage": "google.cloud.privatecatalog.v1beta1",
6+
"libraryPackage": "cloud.google.com/go/privatecatalog/apiv1beta1",
7+
"services": {
8+
"PrivateCatalog": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "Client",
12+
"rpcs": {
13+
"SearchCatalogs": {
14+
"methods": [
15+
"SearchCatalogs"
16+
]
17+
},
18+
"SearchProducts": {
19+
"methods": [
20+
"SearchProducts"
21+
]
22+
},
23+
"SearchVersions": {
24+
"methods": [
25+
"SearchVersions"
26+
]
27+
}
28+
}
29+
}
30+
}
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)