< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.ImageUrlCreateEntry
Assembly:Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Training\src\Generated\Models\ImageUrlCreateEntry.cs
Covered lines:8
Uncovered lines:9
Coverable lines:17
Total lines:86
Line coverage:47% (8 of 17)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Url()-100%100%
get_TagIds()-100%100%
get_Regions()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.CustomVision.Training\src\Generated\Models\ImageUrlCreateEntry.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 Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Collections;
 16    using System.Collections.Generic;
 17    using System.Linq;
 18
 19    public partial class ImageUrlCreateEntry
 20    {
 21        /// <summary>
 22        /// Initializes a new instance of the ImageUrlCreateEntry class.
 23        /// </summary>
 024        public ImageUrlCreateEntry()
 25        {
 26            CustomInit();
 027        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the ImageUrlCreateEntry class.
 31        /// </summary>
 32        /// <param name="url">Url of the image.</param>
 433        public ImageUrlCreateEntry(string url, IList<System.Guid> tagIds = default(IList<System.Guid>), IList<Region> re
 34        {
 435            Url = url;
 436            TagIds = tagIds;
 437            Regions = regions;
 38            CustomInit();
 439        }
 40
 41        /// <summary>
 42        /// An initialization method that performs custom operations like setting defaults
 43        /// </summary>
 44        partial void CustomInit();
 45
 46        /// <summary>
 47        /// Gets or sets url of the image.
 48        /// </summary>
 49        [JsonProperty(PropertyName = "url")]
 850        public string Url { get; set; }
 51
 52        /// <summary>
 53        /// </summary>
 54        [JsonProperty(PropertyName = "tagIds")]
 855        public IList<System.Guid> TagIds { get; set; }
 56
 57        /// <summary>
 58        /// </summary>
 59        [JsonProperty(PropertyName = "regions")]
 860        public IList<Region> Regions { get; set; }
 61
 62        /// <summary>
 63        /// Validate the object.
 64        /// </summary>
 65        /// <exception cref="ValidationException">
 66        /// Thrown if validation fails
 67        /// </exception>
 68        public virtual void Validate()
 69        {
 070            if (Url == null)
 71            {
 072                throw new ValidationException(ValidationRules.CannotBeNull, "Url");
 73            }
 074            if (Regions != null)
 75            {
 076                foreach (var element in Regions)
 77                {
 078                    if (element != null)
 79                    {
 080                        element.Validate();
 81                    }
 82                }
 83            }
 084        }
 85    }
 86}