Class RoomsClient

java.lang.Object
com.azure.communication.rooms.RoomsClient

public final class RoomsClient extends Object
Client for rooms operations with Azure Communication Rooms Service
  • Method Details

    • createRoom

      public CommunicationRoom createRoom(OffsetDateTime validFrom, OffsetDateTime validUntil, RoomJoinPolicy roomJoinPolicy, List<RoomParticipant> participants)
      Create a new room.
      Parameters:
      validFrom - the validFrom value to set.
      validUntil - the validUntil value to set.
      roomJoinPolicy - the roomJoinPolicy value to set.
      participants - the participants value to set.
      Returns:
      response for a successful create room request.
    • createRoomWithResponse

      public com.azure.core.http.rest.Response<CommunicationRoom> createRoomWithResponse(OffsetDateTime validFrom, OffsetDateTime validUntil, RoomJoinPolicy roomJoinPolicy, List<RoomParticipant> participants, com.azure.core.util.Context context)
      Create a new Room with response.
      Parameters:
      validFrom - the validFrom value to set.
      validUntil - the validUntil value to set.
      roomJoinPolicy - the roomJoinPolicy value to set.
      participants - the participants value to set.
      context - The context of key value pairs for http request.
      Returns:
      response for a successful create room request.
    • updateRoom

      public CommunicationRoom updateRoom(String roomId, OffsetDateTime validFrom, OffsetDateTime validUntil, RoomJoinPolicy roomJoinPolicy, List<RoomParticipant> participants)
      Update an existing Room.
      Parameters:
      roomId - The room id.
      validFrom - the validFrom value to set.
      validUntil - the validUntil value to set.
      roomJoinPolicy - the roomJoinPolicy value to set.
      participants - the participants value to set.
      Returns:
      response for a successful update room request.
    • updateRoomWithResponse

      public com.azure.core.http.rest.Response<CommunicationRoom> updateRoomWithResponse(String roomId, OffsetDateTime validFrom, OffsetDateTime validUntil, RoomJoinPolicy roomJoinPolicy, List<RoomParticipant> participants, com.azure.core.util.Context context)
      Update an existing Room with response.
      Parameters:
      roomId - The room id.
      validFrom - the validFrom value to set.
      validUntil - the validUntil value to set.
      roomJoinPolicy - the roomJoinPolicy value to set.
      participants - the participants value to set.
      context - The context of key value pairs for http request.
      Returns:
      response for a successful update room request.
    • getRoom

      public CommunicationRoom getRoom(String roomId)
      Get an existing room.
      Parameters:
      roomId - The room id.
      Returns:
      The existing room.
    • getRoomWithResponse

      public com.azure.core.http.rest.Response<CommunicationRoom> getRoomWithResponse(String roomId, com.azure.core.util.Context context)
      Get an existing room with response.
      Parameters:
      roomId - The room id.
      context - The context of key value pairs for http request.
      Returns:
      The existing room.
    • deleteRoom

      public Void deleteRoom(String roomId)
      Delete an existing room.
      Parameters:
      roomId - The room Id.
      Returns:
      Response with status code only.
    • deleteRoomWithResponse

      public com.azure.core.http.rest.Response<Void> deleteRoomWithResponse(String roomId, com.azure.core.util.Context context)
      Delete an existing room.
      Parameters:
      roomId - The room Id.
      context - The context of key value pairs for http request.
      Returns:
      Response with status code only.
    • addParticipants

      public ParticipantsCollection addParticipants(String roomId, List<RoomParticipant> participants)
      Add participants to an existing room.
      Parameters:
      roomId - The room id.
      participants - The participants to add.
      Returns:
      The existing room.
    • addParticipantsWithResponse

      public com.azure.core.http.rest.Response<ParticipantsCollection> addParticipantsWithResponse(String roomId, List<RoomParticipant> participants, com.azure.core.util.Context context)
      Add participants to an existing room with response.
      Parameters:
      roomId - The room id.
      participants - The participants to add.
      context - The context of key value pairs for http request.
      Returns:
      The existing room.
    • updateParticipants

      public ParticipantsCollection updateParticipants(String roomId, List<RoomParticipant> participants)
      Update participants to an existing room.
      Parameters:
      roomId - The room id.
      participants - The participants to add.
      Returns:
      The existing room.
    • updateParticipantsWithResponse

      public com.azure.core.http.rest.Response<ParticipantsCollection> updateParticipantsWithResponse(String roomId, List<RoomParticipant> participants, com.azure.core.util.Context context)
      Update participants to an existing room with response.
      Parameters:
      roomId - The room id.
      participants - The participants to add.
      context - The context of key value pairs for http request.
      Returns:
      The existing room.
    • removeParticipants

      public ParticipantsCollection removeParticipants(String roomId, List<RoomParticipant> participants)
      Remove participants from an existing room.
      Parameters:
      roomId - The room id.
      participants - The participants to remove.
      Returns:
      The existing room.
    • removeParticipantsWithResponse

      public com.azure.core.http.rest.Response<ParticipantsCollection> removeParticipantsWithResponse(String roomId, List<RoomParticipant> participants, com.azure.core.util.Context context)
      Remove participants from an existing room with response.
      Parameters:
      roomId - The room id.
      participants - The participants to remove.
      context - The context of key value pairs for http request.
      Returns:
      The existing room.
    • getParticipants

      public ParticipantsCollection getParticipants(String roomId)
      List Room participants.
      Parameters:
      roomId - The room id.
      Returns:
      Room Participants List
    • getParticipantsWithResponse

      public com.azure.core.http.rest.Response<ParticipantsCollection> getParticipantsWithResponse(String roomId, com.azure.core.util.Context context)
      Update participants to an existing room with response.
      Parameters:
      roomId - The room id.
      context - The context of key value pairs for http request.
      Returns:
      The Room Participants list.