| | 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 | |
|
| | 11 | | namespace 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 | | /// N-Depth Entity Extractor. |
| | 21 | | /// </summary> |
| | 22 | | public partial class NDepthEntityExtractor |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the NDepthEntityExtractor class. |
| | 26 | | /// </summary> |
| 17 | 27 | | public NDepthEntityExtractor() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 17 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the NDepthEntityExtractor 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> |
| 0 | 47 | | public NDepthEntityExtractor(System.Guid id, string readableType, string name = default(string), int? typeId = d |
| | 48 | | { |
| 0 | 49 | | Id = id; |
| 0 | 50 | | Name = name; |
| 0 | 51 | | TypeId = typeId; |
| 0 | 52 | | ReadableType = readableType; |
| 0 | 53 | | Roles = roles; |
| 0 | 54 | | CustomPrebuiltDomainName = customPrebuiltDomainName; |
| 0 | 55 | | CustomPrebuiltModelName = customPrebuiltModelName; |
| 0 | 56 | | Children = children; |
| | 57 | | CustomInit(); |
| 0 | 58 | | } |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// An initialization method that performs custom operations like setting defaults |
| | 62 | | /// </summary> |
| | 63 | | partial void CustomInit(); |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Gets or sets the ID of the Entity Model. |
| | 67 | | /// </summary> |
| | 68 | | [JsonProperty(PropertyName = "id")] |
| 23 | 69 | | public System.Guid Id { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// Gets or sets name of the Entity Model. |
| | 73 | | /// </summary> |
| | 74 | | [JsonProperty(PropertyName = "name")] |
| 27 | 75 | | public string Name { get; set; } |
| | 76 | |
|
| | 77 | | /// <summary> |
| | 78 | | /// Gets or sets the type ID of the Entity Model. |
| | 79 | | /// </summary> |
| | 80 | | [JsonProperty(PropertyName = "typeId")] |
| 0 | 81 | | public int? TypeId { get; set; } |
| | 82 | |
|
| | 83 | | /// <summary> |
| | 84 | | /// Gets or sets possible values include: 'Entity Extractor', 'Child |
| | 85 | | /// Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical |
| | 86 | | /// Child Entity Extractor', 'Composite Entity Extractor', 'List Entity |
| | 87 | | /// Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', |
| | 88 | | /// 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', |
| | 89 | | /// 'Regex Entity Extractor' |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "readableType")] |
| 19 | 92 | | public string ReadableType { get; set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// </summary> |
| | 96 | | [JsonProperty(PropertyName = "roles")] |
| 32 | 97 | | public IList<EntityRole> Roles { get; set; } |
| | 98 | |
|
| | 99 | | /// <summary> |
| | 100 | | /// Gets or sets the domain name. |
| | 101 | | /// </summary> |
| | 102 | | [JsonProperty(PropertyName = "customPrebuiltDomainName")] |
| 0 | 103 | | public string CustomPrebuiltDomainName { get; set; } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// Gets or sets the intent name or entity name. |
| | 107 | | /// </summary> |
| | 108 | | [JsonProperty(PropertyName = "customPrebuiltModelName")] |
| 0 | 109 | | public string CustomPrebuiltModelName { get; set; } |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// </summary> |
| | 113 | | [JsonProperty(PropertyName = "children")] |
| 39 | 114 | | public IList<ChildEntity> Children { get; set; } |
| | 115 | |
|
| | 116 | | /// <summary> |
| | 117 | | /// Validate the object. |
| | 118 | | /// </summary> |
| | 119 | | /// <exception cref="ValidationException"> |
| | 120 | | /// Thrown if validation fails |
| | 121 | | /// </exception> |
| | 122 | | public virtual void Validate() |
| | 123 | | { |
| 0 | 124 | | if (ReadableType == null) |
| | 125 | | { |
| 0 | 126 | | throw new ValidationException(ValidationRules.CannotBeNull, "ReadableType"); |
| | 127 | | } |
| 0 | 128 | | if (Children != null) |
| | 129 | | { |
| 0 | 130 | | foreach (var element in Children) |
| | 131 | | { |
| 0 | 132 | | if (element != null) |
| | 133 | | { |
| 0 | 134 | | element.Validate(); |
| | 135 | | } |
| | 136 | | } |
| | 137 | | } |
| 0 | 138 | | } |
| | 139 | | } |
| | 140 | | } |