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.springframework.web.bind.annotation.RequestParam;
import org.wfc.omada.config.FeignConfig;
import org.wfc.omada.api.msp.model.IdpMetadataOpenApiVo;
import org.wfc.omada.api.msp.model.MspExternalUserGroupOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseGridVoIdpMetadataDetailOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseGridVoMspExternalUserDetailOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseGridVoMspExternalUserGroupDetailOpenApiVo;
import org.wfc.omada.api.msp.model.OperationResponseResponseIdVo;
import org.wfc.omada.api.msp.model.OperationResponseWithoutResult;

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

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

    /**
     * POST /openapi/v1/msp/{mspId}/sso/external-user-groups : Create new msp external user group
     * Create new msp external user group. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml Roles 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;-30102  -  This role does not exist.&lt;br/&gt;-30172  -  The SAML role name already exists.&lt;br/&gt;-30179  -  The SAML roles number has reached the upper limit.&lt;br/&gt;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param mspExternalUserGroupOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Create new msp external user group", nickname = "createExternalUserGroup", notes = "Create new msp external user group. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml Roles 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/>-30102  -  This role does not exist.<br/>-30172  -  The SAML role name already exists.<br/>-30179  -  The SAML roles number has reached the upper limit.<br/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseResponseIdVo.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseResponseIdVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/external-user-groups",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseResponseIdVo> createExternalUserGroup(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) MspExternalUserGroupOpenApiVo mspExternalUserGroupOpenApiVo);


    /**
     * POST /openapi/v1/msp/{mspId}/sso/saml-idps : Create new msp idp
     * Create new msp idp. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml SSO 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;-30170  -  The SAML sso metadata entityId already exists.&lt;br/&gt;-30171  -  The SAML sso metadata name already exist.&lt;br/&gt;-30178  -  The SAML sso number has reached the upper limit.&lt;br/&gt;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param idpMetadataOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Create new msp idp", nickname = "createIdpMetadata", notes = "Create new msp idp. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml SSO 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/>-30170  -  The SAML sso metadata entityId already exists.<br/>-30171  -  The SAML sso metadata name already exist.<br/>-30178  -  The SAML sso number has reached the upper limit.<br/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseResponseIdVo.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseResponseIdVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/saml-idps",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.POST)
    ResponseEntity<OperationResponseResponseIdVo> createIdpMetadata(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) IdpMetadataOpenApiVo idpMetadataOpenApiVo);


    /**
     * DELETE /openapi/v1/msp/{mspId}/sso/external-user-groups/{externalUserGroupId} : Delete an existing msp external user group
     * Delete an existing msp external user group. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml Roles 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;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param externalUserGroupId External user group ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Delete an existing msp external user group", nickname = "deleteExternalUserGroup", notes = "Delete an existing msp external user group. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml Roles 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/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseWithoutResult.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/external-user-groups/{externalUserGroupId}",
        produces = "*/*", 
        method = RequestMethod.DELETE)
    ResponseEntity<OperationResponseWithoutResult> deleteExternalUserGroup(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "External user group ID",required=true) @PathVariable("externalUserGroupId") String externalUserGroupId);


    /**
     * DELETE /openapi/v1/msp/{mspId}/sso/saml-idps/{idpId} : Delete an existing msp idp
     * Delete an existing msp idp. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml SSO 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;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param idpId Idp ID (required)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Delete an existing msp idp", nickname = "deleteIdpMetadata", notes = "Delete an existing msp idp. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml SSO 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/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseWithoutResult.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/saml-idps/{idpId}",
        produces = "*/*", 
        method = RequestMethod.DELETE)
    ResponseEntity<OperationResponseWithoutResult> deleteIdpMetadata(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "Idp ID",required=true) @PathVariable("idpId") String idpId);


    /**
     * GET /openapi/v1/msp/{mspId}/sso/external-user-groups : Get msp external user group list
     * Get msp external user group list. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml Roles 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;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param page Start page number. Start from 1. (required)
     * @param pageSize Number of entries per page. It should be within the range of 1–1000. (required)
     * @param sortsName Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect (optional)
     * @param searchKey Fuzzy query parameters, support field name (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get msp external user group list", nickname = "getExternalUserGroupList", notes = "Get msp external user group list. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml Roles 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/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseGridVoMspExternalUserGroupDetailOpenApiVo.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoMspExternalUserGroupDetailOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/external-user-groups",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoMspExternalUserGroupDetailOpenApiVo> getExternalUserGroupList(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 1–1000.", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@ApiParam(value = "Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect") @Valid @RequestParam(value = "sorts.name", required = false) String sortsName,@ApiParam(value = "Fuzzy query parameters, support field name") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);


    /**
     * GET /openapi/v1/msp/{mspId}/sso/external-users : Get msp external user list
     * Get msp external user list. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml Users 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;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param page Start page number. Start from 1. (required)
     * @param pageSize Number of entries per page. It should be within the range of 1–1000. (required)
     * @param sortsUserName Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect (optional)
     * @param searchKey Fuzzy query parameters, support field userName (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get msp external user list", nickname = "getExternalUserList", notes = "Get msp external user list. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml Users 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/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseGridVoMspExternalUserDetailOpenApiVo.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoMspExternalUserDetailOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/external-users",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoMspExternalUserDetailOpenApiVo> getExternalUserList(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 1–1000.", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@ApiParam(value = "Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect") @Valid @RequestParam(value = "sorts.userName", required = false) String sortsUserName,@ApiParam(value = "Fuzzy query parameters, support field userName") @Valid @RequestParam(value = "searchKey", required = false) String searchKey);


    /**
     * GET /openapi/v1/msp/{mspId}/sso/saml-idps : Get msp idp list
     * Get msp idp list. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml SSO 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;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param page Start page number. Start from 1. (required)
     * @param pageSize Number of entries per page. It should be within the range of 1–1000. (required)
     * @param sortsIdpName Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Get msp idp list", nickname = "getIdpMetadataList", notes = "Get msp idp list. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml SSO 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/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseGridVoIdpMetadataDetailOpenApiVo.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseGridVoIdpMetadataDetailOpenApiVo.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/saml-idps",
        produces = "*/*", 
        method = RequestMethod.GET)
    ResponseEntity<OperationResponseGridVoIdpMetadataDetailOpenApiVo> getIdpMetadataList(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@NotNull @ApiParam(value = "Start page number. Start from 1.", required = true) @Valid @RequestParam(value = "page", required = true) Integer page,@NotNull @ApiParam(value = "Number of entries per page. It should be within the range of 1–1000.", required = true) @Valid @RequestParam(value = "pageSize", required = true) Integer pageSize,@ApiParam(value = "Sort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect") @Valid @RequestParam(value = "sorts.idpName", required = false) String sortsIdpName);


    /**
     * PUT /openapi/v1/msp/{mspId}/sso/external-user-groups/{externalUserGroupId} : Modify an existing msp external user group
     * Modify an existing msp external user group. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml Roles 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;-30102  -  This role does not exist.&lt;br/&gt;-30172  -  The SAML role name already exists.&lt;br/&gt;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param externalUserGroupId External user group ID (required)
     * @param mspExternalUserGroupOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify an existing msp external user group", nickname = "modifyExternalUserGroup", notes = "Modify an existing msp external user group. This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml Roles 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/>-30102  -  This role does not exist.<br/>-30172  -  The SAML role name already exists.<br/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseWithoutResult.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/external-user-groups/{externalUserGroupId}",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PUT)
    ResponseEntity<OperationResponseWithoutResult> modifyExternalUserGroup(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "External user group ID",required=true) @PathVariable("externalUserGroupId") String externalUserGroupId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) MspExternalUserGroupOpenApiVo mspExternalUserGroupOpenApiVo);


    /**
     * PUT /openapi/v1/msp/{mspId}/sso/saml-idps/{idpId} : Modify an existing msp idp
     * Modify an existing msp idp.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.&lt;br/&gt;&lt;br/&gt;The interface requires one of the permissions: &lt;br/&gt;MSP Saml SSO 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;-30170  -  The SAML sso metadata entityId already exists.&lt;br/&gt;-30171  -  The SAML sso metadata name already exist.&lt;br/&gt;-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.
     *
     * @param mspId MSP ID (required)
     * @param idpId Idp ID (required)
     * @param idpMetadataOpenApiVo  (optional)
     * @return OK (status code 200)
     */
    @ApiOperation(value = "Modify an existing msp idp", nickname = "modifyIdpMetadata", notes = "Modify an existing msp idp.This interface applies to the Omada Pro Controller only. Please do not use it for non-Pro controllers.<br/><br/>The interface requires one of the permissions: <br/>MSP Saml SSO 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/>-30170  -  The SAML sso metadata entityId already exists.<br/>-30171  -  The SAML sso metadata name already exist.<br/>-44119  -  This interface applies to the Omada Pro only. Please do not use it for non-Pro controllers or sites.", response = OperationResponseWithoutResult.class, tags={ "Omada/MSP SSO","MSP SSO", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "OK", response = OperationResponseWithoutResult.class) })
    @RequestMapping(value = "/openapi/v1/msp/{mspId}/sso/saml-idps/{idpId}",
        produces = "*/*", 
        consumes = "application/json",
        method = RequestMethod.PUT)
    ResponseEntity<OperationResponseWithoutResult> modifyIdpMetadata(@ApiParam(value = "MSP ID",required=true) @PathVariable("mspId") String mspId,@ApiParam(value = "Idp ID",required=true) @PathVariable("idpId") String idpId,@ApiParam(value = ""  )  @Valid @RequestBody(required = false) IdpMetadataOpenApiVo idpMetadataOpenApiVo);

}
