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

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the USqlIndex class.
 * @constructor
 * A Data Lake Analytics catalog U-SQL table index item.
 *
 * @member {string} [name] the name of the index in the table.
 * 
 * @member {array} [indexKeys] the list of directed columns in the index
 * 
 * @member {array} [columns] the list of columns in the index
 * 
 * @member {object} [distributionInfo] the distributions info of the index
 * 
 * @member {number} [distributionInfo.type] the type of this distribution.
 * 
 * @member {array} [distributionInfo.keys] the list of directed columns in the
 * distribution
 * 
 * @member {number} [distributionInfo.count] the count of indices using this
 * distribution.
 * 
 * @member {number} [distributionInfo.dynamicCount] the dynamic count of
 * indices using this distribution.
 * 
 * @member {uuid} [partitionFunction] partition function ID for the index.
 * 
 * @member {array} [partitionKeyList] the list of partion keys in the index
 * 
 * @member {array} [streamNames] the list of full paths to the streams that
 * contain this index in the DataLake account.
 * 
 * @member {boolean} [isColumnstore] the switch indicating if this index is a
 * columnstore index.
 * 
 * @member {number} [indexId] the ID of this index within the table.
 * 
 * @member {boolean} [isUnique] the switch indicating if this index is a
 * unique index.
 * 
 */
function USqlIndex() {
}

/**
 * Defines the metadata of USqlIndex
 *
 * @returns {object} metadata of USqlIndex
 *
 */
USqlIndex.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'USqlIndex',
    type: {
      name: 'Composite',
      className: 'USqlIndex',
      modelProperties: {
        name: {
          required: false,
          serializedName: 'name',
          type: {
            name: 'String'
          }
        },
        indexKeys: {
          required: false,
          serializedName: 'indexKeys',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'USqlDirectedColumnElementType',
                type: {
                  name: 'Composite',
                  className: 'USqlDirectedColumn'
                }
            }
          }
        },
        columns: {
          required: false,
          serializedName: 'columns',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        distributionInfo: {
          required: false,
          serializedName: 'distributionInfo',
          type: {
            name: 'Composite',
            className: 'USqlDistributionInfo'
          }
        },
        partitionFunction: {
          required: false,
          serializedName: 'partitionFunction',
          type: {
            name: 'String'
          }
        },
        partitionKeyList: {
          required: false,
          serializedName: 'partitionKeyList',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        streamNames: {
          required: false,
          serializedName: 'streamNames',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'StringElementType',
                type: {
                  name: 'String'
                }
            }
          }
        },
        isColumnstore: {
          required: false,
          serializedName: 'isColumnstore',
          type: {
            name: 'Boolean'
          }
        },
        indexId: {
          required: false,
          serializedName: 'indexId',
          type: {
            name: 'Number'
          }
        },
        isUnique: {
          required: false,
          serializedName: 'isUnique',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  };
};

module.exports = USqlIndex;
