|
| 1 | +// <auto-generated> |
| 2 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | +// Licensed under the MIT License. See License.txt in the project root for |
| 4 | +// license information. |
| 5 | +// |
| 6 | +// Code generated by Microsoft (R) AutoRest Code Generator. |
| 7 | +// Changes may cause incorrect behavior and will be lost if the code is |
| 8 | +// regenerated. |
| 9 | +// </auto-generated> |
| 10 | + |
| 11 | +namespace Microsoft.Azure.Management.Internal.ResourceManager.Version2018_05_01 |
| 12 | +{ |
| 13 | + using Microsoft.Rest; |
| 14 | + using Microsoft.Rest.Azure; |
| 15 | + using Models; |
| 16 | + using System.Threading; |
| 17 | + using System.Threading.Tasks; |
| 18 | + |
| 19 | + /// <summary> |
| 20 | + /// Extension methods for DeploymentOperations. |
| 21 | + /// </summary> |
| 22 | + public static partial class DeploymentOperationsExtensions |
| 23 | + { |
| 24 | + /// <summary> |
| 25 | + /// Gets a deployments operation. |
| 26 | + /// </summary> |
| 27 | + /// <param name='operations'> |
| 28 | + /// The operations group for this extension method. |
| 29 | + /// </param> |
| 30 | + /// <param name='deploymentName'> |
| 31 | + /// The name of the deployment. |
| 32 | + /// </param> |
| 33 | + /// <param name='operationId'> |
| 34 | + /// The ID of the operation to get. |
| 35 | + /// </param> |
| 36 | + public static DeploymentOperation GetAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, string operationId) |
| 37 | + { |
| 38 | + return operations.GetAtSubscriptionScopeAsync(deploymentName, operationId).GetAwaiter().GetResult(); |
| 39 | + } |
| 40 | + |
| 41 | + /// <summary> |
| 42 | + /// Gets a deployments operation. |
| 43 | + /// </summary> |
| 44 | + /// <param name='operations'> |
| 45 | + /// The operations group for this extension method. |
| 46 | + /// </param> |
| 47 | + /// <param name='deploymentName'> |
| 48 | + /// The name of the deployment. |
| 49 | + /// </param> |
| 50 | + /// <param name='operationId'> |
| 51 | + /// The ID of the operation to get. |
| 52 | + /// </param> |
| 53 | + /// <param name='cancellationToken'> |
| 54 | + /// The cancellation token. |
| 55 | + /// </param> |
| 56 | + public static async Task<DeploymentOperation> GetAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) |
| 57 | + { |
| 58 | + using (var _result = await operations.GetAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) |
| 59 | + { |
| 60 | + return _result.Body; |
| 61 | + } |
| 62 | + } |
| 63 | + |
| 64 | + /// <summary> |
| 65 | + /// Gets all deployments operations for a deployment. |
| 66 | + /// </summary> |
| 67 | + /// <param name='operations'> |
| 68 | + /// The operations group for this extension method. |
| 69 | + /// </param> |
| 70 | + /// <param name='deploymentName'> |
| 71 | + /// The name of the deployment with the operation to get. |
| 72 | + /// </param> |
| 73 | + /// <param name='top'> |
| 74 | + /// The number of results to return. |
| 75 | + /// </param> |
| 76 | + public static IPage<DeploymentOperation> ListAtSubscriptionScope(this IDeploymentOperations operations, string deploymentName, int? top = default(int?)) |
| 77 | + { |
| 78 | + return operations.ListAtSubscriptionScopeAsync(deploymentName, top).GetAwaiter().GetResult(); |
| 79 | + } |
| 80 | + |
| 81 | + /// <summary> |
| 82 | + /// Gets all deployments operations for a deployment. |
| 83 | + /// </summary> |
| 84 | + /// <param name='operations'> |
| 85 | + /// The operations group for this extension method. |
| 86 | + /// </param> |
| 87 | + /// <param name='deploymentName'> |
| 88 | + /// The name of the deployment with the operation to get. |
| 89 | + /// </param> |
| 90 | + /// <param name='top'> |
| 91 | + /// The number of results to return. |
| 92 | + /// </param> |
| 93 | + /// <param name='cancellationToken'> |
| 94 | + /// The cancellation token. |
| 95 | + /// </param> |
| 96 | + public static async Task<IPage<DeploymentOperation>> ListAtSubscriptionScopeAsync(this IDeploymentOperations operations, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) |
| 97 | + { |
| 98 | + using (var _result = await operations.ListAtSubscriptionScopeWithHttpMessagesAsync(deploymentName, top, null, cancellationToken).ConfigureAwait(false)) |
| 99 | + { |
| 100 | + return _result.Body; |
| 101 | + } |
| 102 | + } |
| 103 | + |
| 104 | + /// <summary> |
| 105 | + /// Gets a deployments operation. |
| 106 | + /// </summary> |
| 107 | + /// <param name='operations'> |
| 108 | + /// The operations group for this extension method. |
| 109 | + /// </param> |
| 110 | + /// <param name='resourceGroupName'> |
| 111 | + /// The name of the resource group. The name is case insensitive. |
| 112 | + /// </param> |
| 113 | + /// <param name='deploymentName'> |
| 114 | + /// The name of the deployment. |
| 115 | + /// </param> |
| 116 | + /// <param name='operationId'> |
| 117 | + /// The ID of the operation to get. |
| 118 | + /// </param> |
| 119 | + public static DeploymentOperation Get(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId) |
| 120 | + { |
| 121 | + return operations.GetAsync(resourceGroupName, deploymentName, operationId).GetAwaiter().GetResult(); |
| 122 | + } |
| 123 | + |
| 124 | + /// <summary> |
| 125 | + /// Gets a deployments operation. |
| 126 | + /// </summary> |
| 127 | + /// <param name='operations'> |
| 128 | + /// The operations group for this extension method. |
| 129 | + /// </param> |
| 130 | + /// <param name='resourceGroupName'> |
| 131 | + /// The name of the resource group. The name is case insensitive. |
| 132 | + /// </param> |
| 133 | + /// <param name='deploymentName'> |
| 134 | + /// The name of the deployment. |
| 135 | + /// </param> |
| 136 | + /// <param name='operationId'> |
| 137 | + /// The ID of the operation to get. |
| 138 | + /// </param> |
| 139 | + /// <param name='cancellationToken'> |
| 140 | + /// The cancellation token. |
| 141 | + /// </param> |
| 142 | + public static async Task<DeploymentOperation> GetAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) |
| 143 | + { |
| 144 | + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, deploymentName, operationId, null, cancellationToken).ConfigureAwait(false)) |
| 145 | + { |
| 146 | + return _result.Body; |
| 147 | + } |
| 148 | + } |
| 149 | + |
| 150 | + /// <summary> |
| 151 | + /// Gets all deployments operations for a deployment. |
| 152 | + /// </summary> |
| 153 | + /// <param name='operations'> |
| 154 | + /// The operations group for this extension method. |
| 155 | + /// </param> |
| 156 | + /// <param name='resourceGroupName'> |
| 157 | + /// The name of the resource group. The name is case insensitive. |
| 158 | + /// </param> |
| 159 | + /// <param name='deploymentName'> |
| 160 | + /// The name of the deployment with the operation to get. |
| 161 | + /// </param> |
| 162 | + /// <param name='top'> |
| 163 | + /// The number of results to return. |
| 164 | + /// </param> |
| 165 | + public static IPage<DeploymentOperation> List(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?)) |
| 166 | + { |
| 167 | + return operations.ListAsync(resourceGroupName, deploymentName, top).GetAwaiter().GetResult(); |
| 168 | + } |
| 169 | + |
| 170 | + /// <summary> |
| 171 | + /// Gets all deployments operations for a deployment. |
| 172 | + /// </summary> |
| 173 | + /// <param name='operations'> |
| 174 | + /// The operations group for this extension method. |
| 175 | + /// </param> |
| 176 | + /// <param name='resourceGroupName'> |
| 177 | + /// The name of the resource group. The name is case insensitive. |
| 178 | + /// </param> |
| 179 | + /// <param name='deploymentName'> |
| 180 | + /// The name of the deployment with the operation to get. |
| 181 | + /// </param> |
| 182 | + /// <param name='top'> |
| 183 | + /// The number of results to return. |
| 184 | + /// </param> |
| 185 | + /// <param name='cancellationToken'> |
| 186 | + /// The cancellation token. |
| 187 | + /// </param> |
| 188 | + public static async Task<IPage<DeploymentOperation>> ListAsync(this IDeploymentOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) |
| 189 | + { |
| 190 | + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, deploymentName, top, null, cancellationToken).ConfigureAwait(false)) |
| 191 | + { |
| 192 | + return _result.Body; |
| 193 | + } |
| 194 | + } |
| 195 | + |
| 196 | + /// <summary> |
| 197 | + /// Gets all deployments operations for a deployment. |
| 198 | + /// </summary> |
| 199 | + /// <param name='operations'> |
| 200 | + /// The operations group for this extension method. |
| 201 | + /// </param> |
| 202 | + /// <param name='nextPageLink'> |
| 203 | + /// The NextLink from the previous successful call to List operation. |
| 204 | + /// </param> |
| 205 | + public static IPage<DeploymentOperation> ListAtSubscriptionScopeNext(this IDeploymentOperations operations, string nextPageLink) |
| 206 | + { |
| 207 | + return operations.ListAtSubscriptionScopeNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 208 | + } |
| 209 | + |
| 210 | + /// <summary> |
| 211 | + /// Gets all deployments operations for a deployment. |
| 212 | + /// </summary> |
| 213 | + /// <param name='operations'> |
| 214 | + /// The operations group for this extension method. |
| 215 | + /// </param> |
| 216 | + /// <param name='nextPageLink'> |
| 217 | + /// The NextLink from the previous successful call to List operation. |
| 218 | + /// </param> |
| 219 | + /// <param name='cancellationToken'> |
| 220 | + /// The cancellation token. |
| 221 | + /// </param> |
| 222 | + public static async Task<IPage<DeploymentOperation>> ListAtSubscriptionScopeNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) |
| 223 | + { |
| 224 | + using (var _result = await operations.ListAtSubscriptionScopeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
| 225 | + { |
| 226 | + return _result.Body; |
| 227 | + } |
| 228 | + } |
| 229 | + |
| 230 | + /// <summary> |
| 231 | + /// Gets all deployments operations for a deployment. |
| 232 | + /// </summary> |
| 233 | + /// <param name='operations'> |
| 234 | + /// The operations group for this extension method. |
| 235 | + /// </param> |
| 236 | + /// <param name='nextPageLink'> |
| 237 | + /// The NextLink from the previous successful call to List operation. |
| 238 | + /// </param> |
| 239 | + public static IPage<DeploymentOperation> ListNext(this IDeploymentOperations operations, string nextPageLink) |
| 240 | + { |
| 241 | + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); |
| 242 | + } |
| 243 | + |
| 244 | + /// <summary> |
| 245 | + /// Gets all deployments operations for a deployment. |
| 246 | + /// </summary> |
| 247 | + /// <param name='operations'> |
| 248 | + /// The operations group for this extension method. |
| 249 | + /// </param> |
| 250 | + /// <param name='nextPageLink'> |
| 251 | + /// The NextLink from the previous successful call to List operation. |
| 252 | + /// </param> |
| 253 | + /// <param name='cancellationToken'> |
| 254 | + /// The cancellation token. |
| 255 | + /// </param> |
| 256 | + public static async Task<IPage<DeploymentOperation>> ListNextAsync(this IDeploymentOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) |
| 257 | + { |
| 258 | + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) |
| 259 | + { |
| 260 | + return _result.Body; |
| 261 | + } |
| 262 | + } |
| 263 | + |
| 264 | + } |
| 265 | +} |
0 commit comments