/*
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

const models = require('./index');

/**
 * Class representing a ErrorCounts.
 */
class ErrorCounts {
  /**
   * Create a ErrorCounts.
   * @member {number} [count] total error count
   * @member {array} [crashes] the total error count for day
   */
  constructor() {
  }

  /**
   * Defines the metadata of ErrorCounts
   *
   * @returns {object} metadata of ErrorCounts
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ErrorCounts',
      type: {
        name: 'Composite',
        className: 'ErrorCounts',
        modelProperties: {
          count: {
            required: false,
            serializedName: 'count',
            type: {
              name: 'Number'
            }
          },
          crashes: {
            required: false,
            serializedName: 'crashes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DateTimeCountsElementType',
                  type: {
                    name: 'Composite',
                    className: 'DateTimeCounts'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ErrorCounts;
