< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Models.CompositeEntityExtractor
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\CompositeEntityExtractor.cs
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:125
Line coverage:0% (0 of 23)
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_Id()-0%100%
get_Name()-0%100%
get_TypeId()-0%100%
get_ReadableType()-0%100%
get_Roles()-0%100%
get_Children()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\CompositeEntityExtractor.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.Language.LUIS.Authoring.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    /// A Composite Entity Extractor.
 21    /// </summary>
 22    public partial class CompositeEntityExtractor
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the CompositeEntityExtractor class.
 26        /// </summary>
 027        public CompositeEntityExtractor()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the CompositeEntityExtractor class.
 34        /// </summary>
 35        /// <param name="id">The ID of the Entity Model.</param>
 36        /// <param name="readableType">Possible values include: 'Entity
 37        /// Extractor', 'Child Entity Extractor', 'Hierarchical Entity
 38        /// Extractor', 'Hierarchical Child Entity Extractor', 'Composite
 39        /// Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity
 40        /// Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor',
 41        /// 'Closed List Entity Extractor', 'Regex Entity Extractor'</param>
 42        /// <param name="name">Name of the Entity Model.</param>
 43        /// <param name="typeId">The type ID of the Entity Model.</param>
 44        /// <param name="children">List of child entities.</param>
 045        public CompositeEntityExtractor(System.Guid id, string readableType, string name = default(string), int? typeId 
 46        {
 047            Id = id;
 048            Name = name;
 049            TypeId = typeId;
 050            ReadableType = readableType;
 051            Roles = roles;
 052            Children = children;
 53            CustomInit();
 054        }
 55
 56        /// <summary>
 57        /// An initialization method that performs custom operations like setting defaults
 58        /// </summary>
 59        partial void CustomInit();
 60
 61        /// <summary>
 62        /// Gets or sets the ID of the Entity Model.
 63        /// </summary>
 64        [JsonProperty(PropertyName = "id")]
 065        public System.Guid Id { get; set; }
 66
 67        /// <summary>
 68        /// Gets or sets name of the Entity Model.
 69        /// </summary>
 70        [JsonProperty(PropertyName = "name")]
 071        public string Name { get; set; }
 72
 73        /// <summary>
 74        /// Gets or sets the type ID of the Entity Model.
 75        /// </summary>
 76        [JsonProperty(PropertyName = "typeId")]
 077        public int? TypeId { get; set; }
 78
 79        /// <summary>
 80        /// Gets or sets possible values include: 'Entity Extractor', 'Child
 81        /// Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical
 82        /// Child Entity Extractor', 'Composite Entity Extractor', 'List Entity
 83        /// Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier',
 84        /// 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor',
 85        /// 'Regex Entity Extractor'
 86        /// </summary>
 87        [JsonProperty(PropertyName = "readableType")]
 088        public string ReadableType { get; set; }
 89
 90        /// <summary>
 91        /// </summary>
 92        [JsonProperty(PropertyName = "roles")]
 093        public IList<EntityRole> Roles { get; set; }
 94
 95        /// <summary>
 96        /// Gets or sets list of child entities.
 97        /// </summary>
 98        [JsonProperty(PropertyName = "children")]
 099        public IList<ChildEntity> Children { get; set; }
 100
 101        /// <summary>
 102        /// Validate the object.
 103        /// </summary>
 104        /// <exception cref="ValidationException">
 105        /// Thrown if validation fails
 106        /// </exception>
 107        public virtual void Validate()
 108        {
 0109            if (ReadableType == null)
 110            {
 0111                throw new ValidationException(ValidationRules.CannotBeNull, "ReadableType");
 112            }
 0113            if (Children != null)
 114            {
 0115                foreach (var element in Children)
 116                {
 0117                    if (element != null)
 118                    {
 0119                        element.Validate();
 120                    }
 121                }
 122            }
 0123        }
 124    }
 125}