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

/**
 * Protectable item for Azure Fileshare workloads.
 *
 * @extends models['WorkloadProtectableItem']
 */
class AzureFileShareProtectableItem extends models['WorkloadProtectableItem'] {
  /**
   * Create a AzureFileShareProtectableItem.
   * @member {string} [parentContainerFabricId] Full Fabric ID of container to
   * which this protectable item belongs. For example, ARM ID.
   * @member {string} [parentContainerFriendlyName] Friendly name of container
   * to which this protectable item belongs.
   * @member {string} [azureFileShareType] File Share type XSync or XSMB.
   * Possible values include: 'Invalid', 'XSMB', 'XSync'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureFileShareProtectableItem
   *
   * @returns {object} metadata of AzureFileShareProtectableItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureFileShare',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'protectableItemType',
          clientName: 'protectableItemType'
        },
        uberParent: 'WorkloadProtectableItem',
        className: 'AzureFileShareProtectableItem',
        modelProperties: {
          backupManagementType: {
            required: false,
            serializedName: 'backupManagementType',
            type: {
              name: 'String'
            }
          },
          workloadType: {
            required: false,
            serializedName: 'workloadType',
            type: {
              name: 'String'
            }
          },
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          protectionState: {
            required: false,
            serializedName: 'protectionState',
            type: {
              name: 'String'
            }
          },
          protectableItemType: {
            required: true,
            serializedName: 'protectableItemType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          parentContainerFabricId: {
            required: false,
            serializedName: 'parentContainerFabricId',
            type: {
              name: 'String'
            }
          },
          parentContainerFriendlyName: {
            required: false,
            serializedName: 'parentContainerFriendlyName',
            type: {
              name: 'String'
            }
          },
          azureFileShareType: {
            required: false,
            serializedName: 'azureFileShareType',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureFileShareProtectableItem;
