| | 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.Knowledge.QnAMaker.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Newtonsoft.Json; |
| | 15 | | using System.Linq; |
| | 16 | |
|
| | 17 | | /// <summary> |
| | 18 | | /// Active learning feedback record. |
| | 19 | | /// </summary> |
| | 20 | | public partial class FeedbackRecordDTO |
| | 21 | | { |
| | 22 | | /// <summary> |
| | 23 | | /// Initializes a new instance of the FeedbackRecordDTO class. |
| | 24 | | /// </summary> |
| 0 | 25 | | public FeedbackRecordDTO() |
| | 26 | | { |
| | 27 | | CustomInit(); |
| 0 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Initializes a new instance of the FeedbackRecordDTO class. |
| | 32 | | /// </summary> |
| | 33 | | /// <param name="userId">Unique identifier for the user.</param> |
| | 34 | | /// <param name="userQuestion">The suggested question being provided as |
| | 35 | | /// feedback.</param> |
| | 36 | | /// <param name="qnaId">The qnaId for which the suggested question is |
| | 37 | | /// provided as feedback.</param> |
| 0 | 38 | | public FeedbackRecordDTO(string userId = default(string), string userQuestion = default(string), int? qnaId = de |
| | 39 | | { |
| 0 | 40 | | UserId = userId; |
| 0 | 41 | | UserQuestion = userQuestion; |
| 0 | 42 | | QnaId = qnaId; |
| | 43 | | CustomInit(); |
| 0 | 44 | | } |
| | 45 | |
|
| | 46 | | /// <summary> |
| | 47 | | /// An initialization method that performs custom operations like setting defaults |
| | 48 | | /// </summary> |
| | 49 | | partial void CustomInit(); |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Gets or sets unique identifier for the user. |
| | 53 | | /// </summary> |
| | 54 | | [JsonProperty(PropertyName = "userId")] |
| 0 | 55 | | public string UserId { get; set; } |
| | 56 | |
|
| | 57 | | /// <summary> |
| | 58 | | /// Gets or sets the suggested question being provided as feedback. |
| | 59 | | /// </summary> |
| | 60 | | [JsonProperty(PropertyName = "userQuestion")] |
| 0 | 61 | | public string UserQuestion { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets or sets the qnaId for which the suggested question is provided |
| | 65 | | /// as feedback. |
| | 66 | | /// </summary> |
| | 67 | | [JsonProperty(PropertyName = "qnaId")] |
| 0 | 68 | | public int? QnaId { 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 (UserQuestion != null) |
| | 79 | | { |
| 0 | 80 | | if (UserQuestion.Length > 1000) |
| | 81 | | { |
| 0 | 82 | | throw new ValidationException(ValidationRules.MaxLength, "UserQuestion", 1000); |
| | 83 | | } |
| | 84 | | } |
| 0 | 85 | | } |
| | 86 | | } |
| | 87 | | } |