# 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_2_0_9
  module Models
    #
    # Describes additional filters to be applied, while listing backups, and
    # backup storage details from where to fetch the backups.
    #
    class GetBackupByStorageQueryDescription

      include MsRestAzure

      # @return [DateTime] Specifies the start date time in ISO8601 from which
      # to enumerate backups. If not specified, backups are enumerated from the
      # beginning.
      attr_accessor :start_date_time_filter

      # @return [DateTime] Specifies the end date time in ISO8601 till which to
      # enumerate backups. If not specified, backups are enumerated till the
      # end.
      attr_accessor :end_date_time_filter

      # @return [Boolean] If specified as true, gets the most recent backup
      # (within the specified time range) for every partition under the
      # specified backup entity. Default value: false .
      attr_accessor :latest

      # @return [BackupStorageDescription] Describes the parameters for the
      # backup storage from where to enumerate backups. This is optional and by
      # default backups are enumerated from the backup storage where this
      # backup entity is currently being backed up (as specified in backup
      # policy). This parameter is useful to be able to enumerate backups from
      # another cluster where you may intend to restore.
      attr_accessor :storage

      # @return [BackupEntity] Indicates the entity for which to enumerate
      # backups.
      attr_accessor :backup_entity


      #
      # Mapper for GetBackupByStorageQueryDescription class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'GetBackupByStorageQueryDescription',
          type: {
            name: 'Composite',
            class_name: 'GetBackupByStorageQueryDescription',
            model_properties: {
              start_date_time_filter: {
                client_side_validation: true,
                required: false,
                serialized_name: 'StartDateTimeFilter',
                type: {
                  name: 'DateTime'
                }
              },
              end_date_time_filter: {
                client_side_validation: true,
                required: false,
                serialized_name: 'EndDateTimeFilter',
                type: {
                  name: 'DateTime'
                }
              },
              latest: {
                client_side_validation: true,
                required: false,
                serialized_name: 'Latest',
                default_value: false,
                type: {
                  name: 'Boolean'
                }
              },
              storage: {
                client_side_validation: true,
                required: true,
                serialized_name: 'Storage',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'StorageKind',
                  uber_parent: 'BackupStorageDescription',
                  class_name: 'BackupStorageDescription'
                }
              },
              backup_entity: {
                client_side_validation: true,
                required: true,
                serialized_name: 'BackupEntity',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'EntityKind',
                  uber_parent: 'BackupEntity',
                  class_name: 'BackupEntity'
                }
              }
            }
          }
        }
      end
    end
  end
end
