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

/**
 * Represents the prediction request parameters.
 *
 */
class PredictionRequest {
  /**
   * Create a PredictionRequest.
   * @property {string} query The query to predict
   * @property {object} [options] The custom options defined for this request.
   * @property {date} [options.datetimeReference] The reference DateTime used
   * for predicting datetime entities.
   * @property {boolean} [options.overridePredictions] Whether to make the
   * external entities resolution override the predictions if an overlap
   * occurs.
   * @property {array} [externalEntities] The externally predicted entities for
   * this request
   * @property {array} [dynamicLists] The dynamically created list entities for
   * this request
   */
  constructor() {
  }

  /**
   * Defines the metadata of PredictionRequest
   *
   * @returns {object} metadata of PredictionRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PredictionRequest',
      type: {
        name: 'Composite',
        className: 'PredictionRequest',
        modelProperties: {
          query: {
            required: true,
            serializedName: 'query',
            type: {
              name: 'String'
            }
          },
          options: {
            required: false,
            serializedName: 'options',
            type: {
              name: 'Composite',
              className: 'PredictionRequestOptions'
            }
          },
          externalEntities: {
            required: false,
            serializedName: 'externalEntities',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ExternalEntityElementType',
                  type: {
                    name: 'Composite',
                    className: 'ExternalEntity'
                  }
              }
            }
          },
          dynamicLists: {
            required: false,
            serializedName: 'dynamicLists',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DynamicListElementType',
                  type: {
                    name: 'Composite',
                    className: 'DynamicList'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = PredictionRequest;
