package org.wfc.omada.api.msp;

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.msp.model.AuditLogNotificationSettingEditOpenApiVo;
import org.wfc.omada.api.msp.model.LogNotificationSettingEditOpenApiV2Vo;
import org.wfc.omada.api.msp.model.LogNotificationSettingEditOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseAuditLogNotificationSettingOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseGridVoAuditLogOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseLogNotificationSettingOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseWithoutResult;

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

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

    /**
     * GET /openapi/v1/msp/{mspId}/audit-notification : Get MSP audit log notification
     * Get msp audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get MSP audit log notification", nickname = "getAuditLogSettingForMsp", notes = "Get msp audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager View Only", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseAuditLogNotificationSettingOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/audit-notification",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseAuditLogNotificationSettingOpenApiVo> getAuditLogSettingForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * GET /openapi/v1/msp/{mspId}/audit-logs : Get MSP audit log list
     * Get audit logs in msp audit page.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager View Only
     *
     * @param mspId MSP ID (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.(value:10,15,20,30,50,100) (required)
     * @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 filtersResult Filter query parameters, support field result,it should be a value as follows: 0: successful; 1: failed,example:0 (optional)
     * @param filtersLevel Filter query parameters, support field level,it should be a value as follows: Error; Warning; Information, example:Error (optional)
     * @param filtersAuditTypes Filter query parameters, support field auditTypes, for the values of auditLog type, refer to section 5.2.2 of the Open API Access Guide, example:Log,Cloud Access,User Interface. (optional)
     * @param filtersTimes Filter query parameters, support field times, example:[{\&quot;timeStart\&quot;:1678060800000,\&quot;timeEnd\&quot;:1678665599999}](UrlEncode:%5B%7B%22timeStart%22%3A1678060800000%2C%22timeEnd%22%3A1678665599999%7D%5D).If this parameter is not specified (not included or empty array), the interface will query data within the default time period: [{\&quot;timeStart\&quot;:  Current timestamp minus milliseconds of 7 days,\&quot;timeEnd\&quot;: Current timestamp}]. (optional)
     * @param searchKey Fuzzy query parameters, support field content (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get MSP audit log list", nickname = "getAuditLogsForMsp", notes = "Get audit logs in msp audit page.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager View Only", response = OperationResponseGridVoAuditLogOpenApiVo.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoAuditLogOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/audit-logs",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoAuditLogOpenApiVo> getAuditLogsForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@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.(value:10,15,20,30,50,100)", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@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 = "Filter query parameters, support field result,it should be a value as follows: 0: successful; 1: failed,example:0") @Valid @RequestParam(value = "filters.result", required = false) Integer filtersResult,@ApiParam(value = "Filter query parameters, support field level,it should be a value as follows: Error; Warning; Information, example:Error") @Valid @RequestParam(value = "filters.level", required = false) String filtersLevel,@ApiParam(value = "Filter query parameters, support field auditTypes, for the values of auditLog type, refer to section 5.2.2 of the Open API Access Guide, example:Log,Cloud Access,User Interface.") @Valid @RequestParam(value = "filters.auditTypes", required = false) String filtersAuditTypes,@ApiParam(value = "Filter query parameters, support field times, example:[{\"timeStart\":1678060800000,\"timeEnd\":1678665599999}](UrlEncode:%5B%7B%22timeStart%22%3A1678060800000%2C%22timeEnd%22%3A1678665599999%7D%5D).If this parameter is not specified (not included or empty array), the interface will query data within the default time period: [{\"timeStart\":  Current timestamp minus milliseconds of 7 days,\"timeEnd\": Current timestamp}].") @Valid @RequestParam(value = "filters.times", required = false) String filtersTimes,@ApiParam(value = "Fuzzy query parameters, support field content") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);


    /**
     * GET /openapi/v1/msp/{mspId}/log-notification : Get MSP log notification
     * Get msp log notification.This interface has been deprecated.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     * @deprecated
     */
    @ApiOperation(value = "Get MSP log notification", nickname = "getLogSettingForMsp", notes = "Get msp log notification.This interface has been deprecated.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager View Only", response = OperationResponseLogNotificationSettingOpenApiVo.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseLogNotificationSettingOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/log-notification",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * GET /openapi/v1/msp/{mspId}/log-notification-setting : Get MSP log notification
     * Get msp log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get MSP log notification", nickname = "getLogSettingForMspV2", notes = "Get msp log notification.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager View Only", response = OperationResponseLogNotificationSettingOpenApiVo.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseLogNotificationSettingOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/log-notification-setting",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseLogNotificationSettingOpenApiVo> getLogSettingForMspV2(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * PATCH /openapi/v1/msp/{mspId}/audit-notification : Modify MSP audit log notification
     * Modify MSP audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager Modify
     *
     * @param mspId MSP ID (required)
     * @param auditLogNotificationSettingEditOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify MSP audit log notification", nickname = "modifyAuditLogSettingMsp", notes = "Modify MSP audit log notification.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/audit-notification",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyAuditLogSettingMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) AuditLogNotificationSettingEditOpenApiVo auditLogNotificationSettingEditOpenApiVo);


    /**
     * PATCH /openapi/v1/msp/{mspId}/log-notification : Modify MSP log notification
     * Modify MSP log notification.This interface has been deprecated.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager Modify
     *
     * @param mspId MSP ID (required)
     * @param logNotificationSettingEditOpenApiVo  (optional)
     * @return OK (status code 200)
     * @deprecated
     */
    @ApiOperation(value = "Modify MSP log notification", nickname = "modifyLogSettingMsp", notes = "Modify MSP log notification.This interface has been deprecated.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/log-notification",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyLogSettingMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiVo logNotificationSettingEditOpenApiVo);


    /**
     * PATCH /openapi/v1/msp/{mspId}/log-notification-setting : Modify MSP log notification
     * Modify MSP log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager Modify
     *
     * @param mspId MSP ID (required)
     * @param logNotificationSettingEditOpenApiV2Vo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify MSP log notification", nickname = "modifyLogSettingMspV2", notes = "Modify MSP log notification.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/log-notification-setting",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyLogSettingMspV2(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LogNotificationSettingEditOpenApiV2Vo logNotificationSettingEditOpenApiV2Vo);


    /**
     * POST /openapi/v1/msp/{mspId}/reset/log-notification : Reset MSP log notification
     * Reset MSP log notification.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Log Manager Modify
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Reset MSP log notification", nickname = "resetLogSettingMsp", notes = "Reset MSP log notification.<br/><br/>The interface requires one of the permissions: <br/>MSP Log Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Log","Msp Log", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/reset/log-notification",
        produces = "*/*", 
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> resetLogSettingMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);

}
