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

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

package keyapis_vc_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 (
	CameraCollectionService_GetCameraCollection_FullMethodName         = "/keyapis.vc.v1.CameraCollectionService/GetCameraCollection"
	CameraCollectionService_GetCameraCollectionList_FullMethodName     = "/keyapis.vc.v1.CameraCollectionService/GetCameraCollectionList"
	CameraCollectionService_GetCameraCollectionCount_FullMethodName    = "/keyapis.vc.v1.CameraCollectionService/GetCameraCollectionCount"
	CameraCollectionService_SaveCameraCollection_FullMethodName        = "/keyapis.vc.v1.CameraCollectionService/SaveCameraCollection"
	CameraCollectionService_DeleteCameraCollection_FullMethodName      = "/keyapis.vc.v1.CameraCollectionService/DeleteCameraCollection"
	CameraCollectionService_PostCameraCollectionRestore_FullMethodName = "/keyapis.vc.v1.CameraCollectionService/PostCameraCollectionRestore"
)

// CameraCollectionServiceClient is the client API for CameraCollectionService 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 CameraCollectionServiceClient interface {
	// Метод получения коллекции камер.
	// Для owner, employee возвращаются только коллекции камер c COMPANY_ID из токена.
	// Метод доступен для: admin, service, bti, owner, employee
	GetCameraCollection(ctx context.Context, in *GetCameraCollectionRequest, opts ...grpc.CallOption) (*GetCameraCollectionResponse, error)
	// Метод получения списка коллекций камер.
	// Для owner, employee возвращаются только коллекции камер c COMPANY_ID из токена.
	// Метод доступен для: admin, service, bti, owner, employee
	GetCameraCollectionList(ctx context.Context, in *GetCameraCollectionListRequest, opts ...grpc.CallOption) (CameraCollectionService_GetCameraCollectionListClient, error)
	// Метод получения количества коллекций камер.
	// Для owner, employee возвращаются только коллекции камер c COMPANY_ID из токена.
	// Метод доступен для: admin, service, bti, owner, employee
	GetCameraCollectionCount(ctx context.Context, in *GetCameraCollectionCountRequest, opts ...grpc.CallOption) (*GetCameraCollectionCountResponse, error)
	// Метод создания и изменения коллекции камер.
	// При изменении коллекции массив external_camera_ids заменяется полностью.
	// Для owner, employee сравнивается COMPANY_ID из токена и company_id коллекции, при несовпадении ошибка доступа.
	// Метод доступен для: admin, service, bti, owner, employee
	SaveCameraCollection(ctx context.Context, in *SaveCameraCollectionRequest, opts ...grpc.CallOption) (*SaveCameraCollectionResponse, error)
	// Метод удаления коллекции камер.
	// Проставляет в поле deleted_at текущую дату.
	// Для owner, employee сравнивается COMPANY_ID из токена и company_id коллекции, при несовпадении ошибка доступа.
	// Метод доступен для: admin, service, bti, owner, employee
	DeleteCameraCollection(ctx context.Context, in *DeleteCameraCollectionRequest, opts ...grpc.CallOption) (*DeleteCameraCollectionResponse, error)
	// Метод восстановления удаленной коллекции камер.
	// Проставляет null в поле deleted_at.
	// Для owner, employee сравнивается COMPANY_ID из токена и company_id коллекции, при несовпадении ошибка доступа.
	// Метод доступен для: admin, service, bti, owner, employee
	PostCameraCollectionRestore(ctx context.Context, in *PostCameraCollectionRestoreRequest, opts ...grpc.CallOption) (*PostCameraCollectionRestoreResponse, error)
}

type cameraCollectionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCameraCollectionServiceClient(cc grpc.ClientConnInterface) CameraCollectionServiceClient {
	return &cameraCollectionServiceClient{cc}
}

