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.OpenApiWebhookSettingAddVo;
import org.wfc.omada.api.msp.model.OpenApiWebhookSettingEditVo;
import org.wfc.omada.api.msp.model.OpenApiWebhookSettingTestVo;
import org.wfc.omada.api.msp.model.OperationResponseGridVoOpenApiWebhookDispatchLogVo;
import org.wfc.omada.api.msp.model.OperationResponseListWebhookSetting;
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 = "OmadaMspWebhookSetting", description = "the OmadaMspWebhookSetting API")
@FeignClient(name="OmadaMspWebhookSettingApi", url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaMspWebhookSettingApi {

    /**
     * POST /openapi/v1/msp/{mspId}/webhook/settings : Create MSP webhook setting
     * Create MSP webhook setting.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 Webhook 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;-44200  -  The number of webhooks has reached the limit.&lt;br/&gt;-44201  -  This webhook name already exists.&lt;br/&gt;-44203  -  Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.
     *
     * @param mspId MSP ID (required)
     * @param openApiWebhookSettingAddVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Create MSP webhook setting", nickname = "createWebhookForMsp", notes = "Create MSP webhook setting.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 Webhook 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/>-44200  -  The number of webhooks has reached the limit.<br/>-44201  -  This webhook name already exists.<br/>-44203  -  Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Webhook Setting","Msp Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/webhook/settings",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> createWebhookForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) OpenApiWebhookSettingAddVo openApiWebhookSettingAddVo);


    /**
     * DELETE /openapi/v1/msp/{mspId}/webhook/settings/{webhookId} : Delete MSP webhook setting
     * Delete MSP webhook setting.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 Webhook 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;-44202  -  This webhook entry does not exist.
     *
     * @param mspId MSP ID (required)
     * @param webhookId Webhook ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Delete MSP webhook setting", nickname = "deleteWebhookForMsp", notes = "Delete MSP webhook setting.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 Webhook 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/>-44202  -  This webhook entry does not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Webhook Setting","Msp Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/webhook/settings/{webhookId}",
        produces = "*/*", 
        method = RequestMethod.DELETE)
    ResponseEntity<OperationResponseWithoutResult> deleteWebhookForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "Webhook ID",required=true) @PathVariable("webhookId") String webhookId);


    /**
     * GET /openapi/v1/msp/{mspId}/webhook/settings : Get MSP webhook setting list
     * Get all MSP webhook setting.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 Webhook Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get MSP webhook setting list", nickname = "getWebhookForMsp", notes = "Get all MSP webhook setting.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 Webhook Manager View Only", response = OperationResponseListWebhookSetting.class, tags={ "Omada/Msp Webhook Setting","Msp Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseListWebhookSetting.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/webhook/settings",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseListWebhookSetting> getWebhookForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * GET /openapi/v1/msp/{mspId}/webhook/settings/dispatch-logs : Get MSP webhook dispatch log list
     * Get MSP webhook dispatch log list.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 Webhook 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. (required)
     * @param filtersWebhookId Filter query parameters, support field d66aed17ea7238154ba610710d9a2890 (required)
     * @param filtersTimeStart Filter query parameters, support field 1679297710438 (required)
     * @param filtersTimeEnd Filter query parameters, support field 1681889710438 (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get MSP webhook dispatch log list", nickname = "getWebhookLogsForMsp", notes = "Get MSP webhook dispatch log list.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 Webhook Manager View Only", response = OperationResponseGridVoOpenApiWebhookDispatchLogVo.class, tags={ "Omada/Msp Webhook Setting","Msp Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoOpenApiWebhookDispatchLogVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/webhook/settings/dispatch-logs",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoOpenApiWebhookDispatchLogVo> getWebhookLogsForMsp(@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.", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@NotNull @ApiParam(value = "Filter query parameters, support field d66aed17ea7238154ba610710d9a2890", required = true) @Valid @RequestParam(value = "filters.webhookId", required = true) String filtersWebhookId,@NotNull @ApiParam(value = "Filter query parameters, support field 1679297710438", required = true) @Valid @RequestParam(value = "filters.timeStart", required = true) Long filtersTimeStart,@NotNull @ApiParam(value = "Filter query parameters, support field 1681889710438", required = true) @Valid @RequestParam(value = "filters.timeEnd", required = true) Long filtersTimeEnd);


    /**
     * PATCH /openapi/v1/msp/{mspId}/webhook/settings/{webhookId} : Modify MSP webhook setting
     * Modify MSP webhook setting.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 Webhook 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;-44202  -  This webhook entry does not exist.&lt;br/&gt;-44203  -  Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.
     *
     * @param mspId MSP ID (required)
     * @param webhookId Webhook ID (required)
     * @param openApiWebhookSettingEditVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify MSP webhook setting", nickname = "modifyWebhookForMsp", notes = "Modify MSP webhook setting.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 Webhook 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/>-44202  -  This webhook entry does not exist.<br/>-44203  -  Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Webhook Setting","Msp Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/webhook/settings/{webhookId}",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyWebhookForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "Webhook ID",required=true) @PathVariable("webhookId") String webhookId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) OpenApiWebhookSettingEditVo openApiWebhookSettingEditVo);


    /**
     * POST /openapi/v1/msp/{mspId}/webhook/settings/{webhookId} : Test MSP webhook setting
     * Test MSP webhook setting.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 Webhook 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;-44203  -  Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.
     *
     * @param mspId MSP ID (required)
     * @param webhookId Webhook ID (required)
     * @param openApiWebhookSettingTestVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Test MSP webhook setting", nickname = "testWebhookFormsp", notes = "Test MSP webhook setting.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 Webhook 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/>-44203  -  Webhook URL List should contain 1 to 3 URL entries. URL entries cannot be duplicated.", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp Webhook Setting","Msp Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/webhook/settings/{webhookId}",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> testWebhookFormsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "Webhook ID",required=true) @PathVariable("webhookId") String webhookId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) OpenApiWebhookSettingTestVo openApiWebhookSettingTestVo);

}
