blob: e576bc34e6e442524db9a9c1b917ed8858083102 [file]
{
"clientLibrary": {
"name": "cloud.google.com/go/longrunning/autogen",
"version": "0.5.0",
"language": "GO",
"apis": [
{
"id": "google.longrunning",
"version": "longrunning"
}
]
},
"snippets": [
{
"regionTag": "longrunning_longrunning_generated_Operations_CancelOperation_sync",
"title": "longrunning CancelOperation Sample",
"description": "CancelOperation starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\n[Operations.GetOperation][google.longrunning.Operations.GetOperation] or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,\ncorresponding to `Code.CANCELLED`.",
"file": "OperationsClient/CancelOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CancelOperation",
"fullName": "google.longrunning.OperationsClient.CancelOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.CancelOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "OperationsClient",
"fullName": "google.longrunning.OperationsClient"
},
"method": {
"shortName": "CancelOperation",
"fullName": "google.longrunning.Operations.CancelOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "longrunning_longrunning_generated_Operations_DeleteOperation_sync",
"title": "longrunning DeleteOperation Sample",
"description": "DeleteOperation deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
"file": "OperationsClient/DeleteOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteOperation",
"fullName": "google.longrunning.OperationsClient.DeleteOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.DeleteOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "OperationsClient",
"fullName": "google.longrunning.OperationsClient"
},
"method": {
"shortName": "DeleteOperation",
"fullName": "google.longrunning.Operations.DeleteOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "longrunning_longrunning_generated_Operations_GetOperation_sync",
"title": "longrunning GetOperation Sample",
"description": "GetOperation gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
"file": "OperationsClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.longrunning.OperationsClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "OperationsClient",
"fullName": "google.longrunning.OperationsClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "longrunning_longrunning_generated_Operations_ListOperations_sync",
"title": "longrunning ListOperations Sample",
"description": "ListOperations lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
"file": "OperationsClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.longrunning.OperationsClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "OperationsClient",
"fullName": "google.longrunning.OperationsClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "longrunning_longrunning_generated_Operations_WaitOperation_sync",
"title": "longrunning WaitOperation Sample",
"description": "WaitOperation waits until the specified long-running operation is done or reaches at most\na specified timeout, returning the latest state. If the operation is\nalready done, the latest state is immediately returned. If the timeout\nspecified is greater than the default HTTP/RPC timeout, the HTTP/RPC\ntimeout is used. If the server does not support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.\nNote that this method is on a best-effort basis. It may return the latest\nstate before the specified timeout (including immediately), meaning even an\nimmediate response is no guarantee that the operation is done.",
"file": "OperationsClient/WaitOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "WaitOperation",
"fullName": "google.longrunning.OperationsClient.WaitOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.WaitOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "OperationsClient",
"fullName": "google.longrunning.OperationsClient"
},
"method": {
"shortName": "WaitOperation",
"fullName": "google.longrunning.Operations.WaitOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
}
]
}