< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction.Models.PredictionModel
Assembly:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Prediction\src\Generated\Models\PredictionModel.cs
Covered lines:7
Uncovered lines:10
Coverable lines:17
Total lines:98
Line coverage:41.1% (7 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()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Prediction\src\Generated\Models\PredictionModel.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.Prediction.Models
 12{
 13    using Newtonsoft.Json;
 14    using System.Linq;
 15
 16    /// <summary>
 17    /// Prediction result.
 18    /// </summary>
 19    public partial class PredictionModel
 20    {
 21        /// <summary>
 22        /// Initializes a new instance of the PredictionModel class.
 23        /// </summary>
 4824        public PredictionModel()
 25        {
 26            CustomInit();
 4827        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the PredictionModel 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 PredictionModel(double probability = default(double), System.Guid tagId = default(System.Guid), string ta
 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")]
 9657        public double Probability { get; private set; }
 58
 59        /// <summary>
 60        /// Gets id of the predicted tag.
 61        /// </summary>
 62        [JsonProperty(PropertyName = "tagId")]
 9663        public System.Guid TagId { get; private set; }
 64
 65        /// <summary>
 66        /// Gets name of the predicted tag.
 67        /// </summary>
 68        [JsonProperty(PropertyName = "tagName")]
 9669        public string TagName { get; private set; }
 70
 71        /// <summary>
 72        /// Gets bounding box of the prediction.
 73        /// </summary>
 74        [JsonProperty(PropertyName = "boundingBox")]
 24075        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")]
 9682        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}