Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Communication] - Follow standards for identity client options version #18400

Merged
merged 1 commit into from
Feb 4, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public CommunicationIdentityClient(System.Uri endpoint, Azure.Core.TokenCredenti
}
public partial class CommunicationIdentityClientOptions : Azure.Core.ClientOptions
{
public CommunicationIdentityClientOptions(Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion version = Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion.V1) { }
public CommunicationIdentityClientOptions(Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion version = Azure.Communication.Identity.CommunicationIdentityClientOptions.ServiceVersion.V2021_03_07) { }
public enum ServiceVersion
{
V1 = 1,
V2021_03_07 = 1,
}
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace Azure.Communication.Identity
public class CommunicationIdentityClientOptions : ClientOptions
{
/// <summary>
/// The latest version of the token service.
/// The latest version of the identity service.
/// </summary>
internal const ServiceVersion LatestVersion = ServiceVersion.V1;
internal const ServiceVersion LatestVersion = ServiceVersion.V2021_03_07;

internal string ApiVersion { get; }

Expand All @@ -25,7 +25,7 @@ public CommunicationIdentityClientOptions(ServiceVersion version = LatestVersion
{
ApiVersion = version switch
{
ServiceVersion.V1 => "2021-03-07",
ServiceVersion.V2021_03_07 => "2021-03-07",
_ => throw new ArgumentOutOfRangeException(nameof(version)),
};
}
Expand All @@ -36,9 +36,11 @@ public CommunicationIdentityClientOptions(ServiceVersion version = LatestVersion
public enum ServiceVersion
{
/// <summary>
/// The V1 of the token service.
/// The V2021_03_07 of the identity service.
/// </summary>
V1 = 1
#pragma warning disable CA1707 // Identifiers should not contain underscores
V2021_03_07 = 1,
#pragma warning restore CA1707 // Identifiers should not contain underscores
}
}
}