//
//Сервис предоставляет возможность авторизации

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

package keyapis_identity_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 (
	TokenService_PostTokenUser_FullMethodName = "/keyapis.identity.v1.TokenService/PostTokenUser"
)

// TokenServiceClient is the client API for TokenService 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 TokenServiceClient interface {
	// Метод получения токена по идентификатору пользователя.
	// Метод доступен для: service
	PostTokenUser(ctx context.Context, in *PostTokenUserRequest, opts ...grpc.CallOption) (*PostTokenUserResponse, error)
}

type tokenServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewTokenServiceClient(cc grpc.ClientConnInterface) TokenServiceClient {
	return &tokenServiceClient{cc}
}

func (c *tokenServiceClient) PostTokenUser(ctx context.Context, in *PostTokenUserRequest, opts ...grpc.CallOption) (*PostTokenUserResponse, error) {
	out := new(PostTokenUserResponse)
	err := c.cc.Invoke(ctx, TokenService_PostTokenUser_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TokenServiceServer is the server API for TokenService service.
// All implementations should embed UnimplementedTokenServiceServer
// for forward compatibility
type TokenServiceServer interface {
	// Метод получения токена по идентификатору пользователя.
	// Метод доступен для: service
	PostTokenUser(context.Context, *PostTokenUserRequest) (*PostTokenUserResponse, error)
}

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

func (UnimplementedTokenServiceServer) PostTokenUser(context.Context, *PostTokenUserRequest) (*PostTokenUserResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostTokenUser not implemented")
}

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

func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer) {
	s.RegisterService(&TokenService_ServiceDesc, srv)
}

func _TokenService_PostTokenUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostTokenUserRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TokenServiceServer).PostTokenUser(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: TokenService_PostTokenUser_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TokenServiceServer).PostTokenUser(ctx, req.(*PostTokenUserRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// TokenService_ServiceDesc is the grpc.ServiceDesc for TokenService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TokenService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyapis.identity.v1.TokenService",
	HandlerType: (*TokenServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostTokenUser",
			Handler:    _TokenService_PostTokenUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keyapis/identity/v1/keyapis_identity_token_v1.proto",
}
