/**
 * Built-in Resource Decorators
 *
 * This module provides the built-in decorator implementations for common
 * cross-cutting concerns: tagging, logging, metrics, and encryption.
 *
 * @module declarative-api/decorator/built-in-decorators
 */
import type { IResourceEntity, ISpecification, ResourceType, Stage } from '../../../lib/runtime-web/types/declarative-api';
import { BaseResourceDecorator } from './decorator';
/**
 * Log entry for decorator operations.
 */
export interface DecoratorLogEntry {
    readonly decoratorType: string;
    readonly resourceId: string;
    readonly resourceType: ResourceType;
    readonly action: string;
    readonly timestamp: Date;
    readonly details?: Record<string, unknown>;
}
/**
 * Configuration for TaggingDecorator.
 */
export interface TaggingConfig {
    /** Custom tags to apply */
    readonly tags?: Record<string, string>;
    /** Whether to include default tags (Stage, Project, ManagedBy, CreatedAt, ResourceType) */
    readonly includeDefaults?: boolean;
    /** Resource types to apply tags to (empty = all types) */
    readonly resourceTypes?: readonly ResourceType[];
}
/**
 * Tagging Decorator.
 *
 * Automatically adds AWS tags to resources. Includes default tags
 * for Stage, Project, ManagedBy, CreatedAt, and ResourceType.
 *
 * Validates: Requirements 9.2, 9.4
 */
export declare class TaggingDecorator extends BaseResourceDecorator {
    private readonly config;
    private readonly appliedTags;
    constructor(config?: TaggingConfig, specification?: ISpecification<IResourceEntity>);
    /**
     * Decorate resource with tags.
     *
     * @param resource - The resource to decorate
     * @returns The decorated resource with tags applied
     */
    decorate<T extends IResourceEntity>(resource: T): T;
    /**
     * Check if decorator should apply to this resource.
     *
     * @param resource - The resource to check
     * @returns True if tags should be applied
     */
    shouldApply(resource: IResourceEntity): boolean;
    /**
     * Generate tags for a resource.
     *
     * @param resource - The resource to generate tags for
     * @returns Record of tag key-value pairs
     */
    private generateTags;
    /**
     * Get tags applied to a resource.
     *
     * @param resourceId - The resource ID
     * @returns Tags applied to the resource, or undefined if not found
     */
    getAppliedTags(resourceId: string): Record<string, string> | undefined;
    /**
     * Get all applied tags.
     *
     * @returns Map of resource IDs to their tags
     */
    getAllAppliedTags(): ReadonlyMap<string, Record<string, string>>;
    /**
     * Clear applied tags log.
     */
    clearAppliedTags(): void;
}
/**
 * Configuration for LoggingDecorator.
 */
export interface LoggingDecoratorConfig {
    /** Log level */
    readonly level?: 'debug' | 'info' | 'warn' | 'error';
    /** Whether to include resource metadata in logs */
    readonly includeMetadata?: boolean;
    /** Custom logger function */
    readonly logger?: (entry: DecoratorLogEntry) => void;
    /** Resource types to log (empty = all types) */
    readonly resourceTypes?: readonly ResourceType[];
}
/**
 * Logging Decorator.
 *
 * Adds logging behavior to resource decoration operations.
 * Logs when resources are decorated for debugging and auditing.
 *
 * Validates: Requirements 9.2
 */
export declare class LoggingDecorator extends BaseResourceDecorator {
    private readonly config;
    private readonly logs;
    constructor(config?: LoggingDecoratorConfig, specification?: ISpecification<IResourceEntity>);
    /**
     * Decorate resource with logging.
     *
     * @param resource - The resource to decorate
     * @returns The resource (unchanged, but logged)
     */
    decorate<T extends IResourceEntity>(resource: T): T;
    /**
     * Check if decorator should apply to this resource.
     *
     * @param resource - The resource to check
     * @returns True if logging should be applied
     */
    shouldApply(resource: IResourceEntity): boolean;
    /**
     * Get all log entries.
     *
     * @returns Array of log entries
     */
    getLogs(): readonly DecoratorLogEntry[];
    /**
     * Get logs for a specific resource.
     *
     * @param resourceId - The resource ID to filter by
     * @returns Array of log entries for the resource
     */
    getLogsForResource(resourceId: string): readonly DecoratorLogEntry[];
    /**
     * Clear all log entries.
     */
    clearLogs(): void;
}
/**
 * Metric entry for decorator operations.
 */
export interface DecoratorMetricEntry {
    readonly name: string;
    readonly value: number;
    readonly labels: Record<string, string>;
    readonly timestamp: Date;
}
/**
 * Configuration for MetricsDecorator.
 */
