| | 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 | | /// A Custom Prebuilt model. |
| | 21 | | /// </summary> |
| | 22 | | public partial class CustomPrebuiltModel |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the CustomPrebuiltModel class. |
| | 26 | | /// </summary> |
| 157 | 27 | | public CustomPrebuiltModel() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 157 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the CustomPrebuiltModel 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 CustomPrebuiltModel(System.Guid id, string readableType, string name = default(string), int? typeId = def |
| | 48 | | { |
| 0 | 49 | | Id = id; |
| 0 | 50 | | Name = name; |
| 0 | 51 | | TypeId = typeId; |
| 0 | 52 | | ReadableType = readableType; |
| 0 | 53 | | CustomPrebuiltDomainName = customPrebuiltDomainName; |
| 0 | 54 | | CustomPrebuiltModelName = customPrebuiltModelName; |
| 0 | 55 | | Roles = roles; |
| | 56 | | CustomInit(); |
| 0 | 57 | | } |
| | 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")] |
| 1945 | 68 | | public System.Guid Id { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets or sets name of the Entity Model. |
| | 72 | | /// </summary> |
| | 73 | | [JsonProperty(PropertyName = "name")] |
| 0 | 74 | | 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")] |
| 0 | 80 | | 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")] |
| 198 | 91 | | public string ReadableType { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets the domain name. |
| | 95 | | /// </summary> |
| | 96 | | [JsonProperty(PropertyName = "customPrebuiltDomainName")] |
| 158 | 97 | | public string CustomPrebuiltDomainName { get; set; } |
| | 98 | |
|
| | 99 | | /// <summary> |
| | 100 | | /// Gets or sets the intent name or entity name. |
| | 101 | | /// </summary> |
| | 102 | | [JsonProperty(PropertyName = "customPrebuiltModelName")] |
| 0 | 103 | | public string CustomPrebuiltModelName { get; set; } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// </summary> |
| | 107 | | [JsonProperty(PropertyName = "roles")] |
| 120 | 108 | | public IList<EntityRole> Roles { 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 | | { |
| 0 | 118 | | if (ReadableType == null) |
| | 119 | | { |
| 0 | 120 | | throw new ValidationException(ValidationRules.CannotBeNull, "ReadableType"); |
| | 121 | | } |
| 0 | 122 | | } |
| | 123 | | } |
| | 124 | | } |