/*
 * 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 partition information for the name as a string that is based
 * on partition schemes.
 *
 * @extends models['PartitionInformation']
 */
class NamedPartitionInformation extends models['PartitionInformation'] {
  /**
   * Create a NamedPartitionInformation.
   * @property {string} [name] Name of the partition.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of NamedPartitionInformation
   *
   * @returns {object} metadata of NamedPartitionInformation
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Named',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'ServicePartitionKind',
          clientName: 'servicePartitionKind'
        },
        uberParent: 'PartitionInformation',
        className: 'NamedPartitionInformation',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'Id',
            type: {
              name: 'String'
            }
          },
          servicePartitionKind: {
            required: true,
            serializedName: 'ServicePartitionKind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'Name',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = NamedPartitionInformation;
