| | 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.CognitiveServices.Vision.Face.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 | | /// Request body for updating a snapshot, with a combination of user |
| | 21 | | /// defined apply scope and user specified data. |
| | 22 | | /// </summary> |
| | 23 | | public partial class UpdateSnapshotRequest |
| | 24 | | { |
| | 25 | | /// <summary> |
| | 26 | | /// Initializes a new instance of the UpdateSnapshotRequest class. |
| | 27 | | /// </summary> |
| 0 | 28 | | public UpdateSnapshotRequest() |
| | 29 | | { |
| | 30 | | CustomInit(); |
| 0 | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Initializes a new instance of the UpdateSnapshotRequest class. |
| | 35 | | /// </summary> |
| | 36 | | /// <param name="applyScope">Array of the target Face subscription ids |
| | 37 | | /// for the snapshot, specified by the user who created the snapshot |
| | 38 | | /// when calling Snapshot - Take. For each snapshot, only subscriptions |
| | 39 | | /// included in the applyScope of Snapshot - Take can apply it.</param> |
| | 40 | | /// <param name="userData">User specified data about the snapshot for |
| | 41 | | /// any purpose. Length should not exceed 16KB.</param> |
| 0 | 42 | | public UpdateSnapshotRequest(IList<System.Guid> applyScope = default(IList<System.Guid>), string userData = defa |
| | 43 | | { |
| 0 | 44 | | ApplyScope = applyScope; |
| 0 | 45 | | UserData = userData; |
| | 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 array of the target Face subscription ids for the |
| | 56 | | /// snapshot, specified by the user who created the snapshot when |
| | 57 | | /// calling Snapshot - Take. For each snapshot, only subscriptions |
| | 58 | | /// included in the applyScope of Snapshot - Take can apply it. |
| | 59 | | /// </summary> |
| | 60 | | [JsonProperty(PropertyName = "applyScope")] |
| 0 | 61 | | public IList<System.Guid> ApplyScope { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets or sets user specified data about the snapshot for any |
| | 65 | | /// purpose. Length should not exceed 16KB. |
| | 66 | | /// </summary> |
| | 67 | | [JsonProperty(PropertyName = "userData")] |
| 0 | 68 | | public string UserData { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Validate the object. |
| | 72 | | /// </summary> |
| | 73 | | /// <exception cref="ValidationException"> |
| | 74 | | /// Thrown if validation fails |
| | 75 | | /// </exception> |
| | 76 | | public virtual void Validate() |
| | 77 | | { |
| 0 | 78 | | if (UserData != null) |
| | 79 | | { |
| 0 | 80 | | if (UserData.Length > 16384) |
| | 81 | | { |
| 0 | 82 | | throw new ValidationException(ValidationRules.MaxLength, "UserData", 16384); |
| | 83 | | } |
| | 84 | | } |
| 0 | 85 | | } |
| | 86 | | } |
| | 87 | | } |