< Summary

Class:Azure.ResourceManager.Compute.Models.MaintenanceRedeployStatus
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\MaintenanceRedeployStatus.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\MaintenanceRedeployStatus.Serialization.cs
Covered lines:0
Uncovered lines:78
Coverable lines:78
Total lines:189
Line coverage:0% (0 of 78)
Covered branches:0
Total branches:44
Branch coverage:0% (0 of 44)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_IsCustomerInitiatedMaintenanceAllowed()-0%100%
get_PreMaintenanceWindowStartTime()-0%100%
get_PreMaintenanceWindowEndTime()-0%100%
get_MaintenanceWindowStartTime()-0%100%
get_MaintenanceWindowEndTime()-0%100%
get_LastOperationResultCode()-0%100%
get_LastOperationMessage()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeMaintenanceRedeployStatus(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\MaintenanceRedeployStatus.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.Compute.Models
 11{
 12    /// <summary> Maintenance Operation Status. </summary>
 13    public partial class MaintenanceRedeployStatus
 14    {
 15        /// <summary> Initializes a new instance of MaintenanceRedeployStatus. </summary>
 016        public MaintenanceRedeployStatus()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of MaintenanceRedeployStatus. </summary>
 21        /// <param name="isCustomerInitiatedMaintenanceAllowed"> True, if customer is allowed to perform Maintenance. </
 22        /// <param name="preMaintenanceWindowStartTime"> Start Time for the Pre Maintenance Window. </param>
 23        /// <param name="preMaintenanceWindowEndTime"> End Time for the Pre Maintenance Window. </param>
 24        /// <param name="maintenanceWindowStartTime"> Start Time for the Maintenance Window. </param>
 25        /// <param name="maintenanceWindowEndTime"> End Time for the Maintenance Window. </param>
 26        /// <param name="lastOperationResultCode"> The Last Maintenance Operation Result Code. </param>
 27        /// <param name="lastOperationMessage"> Message returned for the last Maintenance Operation. </param>
 028        internal MaintenanceRedeployStatus(bool? isCustomerInitiatedMaintenanceAllowed, DateTimeOffset? preMaintenanceWi
 29        {
 030            IsCustomerInitiatedMaintenanceAllowed = isCustomerInitiatedMaintenanceAllowed;
 031            PreMaintenanceWindowStartTime = preMaintenanceWindowStartTime;
 032            PreMaintenanceWindowEndTime = preMaintenanceWindowEndTime;
 033            MaintenanceWindowStartTime = maintenanceWindowStartTime;
 034            MaintenanceWindowEndTime = maintenanceWindowEndTime;
 035            LastOperationResultCode = lastOperationResultCode;
 036            LastOperationMessage = lastOperationMessage;
 037        }
 38
 39        /// <summary> True, if customer is allowed to perform Maintenance. </summary>
 040        public bool? IsCustomerInitiatedMaintenanceAllowed { get; set; }
 41        /// <summary> Start Time for the Pre Maintenance Window. </summary>
 042        public DateTimeOffset? PreMaintenanceWindowStartTime { get; set; }
 43        /// <summary> End Time for the Pre Maintenance Window. </summary>
 044        public DateTimeOffset? PreMaintenanceWindowEndTime { get; set; }
 45        /// <summary> Start Time for the Maintenance Window. </summary>
 046        public DateTimeOffset? MaintenanceWindowStartTime { get; set; }
 47        /// <summary> End Time for the Maintenance Window. </summary>
 048        public DateTimeOffset? MaintenanceWindowEndTime { get; set; }
 49        /// <summary> The Last Maintenance Operation Result Code. </summary>
 050        public MaintenanceOperationResultCodeTypes? LastOperationResultCode { get; set; }
 51        /// <summary> Message returned for the last Maintenance Operation. </summary>
 052        public string LastOperationMessage { get; set; }
 53    }
 54}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\MaintenanceRedeployStatus.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.Compute.Models
 13{
 14    public partial class MaintenanceRedeployStatus : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (IsCustomerInitiatedMaintenanceAllowed != null)
 20            {
 021                writer.WritePropertyName("isCustomerInitiatedMaintenanceAllowed");
 022                writer.WriteBooleanValue(IsCustomerInitiatedMaintenanceAllowed.Value);
 23            }
 024            if (PreMaintenanceWindowStartTime != null)
 25            {
 026                writer.WritePropertyName("preMaintenanceWindowStartTime");
 027                writer.WriteStringValue(PreMaintenanceWindowStartTime.Value, "O");
 28            }
 029            if (PreMaintenanceWindowEndTime != null)
 30            {
 031                writer.WritePropertyName("preMaintenanceWindowEndTime");
 032                writer.WriteStringValue(PreMaintenanceWindowEndTime.Value, "O");
 33            }
 034            if (MaintenanceWindowStartTime != null)
 35            {
 036                writer.WritePropertyName("maintenanceWindowStartTime");
 037                writer.WriteStringValue(MaintenanceWindowStartTime.Value, "O");
 38            }
 039            if (MaintenanceWindowEndTime != null)
 40            {
 041                writer.WritePropertyName("maintenanceWindowEndTime");
 042                writer.WriteStringValue(MaintenanceWindowEndTime.Value, "O");
 43            }
 044            if (LastOperationResultCode != null)
 45            {
 046                writer.WritePropertyName("lastOperationResultCode");
 047                writer.WriteStringValue(LastOperationResultCode.Value.ToSerialString());
 48            }
 049            if (LastOperationMessage != null)
 50            {
 051                writer.WritePropertyName("lastOperationMessage");
 052                writer.WriteStringValue(LastOperationMessage);
 53            }
 054            writer.WriteEndObject();
 055        }
 56
 57        internal static MaintenanceRedeployStatus DeserializeMaintenanceRedeployStatus(JsonElement element)
 58        {
 059            bool? isCustomerInitiatedMaintenanceAllowed = default;
 060            DateTimeOffset? preMaintenanceWindowStartTime = default;
 061            DateTimeOffset? preMaintenanceWindowEndTime = default;
 062            DateTimeOffset? maintenanceWindowStartTime = default;
 063            DateTimeOffset? maintenanceWindowEndTime = default;
 064            MaintenanceOperationResultCodeTypes? lastOperationResultCode = default;
 065            string lastOperationMessage = default;
 066            foreach (var property in element.EnumerateObject())
 67            {
 068                if (property.NameEquals("isCustomerInitiatedMaintenanceAllowed"))
 69                {
 070                    if (property.Value.ValueKind == JsonValueKind.Null)
 71                    {
 72                        continue;
 73                    }
 074                    isCustomerInitiatedMaintenanceAllowed = property.Value.GetBoolean();
 075                    continue;
 76                }
 077                if (property.NameEquals("preMaintenanceWindowStartTime"))
 78                {
 079                    if (property.Value.ValueKind == JsonValueKind.Null)
 80                    {
 81                        continue;
 82                    }
 083                    preMaintenanceWindowStartTime = property.Value.GetDateTimeOffset("O");
 084                    continue;
 85                }
 086                if (property.NameEquals("preMaintenanceWindowEndTime"))
 87                {
 088                    if (property.Value.ValueKind == JsonValueKind.Null)
 89                    {
 90                        continue;
 91                    }
 092                    preMaintenanceWindowEndTime = property.Value.GetDateTimeOffset("O");
 093                    continue;
 94                }
 095                if (property.NameEquals("maintenanceWindowStartTime"))
 96                {
 097                    if (property.Value.ValueKind == JsonValueKind.Null)
 98                    {
 99                        continue;
 100                    }
 0101                    maintenanceWindowStartTime = property.Value.GetDateTimeOffset("O");
 0102                    continue;
 103                }
 0104                if (property.NameEquals("maintenanceWindowEndTime"))
 105                {
 0106                    if (property.Value.ValueKind == JsonValueKind.Null)
 107                    {
 108                        continue;
 109                    }
 0110                    maintenanceWindowEndTime = property.Value.GetDateTimeOffset("O");
 0111                    continue;
 112                }
 0113                if (property.NameEquals("lastOperationResultCode"))
 114                {
 0115                    if (property.Value.ValueKind == JsonValueKind.Null)
 116                    {
 117                        continue;
 118                    }
 0119                    lastOperationResultCode = property.Value.GetString().ToMaintenanceOperationResultCodeTypes();
 0120                    continue;
 121                }
 0122                if (property.NameEquals("lastOperationMessage"))
 123                {
 0124                    if (property.Value.ValueKind == JsonValueKind.Null)
 125                    {
 126                        continue;
 127                    }
 0128                    lastOperationMessage = property.Value.GetString();
 129                    continue;
 130                }
 131            }
 0132            return new MaintenanceRedeployStatus(isCustomerInitiatedMaintenanceAllowed, preMaintenanceWindowStartTime, p
 133        }
 134    }
 135}