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

/**
 * Database restore points.
 *
 * @extends models['ProxyResource']
 */
class RestorePoint extends models['ProxyResource'] {
  /**
   * Create a RestorePoint.
   * @property {string} [location] Resource location.
   * @property {string} [restorePointType] The type of restore point. Possible
   * values include: 'CONTINUOUS', 'DISCRETE'
   * @property {date} [earliestRestoreDate] The earliest time to which this
   * database can be restored
   * @property {date} [restorePointCreationDate] The time the backup was taken
   * @property {string} [restorePointLabel] The label of restore point for
   * backup request by user
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RestorePoint
   *
   * @returns {object} metadata of RestorePoint
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RestorePoint',
      type: {
        name: 'Composite',
        className: 'RestorePoint',
        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'
            }
          },
          location: {
            required: false,
            readOnly: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          restorePointType: {
            required: false,
            readOnly: true,
            serializedName: 'properties.restorePointType',
            type: {
              name: 'Enum',
              allowedValues: [ 'CONTINUOUS', 'DISCRETE' ]
            }
          },
          earliestRestoreDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.earliestRestoreDate',
            type: {
              name: 'DateTime'
            }
          },
          restorePointCreationDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.restorePointCreationDate',
            type: {
              name: 'DateTime'
            }
          },
          restorePointLabel: {
            required: false,
            readOnly: true,
            serializedName: 'properties.restorePointLabel',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = RestorePoint;
