/*
 * 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 protected item representing SAP Hana Database.
 *
 * @extends models['AzureVmWorkloadProtectedItem']
 */
class AzureVmWorkloadSAPHanaDatabaseProtectedItem extends models['AzureVmWorkloadProtectedItem'] {
  /**
   * Create a AzureVmWorkloadSAPHanaDatabaseProtectedItem.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureVmWorkloadSAPHanaDatabaseProtectedItem
   *
   * @returns {object} metadata of AzureVmWorkloadSAPHanaDatabaseProtectedItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureVmWorkloadSAPHanaDatabase',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'protectedItemType',
          clientName: 'protectedItemType'
        },
        uberParent: 'ProtectedItem',
        className: 'AzureVmWorkloadSAPHanaDatabaseProtectedItem',
        modelProperties: {
          backupManagementType: {
            required: false,
            serializedName: 'backupManagementType',
            type: {
              name: 'String'
            }
          },
          workloadType: {
            required: false,
            serializedName: 'workloadType',
            type: {
              name: 'String'
            }
          },
          containerName: {
            required: false,
            serializedName: 'containerName',
            type: {
              name: 'String'
            }
          },
          sourceResourceId: {
            required: false,
            serializedName: 'sourceResourceId',
            type: {
              name: 'String'
            }
          },
          policyId: {
            required: false,
            serializedName: 'policyId',
            type: {
              name: 'String'
            }
          },
          lastRecoveryPoint: {
            required: false,
            serializedName: 'lastRecoveryPoint',
            type: {
              name: 'DateTime'
            }
          },
          backupSetName: {
            required: false,
            serializedName: 'backupSetName',
            type: {
              name: 'String'
            }
          },
          createMode: {
            required: false,
            serializedName: 'createMode',
            type: {
              name: 'String'
            }
          },
          protectedItemType: {
            required: true,
            serializedName: 'protectedItemType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          serverName: {
            required: false,
            serializedName: 'serverName',
            type: {
              name: 'String'
            }
          },
          parentName: {
            required: false,
            serializedName: 'parentName',
            type: {
              name: 'String'
            }
          },
          parentType: {
            required: false,
            serializedName: 'parentType',
            type: {
              name: 'String'
            }
          },
          protectionStatus: {
            required: false,
            serializedName: 'protectionStatus',
            type: {
              name: 'String'
            }
          },
          protectionState: {
            required: false,
            serializedName: 'protectionState',
            type: {
              name: 'String'
            }
          },
          lastBackupStatus: {
            required: false,
            serializedName: 'lastBackupStatus',
            type: {
              name: 'String'
            }
          },
          lastBackupTime: {
            required: false,
            serializedName: 'lastBackupTime',
            type: {
              name: 'DateTime'
            }
          },
          lastBackupErrorDetail: {
            required: false,
            serializedName: 'lastBackupErrorDetail',
            type: {
              name: 'Composite',
              className: 'ErrorDetail'
            }
          },
          protectedItemDataSourceId: {
            required: false,
            serializedName: 'protectedItemDataSourceId',
            type: {
              name: 'String'
            }
          },
          protectedItemHealthStatus: {
            required: false,
            serializedName: 'protectedItemHealthStatus',
            type: {
              name: 'String'
            }
          },
          extendedInfo: {
            required: false,
            serializedName: 'extendedInfo',
            type: {
              name: 'Composite',
              className: 'AzureVmWorkloadProtectedItemExtendedInfo'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureVmWorkloadSAPHanaDatabaseProtectedItem;
