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

/**
 * Data Table which defines columns and raw row values
 *
 */
class DataTableResponseObject {
  /**
   * Create a DataTableResponseObject.
   * @member {string} [tableName] Name of the table
   * @member {array} [columns] List of columns with data types
   * @member {array} [rows] Raw row values
   */
  constructor() {
  }

  /**
   * Defines the metadata of DataTableResponseObject
   *
   * @returns {object} metadata of DataTableResponseObject
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataTableResponseObject',
      type: {
        name: 'Composite',
        className: 'DataTableResponseObject',
        modelProperties: {
          tableName: {
            required: false,
            serializedName: 'tableName',
            type: {
              name: 'String'
            }
          },
          columns: {
            required: false,
            serializedName: 'columns',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DataTableResponseColumnElementType',
                  type: {
                    name: 'Composite',
                    className: 'DataTableResponseColumn'
                  }
              }
            }
          },
          rows: {
            required: false,
            serializedName: 'rows',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ArrayElementType',
                  type: {
                    name: 'Sequence',
                    element: {
                        required: false,
                        serializedName: 'StringElementType',
                        type: {
                          name: 'String'
                        }
                    }
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DataTableResponseObject;
