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.LicenseAutoActiveOpenApiVo;
import org.wfc.omada.api.globalsetting.model.LicenseAutoRenewOpenApiVo;
import org.wfc.omada.api.globalsetting.model.LicenseBindAvailableNumOpenApiVo;
import org.wfc.omada.api.globalsetting.model.OperationResponseLicenseAutoActiveOpenApiVo;
import org.wfc.omada.api.globalsetting.model.OperationResponseLicenseAutoRenewOpenApiVo;
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 = "OmadaLicense", description = "the OmadaLicense API")
@FeignClient(name="OmadaLicenseApi", url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaLicenseApi {

    /**
     * GET /openapi/v1/{omadacId}/license/auto-active : Get license auto active
     * Get license auto active.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global License Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get license auto active", nickname = "getAutoActive", notes = "Get license auto active.<br/><br/>The interface requires one of the permissions: <br/>Global License Manager View Only", response = OperationResponseLicenseAutoActiveOpenApiVo.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseLicenseAutoActiveOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/license/auto-active",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseLicenseAutoActiveOpenApiVo> getAutoActive(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);


    /**
     * GET /openapi/v1/{omadacId}/license/auto-renew : Get license auto renew
     * Get license auto renew.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global License Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get license auto renew", nickname = "getAutoRenew", notes = "Get license auto renew.<br/><br/>The interface requires one of the permissions: <br/>Global License Manager View Only", response = OperationResponseLicenseAutoRenewOpenApiVo.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseLicenseAutoRenewOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/license/auto-renew",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseLicenseAutoRenewOpenApiVo> getAutoRenew(@ApiParam(value = "Omada ID",required=true) @PathVariable("omadacId") String omadacId);


    /**
     * GET /openapi/v1/{omadacId}/licenses/available-license : Get available license num
     * Get available license number of the specified device category&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global License Manager View Only&lt;br/&gt;Site Bind/Unbind License Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param category It should be a value as follows: basic; ap; l2Switch; l3Switch; gateway (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get available license num", nickname = "getLicenseNumByCategory", notes = "Get available license number of the specified device category<br/><br/>The interface requires one of the permissions: <br/>Global License Manager View Only<br/>Site Bind/Unbind License Manager View Only", response = LicenseBindAvailableNumOpenApiVo.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = LicenseBindAvailableNumOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/licenses/available-license",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<LicenseBindAvailableNumOpenApiVo> getLicenseNumByCategory(@NotNull @ApiParam(value = "It should be a value as follows: basic; ap; l2Switch; l3Switch; gateway", required = true) @Valid @RequestParam(value = "category", required = true) String category);


    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/license/auto-renew : Get site license auto renew
     * Get site license auto renew.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global License Manager View Only
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get site license auto renew", nickname = "getSiteAutoRenew", notes = "Get site license auto renew.<br/><br/>The interface requires one of the permissions: <br/>Global License Manager View Only", response = OperationResponseLicenseAutoRenewOpenApiVo.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseLicenseAutoRenewOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/license/auto-renew",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseLicenseAutoRenewOpenApiVo> getSiteAutoRenew(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);


    /**
     * POST /openapi/v1/{omadacId}/license/auto-active : Modify license auto active
     * Modify license auto active.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Bind/Unbind License Manager Modify
     *
     * @param omadacId Omada ID (required)
     * @param licenseAutoActiveOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify license auto active", nickname = "modifyAutoActive", notes = "Modify license auto active.<br/><br/>The interface requires one of the permissions: <br/>Site Bind/Unbind License Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/license/auto-active",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> modifyAutoActive(@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LicenseAutoActiveOpenApiVo licenseAutoActiveOpenApiVo);


    /**
     * POST /openapi/v1/{omadacId}/license/auto-renew : Modify license auto renew
     * Modify license auto renew.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Bind/Unbind License Manager Modify
     *
     * @param omadacId Omada ID (required)
     * @param licenseAutoRenewOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify license auto renew", nickname = "modifyAutoRenew", notes = "Modify license auto renew.<br/><br/>The interface requires one of the permissions: <br/>Site Bind/Unbind License Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/license/auto-renew",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> modifyAutoRenew(@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LicenseAutoRenewOpenApiVo licenseAutoRenewOpenApiVo);


    /**
     * POST /openapi/v1/{omadacId}/sites/{siteId}/license/auto-renew : Modify site license auto renew
     * Modify site license auto renew.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Bind/Unbind License Manager Modify
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param licenseAutoRenewOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify site license auto renew", nickname = "modifySiteAutoRenew", notes = "Modify site license auto renew.<br/><br/>The interface requires one of the permissions: <br/>Site Bind/Unbind License Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/License","License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/license/auto-renew",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> modifySiteAutoRenew(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LicenseAutoRenewOpenApiVo licenseAutoRenewOpenApiVo);

}
