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

/**
 * An event query result.
 *
 */
class EventsResult {
  /**
   * Create a EventsResult.
   * @member {array} [aimessages] OData messages for this response.
   * @member {object} [value]
   * @member {string} [value.id] The unique ID for this event.
   * @member {number} [value.count] Count of the event
   * @member {date} [value.timestamp] Timestamp of the event
   * @member {object} [value.customDimensions] Custom dimensions of the event
   * @member {object} [value.customDimensions.additionalProperties]
   * @member {object} [value.customMeasurements] Custom measurements of the
   * event
   * @member {object} [value.customMeasurements.additionalProperties]
   * @member {object} [value.operation] Operation info of the event
   * @member {string} [value.operation.name] Name of the operation
   * @member {string} [value.operation.id] ID of the operation
   * @member {string} [value.operation.parentId] Parent ID of the operation
   * @member {string} [value.operation.syntheticSource] Synthetic source of the
   * operation
   * @member {object} [value.session] Session info of the event
   * @member {string} [value.session.id] ID of the session
   * @member {object} [value.user] User info of the event
   * @member {string} [value.user.id] ID of the user
   * @member {string} [value.user.accountId] Account ID of the user
   * @member {string} [value.user.authenticatedId] Authenticated ID of the user
   * @member {object} [value.cloud] Cloud info of the event
   * @member {string} [value.cloud.roleName] Role name of the cloud
   * @member {string} [value.cloud.roleInstance] Role instance of the cloud
   * @member {object} [value.ai] AI info of the event
   * @member {string} [value.ai.iKey] iKey of the app
   * @member {string} [value.ai.appName] Name of the application
   * @member {string} [value.ai.appId] ID of the application
   * @member {string} [value.ai.sdkVersion] SDK version of the application
   * @member {object} [value.application] Application info of the event
   * @member {string} [value.application.version] Version of the application
   * @member {object} [value.client] Client info of the event
   * @member {string} [value.client.model] Model of the client
   * @member {string} [value.client.os] Operating system of the client
   * @member {string} [value.client.type] Type of the client
   * @member {string} [value.client.browser] Browser of the client
   * @member {string} [value.client.ip] IP address of the client
   * @member {string} [value.client.city] City of the client
   * @member {string} [value.client.stateOrProvince] State or province of the
   * client
   * @member {string} [value.client.countryOrRegion] Country or region of the
   * client
   * @member {string} [value.type] Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of EventsResult
   *
   * @returns {object} metadata of EventsResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'eventsResult',
      type: {
        name: 'Composite',
        className: 'EventsResult',
        modelProperties: {
          aimessages: {
            required: false,
            serializedName: '@ai\\.messages',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ErrorInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'ErrorInfo'
                  }
              }
            }
          },
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'EventsResultData',
              className: 'EventsResultData'
            }
          }
        }
      }
    };
  }
}

module.exports = EventsResult;
