< Summary

Class:Azure.ResourceManager.Compute.Models.GrantAccessData
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\GrantAccessData.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\GrantAccessData.Serialization.cs
Covered lines:13
Uncovered lines:0
Coverable lines:13
Total lines:52
Line coverage:100% (13 of 13)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Access()-100%100%
get_DurationInSeconds()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\GrantAccessData.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.Compute.Models
 9{
 10    /// <summary> Data used for requesting a SAS. </summary>
 11    public partial class GrantAccessData
 12    {
 13        /// <summary> Initializes a new instance of GrantAccessData. </summary>
 14        /// <param name="access"> The Access Level, accepted values include None, Read, Write. </param>
 15        /// <param name="durationInSeconds"> Time duration in seconds until the SAS access expires. </param>
 2216        public GrantAccessData(AccessLevel access, int durationInSeconds)
 17        {
 2218            Access = access;
 2219            DurationInSeconds = durationInSeconds;
 2220        }
 21
 22        /// <summary> The Access Level, accepted values include None, Read, Write. </summary>
 6023        public AccessLevel Access { get; }
 24        /// <summary> Time duration in seconds until the SAS access expires. </summary>
 6025        public int DurationInSeconds { get; }
 26    }
 27}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\GrantAccessData.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.Compute.Models
 12{
 13    public partial class GrantAccessData : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 4017            writer.WriteStartObject();
 4018            writer.WritePropertyName("access");
 4019            writer.WriteStringValue(Access.ToString());
 4020            writer.WritePropertyName("durationInSeconds");
 4021            writer.WriteNumberValue(DurationInSeconds);
 4022            writer.WriteEndObject();
 4023        }
 24    }
 25}