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

/**
 * Base class representing a recovery point.
 *
 * @extends models['Resource']
 */
class RecoveryPoint extends models['Resource'] {
  /**
   * Create a RecoveryPoint.
   * @member {object} [properties] Recovery point related data.
   * @member {date} [properties.recoveryPointTime] The recovery point time.
   * @member {string} [properties.recoveryPointType] The recovery point type:
   * ApplicationConsistent, CrashConsistent.
   * @member {object} [properties.providerSpecificDetails] The provider
   * specific details for the recovery point.
   * @member {string} [properties.providerSpecificDetails.instanceType]
   * Polymorphic Discriminator
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RecoveryPoint
   *
   * @returns {object} metadata of RecoveryPoint
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecoveryPoint',
      type: {
        name: 'Composite',
        className: 'RecoveryPoint',
        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,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'RecoveryPointProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = RecoveryPoint;
