< Summary

Class:Microsoft.Azure.KeyVault.Models.LifetimeAction
Assembly:Microsoft.Azure.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Generated\Models\LifetimeAction.cs
Covered lines:4
Uncovered lines:7
Coverable lines:11
Total lines:74
Line coverage:36.3% (4 of 11)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Trigger()-100%100%
get_Action()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Generated\Models\LifetimeAction.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.KeyVault.Models
 12{
 13    using Newtonsoft.Json;
 14    using System.Linq;
 15
 16    /// <summary>
 17    /// Action and its trigger that will be performed by Key Vault over the
 18    /// lifetime of a certificate.
 19    /// </summary>
 20    public partial class LifetimeAction
 21    {
 22        /// <summary>
 23        /// Initializes a new instance of the LifetimeAction class.
 24        /// </summary>
 9625        public LifetimeAction()
 26        {
 27            CustomInit();
 9628        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the LifetimeAction class.
 32        /// </summary>
 33        /// <param name="trigger">The condition that will execute the
 34        /// action.</param>
 35        /// <param name="action">The action that will be executed.</param>
 036        public LifetimeAction(Trigger trigger = default(Trigger), Action action = default(Action))
 37        {
 038            Trigger = trigger;
 039            Action = action;
 40            CustomInit();
 041        }
 42
 43        /// <summary>
 44        /// An initialization method that performs custom operations like setting defaults
 45        /// </summary>
 46        partial void CustomInit();
 47
 48        /// <summary>
 49        /// Gets or sets the condition that will execute the action.
 50        /// </summary>
 51        [JsonProperty(PropertyName = "trigger")]
 19452        public Trigger Trigger { get; set; }
 53
 54        /// <summary>
 55        /// Gets or sets the action that will be executed.
 56        /// </summary>
 57        [JsonProperty(PropertyName = "action")]
 19458        public Action Action { get; set; }
 59
 60        /// <summary>
 61        /// Validate the object.
 62        /// </summary>
 63        /// <exception cref="Rest.ValidationException">
 64        /// Thrown if validation fails
 65        /// </exception>
 66        public virtual void Validate()
 67        {
 068            if (Trigger != null)
 69            {
 070                Trigger.Validate();
 71            }
 072        }
 73    }
 74}