package org.wfc.omada.api.hotspot;

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.hotspot.model.ExtendOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseGridVoAuthClientOpenApiVo;
import org.wfc.omada.api.hotspot.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-04T11:35:26.787+08:00[Asia/Shanghai]")

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

    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/clients/{clientMac}/auth : Authentication the given client
     * Authentication this client with the given omadacId, siteId, clientMac&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients Manager Modify&lt;br/&gt;Site Hotspot 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;-1005  -  Operation forbidden.&lt;br/&gt;-1200  -  You have been logged out of the controller. This may have been caused by data restore, reboot, session timeout or disabled cloud access. Please try to log in again later.&lt;br/&gt;-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.&lt;br/&gt;-41009  -  Failed to authorize this client.&lt;br/&gt;-41010  -  This client does not exist.&lt;br/&gt;-42003  -  This operator does not exist.&lt;br/&gt;-42006  -  Failed to log in.&lt;br/&gt;-44111  -  The Grant Type is Invalid.&lt;br/&gt;-44112  -  The access token has expired. Please re-initiate the refreshToken process to obtain the access token.&lt;br/&gt;-7131  -  Controller ID not exist.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC, format: AA-BB-CC-DD-EE-FF. (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Authentication the given client", nickname = "authClient", notes = "Authentication this client with the given omadacId, siteId, clientMac<br/><br/>The interface requires one of the permissions: <br/>Site Clients Manager Modify<br/>Site Hotspot 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/>-1005  -  Operation forbidden.<br/>-1200  -  You have been logged out of the controller. This may have been caused by data restore, reboot, session timeout or disabled cloud access. Please try to log in again later.<br/>-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.<br/>-41009  -  Failed to authorize this client.<br/>-41010  -  This client does not exist.<br/>-42003  -  This operator does not exist.<br/>-42006  -  Failed to log in.<br/>-44111  -  The Grant Type is Invalid.<br/>-44112  -  The access token has expired. Please re-initiate the refreshToken process to obtain the access token.<br/>-7131  -  Controller ID not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Authorized Client","Authorized Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/clients/{clientMac}/auth",
        produces = "*/*", 
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> authClient(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Client MAC, format: AA-BB-CC-DD-EE-FF.",required=true) @PathVariable("clientMac") String clientMac);


    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/clients/{clientMac}/unauth : Cancel authentication the given client
     * Cancel the authentication of this client with the given omadacId, siteId, clientMac.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Clients Manager Modify&lt;br/&gt;Site Hotspot 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;-1005  -  Operation forbidden.&lt;br/&gt;-1200  -  You have been logged out of the controller. This may have been caused by data restore, reboot, session timeout or disabled cloud access. Please try to log in again later.&lt;br/&gt;-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.&lt;br/&gt;-41006  -  This client does not exist.&lt;br/&gt;-41017  -  Unauth failed because gateway not existed or disconnected.&lt;br/&gt;-41018  -  Unauth failed, try again when network recover.&lt;br/&gt;-41019  -  The client is being disconnected, please wait...&lt;br/&gt;-44111  -  The Grant Type is Invalid.&lt;br/&gt;-44112  -  The access token has expired. Please re-initiate the refreshToken process to obtain the access token.&lt;br/&gt;-7131  -  Controller ID not exist.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param clientMac Client MAC (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Cancel authentication the given client", nickname = "cancelAuthClient", notes = "Cancel the authentication of this client with the given omadacId, siteId, clientMac.<br/><br/>The interface requires one of the permissions: <br/>Site Clients Manager Modify<br/>Site Hotspot 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/>-1005  -  Operation forbidden.<br/>-1200  -  You have been logged out of the controller. This may have been caused by data restore, reboot, session timeout or disabled cloud access. Please try to log in again later.<br/>-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.<br/>-41006  -  This client does not exist.<br/>-41017  -  Unauth failed because gateway not existed or disconnected.<br/>-41018  -  Unauth failed, try again when network recover.<br/>-41019  -  The client is being disconnected, please wait...<br/>-44111  -  The Grant Type is Invalid.<br/>-44112  -  The access token has expired. Please re-initiate the refreshToken process to obtain the access token.<br/>-7131  -  Controller ID not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Authorized Client","Authorized Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/clients/{clientMac}/unauth",
        produces = "*/*", 
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> cancelAuthClient(@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}/hotspot/authed-records/{id}/period : Modify period for given authed record
     * Extend the valid time of the authentication record with the given omadacId, siteId, authClientId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Hotspot 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;-1005  -  Operation forbidden.&lt;br/&gt;-1200  -  You have been logged out of the controller. This may have been caused by data restore, reboot, session timeout or disabled cloud access. Please try to log in again later.&lt;br/&gt;-44111  -  The Grant Type is Invalid.&lt;br/&gt;-44112  -  The access token has expired. Please re-initiate the refreshToken process to obtain the access token.&lt;br/&gt;-7131  -  Controller ID not exist.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param id Authed record ID (required)
     * @param extendOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify period for given authed record", nickname = "extendHotspotAuthedClient", notes = "Extend the valid time of the authentication record with the given omadacId, siteId, authClientId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot 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/>-1005  -  Operation forbidden.<br/>-1200  -  You have been logged out of the controller. This may have been caused by data restore, reboot, session timeout or disabled cloud access. Please try to log in again later.<br/>-44111  -  The Grant Type is Invalid.<br/>-44112  -  The access token has expired. Please re-initiate the refreshToken process to obtain the access token.<br/>-7131  -  Controller ID not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/Authorized Client","Authorized Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/authed-records/{id}/period",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> extendHotspotAuthedClient(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Authed record ID",required=true) @PathVariable("id") String id,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) ExtendOpenApiVo extendOpenApiVo);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/authed-records : Get authentication record list
     * Get all authentication records in a site with the given omadacId, siteId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Hotspot Manager View Only&lt;br/&gt;Site Insight Manager View Only&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;-1005  -  Operation forbidden.
     *
     * @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 sortsAuthType 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 sortsSsidOrNetwork 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 sortsDownload 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 sortsUpload 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 sortsStatus 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 sortsStart 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 sortsEnd 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 sortsDuration 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 client_mac,client_name,voucher.code,local_user.user_name,form_name,auth_admin,ssid_name,network_name (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get authentication record list", nickname = "getHotspotAuthedClients", notes = "Get all authentication records in a site with the given omadacId, siteId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot Manager View Only<br/>Site Insight Manager View Only<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/>-1005  -  Operation forbidden.", response = OperationResponseGridVoAuthClientOpenApiVo.class, tags={ "Omada/Authorized Client","Authorized Client", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoAuthClientOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/authed-records",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoAuthClientOpenApiVo> getHotspotAuthedClients(@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 = "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.authType", required = false) String sortsAuthType,@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.ssidOrNetwork", required = false) String sortsSsidOrNetwork,@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.download", required = false) String sortsDownload,@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.upload", required = false) String sortsUpload,@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.status", required = false) String sortsStatus,@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.start", required = false) String sortsStart,@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.end", required = false) String sortsEnd,@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.duration", required = false) String sortsDuration,@ApiParam(value = "Fuzzy query parameters, support field client_mac,client_name,voucher.code,local_user.user_name,form_name,auth_admin,ssid_name,network_name") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);

    @ApiOperation(value = "Get authentication record list", nickname = "getHotspotAuthedClients", notes = "Get all authentication records in a site with the given omadacId, siteId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot Manager View Only<br/>Site Insight Manager View Only<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/>-1005  -  Operation forbidden.", response = OperationResponseGridVoAuthClientOpenApiVo.class, tags={ "Omada/Authorized Client","Authorized Client", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoAuthClientOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/authed-records",
            produces = "*/*",
            method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoAuthClientOpenApiVo> getHotspotAuthedClients(@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 client_mac,client_name,voucher.code,local_user.user_name,form_name,auth_admin,ssid_name,network_name") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);

}
