/*
 * 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 a volume whose lifetime is scoped to the application's lifetime.
 *
 * @extends models['VolumeReference']
 */
class ApplicationScopedVolume extends models['VolumeReference'] {
  /**
   * Create a ApplicationScopedVolume.
   * @property {object} creationParameters Describes parameters for creating
   * application-scoped volumes.
   * @property {string} [creationParameters.description] User readable
   * description of the volume.
   * @property {string} [creationParameters.kind] Polymorphic Discriminator
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ApplicationScopedVolume
   *
   * @returns {object} metadata of ApplicationScopedVolume
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationScopedVolume',
      type: {
        name: 'Composite',
        className: 'ApplicationScopedVolume',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          readOnly: {
            required: false,
            serializedName: 'readOnly',
            type: {
              name: 'Boolean'
            }
          },
          destinationPath: {
            required: true,
            serializedName: 'destinationPath',
            type: {
              name: 'String'
            }
          },
          creationParameters: {
            required: true,
            serializedName: 'creationParameters',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'kind',
                clientName: 'kind'
              },
              uberParent: 'ApplicationScopedVolumeCreationParameters',
              className: 'ApplicationScopedVolumeCreationParameters'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationScopedVolume;
