| | 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.Vision.CustomVision.Training.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 | | /// Iteration model to be sent over JSON. |
| | 21 | | /// </summary> |
| | 22 | | public partial class Iteration |
| | 23 | | { |
| | 24 | | /// <summary> |
| | 25 | | /// Initializes a new instance of the Iteration class. |
| | 26 | | /// </summary> |
| 50 | 27 | | public Iteration() |
| | 28 | | { |
| | 29 | | CustomInit(); |
| 50 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Initializes a new instance of the Iteration class. |
| | 34 | | /// </summary> |
| | 35 | | /// <param name="name">Gets or sets the name of the iteration.</param> |
| | 36 | | /// <param name="id">Gets the id of the iteration.</param> |
| | 37 | | /// <param name="status">Gets the current iteration status.</param> |
| | 38 | | /// <param name="created">Gets the time this iteration was |
| | 39 | | /// completed.</param> |
| | 40 | | /// <param name="lastModified">Gets the time this iteration was last |
| | 41 | | /// modified.</param> |
| | 42 | | /// <param name="trainedAt">Gets the time this iteration was last |
| | 43 | | /// modified.</param> |
| | 44 | | /// <param name="projectId">Gets the project id of the |
| | 45 | | /// iteration.</param> |
| | 46 | | /// <param name="exportable">Whether the iteration can be exported to |
| | 47 | | /// another format for download.</param> |
| | 48 | | /// <param name="exportableTo">A set of platforms this iteration can |
| | 49 | | /// export to.</param> |
| | 50 | | /// <param name="domainId">Get or sets a guid of the domain the |
| | 51 | | /// iteration has been trained on.</param> |
| | 52 | | /// <param name="classificationType">Gets the classification type of |
| | 53 | | /// the project. Possible values include: 'Multiclass', |
| | 54 | | /// 'Multilabel'</param> |
| | 55 | | /// <param name="trainingType">Gets the training type of the iteration. |
| | 56 | | /// Possible values include: 'Regular', 'Advanced'</param> |
| | 57 | | /// <param name="reservedBudgetInHours">Gets the reserved advanced |
| | 58 | | /// training budget for the iteration.</param> |
| | 59 | | /// <param name="trainingTimeInMinutes">Gets the training time for the |
| | 60 | | /// iteration.</param> |
| | 61 | | /// <param name="publishName">Name of the published model.</param> |
| | 62 | | /// <param name="originalPublishResourceId">Resource Provider Id this |
| | 63 | | /// iteration was originally published to.</param> |
| 48 | 64 | | public Iteration(string name, System.Guid id = default(System.Guid), string status = default(string), System.Dat |
| | 65 | | { |
| 48 | 66 | | Id = id; |
| 48 | 67 | | Name = name; |
| 48 | 68 | | Status = status; |
| 48 | 69 | | Created = created; |
| 48 | 70 | | LastModified = lastModified; |
| 48 | 71 | | TrainedAt = trainedAt; |
| 48 | 72 | | ProjectId = projectId; |
| 48 | 73 | | Exportable = exportable; |
| 48 | 74 | | ExportableTo = exportableTo; |
| 48 | 75 | | DomainId = domainId; |
| 48 | 76 | | ClassificationType = classificationType; |
| 48 | 77 | | TrainingType = trainingType; |
| 48 | 78 | | ReservedBudgetInHours = reservedBudgetInHours; |
| 48 | 79 | | TrainingTimeInMinutes = trainingTimeInMinutes; |
| 48 | 80 | | PublishName = publishName; |
| 48 | 81 | | OriginalPublishResourceId = originalPublishResourceId; |
| | 82 | | CustomInit(); |
| 48 | 83 | | } |
| | 84 | |
|
| | 85 | | /// <summary> |
| | 86 | | /// An initialization method that performs custom operations like setting defaults |
| | 87 | | /// </summary> |
| | 88 | | partial void CustomInit(); |
| | 89 | |
|
| | 90 | | /// <summary> |
| | 91 | | /// Gets the id of the iteration. |
| | 92 | | /// </summary> |
| | 93 | | [JsonProperty(PropertyName = "id")] |
| 212 | 94 | | public System.Guid Id { get; private set; } |
| | 95 | |
|
| | 96 | | /// <summary> |
| | 97 | | /// Gets or sets the name of the iteration. |
| | 98 | | /// </summary> |
| | 99 | | [JsonProperty(PropertyName = "name")] |
| 112 | 100 | | public string Name { get; set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets the current iteration status. |
| | 104 | | /// </summary> |
| | 105 | | [JsonProperty(PropertyName = "status")] |
| 132 | 106 | | public string Status { get; private set; } |
| | 107 | |
|
| | 108 | | /// <summary> |
| | 109 | | /// Gets the time this iteration was completed. |
| | 110 | | /// </summary> |
| | 111 | | [JsonProperty(PropertyName = "created")] |
| 0 | 112 | | public System.DateTime Created { get; private set; } |
| | 113 | |
|
| | 114 | | /// <summary> |
| | 115 | | /// Gets the time this iteration was last modified. |
| | 116 | | /// </summary> |
| | 117 | | [JsonProperty(PropertyName = "lastModified")] |
| 0 | 118 | | public System.DateTime LastModified { get; private set; } |
| | 119 | |
|
| | 120 | | /// <summary> |
| | 121 | | /// Gets the time this iteration was last modified. |
| | 122 | | /// </summary> |
| | 123 | | [JsonProperty(PropertyName = "trainedAt")] |
| 0 | 124 | | public System.DateTime? TrainedAt { get; private set; } |
| | 125 | |
|
| | 126 | | /// <summary> |
| | 127 | | /// Gets the project id of the iteration. |
| | 128 | | /// </summary> |
| | 129 | | [JsonProperty(PropertyName = "projectId")] |
| 144 | 130 | | public System.Guid ProjectId { get; private set; } |
| | 131 | |
|
| | 132 | | /// <summary> |
| | 133 | | /// Gets whether the iteration can be exported to another format for |
| | 134 | | /// download. |
| | 135 | | /// </summary> |
| | 136 | | [JsonProperty(PropertyName = "exportable")] |
| 102 | 137 | | public bool Exportable { get; private set; } |
| | 138 | |
|
| | 139 | | /// <summary> |
| | 140 | | /// Gets a set of platforms this iteration can export to. |
| | 141 | | /// </summary> |
| | 142 | | [JsonProperty(PropertyName = "exportableTo")] |
| 108 | 143 | | public IList<string> ExportableTo { get; private set; } |
| | 144 | |
|
| | 145 | | /// <summary> |
| | 146 | | /// Gets get or sets a guid of the domain the iteration has been |
| | 147 | | /// trained on. |
| | 148 | | /// </summary> |
| | 149 | | [JsonProperty(PropertyName = "domainId")] |
| 80 | 150 | | public System.Guid? DomainId { get; private set; } |
| | 151 | |
|
| | 152 | | /// <summary> |
| | 153 | | /// Gets the classification type of the project. Possible values |
| | 154 | | /// include: 'Multiclass', 'Multilabel' |
| | 155 | | /// </summary> |
| | 156 | | [JsonProperty(PropertyName = "classificationType")] |
| 0 | 157 | | public string ClassificationType { get; private set; } |
| | 158 | |
|
| | 159 | | /// <summary> |
| | 160 | | /// Gets the training type of the iteration. Possible values include: |
| | 161 | | /// 'Regular', 'Advanced' |
| | 162 | | /// </summary> |
| | 163 | | [JsonProperty(PropertyName = "trainingType")] |
| 98 | 164 | | public string TrainingType { get; private set; } |
| | 165 | |
|
| | 166 | | /// <summary> |
| | 167 | | /// Gets the reserved advanced training budget for the iteration. |
| | 168 | | /// </summary> |
| | 169 | | [JsonProperty(PropertyName = "reservedBudgetInHours")] |
| 98 | 170 | | public int ReservedBudgetInHours { get; private set; } |
| | 171 | |
|
| | 172 | | /// <summary> |
| | 173 | | /// Gets the training time for the iteration. |
| | 174 | | /// </summary> |
| | 175 | | [JsonProperty(PropertyName = "trainingTimeInMinutes")] |
| 98 | 176 | | public int TrainingTimeInMinutes { get; private set; } |
| | 177 | |
|
| | 178 | | /// <summary> |
| | 179 | | /// Gets name of the published model. |
| | 180 | | /// </summary> |
| | 181 | | [JsonProperty(PropertyName = "publishName")] |
| 70 | 182 | | public string PublishName { get; private set; } |
| | 183 | |
|
| | 184 | | /// <summary> |
| | 185 | | /// Gets resource Provider Id this iteration was originally published |
| | 186 | | /// to. |
| | 187 | | /// </summary> |
| | 188 | | [JsonProperty(PropertyName = "originalPublishResourceId")] |
| 66 | 189 | | public string OriginalPublishResourceId { get; private set; } |
| | 190 | |
|
| | 191 | | /// <summary> |
| | 192 | | /// Validate the object. |
| | 193 | | /// </summary> |
| | 194 | | /// <exception cref="ValidationException"> |
| | 195 | | /// Thrown if validation fails |
| | 196 | | /// </exception> |
| | 197 | | public virtual void Validate() |
| | 198 | | { |
| 0 | 199 | | if (Name == null) |
| | 200 | | { |
| 0 | 201 | | throw new ValidationException(ValidationRules.CannotBeNull, "Name"); |
| | 202 | | } |
| 0 | 203 | | } |
| | 204 | | } |
| | 205 | | } |