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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.wfc.omada.api.client.model.OperationResponseGridVoClientHistoryInfo;
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 = "OmadaClientInsight", description = "the OmadaClientInsight API")
@FeignClient(value = "OmadaClientInsightApi",url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaClientInsightApi {

    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/insight/past-connection : Get client past connection list
     * Get client past connection list.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Insight 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 sortsLastSeen 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 filtersTimeStart Filter query parameters, support field time range: start timestamp (ms). (optional)
     * @param filtersTimeEnd Filter query parameters, support field time range: end timestamp (ms). (optional)
     * @param filtersGuest Filter query parameters, support field guest: true/false. (optional)
     * @param searchKey Fuzzy query parameters, support field name,mac,ssid. (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get client past connection list", nickname = "getGridPastConnections", notes = "Get client past connection list.<br/><br/>The interface requires one of the permissions: <br/>Site Insight Manager View Only", response = OperationResponseGridVoClientHistoryInfo.class, tags={ "Omada/Client Insight","Client Insight", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoClientHistoryInfo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/insight/past-connection",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoClientHistoryInfo> getGridPastConnections(@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.lastSeen", required = false) String sortsLastSeen,@ApiParam(value = "Filter query parameters, support field time range: start timestamp (ms).") @Valid @RequestParam(value = "filters.timeStart", required = false) String filtersTimeStart,@ApiParam(value = "Filter query parameters, support field time range: end timestamp (ms).") @Valid @RequestParam(value = "filters.timeEnd", required = false) String filtersTimeEnd,@ApiParam(value = "Filter query parameters, support field guest: true/false.") @Valid @RequestParam(value = "filters.guest", required = false) String filtersGuest,@ApiParam(value = "Fuzzy query parameters, support field name,mac,ssid.") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);

    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/insight/past-connection",
            produces = "*/*",
            method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoClientHistoryInfo> getGridPastConnections(@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,@Valid @RequestParam(value = "sorts.lastSeen", required = false) String sortsLastSeen,@ApiParam(value = "Filter query parameters, support field time range: start timestamp (ms).") @Valid @RequestParam(value = "filters.timeStart", required = false) String filtersTimeStart,@ApiParam(value = "Filter query parameters, support field time range: end timestamp (ms).") @Valid @RequestParam(value = "filters.timeEnd", required = false) String filtersTimeEnd, @ApiParam(value = "Fuzzy query parameters, support field name,mac,ssid.") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);

}
