package org.wfc.omada.api.msp;

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.msp.model.GridVoUsedLicenseDetailOpenApiVo;
import org.wfc.omada.api.msp.model.LicenseAssignmentOpenApiVo;
import org.wfc.omada.api.msp.model.LicenseAutoActiveOpenApiVo;
import org.wfc.omada.api.msp.model.LicenseAvailableAssignOpenApiVo;
import org.wfc.omada.api.msp.model.LicenseAvailableRecycleOpenApiVo;
import org.wfc.omada.api.msp.model.LicenseRecycleOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseLicenseAutoActiveOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseWithoutResult;

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

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

    /**
     * GET /openapi/v1/msp/{mspId}/license/assign : Get available assign license info
     * Get available assign license info.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP License Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get available assign license info", nickname = "assignAvailableLicenseForMsp", notes = "Get available assign license info.<br/><br/>The interface requires one of the permissions: <br/>MSP License Manager View Only", response = LicenseAvailableAssignOpenApiVo.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = LicenseAvailableAssignOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/assign",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<LicenseAvailableAssignOpenApiVo> assignAvailableLicenseForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * POST /openapi/v1/msp/{mspId}/license/assign : Assign license to a customer
     * Assign license to a customer.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP License Manager Modify
     *
     * @param mspId MSP ID (required)
     * @param licenseAssignmentOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Assign license to a customer", nickname = "assignmentLicenseForMsp", notes = "Assign license to a customer.<br/><br/>The interface requires one of the permissions: <br/>MSP License Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/assign",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> assignmentLicenseForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LicenseAssignmentOpenApiVo licenseAssignmentOpenApiVo);


    /**
     * GET /openapi/v1/msp/{mspId}/license/recycle : Get available recycle license info
     * Get available recycle license info.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP License Manager View Only
     *
     * @param mspId MSP ID (required)
     * @param customerId Customer ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get available recycle license info", nickname = "getAutoActive", notes = "Get available recycle license info.<br/><br/>The interface requires one of the permissions: <br/>MSP License Manager View Only", response = LicenseAvailableRecycleOpenApiVo.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = LicenseAvailableRecycleOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/recycle",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<LicenseAvailableRecycleOpenApiVo> getAutoActive(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@NotNull @ApiParam(value = "Customer ID", required = true) @Valid @RequestParam(value = "customerId", required = true) String customerId);


    /**
     * GET /openapi/v1/msp/{mspId}/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;MSP License Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get license auto active", nickname = "getAutoActive1", notes = "Get license auto active.<br/><br/>The interface requires one of the permissions: <br/>MSP License Manager View Only", response = OperationResponseLicenseAutoActiveOpenApiVo.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseLicenseAutoActiveOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/auto-active",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseLicenseAutoActiveOpenApiVo> getAutoActive1(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * GET /openapi/v1/msp/{mspId}/license/used : Get used license info list for assign or recycle license
     * Get used license info list for assign or recycle license.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP License Manager View Only
     *
     * @param mspId MSP ID (required)
     * @param customerId Customer ID (required)
     * @param category It should be a value as follows: basic; ap; l2Switch; l3Switch; gateway (required)
     * @param assign Assign license: true; recycle license: false (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)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get used license info list for assign or recycle license", nickname = "getUsedLicenseForMsp", notes = "Get used license info list for assign or recycle license.<br/><br/>The interface requires one of the permissions: <br/>MSP License Manager View Only", response = GridVoUsedLicenseDetailOpenApiVo.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = GridVoUsedLicenseDetailOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/used",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<GridVoUsedLicenseDetailOpenApiVo> getUsedLicenseForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@NotNull @ApiParam(value = "Customer ID", required = true) @Valid @RequestParam(value = "customerId", required = true) String customerId,@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,@NotNull @ApiParam(value = "Assign license: true; recycle license: false", required = true) @Valid @RequestParam(value = "assign", required = true) Boolean assign,@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);


    /**
     * POST /openapi/v1/msp/{mspId}/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;MSP Bind/Unbind License Manager Modify
     *
     * @param mspId MSP 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/>MSP Bind/Unbind License Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/auto-active",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> modifyAutoActive(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LicenseAutoActiveOpenApiVo licenseAutoActiveOpenApiVo);


    /**
     * POST /openapi/v1/msp/{mspId}/license/recycle : Recycle license from a customer
     * Recycle license from a customer.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP License Manager Modify
     *
     * @param mspId MSP ID (required)
     * @param licenseRecycleOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Recycle license from a customer", nickname = "recycleLicenseForMsp", notes = "Recycle license from a customer.<br/><br/>The interface requires one of the permissions: <br/>MSP License Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Msp License","Msp License", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/license/recycle",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseWithoutResult> recycleLicenseForMsp(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) LicenseRecycleOpenApiVo licenseRecycleOpenApiVo);

}
