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

/**
 * SQL specific recoverypoint, specifcally encaspulates full/diff recoverypoint
 * alongwith extended info
 *
 * @extends models['AzureWorkloadRecoveryPoint']
 */
class AzureWorkloadSQLRecoveryPoint extends models['AzureWorkloadRecoveryPoint'] {
  /**
   * Create a AzureWorkloadSQLRecoveryPoint.
   * @member {object} [extendedInfo] Extended Info that provides data directory
   * details. Will be populated in two cases:
   * When a specific recovery point is accessed using GetRecoveryPoint
   * Or when ListRecoveryPoints is called for Log RP only with ExtendedInfo
   * query filter
   * @member {date} [extendedInfo.dataDirectoryTimeInUTC] UTC time at which
   * data directory info was captured
   * @member {array} [extendedInfo.dataDirectoryPaths] List of data directory
   * paths during restore operation.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureWorkloadSQLRecoveryPoint
   *
   * @returns {object} metadata of AzureWorkloadSQLRecoveryPoint
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureWorkloadSQLRecoveryPoint',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'objectType',
          clientName: 'objectType'
        },
        uberParent: 'RecoveryPoint',
        className: 'AzureWorkloadSQLRecoveryPoint',
        modelProperties: {
          objectType: {
            required: true,
            serializedName: 'objectType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          recoveryPointTimeInUTC: {
            required: false,
            serializedName: 'recoveryPointTimeInUTC',
            type: {
              name: 'DateTime'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          extendedInfo: {
            required: false,
            serializedName: 'extendedInfo',
            type: {
              name: 'Composite',
              className: 'AzureWorkloadSQLRecoveryPointExtendedInfo'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureWorkloadSQLRecoveryPoint;
