| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using Azure.Core; |
| | | 5 | | using System; |
| | | 6 | | |
| | | 7 | | namespace Azure.Analytics.Synapse.AccessControl |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// The options for <see cref="AccessControlClient"/>. |
| | | 11 | | /// </summary> |
| | | 12 | | public class AccessControlClientOptions : ClientOptions |
| | | 13 | | { |
| | | 14 | | private const ServiceVersion Latest = ServiceVersion.V2020_02_01_preview; |
| | | 15 | | |
| | 0 | 16 | | internal static AccessControlClientOptions Default { get; } = new AccessControlClientOptions(); |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Initializes a new instance of the <see cref="AccessControlClientOptions"/>. |
| | | 20 | | /// </summary> |
| | 16 | 21 | | public AccessControlClientOptions(ServiceVersion serviceVersion = Latest) |
| | | 22 | | { |
| | 16 | 23 | | VersionString = serviceVersion switch |
| | 16 | 24 | | { |
| | 32 | 25 | | ServiceVersion.V2020_02_01_preview => "2020-02-01-preview", |
| | 0 | 26 | | _ => throw new ArgumentOutOfRangeException(nameof(serviceVersion)) |
| | 16 | 27 | | }; |
| | 16 | 28 | | } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// API version for Azure Synapse Access Control service. |
| | | 32 | | /// </summary> |
| | 16 | 33 | | internal string VersionString { get; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// The Synapse service version. |
| | | 37 | | /// </summary> |
| | | 38 | | public enum ServiceVersion |
| | | 39 | | { |
| | | 40 | | /// <summary> |
| | | 41 | | /// The 2019-06-01-preview of the template service. |
| | | 42 | | /// </summary> |
| | | 43 | | #pragma warning disable CA1707 |
| | | 44 | | V2020_02_01_preview = 1 |
| | | 45 | | #pragma warning restore CA1707 |
| | | 46 | | } |
| | | 47 | | } |
| | | 48 | | } |