Skip to content

Commit 2815707

Browse files
authored
[IotHub] Az.IotHub the Track 1 to SDK (Azure#26845)
* Az.IotHub the Track 1 to SDK * update changelog
1 parent e6142d5 commit 2815707

File tree

141 files changed

+27522
-19217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+27522
-19217
lines changed

src/IotHub/IotHub.Management.Sdk/Generated/CertificatesOperations.cs

Lines changed: 1464 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 307 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,307 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
namespace Microsoft.Azure.Management.IotHub
6+
{
7+
using Microsoft.Rest.Azure;
8+
using Models;
9+
10+
/// <summary>
11+
/// Extension methods for CertificatesOperations
12+
/// </summary>
13+
public static partial class CertificatesOperationsExtensions
14+
{
15+
/// <summary>
16+
/// Returns the list of certificates.
17+
/// </summary>
18+
/// <param name='operations'>
19+
/// The operations group for this extension method.
20+
/// </param>
21+
/// <param name='resourceGroupName'>
22+
/// The name of the resource group that contains the IoT hub.
23+
/// </param>
24+
/// <param name='resourceName'>
25+
/// The name of the IoT hub.
26+
/// </param>
27+
public static CertificateListDescription ListByIotHub(this ICertificatesOperations operations, string resourceGroupName, string resourceName)
28+
{
29+
return ((ICertificatesOperations)operations).ListByIotHubAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
30+
}
31+
32+
/// <summary>
33+
/// Returns the list of certificates.
34+
/// </summary>
35+
/// <param name='operations'>
36+
/// The operations group for this extension method.
37+
/// </param>
38+
/// <param name='resourceGroupName'>
39+
/// The name of the resource group that contains the IoT hub.
40+
/// </param>
41+
/// <param name='resourceName'>
42+
/// The name of the IoT hub.
43+
/// </param>
44+
/// <param name='cancellationToken'>
45+
/// The cancellation token.
46+
/// </param>
47+
public static async System.Threading.Tasks.Task<CertificateListDescription> ListByIotHubAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
48+
{
49+
using (var _result = await operations.ListByIotHubWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
50+
{
51+
return _result.Body;
52+
}
53+
}
54+
/// <summary>
55+
/// Returns the certificate.
56+
/// </summary>
57+
/// <param name='operations'>
58+
/// The operations group for this extension method.
59+
/// </param>
60+
/// <param name='resourceGroupName'>
61+
/// The name of the resource group that contains the IoT hub.
62+
/// </param>
63+
/// <param name='resourceName'>
64+
/// The name of the IoT hub.
65+
/// </param>
66+
/// <param name='certificateName'>
67+
/// The name of the certificate
68+
/// </param>
69+
public static CertificateDescription Get(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName)
70+
{
71+
return ((ICertificatesOperations)operations).GetAsync(resourceGroupName, resourceName, certificateName).GetAwaiter().GetResult();
72+
}
73+
74+
/// <summary>
75+
/// Returns the certificate.
76+
/// </summary>
77+
/// <param name='operations'>
78+
/// The operations group for this extension method.
79+
/// </param>
80+
/// <param name='resourceGroupName'>
81+
/// The name of the resource group that contains the IoT hub.
82+
/// </param>
83+
/// <param name='resourceName'>
84+
/// The name of the IoT hub.
85+
/// </param>
86+
/// <param name='certificateName'>
87+
/// The name of the certificate
88+
/// </param>
89+
/// <param name='cancellationToken'>
90+
/// The cancellation token.
91+
/// </param>
92+
public static async System.Threading.Tasks.Task<CertificateDescription> GetAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
93+
{
94+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, null, cancellationToken).ConfigureAwait(false))
95+
{
96+
return _result.Body;
97+
}
98+
}
99+
/// <summary>
100+
/// Adds new or replaces existing certificate.
101+
/// </summary>
102+
/// <param name='operations'>
103+
/// The operations group for this extension method.
104+
/// </param>
105+
/// <param name='resourceGroupName'>
106+
/// The name of the resource group that contains the IoT hub.
107+
/// </param>
108+
/// <param name='resourceName'>
109+
/// The name of the IoT hub.
110+
/// </param>
111+
/// <param name='certificateName'>
112+
/// The name of the certificate
113+
/// </param>
114+
/// <param name='ifMatch'>
115+
/// ETag of the Certificate. Do not specify for creating a brand new
116+
/// certificate. Required to update an existing certificate.
117+
/// </param>
118+
public static CertificateDescription CreateOrUpdate(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateDescription certificateDescription, string ifMatch = default(string))
119+
{
120+
return ((ICertificatesOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch).GetAwaiter().GetResult();
121+
}
122+
123+
/// <summary>
124+
/// Adds new or replaces existing certificate.
125+
/// </summary>
126+
/// <param name='operations'>
127+
/// The operations group for this extension method.
128+
/// </param>
129+
/// <param name='resourceGroupName'>
130+
/// The name of the resource group that contains the IoT hub.
131+
/// </param>
132+
/// <param name='resourceName'>
133+
/// The name of the IoT hub.
134+
/// </param>
135+
/// <param name='certificateName'>
136+
/// The name of the certificate
137+
/// </param>
138+
/// <param name='ifMatch'>
139+
/// ETag of the Certificate. Do not specify for creating a brand new
140+
/// certificate. Required to update an existing certificate.
141+
/// </param>
142+
/// <param name='cancellationToken'>
143+
/// The cancellation token.
144+
/// </param>
145+
public static async System.Threading.Tasks.Task<CertificateDescription> CreateOrUpdateAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CertificateDescription certificateDescription, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
146+
{
147+
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch, null, cancellationToken).ConfigureAwait(false))
148+
{
149+
return _result.Body;
150+
}
151+
}
152+
/// <summary>
153+
/// Deletes an existing X509 certificate or does nothing if it does not exist.
154+
/// </summary>
155+
/// <param name='operations'>
156+
/// The operations group for this extension method.
157+
/// </param>
158+
/// <param name='resourceGroupName'>
159+
/// The name of the resource group that contains the IoT hub.
160+
/// </param>
161+
/// <param name='resourceName'>
162+
/// The name of the IoT hub.
163+
/// </param>
164+
/// <param name='certificateName'>
165+
/// The name of the certificate
166+
/// </param>
167+
/// <param name='ifMatch'>
168+
/// ETag of the Certificate.
169+
/// </param>
170+
public static void Delete(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch)
171+
{
172+
((ICertificatesOperations)operations).DeleteAsync(resourceGroupName, resourceName, certificateName, ifMatch).GetAwaiter().GetResult();
173+
}
174+
175+
/// <summary>
176+
/// Deletes an existing X509 certificate or does nothing if it does not exist.
177+
/// </summary>
178+
/// <param name='operations'>
179+
/// The operations group for this extension method.
180+
/// </param>
181+
/// <param name='resourceGroupName'>
182+
/// The name of the resource group that contains the IoT hub.
183+
/// </param>
184+
/// <param name='resourceName'>
185+
/// The name of the IoT hub.
186+
/// </param>
187+
/// <param name='certificateName'>
188+
/// The name of the certificate
189+
/// </param>
190+
/// <param name='ifMatch'>
191+
/// ETag of the Certificate.
192+
/// </param>
193+
/// <param name='cancellationToken'>
194+
/// The cancellation token.
195+
/// </param>
196+
public static async System.Threading.Tasks.Task DeleteAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
197+
{
198+
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
199+
}
200+
/// <summary>
201+
/// Generates verification code for proof of possession flow. The verification
202+
/// code will be used to generate a leaf certificate.
203+
/// </summary>
204+
/// <param name='operations'>
205+
/// The operations group for this extension method.
206+
/// </param>
207+
/// <param name='resourceGroupName'>
208+
/// The name of the resource group that contains the IoT hub.
209+
/// </param>
210+
/// <param name='resourceName'>
211+
/// The name of the IoT hub.
212+
/// </param>
213+
/// <param name='certificateName'>
214+
/// The name of the certificate
215+
/// </param>
216+
/// <param name='ifMatch'>
217+
/// ETag of the Certificate.
218+
/// </param>
219+
public static CertificateWithNonceDescription GenerateVerificationCode(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch)
220+
{
221+
return ((ICertificatesOperations)operations).GenerateVerificationCodeAsync(resourceGroupName, resourceName, certificateName, ifMatch).GetAwaiter().GetResult();
222+
}
223+
224+
/// <summary>
225+
/// Generates verification code for proof of possession flow. The verification
226+
/// code will be used to generate a leaf certificate.
227+
/// </summary>
228+
/// <param name='operations'>
229+
/// The operations group for this extension method.
230+
/// </param>
231+
/// <param name='resourceGroupName'>
232+
/// The name of the resource group that contains the IoT hub.
233+
/// </param>
234+
/// <param name='resourceName'>
235+
/// The name of the IoT hub.
236+
/// </param>
237+
/// <param name='certificateName'>
238+
/// The name of the certificate
239+
/// </param>
240+
/// <param name='ifMatch'>
241+
/// ETag of the Certificate.
242+
/// </param>
243+
/// <param name='cancellationToken'>
244+
/// The cancellation token.
245+
/// </param>
246+
public static async System.Threading.Tasks.Task<CertificateWithNonceDescription> GenerateVerificationCodeAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
247+
{
248+
using (var _result = await operations.GenerateVerificationCodeWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, null, cancellationToken).ConfigureAwait(false))
249+
{
250+
return _result.Body;
251+
}
252+
}
253+
/// <summary>
254+
/// Verifies the certificate&#39;s private key possession by providing the leaf
255+
/// cert issued by the verifying pre uploaded certificate.
256+
/// </summary>
257+
/// <param name='operations'>
258+
/// The operations group for this extension method.
259+
/// </param>
260+
/// <param name='resourceGroupName'>
261+
/// The name of the resource group that contains the IoT hub.
262+
/// </param>
263+
/// <param name='resourceName'>
264+
/// The name of the IoT hub.
265+
/// </param>
266+
/// <param name='certificateName'>
267+
/// The name of the certificate
268+
/// </param>
269+
/// <param name='ifMatch'>
270+
/// ETag of the Certificate.
271+
/// </param>
272+
public static CertificateDescription Verify(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CertificateVerificationDescription certificateVerificationBody)
273+
{
274+
return ((ICertificatesOperations)operations).VerifyAsync(resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody).GetAwaiter().GetResult();
275+
}
276+
277+
/// <summary>
278+
/// Verifies the certificate&#39;s private key possession by providing the leaf
279+
/// cert issued by the verifying pre uploaded certificate.
280+
/// </summary>
281+
/// <param name='operations'>
282+
/// The operations group for this extension method.
283+
/// </param>
284+
/// <param name='resourceGroupName'>
285+
/// The name of the resource group that contains the IoT hub.
286+
/// </param>
287+
/// <param name='resourceName'>
288+
/// The name of the IoT hub.
289+
/// </param>
290+
/// <param name='certificateName'>
291+
/// The name of the certificate
292+
/// </param>
293+
/// <param name='ifMatch'>
294+
/// ETag of the Certificate.
295+
/// </param>
296+
/// <param name='cancellationToken'>
297+
/// The cancellation token.
298+
/// </param>
299+
public static async System.Threading.Tasks.Task<CertificateDescription> VerifyAsync(this ICertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CertificateVerificationDescription certificateVerificationBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
300+
{
301+
using (var _result = await operations.VerifyWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody, null, cancellationToken).ConfigureAwait(false))
302+
{
303+
return _result.Body;
304+
}
305+
}
306+
}
307+
}

0 commit comments

Comments
 (0)