< Summary

Class:Microsoft.Azure.CognitiveServices.ContentModerator.Models.VideoFrameBodyItem
Assembly:Microsoft.Azure.CognitiveServices.Vision.ContentModerator
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.ContentModerator\src\Generated\Models\VideoFrameBodyItem.cs
Covered lines:0
Uncovered lines:25
Coverable lines:25
Total lines:109
Line coverage:0% (0 of 25)
Covered branches:0
Total branches:16
Branch coverage:0% (0 of 16)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Timestamp()-0%100%
get_FrameImage()-0%100%
get_ReviewerResultTags()-0%100%
get_Metadata()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.ContentModerator\src\Generated\Models\VideoFrameBodyItem.cs

#LineLine coverage
 1// <auto-generated>
 2// Code generated by Microsoft (R) AutoRest Code Generator.
 3// Changes may cause incorrect behavior and will be lost if the code is
 4// regenerated.
 5// </auto-generated>
 6
 7namespace Microsoft.Azure.CognitiveServices.ContentModerator.Models
 8{
 9    using Microsoft.Rest;
 10    using Newtonsoft.Json;
 11    using System.Collections;
 12    using System.Collections.Generic;
 13    using System.Linq;
 14
 15    /// <summary>
 16    /// Schema items of the body.
 17    /// </summary>
 18    public partial class VideoFrameBodyItem
 19    {
 20        /// <summary>
 21        /// Initializes a new instance of the VideoFrameBodyItem class.
 22        /// </summary>
 023        public VideoFrameBodyItem()
 24        {
 25            CustomInit();
 026        }
 27
 28        /// <summary>
 29        /// Initializes a new instance of the VideoFrameBodyItem class.
 30        /// </summary>
 31        /// <param name="timestamp">Timestamp of the frame.</param>
 32        /// <param name="frameImage">Content to review.</param>
 33        /// <param name="metadata">Optional metadata details.</param>
 034        public VideoFrameBodyItem(string timestamp, string frameImage, IList<VideoFrameBodyItemReviewerResultTagsItem> r
 35        {
 036            Timestamp = timestamp;
 037            FrameImage = frameImage;
 038            ReviewerResultTags = reviewerResultTags;
 039            Metadata = metadata;
 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 timestamp of the frame.
 50        /// </summary>
 51        [JsonProperty(PropertyName = "Timestamp")]
 052        public string Timestamp { get; set; }
 53
 54        /// <summary>
 55        /// Gets or sets content to review.
 56        /// </summary>
 57        [JsonProperty(PropertyName = "FrameImage")]
 058        public string FrameImage { get; set; }
 59
 60        /// <summary>
 61        /// </summary>
 62        [JsonProperty(PropertyName = "ReviewerResultTags")]
 063        public IList<VideoFrameBodyItemReviewerResultTagsItem> ReviewerResultTags { get; set; }
 64
 65        /// <summary>
 66        /// Gets or sets optional metadata details.
 67        /// </summary>
 68        [JsonProperty(PropertyName = "Metadata")]
 069        public IList<VideoFrameBodyItemMetadataItem> Metadata { get; set; }
 70
 71        /// <summary>
 72        /// Validate the object.
 73        /// </summary>
 74        /// <exception cref="ValidationException">
 75        /// Thrown if validation fails
 76        /// </exception>
 77        public virtual void Validate()
 78        {
 079            if (Timestamp == null)
 80            {
 081                throw new ValidationException(ValidationRules.CannotBeNull, "Timestamp");
 82            }
 083            if (FrameImage == null)
 84            {
 085                throw new ValidationException(ValidationRules.CannotBeNull, "FrameImage");
 86            }
 087            if (ReviewerResultTags != null)
 88            {
 089                foreach (var element in ReviewerResultTags)
 90                {
 091                    if (element != null)
 92                    {
 093                        element.Validate();
 94                    }
 95                }
 96            }
 097            if (Metadata != null)
 98            {
 099                foreach (var element1 in Metadata)
 100                {
 0101                    if (element1 != null)
 102                    {
 0103                        element1.Validate();
 104                    }
 105                }
 106            }
 0107        }
 108    }
 109}