-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
DevTestLabsExtensions.cs
667 lines (630 loc) · 39.6 KB
/
DevTestLabsExtensions.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.DevTestLabs
{
/// <summary> A class to add extension methods to Azure.ResourceManager.DevTestLabs. </summary>
public static partial class DevTestLabsExtensions
{
private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmResource resource)
{
return resource.GetCachedClient(client =>
{
return new ResourceGroupResourceExtensionClient(client, resource.Id);
});
}
private static ResourceGroupResourceExtensionClient GetResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifier scope)
{
return client.GetResourceClient(() =>
{
return new ResourceGroupResourceExtensionClient(client, scope);
});
}
private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmResource resource)
{
return resource.GetCachedClient(client =>
{
return new SubscriptionResourceExtensionClient(client, resource.Id);
});
}
private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifier scope)
{
return client.GetResourceClient(() =>
{
return new SubscriptionResourceExtensionClient(client, scope);
});
}
#region DevTestLabResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabResource" /> object. </returns>
public static DevTestLabResource GetDevTestLabResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabResource.ValidateResourceId(id);
return new DevTestLabResource(client, id);
}
);
}
#endregion
#region DevTestLabGlobalScheduleResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabGlobalScheduleResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabGlobalScheduleResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabGlobalScheduleResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabGlobalScheduleResource" /> object. </returns>
public static DevTestLabGlobalScheduleResource GetDevTestLabGlobalScheduleResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabGlobalScheduleResource.ValidateResourceId(id);
return new DevTestLabGlobalScheduleResource(client, id);
}
);
}
#endregion
#region DevTestLabScheduleResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabScheduleResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabScheduleResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabScheduleResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabScheduleResource" /> object. </returns>
public static DevTestLabScheduleResource GetDevTestLabScheduleResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabScheduleResource.ValidateResourceId(id);
return new DevTestLabScheduleResource(client, id);
}
);
}
#endregion
#region DevTestLabServiceFabricScheduleResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabServiceFabricScheduleResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabServiceFabricScheduleResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabServiceFabricScheduleResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabServiceFabricScheduleResource" /> object. </returns>
public static DevTestLabServiceFabricScheduleResource GetDevTestLabServiceFabricScheduleResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabServiceFabricScheduleResource.ValidateResourceId(id);
return new DevTestLabServiceFabricScheduleResource(client, id);
}
);
}
#endregion
#region DevTestLabVmScheduleResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabVmScheduleResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabVmScheduleResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabVmScheduleResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabVmScheduleResource" /> object. </returns>
public static DevTestLabVmScheduleResource GetDevTestLabVmScheduleResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabVmScheduleResource.ValidateResourceId(id);
return new DevTestLabVmScheduleResource(client, id);
}
);
}
#endregion
#region DevTestLabArtifactSourceResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabArtifactSourceResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabArtifactSourceResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabArtifactSourceResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabArtifactSourceResource" /> object. </returns>
public static DevTestLabArtifactSourceResource GetDevTestLabArtifactSourceResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabArtifactSourceResource.ValidateResourceId(id);
return new DevTestLabArtifactSourceResource(client, id);
}
);
}
#endregion
#region DevTestLabArmTemplateResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabArmTemplateResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabArmTemplateResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabArmTemplateResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabArmTemplateResource" /> object. </returns>
public static DevTestLabArmTemplateResource GetDevTestLabArmTemplateResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabArmTemplateResource.ValidateResourceId(id);
return new DevTestLabArmTemplateResource(client, id);
}
);
}
#endregion
#region DevTestLabArtifactResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabArtifactResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabArtifactResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabArtifactResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabArtifactResource" /> object. </returns>
public static DevTestLabArtifactResource GetDevTestLabArtifactResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabArtifactResource.ValidateResourceId(id);
return new DevTestLabArtifactResource(client, id);
}
);
}
#endregion
#region DevTestLabCostResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabCostResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabCostResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabCostResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabCostResource" /> object. </returns>
public static DevTestLabCostResource GetDevTestLabCostResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabCostResource.ValidateResourceId(id);
return new DevTestLabCostResource(client, id);
}
);
}
#endregion
#region DevTestLabCustomImageResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabCustomImageResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabCustomImageResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabCustomImageResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabCustomImageResource" /> object. </returns>
public static DevTestLabCustomImageResource GetDevTestLabCustomImageResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabCustomImageResource.ValidateResourceId(id);
return new DevTestLabCustomImageResource(client, id);
}
);
}
#endregion
#region DevTestLabFormulaResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabFormulaResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabFormulaResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabFormulaResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabFormulaResource" /> object. </returns>
public static DevTestLabFormulaResource GetDevTestLabFormulaResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabFormulaResource.ValidateResourceId(id);
return new DevTestLabFormulaResource(client, id);
}
);
}
#endregion
#region DevTestLabNotificationChannelResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabNotificationChannelResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabNotificationChannelResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabNotificationChannelResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabNotificationChannelResource" /> object. </returns>
public static DevTestLabNotificationChannelResource GetDevTestLabNotificationChannelResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabNotificationChannelResource.ValidateResourceId(id);
return new DevTestLabNotificationChannelResource(client, id);
}
);
}
#endregion
#region DevTestLabPolicyResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabPolicyResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabPolicyResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabPolicyResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabPolicyResource" /> object. </returns>
public static DevTestLabPolicyResource GetDevTestLabPolicyResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabPolicyResource.ValidateResourceId(id);
return new DevTestLabPolicyResource(client, id);
}
);
}
#endregion
#region DevTestLabServiceRunnerResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabServiceRunnerResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabServiceRunnerResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabServiceRunnerResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabServiceRunnerResource" /> object. </returns>
public static DevTestLabServiceRunnerResource GetDevTestLabServiceRunnerResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabServiceRunnerResource.ValidateResourceId(id);
return new DevTestLabServiceRunnerResource(client, id);
}
);
}
#endregion
#region DevTestLabUserResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabUserResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabUserResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabUserResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabUserResource" /> object. </returns>
public static DevTestLabUserResource GetDevTestLabUserResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabUserResource.ValidateResourceId(id);
return new DevTestLabUserResource(client, id);
}
);
}
#endregion
#region DevTestLabDiskResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabDiskResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabDiskResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabDiskResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabDiskResource" /> object. </returns>
public static DevTestLabDiskResource GetDevTestLabDiskResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabDiskResource.ValidateResourceId(id);
return new DevTestLabDiskResource(client, id);
}
);
}
#endregion
#region DevTestLabEnvironmentResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabEnvironmentResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabEnvironmentResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabEnvironmentResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabEnvironmentResource" /> object. </returns>
public static DevTestLabEnvironmentResource GetDevTestLabEnvironmentResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabEnvironmentResource.ValidateResourceId(id);
return new DevTestLabEnvironmentResource(client, id);
}
);
}
#endregion
#region DevTestLabSecretResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabSecretResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabSecretResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabSecretResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabSecretResource" /> object. </returns>
public static DevTestLabSecretResource GetDevTestLabSecretResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabSecretResource.ValidateResourceId(id);
return new DevTestLabSecretResource(client, id);
}
);
}
#endregion
#region DevTestLabServiceFabricResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabServiceFabricResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabServiceFabricResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabServiceFabricResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabServiceFabricResource" /> object. </returns>
public static DevTestLabServiceFabricResource GetDevTestLabServiceFabricResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabServiceFabricResource.ValidateResourceId(id);
return new DevTestLabServiceFabricResource(client, id);
}
);
}
#endregion
#region DevTestLabVmResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabVmResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabVmResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabVmResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabVmResource" /> object. </returns>
public static DevTestLabVmResource GetDevTestLabVmResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabVmResource.ValidateResourceId(id);
return new DevTestLabVmResource(client, id);
}
);
}
#endregion
#region DevTestLabVirtualNetworkResource
/// <summary>
/// Gets an object representing a <see cref="DevTestLabVirtualNetworkResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="DevTestLabVirtualNetworkResource.CreateResourceIdentifier" /> to create a <see cref="DevTestLabVirtualNetworkResource" /> <see cref="ResourceIdentifier" /> from its components.
/// </summary>
/// <param name="client"> The <see cref="ArmClient" /> instance the method will execute against. </param>
/// <param name="id"> The resource ID of the resource to get. </param>
/// <returns> Returns a <see cref="DevTestLabVirtualNetworkResource" /> object. </returns>
public static DevTestLabVirtualNetworkResource GetDevTestLabVirtualNetworkResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
DevTestLabVirtualNetworkResource.ValidateResourceId(id);
return new DevTestLabVirtualNetworkResource(client, id);
}
);
}
#endregion
/// <summary> Gets a collection of DevTestLabResources in the ResourceGroupResource. </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <returns> An object representing collection of DevTestLabResources and their operations over a DevTestLabResource. </returns>
public static DevTestLabCollection GetDevTestLabs(this ResourceGroupResource resourceGroupResource)
{
return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDevTestLabs();
}
/// <summary>
/// Get lab.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Labs_Get</description>
/// </item>
/// </list>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <param name="name"> The name of the lab. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="name"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
[ForwardsClientCalls]
public static async Task<Response<DevTestLabResource>> GetDevTestLabAsync(this ResourceGroupResource resourceGroupResource, string name, string expand = null, CancellationToken cancellationToken = default)
{
return await resourceGroupResource.GetDevTestLabs().GetAsync(name, expand, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get lab.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Labs_Get</description>
/// </item>
/// </list>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <param name="name"> The name of the lab. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="name"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
[ForwardsClientCalls]
public static Response<DevTestLabResource> GetDevTestLab(this ResourceGroupResource resourceGroupResource, string name, string expand = null, CancellationToken cancellationToken = default)
{
return resourceGroupResource.GetDevTestLabs().Get(name, expand, cancellationToken);
}
/// <summary> Gets a collection of DevTestLabGlobalScheduleResources in the ResourceGroupResource. </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <returns> An object representing collection of DevTestLabGlobalScheduleResources and their operations over a DevTestLabGlobalScheduleResource. </returns>
public static DevTestLabGlobalScheduleCollection GetDevTestLabGlobalSchedules(this ResourceGroupResource resourceGroupResource)
{
return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetDevTestLabGlobalSchedules();
}
/// <summary>
/// Get schedule.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>GlobalSchedules_Get</description>
/// </item>
/// </list>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <param name="name"> The name of the schedule. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=status)'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="name"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
[ForwardsClientCalls]
public static async Task<Response<DevTestLabGlobalScheduleResource>> GetDevTestLabGlobalScheduleAsync(this ResourceGroupResource resourceGroupResource, string name, string expand = null, CancellationToken cancellationToken = default)
{
return await resourceGroupResource.GetDevTestLabGlobalSchedules().GetAsync(name, expand, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get schedule.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/schedules/{name}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>GlobalSchedules_Get</description>
/// </item>
/// </list>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <param name="name"> The name of the schedule. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=status)'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentException"> <paramref name="name"/> is an empty string, and was expected to be non-empty. </exception>
/// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
[ForwardsClientCalls]
public static Response<DevTestLabGlobalScheduleResource> GetDevTestLabGlobalSchedule(this ResourceGroupResource resourceGroupResource, string name, string expand = null, CancellationToken cancellationToken = default)
{
return resourceGroupResource.GetDevTestLabGlobalSchedules().Get(name, expand, cancellationToken);
}
/// <summary>
/// List labs in a subscription.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Labs_ListBySubscription</description>
/// </item>
/// </list>
/// </summary>
/// <param name="subscriptionResource"> The <see cref="SubscriptionResource" /> instance the method will execute against. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'. </param>
/// <param name="filter"> The filter to apply to the operation. Example: '$filter=contains(name,'myName'). </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="orderby"> The ordering expression for the results, using OData notation. Example: '$orderby=name desc'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="DevTestLabResource" /> that may take multiple service requests to iterate over. </returns>
public static AsyncPageable<DevTestLabResource> GetDevTestLabsAsync(this SubscriptionResource subscriptionResource, string expand = null, string filter = null, int? top = null, string orderby = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDevTestLabsAsync(expand, filter, top, orderby, cancellationToken);
}
/// <summary>
/// List labs in a subscription.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/labs</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Labs_ListBySubscription</description>
/// </item>
/// </list>
/// </summary>
/// <param name="subscriptionResource"> The <see cref="SubscriptionResource" /> instance the method will execute against. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'. </param>
/// <param name="filter"> The filter to apply to the operation. Example: '$filter=contains(name,'myName'). </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="orderby"> The ordering expression for the results, using OData notation. Example: '$orderby=name desc'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="DevTestLabResource" /> that may take multiple service requests to iterate over. </returns>
public static Pageable<DevTestLabResource> GetDevTestLabs(this SubscriptionResource subscriptionResource, string expand = null, string filter = null, int? top = null, string orderby = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDevTestLabs(expand, filter, top, orderby, cancellationToken);
}
/// <summary>
/// List schedules in a subscription.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>GlobalSchedules_ListBySubscription</description>
/// </item>
/// </list>
/// </summary>
/// <param name="subscriptionResource"> The <see cref="SubscriptionResource" /> instance the method will execute against. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=status)'. </param>
/// <param name="filter"> The filter to apply to the operation. Example: '$filter=contains(name,'myName'). </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="orderby"> The ordering expression for the results, using OData notation. Example: '$orderby=name desc'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="DevTestLabGlobalScheduleResource" /> that may take multiple service requests to iterate over. </returns>
public static AsyncPageable<DevTestLabGlobalScheduleResource> GetDevTestLabGlobalSchedulesAsync(this SubscriptionResource subscriptionResource, string expand = null, string filter = null, int? top = null, string orderby = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDevTestLabGlobalSchedulesAsync(expand, filter, top, orderby, cancellationToken);
}
/// <summary>
/// List schedules in a subscription.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Microsoft.DevTestLab/schedules</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>GlobalSchedules_ListBySubscription</description>
/// </item>
/// </list>
/// </summary>
/// <param name="subscriptionResource"> The <see cref="SubscriptionResource" /> instance the method will execute against. </param>
/// <param name="expand"> Specify the $expand query. Example: 'properties($select=status)'. </param>
/// <param name="filter"> The filter to apply to the operation. Example: '$filter=contains(name,'myName'). </param>
/// <param name="top"> The maximum number of resources to return from the operation. Example: '$top=10'. </param>
/// <param name="orderby"> The ordering expression for the results, using OData notation. Example: '$orderby=name desc'. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="DevTestLabGlobalScheduleResource" /> that may take multiple service requests to iterate over. </returns>
public static Pageable<DevTestLabGlobalScheduleResource> GetDevTestLabGlobalSchedules(this SubscriptionResource subscriptionResource, string expand = null, string filter = null, int? top = null, string orderby = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDevTestLabGlobalSchedules(expand, filter, top, orderby, cancellationToken);
}
}
}