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

/**
 * The clone job request.
 *
 */
class CloneRequest {
  /**
   * Create a CloneRequest.
   * @member {string} targetDeviceId The path ID of the device which will act
   * as the clone target.
   * @member {string} targetVolumeName The name of the new volume which will be
   * created and the backup will be cloned into.
   * @member {array} targetAccessControlRecordIds The list of path IDs of the
   * access control records to be associated to the new cloned volume.
   * @member {object} backupElement The backup element that is cloned.
   * @member {string} [backupElement.elementId] The path ID that uniquely
   * identifies the backup element.
   * @member {string} [backupElement.elementName] The name of the backup
   * element.
   * @member {string} [backupElement.elementType] The hierarchical type of the
   * backup element.
   * @member {number} [backupElement.sizeInBytes] The size in bytes.
   * @member {string} [backupElement.volumeName] The name of the volume.
   * @member {string} [backupElement.volumeContainerId] The path ID of the
   * volume container.
   * @member {string} [backupElement.volumeType] The volume type. Possible
   * values include: 'Tiered', 'Archival', 'LocallyPinned'
   */
  constructor() {
  }

  /**
   * Defines the metadata of CloneRequest
   *
   * @returns {object} metadata of CloneRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CloneRequest',
      type: {
        name: 'Composite',
        className: 'CloneRequest',
        modelProperties: {
          targetDeviceId: {
            required: true,
            serializedName: 'targetDeviceId',
            type: {
              name: 'String'
            }
          },
          targetVolumeName: {
            required: true,
            serializedName: 'targetVolumeName',
            type: {
              name: 'String'
            }
          },
          targetAccessControlRecordIds: {
            required: true,
            serializedName: 'targetAccessControlRecordIds',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          backupElement: {
            required: true,
            serializedName: 'backupElement',
            type: {
              name: 'Composite',
              className: 'BackupElement'
            }
          }
        }
      }
    };
  }
}

module.exports = CloneRequest;
