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

/**
 * Base class for container with backup items. Containers with specific
 * workloads are derived from this class.
 *
 */
class ProtectionContainer {
  /**
   * Create a ProtectionContainer.
   * @member {string} [friendlyName] Friendly name of the container.
   * @member {string} [backupManagementType] Type of backup managemenent for
   * the container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB',
   * 'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload',
   * 'DefaultBackup'
   * @member {string} [registrationStatus] Status of registration of the
   * container with the Recovery Services Vault.
   * @member {string} [healthStatus] Status of health of the container.
   * @member {string} containerType Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of ProtectionContainer
   *
   * @returns {object} metadata of ProtectionContainer
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ProtectionContainer',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'containerType',
          clientName: 'containerType'
        },
        uberParent: 'ProtectionContainer',
        className: 'ProtectionContainer',
        modelProperties: {
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          backupManagementType: {
            required: false,
            serializedName: 'backupManagementType',
            type: {
              name: 'String'
            }
          },
          registrationStatus: {
            required: false,
            serializedName: 'registrationStatus',
            type: {
              name: 'String'
            }
          },
          healthStatus: {
            required: false,
            serializedName: 'healthStatus',
            type: {
              name: 'String'
            }
          },
          containerType: {
            required: true,
            serializedName: 'containerType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ProtectionContainer;
