|
1 |
| -// <auto-generated> |
2 | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
|
3 |
| -// Licensed under the MIT License. See License.txt in the project root for |
4 |
| -// license information. |
5 |
| -// |
| 2 | +// Licensed under the MIT License. See License.txt in the project root for license information. |
6 | 3 | // Code generated by Microsoft (R) AutoRest Code Generator.
|
7 |
| -// Changes may cause incorrect behavior and will be lost if the code is |
8 |
| -// regenerated. |
9 |
| -// </auto-generated> |
10 |
| - |
| 4 | +// Changes may cause incorrect behavior and will be lost if the code is regenerated. |
11 | 5 | namespace Microsoft.Azure.Management.CognitiveServices
|
12 | 6 | {
|
13 |
| - using Microsoft.Rest; |
14 | 7 | using Microsoft.Rest.Azure;
|
15 | 8 | using Models;
|
16 |
| - using System.Collections; |
17 |
| - using System.Collections.Generic; |
18 |
| - using System.Threading; |
19 |
| - using System.Threading.Tasks; |
20 | 9 |
|
21 | 10 | /// <summary>
|
22 |
| - /// Extension methods for CognitiveServicesManagementClient. |
| 11 | + /// Extension methods for CognitiveServicesManagementClient |
23 | 12 | /// </summary>
|
24 | 13 | public static partial class CognitiveServicesManagementClientExtensions
|
25 | 14 | {
|
26 |
| - /// <summary> |
27 |
| - /// Check available SKUs. |
28 |
| - /// </summary> |
29 |
| - /// <param name='operations'> |
30 |
| - /// The operations group for this extension method. |
31 |
| - /// </param> |
32 |
| - /// <param name='location'> |
33 |
| - /// Resource location. |
34 |
| - /// </param> |
35 |
| - /// <param name='skus'> |
36 |
| - /// The SKU of the resource. |
37 |
| - /// </param> |
38 |
| - /// <param name='kind'> |
39 |
| - /// The Kind of the resource. |
40 |
| - /// </param> |
41 |
| - /// <param name='type'> |
42 |
| - /// The Type of the resource. |
43 |
| - /// </param> |
44 |
| - public static SkuAvailabilityListResult CheckSkuAvailability(this ICognitiveServicesManagementClient operations, string location, IList<string> skus, string kind, string type) |
45 |
| - { |
46 |
| - return operations.CheckSkuAvailabilityAsync(location, skus, kind, type).GetAwaiter().GetResult(); |
47 |
| - } |
| 15 | + /// <summary> |
| 16 | + /// Check available SKUs. |
| 17 | + /// </summary> |
| 18 | + /// <param name='operations'> |
| 19 | + /// The operations group for this extension method. |
| 20 | + /// </param> |
| 21 | + /// <param name='location'> |
| 22 | + /// Resource location. |
| 23 | + /// </param> |
| 24 | + public static SkuAvailabilityListResult CheckSkuAvailability(this ICognitiveServicesManagementClient operations, string location, System.Collections.Generic.IList<string> skus, string kind, string type) |
| 25 | + { |
| 26 | + return ((ICognitiveServicesManagementClient)operations).CheckSkuAvailabilityAsync(location, skus, kind, type).GetAwaiter().GetResult(); |
| 27 | + } |
48 | 28 |
|
49 |
| - /// <summary> |
50 |
| - /// Check available SKUs. |
51 |
| - /// </summary> |
52 |
| - /// <param name='operations'> |
53 |
| - /// The operations group for this extension method. |
54 |
| - /// </param> |
55 |
| - /// <param name='location'> |
56 |
| - /// Resource location. |
57 |
| - /// </param> |
58 |
| - /// <param name='skus'> |
59 |
| - /// The SKU of the resource. |
60 |
| - /// </param> |
61 |
| - /// <param name='kind'> |
62 |
| - /// The Kind of the resource. |
63 |
| - /// </param> |
64 |
| - /// <param name='type'> |
65 |
| - /// The Type of the resource. |
66 |
| - /// </param> |
67 |
| - /// <param name='cancellationToken'> |
68 |
| - /// The cancellation token. |
69 |
| - /// </param> |
70 |
| - public static async Task<SkuAvailabilityListResult> CheckSkuAvailabilityAsync(this ICognitiveServicesManagementClient operations, string location, IList<string> skus, string kind, string type, CancellationToken cancellationToken = default(CancellationToken)) |
| 29 | + /// <summary> |
| 30 | + /// Check available SKUs. |
| 31 | + /// </summary> |
| 32 | + /// <param name='operations'> |
| 33 | + /// The operations group for this extension method. |
| 34 | + /// </param> |
| 35 | + /// <param name='location'> |
| 36 | + /// Resource location. |
| 37 | + /// </param> |
| 38 | + /// <param name='cancellationToken'> |
| 39 | + /// The cancellation token. |
| 40 | + /// </param> |
| 41 | + public static async System.Threading.Tasks.Task<SkuAvailabilityListResult> CheckSkuAvailabilityAsync(this ICognitiveServicesManagementClient operations, string location, System.Collections.Generic.IList<string> skus, string kind, string type, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 42 | + { |
| 43 | + using (var _result = await operations.CheckSkuAvailabilityWithHttpMessagesAsync(location, skus, kind, type, null, cancellationToken).ConfigureAwait(false)) |
71 | 44 | {
|
72 |
| - using (var _result = await operations.CheckSkuAvailabilityWithHttpMessagesAsync(location, skus, kind, type, null, cancellationToken).ConfigureAwait(false)) |
73 |
| - { |
74 |
| - return _result.Body; |
75 |
| - } |
| 45 | + return _result.Body; |
76 | 46 | }
|
| 47 | + } |
| 48 | + /// <summary> |
| 49 | + /// Check whether a domain is available. |
| 50 | + /// </summary> |
| 51 | + /// <param name='operations'> |
| 52 | + /// The operations group for this extension method. |
| 53 | + /// </param> |
| 54 | + public static DomainAvailability CheckDomainAvailability(this ICognitiveServicesManagementClient operations, string subdomainName, string type, string kind = default(string)) |
| 55 | + { |
| 56 | + return ((ICognitiveServicesManagementClient)operations).CheckDomainAvailabilityAsync(subdomainName, type, kind).GetAwaiter().GetResult(); |
| 57 | + } |
77 | 58 |
|
78 |
| - /// <summary> |
79 |
| - /// Check whether a domain is available. |
80 |
| - /// </summary> |
81 |
| - /// <param name='operations'> |
82 |
| - /// The operations group for this extension method. |
83 |
| - /// </param> |
84 |
| - /// <param name='subdomainName'> |
85 |
| - /// The subdomain name to use. |
86 |
| - /// </param> |
87 |
| - /// <param name='type'> |
88 |
| - /// The Type of the resource. |
89 |
| - /// </param> |
90 |
| - /// <param name='kind'> |
91 |
| - /// The Kind of the resource. |
92 |
| - /// </param> |
93 |
| - public static DomainAvailability CheckDomainAvailability(this ICognitiveServicesManagementClient operations, string subdomainName, string type, string kind = default(string)) |
| 59 | + /// <summary> |
| 60 | + /// Check whether a domain is available. |
| 61 | + /// </summary> |
| 62 | + /// <param name='operations'> |
| 63 | + /// The operations group for this extension method. |
| 64 | + /// </param> |
| 65 | + /// <param name='cancellationToken'> |
| 66 | + /// The cancellation token. |
| 67 | + /// </param> |
| 68 | + public static async System.Threading.Tasks.Task<DomainAvailability> CheckDomainAvailabilityAsync(this ICognitiveServicesManagementClient operations, string subdomainName, string type, string kind = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 69 | + { |
| 70 | + using (var _result = await operations.CheckDomainAvailabilityWithHttpMessagesAsync(subdomainName, type, kind, null, cancellationToken).ConfigureAwait(false)) |
94 | 71 | {
|
95 |
| - return operations.CheckDomainAvailabilityAsync(subdomainName, type, kind).GetAwaiter().GetResult(); |
| 72 | + return _result.Body; |
96 | 73 | }
|
97 |
| - |
98 |
| - /// <summary> |
99 |
| - /// Check whether a domain is available. |
100 |
| - /// </summary> |
101 |
| - /// <param name='operations'> |
102 |
| - /// The operations group for this extension method. |
103 |
| - /// </param> |
104 |
| - /// <param name='subdomainName'> |
105 |
| - /// The subdomain name to use. |
106 |
| - /// </param> |
107 |
| - /// <param name='type'> |
108 |
| - /// The Type of the resource. |
109 |
| - /// </param> |
110 |
| - /// <param name='kind'> |
111 |
| - /// The Kind of the resource. |
112 |
| - /// </param> |
113 |
| - /// <param name='cancellationToken'> |
114 |
| - /// The cancellation token. |
115 |
| - /// </param> |
116 |
| - public static async Task<DomainAvailability> CheckDomainAvailabilityAsync(this ICognitiveServicesManagementClient operations, string subdomainName, string type, string kind = default(string), CancellationToken cancellationToken = default(CancellationToken)) |
117 |
| - { |
118 |
| - using (var _result = await operations.CheckDomainAvailabilityWithHttpMessagesAsync(subdomainName, type, kind, null, cancellationToken).ConfigureAwait(false)) |
119 |
| - { |
120 |
| - return _result.Body; |
121 |
| - } |
122 |
| - } |
123 |
| - |
| 74 | + } |
124 | 75 | }
|
125 | 76 | }
|
0 commit comments