// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.32.1
// source: main.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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	PinnedMessage_Ping_FullMethodName        = "/crabs.pinned_message.pinnedMessage/Ping"
	PinnedMessage_GetSchedule_FullMethodName = "/crabs.pinned_message.pinnedMessage/GetSchedule"
)

// PinnedMessageClient is the client API for PinnedMessage 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 PinnedMessageClient interface {
	Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRsp, error)
	GetSchedule(ctx context.Context, in *GetScheduleReq, opts ...grpc.CallOption) (*GetScheduleRsp, error)
}

type pinnedMessageClient struct {
	cc grpc.ClientConnInterface
}

func NewPinnedMessageClient(cc grpc.ClientConnInterface) PinnedMessageClient {
	return &pinnedMessageClient{cc}
}

func (c *pinnedMessageClient) Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (*PingRsp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(PingRsp)
	err := c.cc.Invoke(ctx, PinnedMessage_Ping_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *pinnedMessageClient) GetSchedule(ctx context.Context, in *GetScheduleReq, opts ...grpc.CallOption) (*GetScheduleRsp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetScheduleRsp)
	err := c.cc.Invoke(ctx, PinnedMessage_GetSchedule_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PinnedMessageServer is the server API for PinnedMessage service.
// All implementations must embed UnimplementedPinnedMessageServer
// for forward compatibility.
type PinnedMessageServer interface {
	Ping(context.Context, *PingReq) (*PingRsp, error)
	GetSchedule(context.Context, *GetScheduleReq) (*GetScheduleRsp, error)
	mustEmbedUnimplementedPinnedMessageServer()
}

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

func (UnimplementedPinnedMessageServer) Ping(context.Context, *PingReq) (*PingRsp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedPinnedMessageServer) GetSchedule(context.Context, *GetScheduleReq) (*GetScheduleRsp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSchedule not implemented")
}
func (UnimplementedPinnedMessageServer) mustEmbedUnimplementedPinnedMessageServer() {}
func (UnimplementedPinnedMessageServer) testEmbeddedByValue()                       {}

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

func RegisterPinnedMessageServer(s grpc.ServiceRegistrar, srv PinnedMessageServer) {
	// If the following call pancis, it indicates UnimplementedPinnedMessageServer 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(&PinnedMessage_ServiceDesc, srv)
}

func _PinnedMessage_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PingReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PinnedMessageServer).Ping(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PinnedMessage_Ping_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PinnedMessageServer).Ping(ctx, req.(*PingReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _PinnedMessage_GetSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetScheduleReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PinnedMessageServer).GetSchedule(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PinnedMessage_GetSchedule_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PinnedMessageServer).GetSchedule(ctx, req.(*GetScheduleReq))
	}
	return interceptor(ctx, in, info, handler)
}

// PinnedMessage_ServiceDesc is the grpc.ServiceDesc for PinnedMessage service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PinnedMessage_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "crabs.pinned_message.pinnedMessage",
	HandlerType: (*PinnedMessageServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _PinnedMessage_Ping_Handler,
		},
		{
			MethodName: "GetSchedule",
			Handler:    _PinnedMessage_GetSchedule_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "main.proto",
}
