// 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

// UserAuthServiceClient is the client API for UserAuthService 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 UserAuthServiceClient interface {
	// User Sign Up.
	UserSignUp(ctx context.Context, in *UserSignUpRequest, opts ...grpc.CallOption) (*UserSignUpResponse, error)
	// User Sign In.
	UserSignIn(ctx context.Context, in *UserSignInRequest, opts ...grpc.CallOption) (*UserSignInResponse, error)
	// Refresh user authentication token.
	RefreshUserToken(ctx context.Context, in *RefreshUserTokenRequest, opts ...grpc.CallOption) (*RefreshUserTokenResponse, error)
}

type userAuthServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewUserAuthServiceClient(cc grpc.ClientConnInterface) UserAuthServiceClient {
	return &userAuthServiceClient{cc}
}

func (c *userAuthServiceClient) UserSignUp(ctx context.Context, in *UserSignUpRequest, opts ...grpc.CallOption) (*UserSignUpResponse, error) {
	out := new(UserSignUpResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserAuthService/UserSignUp", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userAuthServiceClient) UserSignIn(ctx context.Context, in *UserSignInRequest, opts ...grpc.CallOption) (*UserSignInResponse, error) {
	out := new(UserSignInResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserAuthService/UserSignIn", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userAuthServiceClient) RefreshUserToken(ctx context.Context, in *RefreshUserTokenRequest, opts ...grpc.CallOption) (*RefreshUserTokenResponse, error) {
	out := new(RefreshUserTokenResponse)
	err := c.cc.Invoke(ctx, "/durudex.v1.UserAuthService/RefreshUserToken", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// UserAuthServiceServer is the server API for UserAuthService service.
// All implementations must embed UnimplementedUserAuthServiceServer
// for forward compatibility
type UserAuthServiceServer interface {
	// User Sign Up.
	UserSignUp(context.Context, *UserSignUpRequest) (*UserSignUpResponse, error)
	// User Sign In.
	UserSignIn(context.Context, *UserSignInRequest) (*UserSignInResponse, error)
	// Refresh user authentication token.
	RefreshUserToken(context.Context, *RefreshUserTokenRequest) (*RefreshUserTokenResponse, error)
	mustEmbedUnimplementedUserAuthServiceServer()
}

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

func (UnimplementedUserAuthServiceServer) UserSignUp(context.Context, *UserSignUpRequest) (*UserSignUpResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UserSignUp not implemented")
}
func (UnimplementedUserAuthServiceServer) UserSignIn(context.Context, *UserSignInRequest) (*UserSignInResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UserSignIn not implemented")
}
func (UnimplementedUserAuthServiceServer) RefreshUserToken(context.Context, *RefreshUserTokenRequest) (*RefreshUserTokenResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RefreshUserToken not implemented")
}
func (UnimplementedUserAuthServiceServer) mustEmbedUnimplementedUserAuthServiceServer() {}

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

func RegisterUserAuthServiceServer(s grpc.ServiceRegistrar, srv UserAuthServiceServer) {
	s.RegisterService(&UserAuthService_ServiceDesc, srv)
}

func _UserAuthService_UserSignUp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UserSignUpRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserAuthServiceServer).UserSignUp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserAuthService/UserSignUp",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserAuthServiceServer).UserSignUp(ctx, req.(*UserSignUpRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserAuthService_UserSignIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UserSignInRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserAuthServiceServer).UserSignIn(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserAuthService/UserSignIn",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserAuthServiceServer).UserSignIn(ctx, req.(*UserSignInRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserAuthService_RefreshUserToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RefreshUserTokenRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserAuthServiceServer).RefreshUserToken(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/durudex.v1.UserAuthService/RefreshUserToken",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserAuthServiceServer).RefreshUserToken(ctx, req.(*RefreshUserTokenRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// UserAuthService_ServiceDesc is the grpc.ServiceDesc for UserAuthService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserAuthService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "durudex.v1.UserAuthService",
	HandlerType: (*UserAuthServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UserSignUp",
			Handler:    _UserAuthService_UserSignUp_Handler,
		},
		{
			MethodName: "UserSignIn",
			Handler:    _UserAuthService_UserSignIn_Handler,
		},
		{
			MethodName: "RefreshUserToken",
			Handler:    _UserAuthService_RefreshUserToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "durudex/v1/user_auth.proto",
}
