| | 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 | | /// An application model info. |
| | 21 | | /// </summary> |
| | 22 | | public partial class ModelInfoResponse |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the ModelInfoResponse class. |
| | 26 | | /// </summary> |
| 0 | 27 | | public ModelInfoResponse() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the ModelInfoResponse 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> |
| | 45 | | /// <param name="subLists">List of sublists.</param> |
| | 46 | | /// <param name="customPrebuiltDomainName">The domain name.</param> |
| | 47 | | /// <param name="customPrebuiltModelName">The intent name or entity |
| | 48 | | /// name.</param> |
| | 49 | | /// <param name="regexPattern">The Regular Expression entity |
| | 50 | | /// pattern.</param> |
| 0 | 51 | | public ModelInfoResponse(System.Guid id, string readableType, string name = default(string), int? typeId = defau |
| | 52 | | { |
| 0 | 53 | | Id = id; |
| 0 | 54 | | Name = name; |
| 0 | 55 | | TypeId = typeId; |
| 0 | 56 | | ReadableType = readableType; |
| 0 | 57 | | Roles = roles; |
| 0 | 58 | | Children = children; |
| 0 | 59 | | SubLists = subLists; |
| 0 | 60 | | CustomPrebuiltDomainName = customPrebuiltDomainName; |
| 0 | 61 | | CustomPrebuiltModelName = customPrebuiltModelName; |
| 0 | 62 | | RegexPattern = regexPattern; |
| 0 | 63 | | ExplicitList = explicitList; |
| | 64 | | CustomInit(); |
| 0 | 65 | | } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// An initialization method that performs custom operations like setting defaults |
| | 69 | | /// </summary> |
| | 70 | | partial void CustomInit(); |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets or sets the ID of the Entity Model. |
| | 74 | | /// </summary> |
| | 75 | | [JsonProperty(PropertyName = "id")] |
| 0 | 76 | | public System.Guid Id { get; set; } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Gets or sets name of the Entity Model. |
| | 80 | | /// </summary> |
| | 81 | | [JsonProperty(PropertyName = "name")] |
| 0 | 82 | | public string Name { get; set; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets or sets the type ID of the Entity Model. |
| | 86 | | /// </summary> |
| | 87 | | [JsonProperty(PropertyName = "typeId")] |
| 0 | 88 | | public int? TypeId { get; set; } |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets or sets possible values include: 'Entity Extractor', 'Child |
| | 92 | | /// Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical |
| | 93 | | /// Child Entity Extractor', 'Composite Entity Extractor', 'List Entity |
| | 94 | | /// Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', |
| | 95 | | /// 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', |
| | 96 | | /// 'Regex Entity Extractor' |
| | 97 | | /// </summary> |
| | 98 | | [JsonProperty(PropertyName = "readableType")] |
| 0 | 99 | | public string ReadableType { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// </summary> |
| | 103 | | [JsonProperty(PropertyName = "roles")] |
| 0 | 104 | | public IList<EntityRole> Roles { get; set; } |
| | 105 | |
|
| | 106 | | /// <summary> |
| | 107 | | /// Gets or sets list of child entities. |
| | 108 | | /// </summary> |
| | 109 | | [JsonProperty(PropertyName = "children")] |
| 0 | 110 | | public IList<ChildEntity> Children { get; set; } |
| | 111 | |
|
| | 112 | | /// <summary> |
| | 113 | | /// Gets or sets list of sublists. |
| | 114 | | /// </summary> |
| | 115 | | [JsonProperty(PropertyName = "subLists")] |
| 0 | 116 | | public IList<SubClosedListResponse> SubLists { get; set; } |
| | 117 | |
|
| | 118 | | /// <summary> |
| | 119 | | /// Gets or sets the domain name. |
| | 120 | | /// </summary> |
| | 121 | | [JsonProperty(PropertyName = "customPrebuiltDomainName")] |
| 0 | 122 | | public string CustomPrebuiltDomainName { get; set; } |
| | 123 | |
|
| | 124 | | /// <summary> |
| | 125 | | /// Gets or sets the intent name or entity name. |
| | 126 | | /// </summary> |
| | 127 | | [JsonProperty(PropertyName = "customPrebuiltModelName")] |
| 0 | 128 | | public string CustomPrebuiltModelName { get; set; } |
| | 129 | |
|
| | 130 | | /// <summary> |
| | 131 | | /// Gets or sets the Regular Expression entity pattern. |
| | 132 | | /// </summary> |
| | 133 | | [JsonProperty(PropertyName = "regexPattern")] |
| 0 | 134 | | public string RegexPattern { get; set; } |
| | 135 | |
|
| | 136 | | /// <summary> |
| | 137 | | /// </summary> |
| | 138 | | [JsonProperty(PropertyName = "explicitList")] |
| 0 | 139 | | public IList<ExplicitListItem> ExplicitList { get; set; } |
| | 140 | |
|
| | 141 | | /// <summary> |
| | 142 | | /// Validate the object. |
| | 143 | | /// </summary> |
| | 144 | | /// <exception cref="ValidationException"> |
| | 145 | | /// Thrown if validation fails |
| | 146 | | /// </exception> |
| | 147 | | public virtual void Validate() |
| | 148 | | { |
| 0 | 149 | | if (ReadableType == null) |
| | 150 | | { |
| 0 | 151 | | throw new ValidationException(ValidationRules.CannotBeNull, "ReadableType"); |
| | 152 | | } |
| 0 | 153 | | if (Children != null) |
| | 154 | | { |
| 0 | 155 | | foreach (var element in Children) |
| | 156 | | { |
| 0 | 157 | | if (element != null) |
| | 158 | | { |
| 0 | 159 | | element.Validate(); |
| | 160 | | } |
| | 161 | | } |
| | 162 | | } |
| 0 | 163 | | } |
| | 164 | | } |
| | 165 | | } |