| | | 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.NewsSearch.Models |
| | | 8 | | { |
| | | 9 | | using Newtonsoft.Json; |
| | | 10 | | using System.Collections; |
| | | 11 | | using System.Collections.Generic; |
| | | 12 | | using System.Linq; |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Defines a news article. |
| | | 16 | | /// </summary> |
| | | 17 | | public partial class NewsArticle : Article |
| | | 18 | | { |
| | | 19 | | /// <summary> |
| | | 20 | | /// Initializes a new instance of the NewsArticle class. |
| | | 21 | | /// </summary> |
| | 20 | 22 | | public NewsArticle() |
| | | 23 | | { |
| | | 24 | | CustomInit(); |
| | 20 | 25 | | } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// Initializes a new instance of the NewsArticle class. |
| | | 29 | | /// </summary> |
| | | 30 | | /// <param name="id">A String identifier.</param> |
| | | 31 | | /// <param name="webSearchUrl">The URL To Bing's search result for this |
| | | 32 | | /// item.</param> |
| | | 33 | | /// <param name="name">The name of the thing represented by this |
| | | 34 | | /// object.</param> |
| | | 35 | | /// <param name="url">The URL to get more information about the thing |
| | | 36 | | /// represented by this object.</param> |
| | | 37 | | /// <param name="image">An image of the item.</param> |
| | | 38 | | /// <param name="description">A short description of the item.</param> |
| | | 39 | | /// <param name="alternateName">An alias for the item</param> |
| | | 40 | | /// <param name="bingId">An ID that uniquely identifies this |
| | | 41 | | /// item.</param> |
| | | 42 | | /// <param name="thumbnailUrl">The URL to a thumbnail of the |
| | | 43 | | /// item.</param> |
| | | 44 | | /// <param name="provider">The source of the creative work.</param> |
| | | 45 | | /// <param name="datePublished">The date on which the CreativeWork was |
| | | 46 | | /// published.</param> |
| | | 47 | | /// <param name="video">A video of the item.</param> |
| | | 48 | | /// <param name="wordCount">The number of words in the text of the |
| | | 49 | | /// Article.</param> |
| | | 50 | | /// <param name="category">The news category that the article belongs |
| | | 51 | | /// to. For example, Sports. If the news category cannot be determined, |
| | | 52 | | /// the article does not include this field.</param> |
| | | 53 | | /// <param name="headline">A Boolean value that indicates whether the |
| | | 54 | | /// news article is a headline. If true, the article is a headline. The |
| | | 55 | | /// article includes this field only for news categories requests that |
| | | 56 | | /// do not specify the category query parameter.</param> |
| | | 57 | | /// <param name="clusteredArticles">A list of related news |
| | | 58 | | /// articles.</param> |
| | | 59 | | public NewsArticle(string id = default(string), string webSearchUrl = default(string), string name = default(str |
| | 0 | 60 | | : base(id, webSearchUrl, name, url, image, description, alternateName, bingId, thumbnailUrl, provider, dateP |
| | | 61 | | { |
| | 0 | 62 | | Category = category; |
| | 0 | 63 | | Headline = headline; |
| | 0 | 64 | | ClusteredArticles = clusteredArticles; |
| | | 65 | | CustomInit(); |
| | 0 | 66 | | } |
| | | 67 | | |
| | | 68 | | /// <summary> |
| | | 69 | | /// An initialization method that performs custom operations like setting defaults |
| | | 70 | | /// </summary> |
| | | 71 | | partial void CustomInit(); |
| | | 72 | | |
| | | 73 | | /// <summary> |
| | | 74 | | /// Gets the news category that the article belongs to. For example, |
| | | 75 | | /// Sports. If the news category cannot be determined, the article does |
| | | 76 | | /// not include this field. |
| | | 77 | | /// </summary> |
| | | 78 | | [JsonProperty(PropertyName = "category")] |
| | 22 | 79 | | public string Category { get; private set; } |
| | | 80 | | |
| | | 81 | | /// <summary> |
| | | 82 | | /// Gets a Boolean value that indicates whether the news article is a |
| | | 83 | | /// headline. If true, the article is a headline. The article includes |
| | | 84 | | /// this field only for news categories requests that do not specify |
| | | 85 | | /// the category query parameter. |
| | | 86 | | /// </summary> |
| | | 87 | | [JsonProperty(PropertyName = "headline")] |
| | 0 | 88 | | public bool? Headline { get; private set; } |
| | | 89 | | |
| | | 90 | | /// <summary> |
| | | 91 | | /// Gets a list of related news articles. |
| | | 92 | | /// </summary> |
| | | 93 | | [JsonProperty(PropertyName = "clusteredArticles")] |
| | 0 | 94 | | public IList<NewsArticle> ClusteredArticles { get; private set; } |
| | | 95 | | |
| | | 96 | | } |
| | | 97 | | } |