-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
EventGridClientOptions.cs
43 lines (36 loc) · 1.42 KB
/
EventGridClientOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using Azure.Core;
namespace Azure.Messaging.EventGrid.Namespaces
{
/// <summary> Client options for EventGridClient. </summary>
public partial class EventGridClientOptions : ClientOptions
{
private const ServiceVersion LatestVersion = ServiceVersion.V2023_10_01_Preview;
/// <summary> The version of the service to use. </summary>
public enum ServiceVersion
{
/// <summary> Service version "2023-11-01". </summary>
V2023_11_01 = 1,
/// <summary> Service version "2023-06-01-preview". </summary>
V2023_06_01_Preview = 2,
/// <summary> Service version "2023-10-01-preview". </summary>
V2023_10_01_Preview = 3,
}
internal string Version { get; }
/// <summary> Initializes new instance of EventGridClientOptions. </summary>
public EventGridClientOptions(ServiceVersion version = LatestVersion)
{
Version = version switch
{
ServiceVersion.V2023_11_01 => "2023-11-01",
ServiceVersion.V2023_06_01_Preview => "2023-06-01-preview",
ServiceVersion.V2023_10_01_Preview => "2023-10-01-preview",
_ => throw new NotSupportedException()
};
}
}
}