com.azure.communication.rooms.implementation.converters.RoomModelConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-communication-rooms Show documentation
Show all versions of azure-communication-rooms Show documentation
This package contains clients and data structures used to create, update, get, delete the Azure Communication Room Service.
For this release, see notes
Microsoft Azure Communication Rooms quickstart
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.communication.rooms.implementation.converters;
import com.azure.communication.rooms.models.CommunicationRoom;
/**
* A converter between {@link com.azure.communication.rooms.implementation.models.RoomModel} and
* {@link CommunicationRoom}.
*/
public final class RoomModelConverter {
/**
* Maps from {com.azure.communication.rooms.implementation.models.RoomModel} to {@link CommunicationRoom}.
*/
public static CommunicationRoom convert(com.azure.communication.rooms.implementation.models.RoomModel room) {
if (room == null) {
return null;
}
CommunicationRoom communicationRoom = new CommunicationRoom(room.getId(), room.getValidFrom(),
room.getValidUntil(), room.getCreatedAt(), room.isPstnDialOutEnabled());
return communicationRoom;
}
/**
* Maps from {@link CommunicationRoom} to {com.azure.communication.rooms.implementation.models.RoomModel}.
*/
public static com.azure.communication.rooms.implementation.models.RoomModel
convert(CommunicationRoom communicationRoom) {
if (communicationRoom == null) {
return null;
}
com.azure.communication.rooms.implementation.models.RoomModel room
= new com.azure.communication.rooms.implementation.models.RoomModel().setId(communicationRoom.getRoomId())
.setValidFrom(communicationRoom.getValidFrom())
.setValidUntil(communicationRoom.getValidUntil())
.setCreatedAt(communicationRoom.getCreatedAt());
return room;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy