import * as kms from "../../aws-kms";
import { Duration, RemovalPolicy } from "../../core";
import { Construct } from 'constructs';
import { IQueue, QueueAttributes, QueueBase } from './queue-base';
/**
 * (experimental) Properties for creating a new Queue.
 *
 * @experimental
 */
export interface QueueProps {
    /**
     * (experimental) A name for the queue.
     *
     * If specified and this is a FIFO queue, must end in the string '.fifo'.
     *
     * @default CloudFormation-generated name
     * @experimental
     */
    readonly queueName?: string;
    /**
     * (experimental) The number of seconds that Amazon SQS retains a message.
     *
     * You can specify an integer value from 60 seconds (1 minute) to 1209600
     * seconds (14 days). The default value is 345600 seconds (4 days).
     *
     * @default Duration.days(4)
     * @experimental
     */
    readonly retentionPeriod?: Duration;
    /**
     * (experimental) The time in seconds that the delivery of all messages in the queue is delayed.
     *
     * You can specify an integer value of 0 to 900 (15 minutes). The default
     * value is 0.
     *
     * @default 0
     * @experimental
     */
    readonly deliveryDelay?: Duration;
    /**
     * (experimental) The limit of how many bytes that a message can contain before Amazon SQS rejects it.
     *
     * You can specify an integer value from 1024 bytes (1 KiB) to 262144 bytes
     * (256 KiB). The default value is 262144 (256 KiB).
     *
     * @default 256KiB
     * @experimental
     */
    readonly maxMessageSizeBytes?: number;
    /**
     * (experimental) Default wait time for ReceiveMessage calls.
     *
     * Does not wait if set to 0, otherwise waits this amount of seconds
     * by default for messages to arrive.
     *
     * For more information, see Amazon SQS Long Poll.
     *
     * @default 0
     * @experimental
     */
    readonly receiveMessageWaitTime?: Duration;
    /**
     * (experimental) Timeout of processing a single message.
     *
     * After dequeuing, the processor has this much time to handle the message
     * and delete it from the queue before it becomes visible again for dequeueing
     * by another processor.
     *
     * Values must be from 0 to 43200 seconds (12 hours). If you don't specify
     * a value, AWS CloudFormation uses the default value of 30 seconds.
     *
     * @default Duration.seconds(30)
     * @experimental
     */
    readonly visibilityTimeout?: Duration;
    /**
     * (experimental) Send messages to this queue if they were unsuccessfully dequeued a number of times.
     *
     * @default no dead-letter queue
     * @experimental
     */
    readonly deadLetterQueue?: DeadLetterQueue;
    /**
     * (experimental) Whether the contents of the queue are encrypted, and by what type of key.
     *
     * Be aware that encryption is not available in all regions, please see the docs
     * for current availability details.
     *
     * @default Unencrypted
     * @experimental
     */
    readonly encryption?: QueueEncryption;
    /**
     * (experimental) External KMS master key to use for queue encryption.
     *
     * Individual messages will be encrypted using data keys. The data keys in
     * turn will be encrypted using this key, and reused for a maximum of
     * `dataKeyReuseSecs` seconds.
     *
     * If the 'encryptionMasterKey' property is set, 'encryption' type will be
     * implicitly set to "KMS".
     *
     * @default If encryption is set to KMS and not specified, a key will be created.
     * @experimental
     */
    readonly encryptionMasterKey?: kms.IKey;
    /**
     * (experimental) The length of time that Amazon SQS reuses a data key before calling KMS again.
     *
     * The value must be an integer between 60 (1 minute) and 86,400 (24
     * hours). The default is 300 (5 minutes).
     *
     * @default Duration.minutes(5)
     * @experimental
     */
    readonly dataKeyReuse?: Duration;
    /**
     * (experimental) Whether this a first-in-first-out (FIFO) queue.
     *
     * @default false, unless queueName ends in '.fifo' or 'contentBasedDeduplication' is true.
     * @experimental
     */
    readonly fifo?: boolean;
    /**
     * (experimental) Specifies whether to enable content-based deduplication.
     *
     * During the deduplication interval (5 minutes), Amazon SQS treats
     * messages that are sent with identical content (excluding attributes) as
     * duplicates and delivers only one copy of the message.
     *
     * If you don't enable content-based deduplication and you want to deduplicate
     * messages, provide an explicit deduplication ID in your SendMessage() call.
     *
     * (Only applies to FIFO queues.)
     *
     * @default false
     * @experimental
     */
    readonly contentBasedDeduplication?: boolean;
    /**
     * (experimental) For high throughput for FIFO queues, specifies whether message deduplication occurs at the message group or queue level.
     *
     * (Only applies to FIFO queues.)
     *
     * @default DeduplicationScope.QUEUE
     * @experimental
     */
    readonly deduplicationScope?: DeduplicationScope;
    /**
     * (experimental) For high throughput for FIFO queues, specifies whether the FIFO queue throughput quota applies to the entire queue or per message group.
     *
     * (Only applies to FIFO queues.)
     *
     * @default FifoThroughputLimit.PER_QUEUE
     * @experimental
     */
    readonly fifoThroughputLimit?: FifoThroughputLimit;
    /**
     * (experimental) Policy to apply when the user pool is removed from the stack.
     *
     * Even though queues are technically stateful, their contents are transient and it
     * is common to add and remove Queues while rearchitecting your application. The
     * default is therefore `DESTROY`. Change it to `RETAIN` if the messages are so
     * valuable that accidentally losing them would be unacceptable.
     *
     * @default RemovalPolicy.DESTROY
     * @experimental
     */
    readonly removalPolicy?: RemovalPolicy;
}
/**
 * (experimental) Dead letter queue settings.
 *
 * @experimental
 */
