< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Models.VersionInfo
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\VersionInfo.cs
Covered lines:4
Uncovered lines:27
Coverable lines:31
Total lines:164
Line coverage:12.9% (4 of 31)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Version()-100%100%
get_CreatedDateTime()-0%100%
get_LastModifiedDateTime()-0%100%
get_LastTrainedDateTime()-0%100%
get_LastPublishedDateTime()-0%100%
get_EndpointUrl()-0%100%
get_AssignedEndpointKey()-0%100%
get_ExternalApiKeys()-0%100%
get_IntentsCount()-0%100%
get_EntitiesCount()-0%100%
get_EndpointHitsCount()-0%100%
get_TrainingStatus()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\VersionInfo.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.Language.LUIS.Authoring.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    /// Object model of an application version.
 21    /// </summary>
 22    public partial class VersionInfo
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the VersionInfo class.
 26        /// </summary>
 2427        public VersionInfo()
 28        {
 29            CustomInit();
 2430        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the VersionInfo class.
 34        /// </summary>
 35        /// <param name="version">The version ID. E.g.: "0.1"</param>
 36        /// <param name="trainingStatus">The current training status. Possible
 37        /// values include: 'NeedsTraining', 'InProgress', 'Trained'</param>
 38        /// <param name="createdDateTime">The version's creation
 39        /// timestamp.</param>
 40        /// <param name="lastModifiedDateTime">Timestamp of the last
 41        /// update.</param>
 42        /// <param name="lastTrainedDateTime">Timestamp of the last time the
 43        /// model was trained.</param>
 44        /// <param name="lastPublishedDateTime">Timestamp when was last
 45        /// published.</param>
 46        /// <param name="endpointUrl">The Runtime endpoint URL for this model
 47        /// version.</param>
 48        /// <param name="assignedEndpointKey">The endpoint key.</param>
 49        /// <param name="externalApiKeys">External keys.</param>
 50        /// <param name="intentsCount">Number of intents in this model.</param>
 51        /// <param name="entitiesCount">Number of entities in this
 52        /// model.</param>
 53        /// <param name="endpointHitsCount">Number of calls made to this
 54        /// endpoint.</param>
 055        public VersionInfo(string version, TrainingStatus trainingStatus, System.DateTime? createdDateTime = default(Sys
 56        {
 057            Version = version;
 058            CreatedDateTime = createdDateTime;
 059            LastModifiedDateTime = lastModifiedDateTime;
 060            LastTrainedDateTime = lastTrainedDateTime;
 061            LastPublishedDateTime = lastPublishedDateTime;
 062            EndpointUrl = endpointUrl;
 063            AssignedEndpointKey = assignedEndpointKey;
 064            ExternalApiKeys = externalApiKeys;
 065            IntentsCount = intentsCount;
 066            EntitiesCount = entitiesCount;
 067            EndpointHitsCount = endpointHitsCount;
 068            TrainingStatus = trainingStatus;
 69            CustomInit();
 070        }
 71
 72        /// <summary>
 73        /// An initialization method that performs custom operations like setting defaults
 74        /// </summary>
 75        partial void CustomInit();
 76
 77        /// <summary>
 78        /// Gets or sets the version ID. E.g.: "0.1"
 79        /// </summary>
 80        [JsonProperty(PropertyName = "version")]
 5281        public string Version { get; set; }
 82
 83        /// <summary>
 84        /// Gets or sets the version's creation timestamp.
 85        /// </summary>
 86        [JsonProperty(PropertyName = "createdDateTime")]
 087        public System.DateTime? CreatedDateTime { get; set; }
 88
 89        /// <summary>
 90        /// Gets or sets timestamp of the last update.
 91        /// </summary>
 92        [JsonProperty(PropertyName = "lastModifiedDateTime")]
 093        public System.DateTime? LastModifiedDateTime { get; set; }
 94
 95        /// <summary>
 96        /// Gets or sets timestamp of the last time the model was trained.
 97        /// </summary>
 98        [JsonProperty(PropertyName = "lastTrainedDateTime")]
 099        public System.DateTime? LastTrainedDateTime { get; set; }
 100
 101        /// <summary>
 102        /// Gets or sets timestamp when was last published.
 103        /// </summary>
 104        [JsonProperty(PropertyName = "lastPublishedDateTime")]
 0105        public System.DateTime? LastPublishedDateTime { get; set; }
 106
 107        /// <summary>
 108        /// Gets or sets the Runtime endpoint URL for this model version.
 109        /// </summary>
 110        [JsonProperty(PropertyName = "endpointUrl")]
 0111        public string EndpointUrl { get; set; }
 112
 113        /// <summary>
 114        /// Gets or sets the endpoint key.
 115        /// </summary>
 116        [JsonProperty(PropertyName = "assignedEndpointKey")]
 0117        public IDictionary<string, string> AssignedEndpointKey { get; set; }
 118
 119        /// <summary>
 120        /// Gets or sets external keys.
 121        /// </summary>
 122        [JsonProperty(PropertyName = "externalApiKeys")]
 0123        public object ExternalApiKeys { get; set; }
 124
 125        /// <summary>
 126        /// Gets or sets number of intents in this model.
 127        /// </summary>
 128        [JsonProperty(PropertyName = "intentsCount")]
 0129        public int? IntentsCount { get; set; }
 130
 131        /// <summary>
 132        /// Gets or sets number of entities in this model.
 133        /// </summary>
 134        [JsonProperty(PropertyName = "entitiesCount")]
 0135        public int? EntitiesCount { get; set; }
 136
 137        /// <summary>
 138        /// Gets or sets number of calls made to this endpoint.
 139        /// </summary>
 140        [JsonProperty(PropertyName = "endpointHitsCount")]
 0141        public int? EndpointHitsCount { get; set; }
 142
 143        /// <summary>
 144        /// Gets or sets the current training status. Possible values include:
 145        /// 'NeedsTraining', 'InProgress', 'Trained'
 146        /// </summary>
 147        [JsonProperty(PropertyName = "trainingStatus")]
 50148        public TrainingStatus TrainingStatus { get; set; }
 149
 150        /// <summary>
 151        /// Validate the object.
 152        /// </summary>
 153        /// <exception cref="ValidationException">
 154        /// Thrown if validation fails
 155        /// </exception>
 156        public virtual void Validate()
 157        {
 0158            if (Version == null)
 159            {
 0160                throw new ValidationException(ValidationRules.CannotBeNull, "Version");
 161            }
 0162        }
 163    }
 164}