< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.Face.Models.GroupRequest
Assembly:Microsoft.Azure.CognitiveServices.Vision.Face
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\GroupRequest.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:76
Line coverage:0% (0 of 12)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\GroupRequest.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.Face.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    /// <summary>
 20    /// Request body for group request.
 21    /// </summary>
 22    public partial class GroupRequest
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the GroupRequest class.
 26        /// </summary>
 027        public GroupRequest()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the GroupRequest class.
 34        /// </summary>
 35        /// <param name="faceIds">Array of candidate faceId created by Face -
 36        /// Detect. The maximum is 1000 faces</param>
 037        public GroupRequest(IList<System.Guid> faceIds)
 38        {
 039            FaceIds = faceIds;
 40            CustomInit();
 041        }
 42
 43        /// <summary>
 44        /// An initialization method that performs custom operations like setting defaults
 45        /// </summary>
 46        partial void CustomInit();
 47
 48        /// <summary>
 49        /// Gets or sets array of candidate faceId created by Face - Detect.
 50        /// The maximum is 1000 faces
 51        /// </summary>
 52        [JsonProperty(PropertyName = "faceIds")]
 053        public IList<System.Guid> FaceIds { get; set; }
 54
 55        /// <summary>
 56        /// Validate the object.
 57        /// </summary>
 58        /// <exception cref="ValidationException">
 59        /// Thrown if validation fails
 60        /// </exception>
 61        public virtual void Validate()
 62        {
 063            if (FaceIds == null)
 64            {
 065                throw new ValidationException(ValidationRules.CannotBeNull, "FaceIds");
 66            }
 067            if (FaceIds != null)
 68            {
 069                if (FaceIds.Count > 1000)
 70                {
 071                    throw new ValidationException(ValidationRules.MaxItems, "FaceIds", 1000);
 72                }
 73            }
 074        }
 75    }
 76}