| | 1 | | // <auto-generated> |
| | 2 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 3 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 4 | | // regenerated. |
| | 5 | | // </auto-generated> |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.CognitiveServices.Search.EntitySearch.Models |
| | 8 | | { |
| | 9 | | using Microsoft.Rest; |
| | 10 | | using Newtonsoft.Json; |
| | 11 | | using System.Collections; |
| | 12 | | using System.Collections.Generic; |
| | 13 | | using System.Linq; |
| | 14 | |
|
| | 15 | | /// <summary> |
| | 16 | | /// Defines additional information about an entity such as type hints. |
| | 17 | | /// </summary> |
| | 18 | | public partial class EntitiesEntityPresentationInfo |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Initializes a new instance of the EntitiesEntityPresentationInfo |
| | 22 | | /// class. |
| | 23 | | /// </summary> |
| 2 | 24 | | public EntitiesEntityPresentationInfo() |
| | 25 | | { |
| | 26 | | CustomInit(); |
| 2 | 27 | | } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// Initializes a new instance of the EntitiesEntityPresentationInfo |
| | 31 | | /// class. |
| | 32 | | /// </summary> |
| | 33 | | /// <param name="entityScenario">The supported scenario. Possible |
| | 34 | | /// values include: 'DominantEntity', 'DisambiguationItem', |
| | 35 | | /// 'ListItem'</param> |
| | 36 | | /// <param name="entityTypeHints">A list of hints that indicate the |
| | 37 | | /// entity's type. The list could contain a single hint such as Movie |
| | 38 | | /// or a list of hints such as Place, LocalBusiness, Restaurant. Each |
| | 39 | | /// successive hint in the array narrows the entity's type.</param> |
| | 40 | | /// <param name="entityTypeDisplayHint">A display version of the entity |
| | 41 | | /// hint. For example, if entityTypeHints is Artist, this field may be |
| | 42 | | /// set to American Singer.</param> |
| 0 | 43 | | public EntitiesEntityPresentationInfo(string entityScenario, IList<string> entityTypeHints = default(IList<strin |
| | 44 | | { |
| 0 | 45 | | EntityScenario = entityScenario; |
| 0 | 46 | | EntityTypeHints = entityTypeHints; |
| 0 | 47 | | EntityTypeDisplayHint = entityTypeDisplayHint; |
| | 48 | | CustomInit(); |
| 0 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// An initialization method that performs custom operations like setting defaults |
| | 53 | | /// </summary> |
| | 54 | | partial void CustomInit(); |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets the supported scenario. Possible values include: |
| | 58 | | /// 'DominantEntity', 'DisambiguationItem', 'ListItem' |
| | 59 | | /// </summary> |
| | 60 | | [JsonProperty(PropertyName = "entityScenario")] |
| 0 | 61 | | public string EntityScenario { get; set; } |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets a list of hints that indicate the entity's type. The list |
| | 65 | | /// could contain a single hint such as Movie or a list of hints such |
| | 66 | | /// as Place, LocalBusiness, Restaurant. Each successive hint in the |
| | 67 | | /// array narrows the entity's type. |
| | 68 | | /// </summary> |
| | 69 | | [JsonProperty(PropertyName = "entityTypeHints")] |
| 4 | 70 | | public IList<string> EntityTypeHints { get; private set; } |
| | 71 | |
|
| | 72 | | /// <summary> |
| | 73 | | /// Gets a display version of the entity hint. For example, if |
| | 74 | | /// entityTypeHints is Artist, this field may be set to American |
| | 75 | | /// Singer. |
| | 76 | | /// </summary> |
| | 77 | | [JsonProperty(PropertyName = "entityTypeDisplayHint")] |
| 0 | 78 | | public string EntityTypeDisplayHint { get; private set; } |
| | 79 | |
|
| | 80 | | /// <summary> |
| | 81 | | /// Validate the object. |
| | 82 | | /// </summary> |
| | 83 | | /// <exception cref="ValidationException"> |
| | 84 | | /// Thrown if validation fails |
| | 85 | | /// </exception> |
| | 86 | | public virtual void Validate() |
| | 87 | | { |
| 0 | 88 | | if (EntityScenario == null) |
| | 89 | | { |
| 0 | 90 | | throw new ValidationException(ValidationRules.CannotBeNull, "EntityScenario"); |
| | 91 | | } |
| 0 | 92 | | } |
| | 93 | | } |
| | 94 | | } |