| | 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 | |
|
| | 11 | | namespace 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> |
| 24 | 27 | | public VersionInfo() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 24 | 30 | | } |
| | 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> |
| 0 | 55 | | public VersionInfo(string version, TrainingStatus trainingStatus, System.DateTime? createdDateTime = default(Sys |
| | 56 | | { |
| 0 | 57 | | Version = version; |
| 0 | 58 | | CreatedDateTime = createdDateTime; |
| 0 | 59 | | LastModifiedDateTime = lastModifiedDateTime; |
| 0 | 60 | | LastTrainedDateTime = lastTrainedDateTime; |
| 0 | 61 | | LastPublishedDateTime = lastPublishedDateTime; |
| 0 | 62 | | EndpointUrl = endpointUrl; |
| 0 | 63 | | AssignedEndpointKey = assignedEndpointKey; |
| 0 | 64 | | ExternalApiKeys = externalApiKeys; |
| 0 | 65 | | IntentsCount = intentsCount; |
| 0 | 66 | | EntitiesCount = entitiesCount; |
| 0 | 67 | | EndpointHitsCount = endpointHitsCount; |
| 0 | 68 | | TrainingStatus = trainingStatus; |
| | 69 | | CustomInit(); |
| 0 | 70 | | } |
| | 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")] |
| 52 | 81 | | public string Version { get; set; } |
| | 82 | |
|
| | 83 | | /// <summary> |
| | 84 | | /// Gets or sets the version's creation timestamp. |
| | 85 | | /// </summary> |
| | 86 | | [JsonProperty(PropertyName = "createdDateTime")] |
| 0 | 87 | | public System.DateTime? CreatedDateTime { get; set; } |
| | 88 | |
|
| | 89 | | /// <summary> |
| | 90 | | /// Gets or sets timestamp of the last update. |
| | 91 | | /// </summary> |
| | 92 | | [JsonProperty(PropertyName = "lastModifiedDateTime")] |
| 0 | 93 | | 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")] |
| 0 | 99 | | public System.DateTime? LastTrainedDateTime { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets or sets timestamp when was last published. |
| | 103 | | /// </summary> |
| | 104 | | [JsonProperty(PropertyName = "lastPublishedDateTime")] |
| 0 | 105 | | 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")] |
| 0 | 111 | | public string EndpointUrl { get; set; } |
| | 112 | |
|
| | 113 | | /// <summary> |
| | 114 | | /// Gets or sets the endpoint key. |
| | 115 | | /// </summary> |
| | 116 | | [JsonProperty(PropertyName = "assignedEndpointKey")] |
| 0 | 117 | | public IDictionary<string, string> AssignedEndpointKey { get; set; } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Gets or sets external keys. |
| | 121 | | /// </summary> |
| | 122 | | [JsonProperty(PropertyName = "externalApiKeys")] |
| 0 | 123 | | public object ExternalApiKeys { get; set; } |
| | 124 | |
|
| | 125 | | /// <summary> |
| | 126 | | /// Gets or sets number of intents in this model. |
| | 127 | | /// </summary> |
| | 128 | | [JsonProperty(PropertyName = "intentsCount")] |
| 0 | 129 | | public int? IntentsCount { get; set; } |
| | 130 | |
|
| | 131 | | /// <summary> |
| | 132 | | /// Gets or sets number of entities in this model. |
| | 133 | | /// </summary> |
| | 134 | | [JsonProperty(PropertyName = "entitiesCount")] |
| 0 | 135 | | 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")] |
| 0 | 141 | | 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")] |
| 50 | 148 | | 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 | | { |
| 0 | 158 | | if (Version == null) |
| | 159 | | { |
| 0 | 160 | | throw new ValidationException(ValidationRules.CannotBeNull, "Version"); |
| | 161 | | } |
| 0 | 162 | | } |
| | 163 | | } |
| | 164 | | } |