< Summary

Class:Azure.ResourceManager.Network.Models.RecordSet
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RecordSet.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RecordSet.Serialization.cs
Covered lines:0
Uncovered lines:76
Coverable lines:76
Total lines:187
Line coverage:0% (0 of 76)
Covered branches:0
Total branches:44
Branch coverage:0% (0 of 44)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_RecordType()-0%100%
get_RecordSetName()-0%100%
get_Fqdn()-0%100%
get_ProvisioningState()-0%100%
get_Ttl()-0%100%
get_IpAddresses()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeRecordSet(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RecordSet.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;
 9
 10namespace Azure.ResourceManager.Network.Models
 11{
 12    /// <summary> A collective group of information about the record set information. </summary>
 13    public partial class RecordSet
 14    {
 15        /// <summary> Initializes a new instance of RecordSet. </summary>
 016        public RecordSet()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of RecordSet. </summary>
 21        /// <param name="recordType"> Resource record type. </param>
 22        /// <param name="recordSetName"> Recordset name. </param>
 23        /// <param name="fqdn"> Fqdn that resolves to private endpoint ip address. </param>
 24        /// <param name="provisioningState"> The provisioning state of the recordset. </param>
 25        /// <param name="ttl"> Recordset time to live. </param>
 26        /// <param name="ipAddresses"> The private ip address of the private endpoint. </param>
 027        internal RecordSet(string recordType, string recordSetName, string fqdn, ProvisioningState? provisioningState, i
 28        {
 029            RecordType = recordType;
 030            RecordSetName = recordSetName;
 031            Fqdn = fqdn;
 032            ProvisioningState = provisioningState;
 033            Ttl = ttl;
 034            IpAddresses = ipAddresses;
 035        }
 36
 37        /// <summary> Resource record type. </summary>
 038        public string RecordType { get; set; }
 39        /// <summary> Recordset name. </summary>
 040        public string RecordSetName { get; set; }
 41        /// <summary> Fqdn that resolves to private endpoint ip address. </summary>
 042        public string Fqdn { get; set; }
 43        /// <summary> The provisioning state of the recordset. </summary>
 044        public ProvisioningState? ProvisioningState { get; }
 45        /// <summary> Recordset time to live. </summary>
 046        public int? Ttl { get; set; }
 47        /// <summary> The private ip address of the private endpoint. </summary>
 048        public IList<string> IpAddresses { get; set; }
 49    }
 50}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\RecordSet.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.Network.Models
 13{
 14    public partial class RecordSet : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (RecordType != null)
 20            {
 021                writer.WritePropertyName("recordType");
 022                writer.WriteStringValue(RecordType);
 23            }
 024            if (RecordSetName != null)
 25            {
 026                writer.WritePropertyName("recordSetName");
 027                writer.WriteStringValue(RecordSetName);
 28            }
 029            if (Fqdn != null)
 30            {
 031                writer.WritePropertyName("fqdn");
 032                writer.WriteStringValue(Fqdn);
 33            }
 034            if (ProvisioningState != null)
 35            {
 036                writer.WritePropertyName("provisioningState");
 037                writer.WriteStringValue(ProvisioningState.Value.ToString());
 38            }
 039            if (Ttl != null)
 40            {
 041                writer.WritePropertyName("ttl");
 042                writer.WriteNumberValue(Ttl.Value);
 43            }
 044            if (IpAddresses != null)
 45            {
 046                writer.WritePropertyName("ipAddresses");
 047                writer.WriteStartArray();
 048                foreach (var item in IpAddresses)
 49                {
 050                    writer.WriteStringValue(item);
 51                }
 052                writer.WriteEndArray();
 53            }
 054            writer.WriteEndObject();
 055        }
 56
 57        internal static RecordSet DeserializeRecordSet(JsonElement element)
 58        {
 059            string recordType = default;
 060            string recordSetName = default;
 061            string fqdn = default;
 062            ProvisioningState? provisioningState = default;
 063            int? ttl = default;
 064            IList<string> ipAddresses = default;
 065            foreach (var property in element.EnumerateObject())
 66            {
 067                if (property.NameEquals("recordType"))
 68                {
 069                    if (property.Value.ValueKind == JsonValueKind.Null)
 70                    {
 71                        continue;
 72                    }
 073                    recordType = property.Value.GetString();
 074                    continue;
 75                }
 076                if (property.NameEquals("recordSetName"))
 77                {
 078                    if (property.Value.ValueKind == JsonValueKind.Null)
 79                    {
 80                        continue;
 81                    }
 082                    recordSetName = property.Value.GetString();
 083                    continue;
 84                }
 085                if (property.NameEquals("fqdn"))
 86                {
 087                    if (property.Value.ValueKind == JsonValueKind.Null)
 88                    {
 89                        continue;
 90                    }
 091                    fqdn = property.Value.GetString();
 092                    continue;
 93                }
 094                if (property.NameEquals("provisioningState"))
 95                {
 096                    if (property.Value.ValueKind == JsonValueKind.Null)
 97                    {
 98                        continue;
 99                    }
 0100                    provisioningState = new ProvisioningState(property.Value.GetString());
 0101                    continue;
 102                }
 0103                if (property.NameEquals("ttl"))
 104                {
 0105                    if (property.Value.ValueKind == JsonValueKind.Null)
 106                    {
 107                        continue;
 108                    }
 0109                    ttl = property.Value.GetInt32();
 0110                    continue;
 111                }
 0112                if (property.NameEquals("ipAddresses"))
 113                {
 0114                    if (property.Value.ValueKind == JsonValueKind.Null)
 115                    {
 116                        continue;
 117                    }
 0118                    List<string> array = new List<string>();
 0119                    foreach (var item in property.Value.EnumerateArray())
 120                    {
 0121                        if (item.ValueKind == JsonValueKind.Null)
 122                        {
 0123                            array.Add(null);
 124                        }
 125                        else
 126                        {
 0127                            array.Add(item.GetString());
 128                        }
 129                    }
 0130                    ipAddresses = array;
 131                    continue;
 132                }
 133            }
 0134            return new RecordSet(recordType, recordSetName, fqdn, provisioningState, ttl, ipAddresses);
 135        }
 136    }
 137}