< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Geo()-0%100%
get_RoutablePoint()-0%100%
get_Address()-0%100%
get_Telephone()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingLocalSearch\src\Generated\LocalSearch\Models\Place.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 Newtonsoft.Json;
 10    using System.Collections;
 11    using System.Collections.Generic;
 12    using System.Linq;
 13
 14    /// <summary>
 15    /// Defines information about a local entity, such as a restaurant or
 16    /// hotel.
 17    /// </summary>
 18    public partial class Place : Thing
 19    {
 20        /// <summary>
 21        /// Initializes a new instance of the Place class.
 22        /// </summary>
 023        public Place()
 24        {
 25            CustomInit();
 026        }
 27
 28        /// <summary>
 29        /// Initializes a new instance of the Place class.
 30        /// </summary>
 31        /// <param name="id">A String identifier.</param>
 32        /// <param name="readLink">The URL that returns this resource.</param>
 33        /// <param name="webSearchUrl">The URL to Bing's search result for this
 34        /// item.</param>
 35        /// <param name="name">The name of the thing represented by this
 36        /// object.</param>
 37        /// <param name="url">The URL to get more information about the thing
 38        /// represented by this object.</param>
 39        /// <param name="entityPresentationInfo">Additional information about
 40        /// the entity such as hints that you can use to determine the entity's
 41        /// type. To determine the entity's type, use the entityScenario and
 42        /// entityTypeHint fields.</param>
 43        /// <param name="address">The postal address of where the entity is
 44        /// located</param>
 45        /// <param name="telephone">The entity's telephone number</param>
 46        public Place(string id = default(string), string readLink = default(string), string webSearchUrl = default(strin
 047            : base(id, readLink, webSearchUrl, potentialAction, immediateAction, preferredClickthroughUrl, adaptiveCard,
 48        {
 049            Geo = geo;
 050            RoutablePoint = routablePoint;
 051            Address = address;
 052            Telephone = telephone;
 53            CustomInit();
 054        }
 55
 56        /// <summary>
 57        /// An initialization method that performs custom operations like setting defaults
 58        /// </summary>
 59        partial void CustomInit();
 60
 61        /// <summary>
 62        /// </summary>
 63        [JsonProperty(PropertyName = "geo")]
 064        public GeoCoordinates Geo { get; private set; }
 65
 66        /// <summary>
 67        /// </summary>
 68        [JsonProperty(PropertyName = "routablePoint")]
 069        public GeoCoordinates RoutablePoint { get; private set; }
 70
 71        /// <summary>
 72        /// Gets the postal address of where the entity is located
 73        /// </summary>
 74        [JsonProperty(PropertyName = "address")]
 075        public PostalAddress Address { get; private set; }
 76
 77        /// <summary>
 78        /// Gets the entity's telephone number
 79        /// </summary>
 80        [JsonProperty(PropertyName = "telephone")]
 081        public string Telephone { get; private set; }
 82
 83        /// <summary>
 84        /// Validate the object.
 85        /// </summary>
 86        /// <exception cref="Rest.ValidationException">
 87        /// Thrown if validation fails
 88        /// </exception>
 89        public override void Validate()
 90        {
 091            base.Validate();
 092            if (Geo != null)
 93            {
 094                Geo.Validate();
 95            }
 096            if (RoutablePoint != null)
 97            {
 098                RoutablePoint.Validate();
 99            }
 0100            if (Address != null)
 101            {
 0102                Address.Validate();
 103            }
 0104        }
 105    }
 106}