# 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::ServiceBus::Mgmt::V2017_04_01
  module Models
    #
    # Description of queue Resource.
    #
    class SBQueue < Resource

      include MsRestAzure

      # @return [MessageCountDetails] Message Count Details.
      attr_accessor :count_details

      # @return [DateTime] The exact time the message was created.
      attr_accessor :created_at

      # @return [DateTime] The exact time the message was updated.
      attr_accessor :updated_at

      # @return [DateTime] Last time a message was sent, or the last time there
      # was a receive request to this queue.
      attr_accessor :accessed_at

      # @return [Integer] The size of the queue, in bytes.
      attr_accessor :size_in_bytes

      # @return [Integer] The number of messages in the queue.
      attr_accessor :message_count

      # @return [Duration] ISO 8601 timespan duration of a peek-lock; that is,
      # the amount of time that the message is locked for other receivers. The
      # maximum value for LockDuration is 5 minutes; the default value is 1
      # minute.
      attr_accessor :lock_duration

      # @return [Integer] The maximum size of the queue in megabytes, which is
      # the size of memory allocated for the queue. Default is 1024.
      attr_accessor :max_size_in_megabytes

      # @return [Boolean] A value indicating if this queue requires duplicate
      # detection.
      attr_accessor :requires_duplicate_detection

      # @return [Boolean] A value that indicates whether the queue supports the
      # concept of sessions.
      attr_accessor :requires_session

      # @return [Duration] ISO 8601 default message timespan to live value.
      # This is the duration after which the message expires, starting from
      # when the message is sent to Service Bus. This is the default value used
      # when TimeToLive is not set on a message itself.
      attr_accessor :default_message_time_to_live

      # @return [Boolean] A value that indicates whether this queue has dead
      # letter support when a message expires.
      attr_accessor :dead_lettering_on_message_expiration

      # @return [Duration] ISO 8601 timeSpan structure that defines the
      # duration of the duplicate detection history. The default value is 10
      # minutes.
      attr_accessor :duplicate_detection_history_time_window

      # @return [Integer] The maximum delivery count. A message is
      # automatically deadlettered after this number of deliveries. default
      # value is 10.
      attr_accessor :max_delivery_count

      # @return [EntityStatus] Enumerates the possible values for the status of
      # a messaging entity. Possible values include: 'Active', 'Disabled',
      # 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting',
      # 'Renaming', 'Unknown'
      attr_accessor :status

      # @return [Boolean] Value that indicates whether server-side batched
      # operations are enabled.
      attr_accessor :enable_batched_operations

      # @return [Duration] ISO 8061 timeSpan idle interval after which the
      # queue is automatically deleted. The minimum duration is 5 minutes.
      attr_accessor :auto_delete_on_idle

      # @return [Boolean] A value that indicates whether the queue is to be
      # partitioned across multiple message brokers.
      attr_accessor :enable_partitioning

      # @return [Boolean] A value that indicates whether Express Entities are
      # enabled. An express queue holds a message in memory temporarily before
      # writing it to persistent storage.
      attr_accessor :enable_express

      # @return [String] Queue/Topic name to forward the messages
      attr_accessor :forward_to

      # @return [String] Queue/Topic name to forward the Dead Letter message
      attr_accessor :forward_dead_lettered_messages_to


      #
      # Mapper for SBQueue class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'SBQueue',
          type: {
            name: 'Composite',
            class_name: 'SBQueue',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              count_details: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.countDetails',
                type: {
                  name: 'Composite',
                  class_name: 'MessageCountDetails'
                }
              },
              created_at: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.createdAt',
                type: {
                  name: 'DateTime'
                }
              },
              updated_at: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.updatedAt',
                type: {
                  name: 'DateTime'
                }
              },
              accessed_at: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.accessedAt',
                type: {
                  name: 'DateTime'
                }
              },
              size_in_bytes: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.sizeInBytes',
                type: {
                  name: 'Number'
                }
              },
              message_count: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.messageCount',
                type: {
                  name: 'Number'
                }
              },
              lock_duration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.lockDuration',
                type: {
                  name: 'TimeSpan'
                }
              },
              max_size_in_megabytes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.maxSizeInMegabytes',
                type: {
                  name: 'Number'
                }
              },
              requires_duplicate_detection: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.requiresDuplicateDetection',
                type: {
                  name: 'Boolean'
                }
              },
              requires_session: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.requiresSession',
                type: {
                  name: 'Boolean'
                }
              },
              default_message_time_to_live: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.defaultMessageTimeToLive',
                type: {
                  name: 'TimeSpan'
                }
              },
              dead_lettering_on_message_expiration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.deadLetteringOnMessageExpiration',
                type: {
                  name: 'Boolean'
                }
              },
              duplicate_detection_history_time_window: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.duplicateDetectionHistoryTimeWindow',
                type: {
                  name: 'TimeSpan'
                }
              },
              max_delivery_count: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.maxDeliveryCount',
                type: {
                  name: 'Number'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.status',
                type: {
                  name: 'Enum',
                  module: 'EntityStatus'
                }
              },
              enable_batched_operations: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enableBatchedOperations',
                type: {
                  name: 'Boolean'
                }
              },
              auto_delete_on_idle: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.autoDeleteOnIdle',
                type: {
                  name: 'TimeSpan'
                }
              },
              enable_partitioning: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enablePartitioning',
                type: {
                  name: 'Boolean'
                }
              },
              enable_express: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enableExpress',
                type: {
                  name: 'Boolean'
                }
              },
              forward_to: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.forwardTo',
                type: {
                  name: 'String'
                }
              },
              forward_dead_lettered_messages_to: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.forwardDeadLetteredMessagesTo',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
