// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.33.1
// source: internal/module/runner/rpc/rpc.proto

package rpc

import (
	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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	JobRouter_GetJob_FullMethodName = "/gitlab.agent.runner.rpc.JobRouter/GetJob"
)

// JobRouterClient is the client API for JobRouter 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 JobRouterClient interface {
	GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error)
}

type jobRouterClient struct {
	cc grpc.ClientConnInterface
}

func NewJobRouterClient(cc grpc.ClientConnInterface) JobRouterClient {
	return &jobRouterClient{cc}
}

func (c *jobRouterClient) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetJobResponse)
	err := c.cc.Invoke(ctx, JobRouter_GetJob_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// JobRouterServer is the server API for JobRouter service.
// All implementations must embed UnimplementedJobRouterServer
// for forward compatibility.
type JobRouterServer interface {
	GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error)
	mustEmbedUnimplementedJobRouterServer()
}

// UnimplementedJobRouterServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedJobRouterServer struct{}

func (UnimplementedJobRouterServer) GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetJob not implemented")
}
func (UnimplementedJobRouterServer) mustEmbedUnimplementedJobRouterServer() {}
func (UnimplementedJobRouterServer) testEmbeddedByValue()                   {}

// UnsafeJobRouterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to JobRouterServer will
// result in compilation errors.
type UnsafeJobRouterServer interface {
	mustEmbedUnimplementedJobRouterServer()
}

func RegisterJobRouterServer(s grpc.ServiceRegistrar, srv JobRouterServer) {
	// If the following call pancis, it indicates UnimplementedJobRouterServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&JobRouter_ServiceDesc, srv)
}

func _JobRouter_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.(JobRouterServer).GetJob(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: JobRouter_GetJob_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(JobRouterServer).GetJob(ctx, req.(*GetJobRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// JobRouter_ServiceDesc is the grpc.ServiceDesc for JobRouter service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var JobRouter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gitlab.agent.runner.rpc.JobRouter",
	HandlerType: (*JobRouterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetJob",
			Handler:    _JobRouter_GetJob_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/module/runner/rpc/rpc.proto",
}
