< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceAgentPoolProfile.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 agent pool. </summary>
 13    public partial class ContainerServiceAgentPoolProfile
 14    {
 15        /// <summary> Initializes a new instance of ContainerServiceAgentPoolProfile. </summary>
 16        /// <param name="name"> Unique name of the agent pool profile in the context of the subscription and resource gr
 17        /// <param name="count"> Number of agents (VMs) to host docker containers. Allowed values must be in the range o
 18        /// <param name="vmSize"> Size of agent VMs. </param>
 19        /// <param name="dnsPrefix"> DNS prefix to be used to create the FQDN for the agent pool. </param>
 020        public ContainerServiceAgentPoolProfile(string name, int count, ContainerServiceVMSizeTypes vmSize, string dnsPr
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 026            if (dnsPrefix == null)
 27            {
 028                throw new ArgumentNullException(nameof(dnsPrefix));
 29            }
 30
 031            Name = name;
 032            Count = count;
 033            VmSize = vmSize;
 034            DnsPrefix = dnsPrefix;
 035        }
 36
 37        /// <summary> Initializes a new instance of ContainerServiceAgentPoolProfile. </summary>
 38        /// <param name="name"> Unique name of the agent pool profile in the context of the subscription and resource gr
 39        /// <param name="count"> Number of agents (VMs) to host docker containers. Allowed values must be in the range o
 40        /// <param name="vmSize"> Size of agent VMs. </param>
 41        /// <param name="dnsPrefix"> DNS prefix to be used to create the FQDN for the agent pool. </param>
 42        /// <param name="fqdn"> FQDN for the agent pool. </param>
 043        internal ContainerServiceAgentPoolProfile(string name, int count, ContainerServiceVMSizeTypes vmSize, string dns
 44        {
 045            Name = name;
 046            Count = count;
 047            VmSize = vmSize;
 048            DnsPrefix = dnsPrefix;
 049            Fqdn = fqdn;
 050        }
 51
 52        /// <summary> Unique name of the agent pool profile in the context of the subscription and resource group. </sum
 053        public string Name { get; set; }
 54        /// <summary> Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 
 055        public int Count { get; set; }
 56        /// <summary> Size of agent VMs. </summary>
 057        public ContainerServiceVMSizeTypes VmSize { get; set; }
 58        /// <summary> DNS prefix to be used to create the FQDN for the agent pool. </summary>
 059        public string DnsPrefix { get; set; }
 60        /// <summary> FQDN for the agent pool. </summary>
 061        public string Fqdn { get; }
 62    }
 63}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerServiceAgentPoolProfile.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 ContainerServiceAgentPoolProfile : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("name");
 019            writer.WriteStringValue(Name);
 020            writer.WritePropertyName("count");
 021            writer.WriteNumberValue(Count);
 022            writer.WritePropertyName("vmSize");
 023            writer.WriteStringValue(VmSize.ToString());
 024            writer.WritePropertyName("dnsPrefix");
 025            writer.WriteStringValue(DnsPrefix);
 026            if (Fqdn != null)
 27            {
 028                writer.WritePropertyName("fqdn");
 029                writer.WriteStringValue(Fqdn);
 30            }
 031            writer.WriteEndObject();
 032        }
 33
 34        internal static ContainerServiceAgentPoolProfile DeserializeContainerServiceAgentPoolProfile(JsonElement element
 35        {
 036            string name = default;
 037            int count = default;
 038            ContainerServiceVMSizeTypes vmSize = default;
 039            string dnsPrefix = default;
 040            string fqdn = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("name"))
 44                {
 045                    name = property.Value.GetString();
 046                    continue;
 47                }
 048                if (property.NameEquals("count"))
 49                {
 050                    count = property.Value.GetInt32();
 051                    continue;
 52                }
 053                if (property.NameEquals("vmSize"))
 54                {
 055                    vmSize = new ContainerServiceVMSizeTypes(property.Value.GetString());
 056                    continue;
 57                }
 058                if (property.NameEquals("dnsPrefix"))
 59                {
 060                    dnsPrefix = property.Value.GetString();
 061                    continue;
 62                }
 063                if (property.NameEquals("fqdn"))
 64                {
 065                    if (property.Value.ValueKind == JsonValueKind.Null)
 66                    {
 67                        continue;
 68                    }
 069                    fqdn = property.Value.GetString();
 70                    continue;
 71                }
 72            }
 073            return new ContainerServiceAgentPoolProfile(name, count, vmSize, dnsPrefix, fqdn);
 74        }
 75    }
 76}