// Generated by alef. Do not edit by hand.
@file:Suppress(
    "ktlint:standard:trailing-comma-on-call-site",
    "ktlint:standard:trailing-comma-on-declaration-site",
    "ktlint:standard:spacing-between-declarations-with-comments",
    "ktlint:standard:spacing-between-declarations-with-annotations",
    "ktlint:standard:when-entry-bracing",
    "ktlint:standard:blank-line-between-when-conditions",
    "ktlint:standard:blank-line-before-declaration",
    "ktlint:standard:chain-method-continuation",
    "ktlint:standard:annotation",
    "ktlint:standard:max-line-length",
    "ktlint:standard:no-semi",
    "ktlint:standard:statement-wrapping",
    "MaxLineLength",
    "TooManyFunctions",
    "FunctionParameterNaming",
    "LongParameterList",
    "CyclomaticComplexMethod",
    "LongMethod",
)

package dev.kreuzberg

/**
 * API server configuration.
 *
 * This struct holds all configuration options for the Kreuzberg API server,
 * including host/port settings, CORS configuration, and upload limits.
 *
 * # Defaults
 *
 * - `host`: "127.0.0.1" (localhost only)
 * - `port`: 8000
 * - `cors_origins`: empty vector (allows all origins)
 * - `max_request_body_bytes`: 104_857_600 (100 MB)
 * - `max_multipart_field_bytes`: 104_857_600 (100 MB)
 */
data class ServerConfig(
    /** Server host address (e.g., "127.0.0.1", "0.0.0.0") */
    val host: String = "",
    /** Server port number */
    val port: Short = 0,
    /**
     * CORS allowed origins. Empty vector means allow all origins.
     *
     * If this is an empty vector, the server will accept requests from any origin.
     * If populated with specific origins (e.g., `"https://example.com"`), only
     * those origins will be allowed.
     */
    val corsOrigins: List<String> = emptyList(),
    /** Maximum size of request body in bytes (default: 100 MB) */
    val maxRequestBodyBytes: Long = 0L,
    /** Maximum size of multipart fields in bytes (default: 100 MB) */
    val maxMultipartFieldBytes: Long = 0L,
)
