< Summary

Class:Azure.ResourceManager.Storage.Models.AzureFilesIdentityBasedAuthentication
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\AzureFilesIdentityBasedAuthentication.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\AzureFilesIdentityBasedAuthentication.Serialization.cs
Covered lines:11
Uncovered lines:16
Coverable lines:27
Total lines:86
Line coverage:40.7% (11 of 27)
Covered branches:5
Total branches:10
Branch coverage:50% (5 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-100%100%
get_DirectoryServiceOptions()-0%100%
get_ActiveDirectoryProperties()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureFilesIdentityBasedAuthentication(...)-70%62.5%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\AzureFilesIdentityBasedAuthentication.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> Settings for Azure Files identity based authentication. </summary>
 11    public partial class AzureFilesIdentityBasedAuthentication
 12    {
 13        /// <summary> Initializes a new instance of AzureFilesIdentityBasedAuthentication. </summary>
 14        /// <param name="directoryServiceOptions"> Indicates the directory service used. </param>
 015        public AzureFilesIdentityBasedAuthentication(DirectoryServiceOptions directoryServiceOptions)
 16        {
 017            DirectoryServiceOptions = directoryServiceOptions;
 018        }
 19
 20        /// <summary> Initializes a new instance of AzureFilesIdentityBasedAuthentication. </summary>
 21        /// <param name="directoryServiceOptions"> Indicates the directory service used. </param>
 22        /// <param name="activeDirectoryProperties"> Required if choose AD. </param>
 423        internal AzureFilesIdentityBasedAuthentication(DirectoryServiceOptions directoryServiceOptions, ActiveDirectoryP
 24        {
 425            DirectoryServiceOptions = directoryServiceOptions;
 426            ActiveDirectoryProperties = activeDirectoryProperties;
 427        }
 28
 29        /// <summary> Indicates the directory service used. </summary>
 030        public DirectoryServiceOptions DirectoryServiceOptions { get; set; }
 31        /// <summary> Required if choose AD. </summary>
 032        public ActiveDirectoryProperties ActiveDirectoryProperties { get; set; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\AzureFilesIdentityBasedAuthentication.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 AzureFilesIdentityBasedAuthentication : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("directoryServiceOptions");
 019            writer.WriteStringValue(DirectoryServiceOptions.ToString());
 020            if (ActiveDirectoryProperties != null)
 21            {
 022                writer.WritePropertyName("activeDirectoryProperties");
 023                writer.WriteObjectValue(ActiveDirectoryProperties);
 24            }
 025            writer.WriteEndObject();
 026        }
 27
 28        internal static AzureFilesIdentityBasedAuthentication DeserializeAzureFilesIdentityBasedAuthentication(JsonEleme
 29        {
 430            DirectoryServiceOptions directoryServiceOptions = default;
 431            ActiveDirectoryProperties activeDirectoryProperties = default;
 1632            foreach (var property in element.EnumerateObject())
 33            {
 434                if (property.NameEquals("directoryServiceOptions"))
 35                {
 436                    directoryServiceOptions = new DirectoryServiceOptions(property.Value.GetString());
 437                    continue;
 38                }
 039                if (property.NameEquals("activeDirectoryProperties"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    activeDirectoryProperties = ActiveDirectoryProperties.DeserializeActiveDirectoryProperties(property.
 46                    continue;
 47                }
 48            }
 449            return new AzureFilesIdentityBasedAuthentication(directoryServiceOptions, activeDirectoryProperties);
 50        }
 51    }
 52}