// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: api/cirrus_ci_service.proto

package api

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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 (
	CirrusConfigurationEvaluatorService_EvaluateConfig_FullMethodName   = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusConfigurationEvaluatorService/EvaluateConfig"
	CirrusConfigurationEvaluatorService_JSONSchema_FullMethodName       = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusConfigurationEvaluatorService/JSONSchema"
	CirrusConfigurationEvaluatorService_EvaluateFunction_FullMethodName = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusConfigurationEvaluatorService/EvaluateFunction"
)

// CirrusConfigurationEvaluatorServiceClient is the client API for CirrusConfigurationEvaluatorService 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 CirrusConfigurationEvaluatorServiceClient interface {
	// Parser
	EvaluateConfig(ctx context.Context, in *EvaluateConfigRequest, opts ...grpc.CallOption) (*EvaluateConfigResponse, error)
	JSONSchema(ctx context.Context, in *JSONSchemaRequest, opts ...grpc.CallOption) (*JSONSchemaResponse, error)
	// Hooks
	EvaluateFunction(ctx context.Context, in *EvaluateFunctionRequest, opts ...grpc.CallOption) (*EvaluateFunctionResponse, error)
}

type cirrusConfigurationEvaluatorServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCirrusConfigurationEvaluatorServiceClient(cc grpc.ClientConnInterface) CirrusConfigurationEvaluatorServiceClient {
	return &cirrusConfigurationEvaluatorServiceClient{cc}
}

