< Summary

Class:Microsoft.Azure.KeyVault.Models.CertificateCreateParameters
Assembly:Microsoft.Azure.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Generated\Models\CertificateCreateParameters.cs
Covered lines:5
Uncovered lines:8
Coverable lines:13
Total lines:88
Line coverage:38.4% (5 of 13)
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_CertificatePolicy()-100%100%
get_CertificateAttributes()-100%100%
get_Tags()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Generated\Models\CertificateCreateParameters.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.Collections;
 15    using System.Collections.Generic;
 16    using System.Linq;
 17
 18    /// <summary>
 19    /// The certificate create parameters.
 20    /// </summary>
 21    public partial class CertificateCreateParameters
 22    {
 23        /// <summary>
 24        /// Initializes a new instance of the CertificateCreateParameters
 25        /// class.
 26        /// </summary>
 827        public CertificateCreateParameters()
 28        {
 29            CustomInit();
 830        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the CertificateCreateParameters
 34        /// class.
 35        /// </summary>
 36        /// <param name="certificatePolicy">The management policy for the
 37        /// certificate.</param>
 38        /// <param name="certificateAttributes">The attributes of the
 39        /// certificate (optional).</param>
 40        /// <param name="tags">Application specific metadata in the form of
 41        /// key-value pairs.</param>
 042        public CertificateCreateParameters(CertificatePolicy certificatePolicy = default(CertificatePolicy), Certificate
 43        {
 044            CertificatePolicy = certificatePolicy;
 045            CertificateAttributes = certificateAttributes;
 046            Tags = tags;
 47            CustomInit();
 048        }
 49
 50        /// <summary>
 51        /// An initialization method that performs custom operations like setting defaults
 52        /// </summary>
 53        partial void CustomInit();
 54
 55        /// <summary>
 56        /// Gets or sets the management policy for the certificate.
 57        /// </summary>
 58        [JsonProperty(PropertyName = "policy")]
 1659        public CertificatePolicy CertificatePolicy { get; set; }
 60
 61        /// <summary>
 62        /// Gets or sets the attributes of the certificate (optional).
 63        /// </summary>
 64        [JsonProperty(PropertyName = "attributes")]
 1665        public CertificateAttributes CertificateAttributes { get; set; }
 66
 67        /// <summary>
 68        /// Gets or sets application specific metadata in the form of key-value
 69        /// pairs.
 70        /// </summary>
 71        [JsonProperty(PropertyName = "tags")]
 1672        public IDictionary<string, string> Tags { get; set; }
 73
 74        /// <summary>
 75        /// Validate the object.
 76        /// </summary>
 77        /// <exception cref="Rest.ValidationException">
 78        /// Thrown if validation fails
 79        /// </exception>
 80        public virtual void Validate()
 81        {
 082            if (CertificatePolicy != null)
 83            {
 084                CertificatePolicy.Validate();
 85            }
 086        }
 87    }
 88}