| | 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 Newtonsoft.Json; |
| | 15 | | using System.Collections; |
| | 16 | | using System.Collections.Generic; |
| | 17 | | using System.Linq; |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// The certificate merge parameters |
| | 21 | | /// </summary> |
| | 22 | | public partial class CertificateMergeParameters |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the CertificateMergeParameters class. |
| | 26 | | /// </summary> |
| 0 | 27 | | public CertificateMergeParameters() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the CertificateMergeParameters class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="x509Certificates">The certificate or the certificate |
| | 36 | | /// chain to merge.</param> |
| | 37 | | /// <param name="certificateAttributes">The attributes of the |
| | 38 | | /// certificate (optional).</param> |
| | 39 | | /// <param name="tags">Application specific metadata in the form of |
| | 40 | | /// key-value pairs.</param> |
| 0 | 41 | | public CertificateMergeParameters(IList<byte[]> x509Certificates, CertificateAttributes certificateAttributes = |
| | 42 | | { |
| 0 | 43 | | X509Certificates = x509Certificates; |
| 0 | 44 | | CertificateAttributes = certificateAttributes; |
| 0 | 45 | | Tags = tags; |
| | 46 | | CustomInit(); |
| 0 | 47 | | } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// An initialization method that performs custom operations like setting defaults |
| | 51 | | /// </summary> |
| | 52 | | partial void CustomInit(); |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// Gets or sets the certificate or the certificate chain to merge. |
| | 56 | | /// </summary> |
| | 57 | | [JsonProperty(PropertyName = "x5c")] |
| 0 | 58 | | public IList<byte[]> X509Certificates { get; set; } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets or sets the attributes of the certificate (optional). |
| | 62 | | /// </summary> |
| | 63 | | [JsonProperty(PropertyName = "attributes")] |
| 0 | 64 | | public CertificateAttributes CertificateAttributes { get; set; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets or sets application specific metadata in the form of key-value |
| | 68 | | /// pairs. |
| | 69 | | /// </summary> |
| | 70 | | [JsonProperty(PropertyName = "tags")] |
| 0 | 71 | | public IDictionary<string, string> Tags { get; set; } |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Validate the object. |
| | 75 | | /// </summary> |
| | 76 | | /// <exception cref="ValidationException"> |
| | 77 | | /// Thrown if validation fails |
| | 78 | | /// </exception> |
| | 79 | | public virtual void Validate() |
| | 80 | | { |
| 0 | 81 | | if (X509Certificates == null) |
| | 82 | | { |
| 0 | 83 | | throw new ValidationException(ValidationRules.CannotBeNull, "X509Certificates"); |
| | 84 | | } |
| 0 | 85 | | } |
| | 86 | | } |
| | 87 | | } |