#pragma once

#include <saas/indexerproxy/adapters/interface_adapter.h>
#include <saas/indexerproxy/adapters/json/json_adapter.h>
#include <saas/indexerproxy/adapters/adapters_factory.h>

namespace NIndexerProxy {

    class TJsonToRTYAdapter : public TJsonAdapter {
    public:
        static const TString AdapterAlias;
    public:
        TJsonToRTYAdapter(const TAdapterInitializationList& arguments)
            : TJsonAdapter(arguments)
        {}
        virtual const TString& GetFormatName() const {
            return AdapterAlias;
        }
        virtual bool PreprocessMessage(ISenderTask& context) const;

    private:
        static TAdaptersFactory::TRegistrator<NIndexerProxy::TJsonToRTYAdapter> Registrator;
    };
}
