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

/**
 * Value of resource metric.
 *
 */
class ResourceMetricValue {
  /**
   * Create a ResourceMetricValue.
   * @member {string} [timestamp] Value timestamp.
   * @member {number} [average] Value average.
   * @member {number} [minimum] Value minimum.
   * @member {number} [maximum] Value maximum.
   * @member {number} [total] Value total.
   * @member {number} [count] Value count.
   * @member {array} [properties] Resource metric properties collection.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ResourceMetricValue
   *
   * @returns {object} metadata of ResourceMetricValue
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ResourceMetricValue',
      type: {
        name: 'Composite',
        className: 'ResourceMetricValue',
        modelProperties: {
          timestamp: {
            required: false,
            readOnly: true,
            serializedName: 'timestamp',
            type: {
              name: 'String'
            }
          },
          average: {
            required: false,
            readOnly: true,
            serializedName: 'average',
            type: {
              name: 'Number'
            }
          },
          minimum: {
            required: false,
            readOnly: true,
            serializedName: 'minimum',
            type: {
              name: 'Number'
            }
          },
          maximum: {
            required: false,
            readOnly: true,
            serializedName: 'maximum',
            type: {
              name: 'Number'
            }
          },
          total: {
            required: false,
            readOnly: true,
            serializedName: 'total',
            type: {
              name: 'Number'
            }
          },
          count: {
            required: false,
            readOnly: true,
            serializedName: 'count',
            type: {
              name: 'Number'
            }
          },
          properties: {
            required: false,
            readOnly: true,
            serializedName: 'properties',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ResourceMetricPropertyElementType',
                  type: {
                    name: 'Composite',
                    className: 'ResourceMetricProperty'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ResourceMetricValue;
