< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Models.EntityExtractor
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\EntityExtractor.cs
Covered lines:5
Uncovered lines:16
Coverable lines:21
Total lines:124
Line coverage:23.8% (5 of 21)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Id()-100%100%
get_Name()-0%100%
get_TypeId()-0%100%
get_ReadableType()-0%100%
get_Roles()-100%100%
get_CustomPrebuiltDomainName()-100%100%
get_CustomPrebuiltModelName()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\EntityExtractor.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    /// Entity Extractor.
 21    /// </summary>
 22    public partial class EntityExtractor
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the EntityExtractor class.
 26        /// </summary>
 2127        public EntityExtractor()
 28        {
 29            CustomInit();
 2130        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the EntityExtractor 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="customPrebuiltDomainName">The domain name.</param>
 45        /// <param name="customPrebuiltModelName">The intent name or entity
 46        /// name.</param>
 047        public EntityExtractor(System.Guid id, string readableType, string name = default(string), int? typeId = default
 48        {
 049            Id = id;
 050            Name = name;
 051            TypeId = typeId;
 052            ReadableType = readableType;
 053            Roles = roles;
 054            CustomPrebuiltDomainName = customPrebuiltDomainName;
 055            CustomPrebuiltModelName = customPrebuiltModelName;
 56            CustomInit();
 057        }
 58
 59        /// <summary>
 60        /// An initialization method that performs custom operations like setting defaults
 61        /// </summary>
 62        partial void CustomInit();
 63
 64        /// <summary>
 65        /// Gets or sets the ID of the Entity Model.
 66        /// </summary>
 67        [JsonProperty(PropertyName = "id")]
 2268        public System.Guid Id { get; set; }
 69
 70        /// <summary>
 71        /// Gets or sets name of the Entity Model.
 72        /// </summary>
 73        [JsonProperty(PropertyName = "name")]
 074        public string Name { get; set; }
 75
 76        /// <summary>
 77        /// Gets or sets the type ID of the Entity Model.
 78        /// </summary>
 79        [JsonProperty(PropertyName = "typeId")]
 080        public int? TypeId { get; set; }
 81
 82        /// <summary>
 83        /// Gets or sets possible values include: 'Entity Extractor', 'Child
 84        /// Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical
 85        /// Child Entity Extractor', 'Composite Entity Extractor', 'List Entity
 86        /// Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier',
 87        /// 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor',
 88        /// 'Regex Entity Extractor'
 89        /// </summary>
 90        [JsonProperty(PropertyName = "readableType")]
 091        public string ReadableType { get; set; }
 92
 93        /// <summary>
 94        /// </summary>
 95        [JsonProperty(PropertyName = "roles")]
 4296        public IList<EntityRole> Roles { get; set; }
 97
 98        /// <summary>
 99        /// Gets or sets the domain name.
 100        /// </summary>
 101        [JsonProperty(PropertyName = "customPrebuiltDomainName")]
 22102        public string CustomPrebuiltDomainName { get; set; }
 103
 104        /// <summary>
 105        /// Gets or sets the intent name or entity name.
 106        /// </summary>
 107        [JsonProperty(PropertyName = "customPrebuiltModelName")]
 0108        public string CustomPrebuiltModelName { get; set; }
 109
 110        /// <summary>
 111        /// Validate the object.
 112        /// </summary>
 113        /// <exception cref="ValidationException">
 114        /// Thrown if validation fails
 115        /// </exception>
 116        public virtual void Validate()
 117        {
 0118            if (ReadableType == null)
 119            {
 0120                throw new ValidationException(ValidationRules.CannotBeNull, "ReadableType");
 121            }
 0122        }
 123    }
 124}