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.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.OperationResponseGridVoSiteSummaryInfo;
import org.wfc.omada.api.msp.model.SiteTag;

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

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

    /**
     * GET /openapi/v1/msp/{mspId}/sites : Get msp site list
     * Get msp site list&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Site Manager View Only
     *
     * @param mspId MSP 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 searchKey Fuzzy query parameters, support field name (optional)
     * @param filtersTag Filter query parameters, support field tag ID (optional)
     * @param filtersType Filter query parameters, support field site type. 0: basic site; 1: pro site. (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get msp site list", nickname = "getSiteList", notes = "Get msp site list<br/><br/>The interface requires one of the permissions: <br/>MSP Site Manager View Only", response = OperationResponseGridVoSiteSummaryInfo.class, tags={ "Omada/MSP Site","MSP Site", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoSiteSummaryInfo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sites",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoSiteSummaryInfo> getSiteList(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@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 = "Fuzzy query parameters, support field name") @Valid @RequestParam(value = "searchKey", required = false) String searchKey,@ApiParam(value = "Filter query parameters, support field tag ID") @Valid @RequestParam(value = "filters.tag", required = false) String filtersTag,@ApiParam(value = "Filter query parameters, support field site type. 0: basic site; 1: pro site.") @Valid @RequestParam(value = "filters.type", required = false) String filtersType);


    /**
     * GET /openapi/v1/msp/{mspId}/sites/tags : Get msp site tag list
     * Get msp site tag list.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Site Manager View Only
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get msp site tag list", nickname = "getTags", notes = "Get msp site tag list.<br/><br/>The interface requires one of the permissions: <br/>MSP Site Manager View Only", response = SiteTag.class, responseContainer = "List", tags={ "Omada/MSP Site","MSP Site", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = SiteTag.class, responseContainer = "List") })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sites/tags",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<List<SiteTag>> getTags(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);

}
