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

/**
 * The response to a baseline query.
 *
 */
class BaselineResponse {
  /**
   * Create a BaselineResponse.
   * @property {string} [id] the metric baseline Id.
   * @property {string} [type] the resource type of the baseline resource.
   * @property {object} [name] the name and the display name of the metric,
   * i.e. it is localizable string.
   * @property {string} [name.value] the invariant value.
   * @property {string} [name.localizedValue] the locale specific value.
   * @property {string} [timespan] The timespan for which the data was
   * retrieved. Its value consists of two datetimes concatenated, separated by
   * '/'.  This may be adjusted in the future and returned back from what was
   * originally requested.
   * @property {moment.duration} [interval] The interval (window size) for
   * which the metric data was returned in.  This may be adjusted in the future
   * and returned back from what was originally requested.  This is not present
   * if a metadata request was made.
   * @property {string} [aggregation] The aggregation type of the metric.
   * @property {array} [timestamps] the array of timestamps of the baselines.
   * @property {array} [baseline] the baseline values for each sensitivity.
   * @property {array} [metadata] the baseline metadata values.
   */
  constructor() {
  }

  /**
   * Defines the metadata of BaselineResponse
   *
   * @returns {object} metadata of BaselineResponse
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BaselineResponse',
      type: {
        name: 'Composite',
        className: 'BaselineResponse',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'Composite',
              className: 'LocalizableString'
            }
          },
          timespan: {
            required: false,
            serializedName: 'properties.timespan',
            type: {
              name: 'String'
            }
          },
          interval: {
            required: false,
            serializedName: 'properties.interval',
            type: {
              name: 'TimeSpan'
            }
          },
          aggregation: {
            required: false,
            serializedName: 'properties.aggregation',
            type: {
              name: 'String'
            }
          },
          timestamps: {
            required: false,
            serializedName: 'properties.timestamps',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DateElementType',
                  type: {
                    name: 'DateTime'
                  }
              }
            }
          },
          baseline: {
            required: false,
            serializedName: 'properties.baseline',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'BaselineElementType',
                  type: {
                    name: 'Composite',
                    className: 'Baseline'
                  }
              }
            }
          },
          metadata: {
            required: false,
            serializedName: 'properties.metadata',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'BaselineMetadataValueElementType',
                  type: {
                    name: 'Composite',
                    className: 'BaselineMetadataValue'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = BaselineResponse;
