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

/**
 * Summarize action results.
 *
 */
class SummarizeResults {
  /**
   * Create a SummarizeResults.
   * @property {string} [odatacontext] OData context string; used by OData
   * clients to resolve type information based on metadata.
   * @property {number} [odatacount] OData entity count; represents the number
   * of summaries returned; always set to 1.
   * @property {array} [value] Summarize action results.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SummarizeResults
   *
   * @returns {object} metadata of SummarizeResults
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SummarizeResults',
      type: {
        name: 'Composite',
        className: 'SummarizeResults',
        modelProperties: {
          odatacontext: {
            required: false,
            serializedName: '@odata\\.context',
            type: {
              name: 'String'
            }
          },
          odatacount: {
            required: false,
            serializedName: '@odata\\.count',
            constraints: {
              InclusiveMaximum: 1,
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SummaryElementType',
                  type: {
                    name: 'Composite',
                    className: 'Summary'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = SummarizeResults;
