|  |  | 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 MediaObject : CreativeWork | 
|  |  | 15 |  |     { | 
|  |  | 16 |  |         /// <summary> | 
|  |  | 17 |  |         /// Initializes a new instance of the MediaObject class. | 
|  |  | 18 |  |         /// </summary> | 
|  | 2 | 19 |  |         public MediaObject() | 
|  |  | 20 |  |         { | 
|  |  | 21 |  |             CustomInit(); | 
|  | 2 | 22 |  |         } | 
|  |  | 23 |  |  | 
|  |  | 24 |  |         /// <summary> | 
|  |  | 25 |  |         /// Initializes a new instance of the MediaObject 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 |  |         /// <param name="thumbnailUrl">The URL to a thumbnail of the | 
|  |  | 44 |  |         /// item.</param> | 
|  |  | 45 |  |         /// <param name="provider">The source of the creative work.</param> | 
|  |  | 46 |  |         /// <param name="contentUrl">Original URL to retrieve the source (file) | 
|  |  | 47 |  |         /// for the media object (e.g the source URL for the image).</param> | 
|  |  | 48 |  |         /// <param name="hostPageUrl">URL of the page that hosts the media | 
|  |  | 49 |  |         /// object.</param> | 
|  |  | 50 |  |         /// <param name="width">The width of the source media object, in | 
|  |  | 51 |  |         /// pixels.</param> | 
|  |  | 52 |  |         /// <param name="height">The height of the source media object, in | 
|  |  | 53 |  |         /// pixels.</param> | 
|  |  | 54 |  |         public MediaObject(string id = default(string), IList<ContractualRulesContractualRule> contractualRules = defaul | 
|  | 0 | 55 |  |             : base(id, contractualRules, webSearchUrl, name, url, image, description, entityPresentationInfo, bingId, th | 
|  |  | 56 |  |         { | 
|  | 0 | 57 |  |             ContentUrl = contentUrl; | 
|  | 0 | 58 |  |             HostPageUrl = hostPageUrl; | 
|  | 0 | 59 |  |             Width = width; | 
|  | 0 | 60 |  |             Height = height; | 
|  |  | 61 |  |             CustomInit(); | 
|  | 0 | 62 |  |         } | 
|  |  | 63 |  |  | 
|  |  | 64 |  |         /// <summary> | 
|  |  | 65 |  |         /// An initialization method that performs custom operations like setting defaults | 
|  |  | 66 |  |         /// </summary> | 
|  |  | 67 |  |         partial void CustomInit(); | 
|  |  | 68 |  |  | 
|  |  | 69 |  |         /// <summary> | 
|  |  | 70 |  |         /// Gets original URL to retrieve the source (file) for the media | 
|  |  | 71 |  |         /// object (e.g the source URL for the image). | 
|  |  | 72 |  |         /// </summary> | 
|  |  | 73 |  |         [JsonProperty(PropertyName = "contentUrl")] | 
|  | 0 | 74 |  |         public string ContentUrl { get; private set; } | 
|  |  | 75 |  |  | 
|  |  | 76 |  |         /// <summary> | 
|  |  | 77 |  |         /// Gets URL of the page that hosts the media object. | 
|  |  | 78 |  |         /// </summary> | 
|  |  | 79 |  |         [JsonProperty(PropertyName = "hostPageUrl")] | 
|  | 0 | 80 |  |         public string HostPageUrl { get; private set; } | 
|  |  | 81 |  |  | 
|  |  | 82 |  |         /// <summary> | 
|  |  | 83 |  |         /// Gets the width of the source media object, in pixels. | 
|  |  | 84 |  |         /// </summary> | 
|  |  | 85 |  |         [JsonProperty(PropertyName = "width")] | 
|  | 0 | 86 |  |         public int? Width { get; private set; } | 
|  |  | 87 |  |  | 
|  |  | 88 |  |         /// <summary> | 
|  |  | 89 |  |         /// Gets the height of the source media object, in pixels. | 
|  |  | 90 |  |         /// </summary> | 
|  |  | 91 |  |         [JsonProperty(PropertyName = "height")] | 
|  | 0 | 92 |  |         public int? Height { get; private set; } | 
|  |  | 93 |  |  | 
|  |  | 94 |  |         /// <summary> | 
|  |  | 95 |  |         /// Validate the object. | 
|  |  | 96 |  |         /// </summary> | 
|  |  | 97 |  |         /// <exception cref="Rest.ValidationException"> | 
|  |  | 98 |  |         /// Thrown if validation fails | 
|  |  | 99 |  |         /// </exception> | 
|  |  | 100 |  |         public override void Validate() | 
|  |  | 101 |  |         { | 
|  | 0 | 102 |  |             base.Validate(); | 
|  | 0 | 103 |  |         } | 
|  |  | 104 |  |     } | 
|  |  | 105 |  | } |