Skip to content

Commit b6e60d7

Browse files
author
Vinothini Dharmaraj
committed
adding alpha 4 changes
1 parent 4f259cc commit b6e60d7

File tree

102 files changed

+10916
-517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+10916
-517
lines changed

sdk/communication/Azure.Communication.CallAutomation/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 1.3.0-beta.1 (Unreleased)
3+
## 1.4.0-beta.1 (Unreleased)
44

55
### Features Added
66

sdk/communication/Azure.Communication.CallAutomation/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "net",
44
"TagPrefix": "net/communication/Azure.Communication.CallAutomation",
5-
"Tag": "net/communication/Azure.Communication.CallAutomation_a7eb7ffb4a"
5+
"Tag": "net/communication/Azure.Communication.CallAutomation_2b18d78bf0"
66
}

sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClientOptions.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class CallAutomationClientOptions : ClientOptions
1616
/// <summary>
1717
/// The latest version of the CallAutomation service.
1818
/// </summary>
19-
internal const ServiceVersion LatestVersion = ServiceVersion.V2023_10_03_Preview;
19+
internal const ServiceVersion LatestVersion = ServiceVersion.V2024_09_01_Preview;
2020

2121
internal string ApiVersion { get; }
2222

@@ -43,6 +43,7 @@ public CallAutomationClientOptions(ServiceVersion version = LatestVersion)
4343
ServiceVersion.V2023_06_15_Preview => "2023-06-15-preview",
4444
ServiceVersion.V2023_10_15 => "2023-10-15",
4545
ServiceVersion.V2023_10_03_Preview => "2023-10-03-preview",
46+
ServiceVersion.V2024_09_01_Preview => "2024-09-01-preview",
4647
_ => throw new ArgumentOutOfRangeException(nameof(version)),
4748
};
4849
}
@@ -71,7 +72,12 @@ public enum ServiceVersion
7172
/// <summary>
7273
/// Latest ALPHA3 (1.2.0-alpha) preview of the CallAutomation service.
7374
/// </summary>
74-
V2023_10_03_Preview = 4
75+
V2023_10_03_Preview = 4,
76+
77+
/// <summary>
78+
/// Latest ALPHA3 (1.4.0-alpha) preview of the CallAutomation service.
79+
/// </summary>
80+
V2024_09_01_Preview = 5
7581
#pragma warning restore CA1707 // Identifiers should not contain underscores
7682
}
7783
}
Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/RecognizeFailed.cs renamed to sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/RecognizeFailedInternal.cs

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallAutomation/src/Models/CallAutomationModelFactory.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ public static RecognizeCanceled RecognizeCanceled(string callConnectionId = null
479479
/// <returns> A new <see cref="CallAutomation.RecognizeFailed"/> instance for mocking. </returns>
480480
public static RecognizeFailed RecognizeFailed(string callConnectionId = null, string serverCallId = null, string correlationId = null, string operationContext = null, ResultInformation resultInformation = null, int? failedPlaySourceIndex = null)
481481
{
482-
return new RecognizeFailed(callConnectionId, serverCallId, correlationId, operationContext, resultInformation, failedPlaySourceIndex);
482+
var internalObject = new RecognizeFailedInternal(callConnectionId, serverCallId, correlationId, operationContext, resultInformation, failedPlaySourceIndex);
483+
484+
return new RecognizeFailed(internalObject);
483485
}
484486

485487
/// <summary> Initializes a new instance of RecordingStateChanged. </summary>

sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/RecognizeFailed.cs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,27 @@ namespace Azure.Communication.CallAutomation
99
/// <summary>
1010
/// The Recognize failed event.
1111
/// </summary>
12-
[CodeGenModel("RecognizeFailed", Usage = new string[] { "output" }, Formats = new string[] { "json" })]
1312
public partial class RecognizeFailed : CallAutomationEventBase
1413
{
1514
/// <summary>
1615
/// Reason code.
1716
/// </summary>
1817
public MediaEventReasonCode ReasonCode { get; internal set; }
1918

19+
/// <summary> Contains the index of the failed play source. </summary>
20+
public int? FailedPlaySourceIndex { get; internal set; }
21+
2022
/// <summary> Initializes a new instance of RecognizeFailed. </summary>
21-
/// <param name="callConnectionId"> Call connection ID. </param>
22-
/// <param name="serverCallId"> Server call ID. </param>
23-
/// <param name="correlationId"> Correlation ID for event to call correlation. Also called ChainId for skype chain ID. </param>
24-
/// <param name="operationContext"> Used by customers when calling mid-call actions to correlate the request to the response event. </param>
25-
/// <param name="resultInformation"> Contains the resulting SIP code/sub-code and message from NGC services. </param>
26-
internal RecognizeFailed(string operationContext, ResultInformation resultInformation, string callConnectionId, string serverCallId, string correlationId)
23+
/// <param name="internalEvent"> RecognizeFailedInternal event </param>
24+
internal RecognizeFailed(RecognizeFailedInternal internalEvent)
2725
{
28-
CallConnectionId = callConnectionId;
29-
ServerCallId = serverCallId;
30-
CorrelationId = correlationId;
31-
OperationContext = operationContext;
32-
ResultInformation = resultInformation;
33-
ReasonCode = new MediaEventReasonCode(resultInformation.SubCode.ToString());
26+
CallConnectionId = internalEvent.CallConnectionId;
27+
ServerCallId = internalEvent.ServerCallId;
28+
CorrelationId = internalEvent.CorrelationId;
29+
OperationContext = internalEvent.OperationContext;
30+
ResultInformation = internalEvent.ResultInformation;
31+
ReasonCode = new MediaEventReasonCode(ResultInformation.SubCode.ToString());
32+
FailedPlaySourceIndex = internalEvent.FailedPlaySourceIndex;
3433
}
3534

3635
/// <summary>
@@ -43,7 +42,7 @@ public static RecognizeFailed Deserialize(string content)
4342
using var document = JsonDocument.Parse(content);
4443
JsonElement element = document.RootElement;
4544

46-
return DeserializeRecognizeFailed(element);
45+
return new RecognizeFailed(RecognizeFailedInternal.DeserializeRecognizeFailedInternal(element));
4746
}
4847
}
4948
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System.Text.Json.Serialization;
5+
using System.Text.Json;
6+
using Azure.Core;
7+
8+
namespace Azure.Communication.CallAutomation
9+
{
10+
/// <summary>
11+
/// The recognize completed event internal.
12+
/// </summary>
13+
[CodeGenModel("RecognizeFailed", Usage = new string[] { "output" }, Formats = new string[] { "json" })]
14+
internal partial class RecognizeFailedInternal : CallAutomationEventBase
15+
{
16+
/// <summary>
17+
/// Reason code.
18+
/// </summary>
19+
public MediaEventReasonCode ReasonCode { get; internal set; }
20+
}
21+
}

