/*
 * 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 long term retention backup.
 *
 * @extends models['ProxyResource']
 */
class LongTermRetentionBackup extends models['ProxyResource'] {
  /**
   * Create a LongTermRetentionBackup.
   * @property {string} [serverName] The server name that the backup database
   * belong to.
   * @property {date} [serverCreateTime] The create time of the server.
   * @property {string} [databaseName] The name of the database the backup
   * belong to
   * @property {date} [databaseDeletionTime] The delete time of the database
   * @property {date} [backupTime] The time the backup was taken
   * @property {date} [backupExpirationTime] The time the long term retention
   * backup will expire.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of LongTermRetentionBackup
   *
   * @returns {object} metadata of LongTermRetentionBackup
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LongTermRetentionBackup',
      type: {
        name: 'Composite',
        className: 'LongTermRetentionBackup',
        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'
            }
          },
          serverName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serverName',
            type: {
              name: 'String'
            }
          },
          serverCreateTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serverCreateTime',
            type: {
              name: 'DateTime'
            }
          },
          databaseName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.databaseName',
            type: {
              name: 'String'
            }
          },
          databaseDeletionTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.databaseDeletionTime',
            type: {
              name: 'DateTime'
            }
          },
          backupTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.backupTime',
            type: {
              name: 'DateTime'
            }
          },
          backupExpirationTime: {
            required: false,
            readOnly: true,
            serializedName: 'properties.backupExpirationTime',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = LongTermRetentionBackup;
