< Summary

Class:Azure.Security.KeyVault.Administration.Models.FullBackupDetailsInternal
Assembly:Azure.Security.KeyVault.Administration
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\FullBackupDetailsInternal.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\FullBackupDetailsInternal.Serialization.cs
Covered lines:47
Uncovered lines:6
Coverable lines:53
Total lines:130
Line coverage:88.6% (47 of 53)
Covered branches:20
Total branches:20
Branch coverage:100% (20 of 20)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\FullBackupDetailsInternal.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> Full backup operation. </summary>
 13    internal partial class FullBackupDetailsInternal
 14    {
 15        /// <summary> Initializes a new instance of FullBackupDetailsInternal. </summary>
 016        internal FullBackupDetailsInternal()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of FullBackupDetailsInternal. </summary>
 21        /// <param name="status"> Status of the backup operation. </param>
 22        /// <param name="statusDetails"> The status details of backup operation. </param>
 23        /// <param name="error"> Error encountered, if any, during the full backup operation. </param>
 24        /// <param name="startTime"> The start time of the backup operation in UTC. </param>
 25        /// <param name="endTime"> The end time of the backup operation in UTC. </param>
 26        /// <param name="jobId"> Identifier for the full backup operation. </param>
 27        /// <param name="azureStorageBlobContainerUri"> The Azure blob storage container Uri which contains the full bac
 1028        internal FullBackupDetailsInternal(string status, string statusDetails, KeyVaultServiceError error, DateTimeOffs
 29        {
 1030            Status = status;
 1031            StatusDetails = statusDetails;
 1032            Error = error;
 1033            StartTime = startTime;
 1034            EndTime = endTime;
 1035            JobId = jobId;
 1036            AzureStorageBlobContainerUri = azureStorageBlobContainerUri;
 1037        }
 38
 39        /// <summary> Status of the backup operation. </summary>
 040        public string Status { get; }
 41        /// <summary> The status details of backup operation. </summary>
 042        public string StatusDetails { get; }
 43        /// <summary> Error encountered, if any, during the full backup operation. </summary>
 844        public KeyVaultServiceError Error { get; }
 45        /// <summary> The start time of the backup operation in UTC. </summary>
 046        public DateTimeOffset? StartTime { get; }
 47        /// <summary> The end time of the backup operation in UTC. </summary>
 2848        public DateTimeOffset? EndTime { get; }
 49        /// <summary> Identifier for the full backup operation. </summary>
 050        public string JobId { get; }
 51        /// <summary> The Azure blob storage container Uri which contains the full backup. </summary>
 452        public string AzureStorageBlobContainerUri { get; }
 53    }
 54}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\FullBackupDetailsInternal.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    internal partial class FullBackupDetailsInternal
 15    {
 16        internal static FullBackupDetailsInternal DeserializeFullBackupDetailsInternal(JsonElement element)
 17        {
 1018            Optional<string> status = default;
 1019            Optional<string> statusDetails = default;
 1020            Optional<KeyVaultServiceError> error = default;
 1021            Optional<DateTimeOffset> startTime = default;
 1022            Optional<DateTimeOffset?> endTime = default;
 1023            Optional<string> jobId = default;
 1024            Optional<string> azureStorageBlobContainerUri = default;
 16025            foreach (var property in element.EnumerateObject())
 26            {
 7027                if (property.NameEquals("status"))
 28                {
 1029                    status = property.Value.GetString();
 1030                    continue;
 31                }
 6032                if (property.NameEquals("statusDetails"))
 33                {
 1034                    statusDetails = property.Value.GetString();
 1035                    continue;
 36                }
 5037                if (property.NameEquals("error"))
 38                {
 1039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 441                        error = null;
 442                        continue;
 43                    }
 644                    error = KeyVaultServiceError.DeserializeKeyVaultServiceError(property.Value);
 645                    continue;
 46                }
 4047                if (property.NameEquals("startTime"))
 48                {
 1049                    startTime = property.Value.GetDateTimeOffset("U");
 1050                    continue;
 51                }
 3052                if (property.NameEquals("endTime"))
 53                {
 1054                    if (property.Value.ValueKind == JsonValueKind.Null)
 55                    {
 656                        endTime = null;
 657                        continue;
 58                    }
 459                    endTime = property.Value.GetDateTimeOffset("U");
 460                    continue;
 61                }
 2062                if (property.NameEquals("jobId"))
 63                {
 1064                    jobId = property.Value.GetString();
 1065                    continue;
 66                }
 1067                if (property.NameEquals("azureStorageBlobContainerUri"))
 68                {
 1069                    azureStorageBlobContainerUri = property.Value.GetString();
 70                    continue;
 71                }
 72            }
 1073            return new FullBackupDetailsInternal(status.Value, statusDetails.Value, error.Value, Optional.ToNullable(sta
 74        }
 75    }
 76}