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

/**
 * SAPHana specific recoverypoint, specifcally encaspulates full/diff
 * recoverypoints
 *
 * @extends models['RecoveryPoint']
 */
class AzureWorkloadSAPHanaRecoveryPoint extends models['RecoveryPoint'] {
  /**
   * Create a AzureWorkloadSAPHanaRecoveryPoint.
   * @member {date} [recoveryPointTimeInUTC] UTC time at which recoverypoint
   * was created
   * @member {string} [type] Type of restore point. Possible values include:
   * 'Invalid', 'Full', 'Log', 'Differential'
   */
  constructor() {
    super();
  }

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

module.exports = AzureWorkloadSAPHanaRecoveryPoint;
