| | 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.ImageSearch.Models |
| | 8 | | { |
| | 9 | | using Newtonsoft.Json; |
| | 10 | | using System.Linq; |
| | 11 | |
|
| | 12 | | /// <summary> |
| | 13 | | /// Defines the metrics that indicate how well an item was rated by others. |
| | 14 | | /// </summary> |
| | 15 | | public partial class AggregateRating : Rating |
| | 16 | | { |
| | 17 | | /// <summary> |
| | 18 | | /// Initializes a new instance of the AggregateRating class. |
| | 19 | | /// </summary> |
| 0 | 20 | | public AggregateRating() |
| | 21 | | { |
| | 22 | | CustomInit(); |
| 0 | 23 | | } |
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// Initializes a new instance of the AggregateRating class. |
| | 27 | | /// </summary> |
| | 28 | | /// <param name="ratingValue">The mean (average) rating. The possible |
| | 29 | | /// values are 1.0 through 5.0.</param> |
| | 30 | | /// <param name="text">Text representation of an item.</param> |
| | 31 | | /// <param name="bestRating">The highest rated review. The possible |
| | 32 | | /// values are 1.0 through 5.0.</param> |
| | 33 | | /// <param name="reviewCount">The number of times the recipe has been |
| | 34 | | /// rated or reviewed.</param> |
| | 35 | | public AggregateRating(double ratingValue, string text = default(string), double? bestRating = default(double?), |
| 0 | 36 | | : base(ratingValue, text, bestRating) |
| | 37 | | { |
| 0 | 38 | | ReviewCount = reviewCount; |
| | 39 | | CustomInit(); |
| 0 | 40 | | } |
| | 41 | |
|
| | 42 | | /// <summary> |
| | 43 | | /// An initialization method that performs custom operations like setting defaults |
| | 44 | | /// </summary> |
| | 45 | | partial void CustomInit(); |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Gets the number of times the recipe has been rated or reviewed. |
| | 49 | | /// </summary> |
| | 50 | | [JsonProperty(PropertyName = "reviewCount")] |
| 0 | 51 | | public int? ReviewCount { get; private set; } |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Validate the object. |
| | 55 | | /// </summary> |
| | 56 | | /// <exception cref="Rest.ValidationException"> |
| | 57 | | /// Thrown if validation fails |
| | 58 | | /// </exception> |
| | 59 | | public override void Validate() |
| | 60 | | { |
| 0 | 61 | | base.Validate(); |
| 0 | 62 | | } |
| | 63 | | } |
| | 64 | | } |