#pragma once

#include <robot/jupiter/library/rtdoc/protos/lumps.pb.h>
#include <saas/rtyserver/indexer_core/document_parser.h>
#include <util/system/yassert.h>

namespace NRTYServer {
class TJupiParsedEntity: public TParsedDocument::TParsedEntity {
private:
    NJupiter::TMercuryLumps Data;

protected:
    virtual void DoApplyPatch(const TParsedDocument& /*doc*/) {
        Y_ASSERT(false);
    }

public:
    using TParsedDocument::TParsedEntity::TParsedEntity;

    const NJupiter::TMercuryLumps* GetData() const {
        return &Data;
    }

    NJupiter::TMercuryLumps* MutableData() {
        return &Data;
    }
};

class TJupiDocParser: public TComponentParser {
public:
    virtual void Parse(TParsingContext& context) const;
};
}
