< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Count()-0%100%
get_DnsPrefix()-0%100%
get_Fqdn()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeContainerServiceMasterProfile(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceMasterProfile.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.Compute.Models
 11{
 12    /// <summary> Profile for the container service master. </summary>
 13    public partial class ContainerServiceMasterProfile
 14    {
 15        /// <summary> Initializes a new instance of ContainerServiceMasterProfile. </summary>
 16        /// <param name="dnsPrefix"> DNS prefix to be used to create the FQDN for master. </param>
 017        public ContainerServiceMasterProfile(string dnsPrefix)
 18        {
 019            if (dnsPrefix == null)
 20            {
 021                throw new ArgumentNullException(nameof(dnsPrefix));
 22            }
 23
 024            DnsPrefix = dnsPrefix;
 025        }
 26
 27        /// <summary> Initializes a new instance of ContainerServiceMasterProfile. </summary>
 28        /// <param name="count"> Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 
 29        /// <param name="dnsPrefix"> DNS prefix to be used to create the FQDN for master. </param>
 30        /// <param name="fqdn"> FQDN for the master. </param>
 031        internal ContainerServiceMasterProfile(Enum27? count, string dnsPrefix, string fqdn)
 32        {
 033            Count = count;
 034            DnsPrefix = dnsPrefix;
 035            Fqdn = fqdn;
 036        }
 37
 38        /// <summary> Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The defa
 039        public Enum27? Count { get; set; }
 40        /// <summary> DNS prefix to be used to create the FQDN for master. </summary>
 041        public string DnsPrefix { get; set; }
 42        /// <summary> FQDN for the master. </summary>
 043        public string Fqdn { get; }
 44    }
 45}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceMasterProfile.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 ContainerServiceMasterProfile : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Count != null)
 19            {
 020                writer.WritePropertyName("count");
 021                writer.WriteStringValue(Count.Value.ToString());
 22            }
 023            writer.WritePropertyName("dnsPrefix");
 024            writer.WriteStringValue(DnsPrefix);
 025            if (Fqdn != null)
 26            {
 027                writer.WritePropertyName("fqdn");
 028                writer.WriteStringValue(Fqdn);
 29            }
 030            writer.WriteEndObject();
 031        }
 32
 33        internal static ContainerServiceMasterProfile DeserializeContainerServiceMasterProfile(JsonElement element)
 34        {
 035            Enum27? count = default;
 036            string dnsPrefix = default;
 037            string fqdn = default;
 038            foreach (var property in element.EnumerateObject())
 39            {
 040                if (property.NameEquals("count"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    count = new Enum27(property.Value.GetInt32());
 047                    continue;
 48                }
 049                if (property.NameEquals("dnsPrefix"))
 50                {
 051                    dnsPrefix = property.Value.GetString();
 052                    continue;
 53                }
 054                if (property.NameEquals("fqdn"))
 55                {
 056                    if (property.Value.ValueKind == JsonValueKind.Null)
 57                    {
 58                        continue;
 59                    }
 060                    fqdn = property.Value.GetString();
 61                    continue;
 62                }
 63            }
 064            return new ContainerServiceMasterProfile(count, dnsPrefix, fqdn);
 65        }
 66    }
 67}