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

/**
 * AzureWorkload workload-specific backup request.
 *
 * @extends models['BackupRequest']
 */
class AzureWorkloadBackupRequest extends models['BackupRequest'] {
  /**
   * Create a AzureWorkloadBackupRequest.
   * @member {string} [backupType] Type of backup, viz. Full, Differential, Log
   * or CopyOnlyFull. Possible values include: 'Invalid', 'Full',
   * 'Differential', 'Log', 'CopyOnlyFull'
   * @member {boolean} [enableCompression] Bool for Compression setting
   * @member {date} [recoveryPointExpiryTimeInUTC] Backup copy will expire
   * after the time specified (UTC).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureWorkloadBackupRequest
   *
   * @returns {object} metadata of AzureWorkloadBackupRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureWorkloadBackupRequest',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'objectType',
          clientName: 'objectType'
        },
        uberParent: 'BackupRequest',
        className: 'AzureWorkloadBackupRequest',
        modelProperties: {
          objectType: {
            required: true,
            serializedName: 'objectType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          backupType: {
            required: false,
            serializedName: 'backupType',
            type: {
              name: 'String'
            }
          },
          enableCompression: {
            required: false,
            serializedName: 'enableCompression',
            type: {
              name: 'Boolean'
            }
          },
          recoveryPointExpiryTimeInUTC: {
            required: false,
            serializedName: 'recoveryPointExpiryTimeInUTC',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureWorkloadBackupRequest;
