//
//Сервис реализует функционал управления уведомлениями

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.23.1
// source: keyapis/bell/v1/keyapis_bell_notification_v1.proto

package keyapis_bell_v1

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 (
	NotificationService_PostNotification_FullMethodName                    = "/keyapis.bell.v1.NotificationService/PostNotification"
	NotificationService_GetNotification_FullMethodName                     = "/keyapis.bell.v1.NotificationService/GetNotification"
	NotificationService_GetNotificationList_FullMethodName                 = "/keyapis.bell.v1.NotificationService/GetNotificationList"
	NotificationService_GetNotificationCount_FullMethodName                = "/keyapis.bell.v1.NotificationService/GetNotificationCount"
	NotificationService_PostNotificationView_FullMethodName                = "/keyapis.bell.v1.NotificationService/PostNotificationView"
	NotificationService_PostNotificationViewOrponRoomNumber_FullMethodName = "/keyapis.bell.v1.NotificationService/PostNotificationViewOrponRoomNumber"
)

// NotificationServiceClient is the client API for NotificationService 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 NotificationServiceClient interface {
	// Метод сохранения уведомления.
	// Поддерживает только создание.
	// Метод доступен для: service
	PostNotification(ctx context.Context, in *PostNotificationRequest, opts ...grpc.CallOption) (*PostNotificationResponse, error)
	// Метод получения уведомления.
	// Метод доступен для: admin, manager, master, slave, service
	GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*GetNotificationResponse, error)
	// Метод получения списка уведомлений.
	// Метод доступен для: admin, manager, master, slave, service
	GetNotificationList(ctx context.Context, in *GetNotificationListRequest, opts ...grpc.CallOption) (NotificationService_GetNotificationListClient, error)
	// Метод получения количества уведомлений.
	// Метод доступен для: admin, manager, master, slave, service
	GetNotificationCount(ctx context.Context, in *GetNotificationCountRequest, opts ...grpc.CallOption) (*GetNotificationCountResponse, error)
	// Метод изменения статуса уведомления на "Просмотрено".
	// Метод доступен для: master, slave, service
	PostNotificationView(ctx context.Context, in *PostNotificationViewRequest, opts ...grpc.CallOption) (*PostNotificationViewResponse, error)
	// Метод изменения статуса уведомлений на "Просмотрено" по ОРПОНу и номеру квартиры.
	// Метод доступен для: master, slave, service
	PostNotificationViewOrponRoomNumber(ctx context.Context, in *PostNotificationViewOrponRoomNumberRequest, opts ...grpc.CallOption) (*PostNotificationViewOrponRoomNumberResponse, error)
}

type notificationServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewNotificationServiceClient(cc grpc.ClientConnInterface) NotificationServiceClient {
	return &notificationServiceClient{cc}
}

