< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Alterations()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Knowledge.QnAMaker\src\Generated\Models\AlterationsDTO.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.Collections;
 16    using System.Collections.Generic;
 17    using System.Linq;
 18
 19    /// <summary>
 20    /// Collection of words that are synonyms.
 21    /// </summary>
 22    public partial class AlterationsDTO
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the AlterationsDTO class.
 26        /// </summary>
 027        public AlterationsDTO()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the AlterationsDTO class.
 34        /// </summary>
 35        /// <param name="alterations">Words that are synonymous with each
 36        /// other.</param>
 037        public AlterationsDTO(IList<string> alterations)
 38        {
 039            Alterations = alterations;
 40            CustomInit();
 041        }
 42
 43        /// <summary>
 44        /// An initialization method that performs custom operations like setting defaults
 45        /// </summary>
 46        partial void CustomInit();
 47
 48        /// <summary>
 49        /// Gets or sets words that are synonymous with each other.
 50        /// </summary>
 51        [JsonProperty(PropertyName = "alterations")]
 052        public IList<string> Alterations { get; set; }
 53
 54        /// <summary>
 55        /// Validate the object.
 56        /// </summary>
 57        /// <exception cref="ValidationException">
 58        /// Thrown if validation fails
 59        /// </exception>
 60        public virtual void Validate()
 61        {
 062            if (Alterations == null)
 63            {
 064                throw new ValidationException(ValidationRules.CannotBeNull, "Alterations");
 65            }
 066        }
 67    }
 68}