package org.wfc.omada.api.sitesetting;

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.sitesetting.model.AttackDefenseSetting;
import org.wfc.omada.api.sitesetting.model.OperationResponseAttackDefenseSetting;
import org.wfc.omada.api.sitesetting.model.OperationResponseWithoutResult;

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

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

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


    /**
     * PATCH /openapi/v1/{omadacId}/sites/{siteId}/attack-defense : Modify attack and defense setting
     * Modify attack and defense setting.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Settings Manager Modify
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param attackDefenseSetting  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify attack and defense setting", nickname = "modifyAttackDefenseSetting", notes = "Modify attack and defense setting.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Attack Defense","Attack Defense", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/attack-defense",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyAttackDefenseSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) AttackDefenseSetting attackDefenseSetting);


    /**
     * PATCH /openapi/v1/{omadacId}/sites/{siteId}/attack-defense/reset : Reset attack and defense setting
     * Reset attack and defense setting.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Settings Manager Modify
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Reset attack and defense setting", nickname = "resetAttackDefenseSetting", notes = "Reset attack and defense setting.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Attack Defense","Attack Defense", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/attack-defense/reset",
        produces = "*/*", 
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> resetAttackDefenseSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);

}
