< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_ProvisioningState()-0%100%
get_Type()-0%100%
get_DeploymentName()-0%100%
DeserializeOnErrorDeploymentExtended(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\OnErrorDeploymentExtended.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> Deployment on error behavior with additional details. </summary>
 11    public partial class OnErrorDeploymentExtended
 12    {
 13        /// <summary> Initializes a new instance of OnErrorDeploymentExtended. </summary>
 014        internal OnErrorDeploymentExtended()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of OnErrorDeploymentExtended. </summary>
 19        /// <param name="provisioningState"> The state of the provisioning for the on error deployment. </param>
 20        /// <param name="type"> The deployment on error behavior type. Possible values are LastSuccessful and SpecificDe
 21        /// <param name="deploymentName"> The deployment to be used on error case. </param>
 022        internal OnErrorDeploymentExtended(string provisioningState, OnErrorDeploymentType? type, string deploymentName)
 23        {
 024            ProvisioningState = provisioningState;
 025            Type = type;
 026            DeploymentName = deploymentName;
 027        }
 28
 29        /// <summary> The state of the provisioning for the on error deployment. </summary>
 030        public string ProvisioningState { get; }
 31        /// <summary> The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. 
 032        public OnErrorDeploymentType? Type { get; }
 33        /// <summary> The deployment to be used on error case. </summary>
 034        public string DeploymentName { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\OnErrorDeploymentExtended.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 OnErrorDeploymentExtended
 14    {
 15        internal static OnErrorDeploymentExtended DeserializeOnErrorDeploymentExtended(JsonElement element)
 16        {
 017            string provisioningState = default;
 018            OnErrorDeploymentType? type = default;
 019            string deploymentName = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("provisioningState"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    provisioningState = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("type"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    type = property.Value.GetString().ToOnErrorDeploymentType();
 038                    continue;
 39                }
 040                if (property.NameEquals("deploymentName"))
 41                {
 042                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 046                    deploymentName = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 050            return new OnErrorDeploymentExtended(provisioningState, type, deploymentName);
 51        }
 52    }
 53}