/*
 * 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';

/**
 * Represents the detailed performance data for a trained iteration.
 *
 */
class IterationPerformance {
  /**
   * Create a IterationPerformance.
   * @property {array} [perTagPerformance] Gets the per-tag performance details
   * for this iteration.
   * @property {number} [precision] Gets the precision.
   * @property {number} [precisionStdDeviation] Gets the standard deviation for
   * the precision.
   * @property {number} [recall] Gets the recall.
   * @property {number} [recallStdDeviation] Gets the standard deviation for
   * the recall.
   * @property {number} [averagePrecision] Gets the average precision when
   * applicable.
   */
  constructor() {
  }

  /**
   * Defines the metadata of IterationPerformance
   *
   * @returns {object} metadata of IterationPerformance
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'IterationPerformance',
      type: {
        name: 'Composite',
        className: 'IterationPerformance',
        modelProperties: {
          perTagPerformance: {
            required: false,
            readOnly: true,
            serializedName: 'perTagPerformance',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TagPerformanceElementType',
                  type: {
                    name: 'Composite',
                    className: 'TagPerformance'
                  }
              }
            }
          },
          precision: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'precision',
            type: {
              name: 'Number'
            }
          },
          precisionStdDeviation: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'precisionStdDeviation',
            type: {
              name: 'Number'
            }
          },
          recall: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'recall',
            type: {
              name: 'Number'
            }
          },
          recallStdDeviation: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'recallStdDeviation',
            type: {
              name: 'Number'
            }
          },
          averagePrecision: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'averagePrecision',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = IterationPerformance;
