| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Threading; |
| | 10 | | using System.Threading.Tasks; |
| | 11 | | using Azure; |
| | 12 | | using Azure.Core; |
| | 13 | | using Azure.Core.Pipeline; |
| | 14 | | using Azure.ResourceManager.Resources.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.Resources |
| | 17 | | { |
| | 18 | | /// <summary> The Applications service client. </summary> |
| | 19 | | public partial class ApplicationsOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 0 | 23 | | internal ApplicationsRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of ApplicationsOperations for mocking. </summary> |
| 0 | 25 | | protected ApplicationsOperations() |
| | 26 | | { |
| 0 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of ApplicationsOperations. </summary> |
| | 29 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 30 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 31 | | /// <param name="subscriptionId"> The ID of the target subscription. </param> |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 0 | 33 | | internal ApplicationsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionI |
| | 34 | | { |
| 0 | 35 | | RestClient = new ApplicationsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 0 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 0 | 37 | | _pipeline = pipeline; |
| 0 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Gets the managed application. </summary> |
| | 41 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 42 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 44 | | public virtual async Task<Response<Application>> GetAsync(string resourceGroupName, string applicationName, Canc |
| | 45 | | { |
| 0 | 46 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.Get"); |
| 0 | 47 | | scope.Start(); |
| | 48 | | try |
| | 49 | | { |
| 0 | 50 | | return await RestClient.GetAsync(resourceGroupName, applicationName, cancellationToken).ConfigureAwait(f |
| | 51 | | } |
| 0 | 52 | | catch (Exception e) |
| | 53 | | { |
| 0 | 54 | | scope.Failed(e); |
| 0 | 55 | | throw; |
| | 56 | | } |
| 0 | 57 | | } |
| | 58 | |
|
| | 59 | | /// <summary> Gets the managed application. </summary> |
| | 60 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 61 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 63 | | public virtual Response<Application> Get(string resourceGroupName, string applicationName, CancellationToken can |
| | 64 | | { |
| 0 | 65 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.Get"); |
| 0 | 66 | | scope.Start(); |
| | 67 | | try |
| | 68 | | { |
| 0 | 69 | | return RestClient.Get(resourceGroupName, applicationName, cancellationToken); |
| | 70 | | } |
| 0 | 71 | | catch (Exception e) |
| | 72 | | { |
| 0 | 73 | | scope.Failed(e); |
| 0 | 74 | | throw; |
| | 75 | | } |
| 0 | 76 | | } |
| | 77 | |
|
| | 78 | | /// <summary> Updates an existing managed application. The only value that can be updated via PATCH currently is |
| | 79 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 80 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 81 | | /// <param name="parameters"> Parameters supplied to update an existing managed application. </param> |
| | 82 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 83 | | public virtual async Task<Response<Application>> UpdateAsync(string resourceGroupName, string applicationName, A |
| | 84 | | { |
| 0 | 85 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.Update"); |
| 0 | 86 | | scope.Start(); |
| | 87 | | try |
| | 88 | | { |
| 0 | 89 | | return await RestClient.UpdateAsync(resourceGroupName, applicationName, parameters, cancellationToken).C |
| | 90 | | } |
| 0 | 91 | | catch (Exception e) |
| | 92 | | { |
| 0 | 93 | | scope.Failed(e); |
| 0 | 94 | | throw; |
| | 95 | | } |
| 0 | 96 | | } |
| | 97 | |
|
| | 98 | | /// <summary> Updates an existing managed application. The only value that can be updated via PATCH currently is |
| | 99 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 100 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 101 | | /// <param name="parameters"> Parameters supplied to update an existing managed application. </param> |
| | 102 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 103 | | public virtual Response<Application> Update(string resourceGroupName, string applicationName, Application parame |
| | 104 | | { |
| 0 | 105 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.Update"); |
| 0 | 106 | | scope.Start(); |
| | 107 | | try |
| | 108 | | { |
| 0 | 109 | | return RestClient.Update(resourceGroupName, applicationName, parameters, cancellationToken); |
| | 110 | | } |
| 0 | 111 | | catch (Exception e) |
| | 112 | | { |
| 0 | 113 | | scope.Failed(e); |
| 0 | 114 | | throw; |
| | 115 | | } |
| 0 | 116 | | } |
| | 117 | |
|
| | 118 | | /// <summary> Gets the managed application. </summary> |
| | 119 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 120 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 121 | | public virtual async Task<Response<Application>> GetByIdAsync(string applicationId, CancellationToken cancellati |
| | 122 | | { |
| 0 | 123 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.GetById"); |
| 0 | 124 | | scope.Start(); |
| | 125 | | try |
| | 126 | | { |
| 0 | 127 | | return await RestClient.GetByIdAsync(applicationId, cancellationToken).ConfigureAwait(false); |
| | 128 | | } |
| 0 | 129 | | catch (Exception e) |
| | 130 | | { |
| 0 | 131 | | scope.Failed(e); |
| 0 | 132 | | throw; |
| | 133 | | } |
| 0 | 134 | | } |
| | 135 | |
|
| | 136 | | /// <summary> Gets the managed application. </summary> |
| | 137 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 138 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 139 | | public virtual Response<Application> GetById(string applicationId, CancellationToken cancellationToken = default |
| | 140 | | { |
| 0 | 141 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.GetById"); |
| 0 | 142 | | scope.Start(); |
| | 143 | | try |
| | 144 | | { |
| 0 | 145 | | return RestClient.GetById(applicationId, cancellationToken); |
| | 146 | | } |
| 0 | 147 | | catch (Exception e) |
| | 148 | | { |
| 0 | 149 | | scope.Failed(e); |
| 0 | 150 | | throw; |
| | 151 | | } |
| 0 | 152 | | } |
| | 153 | |
|
| | 154 | | /// <summary> Updates an existing managed application. The only value that can be updated via PATCH currently is |
| | 155 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 156 | | /// <param name="parameters"> Parameters supplied to update an existing managed application. </param> |
| | 157 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 158 | | public virtual async Task<Response<Application>> UpdateByIdAsync(string applicationId, Application parameters = |
| | 159 | | { |
| 0 | 160 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.UpdateById"); |
| 0 | 161 | | scope.Start(); |
| | 162 | | try |
| | 163 | | { |
| 0 | 164 | | return await RestClient.UpdateByIdAsync(applicationId, parameters, cancellationToken).ConfigureAwait(fal |
| | 165 | | } |
| 0 | 166 | | catch (Exception e) |
| | 167 | | { |
| 0 | 168 | | scope.Failed(e); |
| 0 | 169 | | throw; |
| | 170 | | } |
| 0 | 171 | | } |
| | 172 | |
|
| | 173 | | /// <summary> Updates an existing managed application. The only value that can be updated via PATCH currently is |
| | 174 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 175 | | /// <param name="parameters"> Parameters supplied to update an existing managed application. </param> |
| | 176 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 177 | | public virtual Response<Application> UpdateById(string applicationId, Application parameters = null, Cancellatio |
| | 178 | | { |
| 0 | 179 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.UpdateById"); |
| 0 | 180 | | scope.Start(); |
| | 181 | | try |
| | 182 | | { |
| 0 | 183 | | return RestClient.UpdateById(applicationId, parameters, cancellationToken); |
| | 184 | | } |
| 0 | 185 | | catch (Exception e) |
| | 186 | | { |
| 0 | 187 | | scope.Failed(e); |
| 0 | 188 | | throw; |
| | 189 | | } |
| 0 | 190 | | } |
| | 191 | |
|
| | 192 | | /// <summary> Gets all the applications within a resource group. </summary> |
| | 193 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 194 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 195 | | public virtual AsyncPageable<Application> ListByResourceGroupAsync(string resourceGroupName, CancellationToken c |
| | 196 | | { |
| 0 | 197 | | if (resourceGroupName == null) |
| | 198 | | { |
| 0 | 199 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 200 | | } |
| | 201 | |
|
| | 202 | | async Task<Page<Application>> FirstPageFunc(int? pageSizeHint) |
| | 203 | | { |
| 0 | 204 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListByResourceGroup"); |
| 0 | 205 | | scope.Start(); |
| | 206 | | try |
| | 207 | | { |
| 0 | 208 | | var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, cancellationToken).Confi |
| 0 | 209 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 210 | | } |
| 0 | 211 | | catch (Exception e) |
| | 212 | | { |
| 0 | 213 | | scope.Failed(e); |
| 0 | 214 | | throw; |
| | 215 | | } |
| 0 | 216 | | } |
| | 217 | | async Task<Page<Application>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 218 | | { |
| 0 | 219 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListByResourceGroup"); |
| 0 | 220 | | scope.Start(); |
| | 221 | | try |
| | 222 | | { |
| 0 | 223 | | var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, cancel |
| 0 | 224 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 225 | | } |
| 0 | 226 | | catch (Exception e) |
| | 227 | | { |
| 0 | 228 | | scope.Failed(e); |
| 0 | 229 | | throw; |
| | 230 | | } |
| 0 | 231 | | } |
| 0 | 232 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 233 | | } |
| | 234 | |
|
| | 235 | | /// <summary> Gets all the applications within a resource group. </summary> |
| | 236 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 237 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 238 | | public virtual Pageable<Application> ListByResourceGroup(string resourceGroupName, CancellationToken cancellatio |
| | 239 | | { |
| 0 | 240 | | if (resourceGroupName == null) |
| | 241 | | { |
| 0 | 242 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 243 | | } |
| | 244 | |
|
| | 245 | | Page<Application> FirstPageFunc(int? pageSizeHint) |
| | 246 | | { |
| 0 | 247 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListByResourceGroup"); |
| 0 | 248 | | scope.Start(); |
| | 249 | | try |
| | 250 | | { |
| 0 | 251 | | var response = RestClient.ListByResourceGroup(resourceGroupName, cancellationToken); |
| 0 | 252 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 253 | | } |
| 0 | 254 | | catch (Exception e) |
| | 255 | | { |
| 0 | 256 | | scope.Failed(e); |
| 0 | 257 | | throw; |
| | 258 | | } |
| 0 | 259 | | } |
| | 260 | | Page<Application> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 261 | | { |
| 0 | 262 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListByResourceGroup"); |
| 0 | 263 | | scope.Start(); |
| | 264 | | try |
| | 265 | | { |
| 0 | 266 | | var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, cancellationToken |
| 0 | 267 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 268 | | } |
| 0 | 269 | | catch (Exception e) |
| | 270 | | { |
| 0 | 271 | | scope.Failed(e); |
| 0 | 272 | | throw; |
| | 273 | | } |
| 0 | 274 | | } |
| 0 | 275 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 276 | | } |
| | 277 | |
|
| | 278 | | /// <summary> Gets all the applications within a subscription. </summary> |
| | 279 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 280 | | public virtual AsyncPageable<Application> ListBySubscriptionAsync(CancellationToken cancellationToken = default) |
| | 281 | | { |
| | 282 | | async Task<Page<Application>> FirstPageFunc(int? pageSizeHint) |
| | 283 | | { |
| 0 | 284 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListBySubscription"); |
| 0 | 285 | | scope.Start(); |
| | 286 | | try |
| | 287 | | { |
| 0 | 288 | | var response = await RestClient.ListBySubscriptionAsync(cancellationToken).ConfigureAwait(false); |
| 0 | 289 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 290 | | } |
| 0 | 291 | | catch (Exception e) |
| | 292 | | { |
| 0 | 293 | | scope.Failed(e); |
| 0 | 294 | | throw; |
| | 295 | | } |
| 0 | 296 | | } |
| | 297 | | async Task<Page<Application>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 298 | | { |
| 0 | 299 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListBySubscription"); |
| 0 | 300 | | scope.Start(); |
| | 301 | | try |
| | 302 | | { |
| 0 | 303 | | var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, cancellationToken).Configu |
| 0 | 304 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 305 | | } |
| 0 | 306 | | catch (Exception e) |
| | 307 | | { |
| 0 | 308 | | scope.Failed(e); |
| 0 | 309 | | throw; |
| | 310 | | } |
| 0 | 311 | | } |
| 0 | 312 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 313 | | } |
| | 314 | |
|
| | 315 | | /// <summary> Gets all the applications within a subscription. </summary> |
| | 316 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 317 | | public virtual Pageable<Application> ListBySubscription(CancellationToken cancellationToken = default) |
| | 318 | | { |
| | 319 | | Page<Application> FirstPageFunc(int? pageSizeHint) |
| | 320 | | { |
| 0 | 321 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListBySubscription"); |
| 0 | 322 | | scope.Start(); |
| | 323 | | try |
| | 324 | | { |
| 0 | 325 | | var response = RestClient.ListBySubscription(cancellationToken); |
| 0 | 326 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 327 | | } |
| 0 | 328 | | catch (Exception e) |
| | 329 | | { |
| 0 | 330 | | scope.Failed(e); |
| 0 | 331 | | throw; |
| | 332 | | } |
| 0 | 333 | | } |
| | 334 | | Page<Application> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 335 | | { |
| 0 | 336 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.ListBySubscription"); |
| 0 | 337 | | scope.Start(); |
| | 338 | | try |
| | 339 | | { |
| 0 | 340 | | var response = RestClient.ListBySubscriptionNextPage(nextLink, cancellationToken); |
| 0 | 341 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 342 | | } |
| 0 | 343 | | catch (Exception e) |
| | 344 | | { |
| 0 | 345 | | scope.Failed(e); |
| 0 | 346 | | throw; |
| | 347 | | } |
| 0 | 348 | | } |
| 0 | 349 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 350 | | } |
| | 351 | |
|
| | 352 | | /// <summary> Deletes the managed application. </summary> |
| | 353 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 354 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 355 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 356 | | public virtual async Task<ApplicationsDeleteOperation> StartDeleteAsync(string resourceGroupName, string applica |
| | 357 | | { |
| 0 | 358 | | if (resourceGroupName == null) |
| | 359 | | { |
| 0 | 360 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 361 | | } |
| 0 | 362 | | if (applicationName == null) |
| | 363 | | { |
| 0 | 364 | | throw new ArgumentNullException(nameof(applicationName)); |
| | 365 | | } |
| | 366 | |
|
| 0 | 367 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartDelete"); |
| 0 | 368 | | scope.Start(); |
| | 369 | | try |
| | 370 | | { |
| 0 | 371 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, applicationName, cancellationToke |
| 0 | 372 | | return new ApplicationsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(res |
| | 373 | | } |
| 0 | 374 | | catch (Exception e) |
| | 375 | | { |
| 0 | 376 | | scope.Failed(e); |
| 0 | 377 | | throw; |
| | 378 | | } |
| 0 | 379 | | } |
| | 380 | |
|
| | 381 | | /// <summary> Deletes the managed application. </summary> |
| | 382 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 383 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 384 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 385 | | public virtual ApplicationsDeleteOperation StartDelete(string resourceGroupName, string applicationName, Cancell |
| | 386 | | { |
| 0 | 387 | | if (resourceGroupName == null) |
| | 388 | | { |
| 0 | 389 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 390 | | } |
| 0 | 391 | | if (applicationName == null) |
| | 392 | | { |
| 0 | 393 | | throw new ArgumentNullException(nameof(applicationName)); |
| | 394 | | } |
| | 395 | |
|
| 0 | 396 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartDelete"); |
| 0 | 397 | | scope.Start(); |
| | 398 | | try |
| | 399 | | { |
| 0 | 400 | | var originalResponse = RestClient.Delete(resourceGroupName, applicationName, cancellationToken); |
| 0 | 401 | | return new ApplicationsDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(res |
| | 402 | | } |
| 0 | 403 | | catch (Exception e) |
| | 404 | | { |
| 0 | 405 | | scope.Failed(e); |
| 0 | 406 | | throw; |
| | 407 | | } |
| 0 | 408 | | } |
| | 409 | |
|
| | 410 | | /// <summary> Creates a new managed application. </summary> |
| | 411 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 412 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 413 | | /// <param name="parameters"> Parameters supplied to the create or update a managed application. </param> |
| | 414 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 415 | | public virtual async Task<ApplicationsCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGroupName |
| | 416 | | { |
| 0 | 417 | | if (resourceGroupName == null) |
| | 418 | | { |
| 0 | 419 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 420 | | } |
| 0 | 421 | | if (applicationName == null) |
| | 422 | | { |
| 0 | 423 | | throw new ArgumentNullException(nameof(applicationName)); |
| | 424 | | } |
| 0 | 425 | | if (parameters == null) |
| | 426 | | { |
| 0 | 427 | | throw new ArgumentNullException(nameof(parameters)); |
| | 428 | | } |
| | 429 | |
|
| 0 | 430 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartCreateOrUpdate"); |
| 0 | 431 | | scope.Start(); |
| | 432 | | try |
| | 433 | | { |
| 0 | 434 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, applicationName, paramete |
| 0 | 435 | | return new ApplicationsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrU |
| | 436 | | } |
| 0 | 437 | | catch (Exception e) |
| | 438 | | { |
| 0 | 439 | | scope.Failed(e); |
| 0 | 440 | | throw; |
| | 441 | | } |
| 0 | 442 | | } |
| | 443 | |
|
| | 444 | | /// <summary> Creates a new managed application. </summary> |
| | 445 | | /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param> |
| | 446 | | /// <param name="applicationName"> The name of the managed application. </param> |
| | 447 | | /// <param name="parameters"> Parameters supplied to the create or update a managed application. </param> |
| | 448 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 449 | | public virtual ApplicationsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string applicat |
| | 450 | | { |
| 0 | 451 | | if (resourceGroupName == null) |
| | 452 | | { |
| 0 | 453 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 454 | | } |
| 0 | 455 | | if (applicationName == null) |
| | 456 | | { |
| 0 | 457 | | throw new ArgumentNullException(nameof(applicationName)); |
| | 458 | | } |
| 0 | 459 | | if (parameters == null) |
| | 460 | | { |
| 0 | 461 | | throw new ArgumentNullException(nameof(parameters)); |
| | 462 | | } |
| | 463 | |
|
| 0 | 464 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartCreateOrUpdate"); |
| 0 | 465 | | scope.Start(); |
| | 466 | | try |
| | 467 | | { |
| 0 | 468 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, applicationName, parameters, cancell |
| 0 | 469 | | return new ApplicationsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrU |
| | 470 | | } |
| 0 | 471 | | catch (Exception e) |
| | 472 | | { |
| 0 | 473 | | scope.Failed(e); |
| 0 | 474 | | throw; |
| | 475 | | } |
| 0 | 476 | | } |
| | 477 | |
|
| | 478 | | /// <summary> Deletes the managed application. </summary> |
| | 479 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 480 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 481 | | public virtual async Task<ApplicationsDeleteByIdOperation> StartDeleteByIdAsync(string applicationId, Cancellati |
| | 482 | | { |
| 0 | 483 | | if (applicationId == null) |
| | 484 | | { |
| 0 | 485 | | throw new ArgumentNullException(nameof(applicationId)); |
| | 486 | | } |
| | 487 | |
|
| 0 | 488 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartDeleteById"); |
| 0 | 489 | | scope.Start(); |
| | 490 | | try |
| | 491 | | { |
| 0 | 492 | | var originalResponse = await RestClient.DeleteByIdAsync(applicationId, cancellationToken).ConfigureAwait |
| 0 | 493 | | return new ApplicationsDeleteByIdOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteByIdReq |
| | 494 | | } |
| 0 | 495 | | catch (Exception e) |
| | 496 | | { |
| 0 | 497 | | scope.Failed(e); |
| 0 | 498 | | throw; |
| | 499 | | } |
| 0 | 500 | | } |
| | 501 | |
|
| | 502 | | /// <summary> Deletes the managed application. </summary> |
| | 503 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 504 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 505 | | public virtual ApplicationsDeleteByIdOperation StartDeleteById(string applicationId, CancellationToken cancellat |
| | 506 | | { |
| 0 | 507 | | if (applicationId == null) |
| | 508 | | { |
| 0 | 509 | | throw new ArgumentNullException(nameof(applicationId)); |
| | 510 | | } |
| | 511 | |
|
| 0 | 512 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartDeleteById"); |
| 0 | 513 | | scope.Start(); |
| | 514 | | try |
| | 515 | | { |
| 0 | 516 | | var originalResponse = RestClient.DeleteById(applicationId, cancellationToken); |
| 0 | 517 | | return new ApplicationsDeleteByIdOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteByIdReq |
| | 518 | | } |
| 0 | 519 | | catch (Exception e) |
| | 520 | | { |
| 0 | 521 | | scope.Failed(e); |
| 0 | 522 | | throw; |
| | 523 | | } |
| 0 | 524 | | } |
| | 525 | |
|
| | 526 | | /// <summary> Creates a new managed application. </summary> |
| | 527 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 528 | | /// <param name="parameters"> Parameters supplied to the create or update a managed application. </param> |
| | 529 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 530 | | public virtual async Task<ApplicationsCreateOrUpdateByIdOperation> StartCreateOrUpdateByIdAsync(string applicati |
| | 531 | | { |
| 0 | 532 | | if (applicationId == null) |
| | 533 | | { |
| 0 | 534 | | throw new ArgumentNullException(nameof(applicationId)); |
| | 535 | | } |
| 0 | 536 | | if (parameters == null) |
| | 537 | | { |
| 0 | 538 | | throw new ArgumentNullException(nameof(parameters)); |
| | 539 | | } |
| | 540 | |
|
| 0 | 541 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartCreateOrUpdateById"); |
| 0 | 542 | | scope.Start(); |
| | 543 | | try |
| | 544 | | { |
| 0 | 545 | | var originalResponse = await RestClient.CreateOrUpdateByIdAsync(applicationId, parameters, cancellationT |
| 0 | 546 | | return new ApplicationsCreateOrUpdateByIdOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreat |
| | 547 | | } |
| 0 | 548 | | catch (Exception e) |
| | 549 | | { |
| 0 | 550 | | scope.Failed(e); |
| 0 | 551 | | throw; |
| | 552 | | } |
| 0 | 553 | | } |
| | 554 | |
|
| | 555 | | /// <summary> Creates a new managed application. </summary> |
| | 556 | | /// <param name="applicationId"> The fully qualified ID of the managed application, including the managed applic |
| | 557 | | /// <param name="parameters"> Parameters supplied to the create or update a managed application. </param> |
| | 558 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 559 | | public virtual ApplicationsCreateOrUpdateByIdOperation StartCreateOrUpdateById(string applicationId, Application |
| | 560 | | { |
| 0 | 561 | | if (applicationId == null) |
| | 562 | | { |
| 0 | 563 | | throw new ArgumentNullException(nameof(applicationId)); |
| | 564 | | } |
| 0 | 565 | | if (parameters == null) |
| | 566 | | { |
| 0 | 567 | | throw new ArgumentNullException(nameof(parameters)); |
| | 568 | | } |
| | 569 | |
|
| 0 | 570 | | using var scope = _clientDiagnostics.CreateScope("ApplicationsOperations.StartCreateOrUpdateById"); |
| 0 | 571 | | scope.Start(); |
| | 572 | | try |
| | 573 | | { |
| 0 | 574 | | var originalResponse = RestClient.CreateOrUpdateById(applicationId, parameters, cancellationToken); |
| 0 | 575 | | return new ApplicationsCreateOrUpdateByIdOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreat |
| | 576 | | } |
| 0 | 577 | | catch (Exception e) |
| | 578 | | { |
| 0 | 579 | | scope.Failed(e); |
| 0 | 580 | | throw; |
| | 581 | | } |
| 0 | 582 | | } |
| | 583 | | } |
| | 584 | | } |