addRoomsToContainer

abstract suspend fun addRoomsToContainer(containerId: String, roomIds: List<String>): RainbowResult<Pair<Container, List<InvalidRoom>?>>

Adds multiple rooms identified by the specified list of room IDs to the container identified by the given container ID.

This method attempts to add each room specified in the roomIds list to the container associated with the containerId. If all rooms are added successfully, the method returns a RainbowResult indicating complete success. In the case of partial success (where some rooms are added and others are not), the RainbowResult will indicate success, but the result will include a list of InvalidRoom objects detailing any rooms that could not be added. If all additions fail, the RainbowResult will indicate failure.

Return

A RainbowResult containing a pair of the updated Container and a list of InvalidRoom for any rooms that could not be added. The RainbowResult.isSuccess will be true for both complete and partial success; in the case of partial success, the list will contain the invalid rooms that were not added.

Parameters

containerId

The unique identifier of the container to which the rooms will be added.

roomIds

A list of unique IDs for the rooms to add to the container.