| | 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 | |
|
| | 11 | | namespace 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 | | /// Management policy for a certificate. |
| | 20 | | /// </summary> |
| | 21 | | public partial class CertificatePolicy |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the CertificatePolicy class. |
| | 25 | | /// </summary> |
| 130 | 26 | | public CertificatePolicy() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 130 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the CertificatePolicy class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="id">The certificate id.</param> |
| | 35 | | /// <param name="keyProperties">Properties of the key backing a |
| | 36 | | /// certificate.</param> |
| | 37 | | /// <param name="secretProperties">Properties of the secret backing a |
| | 38 | | /// certificate.</param> |
| | 39 | | /// <param name="x509CertificateProperties">Properties of the X509 |
| | 40 | | /// component of a certificate.</param> |
| | 41 | | /// <param name="lifetimeActions">Actions that will be performed by Key |
| | 42 | | /// Vault over the lifetime of a certificate.</param> |
| | 43 | | /// <param name="issuerParameters">Parameters for the issuer of the |
| | 44 | | /// X509 component of a certificate.</param> |
| | 45 | | /// <param name="attributes">The certificate attributes.</param> |
| 0 | 46 | | public CertificatePolicy(string id = default(string), KeyProperties keyProperties = default(KeyProperties), Secr |
| | 47 | | { |
| 0 | 48 | | Id = id; |
| 0 | 49 | | KeyProperties = keyProperties; |
| 0 | 50 | | SecretProperties = secretProperties; |
| 0 | 51 | | X509CertificateProperties = x509CertificateProperties; |
| 0 | 52 | | LifetimeActions = lifetimeActions; |
| 0 | 53 | | IssuerParameters = issuerParameters; |
| 0 | 54 | | Attributes = attributes; |
| | 55 | | CustomInit(); |
| 0 | 56 | | } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// An initialization method that performs custom operations like setting defaults |
| | 60 | | /// </summary> |
| | 61 | | partial void CustomInit(); |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets the certificate id. |
| | 65 | | /// </summary> |
| | 66 | | [JsonProperty(PropertyName = "id")] |
| 0 | 67 | | public string Id { get; private set; } |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets or sets properties of the key backing a certificate. |
| | 71 | | /// </summary> |
| | 72 | | [JsonProperty(PropertyName = "key_props")] |
| 264 | 73 | | public KeyProperties KeyProperties { get; set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets or sets properties of the secret backing a certificate. |
| | 77 | | /// </summary> |
| | 78 | | [JsonProperty(PropertyName = "secret_props")] |
| 264 | 79 | | public SecretProperties SecretProperties { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets properties of the X509 component of a certificate. |
| | 83 | | /// </summary> |
| | 84 | | [JsonProperty(PropertyName = "x509_props")] |
| 282 | 85 | | public X509CertificateProperties X509CertificateProperties { get; set; } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// Gets or sets actions that will be performed by Key Vault over the |
| | 89 | | /// lifetime of a certificate. |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "lifetime_actions")] |
| 266 | 92 | | public IList<LifetimeAction> LifetimeActions { get; set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets or sets parameters for the issuer of the X509 component of a |
| | 96 | | /// certificate. |
| | 97 | | /// </summary> |
| | 98 | | [JsonProperty(PropertyName = "issuer")] |
| 244 | 99 | | public IssuerParameters IssuerParameters { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets or sets the certificate attributes. |
| | 103 | | /// </summary> |
| | 104 | | [JsonProperty(PropertyName = "attributes")] |
| 230 | 105 | | public CertificateAttributes Attributes { get; set; } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Validate the object. |
| | 109 | | /// </summary> |
| | 110 | | /// <exception cref="Rest.ValidationException"> |
| | 111 | | /// Thrown if validation fails |
| | 112 | | /// </exception> |
| | 113 | | public virtual void Validate() |
| | 114 | | { |
| 36 | 115 | | if (X509CertificateProperties != null) |
| | 116 | | { |
| 8 | 117 | | X509CertificateProperties.Validate(); |
| | 118 | | } |
| 36 | 119 | | if (LifetimeActions != null) |
| | 120 | | { |
| 0 | 121 | | foreach (var element in LifetimeActions) |
| | 122 | | { |
| 0 | 123 | | if (element != null) |
| | 124 | | { |
| 0 | 125 | | element.Validate(); |
| | 126 | | } |
| | 127 | | } |
| | 128 | | } |
| 36 | 129 | | } |
| | 130 | | } |
| | 131 | | } |