< Summary

Class:Microsoft.Azure.CognitiveServices.Personalizer.Models.Evaluation
Assembly:Microsoft.Azure.CognitiveServices.Personalizer
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Personalizer\src\Generated\Models\Evaluation.cs
Covered lines:6
Uncovered lines:21
Coverable lines:27
Total lines:118
Line coverage:22.2% (6 of 27)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Id()-100%100%
get_Name()-100%100%
get_StartTime()-0%100%
get_EndTime()-0%100%
get_JobId()-0%100%
get_Status()-0%100%
get_PolicyResults()-100%100%
get_FeatureImportance()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Personalizer\src\Generated\Models\Evaluation.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.Personalizer.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 Evaluation
 20    {
 21        /// <summary>
 22        /// Initializes a new instance of the Evaluation class.
 23        /// </summary>
 9624        public Evaluation()
 25        {
 26            CustomInit();
 9627        }
 28
 29        /// <summary>
 30        /// Initializes a new instance of the Evaluation class.
 31        /// </summary>
 32        /// <param name="status">Possible values include: 'completed',
 33        /// 'pending', 'failed', 'notSubmitted'</param>
 034        public Evaluation(string id = default(string), string name = default(string), System.DateTime? startTime = defau
 35        {
 036            Id = id;
 037            Name = name;
 038            StartTime = startTime;
 039            EndTime = endTime;
 040            JobId = jobId;
 041            Status = status;
 042            PolicyResults = policyResults;
 043            FeatureImportance = featureImportance;
 44            CustomInit();
 045        }
 46
 47        /// <summary>
 48        /// An initialization method that performs custom operations like setting defaults
 49        /// </summary>
 50        partial void CustomInit();
 51
 52        /// <summary>
 53        /// </summary>
 54        [JsonProperty(PropertyName = "id")]
 9855        public string Id { get; private set; }
 56
 57        /// <summary>
 58        /// </summary>
 59        [JsonProperty(PropertyName = "name")]
 10060        public string Name { get; private set; }
 61
 62        /// <summary>
 63        /// </summary>
 64        [JsonProperty(PropertyName = "startTime")]
 065        public System.DateTime? StartTime { get; private set; }
 66
 67        /// <summary>
 68        /// </summary>
 69        [JsonProperty(PropertyName = "endTime")]
 070        public System.DateTime? EndTime { get; private set; }
 71
 72        /// <summary>
 73        /// </summary>
 74        [JsonProperty(PropertyName = "jobId")]
 075        public string JobId { get; private set; }
 76
 77        /// <summary>
 78        /// Gets possible values include: 'completed', 'pending', 'failed',
 79        /// 'notSubmitted'
 80        /// </summary>
 81        [JsonProperty(PropertyName = "status")]
 082        public string Status { get; private set; }
 83
 84        /// <summary>
 85        /// </summary>
 86        [JsonProperty(PropertyName = "policyResults")]
 19287        public IList<PolicyResult> PolicyResults { get; set; }
 88
 89        /// <summary>
 90        /// </summary>
 91        [JsonProperty(PropertyName = "featureImportance")]
 19292        public IList<IList<string>> FeatureImportance { get; set; }
 93
 94        /// <summary>
 95        /// Validate the object.
 96        /// </summary>
 97        /// <exception cref="ValidationException">
 98        /// Thrown if validation fails
 99        /// </exception>
 100        public virtual void Validate()
 101        {
 0102            if (Id != null)
 103            {
 0104                if (Id.Length > 256)
 105                {
 0106                    throw new ValidationException(ValidationRules.MaxLength, "Id", 256);
 107                }
 108            }
 0109            if (Name != null)
 110            {
 0111                if (Name.Length > 256)
 112                {
 0113                    throw new ValidationException(ValidationRules.MaxLength, "Name", 256);
 114                }
 115            }
 0116        }
 117    }
 118}