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

/**
 * Import database parameters.
 *
 * @extends models['ExportRequest']
 */
class ImportRequest extends models['ExportRequest'] {
  /**
   * Create a ImportRequest.
   * @property {string} databaseName The name of the database to import.
   * @property {string} edition The edition for the database being created.
   * Possible values include: 'Web', 'Business', 'Basic', 'Standard',
   * 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System',
   * 'System2'
   * @property {string} serviceObjectiveName The name of the service objective
   * to assign to the database. Possible values include: 'System', 'System0',
   * 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L',
   * 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7',
   * 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2',
   * 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600',
   * 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c',
   * 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c',
   * 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400',
   * 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'
   * @property {string} maxSizeBytes The maximum size for the newly imported
   * database.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ImportRequest
   *
   * @returns {object} metadata of ImportRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ImportRequest',
      type: {
        name: 'Composite',
        className: 'ImportRequest',
        modelProperties: {
          storageKeyType: {
            required: true,
            serializedName: 'storageKeyType',
            type: {
              name: 'Enum',
              allowedValues: [ 'StorageAccessKey', 'SharedAccessKey' ]
            }
          },
          storageKey: {
            required: true,
            serializedName: 'storageKey',
            type: {
              name: 'String'
            }
          },
          storageUri: {
            required: true,
            serializedName: 'storageUri',
            type: {
              name: 'String'
            }
          },
          administratorLogin: {
            required: true,
            serializedName: 'administratorLogin',
            type: {
              name: 'String'
            }
          },
          administratorLoginPassword: {
            required: true,
            serializedName: 'administratorLoginPassword',
            type: {
              name: 'String'
            }
          },
          authenticationType: {
            required: false,
            serializedName: 'authenticationType',
            defaultValue: 'SQL',
            type: {
              name: 'Enum',
              allowedValues: [ 'SQL', 'ADPassword' ]
            }
          },
          databaseName: {
            required: true,
            serializedName: 'databaseName',
            type: {
              name: 'String'
            }
          },
          edition: {
            required: true,
            serializedName: 'edition',
            type: {
              name: 'String'
            }
          },
          serviceObjectiveName: {
            required: true,
            serializedName: 'serviceObjectiveName',
            type: {
              name: 'String'
            }
          },
          maxSizeBytes: {
            required: true,
            serializedName: 'maxSizeBytes',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ImportRequest;
