< Summary

Class:Azure.ResourceManager.Storage.Models.LeaseContainerResponse
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\LeaseContainerResponse.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\LeaseContainerResponse.Serialization.cs
Covered lines:0
Uncovered lines:19
Coverable lines:19
Total lines:75
Line coverage:0% (0 of 19)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_LeaseId()-0%100%
get_LeaseTimeSeconds()-0%100%
DeserializeLeaseContainerResponse(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\LeaseContainerResponse.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
 8namespace Azure.ResourceManager.Storage.Models
 9{
 10    /// <summary> Lease Container response schema. </summary>
 11    public partial class LeaseContainerResponse
 12    {
 13        /// <summary> Initializes a new instance of LeaseContainerResponse. </summary>
 014        internal LeaseContainerResponse()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of LeaseContainerResponse. </summary>
 19        /// <param name="leaseId"> Returned unique lease ID that must be included with any request to delete the contain
 20        /// <param name="leaseTimeSeconds"> Approximate time remaining in the lease period, in seconds. </param>
 021        internal LeaseContainerResponse(string leaseId, string leaseTimeSeconds)
 22        {
 023            LeaseId = leaseId;
 024            LeaseTimeSeconds = leaseTimeSeconds;
 025        }
 26
 27        /// <summary> Returned unique lease ID that must be included with any request to delete the container, or to ren
 028        public string LeaseId { get; }
 29        /// <summary> Approximate time remaining in the lease period, in seconds. </summary>
 030        public string LeaseTimeSeconds { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\LeaseContainerResponse.Serialization.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Storage.Models
 12{
 13    public partial class LeaseContainerResponse
 14    {
 15        internal static LeaseContainerResponse DeserializeLeaseContainerResponse(JsonElement element)
 16        {
 017            string leaseId = default;
 018            string leaseTimeSeconds = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("leaseId"))
 22                {
 023                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 027                    leaseId = property.Value.GetString();
 028                    continue;
 29                }
 030                if (property.NameEquals("leaseTimeSeconds"))
 31                {
 032                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 036                    leaseTimeSeconds = property.Value.GetString();
 37                    continue;
 38                }
 39            }
 040            return new LeaseContainerResponse(leaseId, leaseTimeSeconds);
 41        }
 42    }
 43}