// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.12.0.

#![allow(
    non_camel_case_types,
    unused,
    non_snake_case,
    clippy::needless_return,
    clippy::redundant_closure_call,
    clippy::redundant_closure,
    clippy::useless_conversion,
    clippy::unit_arg,
    clippy::unused_unit,
    clippy::double_parens,
    clippy::let_and_return,
    clippy::too_many_arguments,
    clippy::match_single_binding,
    clippy::clone_on_copy,
    clippy::let_unit_value,
    clippy::deref_addrof,
    clippy::explicit_auto_deref,
    clippy::borrow_deref_ref,
    clippy::uninlined_format_args,
    clippy::needless_borrow
)]

// Section: imports

use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
use flutter_rust_bridge::{Handler, IntoIntoDart};

// Section: boilerplate

flutter_rust_bridge::frb_generated_boilerplate!(
    default_stream_sink_codec = SseCodec,
    default_rust_opaque = RustOpaqueMoi,
    default_rust_auto_opaque = RustAutoOpaqueMoi,
);
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.12.0";
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -20394775;

// Section: executor

flutter_rust_bridge::frb_generated_default_handler!();

// Section: wire_funcs

fn wire__crate__api__add_bookmark_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "add_bookmark",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_b = <crate::api::BridgeBookmark>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::add_bookmark(api_b).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__audio_processing_stats_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "audio_processing_stats",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::audio_processing_stats().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__audio_stats_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "audio_stats",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::audio_stats().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__bridge_init_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::SseCodec, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "bridge_init",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| {
                transform_result_sse::<_, ()>((move || {
                    let output_ok = Result::<_, ()>::Ok({
                        crate::api::bridge_init();
                    })?;
                    Ok(output_ok)
                })())
            }
        },
    )
}
fn wire__crate__api__client_profile_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "client_profile",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_client_id = <u64>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::client_profile(api_client_id).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__connect_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "connect",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_host = <String>::sse_decode(&mut deserializer);
            let api_nickname = <String>::sse_decode(&mut deserializer);
            let api_password = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::connect(api_host, api_nickname, api_password).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__delete_bookmark_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "delete_bookmark",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_id = <i64>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::delete_bookmark(api_id).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__disconnect_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "disconnect",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::disconnect().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__enable_audio_debug_wav_dump_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "enable_audio_debug_wav_dump",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_enabled = <bool>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::enable_audio_debug_wav_dump(api_enabled).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__events_stream_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::SseCodec, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "events_stream",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_sink = <StreamSink<
                crate::api::BridgeEvent,
                flutter_rust_bridge::for_generated::SseCodec,
            >>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| {
                transform_result_sse::<_, crate::BridgeError>((move || {
                    let output_ok = crate::api::events_stream(api_sink)?;
                    Ok(output_ok)
                })())
            }
        },
    )
}
fn wire__crate__api__export_diagnostics_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "export_diagnostics",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok(crate::api::export_diagnostics())?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__get_audio_processing_config_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "get_audio_processing_config",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::get_audio_processing_config().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__get_ptt_binding_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "get_ptt_binding",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, ()>(
                    (move || async move {
                        let output_ok = Result::<_, ()>::Ok(crate::api::get_ptt_binding().await)?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__get_release_tail_ms_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "get_release_tail_ms",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, ()>(
                    (move || async move {
                        let output_ok =
                            Result::<_, ()>::Ok(crate::api::get_release_tail_ms().await)?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__get_transmit_mode_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "get_transmit_mode",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, ()>(
                    (move || async move {
                        let output_ok = Result::<_, ()>::Ok(crate::api::get_transmit_mode().await)?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__handle_interruption_began_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "handle_interruption_began",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::handle_interruption_began();
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__handle_interruption_ended_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "handle_interruption_ended",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_should_resume = <bool>::sse_decode(&mut deserializer);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::handle_interruption_ended(api_should_resume);
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__handle_media_services_reset_with_route_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "handle_media_services_reset_with_route",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_route_class = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::handle_media_services_reset_with_route(api_route_class);
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__handle_route_change_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "handle_route_change",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_route = <crate::api::BridgeAudioRoute>::sse_decode(&mut deserializer);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::handle_route_change(api_route);
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__init_storage_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "init_storage",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_dir = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::init_storage(api_dir).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__input_level_stream_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::SseCodec, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "input_level_stream",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_sink =
                <StreamSink<f32, flutter_rust_bridge::for_generated::SseCodec>>::sse_decode(
                    &mut deserializer,
                );
            deserializer.end();
            move |context| {
                transform_result_sse::<_, crate::BridgeError>((move || {
                    let output_ok = crate::api::input_level_stream(api_sink)?;
                    Ok(output_ok)
                })())
            }
        },
    )
}
fn wire__crate__api__is_connected_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "is_connected",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, ()>(
                    (move || async move {
                        let output_ok = Result::<_, ()>::Ok(crate::api::is_connected().await)?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__list_audio_devices_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "list_audio_devices",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::list_audio_devices().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__list_bookmarks_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "list_bookmarks",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::list_bookmarks().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__log_file_path_str_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "log_file_path_str",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok(crate::api::log_file_path_str())?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__move_to_channel_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "move_to_channel",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_channel_id = <u64>::sse_decode(&mut deserializer);
            let api_password = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::move_to_channel(api_channel_id, api_password).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__prefetch_server_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "prefetch_server",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_host = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::prefetch_server(api_host).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__ptt_descriptor_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "ptt_descriptor",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, ()>(
                    (move || async move {
                        let output_ok = Result::<_, ()>::Ok(crate::api::ptt_descriptor().await)?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__record_lifecycle_event_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "record_lifecycle_event",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_state = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::record_lifecycle_event(api_state);
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__send_chat_message_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "send_chat_message",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_message = <String>::sse_decode(&mut deserializer);
            let api_target = <crate::api::BridgeMessageTarget>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::send_chat_message(api_message, api_target).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_audio_output_route_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_audio_output_route",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_route = <crate::api::BridgeAudioRoute>::sse_decode(&mut deserializer);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::set_audio_output_route(api_route);
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__set_audio_processing_config_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_audio_processing_config",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_config =
                <crate::api::BridgeAudioProcessingConfig>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_audio_processing_config(api_config).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_client_volume_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_client_volume",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_client_id = <u64>::sse_decode(&mut deserializer);
            let api_volume = <f32>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::set_client_volume(api_client_id, api_volume).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_hard_mute_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_hard_mute",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_muted = <bool>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_hard_mute(api_muted).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_input_device_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_input_device",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_id = <Option<String>>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_input_device(api_id).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_input_muted_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_input_muted",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_muted = <bool>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_input_muted(api_muted).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_ios_voice_processing_mode_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_ios_voice_processing_mode",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_mode =
                <crate::api::BridgeIosVoiceProcessingMode>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_ios_voice_processing_mode(api_mode).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_network_state_impl(
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_network_state",
            port: None,
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_state = <crate::api::BridgeNetworkState>::sse_decode(&mut deserializer);
            deserializer.end();
            transform_result_sse::<_, ()>((move || {
                let output_ok = Result::<_, ()>::Ok({
                    crate::api::set_network_state(api_state);
                })?;
                Ok(output_ok)
            })())
        },
    )
}
fn wire__crate__api__set_output_device_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_output_device",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_id = <Option<String>>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_output_device(api_id).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_output_gain_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_output_gain",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_gain = <f32>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_output_gain(api_gain).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_output_muted_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_output_muted",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_muted = <bool>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_output_muted(api_muted).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_ptt_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_ptt",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_active = <bool>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_ptt(api_active).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_ptt_binding_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_ptt_binding",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_input_class = <crate::api::BridgePttInputClass>::sse_decode(&mut deserializer);
            let api_platform_key = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::set_ptt_binding(api_input_class, api_platform_key).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_release_tail_ms_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_release_tail_ms",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_ms = <u32>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_release_tail_ms(api_ms).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_transmit_mode_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_transmit_mode",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_mode = <crate::api::BridgeTransmitMode>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_transmit_mode(api_mode).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__set_vad_model_path_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "set_vad_model_path",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_path = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::set_vad_model_path(api_path).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__snapshot_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "snapshot",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::snapshot().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__update_bookmark_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "update_bookmark",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_b = <crate::api::BridgeBookmark>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::update_bookmark(api_b).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__voice_join_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "voice_join",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            let api_channel_id = <u64>::sse_decode(&mut deserializer);
            let api_password = <String>::sse_decode(&mut deserializer);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok =
                            crate::api::voice_join(api_channel_id, api_password).await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}
fn wire__crate__api__voice_leave_impl(
    port_: flutter_rust_bridge::for_generated::MessagePort,
    ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len_: i32,
    data_len_: i32,
) {
    FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
        flutter_rust_bridge::for_generated::TaskInfo {
            debug_name: "voice_leave",
            port: Some(port_),
            mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
        },
        move || {
            let message = unsafe {
                flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
                    ptr_,
                    rust_vec_len_,
                    data_len_,
                )
            };
            let mut deserializer =
                flutter_rust_bridge::for_generated::SseDeserializer::new(message);
            deserializer.end();
            move |context| async move {
                transform_result_sse::<_, crate::BridgeError>(
                    (move || async move {
                        let output_ok = crate::api::voice_leave().await?;
                        Ok(output_ok)
                    })()
                    .await,
                )
            }
        },
    )
}

// Section: dart2rust

impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <String>::sse_decode(deserializer);
        return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner);
    }
}

impl SseDecode
    for StreamSink<crate::api::BridgeEvent, flutter_rust_bridge::for_generated::SseCodec>
{
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <String>::sse_decode(deserializer);
        return StreamSink::deserialize(inner);
    }
}

impl SseDecode for StreamSink<f32, flutter_rust_bridge::for_generated::SseCodec> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <String>::sse_decode(deserializer);
        return StreamSink::deserialize(inner);
    }
}

impl SseDecode for String {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <Vec<u8>>::sse_decode(deserializer);
        return String::from_utf8(inner).unwrap();
    }
}

impl SseDecode for bool {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_u8().unwrap() != 0
    }
}

impl SseDecode for crate::api::BridgeAudioBackend {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeAudioBackend::PlatformVoiceProcessing,
            1 => crate::api::BridgeAudioBackend::Sonora,
            2 => crate::api::BridgeAudioBackend::WebrtcApm,
            3 => crate::api::BridgeAudioBackend::Noop,
            _ => unreachable!("Invalid variant for BridgeAudioBackend: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgeAudioDevice {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_id = <String>::sse_decode(deserializer);
        let mut var_name = <String>::sse_decode(deserializer);
        let mut var_details = <String>::sse_decode(deserializer);
        let mut var_isDefault = <bool>::sse_decode(deserializer);
        let mut var_isSelected = <bool>::sse_decode(deserializer);
        return crate::api::BridgeAudioDevice {
            id: var_id,
            name: var_name,
            details: var_details,
            is_default: var_isDefault,
            is_selected: var_isSelected,
        };
    }
}

impl SseDecode for crate::api::BridgeAudioDeviceList {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_inputDevices = <Vec<crate::api::BridgeAudioDevice>>::sse_decode(deserializer);
        let mut var_outputDevices = <Vec<crate::api::BridgeAudioDevice>>::sse_decode(deserializer);
        return crate::api::BridgeAudioDeviceList {
            input_devices: var_inputDevices,
            output_devices: var_outputDevices,
        };
    }
}

