// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package durudexv1

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

// UserSessionServiceClient is the client API for UserSessionService 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 UserSessionServiceClient interface {
	// Getting a user session.
	GetUserSession(ctx context.Context, in *GetUserSessionRequest, opts ...grpc.CallOption) (*GetUserSessionResponse, error)
	// Getting a user sessions.
	GetUserSessions(ctx context.Context, in *GetUserSessionsRequest, opts ...grpc.CallOption) (*GetUserSessionsResponse, error)
	// Deleting a user session.
	DeleteUserSession(ctx context.Context, in *DeleteUserSessionRequest, opts ...grpc.CallOption) (*DeleteUserSessionResponse, error)
	// Getting total user session count.
	GetTotalUserSessionCount(ctx context.Context, in *GetTotalUserSessionCountRequest, opts ...grpc.CallOption) (*GetTotalUserSessionCountResponse, error)
}

type userSessionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewUserSessionServiceClient(cc grpc.ClientConnInterface) UserSessionServiceClient {
	return &userSessionServiceClient{cc}
}

func (c *userSessionServiceClient) GetUserSession(ctx context.Context, in *GetUserSessionRequest, opts ...grpc.CallOption) (*GetUserSessionResponse, error) {
	out := new(GetUserSessionResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserSessionService/GetUserSession", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userSessionServiceClient) GetUserSessions(ctx context.Context, in *GetUserSessionsRequest, opts ...grpc.CallOption) (*GetUserSessionsResponse, error) {
	out := new(GetUserSessionsResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserSessionService/GetUserSessions", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userSessionServiceClient) DeleteUserSession(ctx context.Context, in *DeleteUserSessionRequest, opts ...grpc.CallOption) (*DeleteUserSessionResponse, error) {
	out := new(DeleteUserSessionResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserSessionService/DeleteUserSession", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userSessionServiceClient) GetTotalUserSessionCount(ctx context.Context, in *GetTotalUserSessionCountRequest, opts ...grpc.CallOption) (*GetTotalUserSessionCountResponse, error) {
	out := new(GetTotalUserSessionCountResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserSessionService/GetTotalUserSessionCount", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// UserSessionServiceServer is the server API for UserSessionService service.
// All implementations must embed UnimplementedUserSessionServiceServer
// for forward compatibility
type UserSessionServiceServer interface {
	// Getting a user session.
	GetUserSession(context.Context, *GetUserSessionRequest) (*GetUserSessionResponse, error)
	// Getting a user sessions.
	GetUserSessions(context.Context, *GetUserSessionsRequest) (*GetUserSessionsResponse, error)
	// Deleting a user session.
	DeleteUserSession(context.Context, *DeleteUserSessionRequest) (*DeleteUserSessionResponse, error)
	// Getting total user session count.
	GetTotalUserSessionCount(context.Context, *GetTotalUserSessionCountRequest) (*GetTotalUserSessionCountResponse, error)
	mustEmbedUnimplementedUserSessionServiceServer()
}

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

func (UnimplementedUserSessionServiceServer) GetUserSession(context.Context, *GetUserSessionRequest) (*GetUserSessionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUserSession not implemented")
}
func (UnimplementedUserSessionServiceServer) GetUserSessions(context.Context, *GetUserSessionsRequest) (*GetUserSessionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUserSessions not implemented")
}
func (UnimplementedUserSessionServiceServer) DeleteUserSession(context.Context, *DeleteUserSessionRequest) (*DeleteUserSessionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteUserSession not implemented")
}
func (UnimplementedUserSessionServiceServer) GetTotalUserSessionCount(context.Context, *GetTotalUserSessionCountRequest) (*GetTotalUserSessionCountResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTotalUserSessionCount not implemented")
}
func (UnimplementedUserSessionServiceServer) mustEmbedUnimplementedUserSessionServiceServer() {}

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

func RegisterUserSessionServiceServer(s grpc.ServiceRegistrar, srv UserSessionServiceServer) {
	s.RegisterService(&UserSessionService_ServiceDesc, srv)
}

func _UserSessionService_GetUserSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUserSessionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserSessionServiceServer).GetUserSession(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserSessionService/GetUserSession",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserSessionServiceServer).GetUserSession(ctx, req.(*GetUserSessionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserSessionService_GetUserSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUserSessionsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserSessionServiceServer).GetUserSessions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserSessionService/GetUserSessions",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserSessionServiceServer).GetUserSessions(ctx, req.(*GetUserSessionsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserSessionService_DeleteUserSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteUserSessionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserSessionServiceServer).DeleteUserSession(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserSessionService/DeleteUserSession",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserSessionServiceServer).DeleteUserSession(ctx, req.(*DeleteUserSessionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserSessionService_GetTotalUserSessionCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTotalUserSessionCountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserSessionServiceServer).GetTotalUserSessionCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserSessionService/GetTotalUserSessionCount",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserSessionServiceServer).GetTotalUserSessionCount(ctx, req.(*GetTotalUserSessionCountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// UserSessionService_ServiceDesc is the grpc.ServiceDesc for UserSessionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserSessionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "durudex.v1.UserSessionService",
	HandlerType: (*UserSessionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserSession",
			Handler:    _UserSessionService_GetUserSession_Handler,
		},
		{
			MethodName: "GetUserSessions",
			Handler:    _UserSessionService_GetUserSessions_Handler,
		},
		{
			MethodName: "DeleteUserSession",
			Handler:    _UserSessionService_DeleteUserSession_Handler,
		},
		{
			MethodName: "GetTotalUserSessionCount",
			Handler:    _UserSessionService_GetTotalUserSessionCount_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "durudex/v1/user_session.proto",
}
