Skip to content

Commit ea9452f

Browse files
committed
Add Anycast parameter to GetRelayConfiguration
1 parent 20166e9 commit ea9452f

25 files changed

+591
-270
lines changed

sdk/communication/Azure.Communication.NetworkTraversal/src/CommunicationRelayClient.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,16 @@ protected CommunicationRelayClient()
9292

9393
/// <summary>Gets a Relay Configuration for a <see cref="CommunicationUserIdentifier"/>.</summary>
9494
/// <param name="communicationUser">The <see cref="CommunicationUserIdentifier"/> for whom to issue a token.</param>
95+
/// <param name="routeType"> The specified <see cref="CommunicationRelayConfigurationRequestRouteType"/> for the relay request </param>
9596
/// <param name="cancellationToken">The cancellation token to use.</param>
9697
/// <exception cref="RequestFailedException">The server returned an error.</exception>
97-
public virtual Response<CommunicationRelayConfiguration> GetRelayConfiguration(CommunicationUserIdentifier communicationUser = null, CancellationToken cancellationToken = default)
98+
public virtual Response<CommunicationRelayConfiguration> GetRelayConfiguration(CommunicationUserIdentifier communicationUser = null, CommunicationRelayConfigurationRequestRouteType? routeType = null, CancellationToken cancellationToken = default)
9899
{
99100
using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CommunicationRelayClient)}.{nameof(GetRelayConfiguration)}");
100101
scope.Start();
101102
try
102103
{
103-
return RestClient.IssueRelayConfiguration(communicationUser?.Id, cancellationToken);
104+
return RestClient.IssueRelayConfiguration(communicationUser?.Id, routeType, cancellationToken);
104105
}
105106
catch (Exception ex)
106107
{
@@ -111,14 +112,15 @@ public virtual Response<CommunicationRelayConfiguration> GetRelayConfiguration(C
111112

112113
/// <summary>Asynchronously gets a Relay Configuration for a <see cref="CommunicationUserIdentifier"/>.</summary>
113114
/// <param name="communicationUser">The <see cref="CommunicationUserIdentifier"/> for whom to issue a token.</param>
115+
/// <param name="routeType"> The specified <see cref="CommunicationRelayConfigurationRequestRouteType"/> for the relay request </param>
114116
/// <param name="cancellationToken">The cancellation token to use.</param>
115-
public virtual async Task<Response<CommunicationRelayConfiguration>> GetRelayConfigurationAsync(CommunicationUserIdentifier communicationUser = null, CancellationToken cancellationToken = default)
117+
public virtual async Task<Response<CommunicationRelayConfiguration>> GetRelayConfigurationAsync(CommunicationUserIdentifier communicationUser = null, CommunicationRelayConfigurationRequestRouteType? routeType = null, CancellationToken cancellationToken = default)
116118
{
117119
using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CommunicationRelayClient)}.{nameof(GetRelayConfiguration)}");
118120
scope.Start();
119121
try
120122
{
121-
return await RestClient.IssueRelayConfigurationAsync(communicationUser?.Id, cancellationToken).ConfigureAwait(false);
123+
return await RestClient.IssueRelayConfigurationAsync(communicationUser?.Id, routeType, cancellationToken).ConfigureAwait(false);
122124
}
123125
catch (Exception ex)
124126
{

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/CommunicationNetworkTraversalRestClient.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/Models/CommunicationIceServer.Serialization.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/Models/CommunicationIceServer.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/Models/CommunicationIceServerRouteType.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/Models/CommunicationRelayConfigurationRequest.Serialization.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/Models/CommunicationRelayConfigurationRequest.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/Models/CommunicationRelayConfigurationRequestRouteType.cs

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

sdk/communication/Azure.Communication.NetworkTraversal/src/Generated/NetworkTraversalModelFactory.cs

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

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Run `dotnet msbuild /t:GenerateCode` to generate code.
77
88
``` yaml
99
title: Network traversal
10-
tag: package-2021-06-21-preview
10+
tag: package-2021-10-08-preview
1111
model-namespace: false
1212
require:
13-
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/4c8162b0a1f7bbd46e9aedc0e19bbe181e549c4c/specification/communication/data-plane/NetworkTraversal/readme.md
13+
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/7e6be1c9e6c04f932795cb114599e9b5b0c90d0a/specification/communication/data-plane/NetworkTraversal/readme.md
1414
payload-flattening-threshold: 3
1515
```

0 commit comments

Comments
 (0)