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

/**
 * InMage Azure V2 input to update replication protected item.
 *
 * @extends models['UpdateReplicationProtectedItemProviderInput']
 */
class A2AUpdateReplicationProtectedItemInput extends models['UpdateReplicationProtectedItemProviderInput'] {
  /**
   * Create a A2AUpdateReplicationProtectedItemInput.
   * @member {string} [recoveryCloudServiceId] The target cloud service ARM Id
   * (for V1).
   * @member {string} [recoveryResourceGroupId] The target resource group ARM
   * Id (for V2).
   * @member {array} [managedDiskUpdateDetails] Managed disk update details.
   * @member {string} [recoveryBootDiagStorageAccountId] The boot diagnostic
   * storage account.
   * @member {object} [diskEncryptionInfo] The recovery os disk encryption
   * information.
   * @member {object} [diskEncryptionInfo.diskEncryptionKeyInfo] The recovery
   * KeyVault reference for secret.
   * @member {string}
   * [diskEncryptionInfo.diskEncryptionKeyInfo.secretIdentifier] The secret url
   * / identifier.
   * @member {string}
   * [diskEncryptionInfo.diskEncryptionKeyInfo.keyVaultResourceArmId] The
   * KeyVault resource ARM id for secret.
   * @member {object} [diskEncryptionInfo.keyEncryptionKeyInfo] The recovery
   * KeyVault reference for key.
   * @member {string} [diskEncryptionInfo.keyEncryptionKeyInfo.keyIdentifier]
   * The key url / identifier.
   * @member {string}
   * [diskEncryptionInfo.keyEncryptionKeyInfo.keyVaultResourceArmId] The
   * KeyVault resource ARM id for key.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of A2AUpdateReplicationProtectedItemInput
   *
   * @returns {object} metadata of A2AUpdateReplicationProtectedItemInput
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'A2A',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'instanceType',
          clientName: 'instanceType'
        },
        uberParent: 'UpdateReplicationProtectedItemProviderInput',
        className: 'A2AUpdateReplicationProtectedItemInput',
        modelProperties: {
          instanceType: {
            required: true,
            serializedName: 'instanceType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          recoveryCloudServiceId: {
            required: false,
            serializedName: 'recoveryCloudServiceId',
            type: {
              name: 'String'
            }
          },
          recoveryResourceGroupId: {
            required: false,
            serializedName: 'recoveryResourceGroupId',
            type: {
              name: 'String'
            }
          },
          managedDiskUpdateDetails: {
            required: false,
            serializedName: 'managedDiskUpdateDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'A2AVmManagedDiskUpdateDetailsElementType',
                  type: {
                    name: 'Composite',
                    className: 'A2AVmManagedDiskUpdateDetails'
                  }
              }
            }
          },
          recoveryBootDiagStorageAccountId: {
            required: false,
            serializedName: 'recoveryBootDiagStorageAccountId',
            type: {
              name: 'String'
            }
          },
          diskEncryptionInfo: {
            required: false,
            serializedName: 'diskEncryptionInfo',
            type: {
              name: 'Composite',
              className: 'DiskEncryptionInfo'
            }
          }
        }
      }
    };
  }
}

module.exports = A2AUpdateReplicationProtectedItemInput;
