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.config.FeignConfig;
import org.wfc.omada.api.hotspot.model.CreateFormAuthOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseCreatedResIdOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseFormAuthOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseFormAuthResultOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseGridVoFormAuthResultOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseListFormAuthOpenApiVo;
import org.wfc.omada.api.hotspot.model.OperationResponseWithoutResult;

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 = "OmadaFormAuthData", description = "the OmadaFormAuthData API")
@FeignClient(name="OmadaFormAuthDataApi", url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaFormAuthDataApi {

    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/surveys : Create a new authentication survey
     * Create a authentication survey in a site with the given params.&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;-33000  -  This site does not exist.&lt;br/&gt;-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.&lt;br/&gt;-42050  -  The number of created surveys is up to the limit.&lt;br/&gt;-42051  -  The survey name already exists.&lt;br/&gt;-42052  -  The number of questions in this survey is up to the limit.&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.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param createFormAuthOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Create a new authentication survey", nickname = "createAuthForm", notes = "Create a authentication survey in a site with the given params.<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/>-33000  -  This site does not exist.<br/>-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.<br/>-42050  -  The number of created surveys is up to the limit.<br/>-42051  -  The survey name already exists.<br/>-42052  -  The number of questions in this survey is up to the limit.<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.", response = OperationResponseCreatedResIdOpenApiVo.class, tags={ "Omada/Form Auth Data","Form Auth Data", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseCreatedResIdOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/surveys",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseCreatedResIdOpenApiVo> createAuthForm(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) CreateFormAuthOpenApiVo createFormAuthOpenApiVo);


    /**
     * DELETE /openapi/v1/{omadacId}/sites/{siteId}/hotspot/surveys/{surveyId} : Delete an existing authentication survey
     * Delete an existing authentication survey by the given omadacId, siteId, surveyId.&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;-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.&lt;br/&gt;-42054  -  The survey does not exist.&lt;br/&gt;-42057  -  The survey is in use, and you cannot edit or delete it.&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.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param surveyId Auth survey ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Delete an existing authentication survey", nickname = "deleteAuthForm", notes = "Delete an existing authentication survey by the given omadacId, siteId, surveyId.<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/>-33004  -  Operation failed because other operations are being performed on this site. Please wait and try again later.<br/>-42054  -  The survey does not exist.<br/>-42057  -  The survey is in use, and you cannot edit or delete it.<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.", response = OperationResponseWithoutResult.class, tags={ "Omada/Form Auth Data","Form Auth Data", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/surveys/{surveyId}",
        produces = "*/*", 
        method = RequestMethod.DELETE)
    ResponseEntity<OperationResponseWithoutResult> deleteAuthForm(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Auth survey ID",required=true) @PathVariable("surveyId") String surveyId);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/surveys/{surveyId} : Get an authentication survey for given surveyId
     * Get an authentication survey by the given omadacId, siteId, surveyId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Hotspot Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param surveyId Auth survey ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get an authentication survey for given surveyId", nickname = "getAuthForm", notes = "Get an authentication survey by the given omadacId, siteId, surveyId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot Manager View Only", response = OperationResponseFormAuthOpenApiVo.class, tags={ "Omada/Form Auth Data","Form Auth Data", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseFormAuthOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/surveys/{surveyId}",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseFormAuthOpenApiVo> getAuthForm(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Auth survey ID",required=true) @PathVariable("surveyId") String surveyId);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/surveys : Get authentication survey list
     * Get authentication survey list in a site by 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
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (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 sortsCreateTime 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 sortsAnswerNum 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)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get authentication survey list", nickname = "getAuthForms", notes = "Get authentication survey list in a site by the given omadacId, siteId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot Manager View Only", response = OperationResponseListFormAuthOpenApiVo.class, tags={ "Omada/Form Auth Data","Form Auth Data", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseListFormAuthOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/surveys",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseListFormAuthOpenApiVo> getAuthForms(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@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.createTime", required = false) String sortsCreateTime,@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.answerNum", required = false) String sortsAnswerNum);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/surveys/auth-results/{surveyResultId} : Get an authentication survey result for given surveyResultId
     * Get an authentication survey&#39;s result in a site with given omadacId, siteId, surveyResultId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Hotspot Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param surveyResultId Survey authentication result ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get an authentication survey result for given surveyResultId", nickname = "getFormAuthResult", notes = "Get an authentication survey's result in a site with given omadacId, siteId, surveyResultId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot Manager View Only", response = OperationResponseFormAuthResultOpenApiVo.class, tags={ "Omada/Form Auth Data","Form Auth Data", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseFormAuthResultOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/surveys/auth-results/{surveyResultId}",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseFormAuthResultOpenApiVo> getFormAuthResult(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Survey authentication result ID",required=true) @PathVariable("surveyResultId") String surveyResultId);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/surveys/{surveyId}/auth-results : Get authentication result lists for given survey
     * Get an authentication survey&#39;s result list with given omadacId, siteId, surveyId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Hotspot Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param surveyId Auth survey 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 sortsFormAuth 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)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get authentication result lists for given survey", nickname = "getFormAuthResults", notes = "Get an authentication survey's result list with given omadacId, siteId, surveyId.<br/><br/>The interface requires one of the permissions: <br/>Site Hotspot Manager View Only", response = OperationResponseGridVoFormAuthResultOpenApiVo.class, tags={ "Omada/Form Auth Data","Form Auth Data", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoFormAuthResultOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/hotspot/surveys/{surveyId}/auth-results",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoFormAuthResultOpenApiVo> getFormAuthResults(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = "Auth survey ID",required=true) @PathVariable("surveyId") String surveyId,@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.formAuth", required = false) String sortsFormAuth);

}
