package org.wfc.omada.api.globalsetting;

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.globalsetting.model.OpenApiWebhookSettingAddVo;
import org.wfc.omada.api.globalsetting.model.OpenApiWebhookSettingEditVo;
import org.wfc.omada.api.globalsetting.model.OpenApiWebhookSettingTestVo;
import org.wfc.omada.api.globalsetting.model.OperationResponseGridVoOpenApiWebhookDispatchLogVo;
import org.wfc.omada.api.globalsetting.model.OperationResponseListWebhookSetting;
import org.wfc.omada.api.globalsetting.model.OperationResponseWithoutResult;

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

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

    /**
     * POST /openapi/v1/{omadacId}/webhook/settings : Create global webhook setting
     * Create global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global 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 omadacId Omada ID (required)
     * @param openApiWebhookSettingAddVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Create global webhook setting", nickname = "createWebhookForGlobal", notes = "Create global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.<br/><br/>The interface requires one of the permissions: <br/>Global 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/Webhook Setting","Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/webhook/settings",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> createWebhookForGlobal(@ApiParam(value = ""  )  @Valid @RequestBody(required = false) OpenApiWebhookSettingAddVo openApiWebhookSettingAddVo);


    /**
     * DELETE /openapi/v1/{omadacId}/webhook/settings/{webhookId} : Delete global webhook setting
     * Delete global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global 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 omadacId Omada ID (required)
     * @param webhookId webhook ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Delete global webhook setting", nickname = "deleteWebhookForGlobal", notes = "Delete global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.<br/><br/>The interface requires one of the permissions: <br/>Global 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/Webhook Setting","Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/webhook/settings/{webhookId}",
        produces = "*/*", 
        method = RequestMethod.DELETE)
    ResponseEntity<OperationResponseWithoutResult> deleteWebhookForGlobal(@ApiParam(value = "webhook ID",required=true) @PathVariable("webhookId") String webhookId);


    /**
     * GET /openapi/v1/{omadacId}/webhook/settings : Get global webhook setting list.
     * Get all global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Webhook Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get global webhook setting list.", nickname = "getWebhookForGlobal", notes = "Get all global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.<br/><br/>The interface requires one of the permissions: <br/>Global Webhook Manager View Only", response = OperationResponseListWebhookSetting.class, tags={ "Omada/Webhook Setting","Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseListWebhookSetting.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/webhook/settings",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseListWebhookSetting> getWebhookForGlobal(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);


    /**
     * GET /openapi/v1/{omadacId}/webhook/settings/dispatch-logs : Get global webhook dispatch log list
     * Get global webhook dispatch log list.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Webhook Manager View Only
     *
     * @param omadacId Omada 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 global webhook dispatch log list", nickname = "getWebhookLogsForGlobal", notes = "Get global webhook dispatch log list.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.<br/><br/>The interface requires one of the permissions: <br/>Global Webhook Manager View Only", response = OperationResponseGridVoOpenApiWebhookDispatchLogVo.class, tags={ "Omada/Webhook Setting","Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoOpenApiWebhookDispatchLogVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/webhook/settings/dispatch-logs",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoOpenApiWebhookDispatchLogVo> getWebhookLogsForGlobal(@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/{omadacId}/webhook/settings/{webhookId} : Modify global webhook setting
     * Modify global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global 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 omadacId Omada ID (required)
     * @param webhookId webhook ID (required)
     * @param openApiWebhookSettingEditVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify global webhook setting", nickname = "modifyWebhookForGlobal", notes = "Modify global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.<br/><br/>The interface requires one of the permissions: <br/>Global 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/Webhook Setting","Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/webhook/settings/{webhookId}",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyWebhookForGlobal(@ApiParam(value = "webhook ID",required=true) @PathVariable("webhookId") String webhookId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) OpenApiWebhookSettingEditVo openApiWebhookSettingEditVo);


    /**
     * POST /openapi/v1/{omadacId}/webhook/settings/{webhookId} : Test global webhook setting
     * Test global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global 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 omadacId Omada ID (required)
     * @param webhookId webhook ID (required)
     * @param openApiWebhookSettingTestVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Test global webhook setting", nickname = "testWebhookForGlobal", notes = "Test global webhook setting.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.The template of webhook message is display at Open API Access Guide#5.3.1 Webhook Message Template.<br/><br/>The interface requires one of the permissions: <br/>Global 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/Webhook Setting","Webhook Setting", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/webhook/settings/{webhookId}",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> testWebhookForGlobal(@ApiParam(value = "webhook ID",required=true) @PathVariable("webhookId") String webhookId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) OpenApiWebhookSettingTestVo openApiWebhookSettingTestVo);

}
