// Copyright (C) 2026 Yota Hamada
// SPDX-License-Identifier: GPL-3.0-or-later

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.31.1
// source: proto/coordinator/v1/coordinator.proto

package coordinatorv1

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 (
	CoordinatorService_Poll_FullMethodName               = "/coordinator.v1.CoordinatorService/Poll"
	CoordinatorService_Dispatch_FullMethodName           = "/coordinator.v1.CoordinatorService/Dispatch"
	CoordinatorService_GetWorkers_FullMethodName         = "/coordinator.v1.CoordinatorService/GetWorkers"
	CoordinatorService_Heartbeat_FullMethodName          = "/coordinator.v1.CoordinatorService/Heartbeat"
	CoordinatorService_AckTaskClaim_FullMethodName       = "/coordinator.v1.CoordinatorService/AckTaskClaim"
	CoordinatorService_RunHeartbeat_FullMethodName       = "/coordinator.v1.CoordinatorService/RunHeartbeat"
	CoordinatorService_ReportStatus_FullMethodName       = "/coordinator.v1.CoordinatorService/ReportStatus"
	CoordinatorService_StreamLogs_FullMethodName         = "/coordinator.v1.CoordinatorService/StreamLogs"
	CoordinatorService_StreamArtifacts_FullMethodName    = "/coordinator.v1.CoordinatorService/StreamArtifacts"
	CoordinatorService_PutWorkspaceBundle_FullMethodName = "/coordinator.v1.CoordinatorService/PutWorkspaceBundle"
	CoordinatorService_HasWorkspaceBundle_FullMethodName = "/coordinator.v1.CoordinatorService/HasWorkspaceBundle"
	CoordinatorService_GetWorkspaceBundle_FullMethodName = "/coordinator.v1.CoordinatorService/GetWorkspaceBundle"
	CoordinatorService_GetDAGRunStatus_FullMethodName    = "/coordinator.v1.CoordinatorService/GetDAGRunStatus"
	CoordinatorService_RequestCancel_FullMethodName      = "/coordinator.v1.CoordinatorService/RequestCancel"
)

// CoordinatorServiceClient is the client API for CoordinatorService 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.
//
// Service definition for Coordinator Service.
type CoordinatorServiceClient interface {
	// Poll is called by workers to process a task.
	Poll(ctx context.Context, in *PollRequest, opts ...grpc.CallOption) (*PollResponse, error)
	// Dispatch is called to dispatch a task to a worker.
	Dispatch(ctx context.Context, in *DispatchRequest, opts ...grpc.CallOption) (*DispatchResponse, error)
	// GetWorkers returns the list of connected workers and their pollers.
	GetWorkers(ctx context.Context, in *GetWorkersRequest, opts ...grpc.CallOption) (*GetWorkersResponse, error)
	// Heartbeat is called by workers to report their status.
	Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
	// AckTaskClaim is called by workers after accepting a claimed task.
	AckTaskClaim(ctx context.Context, in *AckTaskClaimRequest, opts ...grpc.CallOption) (*AckTaskClaimResponse, error)
	// RunHeartbeat is called by workers to refresh leases for tasks owned by a
	// specific coordinator instance.
	RunHeartbeat(ctx context.Context, in *RunHeartbeatRequest, opts ...grpc.CallOption) (*RunHeartbeatResponse, error)
	// ReportStatus is called by workers to push DAG run status updates.
	// Used in shared-nothing architecture where workers don't have filesystem access.
	ReportStatus(ctx context.Context, in *ReportStatusRequest, opts ...grpc.CallOption) (*ReportStatusResponse, error)
	// StreamLogs is called by workers to stream step logs to the coordinator.
	// Uses client streaming for efficient log transmission.
	StreamLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogChunk, StreamLogsResponse], error)
	// StreamArtifacts is called by workers to upload DAG run artifacts to the coordinator.
	// Uses client streaming for efficient file transmission.
	StreamArtifacts(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ArtifactChunk, StreamArtifactsResponse], error)
	// PutWorkspaceBundle uploads an immutable content-addressed workspace bundle.
	PutWorkspaceBundle(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[WorkspaceBundleChunk, PutWorkspaceBundleResponse], error)
	// HasWorkspaceBundle checks whether a coordinator already stores a bundle.
	HasWorkspaceBundle(ctx context.Context, in *HasWorkspaceBundleRequest, opts ...grpc.CallOption) (*HasWorkspaceBundleResponse, error)
	// GetWorkspaceBundle downloads an immutable content-addressed workspace bundle.
	GetWorkspaceBundle(ctx context.Context, in *GetWorkspaceBundleRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WorkspaceBundleChunk], error)
	// GetDAGRunStatus retrieves the status of a DAG run from the coordinator.
	// Used by parent DAGs to poll status of remote sub-DAGs in shared-nothing mode.
	GetDAGRunStatus(ctx context.Context, in *GetDAGRunStatusRequest, opts ...grpc.CallOption) (*GetDAGRunStatusResponse, error)
	// RequestCancel is called to request cancellation of a DAG run.
	// Used in shared-nothing mode for sub-DAG cancellation where the parent
	// cannot directly access the sub-DAG's attempt.
	RequestCancel(ctx context.Context, in *RequestCancelRequest, opts ...grpc.CallOption) (*RequestCancelResponse, error)
}

type coordinatorServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCoordinatorServiceClient(cc grpc.ClientConnInterface) CoordinatorServiceClient {
	return &coordinatorServiceClient{cc}
}

func (c *coordinatorServiceClient) Poll(ctx context.Context, in *PollRequest, opts ...grpc.CallOption) (*PollResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PollResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_Poll_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) Dispatch(ctx context.Context, in *DispatchRequest, opts ...grpc.CallOption) (*DispatchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DispatchResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_Dispatch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) GetWorkers(ctx context.Context, in *GetWorkersRequest, opts ...grpc.CallOption) (*GetWorkersResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetWorkersResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_GetWorkers_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HeartbeatResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_Heartbeat_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) AckTaskClaim(ctx context.Context, in *AckTaskClaimRequest, opts ...grpc.CallOption) (*AckTaskClaimResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AckTaskClaimResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_AckTaskClaim_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) RunHeartbeat(ctx context.Context, in *RunHeartbeatRequest, opts ...grpc.CallOption) (*RunHeartbeatResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RunHeartbeatResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_RunHeartbeat_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) ReportStatus(ctx context.Context, in *ReportStatusRequest, opts ...grpc.CallOption) (*ReportStatusResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReportStatusResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_ReportStatus_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) StreamLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogChunk, StreamLogsResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoordinatorService_ServiceDesc.Streams[0], CoordinatorService_StreamLogs_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[LogChunk, StreamLogsResponse]{ClientStream: stream}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_StreamLogsClient = grpc.ClientStreamingClient[LogChunk, StreamLogsResponse]

