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

/**
 * Database backup settings.
 *
 */
class DatabaseBackupSetting {
  /**
   * Create a DatabaseBackupSetting.
   * @member {string} databaseType Database type (e.g. SqlAzure / MySql).
   * Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql'
   * @member {string} [name]
   * @member {string} [connectionStringName] Contains a connection string name
   * that is linked to the SiteConfig.ConnectionStrings.
   * This is used during restore with overwrite connection strings options.
   * @member {string} [connectionString] Contains a connection string to a
   * database which is being backed up or restored. If the restore should
   * happen to a new database, the database name inside is the new one.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DatabaseBackupSetting
   *
   * @returns {object} metadata of DatabaseBackupSetting
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DatabaseBackupSetting',
      type: {
        name: 'Composite',
        className: 'DatabaseBackupSetting',
        modelProperties: {
          databaseType: {
            required: true,
            serializedName: 'databaseType',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          connectionStringName: {
            required: false,
            serializedName: 'connectionStringName',
            type: {
              name: 'String'
            }
          },
          connectionString: {
            required: false,
            serializedName: 'connectionString',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DatabaseBackupSetting;
