Skip to content

Commit f2d531d

Browse files
authored
feat(storagetransfer): start generating apiv1 (#4505)
1 parent 35ceae2 commit f2d531d

File tree

7 files changed

+969
-7
lines changed

7 files changed

+969
-7
lines changed

internal/.repo-metadata-full.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,15 @@
13131313
"release_level": "alpha",
13141314
"library_type": ""
13151315
},
1316+
"cloud.google.com/go/storagetransfer/apiv1": {
1317+
"distribution_name": "cloud.google.com/go/storagetransfer/apiv1",
1318+
"description": "Storage Transfer API",
1319+
"language": "Go",
1320+
"client_library_type": "generated",
1321+
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/storagetransfer/apiv1",
1322+
"release_level": "beta",
1323+
"library_type": ""
1324+
},
13161325
"cloud.google.com/go/talent/apiv4": {
13171326
"distribution_name": "cloud.google.com/go/talent/apiv4",
13181327
"description": "Cloud Talent Solution API",

internal/gapicgen/execv/command.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@ func Command(name string, arg ...string) *CmdWrapper {
4141

4242
// Run a command.
4343
func (c *CmdWrapper) Run() error {
44-
log.Printf("[%s] >>>> %v <<<<", c.Dir, strings.Join(c.Args, " "))
45-
err := c.Cmd.Run()
46-
if err != nil {
47-
if ee, ok := err.(*exec.ExitError); ok {
48-
log.Println(string(ee.Stderr))
49-
}
50-
}
44+
_, err := c.Output()
5145
return err
5246
}
5347

internal/gapicgen/generator/config.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,15 @@ var microgenGapicConfigs = []*microgenConfig{
12421242
// GA after 2021/08/22
12431243
releaseLevel: "beta",
12441244
},
1245+
{
1246+
inputDirectoryPath: "google/storagetransfer/v1",
1247+
pkg: "storagetransfer",
1248+
importPath: "cloud.google.com/go/storagetransfer/apiv1",
1249+
gRPCServiceConfigPath: "storagetransfer_grpc_service_config.json",
1250+
apiServiceConfigPath: "storagetransfer_v1.yaml",
1251+
// GA after 2021/08/27
1252+
releaseLevel: "beta",
1253+
},
12451254

12461255
// Non-Cloud APIs
12471256
{

storagetransfer/apiv1/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: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.storagetransfer.v1",
6+
"libraryPackage": "cloud.google.com/go/storagetransfer/apiv1",
7+
"services": {
8+
"StorageTransferService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "Client",
12+
"rpcs": {
13+
"CreateTransferJob": {
14+
"methods": [
15+
"CreateTransferJob"
16+
]
17+
},
18+
"GetGoogleServiceAccount": {
19+
"methods": [
20+
"GetGoogleServiceAccount"
21+
]
22+
},
23+
"GetTransferJob": {
24+
"methods": [
25+
"GetTransferJob"
26+
]
27+
},
28+
"ListTransferJobs": {
29+
"methods": [
30+
"ListTransferJobs"
31+
]
32+
},
33+
"PauseTransferOperation": {
34+
"methods": [
35+
"PauseTransferOperation"
36+
]
37+
},
38+
"ResumeTransferOperation": {
39+
"methods": [
40+
"ResumeTransferOperation"
41+
]
42+
},
43+
"RunTransferJob": {
44+
"methods": [
45+
"RunTransferJob"
46+
]
47+
},
48+
"UpdateTransferJob": {
49+
"methods": [
50+
"UpdateTransferJob"
51+
]
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)