// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/batch/v1/batch.proto package batchpb import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( BatchService_CreateJob_FullMethodName = "/google.cloud.batch.v1.BatchService/CreateJob" BatchService_GetJob_FullMethodName = "/google.cloud.batch.v1.BatchService/GetJob" BatchService_DeleteJob_FullMethodName = "/google.cloud.batch.v1.BatchService/DeleteJob" BatchService_CancelJob_FullMethodName = "/google.cloud.batch.v1.BatchService/CancelJob" BatchService_ListJobs_FullMethodName = "/google.cloud.batch.v1.BatchService/ListJobs" BatchService_GetTask_FullMethodName = "/google.cloud.batch.v1.BatchService/GetTask" BatchService_ListTasks_FullMethodName = "/google.cloud.batch.v1.BatchService/ListTasks" ) // BatchServiceClient is the client API for BatchService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type BatchServiceClient interface { // Create a Job. CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) // Get a Job specified by its resource name. GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) // Delete a Job. DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // Cancel a Job. CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // List all Jobs for a project within a region. ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) // Return a single Task. GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) // List Tasks associated with a job. ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) } type batchServiceClient struct { cc grpc.ClientConnInterface } func NewBatchServiceClient(cc grpc.ClientConnInterface) BatchServiceClient { return &batchServiceClient{cc} } func (c *batchServiceClient) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) { out := new(Job) err := c.cc.Invoke(ctx, BatchService_CreateJob_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *batchServiceClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error) { out := new(Job) err := c.cc.Invoke(ctx, BatchService_GetJob_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *batchServiceClient) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, BatchService_DeleteJob_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *batchServiceClient) CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, BatchService_CancelJob_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *batchServiceClient) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) { out := new(ListJobsResponse) err := c.cc.Invoke(ctx, BatchService_ListJobs_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *batchServiceClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { out := new(Task) err := c.cc.Invoke(ctx, BatchService_GetTask_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *batchServiceClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { out := new(ListTasksResponse) err := c.cc.Invoke(ctx, BatchService_ListTasks_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // BatchServiceServer is the server API for BatchService service. // All implementations should embed UnimplementedBatchServiceServer // for forward compatibility type BatchServiceServer interface { // Create a Job. CreateJob(context.Context, *CreateJobRequest) (*Job, error) // Get a Job specified by its resource name. GetJob(context.Context, *GetJobRequest) (*Job, error) // Delete a Job. DeleteJob(context.Context, *DeleteJobRequest) (*longrunningpb.Operation, error) // Cancel a Job. CancelJob(context.Context, *CancelJobRequest) (*longrunningpb.Operation, error) // List all Jobs for a project within a region. ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) // Return a single Task. GetTask(context.Context, *GetTaskRequest) (*Task, error) // List Tasks associated with a job. ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) } // UnimplementedBatchServiceServer should be embedded to have forward compatible implementations. type UnimplementedBatchServiceServer struct { } func (UnimplementedBatchServiceServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented") } func (UnimplementedBatchServiceServer) GetJob(context.Context, *GetJobRequest) (*Job, error) { return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented") } func (UnimplementedBatchServiceServer) DeleteJob(context.Context, *DeleteJobRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteJob not implemented") } func (UnimplementedBatchServiceServer) CancelJob(context.Context, *CancelJobRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelJob not implemented") } func (UnimplementedBatchServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListJobs not implemented") } func (UnimplementedBatchServiceServer) GetTask(context.Context, *GetTaskRequest) (*Task, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented") } func (UnimplementedBatchServiceServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTasks not implemented") } // UnsafeBatchServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BatchServiceServer will // result in compilation errors. type UnsafeBatchServiceServer interface { mustEmbedUnimplementedBatchServiceServer() } func RegisterBatchServiceServer(s grpc.ServiceRegistrar, srv BatchServiceServer) { s.RegisterService(&BatchService_ServiceDesc, srv) } func _BatchService_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateJobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).CreateJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_CreateJob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).CreateJob(ctx, req.(*CreateJobRequest)) } return interceptor(ctx, in, info, handler) } func _BatchService_GetJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetJobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).GetJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_GetJob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).GetJob(ctx, req.(*GetJobRequest)) } return interceptor(ctx, in, info, handler) } func _BatchService_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteJobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).DeleteJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_DeleteJob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).DeleteJob(ctx, req.(*DeleteJobRequest)) } return interceptor(ctx, in, info, handler) } func _BatchService_CancelJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CancelJobRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).CancelJob(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_CancelJob_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).CancelJob(ctx, req.(*CancelJobRequest)) } return interceptor(ctx, in, info, handler) } func _BatchService_ListJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListJobsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).ListJobs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_ListJobs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).ListJobs(ctx, req.(*ListJobsRequest)) } return interceptor(ctx, in, info, handler) } func _BatchService_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).GetTask(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_GetTask_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).GetTask(ctx, req.(*GetTaskRequest)) } return interceptor(ctx, in, info, handler) } func _BatchService_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListTasksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BatchServiceServer).ListTasks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: BatchService_ListTasks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BatchServiceServer).ListTasks(ctx, req.(*ListTasksRequest)) } return interceptor(ctx, in, info, handler) } // BatchService_ServiceDesc is the grpc.ServiceDesc for BatchService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var BatchService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.batch.v1.BatchService", HandlerType: (*BatchServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateJob", Handler: _BatchService_CreateJob_Handler, }, { MethodName: "GetJob", Handler: _BatchService_GetJob_Handler, }, { MethodName: "DeleteJob", Handler: _BatchService_DeleteJob_Handler, }, { MethodName: "CancelJob", Handler: _BatchService_CancelJob_Handler, }, { MethodName: "ListJobs", Handler: _BatchService_ListJobs_Handler, }, { MethodName: "GetTask", Handler: _BatchService_GetTask_Handler, }, { MethodName: "ListTasks", Handler: _BatchService_ListTasks_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/batch/v1/batch.proto", }