< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentWhatIfProperties
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIfProperties.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIfProperties.Serialization.cs
Covered lines:23
Uncovered lines:7
Coverable lines:30
Total lines:90
Line coverage:76.6% (23 of 30)
Covered branches:8
Total branches:10
Branch coverage:80% (8 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
.ctor(...)-0%100%
get_WhatIfSettings()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-83.33%80%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIfProperties.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;
 9
 10namespace Azure.ResourceManager.Resources.Models
 11{
 12    /// <summary> Deployment What-if properties. </summary>
 13    public partial class DeploymentWhatIfProperties : DeploymentProperties
 14    {
 15        /// <summary> Initializes a new instance of DeploymentWhatIfProperties. </summary>
 16        /// <param name="mode"> The mode that is used to deploy resources. This value can be either Incremental or Compl
 7617        public DeploymentWhatIfProperties(DeploymentMode mode) : base(mode)
 18        {
 7619        }
 20
 21        /// <summary> Initializes a new instance of DeploymentWhatIfProperties. </summary>
 22        /// <param name="templateJson"> The template content. You use this element when you want to pass the template sy
 23        /// <param name="templateLink"> The URI of the template. Use either the templateLink property or the template pr
 24        /// <param name="parametersJson"> Name and value pairs that define the deployment parameters for the template. Y
 25        /// <param name="parametersLink"> The URI of parameters file. You use this element to link to an existing parame
 26        /// <param name="mode"> The mode that is used to deploy resources. This value can be either Incremental or Compl
 27        /// <param name="debugSetting"> The debug setting of the deployment. </param>
 28        /// <param name="onErrorDeployment"> The deployment on error behavior. </param>
 29        /// <param name="whatIfSettings"> Optional What-If operation settings. </param>
 030        internal DeploymentWhatIfProperties(JsonElement templateJson, TemplateLink templateLink, JsonElement parametersJ
 31        {
 032            WhatIfSettings = whatIfSettings;
 033        }
 34
 35        /// <summary> Optional What-If operation settings. </summary>
 26036        public DeploymentWhatIfSettings WhatIfSettings { get; set; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIfProperties.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 DeploymentWhatIfProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 15217            writer.WriteStartObject();
 15218            if (WhatIfSettings != null)
 19            {
 7220                writer.WritePropertyName("whatIfSettings");
 7221                writer.WriteObjectValue(WhatIfSettings);
 22            }
 15223            writer.WritePropertyName("template");
 15224            TemplateJson.WriteTo(writer);
 15225            if (TemplateLink != null)
 26            {
 1627                writer.WritePropertyName("templateLink");
 1628                writer.WriteObjectValue(TemplateLink);
 29            }
 15230            writer.WritePropertyName("parameters");
 15231            ParametersJson.WriteTo(writer);
 15232            if (ParametersLink != null)
 33            {
 1634                writer.WritePropertyName("parametersLink");
 1635                writer.WriteObjectValue(ParametersLink);
 36            }
 15237            writer.WritePropertyName("mode");
 15238            writer.WriteStringValue(Mode.ToSerialString());
 15239            if (DebugSetting != null)
 40            {
 041                writer.WritePropertyName("debugSetting");
 042                writer.WriteObjectValue(DebugSetting);
 43            }
 15244            if (OnErrorDeployment != null)
 45            {
 046                writer.WritePropertyName("onErrorDeployment");
 047                writer.WriteObjectValue(OnErrorDeployment);
 48            }
 15249            writer.WriteEndObject();
 15250        }
 51    }
 52}