| | 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 secret set parameters. |
| | 21 | | /// </summary> |
| | 22 | | public partial class SecretSetParameters |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the SecretSetParameters class. |
| | 26 | | /// </summary> |
| 36 | 27 | | public SecretSetParameters() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 36 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the SecretSetParameters class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="value">The value of the secret.</param> |
| | 36 | | /// <param name="tags">Application specific metadata in the form of |
| | 37 | | /// key-value pairs.</param> |
| | 38 | | /// <param name="contentType">Type of the secret value such as a |
| | 39 | | /// password.</param> |
| | 40 | | /// <param name="secretAttributes">The secret management |
| | 41 | | /// attributes.</param> |
| 0 | 42 | | public SecretSetParameters(string value, IDictionary<string, string> tags = default(IDictionary<string, string>) |
| | 43 | | { |
| 0 | 44 | | Value = value; |
| 0 | 45 | | Tags = tags; |
| 0 | 46 | | ContentType = contentType; |
| 0 | 47 | | SecretAttributes = secretAttributes; |
| | 48 | | CustomInit(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// An initialization method that performs custom operations like setting defaults |
| | 53 | | /// </summary> |
| | 54 | | partial void CustomInit(); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets the value of the secret. |
| | 58 | | /// </summary> |
| | 59 | | [JsonProperty(PropertyName = "value")] |
| 72 | 60 | | public string Value { get; set; } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// Gets or sets application specific metadata in the form of key-value |
| | 64 | | /// pairs. |
| | 65 | | /// </summary> |
| | 66 | | [JsonProperty(PropertyName = "tags")] |
| 72 | 67 | | public IDictionary<string, string> Tags { get; set; } |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets or sets type of the secret value such as a password. |
| | 71 | | /// </summary> |
| | 72 | | [JsonProperty(PropertyName = "contentType")] |
| 72 | 73 | | public string ContentType { get; set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets or sets the secret management attributes. |
| | 77 | | /// </summary> |
| | 78 | | [JsonProperty(PropertyName = "attributes")] |
| 72 | 79 | | public SecretAttributes SecretAttributes { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Validate the object. |
| | 83 | | /// </summary> |
| | 84 | | /// <exception cref="ValidationException"> |
| | 85 | | /// Thrown if validation fails |
| | 86 | | /// </exception> |
| | 87 | | public virtual void Validate() |
| | 88 | | { |
| 0 | 89 | | if (Value == null) |
| | 90 | | { |
| 0 | 91 | | throw new ValidationException(ValidationRules.CannotBeNull, "Value"); |
| | 92 | | } |
| 0 | 93 | | } |
| | 94 | | } |
| | 95 | | } |