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

/**
 * Recovery point specific to PointInTime
 *
 * @extends models['AzureWorkloadSQLRecoveryPoint']
 */
class AzureWorkloadSQLPointInTimeRecoveryPoint extends models['AzureWorkloadSQLRecoveryPoint'] {
  /**
   * Create a AzureWorkloadSQLPointInTimeRecoveryPoint.
   * @member {array} [timeRanges] List of log ranges
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureWorkloadSQLPointInTimeRecoveryPoint
   *
   * @returns {object} metadata of AzureWorkloadSQLPointInTimeRecoveryPoint
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureWorkloadSQLPointInTimeRecoveryPoint',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'objectType',
          clientName: 'objectType'
        },
        uberParent: 'RecoveryPoint',
        className: 'AzureWorkloadSQLPointInTimeRecoveryPoint',
        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'
            }
          },
          timeRanges: {
            required: false,
            serializedName: 'timeRanges',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PointInTimeRangeElementType',
                  type: {
                    name: 'Composite',
                    className: 'PointInTimeRange'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = AzureWorkloadSQLPointInTimeRecoveryPoint;