func (c *coordinatorServiceClient) StreamArtifacts(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ArtifactChunk, StreamArtifactsResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoordinatorService_ServiceDesc.Streams[1], CoordinatorService_StreamArtifacts_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[ArtifactChunk, StreamArtifactsResponse]{ClientStream: stream}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_StreamArtifactsClient = grpc.ClientStreamingClient[ArtifactChunk, StreamArtifactsResponse]

func (c *coordinatorServiceClient) PutWorkspaceBundle(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[WorkspaceBundleChunk, PutWorkspaceBundleResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoordinatorService_ServiceDesc.Streams[2], CoordinatorService_PutWorkspaceBundle_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[WorkspaceBundleChunk, PutWorkspaceBundleResponse]{ClientStream: stream}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_PutWorkspaceBundleClient = grpc.ClientStreamingClient[WorkspaceBundleChunk, PutWorkspaceBundleResponse]

func (c *coordinatorServiceClient) HasWorkspaceBundle(ctx context.Context, in *HasWorkspaceBundleRequest, opts ...grpc.CallOption) (*HasWorkspaceBundleResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HasWorkspaceBundleResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_HasWorkspaceBundle_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) GetWorkspaceBundle(ctx context.Context, in *GetWorkspaceBundleRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WorkspaceBundleChunk], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CoordinatorService_ServiceDesc.Streams[3], CoordinatorService_GetWorkspaceBundle_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[GetWorkspaceBundleRequest, WorkspaceBundleChunk]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_GetWorkspaceBundleClient = grpc.ServerStreamingClient[WorkspaceBundleChunk]

func (c *coordinatorServiceClient) GetDAGRunStatus(ctx context.Context, in *GetDAGRunStatusRequest, opts ...grpc.CallOption) (*GetDAGRunStatusResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetDAGRunStatusResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_GetDAGRunStatus_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *coordinatorServiceClient) RequestCancel(ctx context.Context, in *RequestCancelRequest, opts ...grpc.CallOption) (*RequestCancelResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RequestCancelResponse)
	err := c.cc.Invoke(ctx, CoordinatorService_RequestCancel_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CoordinatorServiceServer is the server API for CoordinatorService service.
// All implementations must embed UnimplementedCoordinatorServiceServer
// for forward compatibility.
//
// Service definition for Coordinator Service.
type CoordinatorServiceServer interface {
	// Poll is called by workers to process a task.
	Poll(context.Context, *PollRequest) (*PollResponse, error)
	// Dispatch is called to dispatch a task to a worker.
	Dispatch(context.Context, *DispatchRequest) (*DispatchResponse, error)
	// GetWorkers returns the list of connected workers and their pollers.
	GetWorkers(context.Context, *GetWorkersRequest) (*GetWorkersResponse, error)
	// Heartbeat is called by workers to report their status.
	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
	// AckTaskClaim is called by workers after accepting a claimed task.
	AckTaskClaim(context.Context, *AckTaskClaimRequest) (*AckTaskClaimResponse, error)
	// RunHeartbeat is called by workers to refresh leases for tasks owned by a
	// specific coordinator instance.
	RunHeartbeat(context.Context, *RunHeartbeatRequest) (*RunHeartbeatResponse, error)
	// ReportStatus is called by workers to push DAG run status updates.
	// Used in shared-nothing architecture where workers don't have filesystem access.
	ReportStatus(context.Context, *ReportStatusRequest) (*ReportStatusResponse, error)
	// StreamLogs is called by workers to stream step logs to the coordinator.
	// Uses client streaming for efficient log transmission.
	StreamLogs(grpc.ClientStreamingServer[LogChunk, StreamLogsResponse]) error
	// StreamArtifacts is called by workers to upload DAG run artifacts to the coordinator.
	// Uses client streaming for efficient file transmission.
	StreamArtifacts(grpc.ClientStreamingServer[ArtifactChunk, StreamArtifactsResponse]) error
	// PutWorkspaceBundle uploads an immutable content-addressed workspace bundle.
	PutWorkspaceBundle(grpc.ClientStreamingServer[WorkspaceBundleChunk, PutWorkspaceBundleResponse]) error
	// HasWorkspaceBundle checks whether a coordinator already stores a bundle.
	HasWorkspaceBundle(context.Context, *HasWorkspaceBundleRequest) (*HasWorkspaceBundleResponse, error)
	// GetWorkspaceBundle downloads an immutable content-addressed workspace bundle.
	GetWorkspaceBundle(*GetWorkspaceBundleRequest, grpc.ServerStreamingServer[WorkspaceBundleChunk]) error
	// GetDAGRunStatus retrieves the status of a DAG run from the coordinator.
	// Used by parent DAGs to poll status of remote sub-DAGs in shared-nothing mode.
	GetDAGRunStatus(context.Context, *GetDAGRunStatusRequest) (*GetDAGRunStatusResponse, error)
	// RequestCancel is called to request cancellation of a DAG run.
	// Used in shared-nothing mode for sub-DAG cancellation where the parent
	// cannot directly access the sub-DAG's attempt.
	RequestCancel(context.Context, *RequestCancelRequest) (*RequestCancelResponse, error)
	mustEmbedUnimplementedCoordinatorServiceServer()
}

// UnimplementedCoordinatorServiceServer 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 UnimplementedCoordinatorServiceServer struct{}

func (UnimplementedCoordinatorServiceServer) Poll(context.Context, *PollRequest) (*PollResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Poll not implemented")
}
func (UnimplementedCoordinatorServiceServer) Dispatch(context.Context, *DispatchRequest) (*DispatchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Dispatch not implemented")
}
func (UnimplementedCoordinatorServiceServer) GetWorkers(context.Context, *GetWorkersRequest) (*GetWorkersResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetWorkers not implemented")
}
func (UnimplementedCoordinatorServiceServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
}
func (UnimplementedCoordinatorServiceServer) AckTaskClaim(context.Context, *AckTaskClaimRequest) (*AckTaskClaimResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AckTaskClaim not implemented")
}
func (UnimplementedCoordinatorServiceServer) RunHeartbeat(context.Context, *RunHeartbeatRequest) (*RunHeartbeatResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RunHeartbeat not implemented")
}
func (UnimplementedCoordinatorServiceServer) ReportStatus(context.Context, *ReportStatusRequest) (*ReportStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportStatus not implemented")
}
func (UnimplementedCoordinatorServiceServer) StreamLogs(grpc.ClientStreamingServer[LogChunk, StreamLogsResponse]) error {
	return status.Errorf(codes.Unimplemented, "method StreamLogs not implemented")
}
func (UnimplementedCoordinatorServiceServer) StreamArtifacts(grpc.ClientStreamingServer[ArtifactChunk, StreamArtifactsResponse]) error {
	return status.Errorf(codes.Unimplemented, "method StreamArtifacts not implemented")
}
func (UnimplementedCoordinatorServiceServer) PutWorkspaceBundle(grpc.ClientStreamingServer[WorkspaceBundleChunk, PutWorkspaceBundleResponse]) error {
	return status.Errorf(codes.Unimplemented, "method PutWorkspaceBundle not implemented")
}
func (UnimplementedCoordinatorServiceServer) HasWorkspaceBundle(context.Context, *HasWorkspaceBundleRequest) (*HasWorkspaceBundleResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method HasWorkspaceBundle not implemented")
}
func (UnimplementedCoordinatorServiceServer) GetWorkspaceBundle(*GetWorkspaceBundleRequest, grpc.ServerStreamingServer[WorkspaceBundleChunk]) error {
	return status.Errorf(codes.Unimplemented, "method GetWorkspaceBundle not implemented")
}
func (UnimplementedCoordinatorServiceServer) GetDAGRunStatus(context.Context, *GetDAGRunStatusRequest) (*GetDAGRunStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDAGRunStatus not implemented")
}
func (UnimplementedCoordinatorServiceServer) RequestCancel(context.Context, *RequestCancelRequest) (*RequestCancelResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RequestCancel not implemented")
}
func (UnimplementedCoordinatorServiceServer) mustEmbedUnimplementedCoordinatorServiceServer() {}
func (UnimplementedCoordinatorServiceServer) testEmbeddedByValue()                            {}

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

func RegisterCoordinatorServiceServer(s grpc.ServiceRegistrar, srv CoordinatorServiceServer) {
	// If the following call pancis, it indicates UnimplementedCoordinatorServiceServer 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(&CoordinatorService_ServiceDesc, srv)
}

func _CoordinatorService_Poll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PollRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).Poll(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_Poll_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).Poll(ctx, req.(*PollRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_Dispatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DispatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).Dispatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_Dispatch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).Dispatch(ctx, req.(*DispatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_GetWorkers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetWorkersRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).GetWorkers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_GetWorkers_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).GetWorkers(ctx, req.(*GetWorkersRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_Heartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HeartbeatRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).Heartbeat(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_Heartbeat_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).Heartbeat(ctx, req.(*HeartbeatRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_AckTaskClaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AckTaskClaimRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).AckTaskClaim(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_AckTaskClaim_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).AckTaskClaim(ctx, req.(*AckTaskClaimRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_RunHeartbeat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RunHeartbeatRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).RunHeartbeat(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_RunHeartbeat_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).RunHeartbeat(ctx, req.(*RunHeartbeatRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_ReportStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).ReportStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_ReportStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).ReportStatus(ctx, req.(*ReportStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_StreamLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CoordinatorServiceServer).StreamLogs(&grpc.GenericServerStream[LogChunk, StreamLogsResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_StreamLogsServer = grpc.ClientStreamingServer[LogChunk, StreamLogsResponse]

func _CoordinatorService_StreamArtifacts_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CoordinatorServiceServer).StreamArtifacts(&grpc.GenericServerStream[ArtifactChunk, StreamArtifactsResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_StreamArtifactsServer = grpc.ClientStreamingServer[ArtifactChunk, StreamArtifactsResponse]

func _CoordinatorService_PutWorkspaceBundle_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CoordinatorServiceServer).PutWorkspaceBundle(&grpc.GenericServerStream[WorkspaceBundleChunk, PutWorkspaceBundleResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_PutWorkspaceBundleServer = grpc.ClientStreamingServer[WorkspaceBundleChunk, PutWorkspaceBundleResponse]

func _CoordinatorService_HasWorkspaceBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HasWorkspaceBundleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).HasWorkspaceBundle(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_HasWorkspaceBundle_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).HasWorkspaceBundle(ctx, req.(*HasWorkspaceBundleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_GetWorkspaceBundle_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetWorkspaceBundleRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CoordinatorServiceServer).GetWorkspaceBundle(m, &grpc.GenericServerStream[GetWorkspaceBundleRequest, WorkspaceBundleChunk]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoordinatorService_GetWorkspaceBundleServer = grpc.ServerStreamingServer[WorkspaceBundleChunk]

func _CoordinatorService_GetDAGRunStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDAGRunStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).GetDAGRunStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_GetDAGRunStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).GetDAGRunStatus(ctx, req.(*GetDAGRunStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CoordinatorService_RequestCancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RequestCancelRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CoordinatorServiceServer).RequestCancel(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CoordinatorService_RequestCancel_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CoordinatorServiceServer).RequestCancel(ctx, req.(*RequestCancelRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CoordinatorService_ServiceDesc is the grpc.ServiceDesc for CoordinatorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CoordinatorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "coordinator.v1.CoordinatorService",
	HandlerType: (*CoordinatorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Poll",
			Handler:    _CoordinatorService_Poll_Handler,
		},
		{
			MethodName: "Dispatch",
			Handler:    _CoordinatorService_Dispatch_Handler,
		},
		{
			MethodName: "GetWorkers",
			Handler:    _CoordinatorService_GetWorkers_Handler,
		},
		{
			MethodName: "Heartbeat",
			Handler:    _CoordinatorService_Heartbeat_Handler,
		},
		{
			MethodName: "AckTaskClaim",
			Handler:    _CoordinatorService_AckTaskClaim_Handler,
		},
		{
			MethodName: "RunHeartbeat",
			Handler:    _CoordinatorService_RunHeartbeat_Handler,
		},
		{
			MethodName: "ReportStatus",
			Handler:    _CoordinatorService_ReportStatus_Handler,
		},
		{
			MethodName: "HasWorkspaceBundle",
			Handler:    _CoordinatorService_HasWorkspaceBundle_Handler,
		},
		{
			MethodName: "GetDAGRunStatus",
			Handler:    _CoordinatorService_GetDAGRunStatus_Handler,
		},
		{
			MethodName: "RequestCancel",
			Handler:    _CoordinatorService_RequestCancel_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamLogs",
			Handler:       _CoordinatorService_StreamLogs_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "StreamArtifacts",
			Handler:       _CoordinatorService_StreamArtifacts_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "PutWorkspaceBundle",
			Handler:       _CoordinatorService_PutWorkspaceBundle_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "GetWorkspaceBundle",
			Handler:       _CoordinatorService_GetWorkspaceBundle_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "proto/coordinator/v1/coordinator.proto",
}
