# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ServiceFabric::V6_3_0_9
  module Models
    #
    # Information about the partition identity, partitioning scheme and keys
    # supported by it.
    #
    class PartitionInformation

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["Int64Range"] = "Int64RangePartitionInformation"
      @@discriminatorMap["Named"] = "NamedPartitionInformation"
      @@discriminatorMap["Singleton"] = "SingletonPartitionInformation"

      def initialize
        @ServicePartitionKind = "PartitionInformation"
      end

      attr_accessor :ServicePartitionKind

      # @return 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.
      attr_accessor :id


      #
      # Mapper for PartitionInformation class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'PartitionInformation',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'ServicePartitionKind',
            uber_parent: 'PartitionInformation',
            class_name: 'PartitionInformation',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Id',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
