| | 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 Microsoft.Rest; |
| | 14 | | using Microsoft.Rest.Serialization; |
| | 15 | | using Newtonsoft.Json; |
| | 16 | | using System.Collections; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// A certificate bundle consists of a certificate (X509) plus its |
| | 22 | | /// attributes. |
| | 23 | | /// </summary> |
| | 24 | | public partial class CertificateBundle |
| | 25 | | { |
| | 26 | | /// <summary> |
| | 27 | | /// Initializes a new instance of the CertificateBundle class. |
| | 28 | | /// </summary> |
| 49 | 29 | | public CertificateBundle() |
| | 30 | | { |
| | 31 | | CustomInit(); |
| 49 | 32 | | } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Initializes a new instance of the CertificateBundle class. |
| | 36 | | /// </summary> |
| | 37 | | /// <param name="id">The certificate id.</param> |
| | 38 | | /// <param name="kid">The key id.</param> |
| | 39 | | /// <param name="sid">The secret id.</param> |
| | 40 | | /// <param name="x509Thumbprint">Thumbprint of the certificate.</param> |
| | 41 | | /// <param name="policy">The management policy.</param> |
| | 42 | | /// <param name="cer">CER contents of x509 certificate.</param> |
| | 43 | | /// <param name="contentType">The content type of the secret.</param> |
| | 44 | | /// <param name="attributes">The certificate attributes.</param> |
| | 45 | | /// <param name="tags">Application specific metadata in the form of |
| | 46 | | /// key-value pairs</param> |
| 0 | 47 | | public CertificateBundle(string id = default(string), string kid = default(string), string sid = default(string) |
| | 48 | | { |
| 0 | 49 | | Id = id; |
| 0 | 50 | | Kid = kid; |
| 0 | 51 | | Sid = sid; |
| 0 | 52 | | X509Thumbprint = x509Thumbprint; |
| 0 | 53 | | Policy = policy; |
| 0 | 54 | | Cer = cer; |
| 0 | 55 | | ContentType = contentType; |
| 0 | 56 | | Attributes = attributes; |
| 0 | 57 | | Tags = tags; |
| | 58 | | CustomInit(); |
| 0 | 59 | | } |
| | 60 | |
|
| | 61 | | /// <summary> |
| | 62 | | /// An initialization method that performs custom operations like setting defaults |
| | 63 | | /// </summary> |
| | 64 | | partial void CustomInit(); |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets the certificate id. |
| | 68 | | /// </summary> |
| | 69 | | [JsonProperty(PropertyName = "id")] |
| 67 | 70 | | public string Id { get; private set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets the key id. |
| | 74 | | /// </summary> |
| | 75 | | [JsonProperty(PropertyName = "kid")] |
| 97 | 76 | | public string Kid { get; private set; } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Gets the secret id. |
| | 80 | | /// </summary> |
| | 81 | | [JsonProperty(PropertyName = "sid")] |
| 108 | 82 | | public string Sid { get; private set; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets thumbprint of the certificate. |
| | 86 | | /// </summary> |
| | 87 | | [JsonConverter(typeof(Base64UrlJsonConverter))] |
| | 88 | | [JsonProperty(PropertyName = "x5t")] |
| 141 | 89 | | public byte[] X509Thumbprint { get; private set; } |
| | 90 | |
|
| | 91 | | /// <summary> |
| | 92 | | /// Gets the management policy. |
| | 93 | | /// </summary> |
| | 94 | | [JsonProperty(PropertyName = "policy")] |
| 108 | 95 | | public CertificatePolicy Policy { get; private set; } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// Gets or sets CER contents of x509 certificate. |
| | 99 | | /// </summary> |
| | 100 | | [JsonProperty(PropertyName = "cer")] |
| 78 | 101 | | public byte[] Cer { get; set; } |
| | 102 | |
|
| | 103 | | /// <summary> |
| | 104 | | /// Gets or sets the content type of the secret. |
| | 105 | | /// </summary> |
| | 106 | | [JsonProperty(PropertyName = "contentType")] |
| 0 | 107 | | public string ContentType { get; set; } |
| | 108 | |
|
| | 109 | | /// <summary> |
| | 110 | | /// Gets or sets the certificate attributes. |
| | 111 | | /// </summary> |
| | 112 | | [JsonProperty(PropertyName = "attributes")] |
| 107 | 113 | | public CertificateAttributes Attributes { get; set; } |
| | 114 | |
|
| | 115 | | /// <summary> |
| | 116 | | /// Gets or sets application specific metadata in the form of key-value |
| | 117 | | /// pairs |
| | 118 | | /// </summary> |
| | 119 | | [JsonProperty(PropertyName = "tags")] |
| 13 | 120 | | public IDictionary<string, string> Tags { get; set; } |
| | 121 | |
|
| | 122 | | /// <summary> |
| | 123 | | /// Validate the object. |
| | 124 | | /// </summary> |
| | 125 | | /// <exception cref="ValidationException"> |
| | 126 | | /// Thrown if validation fails |
| | 127 | | /// </exception> |
| | 128 | | public virtual void Validate() |
| | 129 | | { |
| 0 | 130 | | if (Policy != null) |
| | 131 | | { |
| 0 | 132 | | Policy.Validate(); |
| | 133 | | } |
| 0 | 134 | | } |
| | 135 | | } |
| | 136 | | } |