// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc             v6.33.1
// source: auth.proto

package gen

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 (
	AuthService_Authenticate_FullMethodName    = "/proto.AuthService/Authenticate"
	AuthService_ValidatePin_FullMethodName     = "/proto.AuthService/ValidatePin"
	AuthService_ValidateCaptcha_FullMethodName = "/proto.AuthService/ValidateCaptcha"
)

// AuthServiceClient is the client API for AuthService 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 AuthServiceClient interface {
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
	ValidatePin(ctx context.Context, in *ValidatePinRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
	ValidateCaptcha(ctx context.Context, in *ValidateCaptchaRequest, opts ...grpc.CallOption) (*ValidateResponse, error)
}

type authServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
	return &authServiceClient{cc}
}

func (c *authServiceClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AuthenticateResponse)
	err := c.cc.Invoke(ctx, AuthService_Authenticate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authServiceClient) ValidatePin(ctx context.Context, in *ValidatePinRequest, opts ...grpc.CallOption) (*ValidateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ValidateResponse)
	err := c.cc.Invoke(ctx, AuthService_ValidatePin_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authServiceClient) ValidateCaptcha(ctx context.Context, in *ValidateCaptchaRequest, opts ...grpc.CallOption) (*ValidateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ValidateResponse)
	err := c.cc.Invoke(ctx, AuthService_ValidateCaptcha_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AuthServiceServer is the server API for AuthService service.
// All implementations must embed UnimplementedAuthServiceServer
// for forward compatibility.
type AuthServiceServer interface {
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
	ValidatePin(context.Context, *ValidatePinRequest) (*ValidateResponse, error)
	ValidateCaptcha(context.Context, *ValidateCaptchaRequest) (*ValidateResponse, error)
	mustEmbedUnimplementedAuthServiceServer()
}

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

func (UnimplementedAuthServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method Authenticate not implemented")
}
func (UnimplementedAuthServiceServer) ValidatePin(context.Context, *ValidatePinRequest) (*ValidateResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ValidatePin not implemented")
}
func (UnimplementedAuthServiceServer) ValidateCaptcha(context.Context, *ValidateCaptchaRequest) (*ValidateResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ValidateCaptcha not implemented")
}
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
func (UnimplementedAuthServiceServer) testEmbeddedByValue()                     {}

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

func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
	// If the following call panics, it indicates UnimplementedAuthServiceServer 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(&AuthService_ServiceDesc, srv)
}

