< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_ProvisioningState()-0%100%
get_OrchestratorProfile()-0%100%
get_CustomProfile()-0%100%
get_ServicePrincipalProfile()-0%100%
get_MasterProfile()-0%100%
get_AgentPoolProfiles()-0%100%
get_WindowsProfile()-0%100%
get_LinuxProfile()-0%100%
get_DiagnosticsProfile()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeContainerService(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerService.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;
 9using System.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Compute.Models
 12{
 13    /// <summary> Container service. </summary>
 14    public partial class ContainerService : Resource
 15    {
 16        /// <summary> Initializes a new instance of ContainerService. </summary>
 17        /// <param name="location"> Resource location. </param>
 018        public ContainerService(string location) : base(location)
 19        {
 020            if (location == null)
 21            {
 022                throw new ArgumentNullException(nameof(location));
 23            }
 024        }
 25
 26        /// <summary> Initializes a new instance of ContainerService. </summary>
 27        /// <param name="id"> Resource Id. </param>
 28        /// <param name="name"> Resource name. </param>
 29        /// <param name="type"> Resource type. </param>
 30        /// <param name="location"> Resource location. </param>
 31        /// <param name="tags"> Resource tags. </param>
 32        /// <param name="provisioningState"> the current deployment or provisioning state, which only appears in the res
 33        /// <param name="orchestratorProfile"> Properties of the orchestrator. </param>
 34        /// <param name="customProfile"> Properties for custom clusters. </param>
 35        /// <param name="servicePrincipalProfile"> Properties for cluster service principals. </param>
 36        /// <param name="masterProfile"> Properties of master agents. </param>
 37        /// <param name="agentPoolProfiles"> Properties of the agent pool. </param>
 38        /// <param name="windowsProfile"> Properties of Windows VMs. </param>
 39        /// <param name="linuxProfile"> Properties of Linux VMs. </param>
 40        /// <param name="diagnosticsProfile"> Properties of the diagnostic agent. </param>
 041        internal ContainerService(string id, string name, string type, string location, IDictionary<string, string> tags
 42        {
 043            ProvisioningState = provisioningState;
 044            OrchestratorProfile = orchestratorProfile;
 045            CustomProfile = customProfile;
 046            ServicePrincipalProfile = servicePrincipalProfile;
 047            MasterProfile = masterProfile;
 048            AgentPoolProfiles = agentPoolProfiles;
 049            WindowsProfile = windowsProfile;
 050            LinuxProfile = linuxProfile;
 051            DiagnosticsProfile = diagnosticsProfile;
 052        }
 53
 54        /// <summary> the current deployment or provisioning state, which only appears in the response. </summary>
 055        public string ProvisioningState { get; }
 56        /// <summary> Properties of the orchestrator. </summary>
 057        public ContainerServiceOrchestratorProfile OrchestratorProfile { get; set; }
 58        /// <summary> Properties for custom clusters. </summary>
 059        public ContainerServiceCustomProfile CustomProfile { get; set; }
 60        /// <summary> Properties for cluster service principals. </summary>
 061        public ContainerServicePrincipalProfile ServicePrincipalProfile { get; set; }
 62        /// <summary> Properties of master agents. </summary>
 063        public ContainerServiceMasterProfile MasterProfile { get; set; }
 64        /// <summary> Properties of the agent pool. </summary>
 065        public IList<ContainerServiceAgentPoolProfile> AgentPoolProfiles { get; set; }
 66        /// <summary> Properties of Windows VMs. </summary>
 067        public ContainerServiceWindowsProfile WindowsProfile { get; set; }
 68        /// <summary> Properties of Linux VMs. </summary>
 069        public ContainerServiceLinuxProfile LinuxProfile { get; set; }
 70        /// <summary> Properties of the diagnostic agent. </summary>
 071        public ContainerServiceDiagnosticsProfile DiagnosticsProfile { get; set; }
 72    }
 73}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ContainerService.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Compute.Models
 13{
 14    public partial class ContainerService : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Id != null)
 20            {
 021                writer.WritePropertyName("id");
 022                writer.WriteStringValue(Id);
 23            }
 024            if (Name != null)
 25            {
 026                writer.WritePropertyName("name");
 027                writer.WriteStringValue(Name);
 28            }
 029            if (Type != null)
 30            {
 031                writer.WritePropertyName("type");
 032                writer.WriteStringValue(Type);
 33            }
 034            writer.WritePropertyName("location");
 035            writer.WriteStringValue(Location);
 036            if (Tags != null)
 37            {
 038                writer.WritePropertyName("tags");
 039                writer.WriteStartObject();
 040                foreach (var item in Tags)
 41                {
 042                    writer.WritePropertyName(item.Key);
 043                    writer.WriteStringValue(item.Value);
 44                }
 045                writer.WriteEndObject();
 46            }
 047            writer.WritePropertyName("properties");
 048            writer.WriteStartObject();
 049            if (ProvisioningState != null)
 50            {
 051                writer.WritePropertyName("provisioningState");
 052                writer.WriteStringValue(ProvisioningState);
 53            }
 054            if (OrchestratorProfile != null)
 55            {
 056                writer.WritePropertyName("orchestratorProfile");
 057                writer.WriteObjectValue(OrchestratorProfile);
 58            }
 059            if (CustomProfile != null)
 60            {
 061                writer.WritePropertyName("customProfile");
 062                writer.WriteObjectValue(CustomProfile);
 63            }
 064            if (ServicePrincipalProfile != null)
 65            {
 066                writer.WritePropertyName("servicePrincipalProfile");
 067                writer.WriteObjectValue(ServicePrincipalProfile);
 68            }
 069            if (MasterProfile != null)
 70            {
 071                writer.WritePropertyName("masterProfile");
 072                writer.WriteObjectValue(MasterProfile);
 73            }
 074            if (AgentPoolProfiles != null)
 75            {
 076                writer.WritePropertyName("agentPoolProfiles");
 077                writer.WriteStartArray();
 078                foreach (var item in AgentPoolProfiles)
 79                {
 080                    writer.WriteObjectValue(item);
 81                }
 082                writer.WriteEndArray();
 83            }
 084            if (WindowsProfile != null)
 85            {
 086                writer.WritePropertyName("windowsProfile");
 087                writer.WriteObjectValue(WindowsProfile);
 88            }
 089            if (LinuxProfile != null)
 90            {
 091                writer.WritePropertyName("linuxProfile");
 092                writer.WriteObjectValue(LinuxProfile);
 93            }
 094            if (DiagnosticsProfile != null)
 95            {
 096                writer.WritePropertyName("diagnosticsProfile");
 097                writer.WriteObjectValue(DiagnosticsProfile);
 98            }
 099            writer.WriteEndObject();
 0100            writer.WriteEndObject();
 0101        }
 102
 103        internal static ContainerService DeserializeContainerService(JsonElement element)
 104        {
 0105            string id = default;
 0106            string name = default;
 0107            string type = default;
 0108            string location = default;
 0109            IDictionary<string, string> tags = default;
 0110            string provisioningState = default;
 0111            ContainerServiceOrchestratorProfile orchestratorProfile = default;
 0112            ContainerServiceCustomProfile customProfile = default;
 0113            ContainerServicePrincipalProfile servicePrincipalProfile = default;
 0114            ContainerServiceMasterProfile masterProfile = default;
 0115            IList<ContainerServiceAgentPoolProfile> agentPoolProfiles = default;
 0116            ContainerServiceWindowsProfile windowsProfile = default;
 0117            ContainerServiceLinuxProfile linuxProfile = default;
 0118            ContainerServiceDiagnosticsProfile diagnosticsProfile = default;
 0119            foreach (var property in element.EnumerateObject())
 120            {
 0121                if (property.NameEquals("id"))
 122                {
 0123                    if (property.Value.ValueKind == JsonValueKind.Null)
 124                    {
 125                        continue;
 126                    }
 0127                    id = property.Value.GetString();
 0128                    continue;
 129                }
 0130                if (property.NameEquals("name"))
 131                {
 0132                    if (property.Value.ValueKind == JsonValueKind.Null)
 133                    {
 134                        continue;
 135                    }
 0136                    name = property.Value.GetString();
 0137                    continue;
 138                }
 0139                if (property.NameEquals("type"))
 140                {
 0141                    if (property.Value.ValueKind == JsonValueKind.Null)
 142                    {
 143                        continue;
 144                    }
 0145                    type = property.Value.GetString();
 0146                    continue;
 147                }
 0148                if (property.NameEquals("location"))
 149                {
 0150                    location = property.Value.GetString();
 0151                    continue;
 152                }
 0153                if (property.NameEquals("tags"))
 154                {
 0155                    if (property.Value.ValueKind == JsonValueKind.Null)
 156                    {
 157                        continue;
 158                    }
 0159                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0160                    foreach (var property0 in property.Value.EnumerateObject())
 161                    {
 0162                        if (property0.Value.ValueKind == JsonValueKind.Null)
 163                        {
 0164                            dictionary.Add(property0.Name, null);
 165                        }
 166                        else
 167                        {
 0168                            dictionary.Add(property0.Name, property0.Value.GetString());
 169                        }
 170                    }
 0171                    tags = dictionary;
 0172                    continue;
 173                }
 0174                if (property.NameEquals("properties"))
 175                {
 0176                    foreach (var property0 in property.Value.EnumerateObject())
 177                    {
 0178                        if (property0.NameEquals("provisioningState"))
 179                        {
 0180                            if (property0.Value.ValueKind == JsonValueKind.Null)
 181                            {
 182                                continue;
 183                            }
 0184                            provisioningState = property0.Value.GetString();
 0185                            continue;
 186                        }
 0187                        if (property0.NameEquals("orchestratorProfile"))
 188                        {
 0189                            if (property0.Value.ValueKind == JsonValueKind.Null)
 190                            {
 191                                continue;
 192                            }
 0193                            orchestratorProfile = ContainerServiceOrchestratorProfile.DeserializeContainerServiceOrchest
 0194                            continue;
 195                        }
 0196                        if (property0.NameEquals("customProfile"))
 197                        {
 0198                            if (property0.Value.ValueKind == JsonValueKind.Null)
 199                            {
 200                                continue;
 201                            }
 0202                            customProfile = ContainerServiceCustomProfile.DeserializeContainerServiceCustomProfile(prope
 0203                            continue;
 204                        }
 0205                        if (property0.NameEquals("servicePrincipalProfile"))
 206                        {
 0207                            if (property0.Value.ValueKind == JsonValueKind.Null)
 208                            {
 209                                continue;
 210                            }
 0211                            servicePrincipalProfile = ContainerServicePrincipalProfile.DeserializeContainerServicePrinci
 0212                            continue;
 213                        }
 0214                        if (property0.NameEquals("masterProfile"))
 215                        {
 0216                            if (property0.Value.ValueKind == JsonValueKind.Null)
 217                            {
 218                                continue;
 219                            }
 0220                            masterProfile = ContainerServiceMasterProfile.DeserializeContainerServiceMasterProfile(prope
 0221                            continue;
 222                        }
 0223                        if (property0.NameEquals("agentPoolProfiles"))
 224                        {
 0225                            if (property0.Value.ValueKind == JsonValueKind.Null)
 226                            {
 227                                continue;
 228                            }
 0229                            List<ContainerServiceAgentPoolProfile> array = new List<ContainerServiceAgentPoolProfile>();
 0230                            foreach (var item in property0.Value.EnumerateArray())
 231                            {
 0232                                if (item.ValueKind == JsonValueKind.Null)
 233                                {
 0234                                    array.Add(null);
 235                                }
 236                                else
 237                                {
 0238                                    array.Add(ContainerServiceAgentPoolProfile.DeserializeContainerServiceAgentPoolProfi
 239                                }
 240                            }
 0241                            agentPoolProfiles = array;
 0242                            continue;
 243                        }
 0244                        if (property0.NameEquals("windowsProfile"))
 245                        {
 0246                            if (property0.Value.ValueKind == JsonValueKind.Null)
 247                            {
 248                                continue;
 249                            }
 0250                            windowsProfile = ContainerServiceWindowsProfile.DeserializeContainerServiceWindowsProfile(pr
 0251                            continue;
 252                        }
 0253                        if (property0.NameEquals("linuxProfile"))
 254                        {
 0255                            if (property0.Value.ValueKind == JsonValueKind.Null)
 256                            {
 257                                continue;
 258                            }
 0259                            linuxProfile = ContainerServiceLinuxProfile.DeserializeContainerServiceLinuxProfile(property
 0260                            continue;
 261                        }
 0262                        if (property0.NameEquals("diagnosticsProfile"))
 263                        {
 0264                            if (property0.Value.ValueKind == JsonValueKind.Null)
 265                            {
 266                                continue;
 267                            }
 0268                            diagnosticsProfile = ContainerServiceDiagnosticsProfile.DeserializeContainerServiceDiagnosti
 269                            continue;
 270                        }
 271                    }
 272                    continue;
 273                }
 274            }
 0275            return new ContainerService(id, name, type, location, tags, provisioningState, orchestratorProfile, customPr
 276        }
 277    }
 278}