sdk/communication/Azure.Communication.CallAutomation/tests/CallAutomationClients/CallAutomationClientAutomatedLiveTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Azure.Communication.CallAutomation.Tests.CallAutomationClients
1111
{
1212
internal class CallAutomationClientAutomatedLiveTests : CallAutomationClientAutomatedLiveTestsBase
1313
{
14-
public CallAutomationClientAutomatedLiveTests(bool isAsync) : base(isAsync, RecordedTestMode.Playback)
14+
public CallAutomationClientAutomatedLiveTests(bool isAsync) : base(isAsync)
1515
{
1616
}
1717

sdk/communication/Azure.Communication.CallAutomation/tests/EventProcessors/ResultWithEventProcessorAsyncTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,10 @@ public async Task RecognizeEventResultFailedTest()
355355
var response = callConnection.GetCallMedia().StartRecognizing(new CallMediaRecognizeDtmfOptions(new CommunicationUserIdentifier(TargetId), 1) { OperationContext = OperationContext });
356356
Assert.AreEqual(successCode, response.GetRawResponse().Status);
357357

358+
var internalEvent = new RecognizeFailedInternal(CallConnectionId, ServerCallId, CorelationId, OperationContext, new ResultInformation() { }, null);
359+
358360
// Create and send event to event processor
359-
SendAndProcessEvent(handler, new RecognizeFailed(CallConnectionId, ServerCallId, CorelationId, OperationContext, new ResultInformation() { }, null));
361+
SendAndProcessEvent(handler, new RecognizeFailed(internalEvent));
360362

361363
StartRecognizingEventResult returnedResult = await response.Value.WaitForEventProcessorAsync();
362364

0 commit comments

Comments
 (0)