< Summary

Class:Microsoft.Azure.CognitiveServices.Search.VisualSearch.Models.VisualSearchRequest
Assembly:Microsoft.Azure.CognitiveServices.Search.BingVisualSearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVisualSearch\src\Generated\Models\VisualSearchRequest.cs
Covered lines:8
Uncovered lines:3
Coverable lines:11
Total lines:73
Line coverage:72.7% (8 of 11)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingVisualSearch\src\Generated\Models\VisualSearchRequest.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.VisualSearch.Models
 8{
 9    using Newtonsoft.Json;
 10    using System.Linq;
 11
 12    /// <summary>
 13    /// A JSON object that contains information about the image to get insights
 14    /// of. Specify this object only in a knowledgeRequest form data.
 15    /// </summary>
 16    public partial class VisualSearchRequest
 17    {
 18        /// <summary>
 19        /// Initializes a new instance of the VisualSearchRequest class.
 20        /// </summary>
 221        public VisualSearchRequest()
 22        {
 23            CustomInit();
 224        }
 25
 26        /// <summary>
 27        /// Initializes a new instance of the VisualSearchRequest class.
 28        /// </summary>
 29        /// <param name="imageInfo">A JSON object that identities the image to
 30        /// get insights of.</param>
 31        /// <param name="knowledgeRequest">A JSON object containing information
 32        /// about the request, such as filters, or a description.</param>
 633        public VisualSearchRequest(ImageInfo imageInfo = default(ImageInfo), KnowledgeRequest knowledgeRequest = default
 34        {
 635            ImageInfo = imageInfo;
 636            KnowledgeRequest = knowledgeRequest;
 37            CustomInit();
 638        }
 39
 40        /// <summary>
 41        /// An initialization method that performs custom operations like setting defaults
 42        /// </summary>
 43        partial void CustomInit();
 44
 45        /// <summary>
 46        /// Gets or sets a JSON object that identities the image to get
 47        /// insights of.
 48        /// </summary>
 49        [JsonProperty(PropertyName = "imageInfo")]
 1450        public ImageInfo ImageInfo { get; set; }
 51
 52        /// <summary>
 53        /// Gets or sets a JSON object containing information about the
 54        /// request, such as filters, or a description.
 55        /// </summary>
 56        [JsonProperty(PropertyName = "knowledgeRequest")]
 1457        public KnowledgeRequest KnowledgeRequest { get; set; }
 58
 59        /// <summary>
 60        /// Validate the object.
 61        /// </summary>
 62        /// <exception cref="Rest.ValidationException">
 63        /// Thrown if validation fails
 64        /// </exception>
 65        public virtual void Validate()
 66        {
 067            if (ImageInfo != null)
 68            {
 069                ImageInfo.Validate();
 70            }
 071        }
 72    }
 73}