/*
 * 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 ErrorGroup.
 */
class ErrorGroup {
  /**
   * Create a ErrorGroup.
   * @member {string} errorGroupId
   * @member {string} appVersion
   * @member {string} status Possible values include: 'open', 'closed',
   * 'ignored'
   * @member {number} count
   * @member {number} deviceCount
   * @member {date} firstOccurrence
   * @member {date} lastOccurrence
   * @member {string} [summary]
   * @member {object} [reasonFrame]
   * @member {string} [reasonFrame.className] name of the class
   * @member {string} [reasonFrame.method] name of the method
   * @member {boolean} [reasonFrame.classMethod] is a class method
   * @member {string} [reasonFrame.file] name of the file
   * @member {number} [reasonFrame.line] line number
   * @member {boolean} [reasonFrame.appCode] this line isn't from any framework
   * @member {string} [reasonFrame.frameworkName] Name of the framework
   * @member {string} [reasonFrame.codeFormatted] Formatted frame string
   * @member {string} [reasonFrame.codeRaw] Unformatted Frame string
   * @member {string} [reasonFrame.language] programming language of the frame.
   * Possible values include: 'JavaScript', 'CSharp', 'Objective-C',
   * 'Objective-Cpp', 'Cpp', 'C', 'Swift', 'Java', 'Unknown'
   * @member {string} [reasonFrame.methodParams] parameters of the frames
   * method
   * @member {string} [reasonFrame.exceptionType] Exception type.
   * @member {string} [reasonFrame.osExceptionType] OS exception type. (aka.
   * SIGNAL)
   */
  constructor() {
  }

  /**
   * Defines the metadata of ErrorGroup
   *
   * @returns {object} metadata of ErrorGroup
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ErrorGroup',
      type: {
        name: 'Composite',
        className: 'ErrorGroup',
        modelProperties: {
          errorGroupId: {
            required: true,
            serializedName: 'error_group_id',
            type: {
              name: 'String'
            }
          },
          appVersion: {
            required: true,
            serializedName: 'app_version',
            type: {
              name: 'String'
            }
          },
          status: {
            required: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          count: {
            required: true,
            serializedName: 'count',
            type: {
              name: 'Number'
            }
          },
          deviceCount: {
            required: true,
            serializedName: 'device_count',
            type: {
              name: 'Number'
            }
          },
          firstOccurrence: {
            required: true,
            serializedName: 'first_occurrence',
            type: {
              name: 'DateTime'
            }
          },
          lastOccurrence: {
            required: true,
            serializedName: 'last_occurrence',
            type: {
              name: 'DateTime'
            }
          },
          summary: {
            required: false,
            serializedName: 'summary',
            type: {
              name: 'String'
            }
          },
          reasonFrame: {
            required: false,
            serializedName: 'reason_frame',
            type: {
              name: 'Composite',
              className: 'ErrorStackFrame'
            }
          }
        }
      }
    };
  }
}

module.exports = ErrorGroup;
