< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_Action()-0%100%
get_LeaseId()-0%100%
get_BreakPeriod()-0%100%
get_LeaseDuration()-0%100%
get_ProposedLeaseId()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\LeaseContainerRequest.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 request schema. </summary>
 11    public partial class LeaseContainerRequest
 12    {
 13        /// <summary> Initializes a new instance of LeaseContainerRequest. </summary>
 14        /// <param name="action"> Specifies the lease action. Can be one of the available actions. </param>
 015        public LeaseContainerRequest(LeaseContainerRequestAction action)
 16        {
 017            Action = action;
 018        }
 19
 20        /// <summary> Initializes a new instance of LeaseContainerRequest. </summary>
 21        /// <param name="action"> Specifies the lease action. Can be one of the available actions. </param>
 22        /// <param name="leaseId"> Identifies the lease. Can be specified in any valid GUID string format. </param>
 23        /// <param name="breakPeriod"> Optional. For a break action, proposed duration the lease should continue before 
 24        /// <param name="leaseDuration"> Required for acquire. Specifies the duration of the lease, in seconds, or negat
 25        /// <param name="proposedLeaseId"> Optional for acquire, required for change. Proposed lease ID, in a GUID strin
 026        internal LeaseContainerRequest(LeaseContainerRequestAction action, string leaseId, int? breakPeriod, int? leaseD
 27        {
 028            Action = action;
 029            LeaseId = leaseId;
 030            BreakPeriod = breakPeriod;
 031            LeaseDuration = leaseDuration;
 032            ProposedLeaseId = proposedLeaseId;
 033        }
 34
 35        /// <summary> Specifies the lease action. Can be one of the available actions. </summary>
 036        public LeaseContainerRequestAction Action { get; }
 37        /// <summary> Identifies the lease. Can be specified in any valid GUID string format. </summary>
 038        public string LeaseId { get; set; }
 39        /// <summary> Optional. For a break action, proposed duration the lease should continue before it is broken, in 
 040        public int? BreakPeriod { get; set; }
 41        /// <summary> Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a 
 042        public int? LeaseDuration { get; set; }
 43        /// <summary> Optional for acquire, required for change. Proposed lease ID, in a GUID string format. </summary>
 044        public string ProposedLeaseId { get; set; }
 45    }
 46}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\LeaseContainerRequest.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 LeaseContainerRequest : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("action");
 019            writer.WriteStringValue(Action.ToString());
 020            if (LeaseId != null)
 21            {
 022                writer.WritePropertyName("leaseId");
 023                writer.WriteStringValue(LeaseId);
 24            }
 025            if (BreakPeriod != null)
 26            {
 027                writer.WritePropertyName("breakPeriod");
 028                writer.WriteNumberValue(BreakPeriod.Value);
 29            }
 030            if (LeaseDuration != null)
 31            {
 032                writer.WritePropertyName("leaseDuration");
 033                writer.WriteNumberValue(LeaseDuration.Value);
 34            }
 035            if (ProposedLeaseId != null)
 36            {
 037                writer.WritePropertyName("proposedLeaseId");
 038                writer.WriteStringValue(ProposedLeaseId);
 39            }
 040            writer.WriteEndObject();
 041        }
 42    }
 43}