func (c *cirrusConfigurationEvaluatorServiceClient) EvaluateConfig(ctx context.Context, in *EvaluateConfigRequest, opts ...grpc.CallOption) (*EvaluateConfigResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EvaluateConfigResponse)
	err := c.cc.Invoke(ctx, CirrusConfigurationEvaluatorService_EvaluateConfig_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusConfigurationEvaluatorServiceClient) JSONSchema(ctx context.Context, in *JSONSchemaRequest, opts ...grpc.CallOption) (*JSONSchemaResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(JSONSchemaResponse)
	err := c.cc.Invoke(ctx, CirrusConfigurationEvaluatorService_JSONSchema_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusConfigurationEvaluatorServiceClient) EvaluateFunction(ctx context.Context, in *EvaluateFunctionRequest, opts ...grpc.CallOption) (*EvaluateFunctionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EvaluateFunctionResponse)
	err := c.cc.Invoke(ctx, CirrusConfigurationEvaluatorService_EvaluateFunction_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CirrusConfigurationEvaluatorServiceServer is the server API for CirrusConfigurationEvaluatorService service.
// All implementations must embed UnimplementedCirrusConfigurationEvaluatorServiceServer
// for forward compatibility.
type CirrusConfigurationEvaluatorServiceServer interface {
	// Parser
	EvaluateConfig(context.Context, *EvaluateConfigRequest) (*EvaluateConfigResponse, error)
	JSONSchema(context.Context, *JSONSchemaRequest) (*JSONSchemaResponse, error)
	// Hooks
	EvaluateFunction(context.Context, *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error)
	mustEmbedUnimplementedCirrusConfigurationEvaluatorServiceServer()
}

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

func (UnimplementedCirrusConfigurationEvaluatorServiceServer) EvaluateConfig(context.Context, *EvaluateConfigRequest) (*EvaluateConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EvaluateConfig not implemented")
}
func (UnimplementedCirrusConfigurationEvaluatorServiceServer) JSONSchema(context.Context, *JSONSchemaRequest) (*JSONSchemaResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method JSONSchema not implemented")
}
func (UnimplementedCirrusConfigurationEvaluatorServiceServer) EvaluateFunction(context.Context, *EvaluateFunctionRequest) (*EvaluateFunctionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method EvaluateFunction not implemented")
}
func (UnimplementedCirrusConfigurationEvaluatorServiceServer) mustEmbedUnimplementedCirrusConfigurationEvaluatorServiceServer() {
}
func (UnimplementedCirrusConfigurationEvaluatorServiceServer) testEmbeddedByValue() {}

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

func RegisterCirrusConfigurationEvaluatorServiceServer(s grpc.ServiceRegistrar, srv CirrusConfigurationEvaluatorServiceServer) {
	// If the following call pancis, it indicates UnimplementedCirrusConfigurationEvaluatorServiceServer 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(&CirrusConfigurationEvaluatorService_ServiceDesc, srv)
}

func _CirrusConfigurationEvaluatorService_EvaluateConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EvaluateConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusConfigurationEvaluatorServiceServer).EvaluateConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusConfigurationEvaluatorService_EvaluateConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusConfigurationEvaluatorServiceServer).EvaluateConfig(ctx, req.(*EvaluateConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusConfigurationEvaluatorService_JSONSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(JSONSchemaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusConfigurationEvaluatorServiceServer).JSONSchema(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusConfigurationEvaluatorService_JSONSchema_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusConfigurationEvaluatorServiceServer).JSONSchema(ctx, req.(*JSONSchemaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusConfigurationEvaluatorService_EvaluateFunction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EvaluateFunctionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusConfigurationEvaluatorServiceServer).EvaluateFunction(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusConfigurationEvaluatorService_EvaluateFunction_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusConfigurationEvaluatorServiceServer).EvaluateFunction(ctx, req.(*EvaluateFunctionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CirrusConfigurationEvaluatorService_ServiceDesc is the grpc.ServiceDesc for CirrusConfigurationEvaluatorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CirrusConfigurationEvaluatorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "org.cirruslabs.ci.services.cirruscigrpc.CirrusConfigurationEvaluatorService",
	HandlerType: (*CirrusConfigurationEvaluatorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EvaluateConfig",
			Handler:    _CirrusConfigurationEvaluatorService_EvaluateConfig_Handler,
		},
		{
			MethodName: "JSONSchema",
			Handler:    _CirrusConfigurationEvaluatorService_JSONSchema_Handler,
		},
		{
			MethodName: "EvaluateFunction",
			Handler:    _CirrusConfigurationEvaluatorService_EvaluateFunction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/cirrus_ci_service.proto",
}

const (
	CirrusRemoteExecutorService_Capabilities_FullMethodName = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusRemoteExecutorService/Capabilities"
)

// CirrusRemoteExecutorServiceClient is the client API for CirrusRemoteExecutorService 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 CirrusRemoteExecutorServiceClient interface {
	Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error)
}

type cirrusRemoteExecutorServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCirrusRemoteExecutorServiceClient(cc grpc.ClientConnInterface) CirrusRemoteExecutorServiceClient {
	return &cirrusRemoteExecutorServiceClient{cc}
}

func (c *cirrusRemoteExecutorServiceClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CapabilitiesResponse)
	err := c.cc.Invoke(ctx, CirrusRemoteExecutorService_Capabilities_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CirrusRemoteExecutorServiceServer is the server API for CirrusRemoteExecutorService service.
// All implementations must embed UnimplementedCirrusRemoteExecutorServiceServer
// for forward compatibility.
type CirrusRemoteExecutorServiceServer interface {
	Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error)
	mustEmbedUnimplementedCirrusRemoteExecutorServiceServer()
}

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

func (UnimplementedCirrusRemoteExecutorServiceServer) Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented")
}
func (UnimplementedCirrusRemoteExecutorServiceServer) mustEmbedUnimplementedCirrusRemoteExecutorServiceServer() {
}
func (UnimplementedCirrusRemoteExecutorServiceServer) testEmbeddedByValue() {}

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

func RegisterCirrusRemoteExecutorServiceServer(s grpc.ServiceRegistrar, srv CirrusRemoteExecutorServiceServer) {
	// If the following call pancis, it indicates UnimplementedCirrusRemoteExecutorServiceServer 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(&CirrusRemoteExecutorService_ServiceDesc, srv)
}

func _CirrusRemoteExecutorService_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CapabilitiesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusRemoteExecutorServiceServer).Capabilities(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusRemoteExecutorService_Capabilities_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusRemoteExecutorServiceServer).Capabilities(ctx, req.(*CapabilitiesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CirrusRemoteExecutorService_ServiceDesc is the grpc.ServiceDesc for CirrusRemoteExecutorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CirrusRemoteExecutorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "org.cirruslabs.ci.services.cirruscigrpc.CirrusRemoteExecutorService",
	HandlerType: (*CirrusRemoteExecutorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Capabilities",
			Handler:    _CirrusRemoteExecutorService_Capabilities_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/cirrus_ci_service.proto",
}

const (
	CirrusWorkersService_Register_FullMethodName          = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/Register"
	CirrusWorkersService_Poll_FullMethodName              = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/Poll"
	CirrusWorkersService_TaskStarted_FullMethodName       = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/TaskStarted"
	CirrusWorkersService_TaskFailed_FullMethodName        = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/TaskFailed"
	CirrusWorkersService_TaskStopped_FullMethodName       = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/TaskStopped"
	CirrusWorkersService_UpdateStatus_FullMethodName      = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/UpdateStatus"
	CirrusWorkersService_QueryRunningTasks_FullMethodName = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService/QueryRunningTasks"
)

// CirrusWorkersServiceClient is the client API for CirrusWorkersService 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 CirrusWorkersServiceClient interface {
	// Issued by the persistent worker after it starts
	//
	// Can be called without a session token.
	Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
	// Periodically issued by the registered persistent worker to get new jobs and indicate that it's alive
	Poll(ctx context.Context, in *PollRequest, opts ...grpc.CallOption) (*PollResponse, error)
	// Issued by the registered persistent worker to indicate task status
	TaskStarted(ctx context.Context, in *TaskIdentification, opts ...grpc.CallOption) (*emptypb.Empty, error)
	TaskFailed(ctx context.Context, in *TaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	TaskStopped(ctx context.Context, in *TaskIdentification, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateStatus(ctx context.Context, in *UpdateStatusRequest, opts ...grpc.CallOption) (*WorkerStatus, error)
	QueryRunningTasks(ctx context.Context, in *QueryRunningTasksRequest, opts ...grpc.CallOption) (*QueryRunningTasksResponse, error)
}

type cirrusWorkersServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCirrusWorkersServiceClient(cc grpc.ClientConnInterface) CirrusWorkersServiceClient {
	return &cirrusWorkersServiceClient{cc}
}

func (c *cirrusWorkersServiceClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegisterResponse)
	err := c.cc.Invoke(ctx, CirrusWorkersService_Register_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusWorkersServiceClient) 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, CirrusWorkersService_Poll_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusWorkersServiceClient) TaskStarted(ctx context.Context, in *TaskIdentification, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusWorkersService_TaskStarted_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusWorkersServiceClient) TaskFailed(ctx context.Context, in *TaskFailedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusWorkersService_TaskFailed_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusWorkersServiceClient) TaskStopped(ctx context.Context, in *TaskIdentification, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusWorkersService_TaskStopped_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusWorkersServiceClient) UpdateStatus(ctx context.Context, in *UpdateStatusRequest, opts ...grpc.CallOption) (*WorkerStatus, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(WorkerStatus)
	err := c.cc.Invoke(ctx, CirrusWorkersService_UpdateStatus_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusWorkersServiceClient) QueryRunningTasks(ctx context.Context, in *QueryRunningTasksRequest, opts ...grpc.CallOption) (*QueryRunningTasksResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(QueryRunningTasksResponse)
	err := c.cc.Invoke(ctx, CirrusWorkersService_QueryRunningTasks_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CirrusWorkersServiceServer is the server API for CirrusWorkersService service.
// All implementations must embed UnimplementedCirrusWorkersServiceServer
// for forward compatibility.
type CirrusWorkersServiceServer interface {
	// Issued by the persistent worker after it starts
	//
	// Can be called without a session token.
	Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
	// Periodically issued by the registered persistent worker to get new jobs and indicate that it's alive
	Poll(context.Context, *PollRequest) (*PollResponse, error)
	// Issued by the registered persistent worker to indicate task status
	TaskStarted(context.Context, *TaskIdentification) (*emptypb.Empty, error)
	TaskFailed(context.Context, *TaskFailedRequest) (*emptypb.Empty, error)
	TaskStopped(context.Context, *TaskIdentification) (*emptypb.Empty, error)
	UpdateStatus(context.Context, *UpdateStatusRequest) (*WorkerStatus, error)
	QueryRunningTasks(context.Context, *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error)
	mustEmbedUnimplementedCirrusWorkersServiceServer()
}

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

func (UnimplementedCirrusWorkersServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) Poll(context.Context, *PollRequest) (*PollResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Poll not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) TaskStarted(context.Context, *TaskIdentification) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method TaskStarted not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) TaskFailed(context.Context, *TaskFailedRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method TaskFailed not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) TaskStopped(context.Context, *TaskIdentification) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method TaskStopped not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) UpdateStatus(context.Context, *UpdateStatusRequest) (*WorkerStatus, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) QueryRunningTasks(context.Context, *QueryRunningTasksRequest) (*QueryRunningTasksResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method QueryRunningTasks not implemented")
}
func (UnimplementedCirrusWorkersServiceServer) mustEmbedUnimplementedCirrusWorkersServiceServer() {}
func (UnimplementedCirrusWorkersServiceServer) testEmbeddedByValue()                              {}

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

func RegisterCirrusWorkersServiceServer(s grpc.ServiceRegistrar, srv CirrusWorkersServiceServer) {
	// If the following call pancis, it indicates UnimplementedCirrusWorkersServiceServer 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(&CirrusWorkersService_ServiceDesc, srv)
}

func _CirrusWorkersService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegisterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusWorkersServiceServer).Register(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_Register_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).Register(ctx, req.(*RegisterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusWorkersService_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.(CirrusWorkersServiceServer).Poll(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_Poll_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).Poll(ctx, req.(*PollRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusWorkersService_TaskStarted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TaskIdentification)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusWorkersServiceServer).TaskStarted(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_TaskStarted_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).TaskStarted(ctx, req.(*TaskIdentification))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusWorkersService_TaskFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TaskFailedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusWorkersServiceServer).TaskFailed(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_TaskFailed_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).TaskFailed(ctx, req.(*TaskFailedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusWorkersService_TaskStopped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TaskIdentification)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusWorkersServiceServer).TaskStopped(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_TaskStopped_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).TaskStopped(ctx, req.(*TaskIdentification))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusWorkersService_UpdateStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusWorkersServiceServer).UpdateStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_UpdateStatus_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).UpdateStatus(ctx, req.(*UpdateStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusWorkersService_QueryRunningTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryRunningTasksRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusWorkersServiceServer).QueryRunningTasks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusWorkersService_QueryRunningTasks_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusWorkersServiceServer).QueryRunningTasks(ctx, req.(*QueryRunningTasksRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CirrusWorkersService_ServiceDesc is the grpc.ServiceDesc for CirrusWorkersService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CirrusWorkersService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "org.cirruslabs.ci.services.cirruscigrpc.CirrusWorkersService",
	HandlerType: (*CirrusWorkersServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Register",
			Handler:    _CirrusWorkersService_Register_Handler,
		},
		{
			MethodName: "Poll",
			Handler:    _CirrusWorkersService_Poll_Handler,
		},
		{
			MethodName: "TaskStarted",
			Handler:    _CirrusWorkersService_TaskStarted_Handler,
		},
		{
			MethodName: "TaskFailed",
			Handler:    _CirrusWorkersService_TaskFailed_Handler,
		},
		{
			MethodName: "TaskStopped",
			Handler:    _CirrusWorkersService_TaskStopped_Handler,
		},
		{
			MethodName: "UpdateStatus",
			Handler:    _CirrusWorkersService_UpdateStatus_Handler,
		},
		{
			MethodName: "QueryRunningTasks",
			Handler:    _CirrusWorkersService_QueryRunningTasks_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/cirrus_ci_service.proto",
}

const (
	CirrusCIService_InitialCommands_FullMethodName            = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/InitialCommands"
	CirrusCIService_ReportCommandUpdates_FullMethodName       = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportCommandUpdates"
	CirrusCIService_ReportAnnotations_FullMethodName          = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportAnnotations"
	CirrusCIService_StreamLogs_FullMethodName                 = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/StreamLogs"
	CirrusCIService_SaveLogs_FullMethodName                   = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/SaveLogs"
	CirrusCIService_UploadCache_FullMethodName                = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/UploadCache"
	CirrusCIService_UploadArtifacts_FullMethodName            = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/UploadArtifacts"
	CirrusCIService_GenerateArtifactUploadURLs_FullMethodName = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/GenerateArtifactUploadURLs"
	CirrusCIService_CommitUploadedArtifacts_FullMethodName    = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/CommitUploadedArtifacts"
	CirrusCIService_DownloadCache_FullMethodName              = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/DownloadCache"
	CirrusCIService_CacheInfo_FullMethodName                  = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/CacheInfo"
	CirrusCIService_DeleteCache_FullMethodName                = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/DeleteCache"
	CirrusCIService_Heartbeat_FullMethodName                  = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/Heartbeat"
	CirrusCIService_ReportStopHook_FullMethodName             = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportStopHook"
	CirrusCIService_ReportAgentError_FullMethodName           = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportAgentError"
	CirrusCIService_ReportAgentWarning_FullMethodName         = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportAgentWarning"
	CirrusCIService_ReportAgentSignal_FullMethodName          = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportAgentSignal"
	CirrusCIService_ReportAgentLogs_FullMethodName            = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportAgentLogs"
	CirrusCIService_ReportAgentFinished_FullMethodName        = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportAgentFinished"
	CirrusCIService_ReportTerminalAttached_FullMethodName     = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportTerminalAttached"
	CirrusCIService_ReportTerminalLifecycle_FullMethodName    = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/ReportTerminalLifecycle"
	CirrusCIService_GenerateCacheUploadURL_FullMethodName     = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/GenerateCacheUploadURL"
	CirrusCIService_GenerateCacheDownloadURLs_FullMethodName  = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/GenerateCacheDownloadURLs"
	CirrusCIService_MultipartCacheUploadCreate_FullMethodName = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/MultipartCacheUploadCreate"
	CirrusCIService_MultipartCacheUploadPart_FullMethodName   = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/MultipartCacheUploadPart"
	CirrusCIService_MultipartCacheUploadCommit_FullMethodName = "/org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService/MultipartCacheUploadCommit"
)

// CirrusCIServiceClient is the client API for CirrusCIService 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 CirrusCIServiceClient interface {
	InitialCommands(ctx context.Context, in *InitialCommandsRequest, opts ...grpc.CallOption) (*CommandsResponse, error)
	ReportCommandUpdates(ctx context.Context, in *ReportCommandUpdatesRequest, opts ...grpc.CallOption) (*ReportCommandUpdatesResponse, error)
	ReportAnnotations(ctx context.Context, in *ReportAnnotationsCommandRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	StreamLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogEntry, UploadLogsResponse], error)
	SaveLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogEntry, UploadLogsResponse], error)
	UploadCache(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[CacheEntry, UploadCacheResponse], error)
	// Artifacts upload over gRPC
	UploadArtifacts(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ArtifactEntry, UploadArtifactsResponse], error)
	// Artifacts upload over HTTPS
	GenerateArtifactUploadURLs(ctx context.Context, in *GenerateArtifactUploadURLsRequest, opts ...grpc.CallOption) (*GenerateArtifactUploadURLsResponse, error)
	CommitUploadedArtifacts(ctx context.Context, in *CommitUploadedArtifactsRequest, opts ...grpc.CallOption) (*CommitUploadedArtifactsResponse, error)
	DownloadCache(ctx context.Context, in *DownloadCacheRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DataChunk], error)
	CacheInfo(ctx context.Context, in *CacheInfoRequest, opts ...grpc.CallOption) (*CacheInfoResponse, error)
	DeleteCache(ctx context.Context, in *DeleteCacheRequest, opts ...grpc.CallOption) (*DeleteCacheResponse, error)
	Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
	ReportStopHook(ctx context.Context, in *ReportStopHookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ReportAgentError(ctx context.Context, in *ReportAgentProblemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ReportAgentWarning(ctx context.Context, in *ReportAgentProblemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ReportAgentSignal(ctx context.Context, in *ReportAgentSignalRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ReportAgentLogs(ctx context.Context, in *ReportAgentLogsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ReportAgentFinished(ctx context.Context, in *ReportAgentFinishedRequest, opts ...grpc.CallOption) (*ReportAgentFinishedResponse, error)
	ReportTerminalAttached(ctx context.Context, in *ReportTerminalAttachedRequest, opts ...grpc.CallOption) (*ReportTerminalAttachedResponse, error)
	ReportTerminalLifecycle(ctx context.Context, in *ReportTerminalLifecycleRequest, opts ...grpc.CallOption) (*ReportTerminalLifecycleResponse, error)
	GenerateCacheUploadURL(ctx context.Context, in *CacheKey, opts ...grpc.CallOption) (*GenerateURLResponse, error)
	GenerateCacheDownloadURLs(ctx context.Context, in *CacheKey, opts ...grpc.CallOption) (*GenerateURLsResponse, error)
	// Multipart cache upload
	MultipartCacheUploadCreate(ctx context.Context, in *CacheKey, opts ...grpc.CallOption) (*MultipartCacheUploadCreateResponse, error)
	MultipartCacheUploadPart(ctx context.Context, in *MultipartCacheUploadPartRequest, opts ...grpc.CallOption) (*GenerateURLResponse, error)
	MultipartCacheUploadCommit(ctx context.Context, in *MultipartCacheUploadCommitRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type cirrusCIServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCirrusCIServiceClient(cc grpc.ClientConnInterface) CirrusCIServiceClient {
	return &cirrusCIServiceClient{cc}
}

func (c *cirrusCIServiceClient) InitialCommands(ctx context.Context, in *InitialCommandsRequest, opts ...grpc.CallOption) (*CommandsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CommandsResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_InitialCommands_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportCommandUpdates(ctx context.Context, in *ReportCommandUpdatesRequest, opts ...grpc.CallOption) (*ReportCommandUpdatesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReportCommandUpdatesResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportCommandUpdates_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportAnnotations(ctx context.Context, in *ReportAnnotationsCommandRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportAnnotations_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) StreamLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogEntry, UploadLogsResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CirrusCIService_ServiceDesc.Streams[0], CirrusCIService_StreamLogs_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[LogEntry, UploadLogsResponse]{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 CirrusCIService_StreamLogsClient = grpc.ClientStreamingClient[LogEntry, UploadLogsResponse]

func (c *cirrusCIServiceClient) SaveLogs(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[LogEntry, UploadLogsResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CirrusCIService_ServiceDesc.Streams[1], CirrusCIService_SaveLogs_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[LogEntry, UploadLogsResponse]{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 CirrusCIService_SaveLogsClient = grpc.ClientStreamingClient[LogEntry, UploadLogsResponse]

func (c *cirrusCIServiceClient) UploadCache(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[CacheEntry, UploadCacheResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CirrusCIService_ServiceDesc.Streams[2], CirrusCIService_UploadCache_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[CacheEntry, UploadCacheResponse]{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 CirrusCIService_UploadCacheClient = grpc.ClientStreamingClient[CacheEntry, UploadCacheResponse]

func (c *cirrusCIServiceClient) UploadArtifacts(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ArtifactEntry, UploadArtifactsResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CirrusCIService_ServiceDesc.Streams[3], CirrusCIService_UploadArtifacts_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[ArtifactEntry, UploadArtifactsResponse]{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 CirrusCIService_UploadArtifactsClient = grpc.ClientStreamingClient[ArtifactEntry, UploadArtifactsResponse]

func (c *cirrusCIServiceClient) GenerateArtifactUploadURLs(ctx context.Context, in *GenerateArtifactUploadURLsRequest, opts ...grpc.CallOption) (*GenerateArtifactUploadURLsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GenerateArtifactUploadURLsResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_GenerateArtifactUploadURLs_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) CommitUploadedArtifacts(ctx context.Context, in *CommitUploadedArtifactsRequest, opts ...grpc.CallOption) (*CommitUploadedArtifactsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CommitUploadedArtifactsResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_CommitUploadedArtifacts_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) DownloadCache(ctx context.Context, in *DownloadCacheRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DataChunk], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CirrusCIService_ServiceDesc.Streams[4], CirrusCIService_DownloadCache_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[DownloadCacheRequest, DataChunk]{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 CirrusCIService_DownloadCacheClient = grpc.ServerStreamingClient[DataChunk]

func (c *cirrusCIServiceClient) CacheInfo(ctx context.Context, in *CacheInfoRequest, opts ...grpc.CallOption) (*CacheInfoResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CacheInfoResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_CacheInfo_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) DeleteCache(ctx context.Context, in *DeleteCacheRequest, opts ...grpc.CallOption) (*DeleteCacheResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteCacheResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_DeleteCache_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) 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, CirrusCIService_Heartbeat_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportStopHook(ctx context.Context, in *ReportStopHookRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportStopHook_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportAgentError(ctx context.Context, in *ReportAgentProblemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportAgentError_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportAgentWarning(ctx context.Context, in *ReportAgentProblemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportAgentWarning_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportAgentSignal(ctx context.Context, in *ReportAgentSignalRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportAgentSignal_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportAgentLogs(ctx context.Context, in *ReportAgentLogsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportAgentLogs_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportAgentFinished(ctx context.Context, in *ReportAgentFinishedRequest, opts ...grpc.CallOption) (*ReportAgentFinishedResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReportAgentFinishedResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportAgentFinished_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportTerminalAttached(ctx context.Context, in *ReportTerminalAttachedRequest, opts ...grpc.CallOption) (*ReportTerminalAttachedResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReportTerminalAttachedResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportTerminalAttached_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) ReportTerminalLifecycle(ctx context.Context, in *ReportTerminalLifecycleRequest, opts ...grpc.CallOption) (*ReportTerminalLifecycleResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReportTerminalLifecycleResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_ReportTerminalLifecycle_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) GenerateCacheUploadURL(ctx context.Context, in *CacheKey, opts ...grpc.CallOption) (*GenerateURLResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GenerateURLResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_GenerateCacheUploadURL_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) GenerateCacheDownloadURLs(ctx context.Context, in *CacheKey, opts ...grpc.CallOption) (*GenerateURLsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GenerateURLsResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_GenerateCacheDownloadURLs_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) MultipartCacheUploadCreate(ctx context.Context, in *CacheKey, opts ...grpc.CallOption) (*MultipartCacheUploadCreateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(MultipartCacheUploadCreateResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_MultipartCacheUploadCreate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) MultipartCacheUploadPart(ctx context.Context, in *MultipartCacheUploadPartRequest, opts ...grpc.CallOption) (*GenerateURLResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GenerateURLResponse)
	err := c.cc.Invoke(ctx, CirrusCIService_MultipartCacheUploadPart_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cirrusCIServiceClient) MultipartCacheUploadCommit(ctx context.Context, in *MultipartCacheUploadCommitRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, CirrusCIService_MultipartCacheUploadCommit_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CirrusCIServiceServer is the server API for CirrusCIService service.
// All implementations must embed UnimplementedCirrusCIServiceServer
// for forward compatibility.
type CirrusCIServiceServer interface {
	InitialCommands(context.Context, *InitialCommandsRequest) (*CommandsResponse, error)
	ReportCommandUpdates(context.Context, *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error)
	ReportAnnotations(context.Context, *ReportAnnotationsCommandRequest) (*emptypb.Empty, error)
	StreamLogs(grpc.ClientStreamingServer[LogEntry, UploadLogsResponse]) error
	SaveLogs(grpc.ClientStreamingServer[LogEntry, UploadLogsResponse]) error
	UploadCache(grpc.ClientStreamingServer[CacheEntry, UploadCacheResponse]) error
	// Artifacts upload over gRPC
	UploadArtifacts(grpc.ClientStreamingServer[ArtifactEntry, UploadArtifactsResponse]) error
	// Artifacts upload over HTTPS
	GenerateArtifactUploadURLs(context.Context, *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error)
	CommitUploadedArtifacts(context.Context, *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error)
	DownloadCache(*DownloadCacheRequest, grpc.ServerStreamingServer[DataChunk]) error
	CacheInfo(context.Context, *CacheInfoRequest) (*CacheInfoResponse, error)
	DeleteCache(context.Context, *DeleteCacheRequest) (*DeleteCacheResponse, error)
	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
	ReportStopHook(context.Context, *ReportStopHookRequest) (*emptypb.Empty, error)
	ReportAgentError(context.Context, *ReportAgentProblemRequest) (*emptypb.Empty, error)
	ReportAgentWarning(context.Context, *ReportAgentProblemRequest) (*emptypb.Empty, error)
	ReportAgentSignal(context.Context, *ReportAgentSignalRequest) (*emptypb.Empty, error)
	ReportAgentLogs(context.Context, *ReportAgentLogsRequest) (*emptypb.Empty, error)
	ReportAgentFinished(context.Context, *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error)
	ReportTerminalAttached(context.Context, *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error)
	ReportTerminalLifecycle(context.Context, *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error)
	GenerateCacheUploadURL(context.Context, *CacheKey) (*GenerateURLResponse, error)
	GenerateCacheDownloadURLs(context.Context, *CacheKey) (*GenerateURLsResponse, error)
	// Multipart cache upload
	MultipartCacheUploadCreate(context.Context, *CacheKey) (*MultipartCacheUploadCreateResponse, error)
	MultipartCacheUploadPart(context.Context, *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error)
	MultipartCacheUploadCommit(context.Context, *MultipartCacheUploadCommitRequest) (*emptypb.Empty, error)
	mustEmbedUnimplementedCirrusCIServiceServer()
}

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

func (UnimplementedCirrusCIServiceServer) InitialCommands(context.Context, *InitialCommandsRequest) (*CommandsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method InitialCommands not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportCommandUpdates(context.Context, *ReportCommandUpdatesRequest) (*ReportCommandUpdatesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportCommandUpdates not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportAnnotations(context.Context, *ReportAnnotationsCommandRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportAnnotations not implemented")
}
func (UnimplementedCirrusCIServiceServer) StreamLogs(grpc.ClientStreamingServer[LogEntry, UploadLogsResponse]) error {
	return status.Errorf(codes.Unimplemented, "method StreamLogs not implemented")
}
func (UnimplementedCirrusCIServiceServer) SaveLogs(grpc.ClientStreamingServer[LogEntry, UploadLogsResponse]) error {
	return status.Errorf(codes.Unimplemented, "method SaveLogs not implemented")
}
func (UnimplementedCirrusCIServiceServer) UploadCache(grpc.ClientStreamingServer[CacheEntry, UploadCacheResponse]) error {
	return status.Errorf(codes.Unimplemented, "method UploadCache not implemented")
}
func (UnimplementedCirrusCIServiceServer) UploadArtifacts(grpc.ClientStreamingServer[ArtifactEntry, UploadArtifactsResponse]) error {
	return status.Errorf(codes.Unimplemented, "method UploadArtifacts not implemented")
}
func (UnimplementedCirrusCIServiceServer) GenerateArtifactUploadURLs(context.Context, *GenerateArtifactUploadURLsRequest) (*GenerateArtifactUploadURLsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GenerateArtifactUploadURLs not implemented")
}
func (UnimplementedCirrusCIServiceServer) CommitUploadedArtifacts(context.Context, *CommitUploadedArtifactsRequest) (*CommitUploadedArtifactsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CommitUploadedArtifacts not implemented")
}
func (UnimplementedCirrusCIServiceServer) DownloadCache(*DownloadCacheRequest, grpc.ServerStreamingServer[DataChunk]) error {
	return status.Errorf(codes.Unimplemented, "method DownloadCache not implemented")
}
func (UnimplementedCirrusCIServiceServer) CacheInfo(context.Context, *CacheInfoRequest) (*CacheInfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CacheInfo not implemented")
}
func (UnimplementedCirrusCIServiceServer) DeleteCache(context.Context, *DeleteCacheRequest) (*DeleteCacheResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteCache not implemented")
}
func (UnimplementedCirrusCIServiceServer) Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportStopHook(context.Context, *ReportStopHookRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportStopHook not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportAgentError(context.Context, *ReportAgentProblemRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportAgentError not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportAgentWarning(context.Context, *ReportAgentProblemRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportAgentWarning not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportAgentSignal(context.Context, *ReportAgentSignalRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportAgentSignal not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportAgentLogs(context.Context, *ReportAgentLogsRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportAgentLogs not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportAgentFinished(context.Context, *ReportAgentFinishedRequest) (*ReportAgentFinishedResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportAgentFinished not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportTerminalAttached(context.Context, *ReportTerminalAttachedRequest) (*ReportTerminalAttachedResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportTerminalAttached not implemented")
}
func (UnimplementedCirrusCIServiceServer) ReportTerminalLifecycle(context.Context, *ReportTerminalLifecycleRequest) (*ReportTerminalLifecycleResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReportTerminalLifecycle not implemented")
}
func (UnimplementedCirrusCIServiceServer) GenerateCacheUploadURL(context.Context, *CacheKey) (*GenerateURLResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GenerateCacheUploadURL not implemented")
}
func (UnimplementedCirrusCIServiceServer) GenerateCacheDownloadURLs(context.Context, *CacheKey) (*GenerateURLsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GenerateCacheDownloadURLs not implemented")
}
func (UnimplementedCirrusCIServiceServer) MultipartCacheUploadCreate(context.Context, *CacheKey) (*MultipartCacheUploadCreateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MultipartCacheUploadCreate not implemented")
}
func (UnimplementedCirrusCIServiceServer) MultipartCacheUploadPart(context.Context, *MultipartCacheUploadPartRequest) (*GenerateURLResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MultipartCacheUploadPart not implemented")
}
func (UnimplementedCirrusCIServiceServer) MultipartCacheUploadCommit(context.Context, *MultipartCacheUploadCommitRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method MultipartCacheUploadCommit not implemented")
}
func (UnimplementedCirrusCIServiceServer) mustEmbedUnimplementedCirrusCIServiceServer() {}
func (UnimplementedCirrusCIServiceServer) testEmbeddedByValue()                         {}

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

func RegisterCirrusCIServiceServer(s grpc.ServiceRegistrar, srv CirrusCIServiceServer) {
	// If the following call pancis, it indicates UnimplementedCirrusCIServiceServer 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(&CirrusCIService_ServiceDesc, srv)
}

func _CirrusCIService_InitialCommands_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(InitialCommandsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).InitialCommands(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_InitialCommands_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).InitialCommands(ctx, req.(*InitialCommandsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportCommandUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportCommandUpdatesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportCommandUpdates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportCommandUpdates_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportCommandUpdates(ctx, req.(*ReportCommandUpdatesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportAnnotations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportAnnotationsCommandRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportAnnotations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportAnnotations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportAnnotations(ctx, req.(*ReportAnnotationsCommandRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_StreamLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CirrusCIServiceServer).StreamLogs(&grpc.GenericServerStream[LogEntry, UploadLogsResponse]{ServerStream: stream})
}

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

func _CirrusCIService_SaveLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CirrusCIServiceServer).SaveLogs(&grpc.GenericServerStream[LogEntry, UploadLogsResponse]{ServerStream: stream})
}

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

func _CirrusCIService_UploadCache_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CirrusCIServiceServer).UploadCache(&grpc.GenericServerStream[CacheEntry, UploadCacheResponse]{ServerStream: stream})
}

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

func _CirrusCIService_UploadArtifacts_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CirrusCIServiceServer).UploadArtifacts(&grpc.GenericServerStream[ArtifactEntry, UploadArtifactsResponse]{ServerStream: stream})
}

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

func _CirrusCIService_GenerateArtifactUploadURLs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GenerateArtifactUploadURLsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).GenerateArtifactUploadURLs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_GenerateArtifactUploadURLs_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).GenerateArtifactUploadURLs(ctx, req.(*GenerateArtifactUploadURLsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_CommitUploadedArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CommitUploadedArtifactsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).CommitUploadedArtifacts(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_CommitUploadedArtifacts_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).CommitUploadedArtifacts(ctx, req.(*CommitUploadedArtifactsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_DownloadCache_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(DownloadCacheRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CirrusCIServiceServer).DownloadCache(m, &grpc.GenericServerStream[DownloadCacheRequest, DataChunk]{ServerStream: stream})
}

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

func _CirrusCIService_CacheInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CacheInfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).CacheInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_CacheInfo_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).CacheInfo(ctx, req.(*CacheInfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_DeleteCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteCacheRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).DeleteCache(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_DeleteCache_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).DeleteCache(ctx, req.(*DeleteCacheRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_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.(CirrusCIServiceServer).Heartbeat(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_Heartbeat_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).Heartbeat(ctx, req.(*HeartbeatRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportStopHook_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportStopHookRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportStopHook(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportStopHook_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportStopHook(ctx, req.(*ReportStopHookRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportAgentError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportAgentProblemRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportAgentError(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportAgentError_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportAgentError(ctx, req.(*ReportAgentProblemRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportAgentWarning_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportAgentProblemRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportAgentWarning(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportAgentWarning_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportAgentWarning(ctx, req.(*ReportAgentProblemRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportAgentSignal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportAgentSignalRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportAgentSignal(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportAgentSignal_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportAgentSignal(ctx, req.(*ReportAgentSignalRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportAgentLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportAgentLogsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportAgentLogs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportAgentLogs_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportAgentLogs(ctx, req.(*ReportAgentLogsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportAgentFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportAgentFinishedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportAgentFinished(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportAgentFinished_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportAgentFinished(ctx, req.(*ReportAgentFinishedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportTerminalAttached_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportTerminalAttachedRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportTerminalAttached(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportTerminalAttached_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportTerminalAttached(ctx, req.(*ReportTerminalAttachedRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_ReportTerminalLifecycle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReportTerminalLifecycleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).ReportTerminalLifecycle(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_ReportTerminalLifecycle_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).ReportTerminalLifecycle(ctx, req.(*ReportTerminalLifecycleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_GenerateCacheUploadURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CacheKey)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).GenerateCacheUploadURL(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_GenerateCacheUploadURL_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).GenerateCacheUploadURL(ctx, req.(*CacheKey))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_GenerateCacheDownloadURLs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CacheKey)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).GenerateCacheDownloadURLs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_GenerateCacheDownloadURLs_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).GenerateCacheDownloadURLs(ctx, req.(*CacheKey))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_MultipartCacheUploadCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CacheKey)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).MultipartCacheUploadCreate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_MultipartCacheUploadCreate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).MultipartCacheUploadCreate(ctx, req.(*CacheKey))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_MultipartCacheUploadPart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MultipartCacheUploadPartRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).MultipartCacheUploadPart(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_MultipartCacheUploadPart_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).MultipartCacheUploadPart(ctx, req.(*MultipartCacheUploadPartRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CirrusCIService_MultipartCacheUploadCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MultipartCacheUploadCommitRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CirrusCIServiceServer).MultipartCacheUploadCommit(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CirrusCIService_MultipartCacheUploadCommit_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CirrusCIServiceServer).MultipartCacheUploadCommit(ctx, req.(*MultipartCacheUploadCommitRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CirrusCIService_ServiceDesc is the grpc.ServiceDesc for CirrusCIService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CirrusCIService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "org.cirruslabs.ci.services.cirruscigrpc.CirrusCIService",
	HandlerType: (*CirrusCIServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InitialCommands",
			Handler:    _CirrusCIService_InitialCommands_Handler,
		},
		{
			MethodName: "ReportCommandUpdates",
			Handler:    _CirrusCIService_ReportCommandUpdates_Handler,
		},
		{
			MethodName: "ReportAnnotations",
			Handler:    _CirrusCIService_ReportAnnotations_Handler,
		},
		{
			MethodName: "GenerateArtifactUploadURLs",
			Handler:    _CirrusCIService_GenerateArtifactUploadURLs_Handler,
		},
		{
			MethodName: "CommitUploadedArtifacts",
			Handler:    _CirrusCIService_CommitUploadedArtifacts_Handler,
		},
		{
			MethodName: "CacheInfo",
			Handler:    _CirrusCIService_CacheInfo_Handler,
		},
		{
			MethodName: "DeleteCache",
			Handler:    _CirrusCIService_DeleteCache_Handler,
		},
		{
			MethodName: "Heartbeat",
			Handler:    _CirrusCIService_Heartbeat_Handler,
		},
		{
			MethodName: "ReportStopHook",
			Handler:    _CirrusCIService_ReportStopHook_Handler,
		},
		{
			MethodName: "ReportAgentError",
			Handler:    _CirrusCIService_ReportAgentError_Handler,
		},
		{
			MethodName: "ReportAgentWarning",
			Handler:    _CirrusCIService_ReportAgentWarning_Handler,
		},
		{
			MethodName: "ReportAgentSignal",
			Handler:    _CirrusCIService_ReportAgentSignal_Handler,
		},
		{
			MethodName: "ReportAgentLogs",
			Handler:    _CirrusCIService_ReportAgentLogs_Handler,
		},
		{
			MethodName: "ReportAgentFinished",
			Handler:    _CirrusCIService_ReportAgentFinished_Handler,
		},
		{
			MethodName: "ReportTerminalAttached",
			Handler:    _CirrusCIService_ReportTerminalAttached_Handler,
		},
		{
			MethodName: "ReportTerminalLifecycle",
			Handler:    _CirrusCIService_ReportTerminalLifecycle_Handler,
		},
		{
			MethodName: "GenerateCacheUploadURL",
			Handler:    _CirrusCIService_GenerateCacheUploadURL_Handler,
		},
		{
			MethodName: "GenerateCacheDownloadURLs",
			Handler:    _CirrusCIService_GenerateCacheDownloadURLs_Handler,
		},
		{
			MethodName: "MultipartCacheUploadCreate",
			Handler:    _CirrusCIService_MultipartCacheUploadCreate_Handler,
		},
		{
			MethodName: "MultipartCacheUploadPart",
			Handler:    _CirrusCIService_MultipartCacheUploadPart_Handler,
		},
		{
			MethodName: "MultipartCacheUploadCommit",
			Handler:    _CirrusCIService_MultipartCacheUploadCommit_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamLogs",
			Handler:       _CirrusCIService_StreamLogs_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "SaveLogs",
			Handler:       _CirrusCIService_SaveLogs_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "UploadCache",
			Handler:       _CirrusCIService_UploadCache_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "UploadArtifacts",
			Handler:       _CirrusCIService_UploadArtifacts_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "DownloadCache",
			Handler:       _CirrusCIService_DownloadCache_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/cirrus_ci_service.proto",
}
