| | 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 Newtonsoft.Json; |
| | 10 | | using System.Collections; |
| | 11 | | using System.Collections.Generic; |
| | 12 | | using System.Linq; |
| | 13 | |
|
| | 14 | | public partial class Thing : Response |
| | 15 | | { |
| | 16 | | /// <summary> |
| | 17 | | /// Initializes a new instance of the Thing class. |
| | 18 | | /// </summary> |
| 8 | 19 | | public Thing() |
| | 20 | | { |
| | 21 | | CustomInit(); |
| 8 | 22 | | } |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the Thing class. |
| | 26 | | /// </summary> |
| | 27 | | /// <param name="id">A String identifier.</param> |
| | 28 | | /// <param name="contractualRules">A list of rules that you must adhere |
| | 29 | | /// to if you display the item.</param> |
| | 30 | | /// <param name="webSearchUrl">The URL To Bing's search result for this |
| | 31 | | /// item.</param> |
| | 32 | | /// <param name="name">The name of the thing represented by this |
| | 33 | | /// object.</param> |
| | 34 | | /// <param name="url">The URL to get more information about the thing |
| | 35 | | /// represented by this object.</param> |
| | 36 | | /// <param name="description">A short description of the item.</param> |
| | 37 | | /// <param name="entityPresentationInfo">Additional information about |
| | 38 | | /// the entity such as hints that you can use to determine the entity's |
| | 39 | | /// type. To determine the entity's type, use the entityScenario and |
| | 40 | | /// entityTypeHint fields.</param> |
| | 41 | | /// <param name="bingId">An ID that uniquely identifies this |
| | 42 | | /// item.</param> |
| | 43 | | public Thing(string id = default(string), IList<ContractualRulesContractualRule> contractualRules = default(ILis |
| 0 | 44 | | : base(id, contractualRules, webSearchUrl) |
| | 45 | | { |
| 0 | 46 | | Name = name; |
| 0 | 47 | | Url = url; |
| 0 | 48 | | Image = image; |
| 0 | 49 | | Description = description; |
| 0 | 50 | | EntityPresentationInfo = entityPresentationInfo; |
| 0 | 51 | | BingId = bingId; |
| | 52 | | CustomInit(); |
| 0 | 53 | | } |
| | 54 | |
|
| | 55 | | /// <summary> |
| | 56 | | /// An initialization method that performs custom operations like setting defaults |
| | 57 | | /// </summary> |
| | 58 | | partial void CustomInit(); |
| | 59 | |
|
| | 60 | | /// <summary> |
| | 61 | | /// Gets the name of the thing represented by this object. |
| | 62 | | /// </summary> |
| | 63 | | [JsonProperty(PropertyName = "name")] |
| 0 | 64 | | public string Name { get; private set; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets the URL to get more information about the thing represented by |
| | 68 | | /// this object. |
| | 69 | | /// </summary> |
| | 70 | | [JsonProperty(PropertyName = "url")] |
| 0 | 71 | | public string Url { get; private set; } |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// </summary> |
| | 75 | | [JsonProperty(PropertyName = "image")] |
| 4 | 76 | | public ImageObject Image { get; private set; } |
| | 77 | |
|
| | 78 | | /// <summary> |
| | 79 | | /// Gets a short description of the item. |
| | 80 | | /// </summary> |
| | 81 | | [JsonProperty(PropertyName = "description")] |
| 0 | 82 | | public string Description { get; private set; } |
| | 83 | |
|
| | 84 | | /// <summary> |
| | 85 | | /// Gets additional information about the entity such as hints that you |
| | 86 | | /// can use to determine the entity's type. To determine the entity's |
| | 87 | | /// type, use the entityScenario and entityTypeHint fields. |
| | 88 | | /// </summary> |
| | 89 | | [JsonProperty(PropertyName = "entityPresentationInfo")] |
| 0 | 90 | | public EntitiesEntityPresentationInfo EntityPresentationInfo { get; private set; } |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets an ID that uniquely identifies this item. |
| | 94 | | /// </summary> |
| | 95 | | [JsonProperty(PropertyName = "bingId")] |
| 0 | 96 | | public string BingId { get; private set; } |
| | 97 | |
|
| | 98 | | /// <summary> |
| | 99 | | /// Validate the object. |
| | 100 | | /// </summary> |
| | 101 | | /// <exception cref="Rest.ValidationException"> |
| | 102 | | /// Thrown if validation fails |
| | 103 | | /// </exception> |
| | 104 | | public virtual void Validate() |
| | 105 | | { |
| 0 | 106 | | if (Image != null) |
| | 107 | | { |
| 0 | 108 | | Image.Validate(); |
| | 109 | | } |
| 0 | 110 | | if (EntityPresentationInfo != null) |
| | 111 | | { |
| 0 | 112 | | EntityPresentationInfo.Validate(); |
| | 113 | | } |
| 0 | 114 | | } |
| | 115 | | } |
| | 116 | | } |