# 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_4_0_36
  module Models
    #
    # Represents a backup point which can be used to trigger a restore.
    #
    class BackupInfo

      include MsRestAzure

      # @return Unique backup ID .
      attr_accessor :backup_id

      # @return Unique backup chain ID. All backups part of the same chain has
      # the same backup chain id. A backup chain is comprised of 1 full backup
      # and multiple incremental backups.
      attr_accessor :backup_chain_id

      # @return [String] Name of the Service Fabric application this partition
      # backup belongs to.
      attr_accessor :application_name

      # @return [String] Name of the Service Fabric service this partition
      # backup belongs to.
      attr_accessor :service_name

      # @return [PartitionInformation] Information about the partition to which
      # this backup belongs to
      attr_accessor :partition_information

      # @return [String] Location of the backup, relative to the backup store.
      attr_accessor :backup_location

      # @return [BackupType] Describes the type of backup, whether its full or
      # incremental. Possible values include: 'Invalid', 'Full', 'Incremental'
      attr_accessor :backup_type

      # @return [Epoch] Epoch of the last record in this backup.
      attr_accessor :epoch_of_last_backup_record

      # @return [String] LSN of the last record in this backup.
      attr_accessor :lsn_of_last_backup_record

      # @return [DateTime] The date time when this backup was taken.
      attr_accessor :creation_time_utc

      # @return [String] Manifest Version of the service this partition backup
      # belongs to.
      attr_accessor :service_manifest_version

      # @return [FabricErrorError] Denotes the failure encountered in getting
      # backup point information.
      attr_accessor :failure_error


      #
      # Mapper for BackupInfo class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'BackupInfo',
          type: {
            name: 'Composite',
            class_name: 'BackupInfo',
            model_properties: {
              backup_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'BackupId',
                type: {
                  name: 'String'
                }
              },
              backup_chain_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'BackupChainId',
                type: {
                  name: 'String'
                }
              },
              application_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ApplicationName',
                type: {
                  name: 'String'
                }
              },
              service_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ServiceName',
                type: {
                  name: 'String'
                }
              },
              partition_information: {
                client_side_validation: true,
                required: false,
                serialized_name: 'PartitionInformation',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'ServicePartitionKind',
                  uber_parent: 'PartitionInformation',
                  class_name: 'PartitionInformation'
                }
              },
              backup_location: {
                client_side_validation: true,
                required: false,
                serialized_name: 'BackupLocation',
                type: {
                  name: 'String'
                }
              },
              backup_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'BackupType',
                type: {
                  name: 'String'
                }
              },
              epoch_of_last_backup_record: {
                client_side_validation: true,
                required: false,
                serialized_name: 'EpochOfLastBackupRecord',
                type: {
                  name: 'Composite',
                  class_name: 'Epoch'
                }
              },
              lsn_of_last_backup_record: {
                client_side_validation: true,
                required: false,
                serialized_name: 'LsnOfLastBackupRecord',
                type: {
                  name: 'String'
                }
              },
              creation_time_utc: {
                client_side_validation: true,
                required: false,
                serialized_name: 'CreationTimeUtc',
                type: {
                  name: 'DateTime'
                }
              },
              service_manifest_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ServiceManifestVersion',
                type: {
                  name: 'String'
                }
              },
              failure_error: {
                client_side_validation: true,
                required: false,
                serialized_name: 'FailureError',
                type: {
                  name: 'Composite',
                  class_name: 'FabricErrorError'
                }
              }
            }
          }
        }
      end
    end
  end
end
