< Summary

Class:Azure.ResourceManager.Storage.BlobContainersOperations
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\BlobContainersOperations.cs
Covered lines:122
Uncovered lines:96
Coverable lines:218
Total lines:645
Line coverage:55.9% (122 of 218)
Covered branches:4
Total branches:8
Branch coverage:50% (4 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
CreateAsync()-57.14%100%
Create(...)-57.14%100%
UpdateAsync()-57.14%100%
Update(...)-57.14%100%
GetAsync()-57.14%100%
Get(...)-57.14%100%
DeleteAsync()-57.14%100%
Delete(...)-57.14%100%
SetLegalHoldAsync()-57.14%100%
SetLegalHold(...)-57.14%100%
ClearLegalHoldAsync()-57.14%100%
ClearLegalHold(...)-57.14%100%
CreateOrUpdateImmutabilityPolicyAsync()-57.14%100%
CreateOrUpdateImmutabilityPolicy(...)-57.14%100%
GetImmutabilityPolicyAsync()-57.14%100%
GetImmutabilityPolicy(...)-57.14%100%
DeleteImmutabilityPolicyAsync()-57.14%100%
DeleteImmutabilityPolicy(...)-57.14%100%
LockImmutabilityPolicyAsync()-57.14%100%
LockImmutabilityPolicy(...)-57.14%100%
ExtendImmutabilityPolicyAsync()-57.14%100%
ExtendImmutabilityPolicy(...)-57.14%100%
LeaseAsync()-0%100%
Lease(...)-0%100%
ListAsync(...)-61.9%50%
<ListAsync()-62.5%100%
<ListAsync()-62.5%100%
List(...)-61.9%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\BlobContainersOperations.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.Storage.Models;
 15
 16namespace Azure.ResourceManager.Storage
 17{
 18    /// <summary> The BlobContainers service client. </summary>
 19    public partial class BlobContainersOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 20823        internal BlobContainersRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of BlobContainersOperations for mocking. </summary>
 24025        protected BlobContainersOperations()
 26        {
 24027        }
 28        /// <summary> Initializes a new instance of BlobContainersOperations. </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>
 33        /// <param name="apiVersion"> Api Version. </param>
 24034        internal BlobContainersOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptio
 35        {
 24036            RestClient = new BlobContainersRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVers
 24037            _clientDiagnostics = clientDiagnostics;
 24038            _pipeline = pipeline;
 24039        }
 40
 41        /// <summary> Creates a new container under the specified account as described by request body. The container re
 42        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 43        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 44        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 45        /// <param name="blobContainer"> Properties of the blob container to create. </param>
 46        /// <param name="cancellationToken"> The cancellation token to use. </param>
 47        public virtual async Task<Response<BlobContainer>> CreateAsync(string resourceGroupName, string accountName, str
 48        {
 3449            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Create");
 3450            scope.Start();
 51            try
 52            {
 3453                return await RestClient.CreateAsync(resourceGroupName, accountName, containerName, blobContainer, cancel
 54            }
 055            catch (Exception e)
 56            {
 057                scope.Failed(e);
 058                throw;
 59            }
 3460        }
 61
 62        /// <summary> Creates a new container under the specified account as described by request body. The container re
 63        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 64        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 65        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 66        /// <param name="blobContainer"> Properties of the blob container to create. </param>
 67        /// <param name="cancellationToken"> The cancellation token to use. </param>
 68        public virtual Response<BlobContainer> Create(string resourceGroupName, string accountName, string containerName
 69        {
 3470            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Create");
 3471            scope.Start();
 72            try
 73            {
 3474                return RestClient.Create(resourceGroupName, accountName, containerName, blobContainer, cancellationToken
 75            }
 076            catch (Exception e)
 77            {
 078                scope.Failed(e);
 079                throw;
 80            }
 3481        }
 82
 83        /// <summary> Updates container properties as specified in request body. Properties not mentioned in the request
 84        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 85        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 86        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 87        /// <param name="blobContainer"> Properties to update for the blob container. </param>
 88        /// <param name="cancellationToken"> The cancellation token to use. </param>
 89        public virtual async Task<Response<BlobContainer>> UpdateAsync(string resourceGroupName, string accountName, str
 90        {
 691            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Update");
 692            scope.Start();
 93            try
 94            {
 695                return await RestClient.UpdateAsync(resourceGroupName, accountName, containerName, blobContainer, cancel
 96            }
 097            catch (Exception e)
 98            {
 099                scope.Failed(e);
 0100                throw;
 101            }
 6102        }
 103
 104        /// <summary> Updates container properties as specified in request body. Properties not mentioned in the request
 105        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 106        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 107        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 108        /// <param name="blobContainer"> Properties to update for the blob container. </param>
 109        /// <param name="cancellationToken"> The cancellation token to use. </param>
 110        public virtual Response<BlobContainer> Update(string resourceGroupName, string accountName, string containerName
 111        {
 6112            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Update");
 6113            scope.Start();
 114            try
 115            {
 6116                return RestClient.Update(resourceGroupName, accountName, containerName, blobContainer, cancellationToken
 117            }
 0118            catch (Exception e)
 119            {
 0120                scope.Failed(e);
 0121                throw;
 122            }
 6123        }
 124
 125        /// <summary> Gets properties of a specified container. </summary>
 126        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 127        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 128        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 129        /// <param name="cancellationToken"> The cancellation token to use. </param>
 130        public virtual async Task<Response<BlobContainer>> GetAsync(string resourceGroupName, string accountName, string
 131        {
 6132            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Get");
 6133            scope.Start();
 134            try
 135            {
 6136                return await RestClient.GetAsync(resourceGroupName, accountName, containerName, cancellationToken).Confi
 137            }
 0138            catch (Exception e)
 139            {
 0140                scope.Failed(e);
 0141                throw;
 142            }
 6143        }
 144
 145        /// <summary> Gets properties of a specified container. </summary>
 146        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 147        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 148        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 149        /// <param name="cancellationToken"> The cancellation token to use. </param>
 150        public virtual Response<BlobContainer> Get(string resourceGroupName, string accountName, string containerName, C
 151        {
 6152            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Get");
 6153            scope.Start();
 154            try
 155            {
 6156                return RestClient.Get(resourceGroupName, accountName, containerName, cancellationToken);
 157            }
 0158            catch (Exception e)
 159            {
 0160                scope.Failed(e);
 0161                throw;
 162            }
 6163        }
 164
 165        /// <summary> Deletes specified container under its account. </summary>
 166        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 167        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 168        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 169        /// <param name="cancellationToken"> The cancellation token to use. </param>
 170        public virtual async Task<Response> DeleteAsync(string resourceGroupName, string accountName, string containerNa
 171        {
 10172            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Delete");
 10173            scope.Start();
 174            try
 175            {
 10176                return await RestClient.DeleteAsync(resourceGroupName, accountName, containerName, cancellationToken).Co
 177            }
 0178            catch (Exception e)
 179            {
 0180                scope.Failed(e);
 0181                throw;
 182            }
 10183        }
 184
 185        /// <summary> Deletes specified container under its account. </summary>
 186        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 187        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 188        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 189        /// <param name="cancellationToken"> The cancellation token to use. </param>
 190        public virtual Response Delete(string resourceGroupName, string accountName, string containerName, CancellationT
 191        {
 10192            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Delete");
 10193            scope.Start();
 194            try
 195            {
 10196                return RestClient.Delete(resourceGroupName, accountName, containerName, cancellationToken);
 197            }
 0198            catch (Exception e)
 199            {
 0200                scope.Failed(e);
 0201                throw;
 202            }
 10203        }
 204
 205        /// <summary> Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follow
 206        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 207        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 208        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 209        /// <param name="legalHold"> The LegalHold property that will be set to a blob container. </param>
 210        /// <param name="cancellationToken"> The cancellation token to use. </param>
 211        public virtual async Task<Response<LegalHold>> SetLegalHoldAsync(string resourceGroupName, string accountName, s
 212        {
 4213            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.SetLegalHold");
 4214            scope.Start();
 215            try
 216            {
 4217                return await RestClient.SetLegalHoldAsync(resourceGroupName, accountName, containerName, legalHold, canc
 218            }
 0219            catch (Exception e)
 220            {
 0221                scope.Failed(e);
 0222                throw;
 223            }
 4224        }
 225
 226        /// <summary> Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follow
 227        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 228        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 229        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 230        /// <param name="legalHold"> The LegalHold property that will be set to a blob container. </param>
 231        /// <param name="cancellationToken"> The cancellation token to use. </param>
 232        public virtual Response<LegalHold> SetLegalHold(string resourceGroupName, string accountName, string containerNa
 233        {
 4234            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.SetLegalHold");
 4235            scope.Start();
 236            try
 237            {
 4238                return RestClient.SetLegalHold(resourceGroupName, accountName, containerName, legalHold, cancellationTok
 239            }
 0240            catch (Exception e)
 241            {
 0242                scope.Failed(e);
 0243                throw;
 244            }
 4245        }
 246
 247        /// <summary> Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. 
 248        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 249        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 250        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 251        /// <param name="legalHold"> The LegalHold property that will be clear from a blob container. </param>
 252        /// <param name="cancellationToken"> The cancellation token to use. </param>
 253        public virtual async Task<Response<LegalHold>> ClearLegalHoldAsync(string resourceGroupName, string accountName,
 254        {
 4255            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.ClearLegalHold");
 4256            scope.Start();
 257            try
 258            {
 4259                return await RestClient.ClearLegalHoldAsync(resourceGroupName, accountName, containerName, legalHold, ca
 260            }
 0261            catch (Exception e)
 262            {
 0263                scope.Failed(e);
 0264                throw;
 265            }
 4266        }
 267
 268        /// <summary> Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. 
 269        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 270        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 271        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 272        /// <param name="legalHold"> The LegalHold property that will be clear from a blob container. </param>
 273        /// <param name="cancellationToken"> The cancellation token to use. </param>
 274        public virtual Response<LegalHold> ClearLegalHold(string resourceGroupName, string accountName, string container
 275        {
 4276            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.ClearLegalHold");
 4277            scope.Start();
 278            try
 279            {
 4280                return RestClient.ClearLegalHold(resourceGroupName, accountName, containerName, legalHold, cancellationT
 281            }
 0282            catch (Exception e)
 283            {
 0284                scope.Failed(e);
 0285                throw;
 286            }
 4287        }
 288
 289        /// <summary> Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not r
 290        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 291        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 292        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 293        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 294        /// <param name="parameters"> The ImmutabilityPolicy Properties that will be created or updated to a blob contai
 295        /// <param name="cancellationToken"> The cancellation token to use. </param>
 296        public virtual async Task<Response<ImmutabilityPolicy>> CreateOrUpdateImmutabilityPolicyAsync(string resourceGro
 297        {
 16298            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.CreateOrUpdateImmutabilityPolicy"
 16299            scope.Start();
 300            try
 301            {
 16302                return await RestClient.CreateOrUpdateImmutabilityPolicyAsync(resourceGroupName, accountName, containerN
 303            }
 0304            catch (Exception e)
 305            {
 0306                scope.Failed(e);
 0307                throw;
 308            }
 16309        }
 310
 311        /// <summary> Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not r
 312        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 313        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 314        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 315        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 316        /// <param name="parameters"> The ImmutabilityPolicy Properties that will be created or updated to a blob contai
 317        /// <param name="cancellationToken"> The cancellation token to use. </param>
 318        public virtual Response<ImmutabilityPolicy> CreateOrUpdateImmutabilityPolicy(string resourceGroupName, string ac
 319        {
 16320            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.CreateOrUpdateImmutabilityPolicy"
 16321            scope.Start();
 322            try
 323            {
 16324                return RestClient.CreateOrUpdateImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatc
 325            }
 0326            catch (Exception e)
 327            {
 0328                scope.Failed(e);
 0329                throw;
 330            }
 16331        }
 332
 333        /// <summary> Gets the existing immutability policy along with the corresponding ETag in response headers and bo
 334        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 335        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 336        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 337        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 338        /// <param name="cancellationToken"> The cancellation token to use. </param>
 339        public virtual async Task<Response<ImmutabilityPolicy>> GetImmutabilityPolicyAsync(string resourceGroupName, str
 340        {
 4341            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.GetImmutabilityPolicy");
 4342            scope.Start();
 343            try
 344            {
 4345                return await RestClient.GetImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMatc
 346            }
 0347            catch (Exception e)
 348            {
 0349                scope.Failed(e);
 0350                throw;
 351            }
 4352        }
 353
 354        /// <summary> Gets the existing immutability policy along with the corresponding ETag in response headers and bo
 355        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 356        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 357        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 358        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 359        /// <param name="cancellationToken"> The cancellation token to use. </param>
 360        public virtual Response<ImmutabilityPolicy> GetImmutabilityPolicy(string resourceGroupName, string accountName, 
 361        {
 4362            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.GetImmutabilityPolicy");
 4363            scope.Start();
 364            try
 365            {
 4366                return RestClient.GetImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch, cancella
 367            }
 0368            catch (Exception e)
 369            {
 0370                scope.Failed(e);
 0371                throw;
 372            }
 4373        }
 374
 375        /// <summary> Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreation
 376        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 377        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 378        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 379        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 380        /// <param name="cancellationToken"> The cancellation token to use. </param>
 381        public virtual async Task<Response<ImmutabilityPolicy>> DeleteImmutabilityPolicyAsync(string resourceGroupName, 
 382        {
 2383            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.DeleteImmutabilityPolicy");
 2384            scope.Start();
 385            try
 386            {
 2387                return await RestClient.DeleteImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifM
 388            }
 0389            catch (Exception e)
 390            {
 0391                scope.Failed(e);
 0392                throw;
 393            }
 2394        }
 395
 396        /// <summary> Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreation
 397        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 398        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 399        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 400        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 401        /// <param name="cancellationToken"> The cancellation token to use. </param>
 402        public virtual Response<ImmutabilityPolicy> DeleteImmutabilityPolicy(string resourceGroupName, string accountNam
 403        {
 2404            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.DeleteImmutabilityPolicy");
 2405            scope.Start();
 406            try
 407            {
 2408                return RestClient.DeleteImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch, cance
 409            }
 0410            catch (Exception e)
 411            {
 0412                scope.Failed(e);
 0413                throw;
 414            }
 2415        }
 416
 417        /// <summary> Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendI
 418        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 419        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 420        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 421        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 422        /// <param name="cancellationToken"> The cancellation token to use. </param>
 423        public virtual async Task<Response<ImmutabilityPolicy>> LockImmutabilityPolicyAsync(string resourceGroupName, st
 424        {
 6425            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.LockImmutabilityPolicy");
 6426            scope.Start();
 427            try
 428            {
 6429                return await RestClient.LockImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifMat
 430            }
 0431            catch (Exception e)
 432            {
 0433                scope.Failed(e);
 0434                throw;
 435            }
 6436        }
 437
 438        /// <summary> Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendI
 439        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 440        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 441        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 442        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 443        /// <param name="cancellationToken"> The cancellation token to use. </param>
 444        public virtual Response<ImmutabilityPolicy> LockImmutabilityPolicy(string resourceGroupName, string accountName,
 445        {
 6446            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.LockImmutabilityPolicy");
 6447            scope.Start();
 448            try
 449            {
 6450                return RestClient.LockImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch, cancell
 451            }
 0452            catch (Exception e)
 453            {
 0454                scope.Failed(e);
 0455                throw;
 456            }
 6457        }
 458
 459        /// <summary> Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action 
 460        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 461        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 462        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 463        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 464        /// <param name="parameters"> The ImmutabilityPolicy Properties that will be extended for a blob container. </pa
 465        /// <param name="cancellationToken"> The cancellation token to use. </param>
 466        public virtual async Task<Response<ImmutabilityPolicy>> ExtendImmutabilityPolicyAsync(string resourceGroupName, 
 467        {
 4468            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.ExtendImmutabilityPolicy");
 4469            scope.Start();
 470            try
 471            {
 4472                return await RestClient.ExtendImmutabilityPolicyAsync(resourceGroupName, accountName, containerName, ifM
 473            }
 0474            catch (Exception e)
 475            {
 0476                scope.Failed(e);
 0477                throw;
 478            }
 4479        }
 480
 481        /// <summary> Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action 
 482        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 483        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 484        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 485        /// <param name="ifMatch"> The entity state (ETag) version of the immutability policy to update. A value of &quo
 486        /// <param name="parameters"> The ImmutabilityPolicy Properties that will be extended for a blob container. </pa
 487        /// <param name="cancellationToken"> The cancellation token to use. </param>
 488        public virtual Response<ImmutabilityPolicy> ExtendImmutabilityPolicy(string resourceGroupName, string accountNam
 489        {
 4490            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.ExtendImmutabilityPolicy");
 4491            scope.Start();
 492            try
 493            {
 4494                return RestClient.ExtendImmutabilityPolicy(resourceGroupName, accountName, containerName, ifMatch, param
 495            }
 0496            catch (Exception e)
 497            {
 0498                scope.Failed(e);
 0499                throw;
 500            }
 4501        }
 502
 503        /// <summary> The Lease Container operation establishes and manages a lock on a container for delete operations.
 504        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 505        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 506        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 507        /// <param name="parameters"> Lease Container request body. </param>
 508        /// <param name="cancellationToken"> The cancellation token to use. </param>
 509        public virtual async Task<Response<LeaseContainerResponse>> LeaseAsync(string resourceGroupName, string accountN
 510        {
 0511            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Lease");
 0512            scope.Start();
 513            try
 514            {
 0515                return await RestClient.LeaseAsync(resourceGroupName, accountName, containerName, parameters, cancellati
 516            }
 0517            catch (Exception e)
 518            {
 0519                scope.Failed(e);
 0520                throw;
 521            }
 0522        }
 523
 524        /// <summary> The Lease Container operation establishes and manages a lock on a container for delete operations.
 525        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 526        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 527        /// <param name="containerName"> The name of the blob container within the specified storage account. Blob conta
 528        /// <param name="parameters"> Lease Container request body. </param>
 529        /// <param name="cancellationToken"> The cancellation token to use. </param>
 530        public virtual Response<LeaseContainerResponse> Lease(string resourceGroupName, string accountName, string conta
 531        {
 0532            using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.Lease");
 0533            scope.Start();
 534            try
 535            {
 0536                return RestClient.Lease(resourceGroupName, accountName, containerName, parameters, cancellationToken);
 537            }
 0538            catch (Exception e)
 539            {
 0540                scope.Failed(e);
 0541                throw;
 542            }
 0543        }
 544
 545        /// <summary> Lists all containers and does not support a prefix like data plane. Also SRP today does not return
 546        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 547        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 548        /// <param name="maxpagesize"> Optional. Specified maximum number of containers that can be included in the list
 549        /// <param name="filter"> Optional. When specified, only container names starting with the filter will be listed
 550        /// <param name="cancellationToken"> The cancellation token to use. </param>
 551        public virtual AsyncPageable<ListContainerItem> ListAsync(string resourceGroupName, string accountName, string m
 552        {
 6553            if (resourceGroupName == null)
 554            {
 0555                throw new ArgumentNullException(nameof(resourceGroupName));
 556            }
 6557            if (accountName == null)
 558            {
 0559                throw new ArgumentNullException(nameof(accountName));
 560            }
 561
 562            async Task<Page<ListContainerItem>> FirstPageFunc(int? pageSizeHint)
 563            {
 6564                using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.List");
 6565                scope.Start();
 566                try
 567                {
 6568                    var response = await RestClient.ListAsync(resourceGroupName, accountName, maxpagesize, filter, cance
 6569                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 570                }
 0571                catch (Exception e)
 572                {
 0573                    scope.Failed(e);
 0574                    throw;
 575                }
 6576            }
 577            async Task<Page<ListContainerItem>> NextPageFunc(string nextLink, int? pageSizeHint)
 578            {
 2579                using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.List");
 2580                scope.Start();
 581                try
 582                {
 2583                    var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, accountName, maxpages
 2584                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 585                }
 0586                catch (Exception e)
 587                {
 0588                    scope.Failed(e);
 0589                    throw;
 590                }
 2591            }
 6592            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 593        }
 594
 595        /// <summary> Lists all containers and does not support a prefix like data plane. Also SRP today does not return
 596        /// <param name="resourceGroupName"> The name of the resource group within the user&apos;s subscription. The nam
 597        /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco
 598        /// <param name="maxpagesize"> Optional. Specified maximum number of containers that can be included in the list
 599        /// <param name="filter"> Optional. When specified, only container names starting with the filter will be listed
 600        /// <param name="cancellationToken"> The cancellation token to use. </param>
 601        public virtual Pageable<ListContainerItem> List(string resourceGroupName, string accountName, string maxpagesize
 602        {
 6603            if (resourceGroupName == null)
 604            {
 0605                throw new ArgumentNullException(nameof(resourceGroupName));
 606            }
 6607            if (accountName == null)
 608            {
 0609                throw new ArgumentNullException(nameof(accountName));
 610            }
 611
 612            Page<ListContainerItem> FirstPageFunc(int? pageSizeHint)
 613            {
 6614                using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.List");
 6615                scope.Start();
 616                try
 617                {
 6618                    var response = RestClient.List(resourceGroupName, accountName, maxpagesize, filter, cancellationToke
 6619                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 620                }
 0621                catch (Exception e)
 622                {
 0623                    scope.Failed(e);
 0624                    throw;
 625                }
 6626            }
 627            Page<ListContainerItem> NextPageFunc(string nextLink, int? pageSizeHint)
 628            {
 2629                using var scope = _clientDiagnostics.CreateScope("BlobContainersOperations.List");
 2630                scope.Start();
 631                try
 632                {
 2633                    var response = RestClient.ListNextPage(nextLink, resourceGroupName, accountName, maxpagesize, filter
 2634                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 635                }
 0636                catch (Exception e)
 637                {
 0638                    scope.Failed(e);
 0639                    throw;
 640                }
 2641            }
 6642            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 643        }
 644    }
 645}