package org.wfc.omada.api.maintenance;

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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.wfc.omada.api.maintenance.model.ModifyHistoryRetentionOpenApiVo;
import org.wfc.omada.api.maintenance.model.OperationResponseHistoryRetentionOpenApiVo;
import org.wfc.omada.api.maintenance.model.OperationResponseWithoutResult;
import org.wfc.omada.config.FeignConfig;

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

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

    /**
     * GET /openapi/v1/{omadacId}/retention : Get history data retention configuration
     * Get data retention configuration.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Other Setting 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 omadacId Omada ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get history data retention configuration", nickname = "getDataRetention", notes = "Get data retention configuration.<br/><br/>The interface requires one of the permissions: <br/>Global Other Setting 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/History Data Retention","History Data Retention", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseHistoryRetentionOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/retention",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseHistoryRetentionOpenApiVo> getDataRetention();


    /**
     * PATCH /openapi/v1/{omadacId}/retention : Modify history data retention configuration
     * Modify history data retention configuration.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Global Other Setting 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 omadacId Omada ID (required)
     * @param modifyHistoryRetentionOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify history data retention configuration", nickname = "modifyRetention", notes = "Modify history data retention configuration.<br/><br/>The interface requires one of the permissions: <br/>Global Other Setting 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/History Data Retention","History Data Retention", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/retention",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyRetention(@ApiParam(value = ""  )  @Valid @RequestBody(required = false) ModifyHistoryRetentionOpenApiVo modifyHistoryRetentionOpenApiVo);

}
