< Summary

Class:Azure.ResourceManager.Resources.Models.PlanPatchable
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\PlanPatchable.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\PlanPatchable.Serialization.cs
Covered lines:0
Uncovered lines:58
Coverable lines:58
Total lines:148
Line coverage:0% (0 of 58)
Covered branches:0
Total branches:32
Branch coverage:0% (0 of 32)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Name()-0%100%
get_Publisher()-0%100%
get_Product()-0%100%
get_PromotionCode()-0%100%
get_Version()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializePlanPatchable(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\PlanPatchable.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
 8namespace Azure.ResourceManager.Resources.Models
 9{
 10    /// <summary> Plan for the managed application. </summary>
 11    public partial class PlanPatchable
 12    {
 13        /// <summary> Initializes a new instance of PlanPatchable. </summary>
 014        public PlanPatchable()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of PlanPatchable. </summary>
 19        /// <param name="name"> The plan name. </param>
 20        /// <param name="publisher"> The publisher ID. </param>
 21        /// <param name="product"> The product code. </param>
 22        /// <param name="promotionCode"> The promotion code. </param>
 23        /// <param name="version"> The plan&apos;s version. </param>
 024        internal PlanPatchable(string name, string publisher, string product, string promotionCode, string version)
 25        {
 026            Name = name;
 027            Publisher = publisher;
 028            Product = product;
 029            PromotionCode = promotionCode;
 030            Version = version;
 031        }
 32
 33        /// <summary> The plan name. </summary>
 034        public string Name { get; set; }
 35        /// <summary> The publisher ID. </summary>
 036        public string Publisher { get; set; }
 37        /// <summary> The product code. </summary>
 038        public string Product { get; set; }
 39        /// <summary> The promotion code. </summary>
 040        public string PromotionCode { get; set; }
 41        /// <summary> The plan&apos;s version. </summary>
 042        public string Version { get; set; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\PlanPatchable.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.Resources.Models
 12{
 13    public partial class PlanPatchable : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Name != null)
 19            {
 020                writer.WritePropertyName("name");
 021                writer.WriteStringValue(Name);
 22            }
 023            if (Publisher != null)
 24            {
 025                writer.WritePropertyName("publisher");
 026                writer.WriteStringValue(Publisher);
 27            }
 028            if (Product != null)
 29            {
 030                writer.WritePropertyName("product");
 031                writer.WriteStringValue(Product);
 32            }
 033            if (PromotionCode != null)
 34            {
 035                writer.WritePropertyName("promotionCode");
 036                writer.WriteStringValue(PromotionCode);
 37            }
 038            if (Version != null)
 39            {
 040                writer.WritePropertyName("version");
 041                writer.WriteStringValue(Version);
 42            }
 043            writer.WriteEndObject();
 044        }
 45
 46        internal static PlanPatchable DeserializePlanPatchable(JsonElement element)
 47        {
 048            string name = default;
 049            string publisher = default;
 050            string product = default;
 051            string promotionCode = default;
 052            string version = default;
 053            foreach (var property in element.EnumerateObject())
 54            {
 055                if (property.NameEquals("name"))
 56                {
 057                    if (property.Value.ValueKind == JsonValueKind.Null)
 58                    {
 59                        continue;
 60                    }
 061                    name = property.Value.GetString();
 062                    continue;
 63                }
 064                if (property.NameEquals("publisher"))
 65                {
 066                    if (property.Value.ValueKind == JsonValueKind.Null)
 67                    {
 68                        continue;
 69                    }
 070                    publisher = property.Value.GetString();
 071                    continue;
 72                }
 073                if (property.NameEquals("product"))
 74                {
 075                    if (property.Value.ValueKind == JsonValueKind.Null)
 76                    {
 77                        continue;
 78                    }
 079                    product = property.Value.GetString();
 080                    continue;
 81                }
 082                if (property.NameEquals("promotionCode"))
 83                {
 084                    if (property.Value.ValueKind == JsonValueKind.Null)
 85                    {
 86                        continue;
 87                    }
 088                    promotionCode = property.Value.GetString();
 089                    continue;
 90                }
 091                if (property.NameEquals("version"))
 92                {
 093                    if (property.Value.ValueKind == JsonValueKind.Null)
 94                    {
 95                        continue;
 96                    }
 097                    version = property.Value.GetString();
 98                    continue;
 99                }
 100            }
 0101            return new PlanPatchable(name, publisher, product, promotionCode, version);
 102        }
 103    }
 104}