impl SseDecode for crate::api::BridgeAudioProcessingConfig {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_route = <crate::api::BridgeAudioRoute>::sse_decode(deserializer);
        let mut var_iosMode = <crate::api::BridgeIosVoiceProcessingMode>::sse_decode(deserializer);
        let mut var_processingBackend = <crate::api::BridgeAudioBackend>::sse_decode(deserializer);
        let mut var_vadBackend = <crate::api::BridgeVadBackend>::sse_decode(deserializer);
        let mut var_aec = <crate::api::BridgeEffectOwner>::sse_decode(deserializer);
        let mut var_ns = <crate::api::BridgeEffectOwner>::sse_decode(deserializer);
        let mut var_agc = <crate::api::BridgeEffectOwner>::sse_decode(deserializer);
        let mut var_hpfEnabled = <bool>::sse_decode(deserializer);
        let mut var_limiterEnabled = <bool>::sse_decode(deserializer);
        let mut var_vadHangoverMs = <u32>::sse_decode(deserializer);
        let mut var_vadPreRollMs = <u32>::sse_decode(deserializer);
        let mut var_vadMinTxMs = <u32>::sse_decode(deserializer);
        let mut var_debugWavDumpEnabled = <bool>::sse_decode(deserializer);
        return crate::api::BridgeAudioProcessingConfig {
            route: var_route,
            ios_mode: var_iosMode,
            processing_backend: var_processingBackend,
            vad_backend: var_vadBackend,
            aec: var_aec,
            ns: var_ns,
            agc: var_agc,
            hpf_enabled: var_hpfEnabled,
            limiter_enabled: var_limiterEnabled,
            vad_hangover_ms: var_vadHangoverMs,
            vad_pre_roll_ms: var_vadPreRollMs,
            vad_min_tx_ms: var_vadMinTxMs,
            debug_wav_dump_enabled: var_debugWavDumpEnabled,
        };
    }
}

impl SseDecode for crate::api::BridgeAudioProcessingStats {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_inputDbfs = <f32>::sse_decode(deserializer);
        let mut var_renderDbfs = <f32>::sse_decode(deserializer);
        let mut var_processedDbfs = <f32>::sse_decode(deserializer);
        let mut var_vadProbability = <f32>::sse_decode(deserializer);
        let mut var_vadActive = <bool>::sse_decode(deserializer);
        let mut var_transmitting = <bool>::sse_decode(deserializer);
        let mut var_vadBackend = <crate::api::BridgeVadBackend>::sse_decode(deserializer);
        let mut var_vadFallbackActive = <bool>::sse_decode(deserializer);
        let mut var_processingBackend = <crate::api::BridgeAudioBackend>::sse_decode(deserializer);
        let mut var_iosVoiceProcessingMode =
            <crate::api::BridgeIosVoiceProcessingMode>::sse_decode(deserializer);
        let mut var_audioRoute = <crate::api::BridgeAudioRoute>::sse_decode(deserializer);
        let mut var_actualSampleRateHz = <u32>::sse_decode(deserializer);
        let mut var_actualIoBufferFrames = <u32>::sse_decode(deserializer);
        let mut var_inputOverruns = <u64>::sse_decode(deserializer);
        let mut var_outputUnderruns = <u64>::sse_decode(deserializer);
        let mut var_callbackXruns = <u64>::sse_decode(deserializer);
        let mut var_clippedSamples = <u64>::sse_decode(deserializer);
        let mut var_zeroFrames = <u64>::sse_decode(deserializer);
        let mut var_captureFrames = <u64>::sse_decode(deserializer);
        let mut var_callbacks10Ms = <u64>::sse_decode(deserializer);
        let mut var_callbacks20Ms = <u64>::sse_decode(deserializer);
        let mut var_callbacksOther = <u64>::sse_decode(deserializer);
        let mut var_sonoraEnabled = <bool>::sse_decode(deserializer);
        let mut var_platformVoiceProcessingEnabled = <bool>::sse_decode(deserializer);
        return crate::api::BridgeAudioProcessingStats {
            input_dbfs: var_inputDbfs,
            render_dbfs: var_renderDbfs,
            processed_dbfs: var_processedDbfs,
            vad_probability: var_vadProbability,
            vad_active: var_vadActive,
            transmitting: var_transmitting,
            vad_backend: var_vadBackend,
            vad_fallback_active: var_vadFallbackActive,
            processing_backend: var_processingBackend,
            ios_voice_processing_mode: var_iosVoiceProcessingMode,
            audio_route: var_audioRoute,
            actual_sample_rate_hz: var_actualSampleRateHz,
            actual_io_buffer_frames: var_actualIoBufferFrames,
            input_overruns: var_inputOverruns,
            output_underruns: var_outputUnderruns,
            callback_xruns: var_callbackXruns,
            clipped_samples: var_clippedSamples,
            zero_frames: var_zeroFrames,
            capture_frames: var_captureFrames,
            callbacks_10ms: var_callbacks10Ms,
            callbacks_20ms: var_callbacks20Ms,
            callbacks_other: var_callbacksOther,
            sonora_enabled: var_sonoraEnabled,
            platform_voice_processing_enabled: var_platformVoiceProcessingEnabled,
        };
    }
}

impl SseDecode for crate::api::BridgeAudioRoute {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeAudioRoute::Speaker,
            1 => crate::api::BridgeAudioRoute::Earpiece,
            2 => crate::api::BridgeAudioRoute::WiredHeadset,
            3 => crate::api::BridgeAudioRoute::BluetoothHfp,
            4 => crate::api::BridgeAudioRoute::BluetoothA2dp,
            5 => crate::api::BridgeAudioRoute::Unknown,
            _ => unreachable!("Invalid variant for BridgeAudioRoute: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgeAudioStats {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_framesSent = <u32>::sse_decode(deserializer);
        let mut var_framesReceived = <u32>::sse_decode(deserializer);
        let mut var_pttActive = <bool>::sse_decode(deserializer);
        let mut var_inputLevel = <f32>::sse_decode(deserializer);
        return crate::api::BridgeAudioStats {
            frames_sent: var_framesSent,
            frames_received: var_framesReceived,
            ptt_active: var_pttActive,
            input_level: var_inputLevel,
        };
    }
}

impl SseDecode for crate::api::BridgeBookmark {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_id = <i64>::sse_decode(deserializer);
        let mut var_displayName = <String>::sse_decode(deserializer);
        let mut var_host = <String>::sse_decode(deserializer);
        let mut var_nickname = <String>::sse_decode(deserializer);
        let mut var_password = <String>::sse_decode(deserializer);
        return crate::api::BridgeBookmark {
            id: var_id,
            display_name: var_displayName,
            host: var_host,
            nickname: var_nickname,
            password: var_password,
        };
    }
}

impl SseDecode for crate::api::BridgeChannel {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_id = <u64>::sse_decode(deserializer);
        let mut var_parent = <u64>::sse_decode(deserializer);
        let mut var_name = <String>::sse_decode(deserializer);
        let mut var_order = <i64>::sse_decode(deserializer);
        let mut var_hasPassword = <bool>::sse_decode(deserializer);
        let mut var_neededTalkPower = <Option<i32>>::sse_decode(deserializer);
        return crate::api::BridgeChannel {
            id: var_id,
            parent: var_parent,
            name: var_name,
            order: var_order,
            has_password: var_hasPassword,
            needed_talk_power: var_neededTalkPower,
        };
    }
}

impl SseDecode for crate::api::BridgeClient {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_id = <u64>::sse_decode(deserializer);
        let mut var_channel = <u64>::sse_decode(deserializer);
        let mut var_name = <String>::sse_decode(deserializer);
        let mut var_inputMuted = <bool>::sse_decode(deserializer);
        let mut var_outputMuted = <bool>::sse_decode(deserializer);
        let mut var_isSpeaking = <bool>::sse_decode(deserializer);
        let mut var_isServerQuery = <bool>::sse_decode(deserializer);
        let mut var_talkPower = <i32>::sse_decode(deserializer);
        let mut var_talkPowerGranted = <bool>::sse_decode(deserializer);
        return crate::api::BridgeClient {
            id: var_id,
            channel: var_channel,
            name: var_name,
            input_muted: var_inputMuted,
            output_muted: var_outputMuted,
            is_speaking: var_isSpeaking,
            is_server_query: var_isServerQuery,
            talk_power: var_talkPower,
            talk_power_granted: var_talkPowerGranted,
        };
    }
}

impl SseDecode for crate::api::BridgeClientProfile {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_id = <u64>::sse_decode(deserializer);
        let mut var_channel = <u64>::sse_decode(deserializer);
        let mut var_name = <String>::sse_decode(deserializer);
        let mut var_uniqueId = <String>::sse_decode(deserializer);
        let mut var_databaseId = <Option<u64>>::sse_decode(deserializer);
        let mut var_countryCode = <String>::sse_decode(deserializer);
        let mut var_description = <String>::sse_decode(deserializer);
        let mut var_version = <String>::sse_decode(deserializer);
        let mut var_platform = <String>::sse_decode(deserializer);
        let mut var_createdUnixSeconds = <Option<i64>>::sse_decode(deserializer);
        let mut var_lastConnectedUnixSeconds = <Option<i64>>::sse_decode(deserializer);
        let mut var_connectionsTotal = <Option<u64>>::sse_decode(deserializer);
        let mut var_onlineSeconds = <Option<i64>>::sse_decode(deserializer);
        let mut var_idleMilliseconds = <Option<i64>>::sse_decode(deserializer);
        let mut var_pingMilliseconds = <Option<i64>>::sse_decode(deserializer);
        let mut var_pingDeviationMilliseconds = <Option<i64>>::sse_decode(deserializer);
        let mut var_clientAddress = <String>::sse_decode(deserializer);
        let mut var_serverGroups = <Vec<String>>::sse_decode(deserializer);
        let mut var_channelGroup = <String>::sse_decode(deserializer);
        let mut var_avatarPath = <String>::sse_decode(deserializer);
        let mut var_bytesDownloadedMonth = <Option<u64>>::sse_decode(deserializer);
        let mut var_bytesUploadedMonth = <Option<u64>>::sse_decode(deserializer);
        let mut var_bytesDownloadedTotal = <Option<u64>>::sse_decode(deserializer);
        let mut var_bytesUploadedTotal = <Option<u64>>::sse_decode(deserializer);
        let mut var_packetLossClientToServerTotal = <Option<f32>>::sse_decode(deserializer);
        let mut var_packetLossServerToClientTotal = <Option<f32>>::sse_decode(deserializer);
        return crate::api::BridgeClientProfile {
            id: var_id,
            channel: var_channel,
            name: var_name,
            unique_id: var_uniqueId,
            database_id: var_databaseId,
            country_code: var_countryCode,
            description: var_description,
            version: var_version,
            platform: var_platform,
            created_unix_seconds: var_createdUnixSeconds,
            last_connected_unix_seconds: var_lastConnectedUnixSeconds,
            connections_total: var_connectionsTotal,
            online_seconds: var_onlineSeconds,
            idle_milliseconds: var_idleMilliseconds,
            ping_milliseconds: var_pingMilliseconds,
            ping_deviation_milliseconds: var_pingDeviationMilliseconds,
            client_address: var_clientAddress,
            server_groups: var_serverGroups,
            channel_group: var_channelGroup,
            avatar_path: var_avatarPath,
            bytes_downloaded_month: var_bytesDownloadedMonth,
            bytes_uploaded_month: var_bytesUploadedMonth,
            bytes_downloaded_total: var_bytesDownloadedTotal,
            bytes_uploaded_total: var_bytesUploadedTotal,
            packet_loss_client_to_server_total: var_packetLossClientToServerTotal,
            packet_loss_server_to_client_total: var_packetLossServerToClientTotal,
        };
    }
}

