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

/**
 * Hyper-V Replica Azure specific protection profile details.
 *
 * @extends models['PolicyProviderSpecificDetails']
 */
class HyperVReplicaAzurePolicyDetails extends models['PolicyProviderSpecificDetails'] {
  /**
   * Create a HyperVReplicaAzurePolicyDetails.
   * @member {number} [recoveryPointHistoryDurationInHours] The duration (in
   * hours) to which point the recovery history needs to be maintained.
   * @member {number} [applicationConsistentSnapshotFrequencyInHours] The
   * interval (in hours) at which Hyper-V Replica should create an application
   * consistent snapshot within the VM.
   * @member {number} [replicationInterval] The replication interval.
   * @member {string} [onlineReplicationStartTime] The scheduled start time for
   * the initial replication. If this parameter is Null, the initial
   * replication starts immediately.
   * @member {string} [encryption] A value indicating whether encryption is
   * enabled for virtual machines in this cloud.
   * @member {string} [activeStorageAccountId] The active storage account Id.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HyperVReplicaAzurePolicyDetails
   *
   * @returns {object} metadata of HyperVReplicaAzurePolicyDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HyperVReplicaAzure',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'PolicyProviderSpecificDetails',
        className: 'HyperVReplicaAzurePolicyDetails',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          recoveryPointHistoryDurationInHours: {
            required: false,
            serializedName: 'recoveryPointHistoryDurationInHours',
            type: {
              name: 'Number'
            }
          },
          applicationConsistentSnapshotFrequencyInHours: {
            required: false,
            serializedName: 'applicationConsistentSnapshotFrequencyInHours',
            type: {
              name: 'Number'
            }
          },
          replicationInterval: {
            required: false,
            serializedName: 'replicationInterval',
            type: {
              name: 'Number'
            }
          },
          onlineReplicationStartTime: {
            required: false,
            serializedName: 'onlineReplicationStartTime',
            type: {
              name: 'String'
            }
          },
          encryption: {
            required: false,
            serializedName: 'encryption',
            type: {
              name: 'String'
            }
          },
          activeStorageAccountId: {
            required: false,
            serializedName: 'activeStorageAccountId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = HyperVReplicaAzurePolicyDetails;
