package com.iqser.red.service.persistence.service.v1.api.external.resource;

import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
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.license.LicenseReport;
import com.iqser.red.service.persistence.service.v1.api.shared.model.license.LicenseReportRequest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;

public interface LicenseReportResource {

    String LICENSE_REPORT_PATH = ExternalApi.BASE_PATH + "/report/license";


    @ResponseBody
    @ResponseStatus(value = HttpStatus.OK)
    @PostMapping(value = LICENSE_REPORT_PATH, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    @Operation(summary = "Creates and serves license report.", description = "None")
    @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Successfully created and served a license report.")})
    LicenseReport getReport(@RequestBody LicenseReportRequest reportRequest);

}
