Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions sdk/communication/Azure.Communication.Rooms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
### Other Changes
## 1.1.0-beta.1 (2023-09-19)

### Features Added
- Added Support for PSTN Dial-Out Feature in Azure Communication Services Rooms

### Breaking Changes

### Bugs Fixed

### Other Changes
### Added
- Added new overloads for CreateRoom (CreateRoomAsync) and UpdateRooms (UpdateRoomsAsync) with options : CreateRoomOptions and UpdateRoomOptions.

## 1.0.0 (2023-06-12)
General Availability version of the Azure Communication Services Rooms .NET SDK.
Expand Down
33 changes: 32 additions & 1 deletion sdk/communication/Azure.Communication.Rooms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ RoomsClient client = new RoomsClient(connectionString);
## Examples
### Create a room
To create a room, call the `CreateRoom` or `CreateRoomAsync` function from `RoomsClient`.
The `validFrom`, `validUntil`, and `participants` arguments are all optional. If `validFrom` and `validUntil` are not provided, then the default for `validFrom` is current date time and the default for `validUntil` is `validFrom + 180 days`.
The `validFrom`, `validUntil` and `participants` arguments are all optional. If `validFrom` and `validUntil` are not provided, then the default for `validFrom` is current date time and the default for `validUntil` is `validFrom + 180 days`.
When defining `RoomParticipant`, if role is not specified, then it will be `Attendee` by default.
Starting in 1.1.0-beta.1 release, `pstnDialOutEnabled` is added to enable PSTN Dial-Out feature in a Room.
The returned value is `Response<CommunicationRoom>` which contains created room details as well as the status and associated error codes in case of a failure.

Starting in 1.1.0-beta.1 release, ACS Rooms supports PSTN Dial-Out feature. To create room with PSTN Dial-Out property, call `CreateRoom` or `CreateRoomAsync` function with `createRoomOptions` parameter and set `PstnDialOutEnabled` to either true or false. If `PstnDialOutEnabled` is not provided, then the default value for `PstnDialOutEnabled` is false.
This parameter contains `ValidFrom`, `ValidUntil`, `PstnDialOutEnabled` and `Participants` properties. Those properties are optional.

```C# Snippet:Azure_Communication_Rooms_Tests_Samples_CreateRoomAsync
// Create communication users using the CommunicationIdentityClient
Response<CommunicationUserIdentifier> communicationUser1 = await communicationIdentityClient.CreateUserAsync();
Expand All @@ -70,15 +74,42 @@ List<RoomParticipant> invitedParticipants = new List<RoomParticipant>

Response<CommunicationRoom> createRoomResponse = await roomsClient.CreateRoomAsync(validFrom, validUntil, invitedParticipants);
CommunicationRoom createCommunicationRoom = createRoomResponse.Value;

// Starting in 1.1.0-beta.1 release,CreateRoom function also takes roomCreateOptions as parameter
bool pstnDialOutEnabled = true;
CreateRoomOptions roomCreateOptions = new CreateRoomOptions()
{
ValidFrom = validFrom,
ValidUntil = validUntil,
PstnDialOutEnabled = pstnDialOutEnabled,
Participants = invitedParticipants
};

createRoomResponse = await roomsClient.CreateRoomAsync(roomCreateOptions);
createCommunicationRoom = createRoomResponse.Value;
```

### Update a room
The `validFrom` and `validUntil` properties of a created room can be updated by calling the `UpdateRoom` or `UpdateRoomAsync` function from `RoomsClient`.

Starting in 1.1.0-beta.1 release, ACS Rooms supports PSTN Dial-Out feature. To update room with PSTN Dial-Out property, call `UpdateRoom` or `UpdateRoomAsync` function with `updateRoomOptions` parameter and set `PstnDialOutEnabled` to either true or false.If `PstnDialOutEnabled` is not provided, there there is no changes to `PstnDialOutEnabled` property in the room.
The `updateRoomOptions` parameter contains `ValidFrom`, `ValidUntil` and `PstnDialOutEnabled` properties. Those properties are optional.

```C# Snippet:Azure_Communication_Rooms_Tests_Samples_UpdateRoomAsync
validUntil = validFrom.AddDays(30);
Response<CommunicationRoom> updateRoomResponse = await roomsClient.UpdateRoomAsync(createdRoomId, validFrom, validUntil);
CommunicationRoom updateCommunicationRoom = updateRoomResponse.Value;

// Starting in 1.1.0-beta.1 release,UpdateRoom function also takes roomCreateOptions as parameter
UpdateRoomOptions roomUpdateOptions = new UpdateRoomOptions()
{
ValidFrom = validFrom,
ValidUntil = validUntil,
PstnDialOutEnabled = pstnDialOutEnabled,
};

updateRoomResponse = await roomsClient.UpdateRoomAsync(createdRoomId, roomUpdateOptions);
updateCommunicationRoom = updateRoomResponse.Value;
```

