/*
 * 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 USqlTableType class.
 * @constructor
 * A Data Lake Analytics catalog U-SQL table type item.
 *
 * @member {array} [columns] the type field information associated with this
 * table type.
 * 
 */
function USqlTableType() {
  USqlTableType['super_'].call(this);
}

util.inherits(USqlTableType, models['USqlType']);

/**
 * Defines the metadata of USqlTableType
 *
 * @returns {object} metadata of USqlTableType
 *
 */
USqlTableType.prototype.mapper = function () {
  return {
    required: false,
    serializedName: 'USqlTableType',
    type: {
      name: 'Composite',
      className: 'USqlTableType',
      modelProperties: {
        computeAccountName: {
          required: false,
          serializedName: 'computeAccountName',
          type: {
            name: 'String'
          }
        },
        version: {
          required: false,
          serializedName: 'version',
          type: {
            name: 'String'
          }
        },
        databaseName: {
          required: false,
          serializedName: 'databaseName',
          type: {
            name: 'String'
          }
        },
        schemaName: {
          required: false,
          serializedName: 'schemaName',
          type: {
            name: 'String'
          }
        },
        name: {
          required: false,
          serializedName: 'typeName',
          type: {
            name: 'String'
          }
        },
        typeFamily: {
          required: false,
          serializedName: 'typeFamily',
          type: {
            name: 'String'
          }
        },
        cSharpName: {
          required: false,
          serializedName: 'cSharpName',
          type: {
            name: 'String'
          }
        },
        fullCSharpName: {
          required: false,
          serializedName: 'fullCSharpName',
          type: {
            name: 'String'
          }
        },
        systemTypeId: {
          required: false,
          serializedName: 'systemTypeId',
          type: {
            name: 'Number'
          }
        },
        userTypeId: {
          required: false,
          serializedName: 'userTypeId',
          type: {
            name: 'Number'
          }
        },
        schemaId: {
          required: false,
          serializedName: 'schemaId',
          type: {
            name: 'Number'
          }
        },
        principalId: {
          required: false,
          serializedName: 'principalId',
          type: {
            name: 'Number'
          }
        },
        isNullable: {
          required: false,
          serializedName: 'isNullable',
          type: {
            name: 'Boolean'
          }
        },
        isUserDefined: {
          required: false,
          serializedName: 'isUserDefined',
          type: {
            name: 'Boolean'
          }
        },
        isAssemblyType: {
          required: false,
          serializedName: 'isAssemblyType',
          type: {
            name: 'Boolean'
          }
        },
        isTableType: {
          required: false,
          serializedName: 'isTableType',
          type: {
            name: 'Boolean'
          }
        },
        isComplexType: {
          required: false,
          serializedName: 'isComplexType',
          type: {
            name: 'Boolean'
          }
        },
        columns: {
          required: false,
          readOnly: true,
          serializedName: 'columns',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serializedName: 'TypeFieldInfoElementType',
                type: {
                  name: 'Composite',
                  className: 'TypeFieldInfo'
                }
            }
          }
        }
      }
    }
  };
};

module.exports = USqlTableType;
