| { |
| "clientLibrary": { |
| "name": "cloud.google.com/go/batch/apiv1", |
| "version": "0.2.1", |
| "language": "GO", |
| "apis": [ |
| { |
| "id": "google.cloud.batch.v1", |
| "version": "v1" |
| } |
| ] |
| }, |
| "snippets": [ |
| { |
| "regionTag": "batch_v1_generated_BatchService_CancelOperation_sync", |
| "title": "batch CancelOperation Sample", |
| "description": "CancelOperation is a utility method from google.longrunning.Operations.", |
| "file": "Client/CancelOperation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "CancelOperation", |
| "fullName": "google.cloud.batch.v1.Client.CancelOperation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "longrunningpb.CancelOperationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "CancelOperation", |
| "fullName": "google.cloud.batch.v1.BatchService.CancelOperation", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 50, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_CreateJob_sync", |
| "title": "batch CreateJob Sample", |
| "description": "CreateJob create a Job.", |
| "file": "Client/CreateJob/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "CreateJob", |
| "fullName": "google.cloud.batch.v1.Client.CreateJob", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "batchpb.CreateJobRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "batchpb.Job", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "CreateJob", |
| "fullName": "google.cloud.batch.v1.BatchService.CreateJob", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_DeleteJob_sync", |
| "title": "batch DeleteJob Sample", |
| "description": "DeleteJob delete a Job.", |
| "file": "Client/DeleteJob/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "DeleteJob", |
| "fullName": "google.cloud.batch.v1.Client.DeleteJob", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "batchpb.DeleteJobRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "DeleteJobOperation", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "DeleteJob", |
| "fullName": "google.cloud.batch.v1.BatchService.DeleteJob", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 55, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_DeleteOperation_sync", |
| "title": "batch DeleteOperation Sample", |
| "description": "DeleteOperation is a utility method from google.longrunning.Operations.", |
| "file": "Client/DeleteOperation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "DeleteOperation", |
| "fullName": "google.cloud.batch.v1.Client.DeleteOperation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "longrunningpb.DeleteOperationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "DeleteOperation", |
| "fullName": "google.cloud.batch.v1.BatchService.DeleteOperation", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 50, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_GetIamPolicy_sync", |
| "title": "batch GetIamPolicy Sample", |
| "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", |
| "file": "Client/GetIamPolicy/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetIamPolicy", |
| "fullName": "google.cloud.batch.v1.Client.GetIamPolicy", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "iampb.GetIamPolicyRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "iampb.Policy", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetIamPolicy", |
| "fullName": "google.cloud.batch.v1.BatchService.GetIamPolicy", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_GetJob_sync", |
| "title": "batch GetJob Sample", |
| "description": "GetJob get a Job specified by its resource name.", |
| "file": "Client/GetJob/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetJob", |
| "fullName": "google.cloud.batch.v1.Client.GetJob", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "batchpb.GetJobRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "batchpb.Job", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetJob", |
| "fullName": "google.cloud.batch.v1.BatchService.GetJob", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_GetLocation_sync", |
| "title": "batch GetLocation Sample", |
| "description": "GetLocation gets information about a location.", |
| "file": "Client/GetLocation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetLocation", |
| "fullName": "google.cloud.batch.v1.Client.GetLocation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "locationpb.GetLocationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "locationpb.Location", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetLocation", |
| "fullName": "google.cloud.batch.v1.BatchService.GetLocation", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_GetOperation_sync", |
| "title": "batch GetOperation Sample", |
| "description": "GetOperation is a utility method from google.longrunning.Operations.", |
| "file": "Client/GetOperation/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetOperation", |
| "fullName": "google.cloud.batch.v1.Client.GetOperation", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "longrunningpb.GetOperationRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "longrunningpb.Operation", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetOperation", |
| "fullName": "google.cloud.batch.v1.BatchService.GetOperation", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_GetTask_sync", |
| "title": "batch GetTask Sample", |
| "description": "GetTask return a single Task.", |
| "file": "Client/GetTask/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "GetTask", |
| "fullName": "google.cloud.batch.v1.Client.GetTask", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "batchpb.GetTaskRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "batchpb.Task", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "GetTask", |
| "fullName": "google.cloud.batch.v1.BatchService.GetTask", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_ListJobs_sync", |
| "title": "batch ListJobs Sample", |
| "description": "ListJobs list all Jobs for a project within a region.", |
| "file": "Client/ListJobs/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListJobs", |
| "fullName": "google.cloud.batch.v1.Client.ListJobs", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "batchpb.ListJobsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "JobIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListJobs", |
| "fullName": "google.cloud.batch.v1.BatchService.ListJobs", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_ListLocations_sync", |
| "title": "batch ListLocations Sample", |
| "description": "ListLocations lists information about the supported locations for this service.", |
| "file": "Client/ListLocations/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListLocations", |
| "fullName": "google.cloud.batch.v1.Client.ListLocations", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "locationpb.ListLocationsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "LocationIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListLocations", |
| "fullName": "google.cloud.batch.v1.BatchService.ListLocations", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_ListOperations_sync", |
| "title": "batch ListOperations Sample", |
| "description": "ListOperations is a utility method from google.longrunning.Operations.", |
| "file": "Client/ListOperations/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListOperations", |
| "fullName": "google.cloud.batch.v1.Client.ListOperations", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "longrunningpb.ListOperationsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "OperationIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListOperations", |
| "fullName": "google.cloud.batch.v1.BatchService.ListOperations", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_ListTasks_sync", |
| "title": "batch ListTasks Sample", |
| "description": "ListTasks list Tasks associated with a job.", |
| "file": "Client/ListTasks/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "ListTasks", |
| "fullName": "google.cloud.batch.v1.Client.ListTasks", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "batchpb.ListTasksRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "TaskIterator", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "ListTasks", |
| "fullName": "google.cloud.batch.v1.BatchService.ListTasks", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 59, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_SetIamPolicy_sync", |
| "title": "batch SetIamPolicy Sample", |
| "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", |
| "file": "Client/SetIamPolicy/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "SetIamPolicy", |
| "fullName": "google.cloud.batch.v1.Client.SetIamPolicy", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "iampb.SetIamPolicyRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "iampb.Policy", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "SetIamPolicy", |
| "fullName": "google.cloud.batch.v1.BatchService.SetIamPolicy", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| }, |
| { |
| "regionTag": "batch_v1_generated_BatchService_TestIamPermissions_sync", |
| "title": "batch TestIamPermissions Sample", |
| "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", |
| "file": "Client/TestIamPermissions/main.go", |
| "language": "GO", |
| "clientMethod": { |
| "shortName": "TestIamPermissions", |
| "fullName": "google.cloud.batch.v1.Client.TestIamPermissions", |
| "parameters": [ |
| { |
| "type": "context.Context", |
| "name": "ctx" |
| }, |
| { |
| "type": "iampb.TestIamPermissionsRequest", |
| "name": "req" |
| }, |
| { |
| "type": "...gax.CallOption", |
| "name": "opts" |
| } |
| ], |
| "resultType": "iampb.TestIamPermissionsResponse", |
| "client": { |
| "shortName": "Client", |
| "fullName": "google.cloud.batch.v1.Client" |
| }, |
| "method": { |
| "shortName": "TestIamPermissions", |
| "fullName": "google.cloud.batch.v1.BatchService.TestIamPermissions", |
| "service": { |
| "shortName": "BatchService", |
| "fullName": "google.cloud.batch.v1.BatchService" |
| } |
| } |
| }, |
| "origin": "API_DEFINITION", |
| "segments": [ |
| { |
| "start": 18, |
| "end": 52, |
| "type": "FULL" |
| } |
| ] |
| } |
| ] |
| } |