< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_DomainName()-0%100%
get_NetBiosDomainName()-0%100%
get_ForestName()-0%100%
get_DomainGuid()-0%100%
get_DomainSid()-0%100%
get_AzureStorageSid()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeActiveDirectoryProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ActiveDirectoryProperties.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;
 9
 10namespace Azure.ResourceManager.Storage.Models
 11{
 12    /// <summary> Settings properties for Active Directory (AD). </summary>
 13    public partial class ActiveDirectoryProperties
 14    {
 15        /// <summary> Initializes a new instance of ActiveDirectoryProperties. </summary>
 16        /// <param name="domainName"> Specifies the primary domain that the AD DNS server is authoritative for. </param>
 17        /// <param name="netBiosDomainName"> Specifies the NetBIOS domain name. </param>
 18        /// <param name="forestName"> Specifies the Active Directory forest to get. </param>
 19        /// <param name="domainGuid"> Specifies the domain GUID. </param>
 20        /// <param name="domainSid"> Specifies the security identifier (SID). </param>
 21        /// <param name="azureStorageSid"> Specifies the security identifier (SID) for Azure Storage. </param>
 022        public ActiveDirectoryProperties(string domainName, string netBiosDomainName, string forestName, string domainGu
 23        {
 024            if (domainName == null)
 25            {
 026                throw new ArgumentNullException(nameof(domainName));
 27            }
 028            if (netBiosDomainName == null)
 29            {
 030                throw new ArgumentNullException(nameof(netBiosDomainName));
 31            }
 032            if (forestName == null)
 33            {
 034                throw new ArgumentNullException(nameof(forestName));
 35            }
 036            if (domainGuid == null)
 37            {
 038                throw new ArgumentNullException(nameof(domainGuid));
 39            }
 040            if (domainSid == null)
 41            {
 042                throw new ArgumentNullException(nameof(domainSid));
 43            }
 044            if (azureStorageSid == null)
 45            {
 046                throw new ArgumentNullException(nameof(azureStorageSid));
 47            }
 48
 049            DomainName = domainName;
 050            NetBiosDomainName = netBiosDomainName;
 051            ForestName = forestName;
 052            DomainGuid = domainGuid;
 053            DomainSid = domainSid;
 054            AzureStorageSid = azureStorageSid;
 055        }
 56
 57        /// <summary> Specifies the primary domain that the AD DNS server is authoritative for. </summary>
 058        public string DomainName { get; set; }
 59        /// <summary> Specifies the NetBIOS domain name. </summary>
 060        public string NetBiosDomainName { get; set; }
 61        /// <summary> Specifies the Active Directory forest to get. </summary>
 062        public string ForestName { get; set; }
 63        /// <summary> Specifies the domain GUID. </summary>
 064        public string DomainGuid { get; set; }
 65        /// <summary> Specifies the security identifier (SID). </summary>
 066        public string DomainSid { get; set; }
 67        /// <summary> Specifies the security identifier (SID) for Azure Storage. </summary>
 068        public string AzureStorageSid { get; set; }
 69    }
 70}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ActiveDirectoryProperties.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 ActiveDirectoryProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("domainName");
 019            writer.WriteStringValue(DomainName);
 020            writer.WritePropertyName("netBiosDomainName");
 021            writer.WriteStringValue(NetBiosDomainName);
 022            writer.WritePropertyName("forestName");
 023            writer.WriteStringValue(ForestName);
 024            writer.WritePropertyName("domainGuid");
 025            writer.WriteStringValue(DomainGuid);
 026            writer.WritePropertyName("domainSid");
 027            writer.WriteStringValue(DomainSid);
 028            writer.WritePropertyName("azureStorageSid");
 029            writer.WriteStringValue(AzureStorageSid);
 030            writer.WriteEndObject();
 031        }
 32
 33        internal static ActiveDirectoryProperties DeserializeActiveDirectoryProperties(JsonElement element)
 34        {
 035            string domainName = default;
 036            string netBiosDomainName = default;
 037            string forestName = default;
 038            string domainGuid = default;
 039            string domainSid = default;
 040            string azureStorageSid = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("domainName"))
 44                {
 045                    domainName = property.Value.GetString();
 046                    continue;
 47                }
 048                if (property.NameEquals("netBiosDomainName"))
 49                {
 050                    netBiosDomainName = property.Value.GetString();
 051                    continue;
 52                }
 053                if (property.NameEquals("forestName"))
 54                {
 055                    forestName = property.Value.GetString();
 056                    continue;
 57                }
 058                if (property.NameEquals("domainGuid"))
 59                {
 060                    domainGuid = property.Value.GetString();
 061                    continue;
 62                }
 063                if (property.NameEquals("domainSid"))
 64                {
 065                    domainSid = property.Value.GetString();
 066                    continue;
 67                }
 068                if (property.NameEquals("azureStorageSid"))
 69                {
 070                    azureStorageSid = property.Value.GetString();
 71                    continue;
 72                }
 73            }
 074            return new ActiveDirectoryProperties(domainName, netBiosDomainName, forestName, domainGuid, domainSid, azure
 75        }
 76    }
 77}