/
CustomerInsightsExtensions.cs
436 lines (392 loc) · 28 KB
/
CustomerInsightsExtensions.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
// 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.CustomerInsights.Mocking;
using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.CustomerInsights
{
/// <summary> A class to add extension methods to Azure.ResourceManager.CustomerInsights. </summary>
public static partial class CustomerInsightsExtensions
{
private static MockableCustomerInsightsArmClient GetMockableCustomerInsightsArmClient(ArmClient client)
{
return client.GetCachedClient(client0 => new MockableCustomerInsightsArmClient(client0));
}
private static MockableCustomerInsightsResourceGroupResource GetMockableCustomerInsightsResourceGroupResource(ArmResource resource)
{
return resource.GetCachedClient(client => new MockableCustomerInsightsResourceGroupResource(client, resource.Id));
}
private static MockableCustomerInsightsSubscriptionResource GetMockableCustomerInsightsSubscriptionResource(ArmResource resource)
{
return resource.GetCachedClient(client => new MockableCustomerInsightsSubscriptionResource(client, resource.Id));
}
/// <summary>
/// Gets an object representing a <see cref="HubResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="HubResource.CreateResourceIdentifier" /> to create a <see cref="HubResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetHubResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="HubResource"/> object. </returns>
public static HubResource GetHubResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetHubResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="ProfileResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ProfileResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="ProfileResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetProfileResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="ProfileResourceFormatResource"/> object. </returns>
public static ProfileResourceFormatResource GetProfileResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetProfileResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing an <see cref="InteractionResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="InteractionResourceFormatResource.CreateResourceIdentifier" /> to create an <see cref="InteractionResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetInteractionResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="InteractionResourceFormatResource"/> object. </returns>
public static InteractionResourceFormatResource GetInteractionResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetInteractionResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="RelationshipResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="RelationshipResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="RelationshipResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetRelationshipResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="RelationshipResourceFormatResource"/> object. </returns>
public static RelationshipResourceFormatResource GetRelationshipResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetRelationshipResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="RelationshipLinkResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="RelationshipLinkResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="RelationshipLinkResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetRelationshipLinkResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="RelationshipLinkResourceFormatResource"/> object. </returns>
public static RelationshipLinkResourceFormatResource GetRelationshipLinkResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetRelationshipLinkResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing an <see cref="AuthorizationPolicyResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="AuthorizationPolicyResourceFormatResource.CreateResourceIdentifier" /> to create an <see cref="AuthorizationPolicyResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetAuthorizationPolicyResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="AuthorizationPolicyResourceFormatResource"/> object. </returns>
public static AuthorizationPolicyResourceFormatResource GetAuthorizationPolicyResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetAuthorizationPolicyResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="ConnectorResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ConnectorResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="ConnectorResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetConnectorResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="ConnectorResourceFormatResource"/> object. </returns>
public static ConnectorResourceFormatResource GetConnectorResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetConnectorResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="ConnectorMappingResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ConnectorMappingResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="ConnectorMappingResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetConnectorMappingResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="ConnectorMappingResourceFormatResource"/> object. </returns>
public static ConnectorMappingResourceFormatResource GetConnectorMappingResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetConnectorMappingResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="KpiResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="KpiResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="KpiResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetKpiResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="KpiResourceFormatResource"/> object. </returns>
public static KpiResourceFormatResource GetKpiResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetKpiResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="WidgetTypeResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="WidgetTypeResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="WidgetTypeResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetWidgetTypeResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="WidgetTypeResourceFormatResource"/> object. </returns>
public static WidgetTypeResourceFormatResource GetWidgetTypeResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetWidgetTypeResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="ViewResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="ViewResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="ViewResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetViewResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="ViewResourceFormatResource"/> object. </returns>
public static ViewResourceFormatResource GetViewResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetViewResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="LinkResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="LinkResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="LinkResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetLinkResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="LinkResourceFormatResource"/> object. </returns>
public static LinkResourceFormatResource GetLinkResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetLinkResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="RoleAssignmentResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="RoleAssignmentResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="RoleAssignmentResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetRoleAssignmentResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="RoleAssignmentResourceFormatResource"/> object. </returns>
public static RoleAssignmentResourceFormatResource GetRoleAssignmentResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetRoleAssignmentResourceFormatResource(id);
}
/// <summary>
/// Gets an object representing a <see cref="PredictionResourceFormatResource" /> along with the instance operations that can be performed on it but with no data.
/// You can use <see cref="PredictionResourceFormatResource.CreateResourceIdentifier" /> to create a <see cref="PredictionResourceFormatResource" /> <see cref="ResourceIdentifier" /> from its components.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsArmClient.GetPredictionResourceFormatResource(ResourceIdentifier)"/> instead.</description>
/// </item>
/// </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>
/// <exception cref="ArgumentNullException"> <paramref name="client"/> is null. </exception>
/// <returns> Returns a <see cref="PredictionResourceFormatResource"/> object. </returns>
public static PredictionResourceFormatResource GetPredictionResourceFormatResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
return GetMockableCustomerInsightsArmClient(client).GetPredictionResourceFormatResource(id);
}
/// <summary>
/// Gets a collection of HubResources in the ResourceGroupResource.
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsResourceGroupResource.GetHubs()"/> instead.</description>
/// </item>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <exception cref="ArgumentNullException"> <paramref name="resourceGroupResource"/> is null. </exception>
/// <returns> An object representing collection of HubResources and their operations over a HubResource. </returns>
public static HubCollection GetHubs(this ResourceGroupResource resourceGroupResource)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
return GetMockableCustomerInsightsResourceGroupResource(resourceGroupResource).GetHubs();
}
/// <summary>
/// Gets information about the specified hub.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Hubs_Get</description>
/// </item>
/// </list>
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsResourceGroupResource.GetHubAsync(string,CancellationToken)"/> instead.</description>
/// </item>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <param name="hubName"> The name of the hub. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="resourceGroupResource"/> or <paramref name="hubName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="hubName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public static async Task<Response<HubResource>> GetHubAsync(this ResourceGroupResource resourceGroupResource, string hubName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
return await GetMockableCustomerInsightsResourceGroupResource(resourceGroupResource).GetHubAsync(hubName, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Gets information about the specified hub.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Hubs_Get</description>
/// </item>
/// </list>
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsResourceGroupResource.GetHub(string,CancellationToken)"/> instead.</description>
/// </item>
/// </summary>
/// <param name="resourceGroupResource"> The <see cref="ResourceGroupResource" /> instance the method will execute against. </param>
/// <param name="hubName"> The name of the hub. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="resourceGroupResource"/> or <paramref name="hubName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="hubName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public static Response<HubResource> GetHub(this ResourceGroupResource resourceGroupResource, string hubName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
return GetMockableCustomerInsightsResourceGroupResource(resourceGroupResource).GetHub(hubName, cancellationToken);
}
/// <summary>
/// Gets all hubs in the specified subscription.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Microsoft.CustomerInsights/hubs</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Hubs_List</description>
/// </item>
/// </list>
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsSubscriptionResource.GetHubs(CancellationToken)"/> instead.</description>
/// </item>
/// </summary>
/// <param name="subscriptionResource"> The <see cref="SubscriptionResource" /> instance the method will execute against. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionResource"/> is null. </exception>
/// <returns> An async collection of <see cref="HubResource"/> that may take multiple service requests to iterate over. </returns>
public static AsyncPageable<HubResource> GetHubsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
return GetMockableCustomerInsightsSubscriptionResource(subscriptionResource).GetHubsAsync(cancellationToken);
}
/// <summary>
/// Gets all hubs in the specified subscription.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/providers/Microsoft.CustomerInsights/hubs</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Hubs_List</description>
/// </item>
/// </list>
/// <item>
/// <term>Mocking</term>
/// <description>To mock this method, please mock <see cref="MockableCustomerInsightsSubscriptionResource.GetHubs(CancellationToken)"/> instead.</description>
/// </item>
/// </summary>
/// <param name="subscriptionResource"> The <see cref="SubscriptionResource" /> instance the method will execute against. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionResource"/> is null. </exception>
/// <returns> A collection of <see cref="HubResource"/> that may take multiple service requests to iterate over. </returns>
public static Pageable<HubResource> GetHubs(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
return GetMockableCustomerInsightsSubscriptionResource(subscriptionResource).GetHubs(cancellationToken);
}
}
}