< Summary

Class:Microsoft.Azure.CognitiveServices.Search.ImageSearch.Models.Rating
Assembly:Microsoft.Azure.CognitiveServices.Search.BingImageSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingImageSearch\src\Generated\ImageSearch\Models\Rating.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:71
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_RatingValue()-0%100%
get_BestRating()-0%100%
Validate()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingImageSearch\src\Generated\ImageSearch\Models\Rating.cs

#LineLine coverage
 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
 7namespace Microsoft.Azure.CognitiveServices.Search.ImageSearch.Models
 8{
 9    using Newtonsoft.Json;
 10    using System.Linq;
 11
 12    /// <summary>
 13    /// Defines a rating.
 14    /// </summary>
 15    public partial class Rating : PropertiesItem
 16    {
 17        /// <summary>
 18        /// Initializes a new instance of the Rating class.
 19        /// </summary>
 020        public Rating()
 21        {
 22            CustomInit();
 023        }
 24
 25        /// <summary>
 26        /// Initializes a new instance of the Rating 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        public Rating(double ratingValue, string text = default(string), double? bestRating = default(double?))
 034            : base(text)
 35        {
 036            RatingValue = ratingValue;
 037            BestRating = bestRating;
 38            CustomInit();
 039        }
 40
 41        /// <summary>
 42        /// An initialization method that performs custom operations like setting defaults
 43        /// </summary>
 44        partial void CustomInit();
 45
 46        /// <summary>
 47        /// Gets or sets the mean (average) rating. The possible values are 1.0
 48        /// through 5.0.
 49        /// </summary>
 50        [JsonProperty(PropertyName = "ratingValue")]
 051        public double RatingValue { get; set; }
 52
 53        /// <summary>
 54        /// Gets the highest rated review. The possible values are 1.0 through
 55        /// 5.0.
 56        /// </summary>
 57        [JsonProperty(PropertyName = "bestRating")]
 058        public double? BestRating { get; private set; }
 59
 60        /// <summary>
 61        /// Validate the object.
 62        /// </summary>
 63        /// <exception cref="Rest.ValidationException">
 64        /// Thrown if validation fails
 65        /// </exception>
 66        public virtual void Validate()
 67        {
 68            //Nothing to validate
 069        }
 70    }
 71}