< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Plan()-0%100%
get_Kind()-0%100%
get_ManagedResourceGroupId()-0%100%
get_ApplicationDefinitionId()-0%100%
get_Parameters()-0%100%
get_Outputs()-0%100%
get_ProvisioningState()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeApplicationPatchable(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ApplicationPatchable.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.Resources.Models
 11{
 12    /// <summary> Information about managed application. </summary>
 13    public partial class ApplicationPatchable : GenericResourceAutoGenerated
 14    {
 15        /// <summary> Initializes a new instance of ApplicationPatchable. </summary>
 016        public ApplicationPatchable()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ApplicationPatchable. </summary>
 21        /// <param name="id"> Resource ID. </param>
 22        /// <param name="name"> Resource name. </param>
 23        /// <param name="type"> Resource type. </param>
 24        /// <param name="location"> Resource location. </param>
 25        /// <param name="tags"> Resource tags. </param>
 26        /// <param name="managedBy"> ID of the resource that manages this resource. </param>
 27        /// <param name="sku"> The SKU of the resource. </param>
 28        /// <param name="identity"> The identity of the resource. </param>
 29        /// <param name="plan"> The plan information. </param>
 30        /// <param name="kind"> The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. 
 31        /// <param name="managedResourceGroupId"> The managed resource group Id. </param>
 32        /// <param name="applicationDefinitionId"> The fully qualified path of managed application definition Id. </para
 33        /// <param name="parameters"> Name and value pairs that define the managed application parameters. It can be a J
 34        /// <param name="outputs"> Name and value pairs that define the managed application outputs. </param>
 35        /// <param name="provisioningState"> The managed application provisioning state. </param>
 036        internal ApplicationPatchable(string id, string name, string type, string location, IDictionary<string, string> 
 37        {
 038            Plan = plan;
 039            Kind = kind;
 040            ManagedResourceGroupId = managedResourceGroupId;
 041            ApplicationDefinitionId = applicationDefinitionId;
 042            Parameters = parameters;
 043            Outputs = outputs;
 044            ProvisioningState = provisioningState;
 045        }
 46
 47        /// <summary> The plan information. </summary>
 048        public PlanPatchable Plan { get; set; }
 49        /// <summary> The kind of the managed application. Allowed values are MarketPlace and ServiceCatalog. </summary>
 050        public string Kind { get; set; }
 51        /// <summary> The managed resource group Id. </summary>
 052        public string ManagedResourceGroupId { get; set; }
 53        /// <summary> The fully qualified path of managed application definition Id. </summary>
 054        public string ApplicationDefinitionId { get; set; }
 55        /// <summary> Name and value pairs that define the managed application parameters. It can be a JObject or a well
 056        public object Parameters { get; set; }
 57        /// <summary> Name and value pairs that define the managed application outputs. </summary>
 058        public object Outputs { get; }
 59        /// <summary> The managed application provisioning state. </summary>
 060        public ProvisioningState? ProvisioningState { get; }
 61    }
 62}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ApplicationPatchable.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.Resources.Models
 13{
 14    public partial class ApplicationPatchable : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Plan != null)
 20            {
 021                writer.WritePropertyName("plan");
 022                writer.WriteObjectValue(Plan);
 23            }
 024            if (Kind != null)
 25            {
 026                writer.WritePropertyName("kind");
 027                writer.WriteStringValue(Kind);
 28            }
 029            if (ManagedBy != null)
 30            {
 031                writer.WritePropertyName("managedBy");
 032                writer.WriteStringValue(ManagedBy);
 33            }
 034            if (Sku != null)
 35            {
 036                writer.WritePropertyName("sku");
 037                writer.WriteObjectValue(Sku);
 38            }
 039            if (Identity != null)
 40            {
 041                writer.WritePropertyName("identity");
 042                writer.WriteObjectValue(Identity);
 43            }
 044            if (Id != null)
 45            {
 046                writer.WritePropertyName("id");
 047                writer.WriteStringValue(Id);
 48            }
 049            if (Name != null)
 50            {
 051                writer.WritePropertyName("name");
 052                writer.WriteStringValue(Name);
 53            }
 054            if (Type != null)
 55            {
 056                writer.WritePropertyName("type");
 057                writer.WriteStringValue(Type);
 58            }
 059            if (Location != null)
 60            {
 061                writer.WritePropertyName("location");
 062                writer.WriteStringValue(Location);
 63            }
 064            if (Tags != null)
 65            {
 066                writer.WritePropertyName("tags");
 067                writer.WriteStartObject();
 068                foreach (var item in Tags)
 69                {
 070                    writer.WritePropertyName(item.Key);
 071                    writer.WriteStringValue(item.Value);
 72                }
 073                writer.WriteEndObject();
 74            }
 075            writer.WritePropertyName("properties");
 076            writer.WriteStartObject();
 077            if (ManagedResourceGroupId != null)
 78            {
 079                writer.WritePropertyName("managedResourceGroupId");
 080                writer.WriteStringValue(ManagedResourceGroupId);
 81            }
 082            if (ApplicationDefinitionId != null)
 83            {
 084                writer.WritePropertyName("applicationDefinitionId");
 085                writer.WriteStringValue(ApplicationDefinitionId);
 86            }
 087            if (Parameters != null)
 88            {
 089                writer.WritePropertyName("parameters");
 090                writer.WriteObjectValue(Parameters);
 91            }
 092            if (Outputs != null)
 93            {
 094                writer.WritePropertyName("outputs");
 095                writer.WriteObjectValue(Outputs);
 96            }
 097            if (ProvisioningState != null)
 98            {
 099                writer.WritePropertyName("provisioningState");
 0100                writer.WriteStringValue(ProvisioningState.Value.ToString());
 101            }
 0102            writer.WriteEndObject();
 0103            writer.WriteEndObject();
 0104        }
 105
 106        internal static ApplicationPatchable DeserializeApplicationPatchable(JsonElement element)
 107        {
 0108            PlanPatchable plan = default;
 0109            string kind = default;
 0110            string managedBy = default;
 0111            SkuAutoGenerated sku = default;
 0112            IdentityAutoGenerated2 identity = default;
 0113            string id = default;
 0114            string name = default;
 0115            string type = default;
 0116            string location = default;
 0117            IDictionary<string, string> tags = default;
 0118            string managedResourceGroupId = default;
 0119            string applicationDefinitionId = default;
 0120            object parameters = default;
 0121            object outputs = default;
 0122            ProvisioningState? provisioningState = default;
 0123            foreach (var property in element.EnumerateObject())
 124            {
 0125                if (property.NameEquals("plan"))
 126                {
 0127                    if (property.Value.ValueKind == JsonValueKind.Null)
 128                    {
 129                        continue;
 130                    }
 0131                    plan = PlanPatchable.DeserializePlanPatchable(property.Value);
 0132                    continue;
 133                }
 0134                if (property.NameEquals("kind"))
 135                {
 0136                    if (property.Value.ValueKind == JsonValueKind.Null)
 137                    {
 138                        continue;
 139                    }
 0140                    kind = property.Value.GetString();
 0141                    continue;
 142                }
 0143                if (property.NameEquals("managedBy"))
 144                {
 0145                    if (property.Value.ValueKind == JsonValueKind.Null)
 146                    {
 147                        continue;
 148                    }
 0149                    managedBy = property.Value.GetString();
 0150                    continue;
 151                }
 0152                if (property.NameEquals("sku"))
 153                {
 0154                    if (property.Value.ValueKind == JsonValueKind.Null)
 155                    {
 156                        continue;
 157                    }
 0158                    sku = SkuAutoGenerated.DeserializeSkuAutoGenerated(property.Value);
 0159                    continue;
 160                }
 0161                if (property.NameEquals("identity"))
 162                {
 0163                    if (property.Value.ValueKind == JsonValueKind.Null)
 164                    {
 165                        continue;
 166                    }
 0167                    identity = IdentityAutoGenerated2.DeserializeIdentityAutoGenerated2(property.Value);
 0168                    continue;
 169                }
 0170                if (property.NameEquals("id"))
 171                {
 0172                    if (property.Value.ValueKind == JsonValueKind.Null)
 173                    {
 174                        continue;
 175                    }
 0176                    id = property.Value.GetString();
 0177                    continue;
 178                }
 0179                if (property.NameEquals("name"))
 180                {
 0181                    if (property.Value.ValueKind == JsonValueKind.Null)
 182                    {
 183                        continue;
 184                    }
 0185                    name = property.Value.GetString();
 0186                    continue;
 187                }
 0188                if (property.NameEquals("type"))
 189                {
 0190                    if (property.Value.ValueKind == JsonValueKind.Null)
 191                    {
 192                        continue;
 193                    }
 0194                    type = property.Value.GetString();
 0195                    continue;
 196                }
 0197                if (property.NameEquals("location"))
 198                {
 0199                    if (property.Value.ValueKind == JsonValueKind.Null)
 200                    {
 201                        continue;
 202                    }
 0203                    location = property.Value.GetString();
 0204                    continue;
 205                }
 0206                if (property.NameEquals("tags"))
 207                {
 0208                    if (property.Value.ValueKind == JsonValueKind.Null)
 209                    {
 210                        continue;
 211                    }
 0212                    Dictionary<string, string> dictionary = new Dictionary<string, string>();
 0213                    foreach (var property0 in property.Value.EnumerateObject())
 214                    {
 0215                        if (property0.Value.ValueKind == JsonValueKind.Null)
 216                        {
 0217                            dictionary.Add(property0.Name, null);
 218                        }
 219                        else
 220                        {
 0221                            dictionary.Add(property0.Name, property0.Value.GetString());
 222                        }
 223                    }
 0224                    tags = dictionary;
 0225                    continue;
 226                }
 0227                if (property.NameEquals("properties"))
 228                {
 0229                    foreach (var property0 in property.Value.EnumerateObject())
 230                    {
 0231                        if (property0.NameEquals("managedResourceGroupId"))
 232                        {
 0233                            if (property0.Value.ValueKind == JsonValueKind.Null)
 234                            {
 235                                continue;
 236                            }
 0237                            managedResourceGroupId = property0.Value.GetString();
 0238                            continue;
 239                        }
 0240                        if (property0.NameEquals("applicationDefinitionId"))
 241                        {
 0242                            if (property0.Value.ValueKind == JsonValueKind.Null)
 243                            {
 244                                continue;
 245                            }
 0246                            applicationDefinitionId = property0.Value.GetString();
 0247                            continue;
 248                        }
 0249                        if (property0.NameEquals("parameters"))
 250                        {
 0251                            if (property0.Value.ValueKind == JsonValueKind.Null)
 252                            {
 253                                continue;
 254                            }
 0255                            parameters = property0.Value.GetObject();
 0256                            continue;
 257                        }
 0258                        if (property0.NameEquals("outputs"))
 259                        {
 0260                            if (property0.Value.ValueKind == JsonValueKind.Null)
 261                            {
 262                                continue;
 263                            }
 0264                            outputs = property0.Value.GetObject();
 0265                            continue;
 266                        }
 0267                        if (property0.NameEquals("provisioningState"))
 268                        {
 0269                            if (property0.Value.ValueKind == JsonValueKind.Null)
 270                            {
 271                                continue;
 272                            }
 0273                            provisioningState = new ProvisioningState(property0.Value.GetString());
 274                            continue;
 275                        }
 276                    }
 277                    continue;
 278                }
 279            }
 0280            return new ApplicationPatchable(id, name, type, location, tags, managedBy, sku, identity, plan, kind, manage
 281        }
 282    }
 283}