package com.iqser.red.service.persistence.service.v1.api.internal.resources;

import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;

import com.iqser.red.service.persistence.service.v1.api.shared.model.index.IndexInformation;

public interface IndexInformationResource {

    String PATH = "/index-information";


    @ResponseBody
    @ResponseStatus(value = HttpStatus.OK)
    @GetMapping(value = InternalApi.BASE_PATH + PATH, produces = MediaType.APPLICATION_JSON_VALUE)
    IndexInformation getIndexInformation();


    @ResponseBody
    @ResponseStatus(value = HttpStatus.OK)
    @PostMapping(value = InternalApi.BASE_PATH + PATH, consumes = MediaType.APPLICATION_JSON_VALUE)
    void updateIndexInformation(@RequestBody IndexInformation indexInformation);

}
