< Summary

Class:Azure.Security.KeyVault.Administration.Models.SelectiveKeyRestoreDetails
Assembly:Azure.Security.KeyVault.Administration
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\SelectiveKeyRestoreDetails.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\SelectiveKeyRestoreDetails.Serialization.cs
Covered lines:0
Uncovered lines:47
Coverable lines:47
Total lines:120
Line coverage:0% (0 of 47)
Covered branches:0
Total branches:18
Branch coverage:0% (0 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Status()-0%100%
get_StatusDetails()-0%100%
get_Error()-0%100%
get_JobId()-0%100%
get_StartTime()-0%100%
get_EndTime()-0%100%
DeserializeSelectiveKeyRestoreDetails(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\SelectiveKeyRestoreDetails.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.Security.KeyVault.Administration.Models
 11{
 12    /// <summary> Selective Key Restore operation. </summary>
 13    public partial class SelectiveKeyRestoreDetails
 14    {
 15        /// <summary> Initializes a new instance of SelectiveKeyRestoreDetails. </summary>
 016        internal SelectiveKeyRestoreDetails()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of SelectiveKeyRestoreDetails. </summary>
 21        /// <param name="status"> Status of the restore operation. </param>
 22        /// <param name="statusDetails"> The status details of restore operation. </param>
 23        /// <param name="error"> Error encountered, if any, during the selective key restore operation. </param>
 24        /// <param name="jobId"> Identifier for the selective key restore operation. </param>
 25        /// <param name="startTime"> The start time of the restore operation. </param>
 26        /// <param name="endTime"> The end time of the restore operation in UTC. </param>
 027        internal SelectiveKeyRestoreDetails(string status, string statusDetails, KeyVaultServiceError error, string jobI
 28        {
 029            Status = status;
 030            StatusDetails = statusDetails;
 031            Error = error;
 032            JobId = jobId;
 033            StartTime = startTime;
 034            EndTime = endTime;
 035        }
 36
 37        /// <summary> Status of the restore operation. </summary>
 038        public string Status { get; }
 39        /// <summary> The status details of restore operation. </summary>
 040        public string StatusDetails { get; }
 41        /// <summary> Error encountered, if any, during the selective key restore operation. </summary>
 042        public KeyVaultServiceError Error { get; }
 43        /// <summary> Identifier for the selective key restore operation. </summary>
 044        public string JobId { get; }
 45        /// <summary> The start time of the restore operation. </summary>
 046        public DateTimeOffset? StartTime { get; }
 47        /// <summary> The end time of the restore operation in UTC. </summary>
 048        public DateTimeOffset? EndTime { get; }
 49    }
 50}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\SelectiveKeyRestoreDetails.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.Security.KeyVault.Administration.Models
 13{
 14    public partial class SelectiveKeyRestoreDetails
 15    {
 16        internal static SelectiveKeyRestoreDetails DeserializeSelectiveKeyRestoreDetails(JsonElement element)
 17        {
 018            Optional<string> status = default;
 019            Optional<string> statusDetails = default;
 020            Optional<KeyVaultServiceError> error = default;
 021            Optional<string> jobId = default;
 022            Optional<DateTimeOffset> startTime = default;
 023            Optional<DateTimeOffset?> endTime = default;
 024            foreach (var property in element.EnumerateObject())
 25            {
 026                if (property.NameEquals("status"))
 27                {
 028                    status = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("statusDetails"))
 32                {
 033                    statusDetails = property.Value.GetString();
 034                    continue;
 35                }
 036                if (property.NameEquals("error"))
 37                {
 038                    if (property.Value.ValueKind == JsonValueKind.Null)
 39                    {
 040                        error = null;
 041                        continue;
 42                    }
 043                    error = KeyVaultServiceError.DeserializeKeyVaultServiceError(property.Value);
 044                    continue;
 45                }
 046                if (property.NameEquals("jobId"))
 47                {
 048                    jobId = property.Value.GetString();
 049                    continue;
 50                }
 051                if (property.NameEquals("startTime"))
 52                {
 053                    startTime = property.Value.GetDateTimeOffset("U");
 054                    continue;
 55                }
 056                if (property.NameEquals("endTime"))
 57                {
 058                    if (property.Value.ValueKind == JsonValueKind.Null)
 59                    {
 060                        endTime = null;
 061                        continue;
 62                    }
 063                    endTime = property.Value.GetDateTimeOffset("U");
 64                    continue;
 65                }
 66            }
 067            return new SelectiveKeyRestoreDetails(status.Value, statusDetails.Value, error.Value, jobId.Value, Optional.
 68        }
 69    }
 70}