< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Knowledge.QnAMaker\src\Generated\Models\WordAlterationsDTO.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 word alterations.
 21    /// </summary>
 22    public partial class WordAlterationsDTO
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the WordAlterationsDTO class.
 26        /// </summary>
 027        public WordAlterationsDTO()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the WordAlterationsDTO class.
 34        /// </summary>
 35        /// <param name="wordAlterations">Collection of word
 36        /// alterations.</param>
 037        public WordAlterationsDTO(IList<AlterationsDTO> wordAlterations)
 38        {
 039            WordAlterations = wordAlterations;
 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 collection of word alterations.
 50        /// </summary>
 51        [JsonProperty(PropertyName = "wordAlterations")]
 052        public IList<AlterationsDTO> WordAlterations { 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 (WordAlterations == null)
 63            {
 064                throw new ValidationException(ValidationRules.CannotBeNull, "WordAlterations");
 65            }
 066            if (WordAlterations != null)
 67            {
 068                foreach (var element in WordAlterations)
 69                {
 070                    if (element != null)
 71                    {
 072                        element.Validate();
 73                    }
 74                }
 75            }
 076        }
 77    }
 78}