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

/**
 * AzureFileShare Restore Request
 *
 * @extends models['RestoreRequest']
 */
class AzureFileShareRestoreRequest extends models['RestoreRequest'] {
  /**
   * Create a AzureFileShareRestoreRequest.
   * @member {string} [recoveryType] Type of this recovery. Possible values
   * include: 'Invalid', 'OriginalLocation', 'AlternateLocation',
   * 'RestoreDisks'
   * @member {string} [sourceResourceId] Source storage account ARM Id
   * @member {string} [copyOptions] Options to resolve copy conflicts. Possible
   * values include: 'Invalid', 'CreateCopy', 'Skip', 'Overwrite',
   * 'FailOnConflict'
   * @member {string} [restoreRequestType] Restore Type (FullShareRestore or
   * ItemLevelRestore). Possible values include: 'Invalid', 'FullShareRestore',
   * 'ItemLevelRestore'
   * @member {array} [restoreFileSpecs] List of Source Files/Folders(which need
   * to recover) and TargetFolderPath details
   * @member {object} [targetDetails] Target File Share Details
   * @member {string} [targetDetails.name] File share name
   * @member {string} [targetDetails.targetResourceId] Target file share
   * resource ARM ID
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureFileShareRestoreRequest
   *
   * @returns {object} metadata of AzureFileShareRestoreRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureFileShareRestoreRequest',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'objectType',
          clientName: 'objectType'
        },
        uberParent: 'RestoreRequest',
        className: 'AzureFileShareRestoreRequest',
        modelProperties: {
          objectType: {
            required: true,
            serializedName: 'objectType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          recoveryType: {
            required: false,
            serializedName: 'recoveryType',
            type: {
              name: 'String'
            }
          },
          sourceResourceId: {
            required: false,
            serializedName: 'sourceResourceId',
            type: {
              name: 'String'
            }
          },
          copyOptions: {
            required: false,
            serializedName: 'copyOptions',
            type: {
              name: 'String'
            }
          },
          restoreRequestType: {
            required: false,
            serializedName: 'restoreRequestType',
            type: {
              name: 'String'
            }
          },
          restoreFileSpecs: {
            required: false,
            serializedName: 'restoreFileSpecs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'RestoreFileSpecsElementType',
                  type: {
                    name: 'Composite',
                    className: 'RestoreFileSpecs'
                  }
              }
            }
          },
          targetDetails: {
            required: false,
            serializedName: 'targetDetails',
            type: {
              name: 'Composite',
              className: 'TargetAFSRestoreInfo'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureFileShareRestoreRequest;