export interface MetricsDecoratorConfig {
    /** Metric name prefix */
    readonly prefix?: string;
    /** Custom metrics reporter function */
    readonly reporter?: (metric: DecoratorMetricEntry) => void;
    /** Resource types to collect metrics for (empty = all types) */
    readonly resourceTypes?: readonly ResourceType[];
}
/**
 * Metrics Decorator.
 *
 * Collects metrics about resource decoration operations.
 * Tracks decoration counts and timing for monitoring.
 *
 * Validates: Requirements 9.2
 */
export declare class MetricsDecorator extends BaseResourceDecorator {
    private readonly config;
    private readonly metrics;
    private readonly counters;
    constructor(config?: MetricsDecoratorConfig, specification?: ISpecification<IResourceEntity>);
    /**
     * Decorate resource with metrics collection.
     *
     * @param resource - The resource to decorate
     * @returns The resource (unchanged, but metrics recorded)
     */
    decorate<T extends IResourceEntity>(resource: T): T;
    /**
     * Check if decorator should apply to this resource.
     *
     * @param resource - The resource to check
     * @returns True if metrics should be collected
     */
    shouldApply(resource: IResourceEntity): boolean;
    /**
     * Increment a counter metric.
     *
     * @param name - Metric name
     * @param labels - Metric labels
     */
    private incrementCounter;
    /**
     * Get the full metric name with prefix.
     *
     * @param name - Base metric name
     * @returns Full metric name
     */
    private getFullName;
    /**
     * Get a unique key for a counter with labels.
     *
     * @param name - Metric name
     * @param labels - Metric labels
     * @returns Unique counter key
     */
    private getCounterKey;
    /**
     * Get all recorded metrics.
     *
     * @returns Array of metric entries
     */
    getMetrics(): readonly DecoratorMetricEntry[];
    /**
     * Get the current value of a counter.
     *
     * @param name - Counter name
     * @param labels - Counter labels
     * @returns Current counter value or 0 if not found
     */
    getCounterValue(name: string, labels: Record<string, string>): number;
    /**
     * Clear all metrics.
     */
    clearMetrics(): void;
}
/**
 * Encryption algorithm type.
 */
export type EncryptionAlgorithm = 'AES256' | 'aws:kms';
/**
 * Configuration for EncryptionDecorator.
 */
export interface EncryptionDecoratorConfig {
    /** Encryption algorithm to use */
    readonly algorithm?: EncryptionAlgorithm;
    /** KMS key ARN (required for aws:kms algorithm) */
    readonly kmsKeyArn?: string;
    /** Whether to enable encryption by default */
    readonly enableByDefault?: boolean;
    /** Resource types to encrypt (empty = all types) */
    readonly resourceTypes?: readonly ResourceType[];
    /** Stages to apply encryption to (empty = all stages) */
    readonly stages?: readonly Stage[];
}
/**
 * Encryption configuration applied to a resource.
 */
export interface AppliedEncryption {
    readonly resourceId: string;
    readonly algorithm: EncryptionAlgorithm;
    readonly kmsKeyArn?: string;
    readonly timestamp: Date;
}
/**
 * Encryption Decorator.
 *
 * Adds encryption configuration to resources. Supports both
 * AES256 (S3-managed) and KMS encryption.
 *
 * Validates: Requirements 9.2, 9.4
 */
export declare class EncryptionDecorator extends BaseResourceDecorator {
    private readonly config;
    private readonly appliedEncryption;
    constructor(config?: EncryptionDecoratorConfig, specification?: ISpecification<IResourceEntity>);
    /**
     * Decorate resource with encryption configuration.
     *
     * @param resource - The resource to decorate
     * @returns The resource with encryption configured
     */
    decorate<T extends IResourceEntity>(resource: T): T;
    /**
     * Check if decorator should apply to this resource.
     *
     * @param resource - The resource to check
     * @returns True if encryption should be applied
     */
    shouldApply(resource: IResourceEntity): boolean;
    /**
     * Get encryption applied to a resource.
     *
     * @param resourceId - The resource ID
     * @returns Encryption configuration, or undefined if not found
     */
    getAppliedEncryption(resourceId: string): AppliedEncryption | undefined;
    /**
     * Get all applied encryption configurations.
     *
     * @returns Map of resource IDs to their encryption configurations
     */
    getAllAppliedEncryption(): ReadonlyMap<string, AppliedEncryption>;
    /**
     * Clear applied encryption log.
     */
    clearAppliedEncryption(): void;
}
