/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * Iteration model to be sent over JSON.
 *
 */
class Iteration {
  /**
   * Create a Iteration.
   * @property {uuid} [id] Gets the id of the iteration.
   * @property {string} name Gets or sets the name of the iteration.
   * @property {string} [status] Gets the current iteration status.
   * @property {date} [created] Gets the time this iteration was completed.
   * @property {date} [lastModified] Gets the time this iteration was last
   * modified.
   * @property {date} [trainedAt] Gets the time this iteration was last
   * modified.
   * @property {uuid} [projectId] Gets the project id of the iteration.
   * @property {boolean} [exportable] Whether the iteration can be exported to
   * another format for download.
   * @property {array} [exportableTo] A set of platforms this iteration can
   * export to.
   * @property {uuid} [domainId] Get or sets a guid of the domain the iteration
   * has been trained on.
   * @property {string} [classificationType] Gets the classification type of
   * the project. Possible values include: 'Multiclass', 'Multilabel'
   * @property {string} [trainingType] Gets the training type of the iteration.
   * Possible values include: 'Regular', 'Advanced'
   * @property {number} [reservedBudgetInHours] Gets the reserved advanced
   * training budget for the iteration.
   * @property {string} [publishName] Name of the published model.
   * @property {string} [originalPublishResourceId] Resource Provider Id this
   * iteration was originally published to.
   */
  constructor() {
  }

  /**
   * Defines the metadata of Iteration
   *
   * @returns {object} metadata of Iteration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Iteration',
      type: {
        name: 'Composite',
        className: 'Iteration',
        modelProperties: {
          id: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: true,
            nullable: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          created: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'created',
            type: {
              name: 'DateTime'
            }
          },
          lastModified: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'lastModified',
            type: {
              name: 'DateTime'
            }
          },
          trainedAt: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'trainedAt',
            type: {
              name: 'DateTime'
            }
          },
          projectId: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'projectId',
            type: {
              name: 'String'
            }
          },
          exportable: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'exportable',
            type: {
              name: 'Boolean'
            }
          },
          exportableTo: {
            required: false,
            readOnly: true,
            serializedName: 'exportableTo',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          domainId: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'domainId',
            type: {
              name: 'String'
            }
          },
          classificationType: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'classificationType',
            type: {
              name: 'String'
            }
          },
          trainingType: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'trainingType',
            type: {
              name: 'String'
            }
          },
          reservedBudgetInHours: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'reservedBudgetInHours',
            type: {
              name: 'Number'
            }
          },
          publishName: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'publishName',
            type: {
              name: 'String'
            }
          },
          originalPublishResourceId: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'originalPublishResourceId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Iteration;
