< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentPropertiesExtended
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentPropertiesExtended.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentPropertiesExtended.Serialization.cs
Covered lines:121
Uncovered lines:23
Coverable lines:144
Total lines:338
Line coverage:84% (121 of 144)
Covered branches:76
Total branches:86
Branch coverage:88.3% (76 of 86)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ProvisioningState()-100%100%
get_CorrelationId()-100%100%
get_Timestamp()-100%100%
get_Duration()-0%100%
get_Outputs()-100%100%
get_Providers()-100%100%
get_Dependencies()-0%100%
get_TemplateLink()-100%100%
get_Parameters()-100%100%
get_ParametersLink()-0%100%
get_Mode()-100%100%
get_DebugSetting()-0%100%
get_OnErrorDeployment()-0%100%
get_TemplateHash()-0%100%
get_OutputResources()-0%100%
get_ValidatedResources()-0%100%
get_Error()-0%100%
DeserializeDeploymentPropertiesExtended(...)-88.68%88.37%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentPropertiesExtended.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.Resources.Models
 12{
 13    /// <summary> Deployment properties with additional details. </summary>
 14    public partial class DeploymentPropertiesExtended
 15    {
 16        /// <summary> Initializes a new instance of DeploymentPropertiesExtended. </summary>
 017        internal DeploymentPropertiesExtended()
 18        {
 019        }
 20
 21        /// <summary> Initializes a new instance of DeploymentPropertiesExtended. </summary>
 22        /// <param name="provisioningState"> The state of the provisioning. </param>
 23        /// <param name="correlationId"> The correlation ID of the deployment. </param>
 24        /// <param name="timestamp"> The timestamp of the template deployment. </param>
 25        /// <param name="duration"> The duration of the template deployment. </param>
 26        /// <param name="outputs"> Key/value pairs that represent deployment output. </param>
 27        /// <param name="providers"> The list of resource providers needed for the deployment. </param>
 28        /// <param name="dependencies"> The list of deployment dependencies. </param>
 29        /// <param name="templateLink"> The URI referencing the template. </param>
 30        /// <param name="parameters"> Deployment parameters. </param>
 31        /// <param name="parametersLink"> The URI referencing the parameters. </param>
 32        /// <param name="mode"> The deployment mode. Possible values are Incremental and Complete. </param>
 33        /// <param name="debugSetting"> The debug setting of the deployment. </param>
 34        /// <param name="onErrorDeployment"> The deployment on error behavior. </param>
 35        /// <param name="templateHash"> The hash produced for the template. </param>
 36        /// <param name="outputResources"> Array of provisioned resources. </param>
 37        /// <param name="validatedResources"> Array of validated resources. </param>
 38        /// <param name="error"> The deployment error. </param>
 12839        internal DeploymentPropertiesExtended(string provisioningState, string correlationId, DateTimeOffset? timestamp,
 40        {
 12841            ProvisioningState = provisioningState;
 12842            CorrelationId = correlationId;
 12843            Timestamp = timestamp;
 12844            Duration = duration;
 12845            Outputs = outputs;
 12846            Providers = providers;
 12847            Dependencies = dependencies;
 12848            TemplateLink = templateLink;
 12849            Parameters = parameters;
 12850            ParametersLink = parametersLink;
 12851            Mode = mode;
 12852            DebugSetting = debugSetting;
 12853            OnErrorDeployment = onErrorDeployment;
 12854            TemplateHash = templateHash;
 12855            OutputResources = outputResources;
 12856            ValidatedResources = validatedResources;
 12857            Error = error;
 12858        }
 59
 60        /// <summary> The state of the provisioning. </summary>
 5661        public string ProvisioningState { get; }
 62        /// <summary> The correlation ID of the deployment. </summary>
 1263        public string CorrelationId { get; }
 64        /// <summary> The timestamp of the template deployment. </summary>
 1665        public DateTimeOffset? Timestamp { get; }
 66        /// <summary> The duration of the template deployment. </summary>
 067        public string Duration { get; }
 68        /// <summary> Key/value pairs that represent deployment output. </summary>
 1669        public object Outputs { get; }
 70        /// <summary> The list of resource providers needed for the deployment. </summary>
 3271        public IReadOnlyList<Provider> Providers { get; }
 72        /// <summary> The list of deployment dependencies. </summary>
 073        public IReadOnlyList<Dependency> Dependencies { get; }
 74        /// <summary> The URI referencing the template. </summary>
 4075        public TemplateLink TemplateLink { get; }
 76        /// <summary> Deployment parameters. </summary>
 2477        public object Parameters { get; }
 78        /// <summary> The URI referencing the parameters. </summary>
 079        public ParametersLink ParametersLink { get; }
 80        /// <summary> The deployment mode. Possible values are Incremental and Complete. </summary>
 2481        public DeploymentMode? Mode { get; }
 82        /// <summary> The debug setting of the deployment. </summary>
 083        public DebugSetting DebugSetting { get; }
 84        /// <summary> The deployment on error behavior. </summary>
 085        public OnErrorDeploymentExtended OnErrorDeployment { get; }
 86        /// <summary> The hash produced for the template. </summary>
 087        public string TemplateHash { get; }
 88        /// <summary> Array of provisioned resources. </summary>
 089        public IReadOnlyList<ResourceReference> OutputResources { get; }
 90        /// <summary> Array of validated resources. </summary>
 091        public IReadOnlyList<ResourceReference> ValidatedResources { get; }
 92        /// <summary> The deployment error. </summary>
 093        public ErrorResponse Error { get; }
 94    }
 95}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentPropertiesExtended.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;
 9using System.Collections.Generic;
 10using System.Text.Json;
 11using Azure.Core;
 12
 13namespace Azure.ResourceManager.Resources.Models
 14{
 15    public partial class DeploymentPropertiesExtended
 16    {
 17        internal static DeploymentPropertiesExtended DeserializeDeploymentPropertiesExtended(JsonElement element)
 18        {
 12819            string provisioningState = default;
 12820            string correlationId = default;
 12821            DateTimeOffset? timestamp = default;
 12822            string duration = default;
 12823            object outputs = default;
 12824            IReadOnlyList<Provider> providers = default;
 12825            IReadOnlyList<Dependency> dependencies = default;
 12826            TemplateLink templateLink = default;
 12827            object parameters = default;
 12828            ParametersLink parametersLink = default;
 12829            DeploymentMode? mode = default;
 12830            DebugSetting debugSetting = default;
 12831            OnErrorDeploymentExtended onErrorDeployment = default;
 12832            string templateHash = default;
 12833            IReadOnlyList<ResourceReference> outputResources = default;
 12834            IReadOnlyList<ResourceReference> validatedResources = default;
 12835            ErrorResponse error = default;
 270436            foreach (var property in element.EnumerateObject())
 37            {
 122438                if (property.NameEquals("provisioningState"))
 39                {
 12840                    if (property.Value.ValueKind == JsonValueKind.Null)
 41                    {
 42                        continue;
 43                    }
 12844                    provisioningState = property.Value.GetString();
 12845                    continue;
 46                }
 109647                if (property.NameEquals("correlationId"))
 48                {
 10849                    if (property.Value.ValueKind == JsonValueKind.Null)
 50                    {
 51                        continue;
 52                    }
 10853                    correlationId = property.Value.GetString();
 10854                    continue;
 55                }
 98856                if (property.NameEquals("timestamp"))
 57                {
 12858                    if (property.Value.ValueKind == JsonValueKind.Null)
 59                    {
 60                        continue;
 61                    }
 12862                    timestamp = property.Value.GetDateTimeOffset("O");
 12863                    continue;
 64                }
 86065                if (property.NameEquals("duration"))
 66                {
 10467                    if (property.Value.ValueKind == JsonValueKind.Null)
 68                    {
 69                        continue;
 70                    }
 10471                    duration = property.Value.GetString();
 10472                    continue;
 73                }
 75674                if (property.NameEquals("outputs"))
 75                {
 4876                    if (property.Value.ValueKind == JsonValueKind.Null)
 77                    {
 78                        continue;
 79                    }
 4880                    outputs = property.Value.GetObject();
 4881                    continue;
 82                }
 70883                if (property.NameEquals("providers"))
 84                {
 9685                    if (property.Value.ValueKind == JsonValueKind.Null)
 86                    {
 87                        continue;
 88                    }
 9689                    List<Provider> array = new List<Provider>();
 48890                    foreach (var item in property.Value.EnumerateArray())
 91                    {
 14892                        if (item.ValueKind == JsonValueKind.Null)
 93                        {
 094                            array.Add(null);
 95                        }
 96                        else
 97                        {
 14898                            array.Add(Provider.DeserializeProvider(item));
 99                        }
 100                    }
 96101                    providers = array;
 96102                    continue;
 103                }
 612104                if (property.NameEquals("dependencies"))
 105                {
 96106                    if (property.Value.ValueKind == JsonValueKind.Null)
 107                    {
 108                        continue;
 109                    }
 96110                    List<Dependency> array = new List<Dependency>();
 360111                    foreach (var item in property.Value.EnumerateArray())
 112                    {
 84113                        if (item.ValueKind == JsonValueKind.Null)
 114                        {
 0115                            array.Add(null);
 116                        }
 117                        else
 118                        {
 84119                            array.Add(Dependency.DeserializeDependency(item));
 120                        }
 121                    }
 96122                    dependencies = array;
 96123                    continue;
 124                }
 516125                if (property.NameEquals("templateLink"))
 126                {
 40127                    if (property.Value.ValueKind == JsonValueKind.Null)
 128                    {
 129                        continue;
 130                    }
 40131                    templateLink = TemplateLink.DeserializeTemplateLink(property.Value);
 40132                    continue;
 133                }
 476134                if (property.NameEquals("parameters"))
 135                {
 128136                    if (property.Value.ValueKind == JsonValueKind.Null)
 137                    {
 138                        continue;
 139                    }
 128140                    parameters = property.Value.GetObject();
 128141                    continue;
 142                }
 348143                if (property.NameEquals("parametersLink"))
 144                {
 24145                    if (property.Value.ValueKind == JsonValueKind.Null)
 146                    {
 147                        continue;
 148                    }
 24149                    parametersLink = ParametersLink.DeserializeParametersLink(property.Value);
 24150                    continue;
 151                }
 324152                if (property.NameEquals("mode"))
 153                {
 128154                    if (property.Value.ValueKind == JsonValueKind.Null)
 155                    {
 156                        continue;
 157                    }
 128158                    mode = property.Value.GetString().ToDeploymentMode();
 128159                    continue;
 160                }
 196161                if (property.NameEquals("debugSetting"))
 162                {
 0163                    if (property.Value.ValueKind == JsonValueKind.Null)
 164                    {
 165                        continue;
 166                    }
 0167                    debugSetting = DebugSetting.DeserializeDebugSetting(property.Value);
 0168                    continue;
 169                }
 196170                if (property.NameEquals("onErrorDeployment"))
 171                {
 0172                    if (property.Value.ValueKind == JsonValueKind.Null)
 173                    {
 174                        continue;
 175                    }
 0176                    onErrorDeployment = OnErrorDeploymentExtended.DeserializeOnErrorDeploymentExtended(property.Value);
 0177                    continue;
 178                }
 196179                if (property.NameEquals("templateHash"))
 180                {
 96181                    if (property.Value.ValueKind == JsonValueKind.Null)
 182                    {
 183                        continue;
 184                    }
 96185                    templateHash = property.Value.GetString();
 96186                    continue;
 187                }
 100188                if (property.NameEquals("outputResources"))
 189                {
 72190                    if (property.Value.ValueKind == JsonValueKind.Null)
 191                    {
 192                        continue;
 193                    }
 72194                    List<ResourceReference> array = new List<ResourceReference>();
 512195                    foreach (var item in property.Value.EnumerateArray())
 196                    {
 184197                        if (item.ValueKind == JsonValueKind.Null)
 198                        {
 0199                            array.Add(null);
 200                        }
 201                        else
 202                        {
 184203                            array.Add(ResourceReference.DeserializeResourceReference(item));
 204                        }
 205                    }
 72206                    outputResources = array;
 72207                    continue;
 208                }
 28209                if (property.NameEquals("validatedResources"))
 210                {
 24211                    if (property.Value.ValueKind == JsonValueKind.Null)
 212                    {
 213                        continue;
 214                    }
 24215                    List<ResourceReference> array = new List<ResourceReference>();
 240216                    foreach (var item in property.Value.EnumerateArray())
 217                    {
 96218                        if (item.ValueKind == JsonValueKind.Null)
 219                        {
 0220                            array.Add(null);
 221                        }
 222                        else
 223                        {
 96224                            array.Add(ResourceReference.DeserializeResourceReference(item));
 225                        }
 226                    }
 24227                    validatedResources = array;
 24228                    continue;
 229                }
 4230                if (property.NameEquals("error"))
 231                {
 0232                    if (property.Value.ValueKind == JsonValueKind.Null)
 233                    {
 234                        continue;
 235                    }
 0236                    error = ErrorResponse.DeserializeErrorResponse(property.Value);
 237                    continue;
 238                }
 239            }
 128240            return new DeploymentPropertiesExtended(provisioningState, correlationId, timestamp, duration, outputs, prov
 241        }
 242    }
 243}