< Summary

Class:Microsoft.Azure.CognitiveServices.Search.WebSearch.Models.Places
Assembly:Microsoft.Azure.CognitiveServices.Search.BingWebSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\Places.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:73
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingWebSearch\src\Generated\WebSearch\Models\Places.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.WebSearch.Models
 8{
 9    using Microsoft.Rest;
 10    using Newtonsoft.Json;
 11    using System.Collections;
 12    using System.Collections.Generic;
 13    using System.Linq;
 14
 15    /// <summary>
 16    /// Defines a local entity answer.
 17    /// </summary>
 18    public partial class Places : SearchResultsAnswer
 19    {
 20        /// <summary>
 21        /// Initializes a new instance of the Places class.
 22        /// </summary>
 023        public Places()
 24        {
 25            CustomInit();
 026        }
 27
 28        /// <summary>
 29        /// Initializes a new instance of the Places class.
 30        /// </summary>
 31        /// <param name="value">A list of local entities, such as restaurants
 32        /// or hotels.</param>
 33        /// <param name="id">A String identifier.</param>
 34        /// <param name="webSearchUrl">The URL To Bing's search result for this
 35        /// item.</param>
 36        /// <param name="totalEstimatedMatches">The estimated number of
 37        /// webpages that are relevant to the query. Use this number along with
 38        /// the count and offset query parameters to page the results.</param>
 39        public Places(IList<Thing> value, string id = default(string), string webSearchUrl = default(string), IList<Quer
 040            : base(id, webSearchUrl, followUpQueries, queryContext, totalEstimatedMatches, isFamilyFriendly)
 41        {
 042            Value = value;
 43            CustomInit();
 044        }
 45
 46        /// <summary>
 47        /// An initialization method that performs custom operations like setting defaults
 48        /// </summary>
 49        partial void CustomInit();
 50
 51        /// <summary>
 52        /// Gets or sets a list of local entities, such as restaurants or
 53        /// hotels.
 54        /// </summary>
 55        [JsonProperty(PropertyName = "value")]
 056        public IList<Thing> Value { get; set; }
 57
 58        /// <summary>
 59        /// Validate the object.
 60        /// </summary>
 61        /// <exception cref="ValidationException">
 62        /// Thrown if validation fails
 63        /// </exception>
 64        public override void Validate()
 65        {
 066            base.Validate();
 067            if (Value == null)
 68            {
 069                throw new ValidationException(ValidationRules.CannotBeNull, "Value");
 70            }
 071        }
 72    }
 73}