// Generated by scripts/gen_verbs.py. Do not edit by hand.

///|
/// Register a route on the router for an explicit method. An optional `endpoint` descriptor
/// makes the route fully typed (its parameters, request body, and responses
/// surface in the OpenAPI document and drive validation); `security` attaches
/// per-operation requirements (emitted as OpenAPI `security` and enforced before
/// the handler when their scheme has an enforcer); `dependencies` names provider
/// keys resolved through the app's container (`App::depends`) before the handler
/// and torn down after it, whatever the handler did.
///
/// The rest describe the operation: `summary` and `description` are its prose,
/// `operation_id` the stable handle client generators name their method after,
/// `status_code` the status its success response is documented under,
/// `responses` further documented responses, `name` the handle `App::url_for`
/// resolves, `openapi_extra` a fragment merged over the generated operation
/// object, and `callbacks` the requests this operation makes back to its caller,
/// written as routes whose paths are runtime expressions — the same keyword
/// arguments FastAPI's path operations take. `hoops` wrap this one route, inside
/// any its routers put around it.
pub fn Router::route(
  self : Router,
  verb : Method,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.routes.push({
    verb,
    path,
    pattern: Pattern::parse(path),
    run: ctx => Buffered(handler(ctx)),
    summary,
    description,
    tags,
    deprecated,
    operation_id,
    status_code,
    responses,
    name,
    endpoint,
    security,
    dependencies,
    include_in_schema,
    validate,
    openapi_extra,
    callbacks,
    hoops,
  })
}

///|
/// Register a streaming route (← a FastAPI path operation returning a
/// `StreamingResponse`). The handler's chunks reach the client as separate body
/// events, so a long or open-ended reply starts arriving before it is finished.
///
/// A stream is only streamed as far as the app can honestly keep it one: a
/// middleware that rewrites the body — `gzip` does — collapses the reply to a
/// single chunk. Everything else about the route is ordinary; it documents,
/// validates and enforces security exactly as `route` does.
pub fn Router::route_stream(
  self : Router,
  verb : Method,
  path : String,
  handler : StreamHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.routes.push({
    verb,
    path,
    pattern: Pattern::parse(path),
    run: ctx => Streamed(handler(ctx)),
    summary,
    description,
    tags,
    deprecated,
    operation_id,
    status_code,
    responses,
    name,
    endpoint,
    security,
    dependencies,
    include_in_schema,
    validate,
    openapi_extra,
    callbacks,
    hoops,
  })
}

///|
/// Register a streaming `GET` route — the verb a stream is nearly always read
/// over, and what an SSE endpoint is. A shorthand for `route_stream(Get, ...)`.
pub fn Router::stream(
  self : Router,
  path : String,
  handler : StreamHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route_stream(
    Get,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `GET` route. A shorthand for `route(Get, ...)`.
pub fn Router::get(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Get,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `POST` route. A shorthand for `route(Post, ...)`.
pub fn Router::post(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Post,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `PUT` route. A shorthand for `route(Put, ...)`.
pub fn Router::put(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Put,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `PATCH` route. A shorthand for `route(Patch, ...)`.
pub fn Router::patch(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Patch,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `DELETE` route. A shorthand for `route(Delete, ...)`.
pub fn Router::delete(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Delete,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `OPTIONS` route. A shorthand for `route(Options, ...)`.
pub fn Router::options(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Options,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `HEAD` route. A shorthand for `route(Head, ...)`.
pub fn Router::head(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Head,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}

///|
/// Register a `TRACE` route. A shorthand for `route(Trace, ...)`.
pub fn Router::trace(
  self : Router,
  path : String,
  handler : ApiHandler,
  summary~ : String = "",
  description~ : String = "",
  tags~ : Array[String] = [],
  deprecated~ : Bool = false,
  operation_id~ : String = "",
  status_code? : Int32,
  responses~ : Array[@endpoint.ResponseSpec] = [],
  name~ : String = "",
  endpoint? : @endpoint.Endpoint,
  security~ : Array[@security.SecurityRequirement] = [],
  dependencies~ : Array[String] = [],
  include_in_schema~ : Bool = true,
  validate~ : Bool = true,
  openapi_extra? : Json,
  callbacks~ : Array[Route] = [],
  hoops~ : Array[Hoop] = [],
) -> Unit {
  self.route(
    Trace,
    path,
    handler,
    summary~,
    description~,
    tags~,
    deprecated~,
    operation_id~,
    status_code?,
    responses~,
    name~,
    endpoint?,
    security~,
    dependencies~,
    include_in_schema~,
    validate~,
    openapi_extra?,
    callbacks~,
    hoops~,
  )
}