< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentOperationProperties
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentOperationProperties.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentOperationProperties.Serialization.cs
Covered lines:62
Uncovered lines:13
Coverable lines:75
Total lines:190
Line coverage:82.6% (62 of 75)
Covered branches:38
Total branches:42
Branch coverage:90.4% (38 of 42)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ProvisioningOperation()-0%100%
get_ProvisioningState()-100%100%
get_Timestamp()-0%100%
get_Duration()-0%100%
get_ServiceRequestId()-0%100%
get_StatusCode()-100%100%
get_StatusMessage()-100%100%
get_TargetResource()-100%100%
get_Request()-0%100%
get_Response()-0%100%
DeserializeDeploymentOperationProperties(...)-90.2%90.48%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentOperationProperties.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;
 9
 10namespace Azure.ResourceManager.Resources.Models
 11{
 12    /// <summary> Deployment operation properties. </summary>
 13    public partial class DeploymentOperationProperties
 14    {
 15        /// <summary> Initializes a new instance of DeploymentOperationProperties. </summary>
 016        internal DeploymentOperationProperties()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of DeploymentOperationProperties. </summary>
 21        /// <param name="provisioningOperation"> The name of the current provisioning operation. </param>
 22        /// <param name="provisioningState"> The state of the provisioning. </param>
 23        /// <param name="timestamp"> The date and time of the operation. </param>
 24        /// <param name="duration"> The duration of the operation. </param>
 25        /// <param name="serviceRequestId"> Deployment operation service request id. </param>
 26        /// <param name="statusCode"> Operation status code. </param>
 27        /// <param name="statusMessage"> Operation status message. </param>
 28        /// <param name="targetResource"> The target resource. </param>
 29        /// <param name="request"> The HTTP request message. </param>
 30        /// <param name="response"> The HTTP response message. </param>
 6031        internal DeploymentOperationProperties(ProvisioningOperation? provisioningOperation, string provisioningState, D
 32        {
 6033            ProvisioningOperation = provisioningOperation;
 6034            ProvisioningState = provisioningState;
 6035            Timestamp = timestamp;
 6036            Duration = duration;
 6037            ServiceRequestId = serviceRequestId;
 6038            StatusCode = statusCode;
 6039            StatusMessage = statusMessage;
 6040            TargetResource = targetResource;
 6041            Request = request;
 6042            Response = response;
 6043        }
 44
 45        /// <summary> The name of the current provisioning operation. </summary>
 046        public ProvisioningOperation? ProvisioningOperation { get; }
 47        /// <summary> The state of the provisioning. </summary>
 848        public string ProvisioningState { get; }
 49        /// <summary> The date and time of the operation. </summary>
 050        public DateTimeOffset? Timestamp { get; }
 51        /// <summary> The duration of the operation. </summary>
 052        public string Duration { get; }
 53        /// <summary> Deployment operation service request id. </summary>
 054        public string ServiceRequestId { get; }
 55        /// <summary> Operation status code. </summary>
 856        public string StatusCode { get; }
 57        /// <summary> Operation status message. </summary>
 1258        public object StatusMessage { get; }
 59        /// <summary> The target resource. </summary>
 2460        public TargetResource TargetResource { get; }
 61        /// <summary> The HTTP request message. </summary>
 062        public HttpMessage Request { get; }
 63        /// <summary> The HTTP response message. </summary>
 064        public HttpMessage Response { get; }
 65    }
 66}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentOperationProperties.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.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.Resources.Models
 13{
 14    public partial class DeploymentOperationProperties
 15    {
 16        internal static DeploymentOperationProperties DeserializeDeploymentOperationProperties(JsonElement element)
 17        {
 6018            ProvisioningOperation? provisioningOperation = default;
 6019            string provisioningState = default;
 6020            DateTimeOffset? timestamp = default;
 6021            string duration = default;
 6022            string serviceRequestId = default;
 6023            string statusCode = default;
 6024            object statusMessage = default;
 6025            TargetResource targetResource = default;
 6026            HttpMessage request = default;
 6027            HttpMessage response = default;
 99228            foreach (var property in element.EnumerateObject())
 29            {
 43630                if (property.NameEquals("provisioningOperation"))
 31                {
 4432                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 4436                    provisioningOperation = property.Value.GetString().ToProvisioningOperation();
 4437                    continue;
 38                }
 39239                if (property.NameEquals("provisioningState"))
 40                {
 6041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 6045                    provisioningState = property.Value.GetString();
 6046                    continue;
 47                }
 33248                if (property.NameEquals("timestamp"))
 49                {
 6050                    if (property.Value.ValueKind == JsonValueKind.Null)
 51                    {
 52                        continue;
 53                    }
 6054                    timestamp = property.Value.GetDateTimeOffset("O");
 6055                    continue;
 56                }
 27257                if (property.NameEquals("duration"))
 58                {
 4459                    if (property.Value.ValueKind == JsonValueKind.Null)
 60                    {
 61                        continue;
 62                    }
 4463                    duration = property.Value.GetString();
 4464                    continue;
 65                }
 22866                if (property.NameEquals("serviceRequestId"))
 67                {
 3268                    if (property.Value.ValueKind == JsonValueKind.Null)
 69                    {
 70                        continue;
 71                    }
 3272                    serviceRequestId = property.Value.GetString();
 3273                    continue;
 74                }
 19675                if (property.NameEquals("statusCode"))
 76                {
 6077                    if (property.Value.ValueKind == JsonValueKind.Null)
 78                    {
 79                        continue;
 80                    }
 6081                    statusCode = property.Value.GetString();
 6082                    continue;
 83                }
 13684                if (property.NameEquals("statusMessage"))
 85                {
 2886                    if (property.Value.ValueKind == JsonValueKind.Null)
 87                    {
 88                        continue;
 89                    }
 1290                    statusMessage = property.Value.GetObject();
 1291                    continue;
 92                }
 10893                if (property.NameEquals("targetResource"))
 94                {
 4895                    if (property.Value.ValueKind == JsonValueKind.Null)
 96                    {
 97                        continue;
 98                    }
 4899                    targetResource = TargetResource.DeserializeTargetResource(property.Value);
 48100                    continue;
 101                }
 60102                if (property.NameEquals("request"))
 103                {
 0104                    if (property.Value.ValueKind == JsonValueKind.Null)
 105                    {
 106                        continue;
 107                    }
 0108                    request = HttpMessage.DeserializeHttpMessage(property.Value);
 0109                    continue;
 110                }
 60111                if (property.NameEquals("response"))
 112                {
 0113                    if (property.Value.ValueKind == JsonValueKind.Null)
 114                    {
 115                        continue;
 116                    }
 0117                    response = HttpMessage.DeserializeHttpMessage(property.Value);
 118                    continue;
 119                }
 120            }
 60121            return new DeploymentOperationProperties(provisioningOperation, provisioningState, timestamp, duration, serv
 122        }
 123    }
 124}