impl SseDecode for crate::api::BridgeEffectOwner {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeEffectOwner::Platform,
            1 => crate::api::BridgeEffectOwner::Sonora,
            2 => crate::api::BridgeEffectOwner::WebrtcApm,
            3 => crate::api::BridgeEffectOwner::Conservative,
            4 => crate::api::BridgeEffectOwner::Off,
            _ => unreachable!("Invalid variant for BridgeEffectOwner: {}", inner),
        };
    }
}

impl SseDecode for crate::BridgeError {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut tag_ = <i32>::sse_decode(deserializer);
        match tag_ {
            0 => {
                let mut var_field0 = <String>::sse_decode(deserializer);
                return crate::BridgeError::InvalidCommand(var_field0);
            }
            1 => {
                let mut var_host = <String>::sse_decode(deserializer);
                let mut var_reason = <String>::sse_decode(deserializer);
                return crate::BridgeError::DnsFailed {
                    host: var_host,
                    reason: var_reason,
                };
            }
            2 => {
                let mut var_field0 = <String>::sse_decode(deserializer);
                return crate::BridgeError::Connection(var_field0);
            }
            3 => {
                return crate::BridgeError::NotConnected;
            }
            4 => {
                return crate::BridgeError::AlreadyConnected;
            }
            5 => {
                let mut var_code = <u32>::sse_decode(deserializer);
                let mut var_message = <String>::sse_decode(deserializer);
                return crate::BridgeError::ServerRejected {
                    code: var_code,
                    message: var_message,
                };
            }
            6 => {
                let mut var_field0 = <String>::sse_decode(deserializer);
                return crate::BridgeError::Unmapped(var_field0);
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}

impl SseDecode for crate::api::BridgeEvent {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut tag_ = <i32>::sse_decode(deserializer);
        match tag_ {
            0 => {
                let mut var_serverName = <String>::sse_decode(deserializer);
                return crate::api::BridgeEvent::Connected {
                    server_name: var_serverName,
                };
            }
            1 => {
                let mut var_reason = <String>::sse_decode(deserializer);
                return crate::api::BridgeEvent::Lost { reason: var_reason };
            }
            2 => {
                let mut var_attempt = <u32>::sse_decode(deserializer);
                let mut var_delaySecs = <u32>::sse_decode(deserializer);
                return crate::api::BridgeEvent::Reconnecting {
                    attempt: var_attempt,
                    delay_secs: var_delaySecs,
                };
            }
            3 => {
                let mut var_reason = <String>::sse_decode(deserializer);
                return crate::api::BridgeEvent::Disconnected { reason: var_reason };
            }
            4 => {
                return crate::api::BridgeEvent::AudioStarted;
            }
            5 => {
                return crate::api::BridgeEvent::AudioStopped;
            }
            6 => {
                let mut var_level = <String>::sse_decode(deserializer);
                let mut var_backendId = <String>::sse_decode(deserializer);
                let mut var_boundInputClass = <String>::sse_decode(deserializer);
                return crate::api::BridgeEvent::PttCapability {
                    level: var_level,
                    backend_id: var_backendId,
                    bound_input_class: var_boundInputClass,
                };
            }
            7 => {
                let mut var_inChannel = <bool>::sse_decode(deserializer);
                let mut var_transmitMode =
                    <crate::api::BridgeTransmitMode>::sse_decode(deserializer);
                let mut var_mute = <bool>::sse_decode(deserializer);
                let mut var_releaseTailMs = <u32>::sse_decode(deserializer);
                let mut var_currentChannelId = <Option<u64>>::sse_decode(deserializer);
                let mut var_pendingTargetChannelId = <Option<u64>>::sse_decode(deserializer);
                let mut var_canJoin = <bool>::sse_decode(deserializer);
                let mut var_canLeave = <bool>::sse_decode(deserializer);
                let mut var_joinSyncState =
                    <crate::api::BridgeVoiceJoinSyncState>::sse_decode(deserializer);
                let mut var_joinErrorCode =
                    <Option<crate::api::BridgeVoiceJoinErrorCode>>::sse_decode(deserializer);
                return crate::api::BridgeEvent::VoiceState {
                    in_channel: var_inChannel,
                    transmit_mode: var_transmitMode,
                    mute: var_mute,
                    release_tail_ms: var_releaseTailMs,
                    current_channel_id: var_currentChannelId,
                    pending_target_channel_id: var_pendingTargetChannelId,
                    can_join: var_canJoin,
                    can_leave: var_canLeave,
                    join_sync_state: var_joinSyncState,
                    join_error_code: var_joinErrorCode,
                };
            }
            8 => {
                let mut var_began = <bool>::sse_decode(deserializer);
                let mut var_shouldResume = <bool>::sse_decode(deserializer);
                return crate::api::BridgeEvent::InterruptionState {
                    began: var_began,
                    should_resume: var_shouldResume,
                };
            }
            9 => {
                let mut var_permission = <String>::sse_decode(deserializer);
                let mut var_state = <crate::api::PermissionStateKind>::sse_decode(deserializer);
                return crate::api::BridgeEvent::PermissionState {
                    permission: var_permission,
                    state: var_state,
                };
            }
            10 => {
                let mut var_senderId = <u64>::sse_decode(deserializer);
                let mut var_senderName = <String>::sse_decode(deserializer);
                let mut var_message = <String>::sse_decode(deserializer);
                let mut var_target = <crate::api::BridgeMessageTarget>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ChatMessage {
                    sender_id: var_senderId,
                    sender_name: var_senderName,
                    message: var_message,
                    target: var_target,
                };
            }
            11 => {
                let mut var_message = <String>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ServerActivity {
                    message: var_message,
                };
            }
            12 => {
                let mut var_route = <crate::api::BridgeAudioRoute>::sse_decode(deserializer);
                return crate::api::BridgeEvent::AudioRouteChanged { route: var_route };
            }
            13 => {
                let mut var_clientId = <u64>::sse_decode(deserializer);
                let mut var_newChannelId = <u64>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ClientMoved {
                    client_id: var_clientId,
                    new_channel_id: var_newChannelId,
                };
            }
            14 => {
                let mut var_clientId = <u64>::sse_decode(deserializer);
                let mut var_channelId = <u64>::sse_decode(deserializer);
                let mut var_name = <String>::sse_decode(deserializer);
                let mut var_inputMuted = <bool>::sse_decode(deserializer);
                let mut var_outputMuted = <bool>::sse_decode(deserializer);
                let mut var_isServerQuery = <bool>::sse_decode(deserializer);
                let mut var_talkPower = <i32>::sse_decode(deserializer);
                let mut var_talkPowerGranted = <bool>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ClientJoined {
                    client_id: var_clientId,
                    channel_id: var_channelId,
                    name: var_name,
                    input_muted: var_inputMuted,
                    output_muted: var_outputMuted,
                    is_server_query: var_isServerQuery,
                    talk_power: var_talkPower,
                    talk_power_granted: var_talkPowerGranted,
                };
            }
            15 => {
                let mut var_clientId = <u64>::sse_decode(deserializer);
                let mut var_name = <String>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ClientLeft {
                    client_id: var_clientId,
                    name: var_name,
                };
            }
            16 => {
                let mut var_clientId = <u64>::sse_decode(deserializer);
                let mut var_inputMuted = <bool>::sse_decode(deserializer);
                let mut var_outputMuted = <bool>::sse_decode(deserializer);
                let mut var_isServerQuery = <bool>::sse_decode(deserializer);
                let mut var_talkPower = <i32>::sse_decode(deserializer);
                let mut var_talkPowerGranted = <bool>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ClientUpdated {
                    client_id: var_clientId,
                    input_muted: var_inputMuted,
                    output_muted: var_outputMuted,
                    is_server_query: var_isServerQuery,
                    talk_power: var_talkPower,
                    talk_power_granted: var_talkPowerGranted,
                };
            }
            17 => {
                let mut var_id = <u64>::sse_decode(deserializer);
                let mut var_parent = <u64>::sse_decode(deserializer);
                let mut var_name = <String>::sse_decode(deserializer);
                let mut var_order = <i64>::sse_decode(deserializer);
                let mut var_hasPassword = <bool>::sse_decode(deserializer);
                let mut var_neededTalkPower = <Option<i32>>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ChannelAdded {
                    id: var_id,
                    parent: var_parent,
                    name: var_name,
                    order: var_order,
                    has_password: var_hasPassword,
                    needed_talk_power: var_neededTalkPower,
                };
            }
            18 => {
                let mut var_id = <u64>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ChannelRemoved { id: var_id };
            }
            19 => {
                let mut var_id = <u64>::sse_decode(deserializer);
                let mut var_name = <String>::sse_decode(deserializer);
                let mut var_hasPassword = <bool>::sse_decode(deserializer);
                let mut var_neededTalkPower = <Option<i32>>::sse_decode(deserializer);
                return crate::api::BridgeEvent::ChannelUpdated {
                    id: var_id,
                    name: var_name,
                    has_password: var_hasPassword,
                    needed_talk_power: var_neededTalkPower,
                };
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}

impl SseDecode for crate::api::BridgeIosVoiceProcessingMode {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeIosVoiceProcessingMode::PlatformVoiceProcessing,
            1 => crate::api::BridgeIosVoiceProcessingMode::SonoraExperimental,
            _ => unreachable!(
                "Invalid variant for BridgeIosVoiceProcessingMode: {}",
                inner
            ),
        };
    }
}

impl SseDecode for crate::api::BridgeMessageTarget {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut tag_ = <i32>::sse_decode(deserializer);
        match tag_ {
            0 => {
                return crate::api::BridgeMessageTarget::Server;
            }
            1 => {
                return crate::api::BridgeMessageTarget::Channel;
            }
            2 => {
                let mut var_field0 = <u64>::sse_decode(deserializer);
                return crate::api::BridgeMessageTarget::Client(var_field0);
            }
            3 => {
                let mut var_field0 = <u64>::sse_decode(deserializer);
                return crate::api::BridgeMessageTarget::Poke(var_field0);
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}

impl SseDecode for crate::api::BridgeNetworkState {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeNetworkState::Unknown,
            1 => crate::api::BridgeNetworkState::Online,
            2 => crate::api::BridgeNetworkState::Offline,
            _ => unreachable!("Invalid variant for BridgeNetworkState: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgePttBinding {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_inputClass = <String>::sse_decode(deserializer);
        let mut var_keyLabel = <String>::sse_decode(deserializer);
        return crate::api::BridgePttBinding {
            input_class: var_inputClass,
            key_label: var_keyLabel,
        };
    }
}

impl SseDecode for crate::api::BridgePttDescriptor {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_level = <String>::sse_decode(deserializer);
        let mut var_backendId = <String>::sse_decode(deserializer);
        let mut var_boundInputClass = <String>::sse_decode(deserializer);
        return crate::api::BridgePttDescriptor {
            level: var_level,
            backend_id: var_backendId,
            bound_input_class: var_boundInputClass,
        };
    }
}

impl SseDecode for crate::api::BridgePttInputClass {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgePttInputClass::None,
            1 => crate::api::BridgePttInputClass::Keyboard,
            2 => crate::api::BridgePttInputClass::MouseSideButton,
            _ => unreachable!("Invalid variant for BridgePttInputClass: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgeSnapshot {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut var_serverName = <String>::sse_decode(deserializer);
        let mut var_welcomeMessage = <String>::sse_decode(deserializer);
        let mut var_platform = <String>::sse_decode(deserializer);
        let mut var_version = <String>::sse_decode(deserializer);
        let mut var_channels = <Vec<crate::api::BridgeChannel>>::sse_decode(deserializer);
        let mut var_clients = <Vec<crate::api::BridgeClient>>::sse_decode(deserializer);
        let mut var_ownClientId = <u64>::sse_decode(deserializer);
        return crate::api::BridgeSnapshot {
            server_name: var_serverName,
            welcome_message: var_welcomeMessage,
            platform: var_platform,
            version: var_version,
            channels: var_channels,
            clients: var_clients,
            own_client_id: var_ownClientId,
        };
    }
}

impl SseDecode for crate::api::BridgeTransmitMode {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeTransmitMode::Ptt,
            1 => crate::api::BridgeTransmitMode::Continuous,
            2 => crate::api::BridgeTransmitMode::VoiceActivity,
            _ => unreachable!("Invalid variant for BridgeTransmitMode: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgeVadBackend {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeVadBackend::SileroOnnx,
            1 => crate::api::BridgeVadBackend::WebrtcVad,
            2 => crate::api::BridgeVadBackend::EnergyDebug,
            3 => crate::api::BridgeVadBackend::Disabled,
            _ => unreachable!("Invalid variant for BridgeVadBackend: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgeVoiceJoinErrorCode {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeVoiceJoinErrorCode::DuplicateSameTargetCoalesced,
            1 => crate::api::BridgeVoiceJoinErrorCode::JoinAlreadyPendingDifferentTarget,
            2 => crate::api::BridgeVoiceJoinErrorCode::JoinDenied,
            3 => crate::api::BridgeVoiceJoinErrorCode::JoinProtocolFailure,
            4 => crate::api::BridgeVoiceJoinErrorCode::JoinNetworkFailure,
            5 => crate::api::BridgeVoiceJoinErrorCode::JoinTimeout,
            6 => crate::api::BridgeVoiceJoinErrorCode::JoinSupersededByLeave,
            7 => crate::api::BridgeVoiceJoinErrorCode::JoinStaleOutcomeIgnored,
            8 => crate::api::BridgeVoiceJoinErrorCode::JoinReconciledDifferentChannel,
            9 => crate::api::BridgeVoiceJoinErrorCode::JoinCommandRejectedBeforeSend,
            10 => crate::api::BridgeVoiceJoinErrorCode::JoinCannotStartWhileSynchronizing,
            _ => unreachable!("Invalid variant for BridgeVoiceJoinErrorCode: {}", inner),
        };
    }
}

impl SseDecode for crate::api::BridgeVoiceJoinSyncState {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::BridgeVoiceJoinSyncState::Ready,
            1 => crate::api::BridgeVoiceJoinSyncState::SynchronizingInitialSnapshot,
            2 => crate::api::BridgeVoiceJoinSyncState::SynchronizingReconnect,
            _ => unreachable!("Invalid variant for BridgeVoiceJoinSyncState: {}", inner),
        };
    }
}

impl SseDecode for f32 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_f32::<NativeEndian>().unwrap()
    }
}

