package org.wfc.omada.api.client;

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.api.client.model.ClientLockToApSetting1;
import org.wfc.omada.api.client.model.ClientNameSetting;
import org.wfc.omada.api.client.model.ClientRateLimitSetting;
import org.wfc.omada.api.client.model.OperationResponseClientDetail;
import org.wfc.omada.api.client.model.OperationResponseClientGridVoClientInfo;
import org.wfc.omada.api.client.model.OperationResponseWithoutResult;
import org.wfc.omada.config.FeignConfig;

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

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

    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac}/block : Block the client
     * Block the client.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients Manager Modify&lt;br/&gt;Site Insight 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;-41002  -  This client does not exist.&lt;br/&gt;-41003  -  The number of clients to be blocked has reached the limit.&lt;br/&gt;-41023  -  Clients locked to AP cannot be blocked.&lt;br/&gt;-41024  -  This device is installed with the controller and cannot be blocked.&lt;br/&gt;-41026  -  The Easy Managed Switch cannot block clients.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Block the client", nickname = "blockClient", notes = "Block the client.<br/><br/>The interface requires one of the permissions: <br/>Site Clients Manager Modify<br/>Site Insight 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/>-41002  -  This client does not exist.<br/>-41003  -  The number of clients to be blocked has reached the limit.<br/>-41023  -  Clients locked to AP cannot be blocked.<br/>-41024  -  This device is installed with the controller and cannot be blocked.<br/>-41026  -  The Easy Managed Switch cannot block clients.", response = OperationResponseWithoutResult.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}/block",
        produces = "*/*", 
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> blockClient(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac} : Get client info
     * Get client info.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients Manager View Only&lt;br/&gt;Site Device Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get client info", nickname = "getClientDetail", notes = "Get client info.<br/><br/>The interface requires one of the permissions: <br/>Site Clients Manager View Only<br/>Site Device Manager View Only", response = OperationResponseClientDetail.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseClientDetail.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseClientDetail> getClientDetail(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/clients : Get client list
     * Get all clients.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients Manager View Only&lt;br/&gt;Site Device Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site 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 sortsName 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 sortsMac 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 sortsIp 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 filtersWireless Filter query parameters, support field wireless: true/false. (optional)
     * @param filtersRadioId Filter query parameters, support field radioId: 0: 2G, 1: 5G1, 2: 5G2, 3: 6G (optional)
     * @param filtersApMac Filter query parameters, support field ap mac (optional)
     * @param filtersSwitchMac Filter query parameters, support field switch mac (optional)
     * @param filtersGatewayMac Filter query parameters, support field gateway mac (optional)
     * @param searchKey Fuzzy query parameters, support field clientName,clientMac,ip,channel,ssid,apName,apMac,switchMac,switchName,gatewayMac,gatewayName. (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get client list", nickname = "getGridActiveClients", notes = "Get all clients.<br/><br/>The interface requires one of the permissions: <br/>Site Clients Manager View Only<br/>Site Device Manager View Only", response = OperationResponseClientGridVoClientInfo.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseClientGridVoClientInfo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseClientGridVoClientInfo> getGridActiveClients(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@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,@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.name", required = false) String sortsName,@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.mac", required = false) String sortsMac,@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.ip", required = false) String sortsIp,@ApiParam(value = "Filter query parameters, support field wireless: true/false.") @Valid @RequestParam(value = "filters.wireless", required = false) String filtersWireless,@ApiParam(value = "Filter query parameters, support field radioId: 0: 2G, 1: 5G1, 2: 5G2, 3: 6G") @Valid @RequestParam(value = "filters.radioId", required = false) String filtersRadioId,@ApiParam(value = "Filter query parameters, support field ap mac") @Valid @RequestParam(value = "filters.apMac", required = false) String filtersApMac,@ApiParam(value = "Filter query parameters, support field switch mac") @Valid @RequestParam(value = "filters.switchMac", required = false) String filtersSwitchMac,@ApiParam(value = "Filter query parameters, support field gateway mac") @Valid @RequestParam(value = "filters.gatewayMac", required = false) String filtersGatewayMac,@ApiParam(value = "Fuzzy query parameters, support field clientName,clientMac,ip,channel,ssid,apName,apMac,switchMac,switchName,gatewayMac,gatewayName.") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);

    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients",
            produces = "*/*",
            method = RequestMethod.GET)
    ResponseEntity<OperationResponseClientGridVoClientInfo> getGridActiveClients(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@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);

    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients",
            produces = "*/*",
            method = RequestMethod.GET)
    ResponseEntity<OperationResponseClientGridVoClientInfo> getGridActiveClients(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@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, @ApiParam(value = "Fuzzy query parameters, support field clientName,clientMac,ip,channel,ssid,apName,apMac,switchMac,switchName,gatewayMac,gatewayName.") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);


    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac}/reconnect : Reconnect the client
     * Reconnect the client.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients 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;-41011  -  This client does not exist.&lt;br/&gt;-41025  -  Unable to reconnect wired client.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Reconnect the client", nickname = "reconnectClient", notes = "Reconnect the client.<br/><br/>The interface requires one of the permissions: <br/>Site Clients 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/>-41011  -  This client does not exist.<br/>-41025  -  Unable to reconnect wired client.", response = OperationResponseWithoutResult.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}/reconnect",
        produces = "*/*", 
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> reconnectClient(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac);


    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac}/unblock : Unblock the client
     * Unblock the client.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients Manager Modify&lt;br/&gt;Site Insight 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;-41004  -  This client does not exist.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Unblock the client", nickname = "unblockClient", notes = "Unblock the client.<br/><br/>The interface requires one of the permissions: <br/>Site Clients Manager Modify<br/>Site Insight 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/>-41004  -  This client does not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}/unblock",
        produces = "*/*", 
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> unblockClient(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac);


    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac}/lock-to-ap : Lock the given client to aps
     * Lock the given client to aps.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients 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;-41011  -  This client does not exist.&lt;br/&gt;-41020  -  Only wireless clients support Lock to AP.&lt;br/&gt;-41021  -  The number of Lock to AP entries has reached the upper limit.&lt;br/&gt;-41022  -  Blocked clients cannot be locked to AP.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @param clientLockToApSetting1  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Lock the given client to aps", nickname = "updateClientLockToApSetting", notes = "Lock the given client to aps.<br/><br/>The interface requires one of the permissions: <br/>Site Clients 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/>-41011  -  This client does not exist.<br/>-41020  -  Only wireless clients support Lock to AP.<br/>-41021  -  The number of Lock to AP entries has reached the upper limit.<br/>-41022  -  Blocked clients cannot be locked to AP.", response = OperationResponseWithoutResult.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}/lock-to-ap",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> updateClientLockToApSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) ClientLockToApSetting1 clientLockToApSetting1);


    /**
     * PATCH /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac}/name : Set name for given client
     * Set name for given client.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients 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;-41011  -  This client does not exist.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @param clientNameSetting  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Set name for given client", nickname = "updateClientName", notes = "Set name for given client.<br/><br/>The interface requires one of the permissions: <br/>Site Clients 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/>-41011  -  This client does not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}/name",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> updateClientName(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) ClientNameSetting clientNameSetting);


    /**
     * PATCH /openapi/v1/{omadacId}/sites/{siteId}/clients/{clientMac}/ratelimit : Set ratelimit setting for given client
     * Set ratelimit setting for given client.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients 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;-33732  -  The Rate Limit profile does not exist.&lt;br/&gt;-41008  -  The number of clients to be configured with Rate Limit has reached the limit.&lt;br/&gt;-41011  -  This client does not exist.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @param clientRateLimitSetting  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Set ratelimit setting for given client", nickname = "updateClientRateLimitSetting", notes = "Set ratelimit setting for given client.<br/><br/>The interface requires one of the permissions: <br/>Site Clients 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/>-33732  -  The Rate Limit profile does not exist.<br/>-41008  -  The number of clients to be configured with Rate Limit has reached the limit.<br/>-41011  -  This client does not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Client","Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/clients/{clientMac}/ratelimit",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> updateClientRateLimitSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC",required=true) @PathVariable("clientMac") String clientMac,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) ClientRateLimitSetting clientRateLimitSetting);

}
