< Summary

Class:Azure.ResourceManager.Compute.Models.AccessUri
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AccessUri.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AccessUri.Serialization.cs
Covered lines:10
Uncovered lines:2
Coverable lines:12
Total lines:61
Line coverage:83.3% (10 of 12)
Covered branches:6
Total branches:6
Branch coverage:100% (6 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_AccessSAS()-100%100%
DeserializeAccessUri(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AccessUri.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> A disk access SAS uri. </summary>
 11    public partial class AccessUri
 12    {
 13        /// <summary> Initializes a new instance of AccessUri. </summary>
 014        internal AccessUri()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of AccessUri. </summary>
 19        /// <param name="accessSAS"> A SAS uri for accessing a disk. </param>
 2020        internal AccessUri(string accessSAS)
 21        {
 2022            AccessSAS = accessSAS;
 2023        }
 24
 25        /// <summary> A SAS uri for accessing a disk. </summary>
 2026        public string AccessSAS { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\AccessUri.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 AccessUri
 14    {
 15        internal static AccessUri DeserializeAccessUri(JsonElement element)
 16        {
 2017            string accessSAS = default;
 8018            foreach (var property in element.EnumerateObject())
 19            {
 2020                if (property.NameEquals("accessSAS"))
 21                {
 2022                    if (property.Value.ValueKind == JsonValueKind.Null)
 23                    {
 24                        continue;
 25                    }
 2026                    accessSAS = property.Value.GetString();
 27                    continue;
 28                }
 29            }
 2030            return new AccessUri(accessSAS);
 31        }
 32    }
 33}