impl SseDecode for i32 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_i32::<NativeEndian>().unwrap()
    }
}

impl SseDecode for i64 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_i64::<NativeEndian>().unwrap()
    }
}

impl SseDecode for Vec<String> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut len_ = <i32>::sse_decode(deserializer);
        let mut ans_ = Vec::with_capacity(len_ as usize);
        for idx_ in 0..len_ {
            ans_.push(<String>::sse_decode(deserializer));
        }
        return ans_;
    }
}

impl SseDecode for Vec<crate::api::BridgeAudioDevice> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut len_ = <i32>::sse_decode(deserializer);
        let mut ans_ = Vec::with_capacity(len_ as usize);
        for idx_ in 0..len_ {
            ans_.push(<crate::api::BridgeAudioDevice>::sse_decode(deserializer));
        }
        return ans_;
    }
}

impl SseDecode for Vec<crate::api::BridgeBookmark> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut len_ = <i32>::sse_decode(deserializer);
        let mut ans_ = Vec::with_capacity(len_ as usize);
        for idx_ in 0..len_ {
            ans_.push(<crate::api::BridgeBookmark>::sse_decode(deserializer));
        }
        return ans_;
    }
}

impl SseDecode for Vec<crate::api::BridgeChannel> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut len_ = <i32>::sse_decode(deserializer);
        let mut ans_ = Vec::with_capacity(len_ as usize);
        for idx_ in 0..len_ {
            ans_.push(<crate::api::BridgeChannel>::sse_decode(deserializer));
        }
        return ans_;
    }
}

impl SseDecode for Vec<crate::api::BridgeClient> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut len_ = <i32>::sse_decode(deserializer);
        let mut ans_ = Vec::with_capacity(len_ as usize);
        for idx_ in 0..len_ {
            ans_.push(<crate::api::BridgeClient>::sse_decode(deserializer));
        }
        return ans_;
    }
}

impl SseDecode for Vec<u8> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut len_ = <i32>::sse_decode(deserializer);
        let mut ans_ = Vec::with_capacity(len_ as usize);
        for idx_ in 0..len_ {
            ans_.push(<u8>::sse_decode(deserializer));
        }
        return ans_;
    }
}

impl SseDecode for Option<String> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        if (<bool>::sse_decode(deserializer)) {
            return Some(<String>::sse_decode(deserializer));
        } else {
            return None;
        }
    }
}

impl SseDecode for Option<crate::api::BridgeVoiceJoinErrorCode> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        if (<bool>::sse_decode(deserializer)) {
            return Some(<crate::api::BridgeVoiceJoinErrorCode>::sse_decode(
                deserializer,
            ));
        } else {
            return None;
        }
    }
}

impl SseDecode for Option<f32> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        if (<bool>::sse_decode(deserializer)) {
            return Some(<f32>::sse_decode(deserializer));
        } else {
            return None;
        }
    }
}

impl SseDecode for Option<i32> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        if (<bool>::sse_decode(deserializer)) {
            return Some(<i32>::sse_decode(deserializer));
        } else {
            return None;
        }
    }
}

impl SseDecode for Option<i64> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        if (<bool>::sse_decode(deserializer)) {
            return Some(<i64>::sse_decode(deserializer));
        } else {
            return None;
        }
    }
}

impl SseDecode for Option<u64> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        if (<bool>::sse_decode(deserializer)) {
            return Some(<u64>::sse_decode(deserializer));
        } else {
            return None;
        }
    }
}

impl SseDecode for crate::api::PermissionStateKind {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        let mut inner = <i32>::sse_decode(deserializer);
        return match inner {
            0 => crate::api::PermissionStateKind::Granted,
            1 => crate::api::PermissionStateKind::Denied,
            2 => crate::api::PermissionStateKind::PermanentlyDenied,
            3 => crate::api::PermissionStateKind::Unknown,
            _ => unreachable!("Invalid variant for PermissionStateKind: {}", inner),
        };
    }
}

impl SseDecode for u32 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_u32::<NativeEndian>().unwrap()
    }
}

impl SseDecode for u64 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_u64::<NativeEndian>().unwrap()
    }
}

impl SseDecode for u8 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
        deserializer.cursor.read_u8().unwrap()
    }
}

impl SseDecode for () {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {}
}

fn pde_ffi_dispatcher_primary_impl(
    func_id: i32,
    port: flutter_rust_bridge::for_generated::MessagePort,
    ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len: i32,
    data_len: i32,
) {
    // Codec=Pde (Serialization + dispatch), see doc to use other codecs
    match func_id {
        1 => wire__crate__api__add_bookmark_impl(port, ptr, rust_vec_len, data_len),
        2 => wire__crate__api__audio_processing_stats_impl(port, ptr, rust_vec_len, data_len),
        3 => wire__crate__api__audio_stats_impl(port, ptr, rust_vec_len, data_len),
        4 => wire__crate__api__bridge_init_impl(port, ptr, rust_vec_len, data_len),
        5 => wire__crate__api__client_profile_impl(port, ptr, rust_vec_len, data_len),
        6 => wire__crate__api__connect_impl(port, ptr, rust_vec_len, data_len),
        7 => wire__crate__api__delete_bookmark_impl(port, ptr, rust_vec_len, data_len),
        8 => wire__crate__api__disconnect_impl(port, ptr, rust_vec_len, data_len),
        9 => wire__crate__api__enable_audio_debug_wav_dump_impl(port, ptr, rust_vec_len, data_len),
        10 => wire__crate__api__events_stream_impl(port, ptr, rust_vec_len, data_len),
        12 => wire__crate__api__get_audio_processing_config_impl(port, ptr, rust_vec_len, data_len),
        13 => wire__crate__api__get_ptt_binding_impl(port, ptr, rust_vec_len, data_len),
        14 => wire__crate__api__get_release_tail_ms_impl(port, ptr, rust_vec_len, data_len),
        15 => wire__crate__api__get_transmit_mode_impl(port, ptr, rust_vec_len, data_len),
        20 => wire__crate__api__init_storage_impl(port, ptr, rust_vec_len, data_len),
        21 => wire__crate__api__input_level_stream_impl(port, ptr, rust_vec_len, data_len),
        22 => wire__crate__api__is_connected_impl(port, ptr, rust_vec_len, data_len),
        23 => wire__crate__api__list_audio_devices_impl(port, ptr, rust_vec_len, data_len),
        24 => wire__crate__api__list_bookmarks_impl(port, ptr, rust_vec_len, data_len),
        26 => wire__crate__api__move_to_channel_impl(port, ptr, rust_vec_len, data_len),
        27 => wire__crate__api__prefetch_server_impl(port, ptr, rust_vec_len, data_len),
        28 => wire__crate__api__ptt_descriptor_impl(port, ptr, rust_vec_len, data_len),
        30 => wire__crate__api__send_chat_message_impl(port, ptr, rust_vec_len, data_len),
        32 => wire__crate__api__set_audio_processing_config_impl(port, ptr, rust_vec_len, data_len),
        33 => wire__crate__api__set_client_volume_impl(port, ptr, rust_vec_len, data_len),
        34 => wire__crate__api__set_hard_mute_impl(port, ptr, rust_vec_len, data_len),
        35 => wire__crate__api__set_input_device_impl(port, ptr, rust_vec_len, data_len),
        36 => wire__crate__api__set_input_muted_impl(port, ptr, rust_vec_len, data_len),
        37 => {
            wire__crate__api__set_ios_voice_processing_mode_impl(port, ptr, rust_vec_len, data_len)
        }
        39 => wire__crate__api__set_output_device_impl(port, ptr, rust_vec_len, data_len),
        40 => wire__crate__api__set_output_gain_impl(port, ptr, rust_vec_len, data_len),
        41 => wire__crate__api__set_output_muted_impl(port, ptr, rust_vec_len, data_len),
        42 => wire__crate__api__set_ptt_impl(port, ptr, rust_vec_len, data_len),
        43 => wire__crate__api__set_ptt_binding_impl(port, ptr, rust_vec_len, data_len),
        44 => wire__crate__api__set_release_tail_ms_impl(port, ptr, rust_vec_len, data_len),
        45 => wire__crate__api__set_transmit_mode_impl(port, ptr, rust_vec_len, data_len),
        46 => wire__crate__api__set_vad_model_path_impl(port, ptr, rust_vec_len, data_len),
        47 => wire__crate__api__snapshot_impl(port, ptr, rust_vec_len, data_len),
        48 => wire__crate__api__update_bookmark_impl(port, ptr, rust_vec_len, data_len),
        49 => wire__crate__api__voice_join_impl(port, ptr, rust_vec_len, data_len),
        50 => wire__crate__api__voice_leave_impl(port, ptr, rust_vec_len, data_len),
        _ => unreachable!(),
    }
}

