/*
 * 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 recoverable database
 *
 * @extends models['ProxyResource']
 */
class RecoverableDatabase extends models['ProxyResource'] {
  /**
   * Create a RecoverableDatabase.
   * @property {string} [edition] The edition of the database
   * @property {string} [serviceLevelObjective] The service level objective
   * name of the database
   * @property {string} [elasticPoolName] The elastic pool name of the database
   * @property {date} [lastAvailableBackupDate] The last available backup date
   * of the database (ISO8601 format)
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RecoverableDatabase
   *
   * @returns {object} metadata of RecoverableDatabase
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecoverableDatabase',
      type: {
        name: 'Composite',
        className: 'RecoverableDatabase',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          edition: {
            required: false,
            readOnly: true,
            serializedName: 'properties.edition',
            type: {
              name: 'String'
            }
          },
          serviceLevelObjective: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serviceLevelObjective',
            type: {
              name: 'String'
            }
          },
          elasticPoolName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.elasticPoolName',
            type: {
              name: 'String'
            }
          },
          lastAvailableBackupDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.lastAvailableBackupDate',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = RecoverableDatabase;
