| | 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 Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// The base child entity type. |
| | 20 | | /// </summary> |
| | 21 | | public partial class ChildEntity |
| | 22 | | { |
| | 23 | | /// <summary> |
| | 24 | | /// Initializes a new instance of the ChildEntity class. |
| | 25 | | /// </summary> |
| 5 | 26 | | public ChildEntity() |
| | 27 | | { |
| | 28 | | CustomInit(); |
| 5 | 29 | | } |
| | 30 | |
|
| | 31 | | /// <summary> |
| | 32 | | /// Initializes a new instance of the ChildEntity class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="id">The ID (GUID) belonging to a child entity.</param> |
| | 35 | | /// <param name="name">The name of a child entity.</param> |
| | 36 | | /// <param name="instanceOf">Instance of Model.</param> |
| | 37 | | /// <param name="typeId">The type ID of the Entity Model.</param> |
| | 38 | | /// <param name="readableType">Possible values include: 'Entity |
| | 39 | | /// Extractor', 'Child Entity Extractor', 'Hierarchical Entity |
| | 40 | | /// Extractor', 'Hierarchical Child Entity Extractor', 'Composite |
| | 41 | | /// Entity Extractor', 'List Entity Extractor', 'Prebuilt Entity |
| | 42 | | /// Extractor', 'Intent Classifier', 'Pattern.Any Entity Extractor', |
| | 43 | | /// 'Closed List Entity Extractor', 'Regex Entity Extractor'</param> |
| | 44 | | /// <param name="children">List of children</param> |
| 0 | 45 | | public ChildEntity(System.Guid id, string name = default(string), string instanceOf = default(string), int? type |
| | 46 | | { |
| 0 | 47 | | Id = id; |
| 0 | 48 | | Name = name; |
| 0 | 49 | | InstanceOf = instanceOf; |
| 0 | 50 | | TypeId = typeId; |
| 0 | 51 | | ReadableType = readableType; |
| 0 | 52 | | Children = children; |
| | 53 | | CustomInit(); |
| 0 | 54 | | } |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// An initialization method that performs custom operations like setting defaults |
| | 58 | | /// </summary> |
| | 59 | | partial void CustomInit(); |
| | 60 | |
|
| | 61 | | /// <summary> |
| | 62 | | /// Gets or sets the ID (GUID) belonging to a child entity. |
| | 63 | | /// </summary> |
| | 64 | | [JsonProperty(PropertyName = "id")] |
| 6 | 65 | | public System.Guid Id { get; set; } |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets or sets the name of a child entity. |
| | 69 | | /// </summary> |
| | 70 | | [JsonProperty(PropertyName = "name")] |
| 9 | 71 | | public string Name { get; set; } |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Gets or sets instance of Model. |
| | 75 | | /// </summary> |
| | 76 | | [JsonProperty(PropertyName = "instanceOf")] |
| 0 | 77 | | public string InstanceOf { get; set; } |
| | 78 | |
|
| | 79 | | /// <summary> |
| | 80 | | /// Gets or sets the type ID of the Entity Model. |
| | 81 | | /// </summary> |
| | 82 | | [JsonProperty(PropertyName = "typeId")] |
| 0 | 83 | | public int? TypeId { get; set; } |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// Gets or sets possible values include: 'Entity Extractor', 'Child |
| | 87 | | /// Entity Extractor', 'Hierarchical Entity Extractor', 'Hierarchical |
| | 88 | | /// Child Entity Extractor', 'Composite Entity Extractor', 'List Entity |
| | 89 | | /// Extractor', 'Prebuilt Entity Extractor', 'Intent Classifier', |
| | 90 | | /// 'Pattern.Any Entity Extractor', 'Closed List Entity Extractor', |
| | 91 | | /// 'Regex Entity Extractor' |
| | 92 | | /// </summary> |
| | 93 | | [JsonProperty(PropertyName = "readableType")] |
| 0 | 94 | | public string ReadableType { get; set; } |
| | 95 | |
|
| | 96 | | /// <summary> |
| | 97 | | /// Gets or sets list of children |
| | 98 | | /// </summary> |
| | 99 | | [JsonProperty(PropertyName = "children")] |
| 10 | 100 | | public IList<ChildEntity> Children { get; set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Validate the object. |
| | 104 | | /// </summary> |
| | 105 | | /// <exception cref="Rest.ValidationException"> |
| | 106 | | /// Thrown if validation fails |
| | 107 | | /// </exception> |
| | 108 | | public virtual void Validate() |
| | 109 | | { |
| 0 | 110 | | if (Children != null) |
| | 111 | | { |
| 0 | 112 | | foreach (var element in Children) |
| | 113 | | { |
| 0 | 114 | | if (element != null) |
| | 115 | | { |
| 0 | 116 | | element.Validate(); |
| | 117 | | } |
| | 118 | | } |
| | 119 | | } |
| 0 | 120 | | } |
| | 121 | | } |
| | 122 | | } |