fn pde_ffi_dispatcher_sync_impl(
    func_id: i32,
    ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
    rust_vec_len: i32,
    data_len: i32,
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
    // Codec=Pde (Serialization + dispatch), see doc to use other codecs
    match func_id {
        11 => wire__crate__api__export_diagnostics_impl(ptr, rust_vec_len, data_len),
        16 => wire__crate__api__handle_interruption_began_impl(ptr, rust_vec_len, data_len),
        17 => wire__crate__api__handle_interruption_ended_impl(ptr, rust_vec_len, data_len),
        18 => wire__crate__api__handle_media_services_reset_with_route_impl(
            ptr,
            rust_vec_len,
            data_len,
        ),
        19 => wire__crate__api__handle_route_change_impl(ptr, rust_vec_len, data_len),
        25 => wire__crate__api__log_file_path_str_impl(ptr, rust_vec_len, data_len),
        29 => wire__crate__api__record_lifecycle_event_impl(ptr, rust_vec_len, data_len),
        31 => wire__crate__api__set_audio_output_route_impl(ptr, rust_vec_len, data_len),
        38 => wire__crate__api__set_network_state_impl(ptr, rust_vec_len, data_len),
        _ => unreachable!(),
    }
}

// Section: rust2dart

// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioBackend {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::PlatformVoiceProcessing => 0.into_dart(),
            Self::Sonora => 1.into_dart(),
            Self::WebrtcApm => 2.into_dart(),
            Self::Noop => 3.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeAudioBackend
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioBackend>
    for crate::api::BridgeAudioBackend
{
    fn into_into_dart(self) -> crate::api::BridgeAudioBackend {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioDevice {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.id.into_into_dart().into_dart(),
            self.name.into_into_dart().into_dart(),
            self.details.into_into_dart().into_dart(),
            self.is_default.into_into_dart().into_dart(),
            self.is_selected.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeAudioDevice {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioDevice>
    for crate::api::BridgeAudioDevice
{
    fn into_into_dart(self) -> crate::api::BridgeAudioDevice {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioDeviceList {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.input_devices.into_into_dart().into_dart(),
            self.output_devices.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeAudioDeviceList
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioDeviceList>
    for crate::api::BridgeAudioDeviceList
{
    fn into_into_dart(self) -> crate::api::BridgeAudioDeviceList {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioProcessingConfig {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.route.into_into_dart().into_dart(),
            self.ios_mode.into_into_dart().into_dart(),
            self.processing_backend.into_into_dart().into_dart(),
            self.vad_backend.into_into_dart().into_dart(),
            self.aec.into_into_dart().into_dart(),
            self.ns.into_into_dart().into_dart(),
            self.agc.into_into_dart().into_dart(),
            self.hpf_enabled.into_into_dart().into_dart(),
            self.limiter_enabled.into_into_dart().into_dart(),
            self.vad_hangover_ms.into_into_dart().into_dart(),
            self.vad_pre_roll_ms.into_into_dart().into_dart(),
            self.vad_min_tx_ms.into_into_dart().into_dart(),
            self.debug_wav_dump_enabled.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeAudioProcessingConfig
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioProcessingConfig>
    for crate::api::BridgeAudioProcessingConfig
{
    fn into_into_dart(self) -> crate::api::BridgeAudioProcessingConfig {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioProcessingStats {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.input_dbfs.into_into_dart().into_dart(),
            self.render_dbfs.into_into_dart().into_dart(),
            self.processed_dbfs.into_into_dart().into_dart(),
            self.vad_probability.into_into_dart().into_dart(),
            self.vad_active.into_into_dart().into_dart(),
            self.transmitting.into_into_dart().into_dart(),
            self.vad_backend.into_into_dart().into_dart(),
            self.vad_fallback_active.into_into_dart().into_dart(),
            self.processing_backend.into_into_dart().into_dart(),
            self.ios_voice_processing_mode.into_into_dart().into_dart(),
            self.audio_route.into_into_dart().into_dart(),
            self.actual_sample_rate_hz.into_into_dart().into_dart(),
            self.actual_io_buffer_frames.into_into_dart().into_dart(),
            self.input_overruns.into_into_dart().into_dart(),
            self.output_underruns.into_into_dart().into_dart(),
            self.callback_xruns.into_into_dart().into_dart(),
            self.clipped_samples.into_into_dart().into_dart(),
            self.zero_frames.into_into_dart().into_dart(),
            self.capture_frames.into_into_dart().into_dart(),
            self.callbacks_10ms.into_into_dart().into_dart(),
            self.callbacks_20ms.into_into_dart().into_dart(),
            self.callbacks_other.into_into_dart().into_dart(),
            self.sonora_enabled.into_into_dart().into_dart(),
            self.platform_voice_processing_enabled
                .into_into_dart()
                .into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeAudioProcessingStats
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioProcessingStats>
    for crate::api::BridgeAudioProcessingStats
{
    fn into_into_dart(self) -> crate::api::BridgeAudioProcessingStats {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioRoute {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::Speaker => 0.into_dart(),
            Self::Earpiece => 1.into_dart(),
            Self::WiredHeadset => 2.into_dart(),
            Self::BluetoothHfp => 3.into_dart(),
            Self::BluetoothA2dp => 4.into_dart(),
            Self::Unknown => 5.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeAudioRoute {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioRoute>
    for crate::api::BridgeAudioRoute
{
    fn into_into_dart(self) -> crate::api::BridgeAudioRoute {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeAudioStats {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.frames_sent.into_into_dart().into_dart(),
            self.frames_received.into_into_dart().into_dart(),
            self.ptt_active.into_into_dart().into_dart(),
            self.input_level.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeAudioStats {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeAudioStats>
    for crate::api::BridgeAudioStats
{
    fn into_into_dart(self) -> crate::api::BridgeAudioStats {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeBookmark {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.id.into_into_dart().into_dart(),
            self.display_name.into_into_dart().into_dart(),
            self.host.into_into_dart().into_dart(),
            self.nickname.into_into_dart().into_dart(),
            self.password.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeBookmark {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeBookmark> for crate::api::BridgeBookmark {
    fn into_into_dart(self) -> crate::api::BridgeBookmark {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeChannel {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.id.into_into_dart().into_dart(),
            self.parent.into_into_dart().into_dart(),
            self.name.into_into_dart().into_dart(),
            self.order.into_into_dart().into_dart(),
            self.has_password.into_into_dart().into_dart(),
            self.needed_talk_power.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeChannel {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeChannel> for crate::api::BridgeChannel {
    fn into_into_dart(self) -> crate::api::BridgeChannel {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeClient {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.id.into_into_dart().into_dart(),
            self.channel.into_into_dart().into_dart(),
            self.name.into_into_dart().into_dart(),
            self.input_muted.into_into_dart().into_dart(),
            self.output_muted.into_into_dart().into_dart(),
            self.is_speaking.into_into_dart().into_dart(),
            self.is_server_query.into_into_dart().into_dart(),
            self.talk_power.into_into_dart().into_dart(),
            self.talk_power_granted.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeClient {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeClient> for crate::api::BridgeClient {
    fn into_into_dart(self) -> crate::api::BridgeClient {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeClientProfile {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.id.into_into_dart().into_dart(),
            self.channel.into_into_dart().into_dart(),
            self.name.into_into_dart().into_dart(),
            self.unique_id.into_into_dart().into_dart(),
            self.database_id.into_into_dart().into_dart(),
            self.country_code.into_into_dart().into_dart(),
            self.description.into_into_dart().into_dart(),
            self.version.into_into_dart().into_dart(),
            self.platform.into_into_dart().into_dart(),
            self.created_unix_seconds.into_into_dart().into_dart(),
            self.last_connected_unix_seconds
                .into_into_dart()
                .into_dart(),
            self.connections_total.into_into_dart().into_dart(),
            self.online_seconds.into_into_dart().into_dart(),
            self.idle_milliseconds.into_into_dart().into_dart(),
            self.ping_milliseconds.into_into_dart().into_dart(),
            self.ping_deviation_milliseconds
                .into_into_dart()
                .into_dart(),
            self.client_address.into_into_dart().into_dart(),
            self.server_groups.into_into_dart().into_dart(),
            self.channel_group.into_into_dart().into_dart(),
            self.avatar_path.into_into_dart().into_dart(),
            self.bytes_downloaded_month.into_into_dart().into_dart(),
            self.bytes_uploaded_month.into_into_dart().into_dart(),
            self.bytes_downloaded_total.into_into_dart().into_dart(),
            self.bytes_uploaded_total.into_into_dart().into_dart(),
            self.packet_loss_client_to_server_total
                .into_into_dart()
                .into_dart(),
            self.packet_loss_server_to_client_total
                .into_into_dart()
                .into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeClientProfile
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeClientProfile>
    for crate::api::BridgeClientProfile
{
    fn into_into_dart(self) -> crate::api::BridgeClientProfile {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeEffectOwner {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::Platform => 0.into_dart(),
            Self::Sonora => 1.into_dart(),
            Self::WebrtcApm => 2.into_dart(),
            Self::Conservative => 3.into_dart(),
            Self::Off => 4.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeEffectOwner {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeEffectOwner>
    for crate::api::BridgeEffectOwner
{
    fn into_into_dart(self) -> crate::api::BridgeEffectOwner {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::BridgeError {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            crate::BridgeError::InvalidCommand(field0) => {
                [0.into_dart(), field0.into_into_dart().into_dart()].into_dart()
            }
            crate::BridgeError::DnsFailed { host, reason } => [
                1.into_dart(),
                host.into_into_dart().into_dart(),
                reason.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::BridgeError::Connection(field0) => {
                [2.into_dart(), field0.into_into_dart().into_dart()].into_dart()
            }
            crate::BridgeError::NotConnected => [3.into_dart()].into_dart(),
            crate::BridgeError::AlreadyConnected => [4.into_dart()].into_dart(),
            crate::BridgeError::ServerRejected { code, message } => [
                5.into_dart(),
                code.into_into_dart().into_dart(),
                message.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::BridgeError::Unmapped(field0) => {
                [6.into_dart(), field0.into_into_dart().into_dart()].into_dart()
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::BridgeError {}
impl flutter_rust_bridge::IntoIntoDart<crate::BridgeError> for crate::BridgeError {
    fn into_into_dart(self) -> crate::BridgeError {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeEvent {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            crate::api::BridgeEvent::Connected { server_name } => {
                [0.into_dart(), server_name.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeEvent::Lost { reason } => {
                [1.into_dart(), reason.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeEvent::Reconnecting {
                attempt,
                delay_secs,
            } => [
                2.into_dart(),
                attempt.into_into_dart().into_dart(),
                delay_secs.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::Disconnected { reason } => {
                [3.into_dart(), reason.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeEvent::AudioStarted => [4.into_dart()].into_dart(),
            crate::api::BridgeEvent::AudioStopped => [5.into_dart()].into_dart(),
            crate::api::BridgeEvent::PttCapability {
                level,
                backend_id,
                bound_input_class,
            } => [
                6.into_dart(),
                level.into_into_dart().into_dart(),
                backend_id.into_into_dart().into_dart(),
                bound_input_class.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::VoiceState {
                in_channel,
                transmit_mode,
                mute,
                release_tail_ms,
                current_channel_id,
                pending_target_channel_id,
                can_join,
                can_leave,
                join_sync_state,
                join_error_code,
            } => [
                7.into_dart(),
                in_channel.into_into_dart().into_dart(),
                transmit_mode.into_into_dart().into_dart(),
                mute.into_into_dart().into_dart(),
                release_tail_ms.into_into_dart().into_dart(),
                current_channel_id.into_into_dart().into_dart(),
                pending_target_channel_id.into_into_dart().into_dart(),
                can_join.into_into_dart().into_dart(),
                can_leave.into_into_dart().into_dart(),
                join_sync_state.into_into_dart().into_dart(),
                join_error_code.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::InterruptionState {
                began,
                should_resume,
            } => [
                8.into_dart(),
                began.into_into_dart().into_dart(),
                should_resume.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::PermissionState { permission, state } => [
                9.into_dart(),
                permission.into_into_dart().into_dart(),
                state.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ChatMessage {
                sender_id,
                sender_name,
                message,
                target,
            } => [
                10.into_dart(),
                sender_id.into_into_dart().into_dart(),
                sender_name.into_into_dart().into_dart(),
                message.into_into_dart().into_dart(),
                target.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ServerActivity { message } => {
                [11.into_dart(), message.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeEvent::AudioRouteChanged { route } => {
                [12.into_dart(), route.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeEvent::ClientMoved {
                client_id,
                new_channel_id,
            } => [
                13.into_dart(),
                client_id.into_into_dart().into_dart(),
                new_channel_id.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ClientJoined {
                client_id,
                channel_id,
                name,
                input_muted,
                output_muted,
                is_server_query,
                talk_power,
                talk_power_granted,
            } => [
                14.into_dart(),
                client_id.into_into_dart().into_dart(),
                channel_id.into_into_dart().into_dart(),
                name.into_into_dart().into_dart(),
                input_muted.into_into_dart().into_dart(),
                output_muted.into_into_dart().into_dart(),
                is_server_query.into_into_dart().into_dart(),
                talk_power.into_into_dart().into_dart(),
                talk_power_granted.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ClientLeft { client_id, name } => [
                15.into_dart(),
                client_id.into_into_dart().into_dart(),
                name.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ClientUpdated {
                client_id,
                input_muted,
                output_muted,
                is_server_query,
                talk_power,
                talk_power_granted,
            } => [
                16.into_dart(),
                client_id.into_into_dart().into_dart(),
                input_muted.into_into_dart().into_dart(),
                output_muted.into_into_dart().into_dart(),
                is_server_query.into_into_dart().into_dart(),
                talk_power.into_into_dart().into_dart(),
                talk_power_granted.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ChannelAdded {
                id,
                parent,
                name,
                order,
                has_password,
                needed_talk_power,
            } => [
                17.into_dart(),
                id.into_into_dart().into_dart(),
                parent.into_into_dart().into_dart(),
                name.into_into_dart().into_dart(),
                order.into_into_dart().into_dart(),
                has_password.into_into_dart().into_dart(),
                needed_talk_power.into_into_dart().into_dart(),
            ]
            .into_dart(),
            crate::api::BridgeEvent::ChannelRemoved { id } => {
                [18.into_dart(), id.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeEvent::ChannelUpdated {
                id,
                name,
                has_password,
                needed_talk_power,
            } => [
                19.into_dart(),
                id.into_into_dart().into_dart(),
                name.into_into_dart().into_dart(),
                has_password.into_into_dart().into_dart(),
                needed_talk_power.into_into_dart().into_dart(),
            ]
            .into_dart(),
            _ => {
                unimplemented!("");
            }
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeEvent {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeEvent> for crate::api::BridgeEvent {
    fn into_into_dart(self) -> crate::api::BridgeEvent {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeIosVoiceProcessingMode {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::PlatformVoiceProcessing => 0.into_dart(),
            Self::SonoraExperimental => 1.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeIosVoiceProcessingMode
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeIosVoiceProcessingMode>
    for crate::api::BridgeIosVoiceProcessingMode
{
    fn into_into_dart(self) -> crate::api::BridgeIosVoiceProcessingMode {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeMessageTarget {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            crate::api::BridgeMessageTarget::Server => [0.into_dart()].into_dart(),
            crate::api::BridgeMessageTarget::Channel => [1.into_dart()].into_dart(),
            crate::api::BridgeMessageTarget::Client(field0) => {
                [2.into_dart(), field0.into_into_dart().into_dart()].into_dart()
            }
            crate::api::BridgeMessageTarget::Poke(field0) => {
                [3.into_dart(), field0.into_into_dart().into_dart()].into_dart()
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeMessageTarget
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeMessageTarget>
    for crate::api::BridgeMessageTarget
{
    fn into_into_dart(self) -> crate::api::BridgeMessageTarget {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeNetworkState {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::Unknown => 0.into_dart(),
            Self::Online => 1.into_dart(),
            Self::Offline => 2.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeNetworkState
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeNetworkState>
    for crate::api::BridgeNetworkState
{
    fn into_into_dart(self) -> crate::api::BridgeNetworkState {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgePttBinding {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.input_class.into_into_dart().into_dart(),
            self.key_label.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgePttBinding {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgePttBinding>
    for crate::api::BridgePttBinding
{
    fn into_into_dart(self) -> crate::api::BridgePttBinding {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgePttDescriptor {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.level.into_into_dart().into_dart(),
            self.backend_id.into_into_dart().into_dart(),
            self.bound_input_class.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgePttDescriptor
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgePttDescriptor>
    for crate::api::BridgePttDescriptor
{
    fn into_into_dart(self) -> crate::api::BridgePttDescriptor {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgePttInputClass {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::None => 0.into_dart(),
            Self::Keyboard => 1.into_dart(),
            Self::MouseSideButton => 2.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgePttInputClass
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgePttInputClass>
    for crate::api::BridgePttInputClass
{
    fn into_into_dart(self) -> crate::api::BridgePttInputClass {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeSnapshot {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        [
            self.server_name.into_into_dart().into_dart(),
            self.welcome_message.into_into_dart().into_dart(),
            self.platform.into_into_dart().into_dart(),
            self.version.into_into_dart().into_dart(),
            self.channels.into_into_dart().into_dart(),
            self.clients.into_into_dart().into_dart(),
            self.own_client_id.into_into_dart().into_dart(),
        ]
        .into_dart()
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeSnapshot {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeSnapshot> for crate::api::BridgeSnapshot {
    fn into_into_dart(self) -> crate::api::BridgeSnapshot {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeTransmitMode {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::Ptt => 0.into_dart(),
            Self::Continuous => 1.into_dart(),
            Self::VoiceActivity => 2.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeTransmitMode
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeTransmitMode>
    for crate::api::BridgeTransmitMode
{
    fn into_into_dart(self) -> crate::api::BridgeTransmitMode {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeVadBackend {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::SileroOnnx => 0.into_dart(),
            Self::WebrtcVad => 1.into_dart(),
            Self::EnergyDebug => 2.into_dart(),
            Self::Disabled => 3.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::BridgeVadBackend {}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeVadBackend>
    for crate::api::BridgeVadBackend
{
    fn into_into_dart(self) -> crate::api::BridgeVadBackend {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeVoiceJoinErrorCode {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::DuplicateSameTargetCoalesced => 0.into_dart(),
            Self::JoinAlreadyPendingDifferentTarget => 1.into_dart(),
            Self::JoinDenied => 2.into_dart(),
            Self::JoinProtocolFailure => 3.into_dart(),
            Self::JoinNetworkFailure => 4.into_dart(),
            Self::JoinTimeout => 5.into_dart(),
            Self::JoinSupersededByLeave => 6.into_dart(),
            Self::JoinStaleOutcomeIgnored => 7.into_dart(),
            Self::JoinReconciledDifferentChannel => 8.into_dart(),
            Self::JoinCommandRejectedBeforeSend => 9.into_dart(),
            Self::JoinCannotStartWhileSynchronizing => 10.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeVoiceJoinErrorCode
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeVoiceJoinErrorCode>
    for crate::api::BridgeVoiceJoinErrorCode
{
    fn into_into_dart(self) -> crate::api::BridgeVoiceJoinErrorCode {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::BridgeVoiceJoinSyncState {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::Ready => 0.into_dart(),
            Self::SynchronizingInitialSnapshot => 1.into_dart(),
            Self::SynchronizingReconnect => 2.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::BridgeVoiceJoinSyncState
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::BridgeVoiceJoinSyncState>
    for crate::api::BridgeVoiceJoinSyncState
{
    fn into_into_dart(self) -> crate::api::BridgeVoiceJoinSyncState {
        self
    }
}
// Codec=Dco (DartCObject based), see doc to use other codecs
impl flutter_rust_bridge::IntoDart for crate::api::PermissionStateKind {
    fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
        match self {
            Self::Granted => 0.into_dart(),
            Self::Denied => 1.into_dart(),
            Self::PermanentlyDenied => 2.into_dart(),
            Self::Unknown => 3.into_dart(),
            _ => unreachable!(),
        }
    }
}
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
    for crate::api::PermissionStateKind
{
}
impl flutter_rust_bridge::IntoIntoDart<crate::api::PermissionStateKind>
    for crate::api::PermissionStateKind
{
    fn into_into_dart(self) -> crate::api::PermissionStateKind {
        self
    }
}

impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <String>::sse_encode(format!("{:?}", self), serializer);
    }
}

impl SseEncode
    for StreamSink<crate::api::BridgeEvent, flutter_rust_bridge::for_generated::SseCodec>
{
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        unimplemented!("")
    }
}

impl SseEncode for StreamSink<f32, flutter_rust_bridge::for_generated::SseCodec> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        unimplemented!("")
    }
}

impl SseEncode for String {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <Vec<u8>>::sse_encode(self.into_bytes(), serializer);
    }
}

impl SseEncode for bool {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_u8(self as _).unwrap();
    }
}

impl SseEncode for crate::api::BridgeAudioBackend {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeAudioBackend::PlatformVoiceProcessing => 0,
                crate::api::BridgeAudioBackend::Sonora => 1,
                crate::api::BridgeAudioBackend::WebrtcApm => 2,
                crate::api::BridgeAudioBackend::Noop => 3,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeAudioDevice {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <String>::sse_encode(self.id, serializer);
        <String>::sse_encode(self.name, serializer);
        <String>::sse_encode(self.details, serializer);
        <bool>::sse_encode(self.is_default, serializer);
        <bool>::sse_encode(self.is_selected, serializer);
    }
}

impl SseEncode for crate::api::BridgeAudioDeviceList {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <Vec<crate::api::BridgeAudioDevice>>::sse_encode(self.input_devices, serializer);
        <Vec<crate::api::BridgeAudioDevice>>::sse_encode(self.output_devices, serializer);
    }
}

impl SseEncode for crate::api::BridgeAudioProcessingConfig {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <crate::api::BridgeAudioRoute>::sse_encode(self.route, serializer);
        <crate::api::BridgeIosVoiceProcessingMode>::sse_encode(self.ios_mode, serializer);
        <crate::api::BridgeAudioBackend>::sse_encode(self.processing_backend, serializer);
        <crate::api::BridgeVadBackend>::sse_encode(self.vad_backend, serializer);
        <crate::api::BridgeEffectOwner>::sse_encode(self.aec, serializer);
        <crate::api::BridgeEffectOwner>::sse_encode(self.ns, serializer);
        <crate::api::BridgeEffectOwner>::sse_encode(self.agc, serializer);
        <bool>::sse_encode(self.hpf_enabled, serializer);
        <bool>::sse_encode(self.limiter_enabled, serializer);
        <u32>::sse_encode(self.vad_hangover_ms, serializer);
        <u32>::sse_encode(self.vad_pre_roll_ms, serializer);
        <u32>::sse_encode(self.vad_min_tx_ms, serializer);
        <bool>::sse_encode(self.debug_wav_dump_enabled, serializer);
    }
}

impl SseEncode for crate::api::BridgeAudioProcessingStats {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <f32>::sse_encode(self.input_dbfs, serializer);
        <f32>::sse_encode(self.render_dbfs, serializer);
        <f32>::sse_encode(self.processed_dbfs, serializer);
        <f32>::sse_encode(self.vad_probability, serializer);
        <bool>::sse_encode(self.vad_active, serializer);
        <bool>::sse_encode(self.transmitting, serializer);
        <crate::api::BridgeVadBackend>::sse_encode(self.vad_backend, serializer);
        <bool>::sse_encode(self.vad_fallback_active, serializer);
        <crate::api::BridgeAudioBackend>::sse_encode(self.processing_backend, serializer);
        <crate::api::BridgeIosVoiceProcessingMode>::sse_encode(
            self.ios_voice_processing_mode,
            serializer,
        );
        <crate::api::BridgeAudioRoute>::sse_encode(self.audio_route, serializer);
        <u32>::sse_encode(self.actual_sample_rate_hz, serializer);
        <u32>::sse_encode(self.actual_io_buffer_frames, serializer);
        <u64>::sse_encode(self.input_overruns, serializer);
        <u64>::sse_encode(self.output_underruns, serializer);
        <u64>::sse_encode(self.callback_xruns, serializer);
        <u64>::sse_encode(self.clipped_samples, serializer);
        <u64>::sse_encode(self.zero_frames, serializer);
        <u64>::sse_encode(self.capture_frames, serializer);
        <u64>::sse_encode(self.callbacks_10ms, serializer);
        <u64>::sse_encode(self.callbacks_20ms, serializer);
        <u64>::sse_encode(self.callbacks_other, serializer);
        <bool>::sse_encode(self.sonora_enabled, serializer);
        <bool>::sse_encode(self.platform_voice_processing_enabled, serializer);
    }
}

impl SseEncode for crate::api::BridgeAudioRoute {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeAudioRoute::Speaker => 0,
                crate::api::BridgeAudioRoute::Earpiece => 1,
                crate::api::BridgeAudioRoute::WiredHeadset => 2,
                crate::api::BridgeAudioRoute::BluetoothHfp => 3,
                crate::api::BridgeAudioRoute::BluetoothA2dp => 4,
                crate::api::BridgeAudioRoute::Unknown => 5,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeAudioStats {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <u32>::sse_encode(self.frames_sent, serializer);
        <u32>::sse_encode(self.frames_received, serializer);
        <bool>::sse_encode(self.ptt_active, serializer);
        <f32>::sse_encode(self.input_level, serializer);
    }
}

impl SseEncode for crate::api::BridgeBookmark {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i64>::sse_encode(self.id, serializer);
        <String>::sse_encode(self.display_name, serializer);
        <String>::sse_encode(self.host, serializer);
        <String>::sse_encode(self.nickname, serializer);
        <String>::sse_encode(self.password, serializer);
    }
}

impl SseEncode for crate::api::BridgeChannel {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <u64>::sse_encode(self.id, serializer);
        <u64>::sse_encode(self.parent, serializer);
        <String>::sse_encode(self.name, serializer);
        <i64>::sse_encode(self.order, serializer);
        <bool>::sse_encode(self.has_password, serializer);
        <Option<i32>>::sse_encode(self.needed_talk_power, serializer);
    }
}

impl SseEncode for crate::api::BridgeClient {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <u64>::sse_encode(self.id, serializer);
        <u64>::sse_encode(self.channel, serializer);
        <String>::sse_encode(self.name, serializer);
        <bool>::sse_encode(self.input_muted, serializer);
        <bool>::sse_encode(self.output_muted, serializer);
        <bool>::sse_encode(self.is_speaking, serializer);
        <bool>::sse_encode(self.is_server_query, serializer);
        <i32>::sse_encode(self.talk_power, serializer);
        <bool>::sse_encode(self.talk_power_granted, serializer);
    }
}

impl SseEncode for crate::api::BridgeClientProfile {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <u64>::sse_encode(self.id, serializer);
        <u64>::sse_encode(self.channel, serializer);
        <String>::sse_encode(self.name, serializer);
        <String>::sse_encode(self.unique_id, serializer);
        <Option<u64>>::sse_encode(self.database_id, serializer);
        <String>::sse_encode(self.country_code, serializer);
        <String>::sse_encode(self.description, serializer);
        <String>::sse_encode(self.version, serializer);
        <String>::sse_encode(self.platform, serializer);
        <Option<i64>>::sse_encode(self.created_unix_seconds, serializer);
        <Option<i64>>::sse_encode(self.last_connected_unix_seconds, serializer);
        <Option<u64>>::sse_encode(self.connections_total, serializer);
        <Option<i64>>::sse_encode(self.online_seconds, serializer);
        <Option<i64>>::sse_encode(self.idle_milliseconds, serializer);
        <Option<i64>>::sse_encode(self.ping_milliseconds, serializer);
        <Option<i64>>::sse_encode(self.ping_deviation_milliseconds, serializer);
        <String>::sse_encode(self.client_address, serializer);
        <Vec<String>>::sse_encode(self.server_groups, serializer);
        <String>::sse_encode(self.channel_group, serializer);
        <String>::sse_encode(self.avatar_path, serializer);
        <Option<u64>>::sse_encode(self.bytes_downloaded_month, serializer);
        <Option<u64>>::sse_encode(self.bytes_uploaded_month, serializer);
        <Option<u64>>::sse_encode(self.bytes_downloaded_total, serializer);
        <Option<u64>>::sse_encode(self.bytes_uploaded_total, serializer);
        <Option<f32>>::sse_encode(self.packet_loss_client_to_server_total, serializer);
        <Option<f32>>::sse_encode(self.packet_loss_server_to_client_total, serializer);
    }
}

impl SseEncode for crate::api::BridgeEffectOwner {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeEffectOwner::Platform => 0,
                crate::api::BridgeEffectOwner::Sonora => 1,
                crate::api::BridgeEffectOwner::WebrtcApm => 2,
                crate::api::BridgeEffectOwner::Conservative => 3,
                crate::api::BridgeEffectOwner::Off => 4,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::BridgeError {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        match self {
            crate::BridgeError::InvalidCommand(field0) => {
                <i32>::sse_encode(0, serializer);
                <String>::sse_encode(field0, serializer);
            }
            crate::BridgeError::DnsFailed { host, reason } => {
                <i32>::sse_encode(1, serializer);
                <String>::sse_encode(host, serializer);
                <String>::sse_encode(reason, serializer);
            }
            crate::BridgeError::Connection(field0) => {
                <i32>::sse_encode(2, serializer);
                <String>::sse_encode(field0, serializer);
            }
            crate::BridgeError::NotConnected => {
                <i32>::sse_encode(3, serializer);
            }
            crate::BridgeError::AlreadyConnected => {
                <i32>::sse_encode(4, serializer);
            }
            crate::BridgeError::ServerRejected { code, message } => {
                <i32>::sse_encode(5, serializer);
                <u32>::sse_encode(code, serializer);
                <String>::sse_encode(message, serializer);
            }
            crate::BridgeError::Unmapped(field0) => {
                <i32>::sse_encode(6, serializer);
                <String>::sse_encode(field0, serializer);
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}

impl SseEncode for crate::api::BridgeEvent {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        match self {
            crate::api::BridgeEvent::Connected { server_name } => {
                <i32>::sse_encode(0, serializer);
                <String>::sse_encode(server_name, serializer);
            }
            crate::api::BridgeEvent::Lost { reason } => {
                <i32>::sse_encode(1, serializer);
                <String>::sse_encode(reason, serializer);
            }
            crate::api::BridgeEvent::Reconnecting {
                attempt,
                delay_secs,
            } => {
                <i32>::sse_encode(2, serializer);
                <u32>::sse_encode(attempt, serializer);
                <u32>::sse_encode(delay_secs, serializer);
            }
            crate::api::BridgeEvent::Disconnected { reason } => {
                <i32>::sse_encode(3, serializer);
                <String>::sse_encode(reason, serializer);
            }
            crate::api::BridgeEvent::AudioStarted => {
                <i32>::sse_encode(4, serializer);
            }
            crate::api::BridgeEvent::AudioStopped => {
                <i32>::sse_encode(5, serializer);
            }
            crate::api::BridgeEvent::PttCapability {
                level,
                backend_id,
                bound_input_class,
            } => {
                <i32>::sse_encode(6, serializer);
                <String>::sse_encode(level, serializer);
                <String>::sse_encode(backend_id, serializer);
                <String>::sse_encode(bound_input_class, serializer);
            }
            crate::api::BridgeEvent::VoiceState {
                in_channel,
                transmit_mode,
                mute,
                release_tail_ms,
                current_channel_id,
                pending_target_channel_id,
                can_join,
                can_leave,
                join_sync_state,
                join_error_code,
            } => {
                <i32>::sse_encode(7, serializer);
                <bool>::sse_encode(in_channel, serializer);
                <crate::api::BridgeTransmitMode>::sse_encode(transmit_mode, serializer);
                <bool>::sse_encode(mute, serializer);
                <u32>::sse_encode(release_tail_ms, serializer);
                <Option<u64>>::sse_encode(current_channel_id, serializer);
                <Option<u64>>::sse_encode(pending_target_channel_id, serializer);
                <bool>::sse_encode(can_join, serializer);
                <bool>::sse_encode(can_leave, serializer);
                <crate::api::BridgeVoiceJoinSyncState>::sse_encode(join_sync_state, serializer);
                <Option<crate::api::BridgeVoiceJoinErrorCode>>::sse_encode(
                    join_error_code,
                    serializer,
                );
            }
            crate::api::BridgeEvent::InterruptionState {
                began,
                should_resume,
            } => {
                <i32>::sse_encode(8, serializer);
                <bool>::sse_encode(began, serializer);
                <bool>::sse_encode(should_resume, serializer);
            }
            crate::api::BridgeEvent::PermissionState { permission, state } => {
                <i32>::sse_encode(9, serializer);
                <String>::sse_encode(permission, serializer);
                <crate::api::PermissionStateKind>::sse_encode(state, serializer);
            }
            crate::api::BridgeEvent::ChatMessage {
                sender_id,
                sender_name,
                message,
                target,
            } => {
                <i32>::sse_encode(10, serializer);
                <u64>::sse_encode(sender_id, serializer);
                <String>::sse_encode(sender_name, serializer);
                <String>::sse_encode(message, serializer);
                <crate::api::BridgeMessageTarget>::sse_encode(target, serializer);
            }
            crate::api::BridgeEvent::ServerActivity { message } => {
                <i32>::sse_encode(11, serializer);
                <String>::sse_encode(message, serializer);
            }
            crate::api::BridgeEvent::AudioRouteChanged { route } => {
                <i32>::sse_encode(12, serializer);
                <crate::api::BridgeAudioRoute>::sse_encode(route, serializer);
            }
            crate::api::BridgeEvent::ClientMoved {
                client_id,
                new_channel_id,
            } => {
                <i32>::sse_encode(13, serializer);
                <u64>::sse_encode(client_id, serializer);
                <u64>::sse_encode(new_channel_id, serializer);
            }
            crate::api::BridgeEvent::ClientJoined {
                client_id,
                channel_id,
                name,
                input_muted,
                output_muted,
                is_server_query,
                talk_power,
                talk_power_granted,
            } => {
                <i32>::sse_encode(14, serializer);
                <u64>::sse_encode(client_id, serializer);
                <u64>::sse_encode(channel_id, serializer);
                <String>::sse_encode(name, serializer);
                <bool>::sse_encode(input_muted, serializer);
                <bool>::sse_encode(output_muted, serializer);
                <bool>::sse_encode(is_server_query, serializer);
                <i32>::sse_encode(talk_power, serializer);
                <bool>::sse_encode(talk_power_granted, serializer);
            }
            crate::api::BridgeEvent::ClientLeft { client_id, name } => {
                <i32>::sse_encode(15, serializer);
                <u64>::sse_encode(client_id, serializer);
                <String>::sse_encode(name, serializer);
            }
            crate::api::BridgeEvent::ClientUpdated {
                client_id,
                input_muted,
                output_muted,
                is_server_query,
                talk_power,
                talk_power_granted,
            } => {
                <i32>::sse_encode(16, serializer);
                <u64>::sse_encode(client_id, serializer);
                <bool>::sse_encode(input_muted, serializer);
                <bool>::sse_encode(output_muted, serializer);
                <bool>::sse_encode(is_server_query, serializer);
                <i32>::sse_encode(talk_power, serializer);
                <bool>::sse_encode(talk_power_granted, serializer);
            }
            crate::api::BridgeEvent::ChannelAdded {
                id,
                parent,
                name,
                order,
                has_password,
                needed_talk_power,
            } => {
                <i32>::sse_encode(17, serializer);
                <u64>::sse_encode(id, serializer);
                <u64>::sse_encode(parent, serializer);
                <String>::sse_encode(name, serializer);
                <i64>::sse_encode(order, serializer);
                <bool>::sse_encode(has_password, serializer);
                <Option<i32>>::sse_encode(needed_talk_power, serializer);
            }
            crate::api::BridgeEvent::ChannelRemoved { id } => {
                <i32>::sse_encode(18, serializer);
                <u64>::sse_encode(id, serializer);
            }
            crate::api::BridgeEvent::ChannelUpdated {
                id,
                name,
                has_password,
                needed_talk_power,
            } => {
                <i32>::sse_encode(19, serializer);
                <u64>::sse_encode(id, serializer);
                <String>::sse_encode(name, serializer);
                <bool>::sse_encode(has_password, serializer);
                <Option<i32>>::sse_encode(needed_talk_power, serializer);
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}

impl SseEncode for crate::api::BridgeIosVoiceProcessingMode {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeIosVoiceProcessingMode::PlatformVoiceProcessing => 0,
                crate::api::BridgeIosVoiceProcessingMode::SonoraExperimental => 1,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeMessageTarget {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        match self {
            crate::api::BridgeMessageTarget::Server => {
                <i32>::sse_encode(0, serializer);
            }
            crate::api::BridgeMessageTarget::Channel => {
                <i32>::sse_encode(1, serializer);
            }
            crate::api::BridgeMessageTarget::Client(field0) => {
                <i32>::sse_encode(2, serializer);
                <u64>::sse_encode(field0, serializer);
            }
            crate::api::BridgeMessageTarget::Poke(field0) => {
                <i32>::sse_encode(3, serializer);
                <u64>::sse_encode(field0, serializer);
            }
            _ => {
                unimplemented!("");
            }
        }
    }
}

impl SseEncode for crate::api::BridgeNetworkState {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeNetworkState::Unknown => 0,
                crate::api::BridgeNetworkState::Online => 1,
                crate::api::BridgeNetworkState::Offline => 2,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgePttBinding {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <String>::sse_encode(self.input_class, serializer);
        <String>::sse_encode(self.key_label, serializer);
    }
}

impl SseEncode for crate::api::BridgePttDescriptor {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <String>::sse_encode(self.level, serializer);
        <String>::sse_encode(self.backend_id, serializer);
        <String>::sse_encode(self.bound_input_class, serializer);
    }
}

impl SseEncode for crate::api::BridgePttInputClass {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgePttInputClass::None => 0,
                crate::api::BridgePttInputClass::Keyboard => 1,
                crate::api::BridgePttInputClass::MouseSideButton => 2,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeSnapshot {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <String>::sse_encode(self.server_name, serializer);
        <String>::sse_encode(self.welcome_message, serializer);
        <String>::sse_encode(self.platform, serializer);
        <String>::sse_encode(self.version, serializer);
        <Vec<crate::api::BridgeChannel>>::sse_encode(self.channels, serializer);
        <Vec<crate::api::BridgeClient>>::sse_encode(self.clients, serializer);
        <u64>::sse_encode(self.own_client_id, serializer);
    }
}

impl SseEncode for crate::api::BridgeTransmitMode {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeTransmitMode::Ptt => 0,
                crate::api::BridgeTransmitMode::Continuous => 1,
                crate::api::BridgeTransmitMode::VoiceActivity => 2,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeVadBackend {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeVadBackend::SileroOnnx => 0,
                crate::api::BridgeVadBackend::WebrtcVad => 1,
                crate::api::BridgeVadBackend::EnergyDebug => 2,
                crate::api::BridgeVadBackend::Disabled => 3,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeVoiceJoinErrorCode {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeVoiceJoinErrorCode::DuplicateSameTargetCoalesced => 0,
                crate::api::BridgeVoiceJoinErrorCode::JoinAlreadyPendingDifferentTarget => 1,
                crate::api::BridgeVoiceJoinErrorCode::JoinDenied => 2,
                crate::api::BridgeVoiceJoinErrorCode::JoinProtocolFailure => 3,
                crate::api::BridgeVoiceJoinErrorCode::JoinNetworkFailure => 4,
                crate::api::BridgeVoiceJoinErrorCode::JoinTimeout => 5,
                crate::api::BridgeVoiceJoinErrorCode::JoinSupersededByLeave => 6,
                crate::api::BridgeVoiceJoinErrorCode::JoinStaleOutcomeIgnored => 7,
                crate::api::BridgeVoiceJoinErrorCode::JoinReconciledDifferentChannel => 8,
                crate::api::BridgeVoiceJoinErrorCode::JoinCommandRejectedBeforeSend => 9,
                crate::api::BridgeVoiceJoinErrorCode::JoinCannotStartWhileSynchronizing => 10,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for crate::api::BridgeVoiceJoinSyncState {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::BridgeVoiceJoinSyncState::Ready => 0,
                crate::api::BridgeVoiceJoinSyncState::SynchronizingInitialSnapshot => 1,
                crate::api::BridgeVoiceJoinSyncState::SynchronizingReconnect => 2,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for f32 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_f32::<NativeEndian>(self).unwrap();
    }
}

impl SseEncode for i32 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_i32::<NativeEndian>(self).unwrap();
    }
}

impl SseEncode for i64 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_i64::<NativeEndian>(self).unwrap();
    }
}

impl SseEncode for Vec<String> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(self.len() as _, serializer);
        for item in self {
            <String>::sse_encode(item, serializer);
        }
    }
}

impl SseEncode for Vec<crate::api::BridgeAudioDevice> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(self.len() as _, serializer);
        for item in self {
            <crate::api::BridgeAudioDevice>::sse_encode(item, serializer);
        }
    }
}

impl SseEncode for Vec<crate::api::BridgeBookmark> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(self.len() as _, serializer);
        for item in self {
            <crate::api::BridgeBookmark>::sse_encode(item, serializer);
        }
    }
}

impl SseEncode for Vec<crate::api::BridgeChannel> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(self.len() as _, serializer);
        for item in self {
            <crate::api::BridgeChannel>::sse_encode(item, serializer);
        }
    }
}

impl SseEncode for Vec<crate::api::BridgeClient> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(self.len() as _, serializer);
        for item in self {
            <crate::api::BridgeClient>::sse_encode(item, serializer);
        }
    }
}

impl SseEncode for Vec<u8> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(self.len() as _, serializer);
        for item in self {
            <u8>::sse_encode(item, serializer);
        }
    }
}

impl SseEncode for Option<String> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <bool>::sse_encode(self.is_some(), serializer);
        if let Some(value) = self {
            <String>::sse_encode(value, serializer);
        }
    }
}

impl SseEncode for Option<crate::api::BridgeVoiceJoinErrorCode> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <bool>::sse_encode(self.is_some(), serializer);
        if let Some(value) = self {
            <crate::api::BridgeVoiceJoinErrorCode>::sse_encode(value, serializer);
        }
    }
}

impl SseEncode for Option<f32> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <bool>::sse_encode(self.is_some(), serializer);
        if let Some(value) = self {
            <f32>::sse_encode(value, serializer);
        }
    }
}

impl SseEncode for Option<i32> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <bool>::sse_encode(self.is_some(), serializer);
        if let Some(value) = self {
            <i32>::sse_encode(value, serializer);
        }
    }
}

impl SseEncode for Option<i64> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <bool>::sse_encode(self.is_some(), serializer);
        if let Some(value) = self {
            <i64>::sse_encode(value, serializer);
        }
    }
}

impl SseEncode for Option<u64> {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <bool>::sse_encode(self.is_some(), serializer);
        if let Some(value) = self {
            <u64>::sse_encode(value, serializer);
        }
    }
}

impl SseEncode for crate::api::PermissionStateKind {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        <i32>::sse_encode(
            match self {
                crate::api::PermissionStateKind::Granted => 0,
                crate::api::PermissionStateKind::Denied => 1,
                crate::api::PermissionStateKind::PermanentlyDenied => 2,
                crate::api::PermissionStateKind::Unknown => 3,
                _ => {
                    unimplemented!("");
                }
            },
            serializer,
        );
    }
}

impl SseEncode for u32 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_u32::<NativeEndian>(self).unwrap();
    }
}

impl SseEncode for u64 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_u64::<NativeEndian>(self).unwrap();
    }
}

impl SseEncode for u8 {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
        serializer.cursor.write_u8(self).unwrap();
    }
}

impl SseEncode for () {
    // Codec=Sse (Serialization based), see doc to use other codecs
    fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {}
}

#[cfg(not(target_family = "wasm"))]
mod io {
    // This file is automatically generated, so please do not edit it.
    // @generated by `flutter_rust_bridge`@ 2.12.0.

    // Section: imports

    use super::*;
    use flutter_rust_bridge::for_generated::byteorder::{
        NativeEndian, ReadBytesExt, WriteBytesExt,
    };
    use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
    use flutter_rust_bridge::{Handler, IntoIntoDart};

    // Section: boilerplate

    flutter_rust_bridge::frb_generated_boilerplate_io!();
}
#[cfg(not(target_family = "wasm"))]
pub use io::*;

/// cbindgen:ignore
#[cfg(target_family = "wasm")]
mod web {
    // This file is automatically generated, so please do not edit it.
    // @generated by `flutter_rust_bridge`@ 2.12.0.

    // Section: imports

    use super::*;
    use flutter_rust_bridge::for_generated::byteorder::{
        NativeEndian, ReadBytesExt, WriteBytesExt,
    };
    use flutter_rust_bridge::for_generated::wasm_bindgen;
    use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*;
    use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
    use flutter_rust_bridge::{Handler, IntoIntoDart};

    // Section: boilerplate

    flutter_rust_bridge::frb_generated_boilerplate_web!();
}
#[cfg(target_family = "wasm")]
pub use web::*;
