< Summary

Class:Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker.Models.FeedbackRecordDTO
Assembly:Microsoft.Azure.CognitiveServices.Knowledge.QnAMaker
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Knowledge.QnAMaker\src\Generated\Models\FeedbackRecordDTO.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:87
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_UserId()-0%100%
get_UserQuestion()-0%100%
get_QnaId()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Knowledge.QnAMaker\src\Generated\Models\FeedbackRecordDTO.cs

#LineLine coverage
 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
 11namespace 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>
 025        public FeedbackRecordDTO()
 26        {
 27            CustomInit();
 028        }
 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>
 038        public FeedbackRecordDTO(string userId = default(string), string userQuestion = default(string), int? qnaId = de
 39        {
 040            UserId = userId;
 041            UserQuestion = userQuestion;
 042            QnaId = qnaId;
 43            CustomInit();
 044        }
 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")]
 055        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")]
 061        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")]
 068        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        {
 078            if (UserQuestion != null)
 79            {
 080                if (UserQuestion.Length > 1000)
 81                {
 082                    throw new ValidationException(ValidationRules.MaxLength, "UserQuestion", 1000);
 83                }
 84            }
 085        }
 86    }
 87}