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.FirewallSetting;
import org.wfc.omada.api.sitesetting.model.OperationResponseFirewallSetting;
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 = "OmadaFirewall", description = "the OmadaFirewall API")
@FeignClient(name="OmadaFirewallApi", url = "${omada.omada-url}", configuration = FeignConfig.class)
public interface OmadaFirewallApi {

    /**
     * GET /openapi/v1/{omadacId}/sites/{siteId}/firewall : Get firewall setting
     * Get firewall 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 firewall setting", nickname = "getFirewallSetting", notes = "Get firewall setting.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager View Only", response = OperationResponseFirewallSetting.class, tags={ "Omada/Firewall","Firewall", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseFirewallSetting.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/firewall",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseFirewallSetting> getFirewallSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);


    /**
     * PATCH /openapi/v1/{omadacId}/sites/{siteId}/firewall : Modify firewall setting
     * Modify firewall 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 firewallSetting  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify firewall setting", nickname = "modifyFirewallSetting", notes = "Modify firewall setting.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Firewall","Firewall", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/firewall",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> modifyFirewallSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) FirewallSetting firewallSetting);


    /**
     * PATCH /openapi/v1/{omadacId}/sites/{siteId}/firewall/reset : Reset firewall setting
     * Reset firewall 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 firewall setting", nickname = "resetFirewallSetting", notes = "Reset firewall setting.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager Modify", response = OperationResponseWithoutResult.class, tags={ "Omada/Firewall","Firewall", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/firewall/reset",
        produces = "*/*", 
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponseWithoutResult> resetFirewallSetting(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);

}
