package org.wfc.omada.api.accesscontrol;

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.api.accesscontrol.model.OperationResponsePortalAccessControlOpenApiVo;
import org.wfc.omada.api.accesscontrol.model.PortalAccessControlOpenApiVo;
import org.wfc.omada.config.FeignConfig;

import javax.validation.Valid;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-03T18:17:10.834815900+08:00[Asia/Shanghai]")

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

    /**
     * GET /openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control : Get access control setting
     * Get access control setting of the site with the given omadacId and siteId.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Settings Manager 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;-33004  -  Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param authorization  (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get access control setting", nickname = "getAccessControl", notes = "Get access control setting of the site with the given omadacId and siteId.<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager 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/>-33004  -  Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.", response = OperationResponsePortalAccessControlOpenApiVo.class, tags={ "Omada/Access Control","Access Control", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponsePortalAccessControlOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponsePortalAccessControlOpenApiVo> getAccessControl(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId);


    /**
     * PATCH /openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control : Modify access control setting
     * Modify access control setting of the site. When modifying, the full configuration parameters should be passed in&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;Site Settings Manager 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;-33004  -  Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
     *
     * @param omadacId Omada ID (required)
     * @param siteId Site ID (required)
     * @param authorization  (optional, default to &quot;Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoyLCJ1c2VyX2tleSI6ImUzNjFmYzQ2LTk5YjMtNDJhZC04MjJmLTM2MjY0OGU3OWY1MyIsInBsYXRmb3JtIjoic3lzdGVtIiwidXNlcm5hbWUiOiJhZG1pbiJ9.5Aup-9z6TzIZgsqqOiILunx-U3KTKeWxkeDWty8f9rnQLsKRJ5yTMkVC4pFLORY2DQl4rANDVYYJrSW_pRnzOw&quot;)
     * @param portalAccessControlOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify access control setting", nickname = "modifyAccessControl", notes = "Modify access control setting of the site. When modifying, the full configuration parameters should be passed in<br/><br/>The interface requires one of the permissions: <br/>Site Settings Manager 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/>-33004  -  Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.", response = OperationResponsePortalAccessControlOpenApiVo.class, tags={ "Omada/Access Control","Access Control", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponsePortalAccessControlOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/${omada.omadac-id}/sites/{siteId}/setting/access-control",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PATCH)
    ResponseEntity<OperationResponsePortalAccessControlOpenApiVo> modifyAccessControl(@ApiParam(value = "Site ID",required=true) @PathVariable("siteId") String siteId,  @Valid @RequestBody(required = false) PortalAccessControlOpenApiVo portalAccessControlOpenApiVo);

}