### Get a created room
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ public partial class CommunicationRoom
internal CommunicationRoom() { }
public System.DateTimeOffset CreatedAt { get { throw null; } }
public string Id { get { throw null; } }
public bool PstnDialOutEnabled { get { throw null; } }
public System.DateTimeOffset ValidFrom { get { throw null; } }
public System.DateTimeOffset ValidUntil { get { throw null; } }
}
public partial class CreateRoomOptions
{
public CreateRoomOptions() { }
public System.Collections.Generic.IList<Azure.Communication.Rooms.RoomParticipant> Participants { get { throw null; } set { } }
public bool? PstnDialOutEnabled { get { throw null; } set { } }
public System.DateTimeOffset? ValidFrom { get { throw null; } set { } }
public System.DateTimeOffset? ValidUntil { get { throw null; } set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ParticipantRole : System.IEquatable<Azure.Communication.Rooms.ParticipantRole>
{
Expand Down Expand Up @@ -42,7 +51,9 @@ public RoomsClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azu
public RoomsClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Communication.Rooms.RoomsClientOptions options = null) { }
public virtual Azure.Response AddOrUpdateParticipants(string roomId, System.Collections.Generic.IEnumerable<Azure.Communication.Rooms.RoomParticipant> participants, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> AddOrUpdateParticipantsAsync(string roomId, System.Collections.Generic.IEnumerable<Azure.Communication.Rooms.RoomParticipant> participants, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.Rooms.CommunicationRoom> CreateRoom(Azure.Communication.Rooms.CreateRoomOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.Rooms.CommunicationRoom> CreateRoom(System.DateTimeOffset? validFrom = default(System.DateTimeOffset?), System.DateTimeOffset? validUntil = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable<Azure.Communication.Rooms.RoomParticipant> participants = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Rooms.CommunicationRoom>> CreateRoomAsync(Azure.Communication.Rooms.CreateRoomOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Rooms.CommunicationRoom>> CreateRoomAsync(System.DateTimeOffset? validFrom = default(System.DateTimeOffset?), System.DateTimeOffset? validUntil = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable<Azure.Communication.Rooms.RoomParticipant> participants = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response DeleteRoom(string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteRoomAsync(string roomId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand All @@ -54,20 +65,31 @@ public RoomsClient(System.Uri endpoint, Azure.Core.TokenCredential credential, A
public virtual Azure.AsyncPageable<Azure.Communication.Rooms.CommunicationRoom> GetRoomsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response RemoveParticipants(string roomId, System.Collections.Generic.IEnumerable<Azure.Communication.CommunicationIdentifier> participantIdentifiers, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> RemoveParticipantsAsync(string roomId, System.Collections.Generic.IEnumerable<Azure.Communication.CommunicationIdentifier> participantIdentifiers, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.Rooms.CommunicationRoom> UpdateRoom(string roomId, Azure.Communication.Rooms.UpdateRoomOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.Rooms.CommunicationRoom> UpdateRoom(string roomId, System.DateTimeOffset? validFrom = default(System.DateTimeOffset?), System.DateTimeOffset? validUntil = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Rooms.CommunicationRoom>> UpdateRoomAsync(string roomId, Azure.Communication.Rooms.UpdateRoomOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Rooms.CommunicationRoom>> UpdateRoomAsync(string roomId, System.DateTimeOffset? validFrom = default(System.DateTimeOffset?), System.DateTimeOffset? validUntil = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
public partial class RoomsClientOptions : Azure.Core.ClientOptions
{
public RoomsClientOptions(Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion version = Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion.V2023_06_14) { }
public RoomsClientOptions(Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion version = Azure.Communication.Rooms.RoomsClientOptions.ServiceVersion.V2023_10_30_Preview) { }
public enum ServiceVersion
{
V2023_06_14 = 1,
V2023_10_30_Preview = 2,
}
}
public static partial class RoomsModelFactory
{
public static Azure.Communication.Rooms.CommunicationRoom CommunicationRoom(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset validFrom = default(System.DateTimeOffset), System.DateTimeOffset validUntil = default(System.DateTimeOffset)) { throw null; }
public static Azure.Communication.Rooms.CommunicationRoom CommunicationRoom(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset validFrom = default(System.DateTimeOffset), System.DateTimeOffset validUntil = default(System.DateTimeOffset), bool pstnDialOutEnabled = false) { throw null; }
public static Azure.Communication.Rooms.RoomParticipant RoomParticipant(string rawId, Azure.Communication.Rooms.ParticipantRole role) { throw null; }
}
public partial class UpdateRoomOptions
{
public UpdateRoomOptions() { }
public bool? PstnDialOutEnabled { get { throw null; } set { } }
public System.DateTimeOffset? ValidFrom { get { throw null; } set { } }
public System.DateTimeOffset? ValidUntil { get { throw null; } set { } }
}
}
2 changes: 1 addition & 1 deletion sdk/communication/Azure.Communication.Rooms/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/communication/Azure.Communication.Rooms",
"Tag": "net/communication/Azure.Communication.Rooms_2f76d0cdc7"
"Tag": "net/communication/Azure.Communication.Rooms_2d2512799d"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;

namespace Azure.Communication.Rooms
{
/// <summary>
/// The Azure Communication Services Rooms Create Options
/// </summary>
public class CreateRoomOptions
{
/// <summary> The timestamp from when the room is open for joining. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. </summary>
public DateTimeOffset? ValidFrom { get; set; }

/// <summary> The timestamp from when the room can no longer be joined. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`. </summary>
public DateTimeOffset? ValidUntil { get; set; }

/// <summary> Set this flag to true if, at the time of the call, dial out to a PSTN number is enabled in a particular room. By default, this flag is set to false. </summary>
public bool? PstnDialOutEnabled { get; set; }

/// <summary> A collection of participants. </summary>
public IList<RoomParticipant> Participants { get; set; }
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading