|
| 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.ServiceFabric |
| 6 | +{ |
| 7 | + using Microsoft.Rest.Azure; |
| 8 | + using Models; |
| 9 | + |
| 10 | + /// <summary> |
| 11 | + /// Extension methods for ApplicationTypesOperations |
| 12 | + /// </summary> |
| 13 | + public static partial class ApplicationTypesOperationsExtensions |
| 14 | + { |
| 15 | + /// <summary> |
| 16 | + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric cluster resource. |
| 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. |
| 23 | + /// </param> |
| 24 | + /// <param name='clusterName'> |
| 25 | + /// The name of the cluster resource. |
| 26 | + /// </param> |
| 27 | + /// <param name='applicationTypeName'> |
| 28 | + /// The name of the application type name resource. |
| 29 | + /// </param> |
| 30 | + public static ApplicationTypeResource Get(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName) |
| 31 | + { |
| 32 | + return ((IApplicationTypesOperations)operations).GetAsync(resourceGroupName, clusterName, applicationTypeName).GetAwaiter().GetResult(); |
| 33 | + } |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric cluster resource. |
| 37 | + /// </summary> |
| 38 | + /// <param name='operations'> |
| 39 | + /// The operations group for this extension method. |
| 40 | + /// </param> |
| 41 | + /// <param name='resourceGroupName'> |
| 42 | + /// The name of the resource group. |
| 43 | + /// </param> |
| 44 | + /// <param name='clusterName'> |
| 45 | + /// The name of the cluster resource. |
| 46 | + /// </param> |
| 47 | + /// <param name='applicationTypeName'> |
| 48 | + /// The name of the application type name resource. |
| 49 | + /// </param> |
| 50 | + /// <param name='cancellationToken'> |
| 51 | + /// The cancellation token. |
| 52 | + /// </param> |
| 53 | + public static async System.Threading.Tasks.Task<ApplicationTypeResource> GetAsync(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 54 | + { |
| 55 | + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, clusterName, applicationTypeName, null, cancellationToken).ConfigureAwait(false)) |
| 56 | + { |
| 57 | + return _result.Body; |
| 58 | + } |
| 59 | + } |
| 60 | + /// <summary> |
| 61 | + /// Create or update a Service Fabric application type name resource with the specified name. |
| 62 | + /// </summary> |
| 63 | + /// <param name='operations'> |
| 64 | + /// The operations group for this extension method. |
| 65 | + /// </param> |
| 66 | + /// <param name='resourceGroupName'> |
| 67 | + /// The name of the resource group. |
| 68 | + /// </param> |
| 69 | + /// <param name='clusterName'> |
| 70 | + /// The name of the cluster resource. |
| 71 | + /// </param> |
| 72 | + /// <param name='applicationTypeName'> |
| 73 | + /// The name of the application type name resource. |
| 74 | + /// </param> |
| 75 | + public static ApplicationTypeResource CreateOrUpdate(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName, string location = default(string), System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>)) |
| 76 | + { |
| 77 | + return ((IApplicationTypesOperations)operations).CreateOrUpdateAsync(resourceGroupName, clusterName, applicationTypeName, location, tags).GetAwaiter().GetResult(); |
| 78 | + } |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Create or update a Service Fabric application type name resource with the specified name. |
| 82 | + /// </summary> |
| 83 | + /// <param name='operations'> |
| 84 | + /// The operations group for this extension method. |
| 85 | + /// </param> |
| 86 | + /// <param name='resourceGroupName'> |
| 87 | + /// The name of the resource group. |
| 88 | + /// </param> |
| 89 | + /// <param name='clusterName'> |
| 90 | + /// The name of the cluster resource. |
| 91 | + /// </param> |
| 92 | + /// <param name='applicationTypeName'> |
| 93 | + /// The name of the application type name resource. |
| 94 | + /// </param> |
| 95 | + /// <param name='cancellationToken'> |
| 96 | + /// The cancellation token. |
| 97 | + /// </param> |
| 98 | + public static async System.Threading.Tasks.Task<ApplicationTypeResource> CreateOrUpdateAsync(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName, string location = default(string), System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 99 | + { |
| 100 | + ApplicationTypeResource applicationTypeResource = new ApplicationTypeResource( |
| 101 | + location: location, |
| 102 | + tags: tags); |
| 103 | + |
| 104 | + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, clusterName, applicationTypeName, applicationTypeResource, null, cancellationToken).ConfigureAwait(false)) |
| 105 | + { |
| 106 | + return _result.Body; |
| 107 | + } |
| 108 | + } |
| 109 | + /// <summary> |
| 110 | + /// Delete a Service Fabric application type name resource with the specified name. |
| 111 | + /// </summary> |
| 112 | + /// <param name='operations'> |
| 113 | + /// The operations group for this extension method. |
| 114 | + /// </param> |
| 115 | + /// <param name='resourceGroupName'> |
| 116 | + /// The name of the resource group. |
| 117 | + /// </param> |
| 118 | + /// <param name='clusterName'> |
| 119 | + /// The name of the cluster resource. |
| 120 | + /// </param> |
| 121 | + /// <param name='applicationTypeName'> |
| 122 | + /// The name of the application type name resource. |
| 123 | + /// </param> |
| 124 | + public static void Delete(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName) |
| 125 | + { |
| 126 | + ((IApplicationTypesOperations)operations).DeleteAsync(resourceGroupName, clusterName, applicationTypeName).GetAwaiter().GetResult(); |
| 127 | + } |
| 128 | + |
| 129 | + /// <summary> |
| 130 | + /// Delete a Service Fabric application type name resource with the specified name. |
| 131 | + /// </summary> |
| 132 | + /// <param name='operations'> |
| 133 | + /// The operations group for this extension method. |
| 134 | + /// </param> |
| 135 | + /// <param name='resourceGroupName'> |
| 136 | + /// The name of the resource group. |
| 137 | + /// </param> |
| 138 | + /// <param name='clusterName'> |
| 139 | + /// The name of the cluster resource. |
| 140 | + /// </param> |
| 141 | + /// <param name='applicationTypeName'> |
| 142 | + /// The name of the application type name resource. |
| 143 | + /// </param> |
| 144 | + /// <param name='cancellationToken'> |
| 145 | + /// The cancellation token. |
| 146 | + /// </param> |
| 147 | + public static async System.Threading.Tasks.Task DeleteAsync(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 148 | + { |
| 149 | + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, clusterName, applicationTypeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); |
| 150 | + } |
| 151 | + /// <summary> |
| 152 | + /// Gets all application type name resources created or in the process of being created in the Service Fabric cluster resource. |
| 153 | + /// </summary> |
| 154 | + /// <param name='operations'> |
| 155 | + /// The operations group for this extension method. |
| 156 | + /// </param> |
| 157 | + /// <param name='resourceGroupName'> |
| 158 | + /// The name of the resource group. |
| 159 | + /// </param> |
| 160 | + /// <param name='clusterName'> |
| 161 | + /// The name of the cluster resource. |
| 162 | + /// </param> |
| 163 | + public static ApplicationTypeResourceList List(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName) |
| 164 | + { |
| 165 | + return ((IApplicationTypesOperations)operations).ListAsync(resourceGroupName, clusterName).GetAwaiter().GetResult(); |
| 166 | + } |
| 167 | + |
| 168 | + /// <summary> |
| 169 | + /// Gets all application type name resources created or in the process of being created in the Service Fabric cluster resource. |
| 170 | + /// </summary> |
| 171 | + /// <param name='operations'> |
| 172 | + /// The operations group for this extension method. |
| 173 | + /// </param> |
| 174 | + /// <param name='resourceGroupName'> |
| 175 | + /// The name of the resource group. |
| 176 | + /// </param> |
| 177 | + /// <param name='clusterName'> |
| 178 | + /// The name of the cluster resource. |
| 179 | + /// </param> |
| 180 | + /// <param name='cancellationToken'> |
| 181 | + /// The cancellation token. |
| 182 | + /// </param> |
| 183 | + public static async System.Threading.Tasks.Task<ApplicationTypeResourceList> ListAsync(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 184 | + { |
| 185 | + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false)) |
| 186 | + { |
| 187 | + return _result.Body; |
| 188 | + } |
| 189 | + } |
| 190 | + /// <summary> |
| 191 | + /// Delete a Service Fabric application type name resource with the specified name. |
| 192 | + /// </summary> |
| 193 | + /// <param name='operations'> |
| 194 | + /// The operations group for this extension method. |
| 195 | + /// </param> |
| 196 | + /// <param name='resourceGroupName'> |
| 197 | + /// The name of the resource group. |
| 198 | + /// </param> |
| 199 | + /// <param name='clusterName'> |
| 200 | + /// The name of the cluster resource. |
| 201 | + /// </param> |
| 202 | + /// <param name='applicationTypeName'> |
| 203 | + /// The name of the application type name resource. |
| 204 | + /// </param> |
| 205 | + public static void BeginDelete(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName) |
| 206 | + { |
| 207 | + ((IApplicationTypesOperations)operations).BeginDeleteAsync(resourceGroupName, clusterName, applicationTypeName).GetAwaiter().GetResult(); |
| 208 | + } |
| 209 | + |
| 210 | + /// <summary> |
| 211 | + /// Delete a Service Fabric application type name resource with the specified name. |
| 212 | + /// </summary> |
| 213 | + /// <param name='operations'> |
| 214 | + /// The operations group for this extension method. |
| 215 | + /// </param> |
| 216 | + /// <param name='resourceGroupName'> |
| 217 | + /// The name of the resource group. |
| 218 | + /// </param> |
| 219 | + /// <param name='clusterName'> |
| 220 | + /// The name of the cluster resource. |
| 221 | + /// </param> |
| 222 | + /// <param name='applicationTypeName'> |
| 223 | + /// The name of the application type name resource. |
| 224 | + /// </param> |
| 225 | + /// <param name='cancellationToken'> |
| 226 | + /// The cancellation token. |
| 227 | + /// </param> |
| 228 | + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IApplicationTypesOperations operations, string resourceGroupName, string clusterName, string applicationTypeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) |
| 229 | + { |
| 230 | + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, applicationTypeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); |
| 231 | + } |
| 232 | + } |
| 233 | +} |
0 commit comments