| | 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 | | /// Prebuilt Entity Extractor. |
| | 21 | | /// </summary> |
| | 22 | | public partial class PrebuiltEntityExtractor |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the PrebuiltEntityExtractor class. |
| | 26 | | /// </summary> |
| 28 | 27 | | public PrebuiltEntityExtractor() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 28 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the PrebuiltEntityExtractor 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> |
| 0 | 44 | | public PrebuiltEntityExtractor(System.Guid id, string readableType, string name = default(string), int? typeId = |
| | 45 | | { |
| 0 | 46 | | Id = id; |
| 0 | 47 | | Name = name; |
| 0 | 48 | | TypeId = typeId; |
| 0 | 49 | | ReadableType = readableType; |
| 0 | 50 | | Roles = roles; |
| | 51 | | CustomInit(); |
| 0 | 52 | | } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// An initialization method that performs custom operations like setting defaults |
| | 56 | | /// </summary> |
| | 57 | | partial void CustomInit(); |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// Gets or sets the ID of the Entity Model. |
| | 61 | | /// </summary> |
| | 62 | | [JsonProperty(PropertyName = "id")] |
| 55 | 63 | | public System.Guid Id { get; set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Gets or sets name of the Entity Model. |
| | 67 | | /// </summary> |
| | 68 | | [JsonProperty(PropertyName = "name")] |
| 30 | 69 | | public string Name { get; set; } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// Gets or sets the type ID of the Entity Model. |
| | 73 | | /// </summary> |
| | 74 | | [JsonProperty(PropertyName = "typeId")] |
| 0 | 75 | | public int? TypeId { get; set; } |
| | 76 | |
|
| | 77 | | /// <summary> |
| | 78 | | /// Gets or sets possible values include: 'Entity Extractor', 'Child |
| | 79 | | /// Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical |
| | 80 | | /// Child Entity Extractor', 'Composite Entity Extractor', 'List Entity |
| | 81 | | /// Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', |
| | 82 | | /// 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', |
| | 83 | | /// 'Regex Entity Extractor' |
| | 84 | | /// </summary> |
| | 85 | | [JsonProperty(PropertyName = "readableType")] |
| 29 | 86 | | public string ReadableType { get; set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// </summary> |
| | 90 | | [JsonProperty(PropertyName = "roles")] |
| 56 | 91 | | public IList<EntityRole> Roles { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Validate the object. |
| | 95 | | /// </summary> |
| | 96 | | /// <exception cref="ValidationException"> |
| | 97 | | /// Thrown if validation fails |
| | 98 | | /// </exception> |
| | 99 | | public virtual void Validate() |
| | 100 | | { |
| 0 | 101 | | if (ReadableType == null) |
| | 102 | | { |
| 0 | 103 | | throw new ValidationException(ValidationRules.CannotBeNull, "ReadableType"); |
| | 104 | | } |
| 0 | 105 | | } |
| | 106 | | } |
| | 107 | | } |