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

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

  /**
   * Defines the metadata of EventsResultData
   *
   * @returns {object} metadata of EventsResultData
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'eventsResultData',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'EventsResultData',
        className: 'EventsResultData',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          count: {
            required: false,
            serializedName: 'count',
            type: {
              name: 'Number'
            }
          },
          timestamp: {
            required: false,
            serializedName: 'timestamp',
            type: {
              name: 'DateTime'
            }
          },
          customDimensions: {
            required: false,
            serializedName: 'customDimensions',
            type: {
              name: 'Composite',
              className: 'EventsResultDataCustomDimensions'
            }
          },
          customMeasurements: {
            required: false,
            serializedName: 'customMeasurements',
            type: {
              name: 'Composite',
              className: 'EventsResultDataCustomMeasurements'
            }
          },
          operation: {
            required: false,
            serializedName: 'operation',
            type: {
              name: 'Composite',
              className: 'EventsOperationInfo'
            }
          },
          session: {
            required: false,
            serializedName: 'session',
            type: {
              name: 'Composite',
              className: 'EventsSessionInfo'
            }
          },
          user: {
            required: false,
            serializedName: 'user',
            type: {
              name: 'Composite',
              className: 'EventsUserInfo'
            }
          },
          cloud: {
            required: false,
            serializedName: 'cloud',
            type: {
              name: 'Composite',
              className: 'EventsCloudInfo'
            }
          },
          ai: {
            required: false,
            serializedName: 'ai',
            type: {
              name: 'Composite',
              className: 'EventsAiInfo'
            }
          },
          application: {
            required: false,
            serializedName: 'application',
            type: {
              name: 'Composite',
              className: 'EventsApplicationInfo'
            }
          },
          client: {
            required: false,
            serializedName: 'client',
            type: {
              name: 'Composite',
              className: 'EventsClientInfo'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = EventsResultData;
