< Summary

Class:Microsoft.Azure.CognitiveServices.Search.LocalSearch.Models.Places
Assembly:Microsoft.Azure.CognitiveServices.Search.BingLocalSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingLocalSearch\src\Generated\LocalSearch\Models\Places.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:84
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

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.BingLocalSearch\src\Generated\LocalSearch\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.LocalSearch.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="readLink">The URL that returns this resource.</param>
 35        /// <param name="webSearchUrl">The URL to Bing's search result for this
 36        /// item.</param>
 37        /// <param name="totalEstimatedMatches">The estimated number of
 38        /// webpages that are relevant to the query. Use this number along with
 39        /// the count and offset query parameters to page the results.</param>
 40        public Places(IList<Thing> value, string id = default(string), string readLink = default(string), string webSear
 041            : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard,
 42        {
 043            Value = value;
 44            CustomInit();
 045        }
 46
 47        /// <summary>
 48        /// An initialization method that performs custom operations like setting defaults
 49        /// </summary>
 50        partial void CustomInit();
 51
 52        /// <summary>
 53        /// Gets or sets a list of local entities, such as restaurants or
 54        /// hotels.
 55        /// </summary>
 56        [JsonProperty(PropertyName = "value")]
 057        public IList<Thing> Value { get; set; }
 58
 59        /// <summary>
 60        /// Validate the object.
 61        /// </summary>
 62        /// <exception cref="ValidationException">
 63        /// Thrown if validation fails
 64        /// </exception>
 65        public override void Validate()
 66        {
 067            base.Validate();
 068            if (Value == null)
 69            {
 070                throw new ValidationException(ValidationRules.CannotBeNull, "Value");
 71            }
 072            if (Value != null)
 73            {
 074                foreach (var element in Value)
 75                {
 076                    if (element != null)
 77                    {
 078                        element.Validate();
 79                    }
 80                }
 81            }
 082        }
 83    }
 84}