Skip to content

Commit

Permalink
feat(storagetransfer): start generating apiv1 (#4505)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Jul 28, 2021
1 parent 35ceae2 commit f2d531d
Show file tree
Hide file tree
Showing 7 changed files with 969 additions and 7 deletions.
9 changes: 9 additions & 0 deletions internal/.repo-metadata-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,15 @@
"release_level": "alpha",
"library_type": ""
},
"cloud.google.com/go/storagetransfer/apiv1": {
"distribution_name": "cloud.google.com/go/storagetransfer/apiv1",
"description": "Storage Transfer API",
"language": "Go",
"client_library_type": "generated",
"docs_url": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/storagetransfer/apiv1",
"release_level": "beta",
"library_type": ""
},
"cloud.google.com/go/talent/apiv4": {
"distribution_name": "cloud.google.com/go/talent/apiv4",
"description": "Cloud Talent Solution API",
Expand Down
8 changes: 1 addition & 7 deletions internal/gapicgen/execv/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ func Command(name string, arg ...string) *CmdWrapper {

// Run a command.
func (c *CmdWrapper) Run() error {
log.Printf("[%s] >>>> %v <<<<", c.Dir, strings.Join(c.Args, " "))
err := c.Cmd.Run()
if err != nil {
if ee, ok := err.(*exec.ExitError); ok {
log.Println(string(ee.Stderr))
}
}
_, err := c.Output()
return err
}

Expand Down
9 changes: 9 additions & 0 deletions internal/gapicgen/generator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,15 @@ var microgenGapicConfigs = []*microgenConfig{
// GA after 2021/08/22
releaseLevel: "beta",
},
{
inputDirectoryPath: "google/storagetransfer/v1",
pkg: "storagetransfer",
importPath: "cloud.google.com/go/storagetransfer/apiv1",
gRPCServiceConfigPath: "storagetransfer_grpc_service_config.json",
apiServiceConfigPath: "storagetransfer_v1.yaml",
// GA after 2021/08/27
releaseLevel: "beta",
},

// Non-Cloud APIs
{
Expand Down
119 changes: 119 additions & 0 deletions storagetransfer/apiv1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions storagetransfer/apiv1/gapic_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"schema": "1.0",
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods.",
"language": "go",
"protoPackage": "google.storagetransfer.v1",
"libraryPackage": "cloud.google.com/go/storagetransfer/apiv1",
"services": {
"StorageTransferService": {
"clients": {
"grpc": {
"libraryClient": "Client",
"rpcs": {
"CreateTransferJob": {
"methods": [
"CreateTransferJob"
]
},
"GetGoogleServiceAccount": {
"methods": [
"GetGoogleServiceAccount"
]
},
"GetTransferJob": {
"methods": [
"GetTransferJob"
]
},
"ListTransferJobs": {
"methods": [
"ListTransferJobs"
]
},
"PauseTransferOperation": {
"methods": [
"PauseTransferOperation"
]
},
"ResumeTransferOperation": {
"methods": [
"ResumeTransferOperation"
]
},
"RunTransferJob": {
"methods": [
"RunTransferJob"
]
},
"UpdateTransferJob": {
"methods": [
"UpdateTransferJob"
]
}
}
}
}
}
}
}
Loading

0 comments on commit f2d531d

Please sign in to comment.