func (c *notificationServiceClient) PostNotification(ctx context.Context, in *PostNotificationRequest, opts ...grpc.CallOption) (*PostNotificationResponse, error) {
	out := new(PostNotificationResponse)
	err := c.cc.Invoke(ctx, NotificationService_PostNotification_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *notificationServiceClient) GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*GetNotificationResponse, error) {
	out := new(GetNotificationResponse)
	err := c.cc.Invoke(ctx, NotificationService_GetNotification_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *notificationServiceClient) GetNotificationList(ctx context.Context, in *GetNotificationListRequest, opts ...grpc.CallOption) (NotificationService_GetNotificationListClient, error) {
	stream, err := c.cc.NewStream(ctx, &NotificationService_ServiceDesc.Streams[0], NotificationService_GetNotificationList_FullMethodName, opts...)
	if err != nil {
		return nil, err
	}
	x := &notificationServiceGetNotificationListClient{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 NotificationService_GetNotificationListClient interface {
	Recv() (*GetNotificationListResponse, error)
	grpc.ClientStream
}

type notificationServiceGetNotificationListClient struct {
	grpc.ClientStream
}

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

func (c *notificationServiceClient) GetNotificationCount(ctx context.Context, in *GetNotificationCountRequest, opts ...grpc.CallOption) (*GetNotificationCountResponse, error) {
	out := new(GetNotificationCountResponse)
	err := c.cc.Invoke(ctx, NotificationService_GetNotificationCount_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *notificationServiceClient) PostNotificationView(ctx context.Context, in *PostNotificationViewRequest, opts ...grpc.CallOption) (*PostNotificationViewResponse, error) {
	out := new(PostNotificationViewResponse)
	err := c.cc.Invoke(ctx, NotificationService_PostNotificationView_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *notificationServiceClient) PostNotificationViewOrponRoomNumber(ctx context.Context, in *PostNotificationViewOrponRoomNumberRequest, opts ...grpc.CallOption) (*PostNotificationViewOrponRoomNumberResponse, error) {
	out := new(PostNotificationViewOrponRoomNumberResponse)
	err := c.cc.Invoke(ctx, NotificationService_PostNotificationViewOrponRoomNumber_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// NotificationServiceServer is the server API for NotificationService service.
// All implementations should embed UnimplementedNotificationServiceServer
// for forward compatibility
type NotificationServiceServer interface {
	// Метод сохранения уведомления.
	// Поддерживает только создание.
	// Метод доступен для: service
	PostNotification(context.Context, *PostNotificationRequest) (*PostNotificationResponse, error)
	// Метод получения уведомления.
	// Метод доступен для: admin, manager, master, slave, service
	GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationResponse, error)
	// Метод получения списка уведомлений.
	// Метод доступен для: admin, manager, master, slave, service
	GetNotificationList(*GetNotificationListRequest, NotificationService_GetNotificationListServer) error
	// Метод получения количества уведомлений.
	// Метод доступен для: admin, manager, master, slave, service
	GetNotificationCount(context.Context, *GetNotificationCountRequest) (*GetNotificationCountResponse, error)
	// Метод изменения статуса уведомления на "Просмотрено".
	// Метод доступен для: master, slave, service
	PostNotificationView(context.Context, *PostNotificationViewRequest) (*PostNotificationViewResponse, error)
	// Метод изменения статуса уведомлений на "Просмотрено" по ОРПОНу и номеру квартиры.
	// Метод доступен для: master, slave, service
	PostNotificationViewOrponRoomNumber(context.Context, *PostNotificationViewOrponRoomNumberRequest) (*PostNotificationViewOrponRoomNumberResponse, error)
}

// UnimplementedNotificationServiceServer should be embedded to have forward compatible implementations.
type UnimplementedNotificationServiceServer struct {
}

func (UnimplementedNotificationServiceServer) PostNotification(context.Context, *PostNotificationRequest) (*PostNotificationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostNotification not implemented")
}
func (UnimplementedNotificationServiceServer) GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNotification not implemented")
}
func (UnimplementedNotificationServiceServer) GetNotificationList(*GetNotificationListRequest, NotificationService_GetNotificationListServer) error {
	return status.Errorf(codes.Unimplemented, "method GetNotificationList not implemented")
}
func (UnimplementedNotificationServiceServer) GetNotificationCount(context.Context, *GetNotificationCountRequest) (*GetNotificationCountResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNotificationCount not implemented")
}
func (UnimplementedNotificationServiceServer) PostNotificationView(context.Context, *PostNotificationViewRequest) (*PostNotificationViewResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostNotificationView not implemented")
}
func (UnimplementedNotificationServiceServer) PostNotificationViewOrponRoomNumber(context.Context, *PostNotificationViewOrponRoomNumberRequest) (*PostNotificationViewOrponRoomNumberResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostNotificationViewOrponRoomNumber not implemented")
}

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

func RegisterNotificationServiceServer(s grpc.ServiceRegistrar, srv NotificationServiceServer) {
	s.RegisterService(&NotificationService_ServiceDesc, srv)
}

func _NotificationService_PostNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostNotificationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NotificationServiceServer).PostNotification(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: NotificationService_PostNotification_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NotificationServiceServer).PostNotification(ctx, req.(*PostNotificationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NotificationService_GetNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNotificationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NotificationServiceServer).GetNotification(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: NotificationService_GetNotification_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NotificationServiceServer).GetNotification(ctx, req.(*GetNotificationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NotificationService_GetNotificationList_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetNotificationListRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(NotificationServiceServer).GetNotificationList(m, &notificationServiceGetNotificationListServer{stream})
}

type NotificationService_GetNotificationListServer interface {
	Send(*GetNotificationListResponse) error
	grpc.ServerStream
}

type notificationServiceGetNotificationListServer struct {
	grpc.ServerStream
}

func (x *notificationServiceGetNotificationListServer) Send(m *GetNotificationListResponse) error {
	return x.ServerStream.SendMsg(m)
}

func _NotificationService_GetNotificationCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetNotificationCountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NotificationServiceServer).GetNotificationCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: NotificationService_GetNotificationCount_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NotificationServiceServer).GetNotificationCount(ctx, req.(*GetNotificationCountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NotificationService_PostNotificationView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostNotificationViewRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NotificationServiceServer).PostNotificationView(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: NotificationService_PostNotificationView_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NotificationServiceServer).PostNotificationView(ctx, req.(*PostNotificationViewRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _NotificationService_PostNotificationViewOrponRoomNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostNotificationViewOrponRoomNumberRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(NotificationServiceServer).PostNotificationViewOrponRoomNumber(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: NotificationService_PostNotificationViewOrponRoomNumber_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(NotificationServiceServer).PostNotificationViewOrponRoomNumber(ctx, req.(*PostNotificationViewOrponRoomNumberRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// NotificationService_ServiceDesc is the grpc.ServiceDesc for NotificationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var NotificationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyapis.bell.v1.NotificationService",
	HandlerType: (*NotificationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostNotification",
			Handler:    _NotificationService_PostNotification_Handler,
		},
		{
			MethodName: "GetNotification",
			Handler:    _NotificationService_GetNotification_Handler,
		},
		{
			MethodName: "GetNotificationCount",
			Handler:    _NotificationService_GetNotificationCount_Handler,
		},
		{
			MethodName: "PostNotificationView",
			Handler:    _NotificationService_PostNotificationView_Handler,
		},
		{
			MethodName: "PostNotificationViewOrponRoomNumber",
			Handler:    _NotificationService_PostNotificationViewOrponRoomNumber_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetNotificationList",
			Handler:       _NotificationService_GetNotificationList_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "keyapis/bell/v1/keyapis_bell_notification_v1.proto",
}
