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

/**
 * Azure VM workload-specific workload item representing SAP Hana Database.
 *
 * @extends models['AzureVmWorkloadItem']
 */
class AzureVmWorkloadSAPHanaDatabaseWorkloadItem extends models['AzureVmWorkloadItem'] {
  /**
   * Create a AzureVmWorkloadSAPHanaDatabaseWorkloadItem.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureVmWorkloadSAPHanaDatabaseWorkloadItem
   *
   * @returns {object} metadata of AzureVmWorkloadSAPHanaDatabaseWorkloadItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SAPHanaDatabase',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'workloadItemType',
          clientName: 'workloadItemType'
        },
        uberParent: 'WorkloadItem',
        className: 'AzureVmWorkloadSAPHanaDatabaseWorkloadItem',
        modelProperties: {
          backupManagementType: {
            required: false,
            serializedName: 'backupManagementType',
            type: {
              name: 'String'
            }
          },
          workloadType: {
            required: false,
            serializedName: 'workloadType',
            type: {
              name: 'String'
            }
          },
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          protectionState: {
            required: false,
            serializedName: 'protectionState',
            type: {
              name: 'String'
            }
          },
          workloadItemType: {
            required: true,
            serializedName: 'workloadItemType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          parentName: {
            required: false,
            serializedName: 'parentName',
            type: {
              name: 'String'
            }
          },
          serverName: {
            required: false,
            serializedName: 'serverName',
            type: {
              name: 'String'
            }
          },
          isAutoProtectable: {
            required: false,
            serializedName: 'isAutoProtectable',
            type: {
              name: 'Boolean'
            }
          },
          subinquireditemcount: {
            required: false,
            serializedName: 'subinquireditemcount',
            type: {
              name: 'Number'
            }
          },
          subWorkloadItemCount: {
            required: false,
            serializedName: 'subWorkloadItemCount',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureVmWorkloadSAPHanaDatabaseWorkloadItem;