export interface DeadLetterQueue {
    /**
     * (experimental) The dead-letter queue to which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.
     *
     * @experimental
     */
    readonly queue: IQueue;
    /**
     * (experimental) The number of times a message can be unsuccesfully dequeued before being moved to the dead-letter queue.
     *
     * @experimental
     */
    readonly maxReceiveCount: number;
}
/**
 * (experimental) What kind of encryption to apply to this queue.
 *
 * @experimental
 */
export declare enum QueueEncryption {
    /**
     * (experimental) Messages in the queue are not encrypted.
     *
     * @experimental
     */
    UNENCRYPTED = "NONE",
    /**
     * (experimental) Server-side KMS encryption with a master key managed by SQS.
     *
     * @experimental
     */
    KMS_MANAGED = "MANAGED",
    /**
     * (experimental) Server-side encryption with a KMS key managed by the user.
     *
     * If `encryptionKey` is specified, this key will be used, otherwise, one will be defined.
     *
     * @experimental
     */
    KMS = "KMS"
}
/**
 * (experimental) What kind of deduplication scope to apply.
 *
 * @experimental
 */
export declare enum DeduplicationScope {
    /**
     * (experimental) Deduplication occurs at the message group level.
     *
     * @experimental
     */
    MESSAGE_GROUP = "messageGroup",
    /**
     * (experimental) Deduplication occurs at the message queue level.
     *
     * @experimental
     */
    QUEUE = "queue"
}
/**
 * (experimental) Whether the FIFO queue throughput quota applies to the entire queue or per message group.
 *
 * @experimental
 */
export declare enum FifoThroughputLimit {
    /**
     * (experimental) Throughput quota applies per queue.
     *
     * @experimental
     */
    PER_QUEUE = "perQueue",
    /**
     * (experimental) Throughput quota applies per message group id.
     *
     * @experimental
     */
    PER_MESSAGE_GROUP_ID = "perMessageGroupId"
}
/**
 * (experimental) A new Amazon SQS queue.
 *
 * @experimental
 */
export declare class Queue extends QueueBase {
    /**
     * (experimental) Import an existing SQS queue provided an ARN.
     *
     * @param scope The parent creating construct.
     * @param id The construct's name.
     * @param queueArn queue ARN (i.e. arn:aws:sqs:us-east-2:444455556666:queue1).
     * @experimental
     */
    static fromQueueArn(scope: Construct, id: string, queueArn: string): IQueue;
    /**
     * (experimental) Import an existing queue.
     *
     * @experimental
     */
    static fromQueueAttributes(scope: Construct, id: string, attrs: QueueAttributes): IQueue;
    /**
     * (experimental) The ARN of this queue.
     *
     * @experimental
     */
    readonly queueArn: string;
    /**
     * (experimental) The name of this queue.
     *
     * @experimental
     */
    readonly queueName: string;
    /**
     * (experimental) The URL of this queue.
     *
     * @experimental
     */
    readonly queueUrl: string;
    /**
     * (experimental) If this queue is encrypted, this is the KMS key.
     *
     * @experimental
     */
    readonly encryptionMasterKey?: kms.IKey;
    /**
     * (experimental) Whether this queue is an Amazon SQS FIFO queue.
     *
     * If false, this is a standard queue.
     *
     * @experimental
     */
    readonly fifo: boolean;
    /**
     * (experimental) Controls automatic creation of policy objects.
     *
     * Set by subclasses.
     *
     * @experimental
     */
    protected readonly autoCreatePolicy = true;
    /**
     * @experimental
     */
    constructor(scope: Construct, id: string, props?: QueueProps);
    /**
     * Look at the props, see if the FIFO props agree, and return the correct subset of props
     */
    private determineFifoProps;
}
