Skip to content

Commit 1eaa696

Browse files
updated SDK to align with service (Azure#47540)
* updated SDK to align with service * .NET SDK Export API bash command * updated API * Revert ".NET SDK Export API bash command" This reverts commit 15b996a.
1 parent 5df1bba commit 1eaa696

File tree

13 files changed

+75
-42
lines changed

13 files changed

+75
-42
lines changed

sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.net8.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ public CallAutomationClient(string connectionString, Azure.Communication.CallAut
131131
public CallAutomationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Communication.CallAutomation.CallAutomationClientOptions options = null) { }
132132
public CallAutomationClient(System.Uri pmaEndpoint, string connectionString, Azure.Communication.CallAutomation.CallAutomationClientOptions options = null) { }
133133
public CallAutomationClient(System.Uri pmaEndpoint, System.Uri acsEndpoint, Azure.Core.TokenCredential credential, Azure.Communication.CallAutomation.CallAutomationClientOptions options = null) { }
134-
public Azure.Communication.MicrosoftTeamsAppIdentifier OPSSource { get { throw null; } }
135134
public Azure.Communication.CommunicationUserIdentifier Source { get { throw null; } }
136135
public virtual Azure.Response<Azure.Communication.CallAutomation.AnswerCallResult> AnswerCall(Azure.Communication.CallAutomation.AnswerCallOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
137136
public virtual Azure.Response<Azure.Communication.CallAutomation.AnswerCallResult> AnswerCall(string incomingCallContext, System.Uri callbackUri, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -162,7 +161,6 @@ public CallAutomationClient(System.Uri pmaEndpoint, System.Uri acsEndpoint, Azur
162161
public partial class CallAutomationClientOptions : Azure.Core.ClientOptions
163162
{
164163
public CallAutomationClientOptions(Azure.Communication.CallAutomation.CallAutomationClientOptions.ServiceVersion version = Azure.Communication.CallAutomation.CallAutomationClientOptions.ServiceVersion.V2024_09_01_Preview) { }
165-
public Azure.Communication.MicrosoftTeamsAppIdentifier OPSSource { get { throw null; } set { } }
166164
public Azure.Communication.CommunicationUserIdentifier Source { get { throw null; } set { } }
167165
public enum ServiceVersion
168166
{
@@ -709,6 +707,7 @@ public CreateCallOptions(Azure.Communication.CallAutomation.CallInvite callInvit
709707
public Azure.Communication.CallAutomation.CallInvite CallInvite { get { throw null; } }
710708
public Azure.Communication.CallAutomation.MediaStreamingOptions MediaStreamingOptions { get { throw null; } set { } }
711709
public string OperationContext { get { throw null; } set { } }
710+
public Azure.Communication.MicrosoftTeamsAppIdentifier TeamsAppSource { get { throw null; } set { } }
712711
public Azure.Communication.CallAutomation.TranscriptionOptions TranscriptionOptions { get { throw null; } set { } }
713712
}
714713
public partial class CreateCallResult
@@ -730,6 +729,7 @@ public CreateGroupCallOptions(System.Collections.Generic.IEnumerable<Azure.Commu
730729
public Azure.Communication.PhoneNumberIdentifier SourceCallerIdNumber { get { throw null; } set { } }
731730
public string SourceDisplayName { get { throw null; } set { } }
732731
public System.Collections.Generic.IEnumerable<Azure.Communication.CommunicationIdentifier> Targets { get { throw null; } }
732+
public Azure.Communication.MicrosoftTeamsAppIdentifier TeamsAppSource { get { throw null; } set { } }
733733
public Azure.Communication.CallAutomation.TranscriptionOptions TranscriptionOptions { get { throw null; } set { } }
734734
}
735735
public partial class CustomCallingContext

sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ public CallAutomationClient(string connectionString, Azure.Communication.CallAut
131131
public CallAutomationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Communication.CallAutomation.CallAutomationClientOptions options = null) { }
132132
public CallAutomationClient(System.Uri pmaEndpoint, string connectionString, Azure.Communication.CallAutomation.CallAutomationClientOptions options = null) { }
133133
public CallAutomationClient(System.Uri pmaEndpoint, System.Uri acsEndpoint, Azure.Core.TokenCredential credential, Azure.Communication.CallAutomation.CallAutomationClientOptions options = null) { }
134-
public Azure.Communication.MicrosoftTeamsAppIdentifier OPSSource { get { throw null; } }
135134
public Azure.Communication.CommunicationUserIdentifier Source { get { throw null; } }
136135
public virtual Azure.Response<Azure.Communication.CallAutomation.AnswerCallResult> AnswerCall(Azure.Communication.CallAutomation.AnswerCallOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
137136
public virtual Azure.Response<Azure.Communication.CallAutomation.AnswerCallResult> AnswerCall(string incomingCallContext, System.Uri callbackUri, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -162,7 +161,6 @@ public CallAutomationClient(System.Uri pmaEndpoint, System.Uri acsEndpoint, Azur
162161
public partial class CallAutomationClientOptions : Azure.Core.ClientOptions
163162
{
164163
public CallAutomationClientOptions(Azure.Communication.CallAutomation.CallAutomationClientOptions.ServiceVersion version = Azure.Communication.CallAutomation.CallAutomationClientOptions.ServiceVersion.V2024_09_01_Preview) { }
165-
public Azure.Communication.MicrosoftTeamsAppIdentifier OPSSource { get { throw null; } set { } }
166164
public Azure.Communication.CommunicationUserIdentifier Source { get { throw null; } set { } }
167165
public enum ServiceVersion
168166
{
@@ -708,6 +706,7 @@ public CreateCallOptions(Azure.Communication.CallAutomation.CallInvite callInvit
708706
public Azure.Communication.CallAutomation.CallInvite CallInvite { get { throw null; } }
709707
public Azure.Communication.CallAutomation.MediaStreamingOptions MediaStreamingOptions { get { throw null; } set { } }
710708
public string OperationContext { get { throw null; } set { } }
709+
public Azure.Communication.MicrosoftTeamsAppIdentifier TeamsAppSource { get { throw null; } set { } }
711710
public Azure.Communication.CallAutomation.TranscriptionOptions TranscriptionOptions { get { throw null; } set { } }
712711
}
713712
public partial class CreateCallResult
@@ -729,6 +728,7 @@ public CreateGroupCallOptions(System.Collections.Generic.IEnumerable<Azure.Commu
729728
public Azure.Communication.PhoneNumberIdentifier SourceCallerIdNumber { get { throw null; } set { } }
730729
public string SourceDisplayName { get { throw null; } set { } }
731730
public System.Collections.Generic.IEnumerable<Azure.Communication.CommunicationIdentifier> Targets { get { throw null; } }
731+
public Azure.Communication.MicrosoftTeamsAppIdentifier TeamsAppSource { get { throw null; } set { } }
732732
public Azure.Communication.CallAutomation.TranscriptionOptions TranscriptionOptions { get { throw null; } set { } }
733733
}
734734
public partial class CustomCallingContext

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Azure.Core.Pipeline;
1010
using Azure.Communication.Pipeline;
1111
using System.Collections.Generic;
12-
using System.Net;
1312

1413
namespace Azure.Communication.CallAutomation
1514
{
@@ -36,14 +35,6 @@ public class CallAutomationClient
3635
/// </summary>
3736
public CommunicationUserIdentifier Source { get; }
3837

39-
/// <summary>
40-
/// MicrosoftTeamsAppIdentifier that makes the outbound call.
41-
/// This can be provided by providing CallAutomationClientOption during construction of CallAutomationClient.
42-
/// If left blank, Source is the default outbound call identity.
43-
/// This should be mutual exclusive with Source.
44-
/// </summary>
45-
public MicrosoftTeamsAppIdentifier OPSSource { get; }
46-
4738
#region public constructors
4839
/// <summary> Initializes a new instance of <see cref="CallAutomationClient"/>.</summary>
4940
/// <param name="connectionString">Connection string acquired from the Azure Communication Services resource.</param>
@@ -127,7 +118,6 @@ private CallAutomationClient(Uri endpoint, HttpPipeline httpPipeline, CallAutoma
127118
CallDialogRestClient = new CallDialogRestClient(_clientDiagnostics, httpPipeline, endpoint, options.ApiVersion);
128119
EventProcessor = new CallAutomationEventProcessor();
129120
Source = options.Source;
130-
OPSSource = options.OPSSource;
131121
}
132122

133123
private CallAutomationClient(
@@ -733,7 +723,7 @@ private CreateCallRequestInternal CreateCallRequest(CreateCallOptions options)
733723
: new PhoneNumberIdentifierModel(options?.CallInvite?.SourceCallerIdNumber?.PhoneNumber),
734724
SourceDisplayName = options?.CallInvite?.SourceDisplayName,
735725
Source = Source == null ? null : new CommunicationUserIdentifierModel(Source.Id),
736-
OpsSource = OPSSource == null ? null : new MicrosoftTeamsAppIdentifierModel(OPSSource.AppId),
726+
TeamsAppSource = options.TeamsAppSource == null ? null : new MicrosoftTeamsAppIdentifierModel(options.TeamsAppSource.AppId),
737727
};
738728

739729
request.CustomCallingContext = new CustomCallingContextInternal(
@@ -768,7 +758,7 @@ private CreateCallRequestInternal CreateCallRequest(CreateGroupCallOptions optio
768758
: new PhoneNumberIdentifierModel(options?.SourceCallerIdNumber?.PhoneNumber),
769759
SourceDisplayName = options?.SourceDisplayName,
770760
Source = Source == null ? null : new CommunicationUserIdentifierModel(Source.Id),
771-
OpsSource = OPSSource == null ? null : new MicrosoftTeamsAppIdentifierModel(OPSSource.AppId)
761+
TeamsAppSource = options.TeamsAppSource == null ? null : new MicrosoftTeamsAppIdentifierModel(options.TeamsAppSource.AppId)
772762
};
773763

774764
request.CustomCallingContext = new CustomCallingContextInternal(

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,9 @@ public class CallAutomationClientOptions : ClientOptions
2222

2323
/// <summary>
2424
/// The caller source of the call automation client.
25-
/// Mutual exclusive with <see cref="OPSSource"/>.
2625
/// </summary>
2726
public CommunicationUserIdentifier Source { get; set; }
2827

29-
/// <summary>
30-
/// The One Phone System caller source of the call automation client.
31-
/// Mutual exclusive with <see cref="Source"/>.
32-
/// </summary>
33-
public MicrosoftTeamsAppIdentifier OPSSource { get; set; }
34-
3528
/// <summary>
3629
/// Initializes a new instance of the <see cref="CallAutomationClientOptions"/>.
3730
/// </summary>

sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CreateCallRequestInternal.Serialization.cs

Lines changed: 3 additions & 3 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/CreateCallRequestInternal.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/CallInvite.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class CallInvite
1212
{
1313
/// <summary>
1414
/// Creates a new CallInvite object.
15+
/// When the source of the call is a Teams App source, callerIdNumber is not supported and should be null.
1516
/// </summary>
1617
/// <param name="targetPhoneNumberIdentity"></param>
1718
/// <param name="callerIdNumber"></param>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,12 @@ public CreateCallOptions(CallInvite callInvite, Uri callbackUri)
4949
/// AI options for the call such as endpoint URI of the Azure Cognitive Services resource
5050
/// </summary>
5151
public CallIntelligenceOptions CallIntelligenceOptions { get; set; }
52+
53+
/// <summary>
54+
/// Overrides default client source by a MicrosoftTeamsAppIdentifier type source.
55+
/// Required for creating call with Teams resource account ID.
56+
/// This is per-operation setting and does not change the client's default source.
57+
/// </summary>
58+
public MicrosoftTeamsAppIdentifier TeamsAppSource { get; set; }
5259
}
5360
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,12 @@ public CreateGroupCallOptions(IEnumerable<CommunicationIdentifier> targets, Uri
6666
/// The Custom Context which contains SIP and voip headers.
6767
/// </summary>
6868
public CustomCallingContext CustomCallingContext { get; }
69+
70+
/// <summary>
71+
/// Overrides default client source by a MicrosoftTeamsAppIdentifier type source.
72+
/// Required for creating call with Teams resource account ID.
73+
/// This is per-operation setting and does not change the client's default source.
74+
/// </summary>
75+
public MicrosoftTeamsAppIdentifier TeamsAppSource { get; set; }
6976
}
7077
}

sdk/communication/Azure.Communication.CallAutomation/src/autorest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ model-namespace: false
1010
tag: package-2024-09-01-preview
1111

1212
require:
13-
- https://github.com/Azure/azure-rest-api-specs/blob/b9e2d84df17975c0269246afb701eeba545958d0/specification/communication/data-plane/CallAutomation/readme.md
13+
- https://github.com/Azure/azure-rest-api-specs/blob/691fea3efb9ff22b20904e92d5116223f452a3b1/specification/communication/data-plane/CallAutomation/readme.md
1414

1515

1616
title: Azure Communication Services

0 commit comments

Comments
 (0)