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

/**
 * Describes the parameters for file share storage used for storing or
 * enumerating backups.
 *
 * @extends models['BackupStorageDescription']
 */
class FileShareBackupStorageDescription extends models['BackupStorageDescription'] {
  /**
   * Create a FileShareBackupStorageDescription.
   * @property {string} path UNC path of the file share where to store or
   * enumerate backups from.
   * @property {string} [primaryUserName] Primary user name to access the file
   * share.
   * @property {string} [primaryPassword] Primary password to access the share
   * location.
   * @property {string} [secondaryUserName] Secondary user name to access the
   * file share.
   * @property {string} [secondaryPassword] Secondary password to access the
   * share location
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of FileShareBackupStorageDescription
   *
   * @returns {object} metadata of FileShareBackupStorageDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FileShare',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'StorageKind',
          clientName: 'storageKind'
        },
        uberParent: 'BackupStorageDescription',
        className: 'FileShareBackupStorageDescription',
        modelProperties: {
          friendlyName: {
            required: false,
            serializedName: 'FriendlyName',
            type: {
              name: 'String'
            }
          },
          storageKind: {
            required: true,
            serializedName: 'StorageKind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          path: {
            required: true,
            serializedName: 'Path',
            type: {
              name: 'String'
            }
          },
          primaryUserName: {
            required: false,
            serializedName: 'PrimaryUserName',
            type: {
              name: 'String'
            }
          },
          primaryPassword: {
            required: false,
            serializedName: 'PrimaryPassword',
            type: {
              name: 'String'
            }
          },
          secondaryUserName: {
            required: false,
            serializedName: 'SecondaryUserName',
            type: {
              name: 'String'
            }
          },
          secondaryPassword: {
            required: false,
            serializedName: 'SecondaryPassword',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = FileShareBackupStorageDescription;
