package org.wfc.omada.api.insight;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.wfc.omada.config.FeignConfig;
import org.wfc.omada.api.insight.model.DeleteIpsThreat;
import org.wfc.omada.api.insight.model.IpsOperateThreat;
import org.wfc.omada.api.insight.model.OperationResponseGetIpsThreatDetail;
import org.wfc.omada.api.insight.model.OperationResponseGridVoGetGridIpsThreat;
import org.wfc.omada.api.insight.model.OperationResponseObject;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:42:23.297+08:00[Asia/Shanghai]")

@Validated
@Api(value = "OmadaThreatManagement", description = "the OmadaThreatManagement API")
@FeignClient(name="OmadaThreatManagementApi", url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaThreatManagementApi {

    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/ips/threat : Delete archived ips threat
     * Delete archived ips threat.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Insight Manager Modify&lt;br/&gt;Global Threat Manager Modify
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param deleteIpsThreat  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Delete archived ips threat", nickname = "deleteThreatList", notes = "Delete archived ips threat.<br/><br/>The interface requires one of the permissions: <br/>Site Insight Manager Modify<br/>Global Threat Manager Modify", response = OperationResponseObject.class, tags={ "Omada/Threat Management","Threat Management", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseObject.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/ips/threat",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseObject> deleteThreatList(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) DeleteIpsThreat deleteIpsThreat);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/ips/threat/{threatId} : Get threat entry detail
     * Get threat entry detail.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Insight Manager View Only&lt;br/&gt;Global Threat Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param threatId threatId (required)
     * @param time Timestamp, in seconds, such as 1682000000 (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get threat entry detail", nickname = "getThreatDetail", notes = "Get threat entry detail.<br/><br/>The interface requires one of the permissions: <br/>Site Insight Manager View Only<br/>Global Threat Manager View Only", response = OperationResponseGetIpsThreatDetail.class, tags={ "Omada/Threat Management","Threat Management", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGetIpsThreatDetail.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/ips/threat/{threatId}",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGetIpsThreatDetail> getThreatDetail(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "threatId",required=true) @PathVariable("threatId") String threatId,@NotNull @ApiParam(value = "Timestamp, in seconds, such as 1682000000", required = true) @Valid @RequestParam(value = "time", required = true) Long time);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/ips/grid/threat-management : Get grid threat list
     * Get grid threat list.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Insight Manager View Only&lt;br/&gt;Global Threat Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param archived archived (required)
     * @param page Start page number. Start from 1. (required)
     * @param pageSize Number of entries per page. It should be within the range of 1–1000. (required)
     * @param filtersStartTime Start timestamp, in seconds, such as 1682000000 (required)
     * @param filtersEndTime End timestamp, in seconds, such as 1682000000 (required)
     * @param filtersSeverity Threat Severity, such as 0:Critical, 1: Major, 2:Moderate, 3:Minor, 4:Low (optional)
     * @param sortsTime Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect (optional)
     * @param searchKey Fuzzy query parameters, support field Threat Description/Classification/Classification Description (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get grid threat list", nickname = "getThreatList", notes = "Get grid threat list.<br/><br/>The interface requires one of the permissions: <br/>Site Insight Manager View Only<br/>Global Threat Manager View Only", response = OperationResponseGridVoGetGridIpsThreat.class, tags={ "Omada/Threat Management","Threat Management", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoGetGridIpsThreat.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/ips/grid/threat-management",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoGetGridIpsThreat> getThreatList(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@NotNull @ApiParam(value = "archived", required = true) @Valid @RequestParam(value = "archived", required = true) Boolean archived,@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 1–1000.", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@NotNull @ApiParam(value = "Start timestamp, in seconds, such as 1682000000", required = true) @Valid @RequestParam(value = "filters.startTime", required = true) Long filtersStartTime,@NotNull @ApiParam(value = "End timestamp, in seconds, such as 1682000000", required = true) @Valid @RequestParam(value = "filters.endTime", required = true) Long filtersEndTime,@ApiParam(value = "Threat Severity, such as 0:Critical, 1: Major, 2:Moderate, 3:Minor, 4:Low") @Valid @RequestParam(value = "filters.severity", required = false) Integer filtersSeverity,@ApiParam(value = "Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect") @Valid @RequestParam(value = "sorts.time", required = false) String sortsTime,@ApiParam(value = "Fuzzy query parameters, support field Threat Description/Classification/Classification Description") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);


    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/ips/threat/multi-ops : Block/Isolate Device/Signature Suppression/Allow ips threat
     * Block/Isolate Device/Signature Suppression/Allow ips threat.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Insight Manager Modify&lt;br/&gt;Global Threat Manager Modify&lt;br/&gt;&lt;br/&gt;The possible error code for the interface in the returned body is one of the following error codes (non generic error codes): &lt;br/&gt;-35202  -  The number of allow list entries has reached the limit.&lt;br/&gt;-35203  -  The number of block list entries has reached the limit.&lt;br/&gt;-35204  -  The number of signature suppression entries has reached the limit.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param ipsOperateThreat  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Block/Isolate Device/Signature Suppression/Allow ips threat", nickname = "operateThreats", notes = "Block/Isolate Device/Signature Suppression/Allow ips threat.<br/><br/>The interface requires one of the permissions: <br/>Site Insight Manager Modify<br/>Global Threat Manager Modify<br/><br/>The possible error code for the interface in the returned body is one of the following error codes (non generic error codes): <br/>-35202  -  The number of allow list entries has reached the limit.<br/>-35203  -  The number of block list entries has reached the limit.<br/>-35204  -  The number of signature suppression entries has reached the limit.", response = OperationResponseObject.class, tags={ "Omada/Threat Management","Threat Management", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseObject.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/ips/threat/multi-ops",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseObject> operateThreats(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) IpsOperateThreat ipsOperateThreat);

}