func (c *cameraCollectionServiceClient) GetCameraCollection(ctx context.Context, in *GetCameraCollectionRequest, opts ...grpc.CallOption) (*GetCameraCollectionResponse, error) {
	out := new(GetCameraCollectionResponse)
	err := c.cc.Invoke(ctx, CameraCollectionService_GetCameraCollection_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cameraCollectionServiceClient) GetCameraCollectionList(ctx context.Context, in *GetCameraCollectionListRequest, opts ...grpc.CallOption) (CameraCollectionService_GetCameraCollectionListClient, error) {
	stream, err := c.cc.NewStream(ctx, &CameraCollectionService_ServiceDesc.Streams[0], CameraCollectionService_GetCameraCollectionList_FullMethodName, opts...)
	if err != nil {
		return nil, err
	}
	x := &cameraCollectionServiceGetCameraCollectionListClient{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 CameraCollectionService_GetCameraCollectionListClient interface {
	Recv() (*GetCameraCollectionListResponse, error)
	grpc.ClientStream
}

type cameraCollectionServiceGetCameraCollectionListClient struct {
	grpc.ClientStream
}

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

func (c *cameraCollectionServiceClient) GetCameraCollectionCount(ctx context.Context, in *GetCameraCollectionCountRequest, opts ...grpc.CallOption) (*GetCameraCollectionCountResponse, error) {
	out := new(GetCameraCollectionCountResponse)
	err := c.cc.Invoke(ctx, CameraCollectionService_GetCameraCollectionCount_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cameraCollectionServiceClient) SaveCameraCollection(ctx context.Context, in *SaveCameraCollectionRequest, opts ...grpc.CallOption) (*SaveCameraCollectionResponse, error) {
	out := new(SaveCameraCollectionResponse)
	err := c.cc.Invoke(ctx, CameraCollectionService_SaveCameraCollection_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cameraCollectionServiceClient) DeleteCameraCollection(ctx context.Context, in *DeleteCameraCollectionRequest, opts ...grpc.CallOption) (*DeleteCameraCollectionResponse, error) {
	out := new(DeleteCameraCollectionResponse)
	err := c.cc.Invoke(ctx, CameraCollectionService_DeleteCameraCollection_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *cameraCollectionServiceClient) PostCameraCollectionRestore(ctx context.Context, in *PostCameraCollectionRestoreRequest, opts ...grpc.CallOption) (*PostCameraCollectionRestoreResponse, error) {
	out := new(PostCameraCollectionRestoreResponse)
	err := c.cc.Invoke(ctx, CameraCollectionService_PostCameraCollectionRestore_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CameraCollectionServiceServer is the server API for CameraCollectionService service.
// All implementations should embed UnimplementedCameraCollectionServiceServer
// for forward compatibility
type CameraCollectionServiceServer interface {
	// Метод получения коллекции камер.
	// Для owner, employee возвращаются только коллекции камер c COMPANY_ID из токена.
	// Метод доступен для: admin, service, bti, owner, employee
	GetCameraCollection(context.Context, *GetCameraCollectionRequest) (*GetCameraCollectionResponse, error)
	// Метод получения списка коллекций камер.
	// Для owner, employee возвращаются только коллекции камер c COMPANY_ID из токена.
	// Метод доступен для: admin, service, bti, owner, employee
	GetCameraCollectionList(*GetCameraCollectionListRequest, CameraCollectionService_GetCameraCollectionListServer) error
	// Метод получения количества коллекций камер.
	// Для owner, employee возвращаются только коллекции камер c COMPANY_ID из токена.
	// Метод доступен для: admin, service, bti, owner, employee
	GetCameraCollectionCount(context.Context, *GetCameraCollectionCountRequest) (*GetCameraCollectionCountResponse, error)
	// Метод создания и изменения коллекции камер.
	// При изменении коллекции массив external_camera_ids заменяется полностью.
	// Для owner, employee сравнивается COMPANY_ID из токена и company_id коллекции, при несовпадении ошибка доступа.
	// Метод доступен для: admin, service, bti, owner, employee
	SaveCameraCollection(context.Context, *SaveCameraCollectionRequest) (*SaveCameraCollectionResponse, error)
	// Метод удаления коллекции камер.
	// Проставляет в поле deleted_at текущую дату.
	// Для owner, employee сравнивается COMPANY_ID из токена и company_id коллекции, при несовпадении ошибка доступа.
	// Метод доступен для: admin, service, bti, owner, employee
	DeleteCameraCollection(context.Context, *DeleteCameraCollectionRequest) (*DeleteCameraCollectionResponse, error)
	// Метод восстановления удаленной коллекции камер.
	// Проставляет null в поле deleted_at.
	// Для owner, employee сравнивается COMPANY_ID из токена и company_id коллекции, при несовпадении ошибка доступа.
	// Метод доступен для: admin, service, bti, owner, employee
	PostCameraCollectionRestore(context.Context, *PostCameraCollectionRestoreRequest) (*PostCameraCollectionRestoreResponse, error)
}

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

func (UnimplementedCameraCollectionServiceServer) GetCameraCollection(context.Context, *GetCameraCollectionRequest) (*GetCameraCollectionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCameraCollection not implemented")
}
func (UnimplementedCameraCollectionServiceServer) GetCameraCollectionList(*GetCameraCollectionListRequest, CameraCollectionService_GetCameraCollectionListServer) error {
	return status.Errorf(codes.Unimplemented, "method GetCameraCollectionList not implemented")
}
func (UnimplementedCameraCollectionServiceServer) GetCameraCollectionCount(context.Context, *GetCameraCollectionCountRequest) (*GetCameraCollectionCountResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCameraCollectionCount not implemented")
}
func (UnimplementedCameraCollectionServiceServer) SaveCameraCollection(context.Context, *SaveCameraCollectionRequest) (*SaveCameraCollectionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SaveCameraCollection not implemented")
}
func (UnimplementedCameraCollectionServiceServer) DeleteCameraCollection(context.Context, *DeleteCameraCollectionRequest) (*DeleteCameraCollectionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteCameraCollection not implemented")
}
func (UnimplementedCameraCollectionServiceServer) PostCameraCollectionRestore(context.Context, *PostCameraCollectionRestoreRequest) (*PostCameraCollectionRestoreResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostCameraCollectionRestore not implemented")
}

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

func RegisterCameraCollectionServiceServer(s grpc.ServiceRegistrar, srv CameraCollectionServiceServer) {
	s.RegisterService(&CameraCollectionService_ServiceDesc, srv)
}

func _CameraCollectionService_GetCameraCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCameraCollectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CameraCollectionServiceServer).GetCameraCollection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CameraCollectionService_GetCameraCollection_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CameraCollectionServiceServer).GetCameraCollection(ctx, req.(*GetCameraCollectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CameraCollectionService_GetCameraCollectionList_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetCameraCollectionListRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CameraCollectionServiceServer).GetCameraCollectionList(m, &cameraCollectionServiceGetCameraCollectionListServer{stream})
}

type CameraCollectionService_GetCameraCollectionListServer interface {
	Send(*GetCameraCollectionListResponse) error
	grpc.ServerStream
}

type cameraCollectionServiceGetCameraCollectionListServer struct {
	grpc.ServerStream
}

func (x *cameraCollectionServiceGetCameraCollectionListServer) Send(m *GetCameraCollectionListResponse) error {
	return x.ServerStream.SendMsg(m)
}

func _CameraCollectionService_GetCameraCollectionCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCameraCollectionCountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CameraCollectionServiceServer).GetCameraCollectionCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CameraCollectionService_GetCameraCollectionCount_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CameraCollectionServiceServer).GetCameraCollectionCount(ctx, req.(*GetCameraCollectionCountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CameraCollectionService_SaveCameraCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SaveCameraCollectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CameraCollectionServiceServer).SaveCameraCollection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CameraCollectionService_SaveCameraCollection_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CameraCollectionServiceServer).SaveCameraCollection(ctx, req.(*SaveCameraCollectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CameraCollectionService_DeleteCameraCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteCameraCollectionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CameraCollectionServiceServer).DeleteCameraCollection(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CameraCollectionService_DeleteCameraCollection_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CameraCollectionServiceServer).DeleteCameraCollection(ctx, req.(*DeleteCameraCollectionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _CameraCollectionService_PostCameraCollectionRestore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostCameraCollectionRestoreRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CameraCollectionServiceServer).PostCameraCollectionRestore(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CameraCollectionService_PostCameraCollectionRestore_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CameraCollectionServiceServer).PostCameraCollectionRestore(ctx, req.(*PostCameraCollectionRestoreRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CameraCollectionService_ServiceDesc is the grpc.ServiceDesc for CameraCollectionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CameraCollectionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyapis.vc.v1.CameraCollectionService",
	HandlerType: (*CameraCollectionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCameraCollection",
			Handler:    _CameraCollectionService_GetCameraCollection_Handler,
		},
		{
			MethodName: "GetCameraCollectionCount",
			Handler:    _CameraCollectionService_GetCameraCollectionCount_Handler,
		},
		{
			MethodName: "SaveCameraCollection",
			Handler:    _CameraCollectionService_SaveCameraCollection_Handler,
		},
		{
			MethodName: "DeleteCameraCollection",
			Handler:    _CameraCollectionService_DeleteCameraCollection_Handler,
		},
		{
			MethodName: "PostCameraCollectionRestore",
			Handler:    _CameraCollectionService_PostCameraCollectionRestore_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetCameraCollectionList",
			Handler:       _CameraCollectionService_GetCameraCollectionList_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "keyapis/vc/v1/keyapis_vc_camera_group_v1.proto",
}
