< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.KeyVaultSecretExpiredEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\KeyVaultSecretExpiredEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\KeyVaultSecretExpiredEventData.Serialization.cs
Covered lines:0
Uncovered lines:47
Coverable lines:47
Total lines:117
Line coverage:0% (0 of 47)
Covered branches:0
Total branches:16
Branch coverage:0% (0 of 16)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Id()-0%100%
get_VaultName()-0%100%
get_ObjectType()-0%100%
get_ObjectName()-0%100%
get_Version()-0%100%
get_Nbf()-0%100%
get_Exp()-0%100%
DeserializeKeyVaultSecretExpiredEventData(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\KeyVaultSecretExpiredEventData.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
 8namespace Azure.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> Schema of the Data property of an EventGridEvent for an SecretExpired event. </summary>
 11    public partial class KeyVaultSecretExpiredEventData
 12    {
 13        /// <summary> Initializes a new instance of KeyVaultSecretExpiredEventData. </summary>
 014        internal KeyVaultSecretExpiredEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of KeyVaultSecretExpiredEventData. </summary>
 19        /// <param name="id"> The id of the object that triggered this event. </param>
 20        /// <param name="vaultName"> Key vault name of the object that triggered this event. </param>
 21        /// <param name="objectType"> The type of the object that triggered this event. </param>
 22        /// <param name="objectName"> The name of the object that triggered this event. </param>
 23        /// <param name="version"> The version of the object that triggered this event. </param>
 24        /// <param name="nbf"> Not before date of the object that triggered this event. </param>
 25        /// <param name="exp"> The expiration date of the object that triggered this event. </param>
 026        internal KeyVaultSecretExpiredEventData(string id, string vaultName, string objectType, string objectName, strin
 27        {
 028            Id = id;
 029            VaultName = vaultName;
 030            ObjectType = objectType;
 031            ObjectName = objectName;
 032            Version = version;
 033            Nbf = nbf;
 034            Exp = exp;
 035        }
 36
 37        /// <summary> The id of the object that triggered this event. </summary>
 038        public string Id { get; }
 39        /// <summary> Key vault name of the object that triggered this event. </summary>
 040        public string VaultName { get; }
 41        /// <summary> The type of the object that triggered this event. </summary>
 042        public string ObjectType { get; }
 43        /// <summary> The name of the object that triggered this event. </summary>
 044        public string ObjectName { get; }
 45        /// <summary> The version of the object that triggered this event. </summary>
 046        public string Version { get; }
 47        /// <summary> Not before date of the object that triggered this event. </summary>
 048        public float? Nbf { get; }
 49        /// <summary> The expiration date of the object that triggered this event. </summary>
 050        public float? Exp { get; }
 51    }
 52}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\KeyVaultSecretExpiredEventData.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.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class KeyVaultSecretExpiredEventData
 14    {
 15        internal static KeyVaultSecretExpiredEventData DeserializeKeyVaultSecretExpiredEventData(JsonElement element)
 16        {
 017            Optional<string> id = default;
 018            Optional<string> vaultName = default;
 019            Optional<string> objectType = default;
 020            Optional<string> objectName = default;
 021            Optional<string> version = default;
 022            Optional<float> nbf = default;
 023            Optional<float> exp = default;
 024            foreach (var property in element.EnumerateObject())
 25            {
 026                if (property.NameEquals("id"))
 27                {
 028                    id = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("vaultName"))
 32                {
 033                    vaultName = property.Value.GetString();
 034                    continue;
 35                }
 036                if (property.NameEquals("objectType"))
 37                {
 038                    objectType = property.Value.GetString();
 039                    continue;
 40                }
 041                if (property.NameEquals("objectName"))
 42                {
 043                    objectName = property.Value.GetString();
 044                    continue;
 45                }
 046                if (property.NameEquals("version"))
 47                {
 048                    version = property.Value.GetString();
 049                    continue;
 50                }
 051                if (property.NameEquals("nbf"))
 52                {
 053                    nbf = property.Value.GetSingle();
 054                    continue;
 55                }
 056                if (property.NameEquals("exp"))
 57                {
 058                    exp = property.Value.GetSingle();
 59                    continue;
 60                }
 61            }
 062            return new KeyVaultSecretExpiredEventData(id.Value, vaultName.Value, objectType.Value, objectName.Value, ver
 63        }
 64    }
 65}