From 2e37229668f4025b534d5f3c1ad25c318783aa02 Mon Sep 17 00:00:00 2001 From: amariwest-msft <139818906+amariwest-msft@users.noreply.github.com> Date: Thu, 12 Oct 2023 21:43:36 -0500 Subject: [PATCH] Add PauseOnStart Recording Option (#39132) * generated files using swagger * removed extra swagger file * modified unit tests * undo status code change for mute participant in generated files * merged with main * merged with main * reverted 202 change * Both status code changed to 202 * modified test cases to check for 200 status code * regenerated code * regenerated code * Revert "regenerated code" This reverts commit a5a9e0e5b8296fbf90a49dc8ebacd62f75298690. * Added TransciptionDataRequest Change * generated from latest swagger * generated netstandard2.0.cs * edited changelog * Revert "generated netstandard2.0.cs" This reverts commit 2a39b2d865a5a223e0edaf7e3615dc16562e85b7. * Revert "edited changelog" This reverts commit 7eb14250f0a123983d82e606ed8c7fb5d4585a86. * added line to changelog and standard2.0.cs * Update CHANGELOG.md --- .../Azure.Communication.CallAutomation/CHANGELOG.md | 1 + .../api/Azure.Communication.CallAutomation.netstandard2.0.cs | 1 + .../Azure.Communication.CallAutomation/src/CallRecording.cs | 2 ++ .../src/Models/StartRecordingOptions.cs | 5 +++++ .../Azure.Communication.CallAutomation/src/autorest.md | 1 + .../tests/CallRecordings/CallRecordingTests.cs | 4 +++- 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sdk/communication/Azure.Communication.CallAutomation/CHANGELOG.md b/sdk/communication/Azure.Communication.CallAutomation/CHANGELOG.md index 40a3e8a0d5624..ae996caa02aa1 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.CallAutomation/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.1.0-beta.1 (Unreleased) ### Features Added +- StartRecording now accepts PauseOnStart. ### Breaking Changes diff --git a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs index d1a78f11e0472..7ae2185d60bce 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs @@ -1317,6 +1317,7 @@ public StartRecordingOptions(Azure.Communication.CallAutomation.CallLocator call public System.Collections.Generic.IList AudioChannelParticipantOrdering { get { throw null; } } public System.Collections.Generic.IList ChannelAffinity { get { throw null; } set { } } public Azure.Communication.CallAutomation.ExternalStorage ExternalStorage { get { throw null; } set { } } + public bool PauseOnStart { get { throw null; } set { } } public Azure.Communication.CallAutomation.RecordingChannel RecordingChannel { get { throw null; } set { } } public Azure.Communication.CallAutomation.RecordingContent RecordingContent { get { throw null; } set { } } public Azure.Communication.CallAutomation.RecordingFormat RecordingFormat { get { throw null; } set { } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs index b75ace67fe1a2..0bc3dde7c40d6 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallRecording.cs @@ -62,6 +62,7 @@ public virtual Response Start(StartRecordingOptions option RecordingChannelType = options.RecordingChannel, RecordingContentType = options.RecordingContent, RecordingFormatType = options.RecordingFormat, + PauseOnStart = options.PauseOnStart, }; if (options.AudioChannelParticipantOrdering != null && options.AudioChannelParticipantOrdering.Any()) @@ -119,6 +120,7 @@ public virtual async Task> StartAsync(StartRecord RecordingChannelType = options.RecordingChannel, RecordingContentType = options.RecordingContent, RecordingFormatType = options.RecordingFormat, + PauseOnStart = options.PauseOnStart, }; if (options.AudioChannelParticipantOrdering != null && options.AudioChannelParticipantOrdering.Any()) diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/StartRecordingOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/StartRecordingOptions.cs index a2b92901a3850..f5f26ea926920 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/StartRecordingOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/StartRecordingOptions.cs @@ -45,6 +45,11 @@ public StartRecordingOptions(CallLocator callLocator) /// public RecordingFormat RecordingFormat { get; set; } + /// + /// The pause on start option. + /// + public bool PauseOnStart { get; set; } + /// /// The sequential order in which audio channels are assigned to participants in the unmixed recording. /// When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering is not specified, diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md b/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md index 0a91b6ad80030..d1ad64ab63603 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md +++ b/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md @@ -12,6 +12,7 @@ tag: package-2023-01-15-preview require: - https://github.com/williamzhao87/azure-rest-api-specs/blob/e31fe487ab3f775d659edf3945b9239ac910314a/specification/communication/data-plane/CallAutomation/readme.md + title: Azure Communication Services generation1-convenience-client: true diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs index d0d20d894be01..e8f90df0f85fd 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs @@ -194,7 +194,8 @@ private CallRecording getMockCallRecording(int statusCode, string? responseConte RecordingChannel = RecordingChannel.Mixed, RecordingFormat = RecordingFormat.Mp4, AudioChannelParticipantOrdering = { new CommunicationUserIdentifier("test") }, - ChannelAffinity = testChannelAffinities + ChannelAffinity = testChannelAffinities, + PauseOnStart = false, }) }, new Func?[] @@ -236,6 +237,7 @@ private CallRecording getMockCallRecording(int statusCode, string? responseConte RecordingChannel = RecordingChannel.Mixed, RecordingFormat = RecordingFormat.Mp4, ChannelAffinity = testChannelAffinities, + PauseOnStart = false, AudioChannelParticipantOrdering = { new CommunicationUserIdentifier("test"),} }).ConfigureAwait(false), },