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.wfc.omada.config.FeignConfig;
import org.wfc.omada.api.msp.model.ModifyHistoryRetentionOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseHistoryRetentionOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseWithoutResult;

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

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

    /**
     * GET /openapi/v1/msp/{mspId}/retention : Get MSP history data retention configuration
     * Get MSP history data retention configuration.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Other Settings View Only&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;-30001  -  Controller is not configured.&lt;br/&gt;-7131  -  Controller ID not exist.
     *
     * @param mspId MSP ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get MSP history data retention configuration", nickname = "getMspDataRetention", notes = "Get MSP history data retention configuration.<br/><br/>The interface requires one of the permissions: <br/>MSP Other Settings View Only<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/>-30001  -  Controller is not configured.<br/>-7131  -  Controller ID not exist.", response = OperationResponseHistoryRetentionOpenApiVo.class, tags={ "Omada/MSP History Data Retention","MSP History Data Retention", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseHistoryRetentionOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/retention",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseHistoryRetentionOpenApiVo> getMspDataRetention(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId);


    /**
     * PATCH /openapi/v1/msp/{mspId}/retention : Modify MSP history data retention configuration
     * Modify MSP history data retention configuration.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Other Settings 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;-30001  -  Controller is not configured.&lt;br/&gt;-30028  -  The system is busy. Please try again later.&lt;br/&gt;-7131  -  Controller ID not exist.
     *
     * @param mspId MSP ID (required)
     * @param modifyHistoryRetentionOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify MSP history data retention configuration", nickname = "modifyMspRetention", notes = "Modify MSP history data retention configuration.<br/><br/>The interface requires one of the permissions: <br/>MSP Other Settings 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/>-30001  -  Controller is not configured.<br/>-30028  -  The system is busy. Please try again later.<br/>-7131  -  Controller ID not exist.", response = OperationResponseWithoutResult.class, tags={ "Omada/MSP History Data Retention","MSP History Data Retention", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/retention",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyMspRetention(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) ModifyHistoryRetentionOpenApiVo modifyHistoryRetentionOpenApiVo);

}
