from typing import Dict

from model.request_models import InputNerType, InputSummaryType, InputOIEType, InputNREType


class Requests:
    def __init__(self):
        self.requests_ner: Dict[int, InputNerType] = {}
        self.requests_summary: Dict[int, InputSummaryType] = {}
        self.requests_oie: Dict[int, InputOIEType] = {}
        self.requests_nre: Dict[int, InputNREType] = {}
        self.ner_id = 0
        self.oie_id = 0
        self.summary_id = 0
        self.nre_id = 0

    def add_request_ner(self, input_json: InputNerType):
        self.requests_ner[self.ner_id] = input_json
        self.ner_id += 1
        return self.ner_id

    def add_request_oie(self, input_json: InputNerType):
        self.requests_oie[self.oie_id] = input_json
        self.oie_id += 1
        return self.oie_id

    def add_request_summary(self, input_json: InputSummaryType):
        self.requests_summary[self.summary_id] = input_json
        self.summary_id += 1
        return self.summary_id

    def add_request_nre(self, input_json: InputNREType):
        self.requests_nre[self.nre_id] = input_json
        self.nre_id += 1
        return self.nre_id
