< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.Face.Models.UpdateSnapshotRequest
Assembly:Microsoft.Azure.CognitiveServices.Vision.Face
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\UpdateSnapshotRequest.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:87
Line coverage:0% (0 of 12)
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_ApplyScope()-0%100%
get_UserData()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\UpdateSnapshotRequest.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 updating a snapshot, with a combination of user
 21    /// defined apply scope and user specified data.
 22    /// </summary>
 23    public partial class UpdateSnapshotRequest
 24    {
 25        /// <summary>
 26        /// Initializes a new instance of the UpdateSnapshotRequest class.
 27        /// </summary>
 028        public UpdateSnapshotRequest()
 29        {
 30            CustomInit();
 031        }
 32
 33        /// <summary>
 34        /// Initializes a new instance of the UpdateSnapshotRequest class.
 35        /// </summary>
 36        /// <param name="applyScope">Array of the target Face subscription ids
 37        /// for the snapshot, specified by the user who created the snapshot
 38        /// when calling Snapshot - Take. For each snapshot, only subscriptions
 39        /// included in the applyScope of Snapshot - Take can apply it.</param>
 40        /// <param name="userData">User specified data about the snapshot for
 41        /// any purpose. Length should not exceed 16KB.</param>
 042        public UpdateSnapshotRequest(IList<System.Guid> applyScope = default(IList<System.Guid>), string userData = defa
 43        {
 044            ApplyScope = applyScope;
 045            UserData = userData;
 46            CustomInit();
 047        }
 48
 49        /// <summary>
 50        /// An initialization method that performs custom operations like setting defaults
 51        /// </summary>
 52        partial void CustomInit();
 53
 54        /// <summary>
 55        /// Gets or sets array of the target Face subscription ids for the
 56        /// snapshot, specified by the user who created the snapshot when
 57        /// calling Snapshot - Take. For each snapshot, only subscriptions
 58        /// included in the applyScope of Snapshot - Take can apply it.
 59        /// </summary>
 60        [JsonProperty(PropertyName = "applyScope")]
 061        public IList<System.Guid> ApplyScope { get; set; }
 62
 63        /// <summary>
 64        /// Gets or sets user specified data about the snapshot for any
 65        /// purpose. Length should not exceed 16KB.
 66        /// </summary>
 67        [JsonProperty(PropertyName = "userData")]
 068        public string UserData { get; set; }
 69
 70        /// <summary>
 71        /// Validate the object.
 72        /// </summary>
 73        /// <exception cref="ValidationException">
 74        /// Thrown if validation fails
 75        /// </exception>
 76        public virtual void Validate()
 77        {
 078            if (UserData != null)
 79            {
 080                if (UserData.Length > 16384)
 81                {
 082                    throw new ValidationException(ValidationRules.MaxLength, "UserData", 16384);
 83                }
 84            }
 085        }
 86    }
 87}