/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Name == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Name");
     }
     if (CustomBaseModelInfo != null)
     {
         CustomBaseModelInfo.Validate();
     }
 }
 /// <summary>
 /// Initializes a new instance of the Iteration class.
 /// </summary>
 /// <param name="name">Gets or sets the name of the iteration.</param>
 /// <param name="id">Gets the id of the iteration.</param>
 /// <param name="status">Gets the current iteration status.</param>
 /// <param name="created">Gets the time this iteration was
 /// completed.</param>
 /// <param name="lastModified">Gets the time this iteration was last
 /// modified.</param>
 /// <param name="trainedAt">Gets the time this iteration was last
 /// modified.</param>
 /// <param name="projectId">Gets the project id of the
 /// iteration.</param>
 /// <param name="exportable">Whether the iteration can be exported to
 /// another format for download.</param>
 /// <param name="exportableTo">A set of platforms this iteration can
 /// export to.</param>
 /// <param name="domainId">Get or sets a guid of the domain the
 /// iteration has been trained on.</param>
 /// <param name="classificationType">Gets the classification type of
 /// the project. Possible values include: 'Multiclass',
 /// 'Multilabel'</param>
 /// <param name="trainingType">Gets the training type of the iteration.
 /// Possible values include: 'Regular', 'Advanced'</param>
 /// <param name="reservedBudgetInHours">Gets the reserved advanced
 /// training budget for the iteration.</param>
 /// <param name="trainingTimeInMinutes">Gets the training time for the
 /// iteration.</param>
 /// <param name="publishName">Name of the published model.</param>
 /// <param name="originalPublishResourceId">Resource Provider Id this
 /// iteration was originally published to.</param>
 /// <param name="customBaseModelInfo">Information of the previously
 /// trained iteration which provides the base model for current
 /// iteration's training.
 /// Default value of null specifies that no previously trained
 /// iteration will be used for incremental learning.</param>
 /// <param name="trainingErrorDetails">Training error details, when
 /// training fails.
 /// Value is null when training succeeds.</param>
 public Iteration(string name, System.Guid id = default(System.Guid), string status = default(string), System.DateTime created = default(System.DateTime), System.DateTime lastModified = default(System.DateTime), System.DateTime?trainedAt = default(System.DateTime?), System.Guid projectId = default(System.Guid), bool exportable = default(bool), IList <string> exportableTo = default(IList <string>), System.Guid?domainId = default(System.Guid?), string classificationType = default(string), string trainingType = default(string), int reservedBudgetInHours = default(int), int trainingTimeInMinutes = default(int), string publishName = default(string), string originalPublishResourceId = default(string), CustomBaseModelInfo customBaseModelInfo = default(CustomBaseModelInfo), string trainingErrorDetails = default(string))
 {
     Id                        = id;
     Name                      = name;
     Status                    = status;
     Created                   = created;
     LastModified              = lastModified;
     TrainedAt                 = trainedAt;
     ProjectId                 = projectId;
     Exportable                = exportable;
     ExportableTo              = exportableTo;
     DomainId                  = domainId;
     ClassificationType        = classificationType;
     TrainingType              = trainingType;
     ReservedBudgetInHours     = reservedBudgetInHours;
     TrainingTimeInMinutes     = trainingTimeInMinutes;
     PublishName               = publishName;
     OriginalPublishResourceId = originalPublishResourceId;
     CustomBaseModelInfo       = customBaseModelInfo;
     TrainingErrorDetails      = trainingErrorDetails;
     CustomInit();
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the TrainingParameters class.
 /// </summary>
 /// <param name="selectedTags">List of tags selected for this training
 /// session, other tags in the project will be ignored.</param>
 /// <param name="customBaseModelInfo">Information of the previously
 /// trained iteration which provides the base model for current
 /// iteration's training.</param>
 public TrainingParameters(IList <System.Guid> selectedTags = default(IList <System.Guid>), CustomBaseModelInfo customBaseModelInfo = default(CustomBaseModelInfo))
 {
     SelectedTags        = selectedTags;
     CustomBaseModelInfo = customBaseModelInfo;
     CustomInit();
 }