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

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

/**
 * A Data Lake Analytics catalog U-SQL type item.
 *
 * @extends models['CatalogItem']
 */
class USqlType extends models['CatalogItem'] {
  /**
   * Create a USqlType.
   * @member {string} [databaseName] the name of the database.
   * @member {string} [schemaName] the name of the schema associated with this
   * table and database.
   * @member {string} [name] the name of type for this type.
   * @member {string} [typeFamily] the type family for this type.
   * @member {string} [cSharpName] the C# name for this type.
   * @member {string} [fullCSharpName] the fully qualified C# name for this
   * type.
   * @member {number} [systemTypeId] the system type ID for this type.
   * @member {number} [userTypeId] the user type ID for this type.
   * @member {number} [schemaId] the schema ID for this type.
   * @member {number} [principalId] the principal ID for this type.
   * @member {boolean} [isNullable] the the switch indicating if this type is
   * nullable.
   * @member {boolean} [isUserDefined] the the switch indicating if this type
   * is user defined.
   * @member {boolean} [isAssemblyType] the the switch indicating if this type
   * is an assembly type.
   * @member {boolean} [isTableType] the the switch indicating if this type is
   * a table type.
   * @member {boolean} [isComplexType] the the switch indicating if this type
   * is a complex type.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of USqlType
   *
   * @returns {object} metadata of USqlType
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'USqlType',
      type: {
        name: 'Composite',
        className: 'USqlType',
        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'
            }
          }
        }
      }
    };
  }
}

module.exports = USqlType;