func _AuthService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthenticateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServiceServer).Authenticate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AuthService_Authenticate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServiceServer).Authenticate(ctx, req.(*AuthenticateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AuthService_ValidatePin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValidatePinRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServiceServer).ValidatePin(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AuthService_ValidatePin_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServiceServer).ValidatePin(ctx, req.(*ValidatePinRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AuthService_ValidateCaptcha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ValidateCaptchaRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthServiceServer).ValidateCaptcha(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AuthService_ValidateCaptcha_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthServiceServer).ValidateCaptcha(ctx, req.(*ValidateCaptchaRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.AuthService",
	HandlerType: (*AuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _AuthService_Authenticate_Handler,
		},
		{
			MethodName: "ValidatePin",
			Handler:    _AuthService_ValidatePin_Handler,
		},
		{
			MethodName: "ValidateCaptcha",
			Handler:    _AuthService_ValidateCaptcha_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}

const (
	PermissionService_HasPermission_FullMethodName                 = "/proto.PermissionService/HasPermission"
	PermissionService_GetPermission_FullMethodName                 = "/proto.PermissionService/GetPermission"
	PermissionService_AddPermissionNode_FullMethodName             = "/proto.PermissionService/AddPermissionNode"
	PermissionService_AddPermissionNodeToGroup_FullMethodName      = "/proto.PermissionService/AddPermissionNodeToGroup"
	PermissionService_RemovePermissionNode_FullMethodName          = "/proto.PermissionService/RemovePermissionNode"
	PermissionService_RemovePermissionNodeFromGroup_FullMethodName = "/proto.PermissionService/RemovePermissionNodeFromGroup"
)

// PermissionServiceClient is the client API for PermissionService 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 PermissionServiceClient interface {
	HasPermission(ctx context.Context, in *HasPermissionRequest, opts ...grpc.CallOption) (*HasPermissionResponse, error)
	GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error)
	AddPermissionNode(ctx context.Context, in *AddPermissionNodeRequest, opts ...grpc.CallOption) (*AddPermissionNodeResponse, error)
	AddPermissionNodeToGroup(ctx context.Context, in *AddPermissionNodeToGroupRequest, opts ...grpc.CallOption) (*AddPermissionNodeToGroupResponse, error)
	RemovePermissionNode(ctx context.Context, in *RemovePermissionNodeRequest, opts ...grpc.CallOption) (*RemovePermissionNodeResponse, error)
	RemovePermissionNodeFromGroup(ctx context.Context, in *RemovePermissionNodeFromGroupRequest, opts ...grpc.CallOption) (*RemovePermissionNodeFromGroupResponse, error)
}

type permissionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient {
	return &permissionServiceClient{cc}
}

func (c *permissionServiceClient) HasPermission(ctx context.Context, in *HasPermissionRequest, opts ...grpc.CallOption) (*HasPermissionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(HasPermissionResponse)
	err := c.cc.Invoke(ctx, PermissionService_HasPermission_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionServiceClient) GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetPermissionResponse)
	err := c.cc.Invoke(ctx, PermissionService_GetPermission_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionServiceClient) AddPermissionNode(ctx context.Context, in *AddPermissionNodeRequest, opts ...grpc.CallOption) (*AddPermissionNodeResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AddPermissionNodeResponse)
	err := c.cc.Invoke(ctx, PermissionService_AddPermissionNode_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionServiceClient) AddPermissionNodeToGroup(ctx context.Context, in *AddPermissionNodeToGroupRequest, opts ...grpc.CallOption) (*AddPermissionNodeToGroupResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AddPermissionNodeToGroupResponse)
	err := c.cc.Invoke(ctx, PermissionService_AddPermissionNodeToGroup_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionServiceClient) RemovePermissionNode(ctx context.Context, in *RemovePermissionNodeRequest, opts ...grpc.CallOption) (*RemovePermissionNodeResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RemovePermissionNodeResponse)
	err := c.cc.Invoke(ctx, PermissionService_RemovePermissionNode_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *permissionServiceClient) RemovePermissionNodeFromGroup(ctx context.Context, in *RemovePermissionNodeFromGroupRequest, opts ...grpc.CallOption) (*RemovePermissionNodeFromGroupResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RemovePermissionNodeFromGroupResponse)
	err := c.cc.Invoke(ctx, PermissionService_RemovePermissionNodeFromGroup_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PermissionServiceServer is the server API for PermissionService service.
// All implementations must embed UnimplementedPermissionServiceServer
// for forward compatibility.
type PermissionServiceServer interface {
	HasPermission(context.Context, *HasPermissionRequest) (*HasPermissionResponse, error)
	GetPermission(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error)
	AddPermissionNode(context.Context, *AddPermissionNodeRequest) (*AddPermissionNodeResponse, error)
	AddPermissionNodeToGroup(context.Context, *AddPermissionNodeToGroupRequest) (*AddPermissionNodeToGroupResponse, error)
	RemovePermissionNode(context.Context, *RemovePermissionNodeRequest) (*RemovePermissionNodeResponse, error)
	RemovePermissionNodeFromGroup(context.Context, *RemovePermissionNodeFromGroupRequest) (*RemovePermissionNodeFromGroupResponse, error)
	mustEmbedUnimplementedPermissionServiceServer()
}

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

func (UnimplementedPermissionServiceServer) HasPermission(context.Context, *HasPermissionRequest) (*HasPermissionResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method HasPermission not implemented")
}
func (UnimplementedPermissionServiceServer) GetPermission(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetPermission not implemented")
}
func (UnimplementedPermissionServiceServer) AddPermissionNode(context.Context, *AddPermissionNodeRequest) (*AddPermissionNodeResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method AddPermissionNode not implemented")
}
func (UnimplementedPermissionServiceServer) AddPermissionNodeToGroup(context.Context, *AddPermissionNodeToGroupRequest) (*AddPermissionNodeToGroupResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method AddPermissionNodeToGroup not implemented")
}
func (UnimplementedPermissionServiceServer) RemovePermissionNode(context.Context, *RemovePermissionNodeRequest) (*RemovePermissionNodeResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method RemovePermissionNode not implemented")
}
func (UnimplementedPermissionServiceServer) RemovePermissionNodeFromGroup(context.Context, *RemovePermissionNodeFromGroupRequest) (*RemovePermissionNodeFromGroupResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method RemovePermissionNodeFromGroup not implemented")
}
func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {}
func (UnimplementedPermissionServiceServer) testEmbeddedByValue()                           {}

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

func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) {
	// If the following call panics, it indicates UnimplementedPermissionServiceServer 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(&PermissionService_ServiceDesc, srv)
}

func _PermissionService_HasPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(HasPermissionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionServiceServer).HasPermission(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PermissionService_HasPermission_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionServiceServer).HasPermission(ctx, req.(*HasPermissionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionService_GetPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetPermissionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionServiceServer).GetPermission(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PermissionService_GetPermission_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionServiceServer).GetPermission(ctx, req.(*GetPermissionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionService_AddPermissionNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddPermissionNodeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionServiceServer).AddPermissionNode(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PermissionService_AddPermissionNode_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionServiceServer).AddPermissionNode(ctx, req.(*AddPermissionNodeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionService_AddPermissionNodeToGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddPermissionNodeToGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionServiceServer).AddPermissionNodeToGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PermissionService_AddPermissionNodeToGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionServiceServer).AddPermissionNodeToGroup(ctx, req.(*AddPermissionNodeToGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionService_RemovePermissionNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemovePermissionNodeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionServiceServer).RemovePermissionNode(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PermissionService_RemovePermissionNode_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionServiceServer).RemovePermissionNode(ctx, req.(*RemovePermissionNodeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _PermissionService_RemovePermissionNodeFromGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemovePermissionNodeFromGroupRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PermissionServiceServer).RemovePermissionNodeFromGroup(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: PermissionService_RemovePermissionNodeFromGroup_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PermissionServiceServer).RemovePermissionNodeFromGroup(ctx, req.(*RemovePermissionNodeFromGroupRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PermissionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.PermissionService",
	HandlerType: (*PermissionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "HasPermission",
			Handler:    _PermissionService_HasPermission_Handler,
		},
		{
			MethodName: "GetPermission",
			Handler:    _PermissionService_GetPermission_Handler,
		},
		{
			MethodName: "AddPermissionNode",
			Handler:    _PermissionService_AddPermissionNode_Handler,
		},
		{
			MethodName: "AddPermissionNodeToGroup",
			Handler:    _PermissionService_AddPermissionNodeToGroup_Handler,
		},
		{
			MethodName: "RemovePermissionNode",
			Handler:    _PermissionService_RemovePermissionNode_Handler,
		},
		{
			MethodName: "RemovePermissionNodeFromGroup",
			Handler:    _PermissionService_RemovePermissionNodeFromGroup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "auth.proto",
}
