-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
MockableServiceFabricManagedClustersResourceGroupResource.cs
105 lines (96 loc) · 5.15 KB
/
MockableServiceFabricManagedClustersResourceGroupResource.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
// 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.Core;
namespace Azure.ResourceManager.ServiceFabricManagedClusters.Mocking
{
/// <summary> A class to add extension methods to ResourceGroupResource. </summary>
public partial class MockableServiceFabricManagedClustersResourceGroupResource : ArmResource
{
/// <summary> Initializes a new instance of the <see cref="MockableServiceFabricManagedClustersResourceGroupResource"/> class for mocking. </summary>
protected MockableServiceFabricManagedClustersResourceGroupResource()
{
}
/// <summary> Initializes a new instance of the <see cref="MockableServiceFabricManagedClustersResourceGroupResource"/> class. </summary>
/// <param name="client"> The client parameters to use in these operations. </param>
/// <param name="id"> The identifier of the resource that is the target of operations. </param>
internal MockableServiceFabricManagedClustersResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
private string GetApiVersionOrNull(ResourceType resourceType)
{
TryGetApiVersion(resourceType, out string apiVersion);
return apiVersion;
}
/// <summary> Gets a collection of ServiceFabricManagedClusterResources in the ResourceGroupResource. </summary>
/// <returns> An object representing collection of ServiceFabricManagedClusterResources and their operations over a ServiceFabricManagedClusterResource. </returns>
public virtual ServiceFabricManagedClusterCollection GetServiceFabricManagedClusters()
{
return GetCachedClient(client => new ServiceFabricManagedClusterCollection(client, Id));
}
/// <summary>
/// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ManagedClusters_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2024-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="ServiceFabricManagedClusterResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="clusterName"> The name of the cluster resource. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="clusterName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="clusterName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual async Task<Response<ServiceFabricManagedClusterResource>> GetServiceFabricManagedClusterAsync(string clusterName, CancellationToken cancellationToken = default)
{
return await GetServiceFabricManagedClusters().GetAsync(clusterName, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>ManagedClusters_Get</description>
/// </item>
/// <item>
/// <term>Default Api Version</term>
/// <description>2024-04-01</description>
/// </item>
/// <item>
/// <term>Resource</term>
/// <description><see cref="ServiceFabricManagedClusterResource"/></description>
/// </item>
/// </list>
/// </summary>
/// <param name="clusterName"> The name of the cluster resource. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="clusterName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="clusterName"/> is an empty string, and was expected to be non-empty. </exception>
[ForwardsClientCalls]
public virtual Response<ServiceFabricManagedClusterResource> GetServiceFabricManagedCluster(string clusterName, CancellationToken cancellationToken = default)
{
return GetServiceFabricManagedClusters().Get(clusterName, cancellationToken);
}
}
}