< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\UpdateFaceRequest.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.Linq;
 16
 17    /// <summary>
 18    /// Request to update face data.
 19    /// </summary>
 20    public partial class UpdateFaceRequest
 21    {
 22        /// <summary>
 23        /// Initializes a new instance of the UpdateFaceRequest class.
 24        /// </summary>
 025        public UpdateFaceRequest()
 26        {
 27            CustomInit();
 028        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the UpdateFaceRequest class.
 32        /// </summary>
 33        /// <param name="userData">User-provided data attached to the face. The
 34        /// size limit is 1KB.</param>
 035        public UpdateFaceRequest(string userData = default(string))
 36        {
 037            UserData = userData;
 38            CustomInit();
 039        }
 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 user-provided data attached to the face. The size
 48        /// limit is 1KB.
 49        /// </summary>
 50        [JsonProperty(PropertyName = "userData")]
 051        public string UserData { get; set; }
 52
 53        /// <summary>
 54        /// Validate the object.
 55        /// </summary>
 56        /// <exception cref="ValidationException">
 57        /// Thrown if validation fails
 58        /// </exception>
 59        public virtual void Validate()
 60        {
 061            if (UserData != null)
 62            {
 063                if (UserData.Length > 1024)
 64                {
 065                    throw new ValidationException(ValidationRules.MaxLength, "UserData", 1024);
 66                }
 67            }
 068        }
 69    }
 70}