/*
 * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com).
 *
 * WSO2 LLC. licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.wso2.carbon.identity.rest.api.user.association.v1;

import org.wso2.carbon.identity.rest.api.user.association.v1.dto.*;
import org.wso2.carbon.identity.rest.api.user.association.v1.FederatedAssociationsApiService;
import org.wso2.carbon.identity.rest.api.user.association.v1.factories.FederatedAssociationsApiServiceFactory;

import io.swagger.annotations.ApiParam;

import org.wso2.carbon.identity.rest.api.user.association.v1.dto.ErrorDTO;
import org.wso2.carbon.identity.rest.api.user.association.v1.dto.BulkFederatedAssociationResponseDTO;
import org.wso2.carbon.identity.rest.api.user.association.v1.dto.BulkFederatedAssociationRequestDTO;

import java.util.List;

import java.io.InputStream;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;

import javax.validation.Valid;
import javax.ws.rs.core.Response;
import javax.ws.rs.*;

@Path("/federated-associations")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@io.swagger.annotations.Api(value = "/federated-associations", description = "the federated-associations API")
public class FederatedAssociationsApi  {

    private final FederatedAssociationsApiService delegate;

    public FederatedAssociationsApi() {

        this.delegate = FederatedAssociationsApiServiceFactory.getFederatedAssociationsApi();
    }

    @Valid
    @POST
    @Path("/bulk")
    @Consumes({ "application/json" })
    @Produces({ "application/json" })
    @io.swagger.annotations.ApiOperation(value = "Create and Delete users associations in bulk",
            notes = "This API is used to create and delete users association in bulk. <br>\nMaximum number of supported operations in a single request is 1000 by default.\nIt can be configured using a server level configuration.\n    <b>Scope required:</b>\n        * internal_user_fed_association_bulk\n",
            response = BulkFederatedAssociationResponseDTO.class)
    @io.swagger.annotations.ApiResponses(value = { 
        @io.swagger.annotations.ApiResponse(code = 200, message = "Success"),

        @io.swagger.annotations.ApiResponse(code = 400, message = "Bad Request"),
        
        @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"),
        
        @io.swagger.annotations.ApiResponse(code = 403, message = "Forbidden"),
        
        @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") })

    public Response federatedAssociationsBulkPost(@ApiParam(value = ""  ) @Valid BulkFederatedAssociationRequestDTO body) {

        return delegate.federatedAssociationsBulkPost(body);
    }

}
