< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.Prediction
Assembly:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Training\src\Generated\Models\Prediction.cs
Covered lines:6
Uncovered lines:11
Coverable lines:17
Total lines:98
Line coverage:35.2% (6 of 17)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Probability()-100%100%
get_TagId()-100%100%
get_TagName()-100%100%
get_BoundingBox()-100%100%
get_TagType()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Training\src\Generated\Models\Prediction.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models
 12{
 13    using Newtonsoft.Json;
 14    using System.Linq;
 15
 16    /// <summary>
 17    /// Prediction result.
 18    /// </summary>
 19    public partial class Prediction
 20    {
 21        /// <summary>
 22        /// Initializes a new instance of the Prediction class.
 23        /// </summary>
 3824        public Prediction()
 25        {
 26            CustomInit();
 3827        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the Prediction class.
 31        /// </summary>
 32        /// <param name="probability">Probability of the tag.</param>
 33        /// <param name="tagId">Id of the predicted tag.</param>
 34        /// <param name="tagName">Name of the predicted tag.</param>
 35        /// <param name="boundingBox">Bounding box of the prediction.</param>
 36        /// <param name="tagType">Type of the predicted tag. Possible values
 37        /// include: 'Regular', 'Negative', 'GeneralProduct'</param>
 038        public Prediction(double probability = default(double), System.Guid tagId = default(System.Guid), string tagName
 39        {
 040            Probability = probability;
 041            TagId = tagId;
 042            TagName = tagName;
 043            BoundingBox = boundingBox;
 044            TagType = tagType;
 45            CustomInit();
 046        }
 47
 48        /// <summary>
 49        /// An initialization method that performs custom operations like setting defaults
 50        /// </summary>
 51        partial void CustomInit();
 52
 53        /// <summary>
 54        /// Gets probability of the tag.
 55        /// </summary>
 56        [JsonProperty(PropertyName = "probability")]
 5257        public double Probability { get; private set; }
 58
 59        /// <summary>
 60        /// Gets id of the predicted tag.
 61        /// </summary>
 62        [JsonProperty(PropertyName = "tagId")]
 4663        public System.Guid TagId { get; private set; }
 64
 65        /// <summary>
 66        /// Gets name of the predicted tag.
 67        /// </summary>
 68        [JsonProperty(PropertyName = "tagName")]
 4869        public string TagName { get; private set; }
 70
 71        /// <summary>
 72        /// Gets bounding box of the prediction.
 73        /// </summary>
 74        [JsonProperty(PropertyName = "boundingBox")]
 1475        public BoundingBox BoundingBox { get; private set; }
 76
 77        /// <summary>
 78        /// Gets type of the predicted tag. Possible values include: 'Regular',
 79        /// 'Negative', 'GeneralProduct'
 80        /// </summary>
 81        [JsonProperty(PropertyName = "tagType")]
 082        public string TagType { get; private set; }
 83
 84        /// <summary>
 85        /// Validate the object.
 86        /// </summary>
 87        /// <exception cref="Rest.ValidationException">
 88        /// Thrown if validation fails
 89        /// </exception>
 90        public virtual void Validate()
 91        {
 092            if (BoundingBox != null)
 93            {
 094                BoundingBox.Validate();
 95            }
 096        }
 97    }
 98}