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

/**
 * Information about the partition identity, partitioning scheme and keys
 * supported by it.
 *
 */
class PartitionInformation {
  /**
   * Create a PartitionInformation.
   * @property {uuid} [id] An internal ID used by Service Fabric to uniquely
   * identify a partition. This is a randomly generated GUID when the service
   * was created. The partition ID is unique and does not change for the
   * lifetime of the service. If the same service was deleted and recreated the
   * IDs of its partitions would be different.
   * @property {string} servicePartitionKind Polymorphic Discriminator
   */
  constructor() {
  }

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

module.exports = PartitionInformation;
