< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.ImageRegionCreateEntry
Assembly:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Training\src\Generated\Models\ImageRegionCreateEntry.cs
Covered lines:14
Uncovered lines:3
Coverable lines:17
Total lines:102
Line coverage:82.3% (14 of 17)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ImageId()-100%100%
get_TagId()-100%100%
get_Left()-100%100%
get_Top()-100%100%
get_Width()-100%100%
get_Height()-100%100%
Validate()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Training\src\Generated\Models\ImageRegionCreateEntry.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    /// Entry associating a region to an image.
 18    /// </summary>
 19    public partial class ImageRegionCreateEntry
 20    {
 21        /// <summary>
 22        /// Initializes a new instance of the ImageRegionCreateEntry class.
 23        /// </summary>
 024        public ImageRegionCreateEntry()
 25        {
 26            CustomInit();
 027        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the ImageRegionCreateEntry class.
 31        /// </summary>
 32        /// <param name="imageId">Id of the image.</param>
 33        /// <param name="tagId">Id of the tag associated with this
 34        /// region.</param>
 35        /// <param name="left">Coordinate of the left boundary.</param>
 36        /// <param name="top">Coordinate of the top boundary.</param>
 37        /// <param name="width">Width.</param>
 38        /// <param name="height">Height.</param>
 239        public ImageRegionCreateEntry(System.Guid imageId, System.Guid tagId, double left, double top, double width, dou
 40        {
 241            ImageId = imageId;
 242            TagId = tagId;
 243            Left = left;
 244            Top = top;
 245            Width = width;
 246            Height = height;
 47            CustomInit();
 248        }
 49
 50        /// <summary>
 51        /// An initialization method that performs custom operations like setting defaults
 52        /// </summary>
 53        partial void CustomInit();
 54
 55        /// <summary>
 56        /// Gets or sets id of the image.
 57        /// </summary>
 58        [JsonProperty(PropertyName = "imageId")]
 459        public System.Guid ImageId { get; set; }
 60
 61        /// <summary>
 62        /// Gets or sets id of the tag associated with this region.
 63        /// </summary>
 64        [JsonProperty(PropertyName = "tagId")]
 465        public System.Guid TagId { get; set; }
 66
 67        /// <summary>
 68        /// Gets or sets coordinate of the left boundary.
 69        /// </summary>
 70        [JsonProperty(PropertyName = "left")]
 471        public double Left { get; set; }
 72
 73        /// <summary>
 74        /// Gets or sets coordinate of the top boundary.
 75        /// </summary>
 76        [JsonProperty(PropertyName = "top")]
 477        public double Top { get; set; }
 78
 79        /// <summary>
 80        /// Gets or sets width.
 81        /// </summary>
 82        [JsonProperty(PropertyName = "width")]
 483        public double Width { get; set; }
 84
 85        /// <summary>
 86        /// Gets or sets height.
 87        /// </summary>
 88        [JsonProperty(PropertyName = "height")]
 489        public double Height { get; set; }
 90
 91        /// <summary>
 92        /// Validate the object.
 93        /// </summary>
 94        /// <exception cref="Rest.ValidationException">
 95        /// Thrown if validation fails
 96        /// </exception>
 97        public virtual void Validate()
 98        {
 99            //Nothing to validate
 0100        }
 101    }
 102}