< Summary

Class:Azure.ResourceManager.Resources.DeploymentOperations
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\DeploymentOperations.cs
Covered lines:48
Uncovered lines:232
Coverable lines:280
Total lines:706
Line coverage:17.1% (48 of 280)
Covered branches:8
Total branches:32
Branch coverage:25% (8 of 32)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
GetAtScopeAsync()-0%100%
GetAtScope(...)-0%100%
GetAtTenantScopeAsync()-0%100%
GetAtTenantScope(...)-0%100%
GetAtManagementGroupScopeAsync()-0%100%
GetAtManagementGroupScope(...)-0%100%
GetAtSubscriptionScopeAsync()-0%100%
GetAtSubscriptionScope(...)-0%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
ListAtScopeAsync(...)-38.1%50%
<ListAtScopeAsync()-62.5%100%
<ListAtScopeAsync()-0%100%
ListAtScope(...)-38.1%50%
ListAtTenantScopeAsync(...)-0%0%
<ListAtTenantScopeAsync()-0%100%
<ListAtTenantScopeAsync()-0%100%
ListAtTenantScope(...)-0%0%
ListAtManagementGroupScopeAsync(...)-0%0%
<ListAtManagementGroupScopeAsync()-0%100%
<ListAtManagementGroupScopeAsync()-0%100%
ListAtManagementGroupScope(...)-0%0%
ListAtSubscriptionScopeAsync(...)-0%0%
<ListAtSubscriptionScopeAsync()-0%100%
<ListAtSubscriptionScopeAsync()-0%100%
ListAtSubscriptionScope(...)-0%0%
ListAsync(...)-38.1%50%
<ListAsync()-62.5%100%
<ListAsync()-0%100%
List(...)-38.1%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\DeploymentOperations.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Threading;
 10using System.Threading.Tasks;
 11using Azure;
 12using Azure.Core;
 13using Azure.Core.Pipeline;
 14using Azure.ResourceManager.Resources.Models;
 15
 16namespace Azure.ResourceManager.Resources
 17{
 18    /// <summary> The Deployment service client. </summary>
 19    public partial class DeploymentOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 3223        internal DeploymentRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of DeploymentOperations for mocking. </summary>
 27225        protected DeploymentOperations()
 26        {
 27227        }
 28        /// <summary> Initializes a new instance of DeploymentOperations. </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>
 27233        internal DeploymentOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId,
 34        {
 27235            RestClient = new DeploymentRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 27236            _clientDiagnostics = clientDiagnostics;
 27237            _pipeline = pipeline;
 27238        }
 39
 40        /// <summary> Gets a deployments operation. </summary>
 41        /// <param name="scope"> The resource scope. </param>
 42        /// <param name="deploymentName"> The name of the deployment. </param>
 43        /// <param name="operationId"> The ID of the operation to get. </param>
 44        /// <param name="cancellationToken"> The cancellation token to use. </param>
 45        public virtual async Task<Response<DeploymentOperation>> GetAtScopeAsync(string scope, string deploymentName, st
 46        {
 047            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtScope");
 048            scope0.Start();
 49            try
 50            {
 051                return await RestClient.GetAtScopeAsync(scope, deploymentName, operationId, cancellationToken).Configure
 52            }
 053            catch (Exception e)
 54            {
 055                scope0.Failed(e);
 056                throw;
 57            }
 058        }
 59
 60        /// <summary> Gets a deployments operation. </summary>
 61        /// <param name="scope"> The resource scope. </param>
 62        /// <param name="deploymentName"> The name of the deployment. </param>
 63        /// <param name="operationId"> The ID of the operation to get. </param>
 64        /// <param name="cancellationToken"> The cancellation token to use. </param>
 65        public virtual Response<DeploymentOperation> GetAtScope(string scope, string deploymentName, string operationId,
 66        {
 067            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtScope");
 068            scope0.Start();
 69            try
 70            {
 071                return RestClient.GetAtScope(scope, deploymentName, operationId, cancellationToken);
 72            }
 073            catch (Exception e)
 74            {
 075                scope0.Failed(e);
 076                throw;
 77            }
 078        }
 79
 80        /// <summary> Gets a deployments operation. </summary>
 81        /// <param name="deploymentName"> The name of the deployment. </param>
 82        /// <param name="operationId"> The ID of the operation to get. </param>
 83        /// <param name="cancellationToken"> The cancellation token to use. </param>
 84        public virtual async Task<Response<DeploymentOperation>> GetAtTenantScopeAsync(string deploymentName, string ope
 85        {
 086            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtTenantScope");
 087            scope0.Start();
 88            try
 89            {
 090                return await RestClient.GetAtTenantScopeAsync(deploymentName, operationId, cancellationToken).ConfigureA
 91            }
 092            catch (Exception e)
 93            {
 094                scope0.Failed(e);
 095                throw;
 96            }
 097        }
 98
 99        /// <summary> Gets a deployments operation. </summary>
 100        /// <param name="deploymentName"> The name of the deployment. </param>
 101        /// <param name="operationId"> The ID of the operation to get. </param>
 102        /// <param name="cancellationToken"> The cancellation token to use. </param>
 103        public virtual Response<DeploymentOperation> GetAtTenantScope(string deploymentName, string operationId, Cancell
 104        {
 0105            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtTenantScope");
 0106            scope0.Start();
 107            try
 108            {
 0109                return RestClient.GetAtTenantScope(deploymentName, operationId, cancellationToken);
 110            }
 0111            catch (Exception e)
 112            {
 0113                scope0.Failed(e);
 0114                throw;
 115            }
 0116        }
 117
 118        /// <summary> Gets a deployments operation. </summary>
 119        /// <param name="groupId"> The management group ID. </param>
 120        /// <param name="deploymentName"> The name of the deployment. </param>
 121        /// <param name="operationId"> The ID of the operation to get. </param>
 122        /// <param name="cancellationToken"> The cancellation token to use. </param>
 123        public virtual async Task<Response<DeploymentOperation>> GetAtManagementGroupScopeAsync(string groupId, string d
 124        {
 0125            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtManagementGroupScope");
 0126            scope0.Start();
 127            try
 128            {
 0129                return await RestClient.GetAtManagementGroupScopeAsync(groupId, deploymentName, operationId, cancellatio
 130            }
 0131            catch (Exception e)
 132            {
 0133                scope0.Failed(e);
 0134                throw;
 135            }
 0136        }
 137
 138        /// <summary> Gets a deployments operation. </summary>
 139        /// <param name="groupId"> The management group ID. </param>
 140        /// <param name="deploymentName"> The name of the deployment. </param>
 141        /// <param name="operationId"> The ID of the operation to get. </param>
 142        /// <param name="cancellationToken"> The cancellation token to use. </param>
 143        public virtual Response<DeploymentOperation> GetAtManagementGroupScope(string groupId, string deploymentName, st
 144        {
 0145            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtManagementGroupScope");
 0146            scope0.Start();
 147            try
 148            {
 0149                return RestClient.GetAtManagementGroupScope(groupId, deploymentName, operationId, cancellationToken);
 150            }
 0151            catch (Exception e)
 152            {
 0153                scope0.Failed(e);
 0154                throw;
 155            }
 0156        }
 157
 158        /// <summary> Gets a deployments operation. </summary>
 159        /// <param name="deploymentName"> The name of the deployment. </param>
 160        /// <param name="operationId"> The ID of the operation to get. </param>
 161        /// <param name="cancellationToken"> The cancellation token to use. </param>
 162        public virtual async Task<Response<DeploymentOperation>> GetAtSubscriptionScopeAsync(string deploymentName, stri
 163        {
 0164            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtSubscriptionScope");
 0165            scope0.Start();
 166            try
 167            {
 0168                return await RestClient.GetAtSubscriptionScopeAsync(deploymentName, operationId, cancellationToken).Conf
 169            }
 0170            catch (Exception e)
 171            {
 0172                scope0.Failed(e);
 0173                throw;
 174            }
 0175        }
 176
 177        /// <summary> Gets a deployments operation. </summary>
 178        /// <param name="deploymentName"> The name of the deployment. </param>
 179        /// <param name="operationId"> The ID of the operation to get. </param>
 180        /// <param name="cancellationToken"> The cancellation token to use. </param>
 181        public virtual Response<DeploymentOperation> GetAtSubscriptionScope(string deploymentName, string operationId, C
 182        {
 0183            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.GetAtSubscriptionScope");
 0184            scope0.Start();
 185            try
 186            {
 0187                return RestClient.GetAtSubscriptionScope(deploymentName, operationId, cancellationToken);
 188            }
 0189            catch (Exception e)
 190            {
 0191                scope0.Failed(e);
 0192                throw;
 193            }
 0194        }
 195
 196        /// <summary> Gets a deployments operation. </summary>
 197        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 198        /// <param name="deploymentName"> The name of the deployment. </param>
 199        /// <param name="operationId"> The ID of the operation to get. </param>
 200        /// <param name="cancellationToken"> The cancellation token to use. </param>
 201        public virtual async Task<Response<DeploymentOperation>> GetAsync(string resourceGroupName, string deploymentNam
 202        {
 2203            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.Get");
 2204            scope0.Start();
 205            try
 206            {
 2207                return await RestClient.GetAsync(resourceGroupName, deploymentName, operationId, cancellationToken).Conf
 208            }
 0209            catch (Exception e)
 210            {
 0211                scope0.Failed(e);
 0212                throw;
 213            }
 2214        }
 215
 216        /// <summary> Gets a deployments operation. </summary>
 217        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 218        /// <param name="deploymentName"> The name of the deployment. </param>
 219        /// <param name="operationId"> The ID of the operation to get. </param>
 220        /// <param name="cancellationToken"> The cancellation token to use. </param>
 221        public virtual Response<DeploymentOperation> Get(string resourceGroupName, string deploymentName, string operati
 222        {
 2223            using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.Get");
 2224            scope0.Start();
 225            try
 226            {
 2227                return RestClient.Get(resourceGroupName, deploymentName, operationId, cancellationToken);
 228            }
 0229            catch (Exception e)
 230            {
 0231                scope0.Failed(e);
 0232                throw;
 233            }
 2234        }
 235
 236        /// <summary> Gets all deployments operations for a deployment. </summary>
 237        /// <param name="scope"> The resource scope. </param>
 238        /// <param name="deploymentName"> The name of the deployment. </param>
 239        /// <param name="top"> The number of results to return. </param>
 240        /// <param name="cancellationToken"> The cancellation token to use. </param>
 241        public virtual AsyncPageable<DeploymentOperation> ListAtScopeAsync(string scope, string deploymentName, int? top
 242        {
 6243            if (scope == null)
 244            {
 0245                throw new ArgumentNullException(nameof(scope));
 246            }
 6247            if (deploymentName == null)
 248            {
 0249                throw new ArgumentNullException(nameof(deploymentName));
 250            }
 251
 252            async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint)
 253            {
 6254                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope");
 6255                scope0.Start();
 256                try
 257                {
 6258                    var response = await RestClient.ListAtScopeAsync(scope, deploymentName, top, cancellationToken).Conf
 6259                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 260                }
 0261                catch (Exception e)
 262                {
 0263                    scope0.Failed(e);
 0264                    throw;
 265                }
 6266            }
 267            async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint)
 268            {
 0269                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope");
 0270                scope0.Start();
 271                try
 272                {
 0273                    var response = await RestClient.ListAtScopeNextPageAsync(nextLink, scope, deploymentName, top, cance
 0274                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 275                }
 0276                catch (Exception e)
 277                {
 0278                    scope0.Failed(e);
 0279                    throw;
 280                }
 0281            }
 6282            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 283        }
 284
 285        /// <summary> Gets all deployments operations for a deployment. </summary>
 286        /// <param name="scope"> The resource scope. </param>
 287        /// <param name="deploymentName"> The name of the deployment. </param>
 288        /// <param name="top"> The number of results to return. </param>
 289        /// <param name="cancellationToken"> The cancellation token to use. </param>
 290        public virtual Pageable<DeploymentOperation> ListAtScope(string scope, string deploymentName, int? top = null, C
 291        {
 6292            if (scope == null)
 293            {
 0294                throw new ArgumentNullException(nameof(scope));
 295            }
 6296            if (deploymentName == null)
 297            {
 0298                throw new ArgumentNullException(nameof(deploymentName));
 299            }
 300
 301            Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint)
 302            {
 6303                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope");
 6304                scope0.Start();
 305                try
 306                {
 6307                    var response = RestClient.ListAtScope(scope, deploymentName, top, cancellationToken);
 6308                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 309                }
 0310                catch (Exception e)
 311                {
 0312                    scope0.Failed(e);
 0313                    throw;
 314                }
 6315            }
 316            Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint)
 317            {
 0318                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtScope");
 0319                scope0.Start();
 320                try
 321                {
 0322                    var response = RestClient.ListAtScopeNextPage(nextLink, scope, deploymentName, top, cancellationToke
 0323                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 324                }
 0325                catch (Exception e)
 326                {
 0327                    scope0.Failed(e);
 0328                    throw;
 329                }
 0330            }
 6331            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 332        }
 333
 334        /// <summary> Gets all deployments operations for a deployment. </summary>
 335        /// <param name="deploymentName"> The name of the deployment. </param>
 336        /// <param name="top"> The number of results to return. </param>
 337        /// <param name="cancellationToken"> The cancellation token to use. </param>
 338        public virtual AsyncPageable<DeploymentOperation> ListAtTenantScopeAsync(string deploymentName, int? top = null,
 339        {
 0340            if (deploymentName == null)
 341            {
 0342                throw new ArgumentNullException(nameof(deploymentName));
 343            }
 344
 345            async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint)
 346            {
 0347                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope");
 0348                scope0.Start();
 349                try
 350                {
 0351                    var response = await RestClient.ListAtTenantScopeAsync(deploymentName, top, cancellationToken).Confi
 0352                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 353                }
 0354                catch (Exception e)
 355                {
 0356                    scope0.Failed(e);
 0357                    throw;
 358                }
 0359            }
 360            async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint)
 361            {
 0362                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope");
 0363                scope0.Start();
 364                try
 365                {
 0366                    var response = await RestClient.ListAtTenantScopeNextPageAsync(nextLink, deploymentName, top, cancel
 0367                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 368                }
 0369                catch (Exception e)
 370                {
 0371                    scope0.Failed(e);
 0372                    throw;
 373                }
 0374            }
 0375            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 376        }
 377
 378        /// <summary> Gets all deployments operations for a deployment. </summary>
 379        /// <param name="deploymentName"> The name of the deployment. </param>
 380        /// <param name="top"> The number of results to return. </param>
 381        /// <param name="cancellationToken"> The cancellation token to use. </param>
 382        public virtual Pageable<DeploymentOperation> ListAtTenantScope(string deploymentName, int? top = null, Cancellat
 383        {
 0384            if (deploymentName == null)
 385            {
 0386                throw new ArgumentNullException(nameof(deploymentName));
 387            }
 388
 389            Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint)
 390            {
 0391                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope");
 0392                scope0.Start();
 393                try
 394                {
 0395                    var response = RestClient.ListAtTenantScope(deploymentName, top, cancellationToken);
 0396                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 397                }
 0398                catch (Exception e)
 399                {
 0400                    scope0.Failed(e);
 0401                    throw;
 402                }
 0403            }
 404            Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint)
 405            {
 0406                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtTenantScope");
 0407                scope0.Start();
 408                try
 409                {
 0410                    var response = RestClient.ListAtTenantScopeNextPage(nextLink, deploymentName, top, cancellationToken
 0411                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 412                }
 0413                catch (Exception e)
 414                {
 0415                    scope0.Failed(e);
 0416                    throw;
 417                }
 0418            }
 0419            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 420        }
 421
 422        /// <summary> Gets all deployments operations for a deployment. </summary>
 423        /// <param name="groupId"> The management group ID. </param>
 424        /// <param name="deploymentName"> The name of the deployment. </param>
 425        /// <param name="top"> The number of results to return. </param>
 426        /// <param name="cancellationToken"> The cancellation token to use. </param>
 427        public virtual AsyncPageable<DeploymentOperation> ListAtManagementGroupScopeAsync(string groupId, string deploym
 428        {
 0429            if (groupId == null)
 430            {
 0431                throw new ArgumentNullException(nameof(groupId));
 432            }
 0433            if (deploymentName == null)
 434            {
 0435                throw new ArgumentNullException(nameof(deploymentName));
 436            }
 437
 438            async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint)
 439            {
 0440                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope");
 0441                scope0.Start();
 442                try
 443                {
 0444                    var response = await RestClient.ListAtManagementGroupScopeAsync(groupId, deploymentName, top, cancel
 0445                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 446                }
 0447                catch (Exception e)
 448                {
 0449                    scope0.Failed(e);
 0450                    throw;
 451                }
 0452            }
 453            async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint)
 454            {
 0455                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope");
 0456                scope0.Start();
 457                try
 458                {
 0459                    var response = await RestClient.ListAtManagementGroupScopeNextPageAsync(nextLink, groupId, deploymen
 0460                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 461                }
 0462                catch (Exception e)
 463                {
 0464                    scope0.Failed(e);
 0465                    throw;
 466                }
 0467            }
 0468            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 469        }
 470
 471        /// <summary> Gets all deployments operations for a deployment. </summary>
 472        /// <param name="groupId"> The management group ID. </param>
 473        /// <param name="deploymentName"> The name of the deployment. </param>
 474        /// <param name="top"> The number of results to return. </param>
 475        /// <param name="cancellationToken"> The cancellation token to use. </param>
 476        public virtual Pageable<DeploymentOperation> ListAtManagementGroupScope(string groupId, string deploymentName, i
 477        {
 0478            if (groupId == null)
 479            {
 0480                throw new ArgumentNullException(nameof(groupId));
 481            }
 0482            if (deploymentName == null)
 483            {
 0484                throw new ArgumentNullException(nameof(deploymentName));
 485            }
 486
 487            Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint)
 488            {
 0489                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope");
 0490                scope0.Start();
 491                try
 492                {
 0493                    var response = RestClient.ListAtManagementGroupScope(groupId, deploymentName, top, cancellationToken
 0494                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 495                }
 0496                catch (Exception e)
 497                {
 0498                    scope0.Failed(e);
 0499                    throw;
 500                }
 0501            }
 502            Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint)
 503            {
 0504                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtManagementGroupScope");
 0505                scope0.Start();
 506                try
 507                {
 0508                    var response = RestClient.ListAtManagementGroupScopeNextPage(nextLink, groupId, deploymentName, top,
 0509                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 510                }
 0511                catch (Exception e)
 512                {
 0513                    scope0.Failed(e);
 0514                    throw;
 515                }
 0516            }
 0517            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 518        }
 519
 520        /// <summary> Gets all deployments operations for a deployment. </summary>
 521        /// <param name="deploymentName"> The name of the deployment. </param>
 522        /// <param name="top"> The number of results to return. </param>
 523        /// <param name="cancellationToken"> The cancellation token to use. </param>
 524        public virtual AsyncPageable<DeploymentOperation> ListAtSubscriptionScopeAsync(string deploymentName, int? top =
 525        {
 0526            if (deploymentName == null)
 527            {
 0528                throw new ArgumentNullException(nameof(deploymentName));
 529            }
 530
 531            async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint)
 532            {
 0533                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope");
 0534                scope0.Start();
 535                try
 536                {
 0537                    var response = await RestClient.ListAtSubscriptionScopeAsync(deploymentName, top, cancellationToken)
 0538                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 539                }
 0540                catch (Exception e)
 541                {
 0542                    scope0.Failed(e);
 0543                    throw;
 544                }
 0545            }
 546            async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint)
 547            {
 0548                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope");
 0549                scope0.Start();
 550                try
 551                {
 0552                    var response = await RestClient.ListAtSubscriptionScopeNextPageAsync(nextLink, deploymentName, top, 
 0553                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 554                }
 0555                catch (Exception e)
 556                {
 0557                    scope0.Failed(e);
 0558                    throw;
 559                }
 0560            }
 0561            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 562        }
 563
 564        /// <summary> Gets all deployments operations for a deployment. </summary>
 565        /// <param name="deploymentName"> The name of the deployment. </param>
 566        /// <param name="top"> The number of results to return. </param>
 567        /// <param name="cancellationToken"> The cancellation token to use. </param>
 568        public virtual Pageable<DeploymentOperation> ListAtSubscriptionScope(string deploymentName, int? top = null, Can
 569        {
 0570            if (deploymentName == null)
 571            {
 0572                throw new ArgumentNullException(nameof(deploymentName));
 573            }
 574
 575            Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint)
 576            {
 0577                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope");
 0578                scope0.Start();
 579                try
 580                {
 0581                    var response = RestClient.ListAtSubscriptionScope(deploymentName, top, cancellationToken);
 0582                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 583                }
 0584                catch (Exception e)
 585                {
 0586                    scope0.Failed(e);
 0587                    throw;
 588                }
 0589            }
 590            Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint)
 591            {
 0592                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.ListAtSubscriptionScope");
 0593                scope0.Start();
 594                try
 595                {
 0596                    var response = RestClient.ListAtSubscriptionScopeNextPage(nextLink, deploymentName, top, cancellatio
 0597                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 598                }
 0599                catch (Exception e)
 600                {
 0601                    scope0.Failed(e);
 0602                    throw;
 603                }
 0604            }
 0605            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 606        }
 607
 608        /// <summary> Gets all deployments operations for a deployment. </summary>
 609        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 610        /// <param name="deploymentName"> The name of the deployment. </param>
 611        /// <param name="top"> The number of results to return. </param>
 612        /// <param name="cancellationToken"> The cancellation token to use. </param>
 613        public virtual AsyncPageable<DeploymentOperation> ListAsync(string resourceGroupName, string deploymentName, int
 614        {
 8615            if (resourceGroupName == null)
 616            {
 0617                throw new ArgumentNullException(nameof(resourceGroupName));
 618            }
 8619            if (deploymentName == null)
 620            {
 0621                throw new ArgumentNullException(nameof(deploymentName));
 622            }
 623
 624            async Task<Page<DeploymentOperation>> FirstPageFunc(int? pageSizeHint)
 625            {
 8626                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List");
 8627                scope0.Start();
 628                try
 629                {
 8630                    var response = await RestClient.ListAsync(resourceGroupName, deploymentName, top, cancellationToken)
 8631                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 632                }
 0633                catch (Exception e)
 634                {
 0635                    scope0.Failed(e);
 0636                    throw;
 637                }
 8638            }
 639            async Task<Page<DeploymentOperation>> NextPageFunc(string nextLink, int? pageSizeHint)
 640            {
 0641                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List");
 0642                scope0.Start();
 643                try
 644                {
 0645                    var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, deploymentName, top, 
 0646                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 647                }
 0648                catch (Exception e)
 649                {
 0650                    scope0.Failed(e);
 0651                    throw;
 652                }
 0653            }
 8654            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 655        }
 656
 657        /// <summary> Gets all deployments operations for a deployment. </summary>
 658        /// <param name="resourceGroupName"> The name of the resource group. The name is case insensitive. </param>
 659        /// <param name="deploymentName"> The name of the deployment. </param>
 660        /// <param name="top"> The number of results to return. </param>
 661        /// <param name="cancellationToken"> The cancellation token to use. </param>
 662        public virtual Pageable<DeploymentOperation> List(string resourceGroupName, string deploymentName, int? top = nu
 663        {
 8664            if (resourceGroupName == null)
 665            {
 0666                throw new ArgumentNullException(nameof(resourceGroupName));
 667            }
 8668            if (deploymentName == null)
 669            {
 0670                throw new ArgumentNullException(nameof(deploymentName));
 671            }
 672
 673            Page<DeploymentOperation> FirstPageFunc(int? pageSizeHint)
 674            {
 8675                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List");
 8676                scope0.Start();
 677                try
 678                {
 8679                    var response = RestClient.List(resourceGroupName, deploymentName, top, cancellationToken);
 8680                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 681                }
 0682                catch (Exception e)
 683                {
 0684                    scope0.Failed(e);
 0685                    throw;
 686                }
 8687            }
 688            Page<DeploymentOperation> NextPageFunc(string nextLink, int? pageSizeHint)
 689            {
 0690                using var scope0 = _clientDiagnostics.CreateScope("DeploymentOperations.List");
 0691                scope0.Start();
 692                try
 693                {
 0694                    var response = RestClient.ListNextPage(nextLink, resourceGroupName, deploymentName, top, cancellatio
 0695                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 696                }
 0697                catch (Exception e)
 698                {
 0699                    scope0.Failed(e);
 0700                    throw;
 701                }
 0702            }
 8703            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 704        }
 705    }
 706}