| | 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.LocalSearch.Models |
| | 8 | | { |
| | 9 | | using Newtonsoft.Json; |
| | 10 | | using System.Collections; |
| | 11 | | using System.Collections.Generic; |
| | 12 | | using System.Linq; |
| | 13 | |
|
| | 14 | | /// <summary> |
| | 15 | | /// The most generic kind of creative work, including books, movies, |
| | 16 | | /// photographs, software programs, etc. |
| | 17 | | /// </summary> |
| | 18 | | public partial class CreativeWork : Thing |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Initializes a new instance of the CreativeWork class. |
| | 22 | | /// </summary> |
| 0 | 23 | | public CreativeWork() |
| | 24 | | { |
| | 25 | | CustomInit(); |
| 0 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the CreativeWork class. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="id">A String identifier.</param> |
| | 32 | | /// <param name="readLink">The URL that returns this resource.</param> |
| | 33 | | /// <param name="webSearchUrl">The URL to Bing's search result for this |
| | 34 | | /// item.</param> |
| | 35 | | /// <param name="name">The name of the thing represented by this |
| | 36 | | /// object.</param> |
| | 37 | | /// <param name="url">The URL to get more information about the thing |
| | 38 | | /// represented by this object.</param> |
| | 39 | | /// <param name="entityPresentationInfo">Additional information about |
| | 40 | | /// the entity such as hints that you can use to determine the entity's |
| | 41 | | /// type. To determine the entity's type, use the entityScenario and |
| | 42 | | /// entityTypeHint fields.</param> |
| | 43 | | /// <param name="thumbnailUrl">The URL to a thumbnail of the |
| | 44 | | /// item.</param> |
| | 45 | | /// <param name="about">For internal use only.</param> |
| | 46 | | /// <param name="mentions">For internal use only.</param> |
| | 47 | | /// <param name="provider">The source of the creative work.</param> |
| | 48 | | /// <param name="text">Text content of this creative work</param> |
| | 49 | | public CreativeWork(string id = default(string), string readLink = default(string), string webSearchUrl = defaul |
| 0 | 50 | | : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard, |
| | 51 | | { |
| 0 | 52 | | ThumbnailUrl = thumbnailUrl; |
| 0 | 53 | | About = about; |
| 0 | 54 | | Mentions = mentions; |
| 0 | 55 | | Provider = provider; |
| 0 | 56 | | Creator = creator; |
| 0 | 57 | | Text = text; |
| 0 | 58 | | DiscussionUrl = discussionUrl; |
| 0 | 59 | | CommentCount = commentCount; |
| 0 | 60 | | MainEntity = mainEntity; |
| 0 | 61 | | HeadLine = headLine; |
| 0 | 62 | | CopyrightHolder = copyrightHolder; |
| 0 | 63 | | CopyrightYear = copyrightYear; |
| 0 | 64 | | Disclaimer = disclaimer; |
| 0 | 65 | | IsAccessibleForFree = isAccessibleForFree; |
| 0 | 66 | | Genre = genre; |
| 0 | 67 | | IsFamilyFriendly = isFamilyFriendly; |
| | 68 | | CustomInit(); |
| 0 | 69 | | } |
| | 70 | |
|
| | 71 | | /// <summary> |
| | 72 | | /// An initialization method that performs custom operations like setting defaults |
| | 73 | | /// </summary> |
| | 74 | | partial void CustomInit(); |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets the URL to a thumbnail of the item. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "thumbnailUrl")] |
| 0 | 80 | | public string ThumbnailUrl { get; private set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets for internal use only. |
| | 84 | | /// </summary> |
| | 85 | | [JsonProperty(PropertyName = "about")] |
| 0 | 86 | | public IList<Thing> About { get; private set; } |
| | 87 | |
|
| | 88 | | /// <summary> |
| | 89 | | /// Gets for internal use only. |
| | 90 | | /// </summary> |
| | 91 | | [JsonProperty(PropertyName = "mentions")] |
| 0 | 92 | | public IList<Thing> Mentions { get; private set; } |
| | 93 | |
|
| | 94 | | /// <summary> |
| | 95 | | /// Gets the source of the creative work. |
| | 96 | | /// </summary> |
| | 97 | | [JsonProperty(PropertyName = "provider")] |
| 0 | 98 | | public IList<Thing> Provider { get; private set; } |
| | 99 | |
|
| | 100 | | /// <summary> |
| | 101 | | /// </summary> |
| | 102 | | [JsonProperty(PropertyName = "creator")] |
| 0 | 103 | | public Thing Creator { get; private set; } |
| | 104 | |
|
| | 105 | | /// <summary> |
| | 106 | | /// Gets text content of this creative work |
| | 107 | | /// </summary> |
| | 108 | | [JsonProperty(PropertyName = "text")] |
| 0 | 109 | | public string Text { get; private set; } |
| | 110 | |
|
| | 111 | | /// <summary> |
| | 112 | | /// </summary> |
| | 113 | | [JsonProperty(PropertyName = "discussionUrl")] |
| 0 | 114 | | public string DiscussionUrl { get; private set; } |
| | 115 | |
|
| | 116 | | /// <summary> |
| | 117 | | /// </summary> |
| | 118 | | [JsonProperty(PropertyName = "commentCount")] |
| 0 | 119 | | public int? CommentCount { get; private set; } |
| | 120 | |
|
| | 121 | | /// <summary> |
| | 122 | | /// </summary> |
| | 123 | | [JsonProperty(PropertyName = "mainEntity")] |
| 0 | 124 | | public Thing MainEntity { get; private set; } |
| | 125 | |
|
| | 126 | | /// <summary> |
| | 127 | | /// </summary> |
| | 128 | | [JsonProperty(PropertyName = "headLine")] |
| 0 | 129 | | public string HeadLine { get; private set; } |
| | 130 | |
|
| | 131 | | /// <summary> |
| | 132 | | /// </summary> |
| | 133 | | [JsonProperty(PropertyName = "copyrightHolder")] |
| 0 | 134 | | public Thing CopyrightHolder { get; private set; } |
| | 135 | |
|
| | 136 | | /// <summary> |
| | 137 | | /// </summary> |
| | 138 | | [JsonProperty(PropertyName = "copyrightYear")] |
| 0 | 139 | | public int? CopyrightYear { get; private set; } |
| | 140 | |
|
| | 141 | | /// <summary> |
| | 142 | | /// </summary> |
| | 143 | | [JsonProperty(PropertyName = "disclaimer")] |
| 0 | 144 | | public string Disclaimer { get; private set; } |
| | 145 | |
|
| | 146 | | /// <summary> |
| | 147 | | /// </summary> |
| | 148 | | [JsonProperty(PropertyName = "isAccessibleForFree")] |
| 0 | 149 | | public bool? IsAccessibleForFree { get; private set; } |
| | 150 | |
|
| | 151 | | /// <summary> |
| | 152 | | /// </summary> |
| | 153 | | [JsonProperty(PropertyName = "genre")] |
| 0 | 154 | | public IList<string> Genre { get; private set; } |
| | 155 | |
|
| | 156 | | /// <summary> |
| | 157 | | /// </summary> |
| | 158 | | [JsonProperty(PropertyName = "isFamilyFriendly")] |
| 0 | 159 | | public bool? IsFamilyFriendly { get; private set; } |
| | 160 | |
|
| | 161 | | /// <summary> |
| | 162 | | /// Validate the object. |
| | 163 | | /// </summary> |
| | 164 | | /// <exception cref="Rest.ValidationException"> |
| | 165 | | /// Thrown if validation fails |
| | 166 | | /// </exception> |
| | 167 | | public override void Validate() |
| | 168 | | { |
| 0 | 169 | | base.Validate(); |
| 0 | 170 | | if (About != null) |
| | 171 | | { |
| 0 | 172 | | foreach (var element in About) |
| | 173 | | { |
| 0 | 174 | | if (element != null) |
| | 175 | | { |
| 0 | 176 | | element.Validate(); |
| | 177 | | } |
| | 178 | | } |
| | 179 | | } |
| 0 | 180 | | if (Mentions != null) |
| | 181 | | { |
| 0 | 182 | | foreach (var element1 in Mentions) |
| | 183 | | { |
| 0 | 184 | | if (element1 != null) |
| | 185 | | { |
| 0 | 186 | | element1.Validate(); |
| | 187 | | } |
| | 188 | | } |
| | 189 | | } |
| 0 | 190 | | if (Provider != null) |
| | 191 | | { |
| 0 | 192 | | foreach (var element2 in Provider) |
| | 193 | | { |
| 0 | 194 | | if (element2 != null) |
| | 195 | | { |
| 0 | 196 | | element2.Validate(); |
| | 197 | | } |
| | 198 | | } |
| | 199 | | } |
| 0 | 200 | | if (Creator != null) |
| | 201 | | { |
| 0 | 202 | | Creator.Validate(); |
| | 203 | | } |
| 0 | 204 | | if (MainEntity != null) |
| | 205 | | { |
| 0 | 206 | | MainEntity.Validate(); |
| | 207 | | } |
| 0 | 208 | | if (CopyrightHolder != null) |
| | 209 | | { |
| 0 | 210 | | CopyrightHolder.Validate(); |
| | 211 | | } |
| 0 | 212 | | } |
| | 213 | | } |
| | 214 | | } |