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

/**
 * The backup element.
 *
 */
class BackupElement {
  /**
   * Create a BackupElement.
   * @member {string} elementId The path ID that uniquely identifies the backup
   * element.
   * @member {string} elementName The name of the backup element.
   * @member {string} elementType The hierarchical type of the backup element.
   * @member {number} sizeInBytes The size in bytes.
   * @member {string} volumeName The name of the volume.
   * @member {string} volumeContainerId The path ID of the volume container.
   * @member {string} [volumeType] The volume type. Possible values include:
   * 'Tiered', 'Archival', 'LocallyPinned'
   */
  constructor() {
  }

  /**
   * Defines the metadata of BackupElement
   *
   * @returns {object} metadata of BackupElement
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BackupElement',
      type: {
        name: 'Composite',
        className: 'BackupElement',
        modelProperties: {
          elementId: {
            required: true,
            serializedName: 'elementId',
            type: {
              name: 'String'
            }
          },
          elementName: {
            required: true,
            serializedName: 'elementName',
            type: {
              name: 'String'
            }
          },
          elementType: {
            required: true,
            serializedName: 'elementType',
            type: {
              name: 'String'
            }
          },
          sizeInBytes: {
            required: true,
            serializedName: 'sizeInBytes',
            type: {
              name: 'Number'
            }
          },
          volumeName: {
            required: true,
            serializedName: 'volumeName',
            type: {
              name: 'String'
            }
          },
          volumeContainerId: {
            required: true,
            serializedName: 'volumeContainerId',
            type: {
              name: 'String'
            }
          },
          volumeType: {
            required: false,
            serializedName: 'volumeType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Tiered', 'Archival', 'LocallyPinned' ]
            }
          }
        }
      }
    };
  }
}

module.exports = BackupElement;
