// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.25.1
// source: signal.proto

package proto

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	SignalService_SignalSet_FullMethodName     = "/signal.SignalService/SignalSet"
	SignalService_SignalClear_FullMethodName   = "/signal.SignalService/SignalClear"
	SignalService_SignalMonitor_FullMethodName = "/signal.SignalService/SignalMonitor"
)

// SignalServiceClient is the client API for SignalService 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 SignalServiceClient interface {
	SignalSet(ctx context.Context, in *SignalSetRequest, opts ...grpc.CallOption) (*SignalSetResponse, error)
	SignalClear(ctx context.Context, in *SignalClearRequest, opts ...grpc.CallOption) (*SignalClearResponse, error)
	SignalMonitor(ctx context.Context, in *SignalMonitorRequest, opts ...grpc.CallOption) (SignalService_SignalMonitorClient, error)
}

type signalServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSignalServiceClient(cc grpc.ClientConnInterface) SignalServiceClient {
	return &signalServiceClient{cc}
}

func (c *signalServiceClient) SignalSet(ctx context.Context, in *SignalSetRequest, opts ...grpc.CallOption) (*SignalSetResponse, error) {
	out := new(SignalSetResponse)
	err := c.cc.Invoke(ctx, SignalService_SignalSet_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *signalServiceClient) SignalClear(ctx context.Context, in *SignalClearRequest, opts ...grpc.CallOption) (*SignalClearResponse, error) {
	out := new(SignalClearResponse)
	err := c.cc.Invoke(ctx, SignalService_SignalClear_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *signalServiceClient) SignalMonitor(ctx context.Context, in *SignalMonitorRequest, opts ...grpc.CallOption) (SignalService_SignalMonitorClient, error) {
	stream, err := c.cc.NewStream(ctx, &SignalService_ServiceDesc.Streams[0], SignalService_SignalMonitor_FullMethodName, opts...)
	if err != nil {
		return nil, err
	}
	x := &signalServiceSignalMonitorClient{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
}

type SignalService_SignalMonitorClient interface {
	Recv() (*SignalMonitorResponse, error)
	grpc.ClientStream
}

type signalServiceSignalMonitorClient struct {
	grpc.ClientStream
}

func (x *signalServiceSignalMonitorClient) Recv() (*SignalMonitorResponse, error) {
	m := new(SignalMonitorResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// SignalServiceServer is the server API for SignalService service.
// All implementations must embed UnimplementedSignalServiceServer
// for forward compatibility
type SignalServiceServer interface {
	SignalSet(context.Context, *SignalSetRequest) (*SignalSetResponse, error)
	SignalClear(context.Context, *SignalClearRequest) (*SignalClearResponse, error)
	SignalMonitor(*SignalMonitorRequest, SignalService_SignalMonitorServer) error
	mustEmbedUnimplementedSignalServiceServer()
}

// UnimplementedSignalServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSignalServiceServer struct {
}

func (UnimplementedSignalServiceServer) SignalSet(context.Context, *SignalSetRequest) (*SignalSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SignalSet not implemented")
}
func (UnimplementedSignalServiceServer) SignalClear(context.Context, *SignalClearRequest) (*SignalClearResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SignalClear not implemented")
}
func (UnimplementedSignalServiceServer) SignalMonitor(*SignalMonitorRequest, SignalService_SignalMonitorServer) error {
	return status.Errorf(codes.Unimplemented, "method SignalMonitor not implemented")
}
func (UnimplementedSignalServiceServer) mustEmbedUnimplementedSignalServiceServer() {}

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

func RegisterSignalServiceServer(s grpc.ServiceRegistrar, srv SignalServiceServer) {
	s.RegisterService(&SignalService_ServiceDesc, srv)
}

func _SignalService_SignalSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SignalSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SignalServiceServer).SignalSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SignalService_SignalSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SignalServiceServer).SignalSet(ctx, req.(*SignalSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SignalService_SignalClear_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SignalClearRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SignalServiceServer).SignalClear(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SignalService_SignalClear_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SignalServiceServer).SignalClear(ctx, req.(*SignalClearRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SignalService_SignalMonitor_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(SignalMonitorRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(SignalServiceServer).SignalMonitor(m, &signalServiceSignalMonitorServer{stream})
}

type SignalService_SignalMonitorServer interface {
	Send(*SignalMonitorResponse) error
	grpc.ServerStream
}

type signalServiceSignalMonitorServer struct {
	grpc.ServerStream
}

func (x *signalServiceSignalMonitorServer) Send(m *SignalMonitorResponse) error {
	return x.ServerStream.SendMsg(m)
}

// SignalService_ServiceDesc is the grpc.ServiceDesc for SignalService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SignalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "signal.SignalService",
	HandlerType: (*SignalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignalSet",
			Handler:    _SignalService_SignalSet_Handler,
		},
		{
			MethodName: "SignalClear",
			Handler:    _SignalService_SignalClear_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SignalMonitor",
			Handler:       _SignalService_SignalMonitor_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "signal.proto",
}
