/*
 * 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 events query result.
 *
 */
class EventsResults {
  /**
   * Create a EventsResults.
   * @member {string} [odatacontext] OData context metadata endpoint for this
   * response
   * @member {array} [aimessages] OData messages for this response.
   * @member {array} [value] Contents of the events query result.
   */
  constructor() {
  }

  /**
   * Defines the metadata of EventsResults
   *
   * @returns {object} metadata of EventsResults
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'eventsResults',
      type: {
        name: 'Composite',
        className: 'EventsResults',
        modelProperties: {
          odatacontext: {
            required: false,
            serializedName: '@odata\\.context',
            type: {
              name: 'String'
            }
          },
          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: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'EventsResultDataElementType',
                  type: {
                    name: 'Composite',
                    polymorphicDiscriminator: {
                      serializedName: 'type',
                      clientName: 'type'
                    },
                    uberParent: 'EventsResultData',
                    className: 'EventsResultData'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = EventsResults;
