From 8742b0fcaf1ccb17747049d582a74fd3e73ecc3a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 2 Oct 2024 17:22:05 -0700 Subject: [PATCH 01/16] proto --- livekit-protocol/protocol | 2 +- livekit-protocol/src/livekit.rs | 978 +-- livekit-protocol/src/livekit.serde.rs | 9297 ++++++++++++++++--------- 3 files changed, 6564 insertions(+), 3713 deletions(-) diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index 5c7350d2..a601adc5 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit 5c7350d25904ed8fd8163e91ff47f0577ca6afad +Subproject commit a601adc5e9027820857a6d445b32a868b19d4184 diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index 39426bde..d3f11ac4 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -1,6 +1,179 @@ // @generated // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetricsBatch { + /// time at which this batch is sent based on a monotonic clock (millisecond resolution) + #[prost(int64, tag="1")] + pub timestamp_ms: i64, + #[prost(message, optional, tag="2")] + pub normalized_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, + /// To avoid repeating string values, we store them in a separate list and reference them by index + /// This is useful for storing participant identities, track names, etc. + /// There is also a predefined list of labels that can be used to reference common metrics. + /// They have reserved indices from 0 to (METRIC_LABEL_PREDEFINED_MAX_VALUE - 1). + /// Indexes pointing at str_data should start from METRIC_LABEL_PREDEFINED_MAX_VALUE, + /// such that str_data\[0\] == index of METRIC_LABEL_PREDEFINED_MAX_VALUE. + #[prost(string, repeated, tag="3")] + pub str_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag="4")] + pub time_series: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="5")] + pub events: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TimeSeriesMetric { + /// Metric name e.g "speech_probablity". The string value is not directly stored in the message, but referenced by index + /// in the `str_data` field of `MetricsBatch` + #[prost(uint32, tag="1")] + pub label: u32, + /// index into `str_data` + #[prost(uint32, tag="2")] + pub participant_identity: u32, + /// index into `str_data` + #[prost(uint32, tag="3")] + pub track_sid: u32, + #[prost(message, repeated, tag="4")] + pub samples: ::prost::alloc::vec::Vec, + /// index into 'str_data' + #[prost(uint32, tag="5")] + pub rid: u32, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct MetricSample { + /// time of metric based on a monotonic clock (in milliseconds) + #[prost(int64, tag="1")] + pub timestamp_ms: i64, + #[prost(message, optional, tag="2")] + pub normalized_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(float, tag="3")] + pub value: f32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventMetric { + #[prost(uint32, tag="1")] + pub label: u32, + /// index into `str_data` + #[prost(uint32, tag="2")] + pub participant_identity: u32, + /// index into `str_data` + #[prost(uint32, tag="3")] + pub track_sid: u32, + /// start time of event based on a monotonic clock (in milliseconds) + #[prost(int64, tag="4")] + pub start_timestamp_ms: i64, + /// end time of event based on a monotonic clock (in milliseconds), if needed + #[prost(int64, optional, tag="5")] + pub end_timestamp_ms: ::core::option::Option, + #[prost(message, optional, tag="6")] + pub normalized_start_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(message, optional, tag="7")] + pub normalized_end_timestamp: ::core::option::Option<::pbjson_types::Timestamp>, + #[prost(string, tag="8")] + pub metadata: ::prost::alloc::string::String, + /// index into 'str_data' + #[prost(uint32, tag="9")] + pub rid: u32, +} +// +// Protocol used to record metrics for a specific session. +// +// Clients send their timestamp in their own monotonically increasing time (e.g `performance.now` on JS). +// These timestamps are then augmented by the SFU to its time base. +// +// A metric can be linked to a specific track by setting `track_sid`. + +/// index from [0: MAX_LABEL_PREDEFINED_MAX_VALUE) are for predefined labels (`MetricLabel`) +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum MetricLabel { + /// time to first token from LLM + AgentsLlmTtft = 0, + /// time to final transcription + AgentsSttTtft = 1, + /// time to first byte + AgentsTtsTtfb = 2, + /// Number of video freezes + ClientVideoSubscriberFreezeCount = 3, + /// total duration of freezes + ClientVideoSubscriberTotalFreezeDuration = 4, + /// number of video pauses + ClientVideoSubscriberPauseCount = 5, + /// total duration of pauses + ClientVideoSubscriberTotalPausesDuration = 6, + /// number of concealed (synthesized) audio samples + ClientAudioSubscriberConcealedSamples = 7, + /// number of silent concealed samples + ClientAudioSubscriberSilentConcealedSamples = 8, + /// number of concealment events + ClientAudioSubscriberConcealmentEvents = 9, + /// number of interruptions + ClientAudioSubscriberInterruptionCount = 10, + /// total duration of interruptions + ClientAudioSubscriberTotalInterruptionDuration = 11, + /// total time spent in jitter buffer + ClientSubscriberJitterBufferDelay = 12, + /// total time spent in jitter buffer + ClientSubscriberJitterBufferEmittedCount = 13, + /// total duration spent in bandwidth quality limitation + ClientVideoPublisherQualityLimitationDurationBandwidth = 14, + /// total duration spent in cpu quality limitation + ClientVideoPublisherQualityLimitationDurationCpu = 15, + /// total duration spent in other quality limitation + ClientVideoPublisherQualityLimitationDurationOther = 16, + PredefinedMaxValue = 4096, +} +impl MetricLabel { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Self::AgentsLlmTtft => "AGENTS_LLM_TTFT", + Self::AgentsSttTtft => "AGENTS_STT_TTFT", + Self::AgentsTtsTtfb => "AGENTS_TTS_TTFB", + Self::ClientVideoSubscriberFreezeCount => "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT", + Self::ClientVideoSubscriberTotalFreezeDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION", + Self::ClientVideoSubscriberPauseCount => "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT", + Self::ClientVideoSubscriberTotalPausesDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION", + Self::ClientAudioSubscriberConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES", + Self::ClientAudioSubscriberSilentConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES", + Self::ClientAudioSubscriberConcealmentEvents => "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS", + Self::ClientAudioSubscriberInterruptionCount => "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT", + Self::ClientAudioSubscriberTotalInterruptionDuration => "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION", + Self::ClientSubscriberJitterBufferDelay => "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY", + Self::ClientSubscriberJitterBufferEmittedCount => "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT", + Self::ClientVideoPublisherQualityLimitationDurationBandwidth => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", + Self::ClientVideoPublisherQualityLimitationDurationCpu => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", + Self::ClientVideoPublisherQualityLimitationDurationOther => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", + Self::PredefinedMaxValue => "METRIC_LABEL_PREDEFINED_MAX_VALUE", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AGENTS_LLM_TTFT" => Some(Self::AgentsLlmTtft), + "AGENTS_STT_TTFT" => Some(Self::AgentsSttTtft), + "AGENTS_TTS_TTFB" => Some(Self::AgentsTtsTtfb), + "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT" => Some(Self::ClientVideoSubscriberFreezeCount), + "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION" => Some(Self::ClientVideoSubscriberTotalFreezeDuration), + "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT" => Some(Self::ClientVideoSubscriberPauseCount), + "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION" => Some(Self::ClientVideoSubscriberTotalPausesDuration), + "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES" => Some(Self::ClientAudioSubscriberConcealedSamples), + "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES" => Some(Self::ClientAudioSubscriberSilentConcealedSamples), + "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS" => Some(Self::ClientAudioSubscriberConcealmentEvents), + "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT" => Some(Self::ClientAudioSubscriberInterruptionCount), + "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION" => Some(Self::ClientAudioSubscriberTotalInterruptionDuration), + "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY" => Some(Self::ClientSubscriberJitterBufferDelay), + "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT" => Some(Self::ClientSubscriberJitterBufferEmittedCount), + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH" => Some(Self::ClientVideoPublisherQualityLimitationDurationBandwidth), + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU" => Some(Self::ClientVideoPublisherQualityLimitationDurationCpu), + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER" => Some(Self::ClientVideoPublisherQualityLimitationDurationOther), + "METRIC_LABEL_PREDEFINED_MAX_VALUE" => Some(Self::PredefinedMaxValue), + _ => None, + } + } +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct Room { #[prost(string, tag="1")] @@ -30,7 +203,6 @@ pub struct Room { #[prost(message, optional, tag="13")] pub version: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Codec { #[prost(string, tag="1")] @@ -38,8 +210,7 @@ pub struct Codec { #[prost(string, tag="2")] pub fmtp_line: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct PlayoutDelay { #[prost(bool, tag="1")] pub enabled: bool, @@ -48,7 +219,6 @@ pub struct PlayoutDelay { #[prost(uint32, tag="3")] pub max: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantPermission { /// allow participant to subscribe to other tracks in the room @@ -79,8 +249,10 @@ pub struct ParticipantPermission { #[deprecated] #[prost(bool, tag="11")] pub agent: bool, + /// if a participant can subscribe to metrics + #[prost(bool, tag="12")] + pub can_subscribe_metrics: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantInfo { #[prost(string, tag="1")] @@ -136,10 +308,10 @@ pub mod participant_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - State::Joining => "JOINING", - State::Joined => "JOINED", - State::Active => "ACTIVE", - State::Disconnected => "DISCONNECTED", + Self::Joining => "JOINING", + Self::Joined => "JOINED", + Self::Active => "ACTIVE", + Self::Disconnected => "DISCONNECTED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -174,11 +346,11 @@ pub mod participant_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Kind::Standard => "STANDARD", - Kind::Ingress => "INGRESS", - Kind::Egress => "EGRESS", - Kind::Sip => "SIP", - Kind::Agent => "AGENT", + Self::Standard => "STANDARD", + Self::Ingress => "INGRESS", + Self::Egress => "EGRESS", + Self::Sip => "SIP", + Self::Agent => "AGENT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -194,8 +366,7 @@ pub mod participant_info { } } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Encryption { } /// Nested message and enum types in `Encryption`. @@ -214,9 +385,9 @@ pub mod encryption { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Type::None => "NONE", - Type::Gcm => "GCM", - Type::Custom => "CUSTOM", + Self::None => "NONE", + Self::Gcm => "GCM", + Self::Custom => "CUSTOM", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -230,7 +401,6 @@ pub mod encryption { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodecInfo { #[prost(string, tag="1")] @@ -242,7 +412,6 @@ pub struct SimulcastCodecInfo { #[prost(message, repeated, tag="4")] pub layers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackInfo { #[prost(string, tag="1")] @@ -293,8 +462,7 @@ pub struct TrackInfo { pub audio_features: ::prost::alloc::vec::Vec, } /// provide information about available spatial layers -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VideoLayer { /// for tracks with a single layer, this should be HIGH #[prost(enumeration="VideoQuality", tag="1")] @@ -310,7 +478,6 @@ pub struct VideoLayer { pub ssrc: u32, } /// new DataPacket API -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataPacket { #[deprecated] @@ -322,7 +489,7 @@ pub struct DataPacket { /// identities of participants who will receive the message (sent to all by default) #[prost(string, repeated, tag="5")] pub destination_identities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof="data_packet::Value", tags="2, 3, 6, 7")] + #[prost(oneof="data_packet::Value", tags="2, 3, 6, 7, 8, 9, 10, 11, 12")] pub value: ::core::option::Option, } /// Nested message and enum types in `DataPacket`. @@ -340,8 +507,8 @@ pub mod data_packet { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Kind::Reliable => "RELIABLE", - Kind::Lossy => "LOSSY", + Self::Reliable => "RELIABLE", + Self::Lossy => "LOSSY", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -353,8 +520,7 @@ pub mod data_packet { } } } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { #[prost(message, tag="2")] User(super::UserPacket), @@ -364,15 +530,23 @@ pub mod data_packet { SipDtmf(super::SipDtmf), #[prost(message, tag="7")] Transcription(super::Transcription), + #[prost(message, tag="8")] + Metrics(super::MetricsBatch), + #[prost(message, tag="9")] + ChatMessage(super::ChatMessage), + #[prost(message, tag="10")] + RpcRequest(super::RpcRequest), + #[prost(message, tag="11")] + RpcAck(super::RpcAck), + #[prost(message, tag="12")] + RpcResponse(super::RpcResponse), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActiveSpeakerUpdate { #[prost(message, repeated, tag="1")] pub speakers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SpeakerInfo { #[prost(string, tag="1")] @@ -384,7 +558,6 @@ pub struct SpeakerInfo { #[prost(bool, tag="3")] pub active: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UserPacket { /// participant ID of user that sent the message @@ -417,7 +590,6 @@ pub struct UserPacket { #[prost(uint64, optional, tag="10")] pub end_time: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDtmf { #[prost(uint32, tag="3")] @@ -425,7 +597,6 @@ pub struct SipDtmf { #[prost(string, tag="4")] pub digit: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transcription { /// Participant that got its speech transcribed @@ -436,7 +607,6 @@ pub struct Transcription { #[prost(message, repeated, tag="4")] pub segments: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TranscriptionSegment { #[prost(string, tag="1")] @@ -452,7 +622,69 @@ pub struct TranscriptionSegment { #[prost(string, tag="6")] pub language: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChatMessage { + /// uuid + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(int64, tag="2")] + pub timestamp: i64, + /// populated only if the intent is to edit/update an existing message + #[prost(int64, optional, tag="3")] + pub edit_timestamp: ::core::option::Option, + #[prost(string, tag="4")] + pub message: ::prost::alloc::string::String, + /// true to remove message + #[prost(bool, tag="5")] + pub deleted: bool, + /// true if the chat message has been generated by an agent from a participant's audio transcription + #[prost(bool, tag="6")] + pub generated: bool, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RpcRequest { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub method: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub payload: ::prost::alloc::string::String, + #[prost(uint32, tag="4")] + pub response_timeout_ms: u32, + #[prost(uint32, tag="5")] + pub version: u32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RpcAck { + #[prost(string, tag="1")] + pub request_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RpcResponse { + #[prost(string, tag="1")] + pub request_id: ::prost::alloc::string::String, + #[prost(oneof="rpc_response::Value", tags="2, 3")] + pub value: ::core::option::Option, +} +/// Nested message and enum types in `RpcResponse`. +pub mod rpc_response { + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(string, tag="2")] + Payload(::prost::alloc::string::String), + #[prost(message, tag="3")] + Error(super::RpcError), + } +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RpcError { + #[prost(uint32, tag="1")] + pub code: u32, + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub data: ::prost::alloc::string::String, +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantTracks { /// participant ID of participant to whom the tracks belong @@ -462,7 +694,6 @@ pub struct ParticipantTracks { pub track_sids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// details about the server -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerInfo { #[prost(enumeration="server_info::Edition", tag="1")] @@ -496,8 +727,8 @@ pub mod server_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Edition::Standard => "Standard", - Edition::Cloud => "Cloud", + Self::Standard => "Standard", + Self::Cloud => "Cloud", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -511,7 +742,6 @@ pub mod server_info { } } /// details about the client -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientInfo { #[prost(enumeration="client_info::Sdk", tag="1")] @@ -535,6 +765,10 @@ pub struct ClientInfo { /// wifi, wired, cellular, vpn, empty if not known #[prost(string, tag="10")] pub network: ::prost::alloc::string::String, + /// comma separated list of additional LiveKit SDKs in use of this client, with versions + /// e.g. "components-js:1.2.3,track-processors-js:1.2.3" + #[prost(string, tag="11")] + pub other_sdks: ::prost::alloc::string::String, } /// Nested message and enum types in `ClientInfo`. pub mod client_info { @@ -552,6 +786,8 @@ pub mod client_info { Rust = 8, Python = 9, Cpp = 10, + UnityWeb = 11, + Node = 12, } impl Sdk { /// String value of the enum field names used in the ProtoBuf definition. @@ -560,17 +796,19 @@ pub mod client_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Sdk::Unknown => "UNKNOWN", - Sdk::Js => "JS", - Sdk::Swift => "SWIFT", - Sdk::Android => "ANDROID", - Sdk::Flutter => "FLUTTER", - Sdk::Go => "GO", - Sdk::Unity => "UNITY", - Sdk::ReactNative => "REACT_NATIVE", - Sdk::Rust => "RUST", - Sdk::Python => "PYTHON", - Sdk::Cpp => "CPP", + Self::Unknown => "UNKNOWN", + Self::Js => "JS", + Self::Swift => "SWIFT", + Self::Android => "ANDROID", + Self::Flutter => "FLUTTER", + Self::Go => "GO", + Self::Unity => "UNITY", + Self::ReactNative => "REACT_NATIVE", + Self::Rust => "RUST", + Self::Python => "PYTHON", + Self::Cpp => "CPP", + Self::UnityWeb => "UNITY_WEB", + Self::Node => "NODE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -587,13 +825,14 @@ pub mod client_info { "RUST" => Some(Self::Rust), "PYTHON" => Some(Self::Python), "CPP" => Some(Self::Cpp), + "UNITY_WEB" => Some(Self::UnityWeb), + "NODE" => Some(Self::Node), _ => None, } } } } /// server provided client configuration -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientConfiguration { #[prost(message, optional, tag="1")] @@ -607,13 +846,11 @@ pub struct ClientConfiguration { #[prost(enumeration="ClientConfigSetting", tag="5")] pub force_relay: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct VideoConfiguration { #[prost(enumeration="ClientConfigSetting", tag="1")] pub hardware_encoder: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DisabledCodecs { /// disabled for both publish and subscribe @@ -623,8 +860,7 @@ pub struct DisabledCodecs { #[prost(message, repeated, tag="2")] pub publish: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RtpDrift { #[prost(message, optional, tag="1")] pub start_time: ::core::option::Option<::pbjson_types::Timestamp>, @@ -645,7 +881,6 @@ pub struct RtpDrift { #[prost(double, tag="9")] pub clock_rate: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpStats { #[prost(message, optional, tag="1")] @@ -733,12 +968,31 @@ pub struct RtpStats { #[prost(message, optional, tag="44")] pub packet_drift: ::core::option::Option, #[prost(message, optional, tag="45")] - pub report_drift: ::core::option::Option, - /// NEXT_ID: 47 + pub ntp_report_drift: ::core::option::Option, #[prost(message, optional, tag="46")] pub rebased_report_drift: ::core::option::Option, + /// NEXT_ID: 48 + #[prost(message, optional, tag="47")] + pub received_report_drift: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] +pub struct RtcpSenderReportState { + #[prost(uint32, tag="1")] + pub rtp_timestamp: u32, + #[prost(uint64, tag="2")] + pub rtp_timestamp_ext: u64, + #[prost(uint64, tag="3")] + pub ntp_timestamp: u64, + /// time at which this happened + #[prost(int64, tag="4")] + pub at: i64, + #[prost(int64, tag="5")] + pub at_adjusted: i64, + #[prost(uint32, tag="6")] + pub packets: u32, + #[prost(uint64, tag="7")] + pub octets: u64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpForwarderState { #[prost(bool, tag="1")] @@ -753,20 +1007,20 @@ pub struct RtpForwarderState { pub dummy_start_timestamp_offset: u64, #[prost(message, optional, tag="6")] pub rtp_munger: ::core::option::Option, + #[prost(message, repeated, tag="8")] + pub sender_report_state: ::prost::alloc::vec::Vec, #[prost(oneof="rtp_forwarder_state::CodecMunger", tags="7")] pub codec_munger: ::core::option::Option, } /// Nested message and enum types in `RTPForwarderState`. pub mod rtp_forwarder_state { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum CodecMunger { #[prost(message, tag="7")] Vp8Munger(super::Vp8MungerState), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RtpMungerState { #[prost(uint64, tag="1")] pub ext_last_sequence_number: u64, @@ -781,8 +1035,7 @@ pub struct RtpMungerState { #[prost(bool, tag="6")] pub second_last_marker: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Vp8MungerState { #[prost(int32, tag="1")] pub ext_last_picture_id: i32, @@ -799,8 +1052,7 @@ pub struct Vp8MungerState { #[prost(bool, tag="7")] pub key_idx_used: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TimedVersion { #[prost(int64, tag="1")] pub unix_micro: i64, @@ -821,9 +1073,9 @@ impl AudioCodec { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - AudioCodec::DefaultAc => "DEFAULT_AC", - AudioCodec::Opus => "OPUS", - AudioCodec::Aac => "AAC", + Self::DefaultAc => "DEFAULT_AC", + Self::Opus => "OPUS", + Self::Aac => "AAC", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -852,11 +1104,11 @@ impl VideoCodec { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - VideoCodec::DefaultVc => "DEFAULT_VC", - VideoCodec::H264Baseline => "H264_BASELINE", - VideoCodec::H264Main => "H264_MAIN", - VideoCodec::H264High => "H264_HIGH", - VideoCodec::Vp8 => "VP8", + Self::DefaultVc => "DEFAULT_VC", + Self::H264Baseline => "H264_BASELINE", + Self::H264Main => "H264_MAIN", + Self::H264High => "H264_HIGH", + Self::Vp8 => "VP8", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -884,8 +1136,8 @@ impl ImageCodec { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ImageCodec::IcDefault => "IC_DEFAULT", - ImageCodec::IcJpeg => "IC_JPEG", + Self::IcDefault => "IC_DEFAULT", + Self::IcJpeg => "IC_JPEG", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -911,9 +1163,9 @@ impl TrackType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TrackType::Audio => "AUDIO", - TrackType::Video => "VIDEO", - TrackType::Data => "DATA", + Self::Audio => "AUDIO", + Self::Video => "VIDEO", + Self::Data => "DATA", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -942,11 +1194,11 @@ impl TrackSource { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TrackSource::Unknown => "UNKNOWN", - TrackSource::Camera => "CAMERA", - TrackSource::Microphone => "MICROPHONE", - TrackSource::ScreenShare => "SCREEN_SHARE", - TrackSource::ScreenShareAudio => "SCREEN_SHARE_AUDIO", + Self::Unknown => "UNKNOWN", + Self::Camera => "CAMERA", + Self::Microphone => "MICROPHONE", + Self::ScreenShare => "SCREEN_SHARE", + Self::ScreenShareAudio => "SCREEN_SHARE_AUDIO", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -976,10 +1228,10 @@ impl VideoQuality { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - VideoQuality::Low => "LOW", - VideoQuality::Medium => "MEDIUM", - VideoQuality::High => "HIGH", - VideoQuality::Off => "OFF", + Self::Low => "LOW", + Self::Medium => "MEDIUM", + Self::High => "HIGH", + Self::Off => "OFF", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1008,10 +1260,10 @@ impl ConnectionQuality { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ConnectionQuality::Poor => "POOR", - ConnectionQuality::Good => "GOOD", - ConnectionQuality::Excellent => "EXCELLENT", - ConnectionQuality::Lost => "LOST", + Self::Poor => "POOR", + Self::Good => "GOOD", + Self::Excellent => "EXCELLENT", + Self::Lost => "LOST", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1039,9 +1291,9 @@ impl ClientConfigSetting { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ClientConfigSetting::Unset => "UNSET", - ClientConfigSetting::Disabled => "DISABLED", - ClientConfigSetting::Enabled => "ENABLED", + Self::Unset => "UNSET", + Self::Disabled => "DISABLED", + Self::Enabled => "ENABLED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1086,17 +1338,17 @@ impl DisconnectReason { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - DisconnectReason::UnknownReason => "UNKNOWN_REASON", - DisconnectReason::ClientInitiated => "CLIENT_INITIATED", - DisconnectReason::DuplicateIdentity => "DUPLICATE_IDENTITY", - DisconnectReason::ServerShutdown => "SERVER_SHUTDOWN", - DisconnectReason::ParticipantRemoved => "PARTICIPANT_REMOVED", - DisconnectReason::RoomDeleted => "ROOM_DELETED", - DisconnectReason::StateMismatch => "STATE_MISMATCH", - DisconnectReason::JoinFailure => "JOIN_FAILURE", - DisconnectReason::Migration => "MIGRATION", - DisconnectReason::SignalClose => "SIGNAL_CLOSE", - DisconnectReason::RoomClosed => "ROOM_CLOSED", + Self::UnknownReason => "UNKNOWN_REASON", + Self::ClientInitiated => "CLIENT_INITIATED", + Self::DuplicateIdentity => "DUPLICATE_IDENTITY", + Self::ServerShutdown => "SERVER_SHUTDOWN", + Self::ParticipantRemoved => "PARTICIPANT_REMOVED", + Self::RoomDeleted => "ROOM_DELETED", + Self::StateMismatch => "STATE_MISMATCH", + Self::JoinFailure => "JOIN_FAILURE", + Self::Migration => "MIGRATION", + Self::SignalClose => "SIGNAL_CLOSE", + Self::RoomClosed => "ROOM_CLOSED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1133,11 +1385,11 @@ impl ReconnectReason { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ReconnectReason::RrUnknown => "RR_UNKNOWN", - ReconnectReason::RrSignalDisconnected => "RR_SIGNAL_DISCONNECTED", - ReconnectReason::RrPublisherFailed => "RR_PUBLISHER_FAILED", - ReconnectReason::RrSubscriberFailed => "RR_SUBSCRIBER_FAILED", - ReconnectReason::RrSwitchCandidate => "RR_SWITCH_CANDIDATE", + Self::RrUnknown => "RR_UNKNOWN", + Self::RrSignalDisconnected => "RR_SIGNAL_DISCONNECTED", + Self::RrPublisherFailed => "RR_PUBLISHER_FAILED", + Self::RrSubscriberFailed => "RR_SUBSCRIBER_FAILED", + Self::RrSwitchCandidate => "RR_SWITCH_CANDIDATE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1166,9 +1418,9 @@ impl SubscriptionError { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - SubscriptionError::SeUnknown => "SE_UNKNOWN", - SubscriptionError::SeCodecUnsupported => "SE_CODEC_UNSUPPORTED", - SubscriptionError::SeTrackNotfound => "SE_TRACK_NOTFOUND", + Self::SeUnknown => "SE_UNKNOWN", + Self::SeCodecUnsupported => "SE_CODEC_UNSUPPORTED", + Self::SeTrackNotfound => "SE_TRACK_NOTFOUND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1198,12 +1450,12 @@ impl AudioTrackFeature { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - AudioTrackFeature::TfStereo => "TF_STEREO", - AudioTrackFeature::TfNoDtx => "TF_NO_DTX", - AudioTrackFeature::TfAutoGainControl => "TF_AUTO_GAIN_CONTROL", - AudioTrackFeature::TfEchoCancellation => "TF_ECHO_CANCELLATION", - AudioTrackFeature::TfNoiseSuppression => "TF_NOISE_SUPPRESSION", - AudioTrackFeature::TfEnhancedNoiseCancellation => "TF_ENHANCED_NOISE_CANCELLATION", + Self::TfStereo => "TF_STEREO", + Self::TfNoDtx => "TF_NO_DTX", + Self::TfAutoGainControl => "TF_AUTO_GAIN_CONTROL", + Self::TfEchoCancellation => "TF_ECHO_CANCELLATION", + Self::TfNoiseSuppression => "TF_NOISE_SUPPRESSION", + Self::TfEnhancedNoiseCancellation => "TF_ENHANCED_NOISE_CANCELLATION", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1220,7 +1472,6 @@ impl AudioTrackFeature { } } /// composite using a web browser -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomCompositeEgressRequest { /// required @@ -1255,8 +1506,7 @@ pub struct RoomCompositeEgressRequest { /// Nested message and enum types in `RoomCompositeEgressRequest`. pub mod room_composite_egress_request { /// deprecated (use _output fields) - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="6")] File(super::EncodedFileOutput), @@ -1265,8 +1515,7 @@ pub mod room_composite_egress_request { #[prost(message, tag="10")] Segments(super::SegmentedFileOutput), } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="8")] @@ -1277,7 +1526,6 @@ pub mod room_composite_egress_request { } } /// record any website -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WebEgressRequest { #[prost(string, tag="1")] @@ -1305,8 +1553,7 @@ pub struct WebEgressRequest { /// Nested message and enum types in `WebEgressRequest`. pub mod web_egress_request { /// deprecated (use _output fields) - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="4")] File(super::EncodedFileOutput), @@ -1315,8 +1562,7 @@ pub mod web_egress_request { #[prost(message, tag="6")] Segments(super::SegmentedFileOutput), } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Options { #[prost(enumeration="super::EncodingOptionsPreset", tag="7")] Preset(i32), @@ -1325,7 +1571,6 @@ pub mod web_egress_request { } } /// record audio and video from a single participant -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantEgressRequest { /// required @@ -1350,8 +1595,7 @@ pub struct ParticipantEgressRequest { } /// Nested message and enum types in `ParticipantEgressRequest`. pub mod participant_egress_request { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="4")] @@ -1362,7 +1606,6 @@ pub mod participant_egress_request { } } /// containerize up to one audio and one video track -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackCompositeEgressRequest { /// required @@ -1391,8 +1634,7 @@ pub struct TrackCompositeEgressRequest { /// Nested message and enum types in `TrackCompositeEgressRequest`. pub mod track_composite_egress_request { /// deprecated (use _output fields) - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="4")] File(super::EncodedFileOutput), @@ -1401,8 +1643,7 @@ pub mod track_composite_egress_request { #[prost(message, tag="8")] Segments(super::SegmentedFileOutput), } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="6")] @@ -1413,7 +1654,6 @@ pub mod track_composite_egress_request { } } /// record tracks individually, without transcoding -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackEgressRequest { /// required @@ -1429,8 +1669,7 @@ pub struct TrackEgressRequest { /// Nested message and enum types in `TrackEgressRequest`. pub mod track_egress_request { /// required - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="3")] File(super::DirectFileOutput), @@ -1438,7 +1677,6 @@ pub mod track_egress_request { WebsocketUrl(::prost::alloc::string::String), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncodedFileOutput { /// (optional) @@ -1455,8 +1693,7 @@ pub struct EncodedFileOutput { } /// Nested message and enum types in `EncodedFileOutput`. pub mod encoded_file_output { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="3")] S3(super::S3Upload), @@ -1469,7 +1706,6 @@ pub mod encoded_file_output { } } /// Used to generate HLS segments or other kind of segmented output -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SegmentedFileOutput { /// (optional) @@ -1500,8 +1736,7 @@ pub struct SegmentedFileOutput { /// Nested message and enum types in `SegmentedFileOutput`. pub mod segmented_file_output { /// required - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="5")] S3(super::S3Upload), @@ -1513,7 +1748,6 @@ pub mod segmented_file_output { AliOss(super::AliOssUpload), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectFileOutput { /// see egress docs for templating (default {track_id}-{time}) @@ -1527,8 +1761,7 @@ pub struct DirectFileOutput { } /// Nested message and enum types in `DirectFileOutput`. pub mod direct_file_output { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="2")] S3(super::S3Upload), @@ -1540,7 +1773,6 @@ pub mod direct_file_output { AliOss(super::AliOssUpload), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImageOutput { /// in seconds (required) @@ -1571,8 +1803,7 @@ pub struct ImageOutput { /// Nested message and enum types in `ImageOutput`. pub mod image_output { /// required - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="8")] S3(super::S3Upload), @@ -1584,7 +1815,6 @@ pub mod image_output { AliOss(super::AliOssUpload), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct S3Upload { #[prost(string, tag="1")] @@ -1611,7 +1841,6 @@ pub struct S3Upload { #[prost(message, optional, tag="10")] pub proxy: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcpUpload { /// service account credentials serialized in JSON "credentials.json" @@ -1622,7 +1851,6 @@ pub struct GcpUpload { #[prost(message, optional, tag="3")] pub proxy: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AzureBlobUpload { #[prost(string, tag="1")] @@ -1632,7 +1860,6 @@ pub struct AzureBlobUpload { #[prost(string, tag="3")] pub container_name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AliOssUpload { #[prost(string, tag="1")] @@ -1646,7 +1873,6 @@ pub struct AliOssUpload { #[prost(string, tag="5")] pub bucket: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProxyConfig { #[prost(string, tag="1")] @@ -1656,7 +1882,6 @@ pub struct ProxyConfig { #[prost(string, tag="3")] pub password: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamOutput { /// required @@ -1666,8 +1891,7 @@ pub struct StreamOutput { #[prost(string, repeated, tag="2")] pub urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct EncodingOptions { /// (default 1920) #[prost(int32, tag="1")] @@ -1706,7 +1930,6 @@ pub struct EncodingOptions { #[prost(double, tag="10")] pub key_frame_interval: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateLayoutRequest { #[prost(string, tag="1")] @@ -1714,7 +1937,6 @@ pub struct UpdateLayoutRequest { #[prost(string, tag="2")] pub layout: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateStreamRequest { #[prost(string, tag="1")] @@ -1724,7 +1946,6 @@ pub struct UpdateStreamRequest { #[prost(string, repeated, tag="3")] pub remove_output_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEgressRequest { /// (optional, filter by room name) @@ -1737,19 +1958,16 @@ pub struct ListEgressRequest { #[prost(bool, tag="3")] pub active: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEgressResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StopEgressRequest { #[prost(string, tag="1")] pub egress_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EgressInfo { #[prost(string, tag="1")] @@ -1788,8 +2006,7 @@ pub struct EgressInfo { } /// Nested message and enum types in `EgressInfo`. pub mod egress_info { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Request { #[prost(message, tag="4")] RoomComposite(super::RoomCompositeEgressRequest), @@ -1803,8 +2020,7 @@ pub mod egress_info { Track(super::TrackEgressRequest), } /// deprecated (use _result fields) - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag="7")] Stream(super::StreamInfoList), @@ -1814,13 +2030,11 @@ pub mod egress_info { Segments(super::SegmentsInfo), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamInfoList { #[prost(message, repeated, tag="1")] pub info: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamInfo { #[prost(string, tag="1")] @@ -1852,9 +2066,9 @@ pub mod stream_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Status::Active => "ACTIVE", - Status::Finished => "FINISHED", - Status::Failed => "FAILED", + Self::Active => "ACTIVE", + Self::Finished => "FINISHED", + Self::Failed => "FAILED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1868,7 +2082,6 @@ pub mod stream_info { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileInfo { #[prost(string, tag="1")] @@ -1884,7 +2097,6 @@ pub struct FileInfo { #[prost(string, tag="5")] pub location: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SegmentsInfo { #[prost(string, tag="1")] @@ -1906,7 +2118,6 @@ pub struct SegmentsInfo { #[prost(int64, tag="7")] pub ended_at: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImagesInfo { #[prost(string, tag="4")] @@ -1918,7 +2129,6 @@ pub struct ImagesInfo { #[prost(int64, tag="3")] pub ended_at: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutoParticipantEgress { #[prost(message, repeated, tag="3")] @@ -1930,8 +2140,7 @@ pub struct AutoParticipantEgress { } /// Nested message and enum types in `AutoParticipantEgress`. pub mod auto_participant_egress { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="1")] @@ -1941,7 +2150,6 @@ pub mod auto_participant_egress { Advanced(super::EncodingOptions), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutoTrackEgress { /// see docs for templating (default {track_id}-{time}) @@ -1955,8 +2163,7 @@ pub struct AutoTrackEgress { } /// Nested message and enum types in `AutoTrackEgress`. pub mod auto_track_egress { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="2")] S3(super::S3Upload), @@ -1983,9 +2190,9 @@ impl EncodedFileType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EncodedFileType::DefaultFiletype => "DEFAULT_FILETYPE", - EncodedFileType::Mp4 => "MP4", - EncodedFileType::Ogg => "OGG", + Self::DefaultFiletype => "DEFAULT_FILETYPE", + Self::Mp4 => "MP4", + Self::Ogg => "OGG", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2011,8 +2218,8 @@ impl SegmentedFileProtocol { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - SegmentedFileProtocol::DefaultSegmentedFileProtocol => "DEFAULT_SEGMENTED_FILE_PROTOCOL", - SegmentedFileProtocol::HlsProtocol => "HLS_PROTOCOL", + Self::DefaultSegmentedFileProtocol => "DEFAULT_SEGMENTED_FILE_PROTOCOL", + Self::HlsProtocol => "HLS_PROTOCOL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2037,8 +2244,8 @@ impl SegmentedFileSuffix { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - SegmentedFileSuffix::Index => "INDEX", - SegmentedFileSuffix::Timestamp => "TIMESTAMP", + Self::Index => "INDEX", + Self::Timestamp => "TIMESTAMP", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2063,8 +2270,8 @@ impl ImageFileSuffix { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ImageFileSuffix::ImageSuffixIndex => "IMAGE_SUFFIX_INDEX", - ImageFileSuffix::ImageSuffixTimestamp => "IMAGE_SUFFIX_TIMESTAMP", + Self::ImageSuffixIndex => "IMAGE_SUFFIX_INDEX", + Self::ImageSuffixTimestamp => "IMAGE_SUFFIX_TIMESTAMP", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2091,9 +2298,9 @@ impl StreamProtocol { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StreamProtocol::DefaultProtocol => "DEFAULT_PROTOCOL", - StreamProtocol::Rtmp => "RTMP", - StreamProtocol::Srt => "SRT", + Self::DefaultProtocol => "DEFAULT_PROTOCOL", + Self::Rtmp => "RTMP", + Self::Srt => "SRT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2133,14 +2340,14 @@ impl EncodingOptionsPreset { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EncodingOptionsPreset::H264720p30 => "H264_720P_30", - EncodingOptionsPreset::H264720p60 => "H264_720P_60", - EncodingOptionsPreset::H2641080p30 => "H264_1080P_30", - EncodingOptionsPreset::H2641080p60 => "H264_1080P_60", - EncodingOptionsPreset::PortraitH264720p30 => "PORTRAIT_H264_720P_30", - EncodingOptionsPreset::PortraitH264720p60 => "PORTRAIT_H264_720P_60", - EncodingOptionsPreset::PortraitH2641080p30 => "PORTRAIT_H264_1080P_30", - EncodingOptionsPreset::PortraitH2641080p60 => "PORTRAIT_H264_1080P_60", + Self::H264720p30 => "H264_720P_30", + Self::H264720p60 => "H264_720P_60", + Self::H2641080p30 => "H264_1080P_30", + Self::H2641080p60 => "H264_1080P_60", + Self::PortraitH264720p30 => "PORTRAIT_H264_720P_30", + Self::PortraitH264720p60 => "PORTRAIT_H264_720P_60", + Self::PortraitH2641080p30 => "PORTRAIT_H264_1080P_30", + Self::PortraitH2641080p60 => "PORTRAIT_H264_1080P_60", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2176,13 +2383,13 @@ impl EgressStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - EgressStatus::EgressStarting => "EGRESS_STARTING", - EgressStatus::EgressActive => "EGRESS_ACTIVE", - EgressStatus::EgressEnding => "EGRESS_ENDING", - EgressStatus::EgressComplete => "EGRESS_COMPLETE", - EgressStatus::EgressFailed => "EGRESS_FAILED", - EgressStatus::EgressAborted => "EGRESS_ABORTED", - EgressStatus::EgressLimitReached => "EGRESS_LIMIT_REACHED", + Self::EgressStarting => "EGRESS_STARTING", + Self::EgressActive => "EGRESS_ACTIVE", + Self::EgressEnding => "EGRESS_ENDING", + Self::EgressComplete => "EGRESS_COMPLETE", + Self::EgressFailed => "EGRESS_FAILED", + Self::EgressAborted => "EGRESS_ABORTED", + Self::EgressLimitReached => "EGRESS_LIMIT_REACHED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2199,7 +2406,6 @@ impl EgressStatus { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignalRequest { #[prost(oneof="signal_request::Message", tags="1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18")] @@ -2207,8 +2413,7 @@ pub struct SignalRequest { } /// Nested message and enum types in `SignalRequest`. pub mod signal_request { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// initial join exchange, for publisher #[prost(message, tag="1")] @@ -2263,7 +2468,6 @@ pub mod signal_request { UpdateVideoTrack(super::UpdateLocalVideoTrack), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignalResponse { #[prost(oneof="signal_response::Message", tags="1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23")] @@ -2271,8 +2475,7 @@ pub struct SignalResponse { } /// Nested message and enum types in `SignalResponse`. pub mod signal_response { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// sent when join is accepted #[prost(message, tag="1")] @@ -2345,7 +2548,6 @@ pub mod signal_response { TrackSubscribed(super::TrackSubscribed), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodec { #[prost(string, tag="1")] @@ -2353,7 +2555,6 @@ pub struct SimulcastCodec { #[prost(string, tag="2")] pub cid: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddTrackRequest { /// client ID of track, to match it when RTC track is received @@ -2395,7 +2596,6 @@ pub struct AddTrackRequest { #[prost(string, tag="15")] pub stream: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrickleRequest { #[prost(string, tag="1")] @@ -2405,7 +2605,6 @@ pub struct TrickleRequest { #[prost(bool, tag="3")] pub r#final: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MuteTrackRequest { #[prost(string, tag="1")] @@ -2413,7 +2612,6 @@ pub struct MuteTrackRequest { #[prost(bool, tag="2")] pub muted: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JoinResponse { #[prost(message, optional, tag="1")] @@ -2448,8 +2646,12 @@ pub struct JoinResponse { /// Server-Injected-Frame byte trailer, used to identify unencrypted frames when e2ee is enabled #[prost(bytes="vec", tag="13")] pub sif_trailer: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag="14")] + pub enabled_publish_codecs: ::prost::alloc::vec::Vec, + /// when set, client should attempt to establish publish peer connection when joining room to speed up publishing + #[prost(bool, tag="15")] + pub fast_publish: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReconnectResponse { #[prost(message, repeated, tag="1")] @@ -2457,7 +2659,6 @@ pub struct ReconnectResponse { #[prost(message, optional, tag="2")] pub client_configuration: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackPublishedResponse { #[prost(string, tag="1")] @@ -2465,13 +2666,11 @@ pub struct TrackPublishedResponse { #[prost(message, optional, tag="2")] pub track: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackUnpublishedResponse { #[prost(string, tag="1")] pub track_sid: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SessionDescription { /// "answer" | "offer" | "pranswer" | "rollback" @@ -2480,13 +2679,11 @@ pub struct SessionDescription { #[prost(string, tag="2")] pub sdp: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantUpdate { #[prost(message, repeated, tag="1")] pub participants: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSubscription { #[prost(string, repeated, tag="1")] @@ -2496,7 +2693,6 @@ pub struct UpdateSubscription { #[prost(message, repeated, tag="3")] pub participant_tracks: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateTrackSettings { #[prost(string, repeated, tag="1")] @@ -2525,7 +2721,6 @@ pub struct UpdateTrackSettings { #[prost(uint32, tag="8")] pub priority: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateLocalAudioTrack { #[prost(string, tag="1")] @@ -2533,7 +2728,6 @@ pub struct UpdateLocalAudioTrack { #[prost(enumeration="AudioTrackFeature", repeated, tag="2")] pub features: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateLocalVideoTrack { #[prost(string, tag="1")] @@ -2543,7 +2737,6 @@ pub struct UpdateLocalVideoTrack { #[prost(uint32, tag="3")] pub height: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LeaveRequest { /// sent when server initiates the disconnect due to server-restart @@ -2578,9 +2771,9 @@ pub mod leave_request { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Action::Disconnect => "DISCONNECT", - Action::Resume => "RESUME", - Action::Reconnect => "RECONNECT", + Self::Disconnect => "DISCONNECT", + Self::Resume => "RESUME", + Self::Reconnect => "RECONNECT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2595,7 +2788,6 @@ pub mod leave_request { } } /// message to indicate published video track dimensions are changing -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateVideoLayers { #[prost(string, tag="1")] @@ -2603,7 +2795,6 @@ pub struct UpdateVideoLayers { #[prost(message, repeated, tag="2")] pub layers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateParticipantMetadata { #[prost(string, tag="1")] @@ -2617,7 +2808,6 @@ pub struct UpdateParticipantMetadata { #[prost(uint32, tag="4")] pub request_id: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IceServer { #[prost(string, repeated, tag="1")] @@ -2627,19 +2817,16 @@ pub struct IceServer { #[prost(string, tag="3")] pub credential: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SpeakersChanged { #[prost(message, repeated, tag="1")] pub speakers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomUpdate { #[prost(message, optional, tag="1")] pub room: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConnectionQualityInfo { #[prost(string, tag="1")] @@ -2649,13 +2836,11 @@ pub struct ConnectionQualityInfo { #[prost(float, tag="3")] pub score: f32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConnectionQualityUpdate { #[prost(message, repeated, tag="1")] pub updates: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamStateInfo { #[prost(string, tag="1")] @@ -2665,21 +2850,18 @@ pub struct StreamStateInfo { #[prost(enumeration="StreamState", tag="3")] pub state: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamStateUpdate { #[prost(message, repeated, tag="1")] pub stream_states: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SubscribedQuality { #[prost(enumeration="VideoQuality", tag="1")] pub quality: i32, #[prost(bool, tag="2")] pub enabled: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribedCodec { #[prost(string, tag="1")] @@ -2687,7 +2869,6 @@ pub struct SubscribedCodec { #[prost(message, repeated, tag="2")] pub qualities: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribedQualityUpdate { #[prost(string, tag="1")] @@ -2697,7 +2878,6 @@ pub struct SubscribedQualityUpdate { #[prost(message, repeated, tag="3")] pub subscribed_codecs: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackPermission { /// permission could be granted either by participant sid or identity @@ -2710,7 +2890,6 @@ pub struct TrackPermission { #[prost(string, tag="4")] pub participant_identity: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionPermission { #[prost(bool, tag="1")] @@ -2718,7 +2897,6 @@ pub struct SubscriptionPermission { #[prost(message, repeated, tag="2")] pub track_permissions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionPermissionUpdate { #[prost(string, tag="1")] @@ -2728,7 +2906,6 @@ pub struct SubscriptionPermissionUpdate { #[prost(bool, tag="3")] pub allowed: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SyncState { /// last subscribe answer before reconnecting @@ -2746,7 +2923,6 @@ pub struct SyncState { #[prost(string, repeated, tag="6")] pub track_sids_disabled: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataChannelInfo { #[prost(string, tag="1")] @@ -2756,16 +2932,14 @@ pub struct DataChannelInfo { #[prost(enumeration="SignalTarget", tag="3")] pub target: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SimulateScenario { #[prost(oneof="simulate_scenario::Scenario", tags="1, 2, 3, 4, 5, 6, 7, 8, 9")] pub scenario: ::core::option::Option, } /// Nested message and enum types in `SimulateScenario`. pub mod simulate_scenario { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum Scenario { /// simulate N seconds of speaker activity #[prost(int32, tag="1")] @@ -2797,8 +2971,7 @@ pub mod simulate_scenario { LeaveRequestFullReconnect(bool), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Ping { #[prost(int64, tag="1")] pub timestamp: i64, @@ -2806,8 +2979,7 @@ pub struct Ping { #[prost(int64, tag="2")] pub rtt: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct Pong { /// timestamp field of last received ping request #[prost(int64, tag="1")] @@ -2815,13 +2987,11 @@ pub struct Pong { #[prost(int64, tag="2")] pub timestamp: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionSettings { #[prost(message, repeated, tag="1")] pub regions: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionInfo { #[prost(string, tag="1")] @@ -2831,7 +3001,6 @@ pub struct RegionInfo { #[prost(int64, tag="3")] pub distance: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionResponse { #[prost(string, tag="1")] @@ -2839,7 +3008,6 @@ pub struct SubscriptionResponse { #[prost(enumeration="SubscriptionError", tag="2")] pub err: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestResponse { #[prost(uint32, tag="1")] @@ -2866,10 +3034,10 @@ pub mod request_response { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Reason::Ok => "OK", - Reason::NotFound => "NOT_FOUND", - Reason::NotAllowed => "NOT_ALLOWED", - Reason::LimitExceeded => "LIMIT_EXCEEDED", + Self::Ok => "OK", + Self::NotFound => "NOT_FOUND", + Self::NotAllowed => "NOT_ALLOWED", + Self::LimitExceeded => "LIMIT_EXCEEDED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2884,7 +3052,6 @@ pub mod request_response { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackSubscribed { #[prost(string, tag="1")] @@ -2903,8 +3070,8 @@ impl SignalTarget { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - SignalTarget::Publisher => "PUBLISHER", - SignalTarget::Subscriber => "SUBSCRIBER", + Self::Publisher => "PUBLISHER", + Self::Subscriber => "SUBSCRIBER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2929,8 +3096,8 @@ impl StreamState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StreamState::Active => "ACTIVE", - StreamState::Paused => "PAUSED", + Self::Active => "ACTIVE", + Self::Paused => "PAUSED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2956,9 +3123,9 @@ impl CandidateProtocol { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - CandidateProtocol::Udp => "UDP", - CandidateProtocol::Tcp => "TCP", - CandidateProtocol::Tls => "TLS", + Self::Udp => "UDP", + Self::Tcp => "TCP", + Self::Tls => "TLS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2971,7 +3138,6 @@ impl CandidateProtocol { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Job { #[prost(string, tag="1")] @@ -2994,7 +3160,6 @@ pub struct Job { #[prost(message, optional, tag="8")] pub state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobState { #[prost(enumeration="JobStatus", tag="1")] @@ -3011,7 +3176,6 @@ pub struct JobState { pub participant_identity: ::prost::alloc::string::String, } /// from Worker to Server -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WorkerMessage { #[prost(oneof="worker_message::Message", tags="1, 2, 3, 4, 5, 6, 7")] @@ -3019,8 +3183,7 @@ pub struct WorkerMessage { } /// Nested message and enum types in `WorkerMessage`. pub mod worker_message { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// agent workers need to register themselves with the server first #[prost(message, tag="1")] @@ -3043,7 +3206,6 @@ pub mod worker_message { } } /// from Server to Worker -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerMessage { #[prost(oneof="server_message::Message", tags="1, 2, 3, 5, 4")] @@ -3051,8 +3213,7 @@ pub struct ServerMessage { } /// Nested message and enum types in `ServerMessage`. pub mod server_message { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// server confirms the registration, from this moment on, the worker is considered active #[prost(message, tag="1")] @@ -3068,7 +3229,6 @@ pub mod server_message { Pong(super::WorkerPong), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateJobRequest { #[prost(enumeration="JobType", tag="1")] @@ -3078,21 +3238,18 @@ pub struct SimulateJobRequest { #[prost(message, optional, tag="3")] pub participant: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WorkerPing { #[prost(int64, tag="1")] pub timestamp: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct WorkerPong { #[prost(int64, tag="1")] pub last_timestamp: i64, #[prost(int64, tag="2")] pub timestamp: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterWorkerRequest { #[prost(enumeration="JobType", tag="1")] @@ -3110,7 +3267,6 @@ pub struct RegisterWorkerRequest { #[prost(message, optional, tag="7")] pub allowed_permissions: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterWorkerResponse { #[prost(string, tag="1")] @@ -3118,14 +3274,12 @@ pub struct RegisterWorkerResponse { #[prost(message, optional, tag="3")] pub server_info: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateJobRequest { /// string job_id = 1 \[deprecated = true\]; #[prost(string, repeated, tag="2")] pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AvailabilityRequest { #[prost(message, optional, tag="1")] @@ -3135,7 +3289,6 @@ pub struct AvailabilityRequest { #[prost(bool, tag="2")] pub resuming: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AvailabilityResponse { #[prost(string, tag="1")] @@ -3153,7 +3306,6 @@ pub struct AvailabilityResponse { #[prost(map="string, string", tag="7")] pub participant_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateJobStatus { #[prost(string, tag="1")] @@ -3165,8 +3317,7 @@ pub struct UpdateJobStatus { #[prost(string, tag="3")] pub error: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct UpdateWorkerStatus { #[prost(enumeration="WorkerStatus", optional, tag="1")] pub status: ::core::option::Option, @@ -3176,7 +3327,6 @@ pub struct UpdateWorkerStatus { #[prost(int32, tag="4")] pub job_count: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobAssignment { #[prost(message, optional, tag="1")] @@ -3186,7 +3336,6 @@ pub struct JobAssignment { #[prost(string, tag="3")] pub token: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobTermination { #[prost(string, tag="1")] @@ -3205,8 +3354,8 @@ impl JobType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - JobType::JtRoom => "JT_ROOM", - JobType::JtPublisher => "JT_PUBLISHER", + Self::JtRoom => "JT_ROOM", + Self::JtPublisher => "JT_PUBLISHER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3231,8 +3380,8 @@ impl WorkerStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - WorkerStatus::WsAvailable => "WS_AVAILABLE", - WorkerStatus::WsFull => "WS_FULL", + Self::WsAvailable => "WS_AVAILABLE", + Self::WsFull => "WS_FULL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3259,10 +3408,10 @@ impl JobStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - JobStatus::JsPending => "JS_PENDING", - JobStatus::JsRunning => "JS_RUNNING", - JobStatus::JsSuccess => "JS_SUCCESS", - JobStatus::JsFailed => "JS_FAILED", + Self::JsPending => "JS_PENDING", + Self::JsRunning => "JS_RUNNING", + Self::JsSuccess => "JS_SUCCESS", + Self::JsFailed => "JS_FAILED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3276,7 +3425,6 @@ impl JobStatus { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAgentDispatchRequest { #[prost(string, tag="1")] @@ -3286,7 +3434,6 @@ pub struct CreateAgentDispatchRequest { #[prost(string, tag="3")] pub metadata: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomAgentDispatch { #[prost(string, tag="1")] @@ -3294,7 +3441,6 @@ pub struct RoomAgentDispatch { #[prost(string, tag="2")] pub metadata: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteAgentDispatchRequest { #[prost(string, tag="1")] @@ -3302,7 +3448,6 @@ pub struct DeleteAgentDispatchRequest { #[prost(string, tag="2")] pub room: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAgentDispatchRequest { /// if set, only the dispatch whose id is given will be returned @@ -3312,13 +3457,11 @@ pub struct ListAgentDispatchRequest { #[prost(string, tag="2")] pub room: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAgentDispatchResponse { #[prost(message, repeated, tag="1")] pub agent_dispatches: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AgentDispatch { #[prost(string, tag="1")] @@ -3332,7 +3475,6 @@ pub struct AgentDispatch { #[prost(message, optional, tag="5")] pub state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AgentDispatchState { /// For dispatches of tyoe JT_ROOM, there will be at most 1 job. @@ -3344,7 +3486,6 @@ pub struct AgentDispatchState { #[prost(int64, tag="3")] pub deleted_at: i64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateRoomRequest { /// name of the room @@ -3389,7 +3530,6 @@ pub struct CreateRoomRequest { #[prost(bool, tag="13")] pub replay_enabled: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomEgress { #[prost(message, optional, tag="1")] @@ -3399,50 +3539,42 @@ pub struct RoomEgress { #[prost(message, optional, tag="2")] pub tracks: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomAgent { #[prost(message, repeated, tag="1")] pub dispatches: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListRoomsRequest { /// when set, will only return rooms with name match #[prost(string, repeated, tag="1")] pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListRoomsResponse { #[prost(message, repeated, tag="1")] pub rooms: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRoomRequest { /// name of the room #[prost(string, tag="1")] pub room: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DeleteRoomResponse { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListParticipantsRequest { /// name of the room #[prost(string, tag="1")] pub room: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListParticipantsResponse { #[prost(message, repeated, tag="1")] pub participants: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomParticipantIdentity { /// name of the room @@ -3452,11 +3584,9 @@ pub struct RoomParticipantIdentity { #[prost(string, tag="2")] pub identity: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RemoveParticipantResponse { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MuteRoomTrackRequest { /// name of the room @@ -3471,13 +3601,11 @@ pub struct MuteRoomTrackRequest { #[prost(bool, tag="4")] pub muted: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MuteRoomTrackResponse { #[prost(message, optional, tag="1")] pub track: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateParticipantRequest { #[prost(string, tag="1")] @@ -3498,7 +3626,6 @@ pub struct UpdateParticipantRequest { #[prost(map="string, string", tag="6")] pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSubscriptionsRequest { #[prost(string, tag="1")] @@ -3516,11 +3643,9 @@ pub struct UpdateSubscriptionsRequest { pub participant_tracks: ::prost::alloc::vec::Vec, } /// empty for now -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct UpdateSubscriptionsResponse { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendDataRequest { #[prost(string, tag="1")] @@ -3540,11 +3665,9 @@ pub struct SendDataRequest { pub topic: ::core::option::Option<::prost::alloc::string::String>, } /// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SendDataResponse { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateRoomMetadataRequest { #[prost(string, tag="1")] @@ -3553,7 +3676,6 @@ pub struct UpdateRoomMetadataRequest { #[prost(string, tag="2")] pub metadata: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomConfiguration { /// Used as ID, must be unique @@ -3584,7 +3706,6 @@ pub struct RoomConfiguration { #[prost(bool, tag="9")] pub sync_streams: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateIngressRequest { #[prost(enumeration="IngressInput", tag="1")] @@ -3619,7 +3740,6 @@ pub struct CreateIngressRequest { #[prost(message, optional, tag="7")] pub video: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressAudioOptions { #[prost(string, tag="1")] @@ -3631,8 +3751,7 @@ pub struct IngressAudioOptions { } /// Nested message and enum types in `IngressAudioOptions`. pub mod ingress_audio_options { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] pub enum EncodingOptions { #[prost(enumeration="super::IngressAudioEncodingPreset", tag="3")] Preset(i32), @@ -3640,7 +3759,6 @@ pub mod ingress_audio_options { Options(super::IngressAudioEncodingOptions), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressVideoOptions { #[prost(string, tag="1")] @@ -3652,8 +3770,7 @@ pub struct IngressVideoOptions { } /// Nested message and enum types in `IngressVideoOptions`. pub mod ingress_video_options { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EncodingOptions { #[prost(enumeration="super::IngressVideoEncodingPreset", tag="3")] Preset(i32), @@ -3661,8 +3778,7 @@ pub mod ingress_video_options { Options(super::IngressVideoEncodingOptions), } } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct IngressAudioEncodingOptions { /// desired audio codec to publish to room #[prost(enumeration="AudioCodec", tag="1")] @@ -3674,7 +3790,6 @@ pub struct IngressAudioEncodingOptions { #[prost(uint32, tag="4")] pub channels: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressVideoEncodingOptions { /// desired codec to publish to room @@ -3686,7 +3801,6 @@ pub struct IngressVideoEncodingOptions { #[prost(message, repeated, tag="3")] pub layers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressInfo { #[prost(string, tag="1")] @@ -3726,7 +3840,6 @@ pub struct IngressInfo { #[prost(message, optional, tag="12")] pub state: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressState { #[prost(enumeration="ingress_state::Status", tag="1")] @@ -3770,11 +3883,11 @@ pub mod ingress_state { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Status::EndpointInactive => "ENDPOINT_INACTIVE", - Status::EndpointBuffering => "ENDPOINT_BUFFERING", - Status::EndpointPublishing => "ENDPOINT_PUBLISHING", - Status::EndpointError => "ENDPOINT_ERROR", - Status::EndpointComplete => "ENDPOINT_COMPLETE", + Self::EndpointInactive => "ENDPOINT_INACTIVE", + Self::EndpointBuffering => "ENDPOINT_BUFFERING", + Self::EndpointPublishing => "ENDPOINT_PUBLISHING", + Self::EndpointError => "ENDPOINT_ERROR", + Self::EndpointComplete => "ENDPOINT_COMPLETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3790,7 +3903,6 @@ pub mod ingress_state { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputVideoState { #[prost(string, tag="1")] @@ -3804,7 +3916,6 @@ pub struct InputVideoState { #[prost(double, tag="5")] pub framerate: f64, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputAudioState { #[prost(string, tag="1")] @@ -3816,7 +3927,6 @@ pub struct InputAudioState { #[prost(uint32, tag="4")] pub sample_rate: u32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateIngressRequest { #[prost(string, tag="1")] @@ -3841,7 +3951,6 @@ pub struct UpdateIngressRequest { #[prost(message, optional, tag="7")] pub video: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListIngressRequest { /// when blank, lists all ingress endpoints @@ -3853,13 +3962,11 @@ pub struct ListIngressRequest { #[prost(string, tag="2")] pub ingress_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListIngressResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteIngressRequest { #[prost(string, tag="1")] @@ -3880,9 +3987,9 @@ impl IngressInput { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - IngressInput::RtmpInput => "RTMP_INPUT", - IngressInput::WhipInput => "WHIP_INPUT", - IngressInput::UrlInput => "URL_INPUT", + Self::RtmpInput => "RTMP_INPUT", + Self::WhipInput => "WHIP_INPUT", + Self::UrlInput => "URL_INPUT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3910,8 +4017,8 @@ impl IngressAudioEncodingPreset { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - IngressAudioEncodingPreset::OpusStereo96kbps => "OPUS_STEREO_96KBPS", - IngressAudioEncodingPreset::OpusMono64kbs => "OPUS_MONO_64KBS", + Self::OpusStereo96kbps => "OPUS_STEREO_96KBPS", + Self::OpusMono64kbs => "OPUS_MONO_64KBS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3954,16 +4061,16 @@ impl IngressVideoEncodingPreset { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - IngressVideoEncodingPreset::H264720p30fps3Layers => "H264_720P_30FPS_3_LAYERS", - IngressVideoEncodingPreset::H2641080p30fps3Layers => "H264_1080P_30FPS_3_LAYERS", - IngressVideoEncodingPreset::H264540p25fps2Layers => "H264_540P_25FPS_2_LAYERS", - IngressVideoEncodingPreset::H264720p30fps1Layer => "H264_720P_30FPS_1_LAYER", - IngressVideoEncodingPreset::H2641080p30fps1Layer => "H264_1080P_30FPS_1_LAYER", - IngressVideoEncodingPreset::H264720p30fps3LayersHighMotion => "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", - IngressVideoEncodingPreset::H2641080p30fps3LayersHighMotion => "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", - IngressVideoEncodingPreset::H264540p25fps2LayersHighMotion => "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", - IngressVideoEncodingPreset::H264720p30fps1LayerHighMotion => "H264_720P_30FPS_1_LAYER_HIGH_MOTION", - IngressVideoEncodingPreset::H2641080p30fps1LayerHighMotion => "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", + Self::H264720p30fps3Layers => "H264_720P_30FPS_3_LAYERS", + Self::H2641080p30fps3Layers => "H264_1080P_30FPS_3_LAYERS", + Self::H264540p25fps2Layers => "H264_540P_25FPS_2_LAYERS", + Self::H264720p30fps1Layer => "H264_720P_30FPS_1_LAYER", + Self::H2641080p30fps1Layer => "H264_1080P_30FPS_1_LAYER", + Self::H264720p30fps3LayersHighMotion => "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", + Self::H2641080p30fps3LayersHighMotion => "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", + Self::H264540p25fps2LayersHighMotion => "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", + Self::H264720p30fps1LayerHighMotion => "H264_720P_30FPS_1_LAYER_HIGH_MOTION", + Self::H2641080p30fps1LayerHighMotion => "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3983,7 +4090,6 @@ impl IngressVideoEncodingPreset { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WebhookEvent { /// one of room_started, room_finished, participant_joined, participant_left, @@ -4014,7 +4120,6 @@ pub struct WebhookEvent { #[prost(int32, tag="11")] pub num_dropped: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipTrunkRequest { /// CIDR or IPs that traffic is accepted from @@ -4052,7 +4157,6 @@ pub struct CreateSipTrunkRequest { #[prost(string, tag="11")] pub metadata: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipTrunkInfo { #[prost(string, tag="1")] @@ -4113,9 +4217,9 @@ pub mod sip_trunk_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TrunkKind::TrunkLegacy => "TRUNK_LEGACY", - TrunkKind::TrunkInbound => "TRUNK_INBOUND", - TrunkKind::TrunkOutbound => "TRUNK_OUTBOUND", + Self::TrunkLegacy => "TRUNK_LEGACY", + Self::TrunkInbound => "TRUNK_INBOUND", + Self::TrunkOutbound => "TRUNK_OUTBOUND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -4129,14 +4233,12 @@ pub mod sip_trunk_info { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipInboundTrunkRequest { /// Trunk ID is ignored #[prost(message, optional, tag="1")] pub trunk: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipInboundTrunkInfo { #[prost(string, tag="1")] @@ -4165,15 +4267,19 @@ pub struct SipInboundTrunkInfo { pub auth_username: ::prost::alloc::string::String, #[prost(string, tag="8")] pub auth_password: ::prost::alloc::string::String, + /// Include these SIP X-* headers in 200 OK responses. + #[prost(map="string, string", tag="9")] + pub headers: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Map SIP X-* headers from INVITE to SIP participant attributes. + #[prost(map="string, string", tag="10")] + pub headers_to_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipOutboundTrunkRequest { /// Trunk ID is ignored #[prost(message, optional, tag="1")] pub trunk: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipOutboundTrunkInfo { #[prost(string, tag="1")] @@ -4200,44 +4306,64 @@ pub struct SipOutboundTrunkInfo { pub auth_username: ::prost::alloc::string::String, #[prost(string, tag="8")] pub auth_password: ::prost::alloc::string::String, + /// Include these SIP X-* headers in INVITE request. + /// These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint. + #[prost(map="string, string", tag="9")] + pub headers: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Map SIP X-* headers from 200 OK to SIP participant attributes. + /// Keys are the names of X-* headers and values are the names of attributes they will be mapped to. + #[prost(map="string, string", tag="10")] + pub headers_to_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSipInboundTrunkRequest { + #[prost(string, tag="1")] + pub sip_trunk_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSipInboundTrunkResponse { + #[prost(message, optional, tag="1")] + pub trunk: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSipOutboundTrunkRequest { + #[prost(string, tag="1")] + pub sip_trunk_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetSipOutboundTrunkResponse { + #[prost(message, optional, tag="1")] + pub trunk: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListSipTrunkRequest { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipTrunkResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListSipInboundTrunkRequest { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipInboundTrunkResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListSipOutboundTrunkRequest { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipOutboundTrunkResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSipTrunkRequest { #[prost(string, tag="1")] pub sip_trunk_id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleDirect { /// What room should call be directed into @@ -4247,7 +4373,6 @@ pub struct SipDispatchRuleDirect { #[prost(string, tag="2")] pub pin: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleIndividual { /// Prefix used on new room name @@ -4257,16 +4382,26 @@ pub struct SipDispatchRuleIndividual { #[prost(string, tag="2")] pub pin: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SipDispatchRuleCallee { + /// Prefix used on new room name + #[prost(string, tag="1")] + pub room_prefix: ::prost::alloc::string::String, + /// Optional pin required to enter room + #[prost(string, tag="2")] + pub pin: ::prost::alloc::string::String, + /// Optionally append random suffix + #[prost(bool, tag="3")] + pub randomize: bool, +} #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRule { - #[prost(oneof="sip_dispatch_rule::Rule", tags="1, 2")] + #[prost(oneof="sip_dispatch_rule::Rule", tags="1, 2, 3")] pub rule: ::core::option::Option, } /// Nested message and enum types in `SIPDispatchRule`. pub mod sip_dispatch_rule { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] + #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Rule { /// SIPDispatchRuleDirect is a `SIP Dispatch Rule` that puts a user directly into a room /// This places users into an existing room. Optionally you can require a pin before a user can @@ -4276,9 +4411,11 @@ pub mod sip_dispatch_rule { /// SIPDispatchRuleIndividual is a `SIP Dispatch Rule` that creates a new room for each caller. #[prost(message, tag="2")] DispatchRuleIndividual(super::SipDispatchRuleIndividual), + /// SIPDispatchRuleCallee is a `SIP Dispatch Rule` that creates a new room for each callee. + #[prost(message, tag="3")] + DispatchRuleCallee(super::SipDispatchRuleCallee), } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipDispatchRuleRequest { #[prost(message, optional, tag="1")] @@ -4306,7 +4443,6 @@ pub struct CreateSipDispatchRuleRequest { #[prost(map="string, string", tag="7")] pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleInfo { #[prost(string, tag="1")] @@ -4332,17 +4468,14 @@ pub struct SipDispatchRuleInfo { #[prost(map="string, string", tag="8")] pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ListSipDispatchRuleRequest { } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipDispatchRuleResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSipDispatchRuleRequest { #[prost(string, tag="1")] @@ -4350,7 +4483,6 @@ pub struct DeleteSipDispatchRuleRequest { } /// A SIP Participant is a singular SIP session connected to a LiveKit room via /// a SIP Trunk into a SIP DispatchRule -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipParticipantRequest { /// What SIP Trunk should be used to dial the user @@ -4386,7 +4518,6 @@ pub struct CreateSipParticipantRequest { #[prost(bool, tag="10")] pub hide_phone_number: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipParticipantInfo { #[prost(string, tag="1")] @@ -4398,6 +4529,15 @@ pub struct SipParticipantInfo { #[prost(string, tag="4")] pub sip_call_id: ::prost::alloc::string::String, } +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TransferSipParticipantRequest { + #[prost(string, tag="1")] + pub participant_identity: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub room_name: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub transfer_to: ::prost::alloc::string::String, +} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum SipTransport { @@ -4413,10 +4553,10 @@ impl SipTransport { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - SipTransport::Auto => "SIP_TRANSPORT_AUTO", - SipTransport::Udp => "SIP_TRANSPORT_UDP", - SipTransport::Tcp => "SIP_TRANSPORT_TCP", - SipTransport::Tls => "SIP_TRANSPORT_TLS", + Self::Auto => "SIP_TRANSPORT_AUTO", + Self::Udp => "SIP_TRANSPORT_UDP", + Self::Tcp => "SIP_TRANSPORT_TCP", + Self::Tls => "SIP_TRANSPORT_TLS", } } /// Creates an enum from field names used in the ProtoBuf definition. diff --git a/livekit-protocol/src/livekit.serde.rs b/livekit-protocol/src/livekit.serde.rs index 62e7c690..4e6a0fb0 100644 --- a/livekit-protocol/src/livekit.serde.rs +++ b/livekit-protocol/src/livekit.serde.rs @@ -1911,6 +1911,195 @@ impl<'de> serde::Deserialize<'de> for CandidateProtocol { deserializer.deserialize_any(GeneratedVisitor) } } +impl serde::Serialize for ChatMessage { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id.is_empty() { + len += 1; + } + if self.timestamp != 0 { + len += 1; + } + if self.edit_timestamp.is_some() { + len += 1; + } + if !self.message.is_empty() { + len += 1; + } + if self.deleted { + len += 1; + } + if self.generated { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ChatMessage", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if self.timestamp != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; + } + if let Some(v) = self.edit_timestamp.as_ref() { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("editTimestamp", ToString::to_string(&v).as_str())?; + } + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; + } + if self.deleted { + struct_ser.serialize_field("deleted", &self.deleted)?; + } + if self.generated { + struct_ser.serialize_field("generated", &self.generated)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ChatMessage { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "timestamp", + "edit_timestamp", + "editTimestamp", + "message", + "deleted", + "generated", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Timestamp, + EditTimestamp, + Message, + Deleted, + Generated, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "timestamp" => Ok(GeneratedField::Timestamp), + "editTimestamp" | "edit_timestamp" => Ok(GeneratedField::EditTimestamp), + "message" => Ok(GeneratedField::Message), + "deleted" => Ok(GeneratedField::Deleted), + "generated" => Ok(GeneratedField::Generated), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ChatMessage; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ChatMessage") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut timestamp__ = None; + let mut edit_timestamp__ = None; + let mut message__ = None; + let mut deleted__ = None; + let mut generated__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map_.next_value()?); + } + GeneratedField::Timestamp => { + if timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("timestamp")); + } + timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::EditTimestamp => { + if edit_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("editTimestamp")); + } + edit_timestamp__ = + map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) + ; + } + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); + } + message__ = Some(map_.next_value()?); + } + GeneratedField::Deleted => { + if deleted__.is_some() { + return Err(serde::de::Error::duplicate_field("deleted")); + } + deleted__ = Some(map_.next_value()?); + } + GeneratedField::Generated => { + if generated__.is_some() { + return Err(serde::de::Error::duplicate_field("generated")); + } + generated__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ChatMessage { + id: id__.unwrap_or_default(), + timestamp: timestamp__.unwrap_or_default(), + edit_timestamp: edit_timestamp__, + message: message__.unwrap_or_default(), + deleted: deleted__.unwrap_or_default(), + generated: generated__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.ChatMessage", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for ClientConfigSetting { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2193,6 +2382,9 @@ impl serde::Serialize for ClientInfo { if !self.network.is_empty() { len += 1; } + if !self.other_sdks.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.ClientInfo", len)?; if self.sdk != 0 { let v = client_info::Sdk::try_from(self.sdk) @@ -2226,6 +2418,9 @@ impl serde::Serialize for ClientInfo { if !self.network.is_empty() { struct_ser.serialize_field("network", &self.network)?; } + if !self.other_sdks.is_empty() { + struct_ser.serialize_field("otherSdks", &self.other_sdks)?; + } struct_ser.end() } } @@ -2249,6 +2444,8 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { "browserVersion", "address", "network", + "other_sdks", + "otherSdks", ]; #[allow(clippy::enum_variant_names)] @@ -2263,6 +2460,7 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { BrowserVersion, Address, Network, + OtherSdks, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2295,6 +2493,7 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { "browserVersion" | "browser_version" => Ok(GeneratedField::BrowserVersion), "address" => Ok(GeneratedField::Address), "network" => Ok(GeneratedField::Network), + "otherSdks" | "other_sdks" => Ok(GeneratedField::OtherSdks), _ => Ok(GeneratedField::__SkipField__), } } @@ -2324,6 +2523,7 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { let mut browser_version__ = None; let mut address__ = None; let mut network__ = None; + let mut other_sdks__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Sdk => { @@ -2388,6 +2588,12 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { } network__ = Some(map_.next_value()?); } + GeneratedField::OtherSdks => { + if other_sdks__.is_some() { + return Err(serde::de::Error::duplicate_field("otherSdks")); + } + other_sdks__ = Some(map_.next_value()?); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -2404,6 +2610,7 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { browser_version: browser_version__.unwrap_or_default(), address: address__.unwrap_or_default(), network: network__.unwrap_or_default(), + other_sdks: other_sdks__.unwrap_or_default(), }) } } @@ -2428,6 +2635,8 @@ impl serde::Serialize for client_info::Sdk { Self::Rust => "RUST", Self::Python => "PYTHON", Self::Cpp => "CPP", + Self::UnityWeb => "UNITY_WEB", + Self::Node => "NODE", }; serializer.serialize_str(variant) } @@ -2450,6 +2659,8 @@ impl<'de> serde::Deserialize<'de> for client_info::Sdk { "RUST", "PYTHON", "CPP", + "UNITY_WEB", + "NODE", ]; struct GeneratedVisitor; @@ -2501,6 +2712,8 @@ impl<'de> serde::Deserialize<'de> for client_info::Sdk { "RUST" => Ok(client_info::Sdk::Rust), "PYTHON" => Ok(client_info::Sdk::Python), "CPP" => Ok(client_info::Sdk::Cpp), + "UNITY_WEB" => Ok(client_info::Sdk::UnityWeb), + "NODE" => Ok(client_info::Sdk::Node), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -4753,6 +4966,21 @@ impl serde::Serialize for DataPacket { data_packet::Value::Transcription(v) => { struct_ser.serialize_field("transcription", v)?; } + data_packet::Value::Metrics(v) => { + struct_ser.serialize_field("metrics", v)?; + } + data_packet::Value::ChatMessage(v) => { + struct_ser.serialize_field("chatMessage", v)?; + } + data_packet::Value::RpcRequest(v) => { + struct_ser.serialize_field("rpcRequest", v)?; + } + data_packet::Value::RpcAck(v) => { + struct_ser.serialize_field("rpcAck", v)?; + } + data_packet::Value::RpcResponse(v) => { + struct_ser.serialize_field("rpcResponse", v)?; + } } } struct_ser.end() @@ -4775,6 +5003,15 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "sip_dtmf", "sipDtmf", "transcription", + "metrics", + "chat_message", + "chatMessage", + "rpc_request", + "rpcRequest", + "rpc_ack", + "rpcAck", + "rpc_response", + "rpcResponse", ]; #[allow(clippy::enum_variant_names)] @@ -4786,6 +5023,11 @@ impl<'de> serde::Deserialize<'de> for DataPacket { Speaker, SipDtmf, Transcription, + Metrics, + ChatMessage, + RpcRequest, + RpcAck, + RpcResponse, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4815,6 +5057,11 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "speaker" => Ok(GeneratedField::Speaker), "sipDtmf" | "sip_dtmf" => Ok(GeneratedField::SipDtmf), "transcription" => Ok(GeneratedField::Transcription), + "metrics" => Ok(GeneratedField::Metrics), + "chatMessage" | "chat_message" => Ok(GeneratedField::ChatMessage), + "rpcRequest" | "rpc_request" => Ok(GeneratedField::RpcRequest), + "rpcAck" | "rpc_ack" => Ok(GeneratedField::RpcAck), + "rpcResponse" | "rpc_response" => Ok(GeneratedField::RpcResponse), _ => Ok(GeneratedField::__SkipField__), } } @@ -4884,6 +5131,41 @@ impl<'de> serde::Deserialize<'de> for DataPacket { return Err(serde::de::Error::duplicate_field("transcription")); } value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::Transcription) +; + } + GeneratedField::Metrics => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("metrics")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::Metrics) +; + } + GeneratedField::ChatMessage => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("chatMessage")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::ChatMessage) +; + } + GeneratedField::RpcRequest => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("rpcRequest")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::RpcRequest) +; + } + GeneratedField::RpcAck => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("rpcAck")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::RpcAck) +; + } + GeneratedField::RpcResponse => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("rpcResponse")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::RpcResponse) ; } GeneratedField::__SkipField__ => { @@ -7295,7 +7577,7 @@ impl<'de> serde::Deserialize<'de> for encryption::Type { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for FileInfo { +impl serde::Serialize for EventMetric { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7303,79 +7585,103 @@ impl serde::Serialize for FileInfo { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.filename.is_empty() { + if self.label != 0 { len += 1; } - if self.started_at != 0 { + if self.participant_identity != 0 { len += 1; } - if self.ended_at != 0 { + if self.track_sid != 0 { len += 1; } - if self.duration != 0 { + if self.start_timestamp_ms != 0 { len += 1; } - if self.size != 0 { + if self.end_timestamp_ms.is_some() { len += 1; } - if !self.location.is_empty() { + if self.normalized_start_timestamp.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.FileInfo", len)?; - if !self.filename.is_empty() { - struct_ser.serialize_field("filename", &self.filename)?; + if self.normalized_end_timestamp.is_some() { + len += 1; } - if self.started_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + if !self.metadata.is_empty() { + len += 1; } - if self.ended_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + if self.rid != 0 { + len += 1; } - if self.duration != 0 { + let mut struct_ser = serializer.serialize_struct("livekit.EventMetric", len)?; + if self.label != 0 { + struct_ser.serialize_field("label", &self.label)?; + } + if self.participant_identity != 0 { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if self.track_sid != 0 { + struct_ser.serialize_field("trackSid", &self.track_sid)?; + } + if self.start_timestamp_ms != 0 { #[allow(clippy::needless_borrow)] #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("duration", ToString::to_string(&self.duration).as_str())?; + struct_ser.serialize_field("startTimestampMs", ToString::to_string(&self.start_timestamp_ms).as_str())?; } - if self.size != 0 { + if let Some(v) = self.end_timestamp_ms.as_ref() { #[allow(clippy::needless_borrow)] #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("size", ToString::to_string(&self.size).as_str())?; + struct_ser.serialize_field("endTimestampMs", ToString::to_string(&v).as_str())?; } - if !self.location.is_empty() { - struct_ser.serialize_field("location", &self.location)?; + if let Some(v) = self.normalized_start_timestamp.as_ref() { + struct_ser.serialize_field("normalizedStartTimestamp", v)?; + } + if let Some(v) = self.normalized_end_timestamp.as_ref() { + struct_ser.serialize_field("normalizedEndTimestamp", v)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if self.rid != 0 { + struct_ser.serialize_field("rid", &self.rid)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for FileInfo { +impl<'de> serde::Deserialize<'de> for EventMetric { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "filename", - "started_at", - "startedAt", - "ended_at", - "endedAt", - "duration", - "size", - "location", + "label", + "participant_identity", + "participantIdentity", + "track_sid", + "trackSid", + "start_timestamp_ms", + "startTimestampMs", + "end_timestamp_ms", + "endTimestampMs", + "normalized_start_timestamp", + "normalizedStartTimestamp", + "normalized_end_timestamp", + "normalizedEndTimestamp", + "metadata", + "rid", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Filename, - StartedAt, - EndedAt, - Duration, - Size, - Location, + Label, + ParticipantIdentity, + TrackSid, + StartTimestampMs, + EndTimestampMs, + NormalizedStartTimestamp, + NormalizedEndTimestamp, + Metadata, + Rid, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7398,12 +7704,15 @@ impl<'de> serde::Deserialize<'de> for FileInfo { E: serde::de::Error, { match value { - "filename" => Ok(GeneratedField::Filename), - "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), - "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), - "duration" => Ok(GeneratedField::Duration), - "size" => Ok(GeneratedField::Size), - "location" => Ok(GeneratedField::Location), + "label" => Ok(GeneratedField::Label), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "trackSid" | "track_sid" => Ok(GeneratedField::TrackSid), + "startTimestampMs" | "start_timestamp_ms" => Ok(GeneratedField::StartTimestampMs), + "endTimestampMs" | "end_timestamp_ms" => Ok(GeneratedField::EndTimestampMs), + "normalizedStartTimestamp" | "normalized_start_timestamp" => Ok(GeneratedField::NormalizedStartTimestamp), + "normalizedEndTimestamp" | "normalized_end_timestamp" => Ok(GeneratedField::NormalizedEndTimestamp), + "metadata" => Ok(GeneratedField::Metadata), + "rid" => Ok(GeneratedField::Rid), _ => Ok(GeneratedField::__SkipField__), } } @@ -7413,21 +7722,247 @@ impl<'de> serde::Deserialize<'de> for FileInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = FileInfo; + type Value = EventMetric; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.FileInfo") + formatter.write_str("struct livekit.EventMetric") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut filename__ = None; - let mut started_at__ = None; - let mut ended_at__ = None; - let mut duration__ = None; - let mut size__ = None; + let mut label__ = None; + let mut participant_identity__ = None; + let mut track_sid__ = None; + let mut start_timestamp_ms__ = None; + let mut end_timestamp_ms__ = None; + let mut normalized_start_timestamp__ = None; + let mut normalized_end_timestamp__ = None; + let mut metadata__ = None; + let mut rid__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::TrackSid => { + if track_sid__.is_some() { + return Err(serde::de::Error::duplicate_field("trackSid")); + } + track_sid__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::StartTimestampMs => { + if start_timestamp_ms__.is_some() { + return Err(serde::de::Error::duplicate_field("startTimestampMs")); + } + start_timestamp_ms__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::EndTimestampMs => { + if end_timestamp_ms__.is_some() { + return Err(serde::de::Error::duplicate_field("endTimestampMs")); + } + end_timestamp_ms__ = + map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) + ; + } + GeneratedField::NormalizedStartTimestamp => { + if normalized_start_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("normalizedStartTimestamp")); + } + normalized_start_timestamp__ = map_.next_value()?; + } + GeneratedField::NormalizedEndTimestamp => { + if normalized_end_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("normalizedEndTimestamp")); + } + normalized_end_timestamp__ = map_.next_value()?; + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map_.next_value()?); + } + GeneratedField::Rid => { + if rid__.is_some() { + return Err(serde::de::Error::duplicate_field("rid")); + } + rid__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(EventMetric { + label: label__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + track_sid: track_sid__.unwrap_or_default(), + start_timestamp_ms: start_timestamp_ms__.unwrap_or_default(), + end_timestamp_ms: end_timestamp_ms__, + normalized_start_timestamp: normalized_start_timestamp__, + normalized_end_timestamp: normalized_end_timestamp__, + metadata: metadata__.unwrap_or_default(), + rid: rid__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.EventMetric", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for FileInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.filename.is_empty() { + len += 1; + } + if self.started_at != 0 { + len += 1; + } + if self.ended_at != 0 { + len += 1; + } + if self.duration != 0 { + len += 1; + } + if self.size != 0 { + len += 1; + } + if !self.location.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.FileInfo", len)?; + if !self.filename.is_empty() { + struct_ser.serialize_field("filename", &self.filename)?; + } + if self.started_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + } + if self.ended_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + } + if self.duration != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("duration", ToString::to_string(&self.duration).as_str())?; + } + if self.size != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("size", ToString::to_string(&self.size).as_str())?; + } + if !self.location.is_empty() { + struct_ser.serialize_field("location", &self.location)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for FileInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "filename", + "started_at", + "startedAt", + "ended_at", + "endedAt", + "duration", + "size", + "location", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Filename, + StartedAt, + EndedAt, + Duration, + Size, + Location, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "filename" => Ok(GeneratedField::Filename), + "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), + "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), + "duration" => Ok(GeneratedField::Duration), + "size" => Ok(GeneratedField::Size), + "location" => Ok(GeneratedField::Location), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = FileInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.FileInfo") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut filename__ = None; + let mut started_at__ = None; + let mut ended_at__ = None; + let mut duration__ = None; + let mut size__ = None; let mut location__ = None; while let Some(k) = map_.next_key()? { match k { @@ -7622,7 +8157,7 @@ impl<'de> serde::Deserialize<'de> for GcpUpload { deserializer.deserialize_struct("livekit.GCPUpload", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for IceServer { +impl serde::Serialize for GetSipInboundTrunkRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7630,45 +8165,30 @@ impl serde::Serialize for IceServer { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.urls.is_empty() { - len += 1; - } - if !self.username.is_empty() { - len += 1; - } - if !self.credential.is_empty() { + if !self.sip_trunk_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.ICEServer", len)?; - if !self.urls.is_empty() { - struct_ser.serialize_field("urls", &self.urls)?; - } - if !self.username.is_empty() { - struct_ser.serialize_field("username", &self.username)?; - } - if !self.credential.is_empty() { - struct_ser.serialize_field("credential", &self.credential)?; + let mut struct_ser = serializer.serialize_struct("livekit.GetSIPInboundTrunkRequest", len)?; + if !self.sip_trunk_id.is_empty() { + struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for IceServer { +impl<'de> serde::Deserialize<'de> for GetSipInboundTrunkRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "urls", - "username", - "credential", + "sip_trunk_id", + "sipTrunkId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Urls, - Username, - Credential, + SipTrunkId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7691,9 +8211,7 @@ impl<'de> serde::Deserialize<'de> for IceServer { E: serde::de::Error, { match value { - "urls" => Ok(GeneratedField::Urls), - "username" => Ok(GeneratedField::Username), - "credential" => Ok(GeneratedField::Credential), + "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), _ => Ok(GeneratedField::__SkipField__), } } @@ -7703,197 +8221,230 @@ impl<'de> serde::Deserialize<'de> for IceServer { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IceServer; + type Value = GetSipInboundTrunkRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ICEServer") + formatter.write_str("struct livekit.GetSIPInboundTrunkRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut urls__ = None; - let mut username__ = None; - let mut credential__ = None; + let mut sip_trunk_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Urls => { - if urls__.is_some() { - return Err(serde::de::Error::duplicate_field("urls")); + GeneratedField::SipTrunkId => { + if sip_trunk_id__.is_some() { + return Err(serde::de::Error::duplicate_field("sipTrunkId")); } - urls__ = Some(map_.next_value()?); + sip_trunk_id__ = Some(map_.next_value()?); } - GeneratedField::Username => { - if username__.is_some() { - return Err(serde::de::Error::duplicate_field("username")); - } - username__ = Some(map_.next_value()?); - } - GeneratedField::Credential => { - if credential__.is_some() { - return Err(serde::de::Error::duplicate_field("credential")); - } - credential__ = Some(map_.next_value()?); - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; } } } - Ok(IceServer { - urls: urls__.unwrap_or_default(), - username: username__.unwrap_or_default(), - credential: credential__.unwrap_or_default(), + Ok(GetSipInboundTrunkRequest { + sip_trunk_id: sip_trunk_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.ICEServer", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.GetSIPInboundTrunkRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ImageCodec { +impl serde::Serialize for GetSipInboundTrunkResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { - let variant = match self { - Self::IcDefault => "IC_DEFAULT", - Self::IcJpeg => "IC_JPEG", - }; - serializer.serialize_str(variant) + use serde::ser::SerializeStruct; + let mut len = 0; + if self.trunk.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.GetSIPInboundTrunkResponse", len)?; + if let Some(v) = self.trunk.as_ref() { + struct_ser.serialize_field("trunk", v)?; + } + struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ImageCodec { +impl<'de> serde::Deserialize<'de> for GetSipInboundTrunkResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "IC_DEFAULT", - "IC_JPEG", + "trunk", ]; - struct GeneratedVisitor; + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Trunk, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ImageCodec; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "trunk" => Ok(GeneratedField::Trunk), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetSipInboundTrunkResponse; - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.GetSIPInboundTrunkResponse") } - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, { - match value { - "IC_DEFAULT" => Ok(ImageCodec::IcDefault), - "IC_JPEG" => Ok(ImageCodec::IcJpeg), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + let mut trunk__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Trunk => { + if trunk__.is_some() { + return Err(serde::de::Error::duplicate_field("trunk")); + } + trunk__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } } + Ok(GetSipInboundTrunkResponse { + trunk: trunk__, + }) } } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.GetSIPInboundTrunkResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ImageFileSuffix { +impl serde::Serialize for GetSipOutboundTrunkRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { - let variant = match self { - Self::ImageSuffixIndex => "IMAGE_SUFFIX_INDEX", - Self::ImageSuffixTimestamp => "IMAGE_SUFFIX_TIMESTAMP", - }; - serializer.serialize_str(variant) + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sip_trunk_id.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.GetSIPOutboundTrunkRequest", len)?; + if !self.sip_trunk_id.is_empty() { + struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; + } + struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ImageFileSuffix { +impl<'de> serde::Deserialize<'de> for GetSipOutboundTrunkRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "IMAGE_SUFFIX_INDEX", - "IMAGE_SUFFIX_TIMESTAMP", + "sip_trunk_id", + "sipTrunkId", ]; - struct GeneratedVisitor; + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SipTrunkId, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ImageFileSuffix; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetSipOutboundTrunkRequest; - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.GetSIPOutboundTrunkRequest") } - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, { - match value { - "IMAGE_SUFFIX_INDEX" => Ok(ImageFileSuffix::ImageSuffixIndex), - "IMAGE_SUFFIX_TIMESTAMP" => Ok(ImageFileSuffix::ImageSuffixTimestamp), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + let mut sip_trunk_id__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::SipTrunkId => { + if sip_trunk_id__.is_some() { + return Err(serde::de::Error::duplicate_field("sipTrunkId")); + } + sip_trunk_id__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } } + Ok(GetSipOutboundTrunkRequest { + sip_trunk_id: sip_trunk_id__.unwrap_or_default(), + }) } } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.GetSIPOutboundTrunkRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ImageOutput { +impl serde::Serialize for GetSipOutboundTrunkResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7901,114 +8452,30 @@ impl serde::Serialize for ImageOutput { { use serde::ser::SerializeStruct; let mut len = 0; - if self.capture_interval != 0 { - len += 1; - } - if self.width != 0 { - len += 1; - } - if self.height != 0 { - len += 1; - } - if !self.filename_prefix.is_empty() { - len += 1; - } - if self.filename_suffix != 0 { - len += 1; - } - if self.image_codec != 0 { + if self.trunk.is_some() { len += 1; } - if self.disable_manifest { - len += 1; + let mut struct_ser = serializer.serialize_struct("livekit.GetSIPOutboundTrunkResponse", len)?; + if let Some(v) = self.trunk.as_ref() { + struct_ser.serialize_field("trunk", v)?; } - if self.output.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.ImageOutput", len)?; - if self.capture_interval != 0 { - struct_ser.serialize_field("captureInterval", &self.capture_interval)?; - } - if self.width != 0 { - struct_ser.serialize_field("width", &self.width)?; - } - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - if !self.filename_prefix.is_empty() { - struct_ser.serialize_field("filenamePrefix", &self.filename_prefix)?; - } - if self.filename_suffix != 0 { - let v = ImageFileSuffix::try_from(self.filename_suffix) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.filename_suffix)))?; - struct_ser.serialize_field("filenameSuffix", &v)?; - } - if self.image_codec != 0 { - let v = ImageCodec::try_from(self.image_codec) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.image_codec)))?; - struct_ser.serialize_field("imageCodec", &v)?; - } - if self.disable_manifest { - struct_ser.serialize_field("disableManifest", &self.disable_manifest)?; - } - if let Some(v) = self.output.as_ref() { - match v { - image_output::Output::S3(v) => { - struct_ser.serialize_field("s3", v)?; - } - image_output::Output::Gcp(v) => { - struct_ser.serialize_field("gcp", v)?; - } - image_output::Output::Azure(v) => { - struct_ser.serialize_field("azure", v)?; - } - image_output::Output::AliOss(v) => { - struct_ser.serialize_field("aliOSS", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ImageOutput { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "capture_interval", - "captureInterval", - "width", - "height", - "filename_prefix", - "filenamePrefix", - "filename_suffix", - "filenameSuffix", - "image_codec", - "imageCodec", - "disable_manifest", - "disableManifest", - "s3", - "gcp", - "azure", - "aliOSS", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - CaptureInterval, - Width, - Height, - FilenamePrefix, - FilenameSuffix, - ImageCodec, - DisableManifest, - S3, - Gcp, - Azure, - AliOss, - __SkipField__, + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetSipOutboundTrunkResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "trunk", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Trunk, + __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8030,17 +8497,7 @@ impl<'de> serde::Deserialize<'de> for ImageOutput { E: serde::de::Error, { match value { - "captureInterval" | "capture_interval" => Ok(GeneratedField::CaptureInterval), - "width" => Ok(GeneratedField::Width), - "height" => Ok(GeneratedField::Height), - "filenamePrefix" | "filename_prefix" => Ok(GeneratedField::FilenamePrefix), - "filenameSuffix" | "filename_suffix" => Ok(GeneratedField::FilenameSuffix), - "imageCodec" | "image_codec" => Ok(GeneratedField::ImageCodec), - "disableManifest" | "disable_manifest" => Ok(GeneratedField::DisableManifest), - "s3" => Ok(GeneratedField::S3), - "gcp" => Ok(GeneratedField::Gcp), - "azure" => Ok(GeneratedField::Azure), - "aliOSS" => Ok(GeneratedField::AliOss), + "trunk" => Ok(GeneratedField::Trunk), _ => Ok(GeneratedField::__SkipField__), } } @@ -8050,123 +8507,39 @@ impl<'de> serde::Deserialize<'de> for ImageOutput { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ImageOutput; + type Value = GetSipOutboundTrunkResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ImageOutput") + formatter.write_str("struct livekit.GetSIPOutboundTrunkResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut capture_interval__ = None; - let mut width__ = None; - let mut height__ = None; - let mut filename_prefix__ = None; - let mut filename_suffix__ = None; - let mut image_codec__ = None; - let mut disable_manifest__ = None; - let mut output__ = None; + let mut trunk__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CaptureInterval => { - if capture_interval__.is_some() { - return Err(serde::de::Error::duplicate_field("captureInterval")); - } - capture_interval__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Width => { - if width__.is_some() { - return Err(serde::de::Error::duplicate_field("width")); - } - width__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::FilenamePrefix => { - if filename_prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("filenamePrefix")); - } - filename_prefix__ = Some(map_.next_value()?); - } - GeneratedField::FilenameSuffix => { - if filename_suffix__.is_some() { - return Err(serde::de::Error::duplicate_field("filenameSuffix")); - } - filename_suffix__ = Some(map_.next_value::()? as i32); - } - GeneratedField::ImageCodec => { - if image_codec__.is_some() { - return Err(serde::de::Error::duplicate_field("imageCodec")); - } - image_codec__ = Some(map_.next_value::()? as i32); - } - GeneratedField::DisableManifest => { - if disable_manifest__.is_some() { - return Err(serde::de::Error::duplicate_field("disableManifest")); - } - disable_manifest__ = Some(map_.next_value()?); - } - GeneratedField::S3 => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("s3")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::S3) -; - } - GeneratedField::Gcp => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("gcp")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::Gcp) -; - } - GeneratedField::Azure => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("azure")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::Azure) -; - } - GeneratedField::AliOss => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("aliOSS")); + GeneratedField::Trunk => { + if trunk__.is_some() { + return Err(serde::de::Error::duplicate_field("trunk")); } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::AliOss) -; + trunk__ = map_.next_value()?; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(ImageOutput { - capture_interval: capture_interval__.unwrap_or_default(), - width: width__.unwrap_or_default(), - height: height__.unwrap_or_default(), - filename_prefix: filename_prefix__.unwrap_or_default(), - filename_suffix: filename_suffix__.unwrap_or_default(), - image_codec: image_codec__.unwrap_or_default(), - disable_manifest: disable_manifest__.unwrap_or_default(), - output: output__, + Ok(GetSipOutboundTrunkResponse { + trunk: trunk__, }) } } - deserializer.deserialize_struct("livekit.ImageOutput", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.GetSIPOutboundTrunkResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ImagesInfo { +impl serde::Serialize for IceServer { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8174,63 +8547,45 @@ impl serde::Serialize for ImagesInfo { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.filename_prefix.is_empty() { - len += 1; - } - if self.image_count != 0 { + if !self.urls.is_empty() { len += 1; } - if self.started_at != 0 { + if !self.username.is_empty() { len += 1; } - if self.ended_at != 0 { + if !self.credential.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.ImagesInfo", len)?; - if !self.filename_prefix.is_empty() { - struct_ser.serialize_field("filenamePrefix", &self.filename_prefix)?; - } - if self.image_count != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("imageCount", ToString::to_string(&self.image_count).as_str())?; + let mut struct_ser = serializer.serialize_struct("livekit.ICEServer", len)?; + if !self.urls.is_empty() { + struct_ser.serialize_field("urls", &self.urls)?; } - if self.started_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + if !self.username.is_empty() { + struct_ser.serialize_field("username", &self.username)?; } - if self.ended_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + if !self.credential.is_empty() { + struct_ser.serialize_field("credential", &self.credential)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ImagesInfo { +impl<'de> serde::Deserialize<'de> for IceServer { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "filename_prefix", - "filenamePrefix", - "image_count", - "imageCount", - "started_at", - "startedAt", - "ended_at", - "endedAt", + "urls", + "username", + "credential", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - FilenamePrefix, - ImageCount, - StartedAt, - EndedAt, + Urls, + Username, + Credential, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -8253,10 +8608,9 @@ impl<'de> serde::Deserialize<'de> for ImagesInfo { E: serde::de::Error, { match value { - "filenamePrefix" | "filename_prefix" => Ok(GeneratedField::FilenamePrefix), - "imageCount" | "image_count" => Ok(GeneratedField::ImageCount), - "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), - "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), + "urls" => Ok(GeneratedField::Urls), + "username" => Ok(GeneratedField::Username), + "credential" => Ok(GeneratedField::Credential), _ => Ok(GeneratedField::__SkipField__), } } @@ -8266,250 +8620,153 @@ impl<'de> serde::Deserialize<'de> for ImagesInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ImagesInfo; + type Value = IceServer; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ImagesInfo") + formatter.write_str("struct livekit.ICEServer") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut filename_prefix__ = None; - let mut image_count__ = None; - let mut started_at__ = None; - let mut ended_at__ = None; + let mut urls__ = None; + let mut username__ = None; + let mut credential__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::FilenamePrefix => { - if filename_prefix__.is_some() { - return Err(serde::de::Error::duplicate_field("filenamePrefix")); - } - filename_prefix__ = Some(map_.next_value()?); - } - GeneratedField::ImageCount => { - if image_count__.is_some() { - return Err(serde::de::Error::duplicate_field("imageCount")); + GeneratedField::Urls => { + if urls__.is_some() { + return Err(serde::de::Error::duplicate_field("urls")); } - image_count__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + urls__ = Some(map_.next_value()?); } - GeneratedField::StartedAt => { - if started_at__.is_some() { - return Err(serde::de::Error::duplicate_field("startedAt")); + GeneratedField::Username => { + if username__.is_some() { + return Err(serde::de::Error::duplicate_field("username")); } - started_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + username__ = Some(map_.next_value()?); } - GeneratedField::EndedAt => { - if ended_at__.is_some() { - return Err(serde::de::Error::duplicate_field("endedAt")); + GeneratedField::Credential => { + if credential__.is_some() { + return Err(serde::de::Error::duplicate_field("credential")); } - ended_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + credential__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(ImagesInfo { - filename_prefix: filename_prefix__.unwrap_or_default(), - image_count: image_count__.unwrap_or_default(), - started_at: started_at__.unwrap_or_default(), - ended_at: ended_at__.unwrap_or_default(), + Ok(IceServer { + urls: urls__.unwrap_or_default(), + username: username__.unwrap_or_default(), + credential: credential__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.ImagesInfo", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.ICEServer", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for IngressAudioEncodingOptions { +impl serde::Serialize for ImageCodec { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.audio_codec != 0 { - len += 1; - } - if self.bitrate != 0 { - len += 1; - } - if self.disable_dtx { - len += 1; - } - if self.channels != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.IngressAudioEncodingOptions", len)?; - if self.audio_codec != 0 { - let v = AudioCodec::try_from(self.audio_codec) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.audio_codec)))?; - struct_ser.serialize_field("audioCodec", &v)?; - } - if self.bitrate != 0 { - struct_ser.serialize_field("bitrate", &self.bitrate)?; - } - if self.disable_dtx { - struct_ser.serialize_field("disableDtx", &self.disable_dtx)?; - } - if self.channels != 0 { - struct_ser.serialize_field("channels", &self.channels)?; - } - struct_ser.end() + let variant = match self { + Self::IcDefault => "IC_DEFAULT", + Self::IcJpeg => "IC_JPEG", + }; + serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for IngressAudioEncodingOptions { +impl<'de> serde::Deserialize<'de> for ImageCodec { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "audio_codec", - "audioCodec", - "bitrate", - "disable_dtx", - "disableDtx", - "channels", + "IC_DEFAULT", + "IC_JPEG", ]; - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - AudioCodec, - Bitrate, - DisableDtx, - Channels, - __SkipField__, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; + struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ImageCodec; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "audioCodec" | "audio_codec" => Ok(GeneratedField::AudioCodec), - "bitrate" => Ok(GeneratedField::Bitrate), - "disableDtx" | "disable_dtx" => Ok(GeneratedField::DisableDtx), - "channels" => Ok(GeneratedField::Channels), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressAudioEncodingOptions; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.IngressAudioEncodingOptions") + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) } - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, { - let mut audio_codec__ = None; - let mut bitrate__ = None; - let mut disable_dtx__ = None; - let mut channels__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::AudioCodec => { - if audio_codec__.is_some() { - return Err(serde::de::Error::duplicate_field("audioCodec")); - } - audio_codec__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Bitrate => { - if bitrate__.is_some() { - return Err(serde::de::Error::duplicate_field("bitrate")); - } - bitrate__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::DisableDtx => { - if disable_dtx__.is_some() { - return Err(serde::de::Error::duplicate_field("disableDtx")); - } - disable_dtx__ = Some(map_.next_value()?); - } - GeneratedField::Channels => { - if channels__.is_some() { - return Err(serde::de::Error::duplicate_field("channels")); - } - channels__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } + match value { + "IC_DEFAULT" => Ok(ImageCodec::IcDefault), + "IC_JPEG" => Ok(ImageCodec::IcJpeg), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } - Ok(IngressAudioEncodingOptions { - audio_codec: audio_codec__.unwrap_or_default(), - bitrate: bitrate__.unwrap_or_default(), - disable_dtx: disable_dtx__.unwrap_or_default(), - channels: channels__.unwrap_or_default(), - }) } } - deserializer.deserialize_struct("livekit.IngressAudioEncodingOptions", FIELDS, GeneratedVisitor) + deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for IngressAudioEncodingPreset { +impl serde::Serialize for ImageFileSuffix { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { let variant = match self { - Self::OpusStereo96kbps => "OPUS_STEREO_96KBPS", - Self::OpusMono64kbs => "OPUS_MONO_64KBS", + Self::ImageSuffixIndex => "IMAGE_SUFFIX_INDEX", + Self::ImageSuffixTimestamp => "IMAGE_SUFFIX_TIMESTAMP", }; serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for IngressAudioEncodingPreset { +impl<'de> serde::Deserialize<'de> for ImageFileSuffix { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "OPUS_STEREO_96KBPS", - "OPUS_MONO_64KBS", + "IMAGE_SUFFIX_INDEX", + "IMAGE_SUFFIX_TIMESTAMP", ]; struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressAudioEncodingPreset; + type Value = ImageFileSuffix; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(formatter, "expected one of: {:?}", &FIELDS) @@ -8544,8 +8801,8 @@ impl<'de> serde::Deserialize<'de> for IngressAudioEncodingPreset { E: serde::de::Error, { match value { - "OPUS_STEREO_96KBPS" => Ok(IngressAudioEncodingPreset::OpusStereo96kbps), - "OPUS_MONO_64KBS" => Ok(IngressAudioEncodingPreset::OpusMono64kbs), + "IMAGE_SUFFIX_INDEX" => Ok(ImageFileSuffix::ImageSuffixIndex), + "IMAGE_SUFFIX_TIMESTAMP" => Ok(ImageFileSuffix::ImageSuffixTimestamp), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -8553,7 +8810,7 @@ impl<'de> serde::Deserialize<'de> for IngressAudioEncodingPreset { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for IngressAudioOptions { +impl serde::Serialize for ImageOutput { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8561,58 +8818,113 @@ impl serde::Serialize for IngressAudioOptions { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.name.is_empty() { + if self.capture_interval != 0 { len += 1; } - if self.source != 0 { + if self.width != 0 { len += 1; } - if self.encoding_options.is_some() { + if self.height != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.IngressAudioOptions", len)?; - if !self.name.is_empty() { - struct_ser.serialize_field("name", &self.name)?; + if !self.filename_prefix.is_empty() { + len += 1; } - if self.source != 0 { - let v = TrackSource::try_from(self.source) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.source)))?; - struct_ser.serialize_field("source", &v)?; + if self.filename_suffix != 0 { + len += 1; } - if let Some(v) = self.encoding_options.as_ref() { + if self.image_codec != 0 { + len += 1; + } + if self.disable_manifest { + len += 1; + } + if self.output.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ImageOutput", len)?; + if self.capture_interval != 0 { + struct_ser.serialize_field("captureInterval", &self.capture_interval)?; + } + if self.width != 0 { + struct_ser.serialize_field("width", &self.width)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if !self.filename_prefix.is_empty() { + struct_ser.serialize_field("filenamePrefix", &self.filename_prefix)?; + } + if self.filename_suffix != 0 { + let v = ImageFileSuffix::try_from(self.filename_suffix) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.filename_suffix)))?; + struct_ser.serialize_field("filenameSuffix", &v)?; + } + if self.image_codec != 0 { + let v = ImageCodec::try_from(self.image_codec) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.image_codec)))?; + struct_ser.serialize_field("imageCodec", &v)?; + } + if self.disable_manifest { + struct_ser.serialize_field("disableManifest", &self.disable_manifest)?; + } + if let Some(v) = self.output.as_ref() { match v { - ingress_audio_options::EncodingOptions::Preset(v) => { - let v = IngressAudioEncodingPreset::try_from(*v) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?; - struct_ser.serialize_field("preset", &v)?; + image_output::Output::S3(v) => { + struct_ser.serialize_field("s3", v)?; } - ingress_audio_options::EncodingOptions::Options(v) => { - struct_ser.serialize_field("options", v)?; + image_output::Output::Gcp(v) => { + struct_ser.serialize_field("gcp", v)?; + } + image_output::Output::Azure(v) => { + struct_ser.serialize_field("azure", v)?; + } + image_output::Output::AliOss(v) => { + struct_ser.serialize_field("aliOSS", v)?; } } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for IngressAudioOptions { +impl<'de> serde::Deserialize<'de> for ImageOutput { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "name", - "source", - "preset", - "options", + "capture_interval", + "captureInterval", + "width", + "height", + "filename_prefix", + "filenamePrefix", + "filename_suffix", + "filenameSuffix", + "image_codec", + "imageCodec", + "disable_manifest", + "disableManifest", + "s3", + "gcp", + "azure", + "aliOSS", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Name, - Source, - Preset, - Options, + CaptureInterval, + Width, + Height, + FilenamePrefix, + FilenameSuffix, + ImageCodec, + DisableManifest, + S3, + Gcp, + Azure, + AliOss, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -8635,10 +8947,17 @@ impl<'de> serde::Deserialize<'de> for IngressAudioOptions { E: serde::de::Error, { match value { - "name" => Ok(GeneratedField::Name), - "source" => Ok(GeneratedField::Source), - "preset" => Ok(GeneratedField::Preset), - "options" => Ok(GeneratedField::Options), + "captureInterval" | "capture_interval" => Ok(GeneratedField::CaptureInterval), + "width" => Ok(GeneratedField::Width), + "height" => Ok(GeneratedField::Height), + "filenamePrefix" | "filename_prefix" => Ok(GeneratedField::FilenamePrefix), + "filenameSuffix" | "filename_suffix" => Ok(GeneratedField::FilenameSuffix), + "imageCodec" | "image_codec" => Ok(GeneratedField::ImageCodec), + "disableManifest" | "disable_manifest" => Ok(GeneratedField::DisableManifest), + "s3" => Ok(GeneratedField::S3), + "gcp" => Ok(GeneratedField::Gcp), + "azure" => Ok(GeneratedField::Azure), + "aliOSS" => Ok(GeneratedField::AliOss), _ => Ok(GeneratedField::__SkipField__), } } @@ -8648,44 +8967,100 @@ impl<'de> serde::Deserialize<'de> for IngressAudioOptions { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressAudioOptions; + type Value = ImageOutput; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.IngressAudioOptions") + formatter.write_str("struct livekit.ImageOutput") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut name__ = None; - let mut source__ = None; - let mut encoding_options__ = None; + let mut capture_interval__ = None; + let mut width__ = None; + let mut height__ = None; + let mut filename_prefix__ = None; + let mut filename_suffix__ = None; + let mut image_codec__ = None; + let mut disable_manifest__ = None; + let mut output__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); + GeneratedField::CaptureInterval => { + if capture_interval__.is_some() { + return Err(serde::de::Error::duplicate_field("captureInterval")); } - name__ = Some(map_.next_value()?); + capture_interval__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Source => { - if source__.is_some() { - return Err(serde::de::Error::duplicate_field("source")); + GeneratedField::Width => { + if width__.is_some() { + return Err(serde::de::Error::duplicate_field("width")); } - source__ = Some(map_.next_value::()? as i32); + width__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Preset => { - if encoding_options__.is_some() { - return Err(serde::de::Error::duplicate_field("preset")); + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); } - encoding_options__ = map_.next_value::<::std::option::Option>()?.map(|x| ingress_audio_options::EncodingOptions::Preset(x as i32)); + height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Options => { - if encoding_options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); + GeneratedField::FilenamePrefix => { + if filename_prefix__.is_some() { + return Err(serde::de::Error::duplicate_field("filenamePrefix")); } - encoding_options__ = map_.next_value::<::std::option::Option<_>>()?.map(ingress_audio_options::EncodingOptions::Options) + filename_prefix__ = Some(map_.next_value()?); + } + GeneratedField::FilenameSuffix => { + if filename_suffix__.is_some() { + return Err(serde::de::Error::duplicate_field("filenameSuffix")); + } + filename_suffix__ = Some(map_.next_value::()? as i32); + } + GeneratedField::ImageCodec => { + if image_codec__.is_some() { + return Err(serde::de::Error::duplicate_field("imageCodec")); + } + image_codec__ = Some(map_.next_value::()? as i32); + } + GeneratedField::DisableManifest => { + if disable_manifest__.is_some() { + return Err(serde::de::Error::duplicate_field("disableManifest")); + } + disable_manifest__ = Some(map_.next_value()?); + } + GeneratedField::S3 => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("s3")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::S3) +; + } + GeneratedField::Gcp => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("gcp")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::Gcp) +; + } + GeneratedField::Azure => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("azure")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::Azure) +; + } + GeneratedField::AliOss => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("aliOSS")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(image_output::Output::AliOss) ; } GeneratedField::__SkipField__ => { @@ -8693,17 +9068,22 @@ impl<'de> serde::Deserialize<'de> for IngressAudioOptions { } } } - Ok(IngressAudioOptions { - name: name__.unwrap_or_default(), - source: source__.unwrap_or_default(), - encoding_options: encoding_options__, + Ok(ImageOutput { + capture_interval: capture_interval__.unwrap_or_default(), + width: width__.unwrap_or_default(), + height: height__.unwrap_or_default(), + filename_prefix: filename_prefix__.unwrap_or_default(), + filename_suffix: filename_suffix__.unwrap_or_default(), + image_codec: image_codec__.unwrap_or_default(), + disable_manifest: disable_manifest__.unwrap_or_default(), + output: output__, }) } } - deserializer.deserialize_struct("livekit.IngressAudioOptions", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.ImageOutput", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for IngressInfo { +impl serde::Serialize for ImagesInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8711,152 +9091,63 @@ impl serde::Serialize for IngressInfo { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.ingress_id.is_empty() { + if !self.filename_prefix.is_empty() { len += 1; } - if !self.name.is_empty() { + if self.image_count != 0 { len += 1; } - if !self.stream_key.is_empty() { + if self.started_at != 0 { len += 1; } - if !self.url.is_empty() { + if self.ended_at != 0 { len += 1; } - if self.input_type != 0 { - len += 1; + let mut struct_ser = serializer.serialize_struct("livekit.ImagesInfo", len)?; + if !self.filename_prefix.is_empty() { + struct_ser.serialize_field("filenamePrefix", &self.filename_prefix)?; } - if self.bypass_transcoding { - len += 1; + if self.image_count != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("imageCount", ToString::to_string(&self.image_count).as_str())?; } - if self.enable_transcoding.is_some() { - len += 1; - } - if self.audio.is_some() { - len += 1; - } - if self.video.is_some() { - len += 1; - } - if !self.room_name.is_empty() { - len += 1; - } - if !self.participant_identity.is_empty() { - len += 1; - } - if !self.participant_name.is_empty() { - len += 1; - } - if !self.participant_metadata.is_empty() { - len += 1; - } - if self.reusable { - len += 1; - } - if self.state.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.IngressInfo", len)?; - if !self.ingress_id.is_empty() { - struct_ser.serialize_field("ingressId", &self.ingress_id)?; - } - if !self.name.is_empty() { - struct_ser.serialize_field("name", &self.name)?; - } - if !self.stream_key.is_empty() { - struct_ser.serialize_field("streamKey", &self.stream_key)?; - } - if !self.url.is_empty() { - struct_ser.serialize_field("url", &self.url)?; - } - if self.input_type != 0 { - let v = IngressInput::try_from(self.input_type) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.input_type)))?; - struct_ser.serialize_field("inputType", &v)?; - } - if self.bypass_transcoding { - struct_ser.serialize_field("bypassTranscoding", &self.bypass_transcoding)?; - } - if let Some(v) = self.enable_transcoding.as_ref() { - struct_ser.serialize_field("enableTranscoding", v)?; - } - if let Some(v) = self.audio.as_ref() { - struct_ser.serialize_field("audio", v)?; - } - if let Some(v) = self.video.as_ref() { - struct_ser.serialize_field("video", v)?; - } - if !self.room_name.is_empty() { - struct_ser.serialize_field("roomName", &self.room_name)?; - } - if !self.participant_identity.is_empty() { - struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; - } - if !self.participant_name.is_empty() { - struct_ser.serialize_field("participantName", &self.participant_name)?; - } - if !self.participant_metadata.is_empty() { - struct_ser.serialize_field("participantMetadata", &self.participant_metadata)?; - } - if self.reusable { - struct_ser.serialize_field("reusable", &self.reusable)?; + if self.started_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; } - if let Some(v) = self.state.as_ref() { - struct_ser.serialize_field("state", v)?; + if self.ended_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for IngressInfo { +impl<'de> serde::Deserialize<'de> for ImagesInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "ingress_id", - "ingressId", - "name", - "stream_key", - "streamKey", - "url", - "input_type", - "inputType", - "bypass_transcoding", - "bypassTranscoding", - "enable_transcoding", - "enableTranscoding", - "audio", - "video", - "room_name", - "roomName", - "participant_identity", - "participantIdentity", - "participant_name", - "participantName", - "participant_metadata", - "participantMetadata", - "reusable", - "state", + "filename_prefix", + "filenamePrefix", + "image_count", + "imageCount", + "started_at", + "startedAt", + "ended_at", + "endedAt", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - IngressId, - Name, - StreamKey, - Url, - InputType, - BypassTranscoding, - EnableTranscoding, - Audio, - Video, - RoomName, - ParticipantIdentity, - ParticipantName, - ParticipantMetadata, - Reusable, - State, + FilenamePrefix, + ImageCount, + StartedAt, + EndedAt, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -8879,21 +9170,10 @@ impl<'de> serde::Deserialize<'de> for IngressInfo { E: serde::de::Error, { match value { - "ingressId" | "ingress_id" => Ok(GeneratedField::IngressId), - "name" => Ok(GeneratedField::Name), - "streamKey" | "stream_key" => Ok(GeneratedField::StreamKey), - "url" => Ok(GeneratedField::Url), - "inputType" | "input_type" => Ok(GeneratedField::InputType), - "bypassTranscoding" | "bypass_transcoding" => Ok(GeneratedField::BypassTranscoding), - "enableTranscoding" | "enable_transcoding" => Ok(GeneratedField::EnableTranscoding), - "audio" => Ok(GeneratedField::Audio), - "video" => Ok(GeneratedField::Video), - "roomName" | "room_name" => Ok(GeneratedField::RoomName), - "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), - "participantName" | "participant_name" => Ok(GeneratedField::ParticipantName), - "participantMetadata" | "participant_metadata" => Ok(GeneratedField::ParticipantMetadata), - "reusable" => Ok(GeneratedField::Reusable), - "state" => Ok(GeneratedField::State), + "filenamePrefix" | "filename_prefix" => Ok(GeneratedField::FilenamePrefix), + "imageCount" | "image_count" => Ok(GeneratedField::ImageCount), + "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), + "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), _ => Ok(GeneratedField::__SkipField__), } } @@ -8903,180 +9183,250 @@ impl<'de> serde::Deserialize<'de> for IngressInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressInfo; + type Value = ImagesInfo; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.IngressInfo") + formatter.write_str("struct livekit.ImagesInfo") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut ingress_id__ = None; - let mut name__ = None; - let mut stream_key__ = None; - let mut url__ = None; - let mut input_type__ = None; - let mut bypass_transcoding__ = None; - let mut enable_transcoding__ = None; - let mut audio__ = None; - let mut video__ = None; - let mut room_name__ = None; - let mut participant_identity__ = None; - let mut participant_name__ = None; - let mut participant_metadata__ = None; - let mut reusable__ = None; - let mut state__ = None; + let mut filename_prefix__ = None; + let mut image_count__ = None; + let mut started_at__ = None; + let mut ended_at__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::IngressId => { - if ingress_id__.is_some() { - return Err(serde::de::Error::duplicate_field("ingressId")); - } - ingress_id__ = Some(map_.next_value()?); - } - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::StreamKey => { - if stream_key__.is_some() { - return Err(serde::de::Error::duplicate_field("streamKey")); - } - stream_key__ = Some(map_.next_value()?); - } - GeneratedField::Url => { - if url__.is_some() { - return Err(serde::de::Error::duplicate_field("url")); - } - url__ = Some(map_.next_value()?); - } - GeneratedField::InputType => { - if input_type__.is_some() { - return Err(serde::de::Error::duplicate_field("inputType")); - } - input_type__ = Some(map_.next_value::()? as i32); - } - GeneratedField::BypassTranscoding => { - if bypass_transcoding__.is_some() { - return Err(serde::de::Error::duplicate_field("bypassTranscoding")); + GeneratedField::FilenamePrefix => { + if filename_prefix__.is_some() { + return Err(serde::de::Error::duplicate_field("filenamePrefix")); } - bypass_transcoding__ = Some(map_.next_value()?); + filename_prefix__ = Some(map_.next_value()?); } - GeneratedField::EnableTranscoding => { - if enable_transcoding__.is_some() { - return Err(serde::de::Error::duplicate_field("enableTranscoding")); + GeneratedField::ImageCount => { + if image_count__.is_some() { + return Err(serde::de::Error::duplicate_field("imageCount")); } - enable_transcoding__ = map_.next_value()?; + image_count__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Audio => { - if audio__.is_some() { - return Err(serde::de::Error::duplicate_field("audio")); + GeneratedField::StartedAt => { + if started_at__.is_some() { + return Err(serde::de::Error::duplicate_field("startedAt")); } - audio__ = map_.next_value()?; + started_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Video => { - if video__.is_some() { - return Err(serde::de::Error::duplicate_field("video")); + GeneratedField::EndedAt => { + if ended_at__.is_some() { + return Err(serde::de::Error::duplicate_field("endedAt")); } - video__ = map_.next_value()?; + ended_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::RoomName => { - if room_name__.is_some() { - return Err(serde::de::Error::duplicate_field("roomName")); - } - room_name__ = Some(map_.next_value()?); + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; } - GeneratedField::ParticipantIdentity => { - if participant_identity__.is_some() { - return Err(serde::de::Error::duplicate_field("participantIdentity")); - } - participant_identity__ = Some(map_.next_value()?); + } + } + Ok(ImagesInfo { + filename_prefix: filename_prefix__.unwrap_or_default(), + image_count: image_count__.unwrap_or_default(), + started_at: started_at__.unwrap_or_default(), + ended_at: ended_at__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.ImagesInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for IngressAudioEncodingOptions { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.audio_codec != 0 { + len += 1; + } + if self.bitrate != 0 { + len += 1; + } + if self.disable_dtx { + len += 1; + } + if self.channels != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.IngressAudioEncodingOptions", len)?; + if self.audio_codec != 0 { + let v = AudioCodec::try_from(self.audio_codec) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.audio_codec)))?; + struct_ser.serialize_field("audioCodec", &v)?; + } + if self.bitrate != 0 { + struct_ser.serialize_field("bitrate", &self.bitrate)?; + } + if self.disable_dtx { + struct_ser.serialize_field("disableDtx", &self.disable_dtx)?; + } + if self.channels != 0 { + struct_ser.serialize_field("channels", &self.channels)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for IngressAudioEncodingOptions { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "audio_codec", + "audioCodec", + "bitrate", + "disable_dtx", + "disableDtx", + "channels", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AudioCodec, + Bitrate, + DisableDtx, + Channels, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "audioCodec" | "audio_codec" => Ok(GeneratedField::AudioCodec), + "bitrate" => Ok(GeneratedField::Bitrate), + "disableDtx" | "disable_dtx" => Ok(GeneratedField::DisableDtx), + "channels" => Ok(GeneratedField::Channels), + _ => Ok(GeneratedField::__SkipField__), } - GeneratedField::ParticipantName => { - if participant_name__.is_some() { - return Err(serde::de::Error::duplicate_field("participantName")); + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = IngressAudioEncodingOptions; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.IngressAudioEncodingOptions") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut audio_codec__ = None; + let mut bitrate__ = None; + let mut disable_dtx__ = None; + let mut channels__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::AudioCodec => { + if audio_codec__.is_some() { + return Err(serde::de::Error::duplicate_field("audioCodec")); } - participant_name__ = Some(map_.next_value()?); + audio_codec__ = Some(map_.next_value::()? as i32); } - GeneratedField::ParticipantMetadata => { - if participant_metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("participantMetadata")); + GeneratedField::Bitrate => { + if bitrate__.is_some() { + return Err(serde::de::Error::duplicate_field("bitrate")); } - participant_metadata__ = Some(map_.next_value()?); + bitrate__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Reusable => { - if reusable__.is_some() { - return Err(serde::de::Error::duplicate_field("reusable")); + GeneratedField::DisableDtx => { + if disable_dtx__.is_some() { + return Err(serde::de::Error::duplicate_field("disableDtx")); } - reusable__ = Some(map_.next_value()?); + disable_dtx__ = Some(map_.next_value()?); } - GeneratedField::State => { - if state__.is_some() { - return Err(serde::de::Error::duplicate_field("state")); + GeneratedField::Channels => { + if channels__.is_some() { + return Err(serde::de::Error::duplicate_field("channels")); } - state__ = map_.next_value()?; + channels__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(IngressInfo { - ingress_id: ingress_id__.unwrap_or_default(), - name: name__.unwrap_or_default(), - stream_key: stream_key__.unwrap_or_default(), - url: url__.unwrap_or_default(), - input_type: input_type__.unwrap_or_default(), - bypass_transcoding: bypass_transcoding__.unwrap_or_default(), - enable_transcoding: enable_transcoding__, - audio: audio__, - video: video__, - room_name: room_name__.unwrap_or_default(), - participant_identity: participant_identity__.unwrap_or_default(), - participant_name: participant_name__.unwrap_or_default(), - participant_metadata: participant_metadata__.unwrap_or_default(), - reusable: reusable__.unwrap_or_default(), - state: state__, + Ok(IngressAudioEncodingOptions { + audio_codec: audio_codec__.unwrap_or_default(), + bitrate: bitrate__.unwrap_or_default(), + disable_dtx: disable_dtx__.unwrap_or_default(), + channels: channels__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.IngressInfo", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.IngressAudioEncodingOptions", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for IngressInput { +impl serde::Serialize for IngressAudioEncodingPreset { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { let variant = match self { - Self::RtmpInput => "RTMP_INPUT", - Self::WhipInput => "WHIP_INPUT", - Self::UrlInput => "URL_INPUT", + Self::OpusStereo96kbps => "OPUS_STEREO_96KBPS", + Self::OpusMono64kbs => "OPUS_MONO_64KBS", }; serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for IngressInput { +impl<'de> serde::Deserialize<'de> for IngressAudioEncodingPreset { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "RTMP_INPUT", - "WHIP_INPUT", - "URL_INPUT", + "OPUS_STEREO_96KBPS", + "OPUS_MONO_64KBS", ]; struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressInput; + type Value = IngressAudioEncodingPreset; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(formatter, "expected one of: {:?}", &FIELDS) @@ -9111,9 +9461,8 @@ impl<'de> serde::Deserialize<'de> for IngressInput { E: serde::de::Error, { match value { - "RTMP_INPUT" => Ok(IngressInput::RtmpInput), - "WHIP_INPUT" => Ok(IngressInput::WhipInput), - "URL_INPUT" => Ok(IngressInput::UrlInput), + "OPUS_STEREO_96KBPS" => Ok(IngressAudioEncodingPreset::OpusStereo96kbps), + "OPUS_MONO_64KBS" => Ok(IngressAudioEncodingPreset::OpusMono64kbs), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -9121,7 +9470,7 @@ impl<'de> serde::Deserialize<'de> for IngressInput { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for IngressState { +impl serde::Serialize for IngressAudioOptions { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9129,114 +9478,58 @@ impl serde::Serialize for IngressState { { use serde::ser::SerializeStruct; let mut len = 0; - if self.status != 0 { - len += 1; - } - if !self.error.is_empty() { - len += 1; - } - if self.video.is_some() { - len += 1; - } - if self.audio.is_some() { - len += 1; - } - if !self.room_id.is_empty() { - len += 1; - } - if self.started_at != 0 { - len += 1; - } - if self.ended_at != 0 { + if !self.name.is_empty() { len += 1; } - if self.updated_at != 0 { + if self.source != 0 { len += 1; } - if !self.resource_id.is_empty() { + if self.encoding_options.is_some() { len += 1; } - if !self.tracks.is_empty() { - len += 1; + let mut struct_ser = serializer.serialize_struct("livekit.IngressAudioOptions", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; } - let mut struct_ser = serializer.serialize_struct("livekit.IngressState", len)?; - if self.status != 0 { - let v = ingress_state::Status::try_from(self.status) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.status)))?; - struct_ser.serialize_field("status", &v)?; + if self.source != 0 { + let v = TrackSource::try_from(self.source) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.source)))?; + struct_ser.serialize_field("source", &v)?; } - if !self.error.is_empty() { - struct_ser.serialize_field("error", &self.error)?; - } - if let Some(v) = self.video.as_ref() { - struct_ser.serialize_field("video", v)?; - } - if let Some(v) = self.audio.as_ref() { - struct_ser.serialize_field("audio", v)?; - } - if !self.room_id.is_empty() { - struct_ser.serialize_field("roomId", &self.room_id)?; - } - if self.started_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; - } - if self.ended_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; - } - if self.updated_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("updatedAt", ToString::to_string(&self.updated_at).as_str())?; - } - if !self.resource_id.is_empty() { - struct_ser.serialize_field("resourceId", &self.resource_id)?; - } - if !self.tracks.is_empty() { - struct_ser.serialize_field("tracks", &self.tracks)?; + if let Some(v) = self.encoding_options.as_ref() { + match v { + ingress_audio_options::EncodingOptions::Preset(v) => { + let v = IngressAudioEncodingPreset::try_from(*v) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("preset", &v)?; + } + ingress_audio_options::EncodingOptions::Options(v) => { + struct_ser.serialize_field("options", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for IngressState { +impl<'de> serde::Deserialize<'de> for IngressAudioOptions { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "status", - "error", - "video", - "audio", - "room_id", - "roomId", - "started_at", - "startedAt", - "ended_at", - "endedAt", - "updated_at", - "updatedAt", - "resource_id", - "resourceId", - "tracks", + "name", + "source", + "preset", + "options", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Status, - Error, - Video, - Audio, - RoomId, - StartedAt, - EndedAt, - UpdatedAt, - ResourceId, - Tracks, + Name, + Source, + Preset, + Options, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -9259,16 +9552,10 @@ impl<'de> serde::Deserialize<'de> for IngressState { E: serde::de::Error, { match value { - "status" => Ok(GeneratedField::Status), - "error" => Ok(GeneratedField::Error), - "video" => Ok(GeneratedField::Video), - "audio" => Ok(GeneratedField::Audio), - "roomId" | "room_id" => Ok(GeneratedField::RoomId), - "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), - "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), - "updatedAt" | "updated_at" => Ok(GeneratedField::UpdatedAt), - "resourceId" | "resource_id" => Ok(GeneratedField::ResourceId), - "tracks" => Ok(GeneratedField::Tracks), + "name" => Ok(GeneratedField::Name), + "source" => Ok(GeneratedField::Source), + "preset" => Ok(GeneratedField::Preset), + "options" => Ok(GeneratedField::Options), _ => Ok(GeneratedField::__SkipField__), } } @@ -9278,197 +9565,62 @@ impl<'de> serde::Deserialize<'de> for IngressState { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressState; + type Value = IngressAudioOptions; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.IngressState") + formatter.write_str("struct livekit.IngressAudioOptions") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut status__ = None; - let mut error__ = None; - let mut video__ = None; - let mut audio__ = None; - let mut room_id__ = None; - let mut started_at__ = None; - let mut ended_at__ = None; - let mut updated_at__ = None; - let mut resource_id__ = None; - let mut tracks__ = None; + let mut name__ = None; + let mut source__ = None; + let mut encoding_options__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); - } - status__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Error => { - if error__.is_some() { - return Err(serde::de::Error::duplicate_field("error")); - } - error__ = Some(map_.next_value()?); - } - GeneratedField::Video => { - if video__.is_some() { - return Err(serde::de::Error::duplicate_field("video")); - } - video__ = map_.next_value()?; - } - GeneratedField::Audio => { - if audio__.is_some() { - return Err(serde::de::Error::duplicate_field("audio")); - } - audio__ = map_.next_value()?; - } - GeneratedField::RoomId => { - if room_id__.is_some() { - return Err(serde::de::Error::duplicate_field("roomId")); - } - room_id__ = Some(map_.next_value()?); - } - GeneratedField::StartedAt => { - if started_at__.is_some() { - return Err(serde::de::Error::duplicate_field("startedAt")); - } - started_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::EndedAt => { - if ended_at__.is_some() { - return Err(serde::de::Error::duplicate_field("endedAt")); + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); } - ended_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + name__ = Some(map_.next_value()?); } - GeneratedField::UpdatedAt => { - if updated_at__.is_some() { - return Err(serde::de::Error::duplicate_field("updatedAt")); + GeneratedField::Source => { + if source__.is_some() { + return Err(serde::de::Error::duplicate_field("source")); } - updated_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + source__ = Some(map_.next_value::()? as i32); } - GeneratedField::ResourceId => { - if resource_id__.is_some() { - return Err(serde::de::Error::duplicate_field("resourceId")); + GeneratedField::Preset => { + if encoding_options__.is_some() { + return Err(serde::de::Error::duplicate_field("preset")); } - resource_id__ = Some(map_.next_value()?); + encoding_options__ = map_.next_value::<::std::option::Option>()?.map(|x| ingress_audio_options::EncodingOptions::Preset(x as i32)); } - GeneratedField::Tracks => { - if tracks__.is_some() { - return Err(serde::de::Error::duplicate_field("tracks")); + GeneratedField::Options => { + if encoding_options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); } - tracks__ = Some(map_.next_value()?); + encoding_options__ = map_.next_value::<::std::option::Option<_>>()?.map(ingress_audio_options::EncodingOptions::Options) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(IngressState { - status: status__.unwrap_or_default(), - error: error__.unwrap_or_default(), - video: video__, - audio: audio__, - room_id: room_id__.unwrap_or_default(), - started_at: started_at__.unwrap_or_default(), - ended_at: ended_at__.unwrap_or_default(), - updated_at: updated_at__.unwrap_or_default(), - resource_id: resource_id__.unwrap_or_default(), - tracks: tracks__.unwrap_or_default(), + Ok(IngressAudioOptions { + name: name__.unwrap_or_default(), + source: source__.unwrap_or_default(), + encoding_options: encoding_options__, }) } } - deserializer.deserialize_struct("livekit.IngressState", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.IngressAudioOptions", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ingress_state::Status { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::EndpointInactive => "ENDPOINT_INACTIVE", - Self::EndpointBuffering => "ENDPOINT_BUFFERING", - Self::EndpointPublishing => "ENDPOINT_PUBLISHING", - Self::EndpointError => "ENDPOINT_ERROR", - Self::EndpointComplete => "ENDPOINT_COMPLETE", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for ingress_state::Status { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "ENDPOINT_INACTIVE", - "ENDPOINT_BUFFERING", - "ENDPOINT_PUBLISHING", - "ENDPOINT_ERROR", - "ENDPOINT_COMPLETE", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ingress_state::Status; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "ENDPOINT_INACTIVE" => Ok(ingress_state::Status::EndpointInactive), - "ENDPOINT_BUFFERING" => Ok(ingress_state::Status::EndpointBuffering), - "ENDPOINT_PUBLISHING" => Ok(ingress_state::Status::EndpointPublishing), - "ENDPOINT_ERROR" => Ok(ingress_state::Status::EndpointError), - "ENDPOINT_COMPLETE" => Ok(ingress_state::Status::EndpointComplete), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for IngressVideoEncodingOptions { +impl serde::Serialize for IngressInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9476,49 +9628,152 @@ impl serde::Serialize for IngressVideoEncodingOptions { { use serde::ser::SerializeStruct; let mut len = 0; - if self.video_codec != 0 { + if !self.ingress_id.is_empty() { len += 1; } - if self.frame_rate != 0. { + if !self.name.is_empty() { len += 1; } - if !self.layers.is_empty() { + if !self.stream_key.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.IngressVideoEncodingOptions", len)?; - if self.video_codec != 0 { - let v = VideoCodec::try_from(self.video_codec) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.video_codec)))?; - struct_ser.serialize_field("videoCodec", &v)?; + if !self.url.is_empty() { + len += 1; } - if self.frame_rate != 0. { - struct_ser.serialize_field("frameRate", &self.frame_rate)?; + if self.input_type != 0 { + len += 1; } - if !self.layers.is_empty() { - struct_ser.serialize_field("layers", &self.layers)?; + if self.bypass_transcoding { + len += 1; + } + if self.enable_transcoding.is_some() { + len += 1; + } + if self.audio.is_some() { + len += 1; + } + if self.video.is_some() { + len += 1; + } + if !self.room_name.is_empty() { + len += 1; + } + if !self.participant_identity.is_empty() { + len += 1; + } + if !self.participant_name.is_empty() { + len += 1; + } + if !self.participant_metadata.is_empty() { + len += 1; + } + if self.reusable { + len += 1; + } + if self.state.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.IngressInfo", len)?; + if !self.ingress_id.is_empty() { + struct_ser.serialize_field("ingressId", &self.ingress_id)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if !self.stream_key.is_empty() { + struct_ser.serialize_field("streamKey", &self.stream_key)?; + } + if !self.url.is_empty() { + struct_ser.serialize_field("url", &self.url)?; + } + if self.input_type != 0 { + let v = IngressInput::try_from(self.input_type) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.input_type)))?; + struct_ser.serialize_field("inputType", &v)?; + } + if self.bypass_transcoding { + struct_ser.serialize_field("bypassTranscoding", &self.bypass_transcoding)?; + } + if let Some(v) = self.enable_transcoding.as_ref() { + struct_ser.serialize_field("enableTranscoding", v)?; + } + if let Some(v) = self.audio.as_ref() { + struct_ser.serialize_field("audio", v)?; + } + if let Some(v) = self.video.as_ref() { + struct_ser.serialize_field("video", v)?; + } + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + if !self.participant_identity.is_empty() { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if !self.participant_name.is_empty() { + struct_ser.serialize_field("participantName", &self.participant_name)?; + } + if !self.participant_metadata.is_empty() { + struct_ser.serialize_field("participantMetadata", &self.participant_metadata)?; + } + if self.reusable { + struct_ser.serialize_field("reusable", &self.reusable)?; + } + if let Some(v) = self.state.as_ref() { + struct_ser.serialize_field("state", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for IngressVideoEncodingOptions { +impl<'de> serde::Deserialize<'de> for IngressInfo { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "video_codec", - "videoCodec", - "frame_rate", - "frameRate", - "layers", + "ingress_id", + "ingressId", + "name", + "stream_key", + "streamKey", + "url", + "input_type", + "inputType", + "bypass_transcoding", + "bypassTranscoding", + "enable_transcoding", + "enableTranscoding", + "audio", + "video", + "room_name", + "roomName", + "participant_identity", + "participantIdentity", + "participant_name", + "participantName", + "participant_metadata", + "participantMetadata", + "reusable", + "state", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - VideoCodec, - FrameRate, - Layers, + IngressId, + Name, + StreamKey, + Url, + InputType, + BypassTranscoding, + EnableTranscoding, + Audio, + Video, + RoomName, + ParticipantIdentity, + ParticipantName, + ParticipantMetadata, + Reusable, + State, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -9541,9 +9796,21 @@ impl<'de> serde::Deserialize<'de> for IngressVideoEncodingOptions { E: serde::de::Error, { match value { - "videoCodec" | "video_codec" => Ok(GeneratedField::VideoCodec), - "frameRate" | "frame_rate" => Ok(GeneratedField::FrameRate), - "layers" => Ok(GeneratedField::Layers), + "ingressId" | "ingress_id" => Ok(GeneratedField::IngressId), + "name" => Ok(GeneratedField::Name), + "streamKey" | "stream_key" => Ok(GeneratedField::StreamKey), + "url" => Ok(GeneratedField::Url), + "inputType" | "input_type" => Ok(GeneratedField::InputType), + "bypassTranscoding" | "bypass_transcoding" => Ok(GeneratedField::BypassTranscoding), + "enableTranscoding" | "enable_transcoding" => Ok(GeneratedField::EnableTranscoding), + "audio" => Ok(GeneratedField::Audio), + "video" => Ok(GeneratedField::Video), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "participantName" | "participant_name" => Ok(GeneratedField::ParticipantName), + "participantMetadata" | "participant_metadata" => Ok(GeneratedField::ParticipantMetadata), + "reusable" => Ok(GeneratedField::Reusable), + "state" => Ok(GeneratedField::State), _ => Ok(GeneratedField::__SkipField__), } } @@ -9553,100 +9820,180 @@ impl<'de> serde::Deserialize<'de> for IngressVideoEncodingOptions { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressVideoEncodingOptions; + type Value = IngressInfo; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.IngressVideoEncodingOptions") + formatter.write_str("struct livekit.IngressInfo") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut video_codec__ = None; - let mut frame_rate__ = None; - let mut layers__ = None; + let mut ingress_id__ = None; + let mut name__ = None; + let mut stream_key__ = None; + let mut url__ = None; + let mut input_type__ = None; + let mut bypass_transcoding__ = None; + let mut enable_transcoding__ = None; + let mut audio__ = None; + let mut video__ = None; + let mut room_name__ = None; + let mut participant_identity__ = None; + let mut participant_name__ = None; + let mut participant_metadata__ = None; + let mut reusable__ = None; + let mut state__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::VideoCodec => { - if video_codec__.is_some() { - return Err(serde::de::Error::duplicate_field("videoCodec")); + GeneratedField::IngressId => { + if ingress_id__.is_some() { + return Err(serde::de::Error::duplicate_field("ingressId")); } - video_codec__ = Some(map_.next_value::()? as i32); + ingress_id__ = Some(map_.next_value()?); } - GeneratedField::FrameRate => { - if frame_rate__.is_some() { - return Err(serde::de::Error::duplicate_field("frameRate")); + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); } - frame_rate__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + name__ = Some(map_.next_value()?); } - GeneratedField::Layers => { - if layers__.is_some() { - return Err(serde::de::Error::duplicate_field("layers")); + GeneratedField::StreamKey => { + if stream_key__.is_some() { + return Err(serde::de::Error::duplicate_field("streamKey")); } - layers__ = Some(map_.next_value()?); + stream_key__ = Some(map_.next_value()?); } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; + GeneratedField::Url => { + if url__.is_some() { + return Err(serde::de::Error::duplicate_field("url")); + } + url__ = Some(map_.next_value()?); } - } - } - Ok(IngressVideoEncodingOptions { - video_codec: video_codec__.unwrap_or_default(), - frame_rate: frame_rate__.unwrap_or_default(), - layers: layers__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("livekit.IngressVideoEncodingOptions", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for IngressVideoEncodingPreset { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::H264720p30fps3Layers => "H264_720P_30FPS_3_LAYERS", - Self::H2641080p30fps3Layers => "H264_1080P_30FPS_3_LAYERS", - Self::H264540p25fps2Layers => "H264_540P_25FPS_2_LAYERS", - Self::H264720p30fps1Layer => "H264_720P_30FPS_1_LAYER", - Self::H2641080p30fps1Layer => "H264_1080P_30FPS_1_LAYER", - Self::H264720p30fps3LayersHighMotion => "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", - Self::H2641080p30fps3LayersHighMotion => "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", - Self::H264540p25fps2LayersHighMotion => "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", - Self::H264720p30fps1LayerHighMotion => "H264_720P_30FPS_1_LAYER_HIGH_MOTION", - Self::H2641080p30fps1LayerHighMotion => "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", + GeneratedField::InputType => { + if input_type__.is_some() { + return Err(serde::de::Error::duplicate_field("inputType")); + } + input_type__ = Some(map_.next_value::()? as i32); + } + GeneratedField::BypassTranscoding => { + if bypass_transcoding__.is_some() { + return Err(serde::de::Error::duplicate_field("bypassTranscoding")); + } + bypass_transcoding__ = Some(map_.next_value()?); + } + GeneratedField::EnableTranscoding => { + if enable_transcoding__.is_some() { + return Err(serde::de::Error::duplicate_field("enableTranscoding")); + } + enable_transcoding__ = map_.next_value()?; + } + GeneratedField::Audio => { + if audio__.is_some() { + return Err(serde::de::Error::duplicate_field("audio")); + } + audio__ = map_.next_value()?; + } + GeneratedField::Video => { + if video__.is_some() { + return Err(serde::de::Error::duplicate_field("video")); + } + video__ = map_.next_value()?; + } + GeneratedField::RoomName => { + if room_name__.is_some() { + return Err(serde::de::Error::duplicate_field("roomName")); + } + room_name__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantName => { + if participant_name__.is_some() { + return Err(serde::de::Error::duplicate_field("participantName")); + } + participant_name__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantMetadata => { + if participant_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("participantMetadata")); + } + participant_metadata__ = Some(map_.next_value()?); + } + GeneratedField::Reusable => { + if reusable__.is_some() { + return Err(serde::de::Error::duplicate_field("reusable")); + } + reusable__ = Some(map_.next_value()?); + } + GeneratedField::State => { + if state__.is_some() { + return Err(serde::de::Error::duplicate_field("state")); + } + state__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(IngressInfo { + ingress_id: ingress_id__.unwrap_or_default(), + name: name__.unwrap_or_default(), + stream_key: stream_key__.unwrap_or_default(), + url: url__.unwrap_or_default(), + input_type: input_type__.unwrap_or_default(), + bypass_transcoding: bypass_transcoding__.unwrap_or_default(), + enable_transcoding: enable_transcoding__, + audio: audio__, + video: video__, + room_name: room_name__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + participant_name: participant_name__.unwrap_or_default(), + participant_metadata: participant_metadata__.unwrap_or_default(), + reusable: reusable__.unwrap_or_default(), + state: state__, + }) + } + } + deserializer.deserialize_struct("livekit.IngressInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for IngressInput { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::RtmpInput => "RTMP_INPUT", + Self::WhipInput => "WHIP_INPUT", + Self::UrlInput => "URL_INPUT", }; serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for IngressVideoEncodingPreset { +impl<'de> serde::Deserialize<'de> for IngressInput { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "H264_720P_30FPS_3_LAYERS", - "H264_1080P_30FPS_3_LAYERS", - "H264_540P_25FPS_2_LAYERS", - "H264_720P_30FPS_1_LAYER", - "H264_1080P_30FPS_1_LAYER", - "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", - "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", - "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", - "H264_720P_30FPS_1_LAYER_HIGH_MOTION", - "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", + "RTMP_INPUT", + "WHIP_INPUT", + "URL_INPUT", ]; struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressVideoEncodingPreset; + type Value = IngressInput; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(formatter, "expected one of: {:?}", &FIELDS) @@ -9681,16 +10028,9 @@ impl<'de> serde::Deserialize<'de> for IngressVideoEncodingPreset { E: serde::de::Error, { match value { - "H264_720P_30FPS_3_LAYERS" => Ok(IngressVideoEncodingPreset::H264720p30fps3Layers), - "H264_1080P_30FPS_3_LAYERS" => Ok(IngressVideoEncodingPreset::H2641080p30fps3Layers), - "H264_540P_25FPS_2_LAYERS" => Ok(IngressVideoEncodingPreset::H264540p25fps2Layers), - "H264_720P_30FPS_1_LAYER" => Ok(IngressVideoEncodingPreset::H264720p30fps1Layer), - "H264_1080P_30FPS_1_LAYER" => Ok(IngressVideoEncodingPreset::H2641080p30fps1Layer), - "H264_720P_30FPS_3_LAYERS_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H264720p30fps3LayersHighMotion), - "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H2641080p30fps3LayersHighMotion), - "H264_540P_25FPS_2_LAYERS_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H264540p25fps2LayersHighMotion), - "H264_720P_30FPS_1_LAYER_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H264720p30fps1LayerHighMotion), - "H264_1080P_30FPS_1_LAYER_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H2641080p30fps1LayerHighMotion), + "RTMP_INPUT" => Ok(IngressInput::RtmpInput), + "WHIP_INPUT" => Ok(IngressInput::WhipInput), + "URL_INPUT" => Ok(IngressInput::UrlInput), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -9698,7 +10038,7 @@ impl<'de> serde::Deserialize<'de> for IngressVideoEncodingPreset { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for IngressVideoOptions { +impl serde::Serialize for IngressState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9706,65 +10046,121 @@ impl serde::Serialize for IngressVideoOptions { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.name.is_empty() { + if self.status != 0 { len += 1; } - if self.source != 0 { + if !self.error.is_empty() { len += 1; } - if self.encoding_options.is_some() { + if self.video.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.IngressVideoOptions", len)?; - if !self.name.is_empty() { - struct_ser.serialize_field("name", &self.name)?; + if self.audio.is_some() { + len += 1; } - if self.source != 0 { - let v = TrackSource::try_from(self.source) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.source)))?; - struct_ser.serialize_field("source", &v)?; + if !self.room_id.is_empty() { + len += 1; } - if let Some(v) = self.encoding_options.as_ref() { - match v { - ingress_video_options::EncodingOptions::Preset(v) => { - let v = IngressVideoEncodingPreset::try_from(*v) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?; - struct_ser.serialize_field("preset", &v)?; - } - ingress_video_options::EncodingOptions::Options(v) => { - struct_ser.serialize_field("options", v)?; - } - } + if self.started_at != 0 { + len += 1; + } + if self.ended_at != 0 { + len += 1; + } + if self.updated_at != 0 { + len += 1; + } + if !self.resource_id.is_empty() { + len += 1; + } + if !self.tracks.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.IngressState", len)?; + if self.status != 0 { + let v = ingress_state::Status::try_from(self.status) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.status)))?; + struct_ser.serialize_field("status", &v)?; + } + if !self.error.is_empty() { + struct_ser.serialize_field("error", &self.error)?; + } + if let Some(v) = self.video.as_ref() { + struct_ser.serialize_field("video", v)?; + } + if let Some(v) = self.audio.as_ref() { + struct_ser.serialize_field("audio", v)?; + } + if !self.room_id.is_empty() { + struct_ser.serialize_field("roomId", &self.room_id)?; + } + if self.started_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + } + if self.ended_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + } + if self.updated_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("updatedAt", ToString::to_string(&self.updated_at).as_str())?; + } + if !self.resource_id.is_empty() { + struct_ser.serialize_field("resourceId", &self.resource_id)?; + } + if !self.tracks.is_empty() { + struct_ser.serialize_field("tracks", &self.tracks)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for IngressVideoOptions { +impl<'de> serde::Deserialize<'de> for IngressState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "name", - "source", - "preset", - "options", + "status", + "error", + "video", + "audio", + "room_id", + "roomId", + "started_at", + "startedAt", + "ended_at", + "endedAt", + "updated_at", + "updatedAt", + "resource_id", + "resourceId", + "tracks", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Name, - Source, - Preset, - Options, - __SkipField__, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { + Status, + Error, + Video, + Audio, + RoomId, + StartedAt, + EndedAt, + UpdatedAt, + ResourceId, + Tracks, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { @@ -9780,10 +10176,16 @@ impl<'de> serde::Deserialize<'de> for IngressVideoOptions { E: serde::de::Error, { match value { - "name" => Ok(GeneratedField::Name), - "source" => Ok(GeneratedField::Source), - "preset" => Ok(GeneratedField::Preset), - "options" => Ok(GeneratedField::Options), + "status" => Ok(GeneratedField::Status), + "error" => Ok(GeneratedField::Error), + "video" => Ok(GeneratedField::Video), + "audio" => Ok(GeneratedField::Audio), + "roomId" | "room_id" => Ok(GeneratedField::RoomId), + "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), + "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), + "updatedAt" | "updated_at" => Ok(GeneratedField::UpdatedAt), + "resourceId" | "resource_id" => Ok(GeneratedField::ResourceId), + "tracks" => Ok(GeneratedField::Tracks), _ => Ok(GeneratedField::__SkipField__), } } @@ -9793,62 +10195,197 @@ impl<'de> serde::Deserialize<'de> for IngressVideoOptions { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = IngressVideoOptions; + type Value = IngressState; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.IngressVideoOptions") + formatter.write_str("struct livekit.IngressState") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut name__ = None; - let mut source__ = None; - let mut encoding_options__ = None; + let mut status__ = None; + let mut error__ = None; + let mut video__ = None; + let mut audio__ = None; + let mut room_id__ = None; + let mut started_at__ = None; + let mut ended_at__ = None; + let mut updated_at__ = None; + let mut resource_id__ = None; + let mut tracks__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); } - name__ = Some(map_.next_value()?); + status__ = Some(map_.next_value::()? as i32); } - GeneratedField::Source => { - if source__.is_some() { - return Err(serde::de::Error::duplicate_field("source")); + GeneratedField::Error => { + if error__.is_some() { + return Err(serde::de::Error::duplicate_field("error")); } - source__ = Some(map_.next_value::()? as i32); + error__ = Some(map_.next_value()?); } - GeneratedField::Preset => { - if encoding_options__.is_some() { - return Err(serde::de::Error::duplicate_field("preset")); + GeneratedField::Video => { + if video__.is_some() { + return Err(serde::de::Error::duplicate_field("video")); } - encoding_options__ = map_.next_value::<::std::option::Option>()?.map(|x| ingress_video_options::EncodingOptions::Preset(x as i32)); + video__ = map_.next_value()?; } - GeneratedField::Options => { - if encoding_options__.is_some() { - return Err(serde::de::Error::duplicate_field("options")); + GeneratedField::Audio => { + if audio__.is_some() { + return Err(serde::de::Error::duplicate_field("audio")); } - encoding_options__ = map_.next_value::<::std::option::Option<_>>()?.map(ingress_video_options::EncodingOptions::Options) -; + audio__ = map_.next_value()?; + } + GeneratedField::RoomId => { + if room_id__.is_some() { + return Err(serde::de::Error::duplicate_field("roomId")); + } + room_id__ = Some(map_.next_value()?); + } + GeneratedField::StartedAt => { + if started_at__.is_some() { + return Err(serde::de::Error::duplicate_field("startedAt")); + } + started_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::EndedAt => { + if ended_at__.is_some() { + return Err(serde::de::Error::duplicate_field("endedAt")); + } + ended_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::UpdatedAt => { + if updated_at__.is_some() { + return Err(serde::de::Error::duplicate_field("updatedAt")); + } + updated_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ResourceId => { + if resource_id__.is_some() { + return Err(serde::de::Error::duplicate_field("resourceId")); + } + resource_id__ = Some(map_.next_value()?); + } + GeneratedField::Tracks => { + if tracks__.is_some() { + return Err(serde::de::Error::duplicate_field("tracks")); + } + tracks__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(IngressVideoOptions { - name: name__.unwrap_or_default(), - source: source__.unwrap_or_default(), - encoding_options: encoding_options__, + Ok(IngressState { + status: status__.unwrap_or_default(), + error: error__.unwrap_or_default(), + video: video__, + audio: audio__, + room_id: room_id__.unwrap_or_default(), + started_at: started_at__.unwrap_or_default(), + ended_at: ended_at__.unwrap_or_default(), + updated_at: updated_at__.unwrap_or_default(), + resource_id: resource_id__.unwrap_or_default(), + tracks: tracks__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.IngressVideoOptions", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.IngressState", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for InputAudioState { +impl serde::Serialize for ingress_state::Status { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::EndpointInactive => "ENDPOINT_INACTIVE", + Self::EndpointBuffering => "ENDPOINT_BUFFERING", + Self::EndpointPublishing => "ENDPOINT_PUBLISHING", + Self::EndpointError => "ENDPOINT_ERROR", + Self::EndpointComplete => "ENDPOINT_COMPLETE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ingress_state::Status { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "ENDPOINT_INACTIVE", + "ENDPOINT_BUFFERING", + "ENDPOINT_PUBLISHING", + "ENDPOINT_ERROR", + "ENDPOINT_COMPLETE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ingress_state::Status; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "ENDPOINT_INACTIVE" => Ok(ingress_state::Status::EndpointInactive), + "ENDPOINT_BUFFERING" => Ok(ingress_state::Status::EndpointBuffering), + "ENDPOINT_PUBLISHING" => Ok(ingress_state::Status::EndpointPublishing), + "ENDPOINT_ERROR" => Ok(ingress_state::Status::EndpointError), + "ENDPOINT_COMPLETE" => Ok(ingress_state::Status::EndpointComplete), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for IngressVideoEncodingOptions { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -9856,56 +10393,49 @@ impl serde::Serialize for InputAudioState { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.mime_type.is_empty() { - len += 1; - } - if self.average_bitrate != 0 { + if self.video_codec != 0 { len += 1; } - if self.channels != 0 { + if self.frame_rate != 0. { len += 1; } - if self.sample_rate != 0 { + if !self.layers.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.InputAudioState", len)?; - if !self.mime_type.is_empty() { - struct_ser.serialize_field("mimeType", &self.mime_type)?; - } - if self.average_bitrate != 0 { - struct_ser.serialize_field("averageBitrate", &self.average_bitrate)?; + let mut struct_ser = serializer.serialize_struct("livekit.IngressVideoEncodingOptions", len)?; + if self.video_codec != 0 { + let v = VideoCodec::try_from(self.video_codec) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.video_codec)))?; + struct_ser.serialize_field("videoCodec", &v)?; } - if self.channels != 0 { - struct_ser.serialize_field("channels", &self.channels)?; + if self.frame_rate != 0. { + struct_ser.serialize_field("frameRate", &self.frame_rate)?; } - if self.sample_rate != 0 { - struct_ser.serialize_field("sampleRate", &self.sample_rate)?; + if !self.layers.is_empty() { + struct_ser.serialize_field("layers", &self.layers)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for InputAudioState { +impl<'de> serde::Deserialize<'de> for IngressVideoEncodingOptions { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "mime_type", - "mimeType", - "average_bitrate", - "averageBitrate", - "channels", - "sample_rate", - "sampleRate", + "video_codec", + "videoCodec", + "frame_rate", + "frameRate", + "layers", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - MimeType, - AverageBitrate, - Channels, - SampleRate, + VideoCodec, + FrameRate, + Layers, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -9928,10 +10458,9 @@ impl<'de> serde::Deserialize<'de> for InputAudioState { E: serde::de::Error, { match value { - "mimeType" | "mime_type" => Ok(GeneratedField::MimeType), - "averageBitrate" | "average_bitrate" => Ok(GeneratedField::AverageBitrate), - "channels" => Ok(GeneratedField::Channels), - "sampleRate" | "sample_rate" => Ok(GeneratedField::SampleRate), + "videoCodec" | "video_codec" => Ok(GeneratedField::VideoCodec), + "frameRate" | "frame_rate" => Ok(GeneratedField::FrameRate), + "layers" => Ok(GeneratedField::Layers), _ => Ok(GeneratedField::__SkipField__), } } @@ -9941,69 +10470,152 @@ impl<'de> serde::Deserialize<'de> for InputAudioState { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InputAudioState; + type Value = IngressVideoEncodingOptions; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.InputAudioState") + formatter.write_str("struct livekit.IngressVideoEncodingOptions") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut mime_type__ = None; - let mut average_bitrate__ = None; - let mut channels__ = None; - let mut sample_rate__ = None; + let mut video_codec__ = None; + let mut frame_rate__ = None; + let mut layers__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::MimeType => { - if mime_type__.is_some() { - return Err(serde::de::Error::duplicate_field("mimeType")); - } - mime_type__ = Some(map_.next_value()?); - } - GeneratedField::AverageBitrate => { - if average_bitrate__.is_some() { - return Err(serde::de::Error::duplicate_field("averageBitrate")); + GeneratedField::VideoCodec => { + if video_codec__.is_some() { + return Err(serde::de::Error::duplicate_field("videoCodec")); } - average_bitrate__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + video_codec__ = Some(map_.next_value::()? as i32); } - GeneratedField::Channels => { - if channels__.is_some() { - return Err(serde::de::Error::duplicate_field("channels")); + GeneratedField::FrameRate => { + if frame_rate__.is_some() { + return Err(serde::de::Error::duplicate_field("frameRate")); } - channels__ = + frame_rate__ = Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::SampleRate => { - if sample_rate__.is_some() { - return Err(serde::de::Error::duplicate_field("sampleRate")); + GeneratedField::Layers => { + if layers__.is_some() { + return Err(serde::de::Error::duplicate_field("layers")); } - sample_rate__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + layers__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(InputAudioState { - mime_type: mime_type__.unwrap_or_default(), - average_bitrate: average_bitrate__.unwrap_or_default(), - channels: channels__.unwrap_or_default(), - sample_rate: sample_rate__.unwrap_or_default(), + Ok(IngressVideoEncodingOptions { + video_codec: video_codec__.unwrap_or_default(), + frame_rate: frame_rate__.unwrap_or_default(), + layers: layers__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.InputAudioState", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.IngressVideoEncodingOptions", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for InputVideoState { +impl serde::Serialize for IngressVideoEncodingPreset { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::H264720p30fps3Layers => "H264_720P_30FPS_3_LAYERS", + Self::H2641080p30fps3Layers => "H264_1080P_30FPS_3_LAYERS", + Self::H264540p25fps2Layers => "H264_540P_25FPS_2_LAYERS", + Self::H264720p30fps1Layer => "H264_720P_30FPS_1_LAYER", + Self::H2641080p30fps1Layer => "H264_1080P_30FPS_1_LAYER", + Self::H264720p30fps3LayersHighMotion => "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", + Self::H2641080p30fps3LayersHighMotion => "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", + Self::H264540p25fps2LayersHighMotion => "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", + Self::H264720p30fps1LayerHighMotion => "H264_720P_30FPS_1_LAYER_HIGH_MOTION", + Self::H2641080p30fps1LayerHighMotion => "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for IngressVideoEncodingPreset { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "H264_720P_30FPS_3_LAYERS", + "H264_1080P_30FPS_3_LAYERS", + "H264_540P_25FPS_2_LAYERS", + "H264_720P_30FPS_1_LAYER", + "H264_1080P_30FPS_1_LAYER", + "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", + "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", + "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", + "H264_720P_30FPS_1_LAYER_HIGH_MOTION", + "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = IngressVideoEncodingPreset; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "H264_720P_30FPS_3_LAYERS" => Ok(IngressVideoEncodingPreset::H264720p30fps3Layers), + "H264_1080P_30FPS_3_LAYERS" => Ok(IngressVideoEncodingPreset::H2641080p30fps3Layers), + "H264_540P_25FPS_2_LAYERS" => Ok(IngressVideoEncodingPreset::H264540p25fps2Layers), + "H264_720P_30FPS_1_LAYER" => Ok(IngressVideoEncodingPreset::H264720p30fps1Layer), + "H264_1080P_30FPS_1_LAYER" => Ok(IngressVideoEncodingPreset::H2641080p30fps1Layer), + "H264_720P_30FPS_3_LAYERS_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H264720p30fps3LayersHighMotion), + "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H2641080p30fps3LayersHighMotion), + "H264_540P_25FPS_2_LAYERS_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H264540p25fps2LayersHighMotion), + "H264_720P_30FPS_1_LAYER_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H264720p30fps1LayerHighMotion), + "H264_1080P_30FPS_1_LAYER_HIGH_MOTION" => Ok(IngressVideoEncodingPreset::H2641080p30fps1LayerHighMotion), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for IngressVideoOptions { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10011,63 +10623,58 @@ impl serde::Serialize for InputVideoState { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.mime_type.is_empty() { - len += 1; - } - if self.average_bitrate != 0 { - len += 1; - } - if self.width != 0 { + if !self.name.is_empty() { len += 1; } - if self.height != 0 { + if self.source != 0 { len += 1; } - if self.framerate != 0. { + if self.encoding_options.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.InputVideoState", len)?; - if !self.mime_type.is_empty() { - struct_ser.serialize_field("mimeType", &self.mime_type)?; - } - if self.average_bitrate != 0 { - struct_ser.serialize_field("averageBitrate", &self.average_bitrate)?; - } - if self.width != 0 { - struct_ser.serialize_field("width", &self.width)?; + let mut struct_ser = serializer.serialize_struct("livekit.IngressVideoOptions", len)?; + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; } - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; + if self.source != 0 { + let v = TrackSource::try_from(self.source) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.source)))?; + struct_ser.serialize_field("source", &v)?; } - if self.framerate != 0. { - struct_ser.serialize_field("framerate", &self.framerate)?; + if let Some(v) = self.encoding_options.as_ref() { + match v { + ingress_video_options::EncodingOptions::Preset(v) => { + let v = IngressVideoEncodingPreset::try_from(*v) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("preset", &v)?; + } + ingress_video_options::EncodingOptions::Options(v) => { + struct_ser.serialize_field("options", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for InputVideoState { +impl<'de> serde::Deserialize<'de> for IngressVideoOptions { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "mime_type", - "mimeType", - "average_bitrate", - "averageBitrate", - "width", - "height", - "framerate", + "name", + "source", + "preset", + "options", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - MimeType, - AverageBitrate, - Width, - Height, - Framerate, + Name, + Source, + Preset, + Options, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10090,11 +10697,10 @@ impl<'de> serde::Deserialize<'de> for InputVideoState { E: serde::de::Error, { match value { - "mimeType" | "mime_type" => Ok(GeneratedField::MimeType), - "averageBitrate" | "average_bitrate" => Ok(GeneratedField::AverageBitrate), - "width" => Ok(GeneratedField::Width), - "height" => Ok(GeneratedField::Height), - "framerate" => Ok(GeneratedField::Framerate), + "name" => Ok(GeneratedField::Name), + "source" => Ok(GeneratedField::Source), + "preset" => Ok(GeneratedField::Preset), + "options" => Ok(GeneratedField::Options), _ => Ok(GeneratedField::__SkipField__), } } @@ -10104,79 +10710,62 @@ impl<'de> serde::Deserialize<'de> for InputVideoState { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = InputVideoState; + type Value = IngressVideoOptions; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.InputVideoState") + formatter.write_str("struct livekit.IngressVideoOptions") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut mime_type__ = None; - let mut average_bitrate__ = None; - let mut width__ = None; - let mut height__ = None; - let mut framerate__ = None; + let mut name__ = None; + let mut source__ = None; + let mut encoding_options__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::MimeType => { - if mime_type__.is_some() { - return Err(serde::de::Error::duplicate_field("mimeType")); - } - mime_type__ = Some(map_.next_value()?); - } - GeneratedField::AverageBitrate => { - if average_bitrate__.is_some() { - return Err(serde::de::Error::duplicate_field("averageBitrate")); + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); } - average_bitrate__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + name__ = Some(map_.next_value()?); } - GeneratedField::Width => { - if width__.is_some() { - return Err(serde::de::Error::duplicate_field("width")); + GeneratedField::Source => { + if source__.is_some() { + return Err(serde::de::Error::duplicate_field("source")); } - width__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + source__ = Some(map_.next_value::()? as i32); } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); + GeneratedField::Preset => { + if encoding_options__.is_some() { + return Err(serde::de::Error::duplicate_field("preset")); } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + encoding_options__ = map_.next_value::<::std::option::Option>()?.map(|x| ingress_video_options::EncodingOptions::Preset(x as i32)); } - GeneratedField::Framerate => { - if framerate__.is_some() { - return Err(serde::de::Error::duplicate_field("framerate")); + GeneratedField::Options => { + if encoding_options__.is_some() { + return Err(serde::de::Error::duplicate_field("options")); } - framerate__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + encoding_options__ = map_.next_value::<::std::option::Option<_>>()?.map(ingress_video_options::EncodingOptions::Options) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(InputVideoState { - mime_type: mime_type__.unwrap_or_default(), - average_bitrate: average_bitrate__.unwrap_or_default(), - width: width__.unwrap_or_default(), - height: height__.unwrap_or_default(), - framerate: framerate__.unwrap_or_default(), + Ok(IngressVideoOptions { + name: name__.unwrap_or_default(), + source: source__.unwrap_or_default(), + encoding_options: encoding_options__, }) } } - deserializer.deserialize_struct("livekit.InputVideoState", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.IngressVideoOptions", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for Job { +impl serde::Serialize for InputAudioState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10184,97 +10773,56 @@ impl serde::Serialize for Job { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.id.is_empty() { - len += 1; - } - if !self.dispatch_id.is_empty() { - len += 1; - } - if self.r#type != 0 { - len += 1; - } - if self.room.is_some() { - len += 1; - } - if self.participant.is_some() { - len += 1; - } - if !self.namespace.is_empty() { + if !self.mime_type.is_empty() { len += 1; } - if !self.metadata.is_empty() { + if self.average_bitrate != 0 { len += 1; } - if !self.agent_name.is_empty() { + if self.channels != 0 { len += 1; } - if self.state.is_some() { + if self.sample_rate != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.Job", len)?; - if !self.id.is_empty() { - struct_ser.serialize_field("id", &self.id)?; - } - if !self.dispatch_id.is_empty() { - struct_ser.serialize_field("dispatchId", &self.dispatch_id)?; - } - if self.r#type != 0 { - let v = JobType::try_from(self.r#type) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; - struct_ser.serialize_field("type", &v)?; - } - if let Some(v) = self.room.as_ref() { - struct_ser.serialize_field("room", v)?; - } - if let Some(v) = self.participant.as_ref() { - struct_ser.serialize_field("participant", v)?; - } - if !self.namespace.is_empty() { - struct_ser.serialize_field("namespace", &self.namespace)?; + let mut struct_ser = serializer.serialize_struct("livekit.InputAudioState", len)?; + if !self.mime_type.is_empty() { + struct_ser.serialize_field("mimeType", &self.mime_type)?; } - if !self.metadata.is_empty() { - struct_ser.serialize_field("metadata", &self.metadata)?; + if self.average_bitrate != 0 { + struct_ser.serialize_field("averageBitrate", &self.average_bitrate)?; } - if !self.agent_name.is_empty() { - struct_ser.serialize_field("agentName", &self.agent_name)?; + if self.channels != 0 { + struct_ser.serialize_field("channels", &self.channels)?; } - if let Some(v) = self.state.as_ref() { - struct_ser.serialize_field("state", v)?; + if self.sample_rate != 0 { + struct_ser.serialize_field("sampleRate", &self.sample_rate)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for Job { +impl<'de> serde::Deserialize<'de> for InputAudioState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "id", - "dispatch_id", - "dispatchId", - "type", - "room", - "participant", - "namespace", - "metadata", - "agent_name", - "agentName", - "state", + "mime_type", + "mimeType", + "average_bitrate", + "averageBitrate", + "channels", + "sample_rate", + "sampleRate", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Id, - DispatchId, - Type, - Room, - Participant, - Namespace, - Metadata, - AgentName, - State, + MimeType, + AverageBitrate, + Channels, + SampleRate, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10297,15 +10845,10 @@ impl<'de> serde::Deserialize<'de> for Job { E: serde::de::Error, { match value { - "id" => Ok(GeneratedField::Id), - "dispatchId" | "dispatch_id" => Ok(GeneratedField::DispatchId), - "type" => Ok(GeneratedField::Type), - "room" => Ok(GeneratedField::Room), - "participant" => Ok(GeneratedField::Participant), - "namespace" => Ok(GeneratedField::Namespace), - "metadata" => Ok(GeneratedField::Metadata), - "agentName" | "agent_name" => Ok(GeneratedField::AgentName), - "state" => Ok(GeneratedField::State), + "mimeType" | "mime_type" => Ok(GeneratedField::MimeType), + "averageBitrate" | "average_bitrate" => Ok(GeneratedField::AverageBitrate), + "channels" => Ok(GeneratedField::Channels), + "sampleRate" | "sample_rate" => Ok(GeneratedField::SampleRate), _ => Ok(GeneratedField::__SkipField__), } } @@ -10315,103 +10858,69 @@ impl<'de> serde::Deserialize<'de> for Job { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Job; + type Value = InputAudioState; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.Job") + formatter.write_str("struct livekit.InputAudioState") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut id__ = None; - let mut dispatch_id__ = None; - let mut r#type__ = None; - let mut room__ = None; - let mut participant__ = None; - let mut namespace__ = None; - let mut metadata__ = None; - let mut agent_name__ = None; - let mut state__ = None; + let mut mime_type__ = None; + let mut average_bitrate__ = None; + let mut channels__ = None; + let mut sample_rate__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = Some(map_.next_value()?); - } - GeneratedField::DispatchId => { - if dispatch_id__.is_some() { - return Err(serde::de::Error::duplicate_field("dispatchId")); - } - dispatch_id__ = Some(map_.next_value()?); - } - GeneratedField::Type => { - if r#type__.is_some() { - return Err(serde::de::Error::duplicate_field("type")); + GeneratedField::MimeType => { + if mime_type__.is_some() { + return Err(serde::de::Error::duplicate_field("mimeType")); } - r#type__ = Some(map_.next_value::()? as i32); + mime_type__ = Some(map_.next_value()?); } - GeneratedField::Room => { - if room__.is_some() { - return Err(serde::de::Error::duplicate_field("room")); + GeneratedField::AverageBitrate => { + if average_bitrate__.is_some() { + return Err(serde::de::Error::duplicate_field("averageBitrate")); } - room__ = map_.next_value()?; + average_bitrate__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Participant => { - if participant__.is_some() { - return Err(serde::de::Error::duplicate_field("participant")); + GeneratedField::Channels => { + if channels__.is_some() { + return Err(serde::de::Error::duplicate_field("channels")); } - participant__ = map_.next_value()?; + channels__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Namespace => { - if namespace__.is_some() { - return Err(serde::de::Error::duplicate_field("namespace")); + GeneratedField::SampleRate => { + if sample_rate__.is_some() { + return Err(serde::de::Error::duplicate_field("sampleRate")); } - namespace__ = Some(map_.next_value()?); + sample_rate__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some(map_.next_value()?); - } - GeneratedField::AgentName => { - if agent_name__.is_some() { - return Err(serde::de::Error::duplicate_field("agentName")); - } - agent_name__ = Some(map_.next_value()?); - } - GeneratedField::State => { - if state__.is_some() { - return Err(serde::de::Error::duplicate_field("state")); - } - state__ = map_.next_value()?; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; } } } - Ok(Job { - id: id__.unwrap_or_default(), - dispatch_id: dispatch_id__.unwrap_or_default(), - r#type: r#type__.unwrap_or_default(), - room: room__, - participant: participant__, - namespace: namespace__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - agent_name: agent_name__.unwrap_or_default(), - state: state__, + Ok(InputAudioState { + mime_type: mime_type__.unwrap_or_default(), + average_bitrate: average_bitrate__.unwrap_or_default(), + channels: channels__.unwrap_or_default(), + sample_rate: sample_rate__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.Job", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.InputAudioState", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for JobAssignment { +impl serde::Serialize for InputVideoState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10419,45 +10928,63 @@ impl serde::Serialize for JobAssignment { { use serde::ser::SerializeStruct; let mut len = 0; - if self.job.is_some() { + if !self.mime_type.is_empty() { len += 1; } - if self.url.is_some() { + if self.average_bitrate != 0 { len += 1; } - if !self.token.is_empty() { + if self.width != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.JobAssignment", len)?; - if let Some(v) = self.job.as_ref() { - struct_ser.serialize_field("job", v)?; + if self.height != 0 { + len += 1; } - if let Some(v) = self.url.as_ref() { - struct_ser.serialize_field("url", v)?; + if self.framerate != 0. { + len += 1; } - if !self.token.is_empty() { - struct_ser.serialize_field("token", &self.token)?; + let mut struct_ser = serializer.serialize_struct("livekit.InputVideoState", len)?; + if !self.mime_type.is_empty() { + struct_ser.serialize_field("mimeType", &self.mime_type)?; + } + if self.average_bitrate != 0 { + struct_ser.serialize_field("averageBitrate", &self.average_bitrate)?; + } + if self.width != 0 { + struct_ser.serialize_field("width", &self.width)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if self.framerate != 0. { + struct_ser.serialize_field("framerate", &self.framerate)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for JobAssignment { +impl<'de> serde::Deserialize<'de> for InputVideoState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "job", - "url", - "token", + "mime_type", + "mimeType", + "average_bitrate", + "averageBitrate", + "width", + "height", + "framerate", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Job, - Url, - Token, + MimeType, + AverageBitrate, + Width, + Height, + Framerate, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10480,9 +11007,11 @@ impl<'de> serde::Deserialize<'de> for JobAssignment { E: serde::de::Error, { match value { - "job" => Ok(GeneratedField::Job), - "url" => Ok(GeneratedField::Url), - "token" => Ok(GeneratedField::Token), + "mimeType" | "mime_type" => Ok(GeneratedField::MimeType), + "averageBitrate" | "average_bitrate" => Ok(GeneratedField::AverageBitrate), + "width" => Ok(GeneratedField::Width), + "height" => Ok(GeneratedField::Height), + "framerate" => Ok(GeneratedField::Framerate), _ => Ok(GeneratedField::__SkipField__), } } @@ -10492,55 +11021,79 @@ impl<'de> serde::Deserialize<'de> for JobAssignment { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = JobAssignment; + type Value = InputVideoState; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.JobAssignment") + formatter.write_str("struct livekit.InputVideoState") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut job__ = None; - let mut url__ = None; - let mut token__ = None; + let mut mime_type__ = None; + let mut average_bitrate__ = None; + let mut width__ = None; + let mut height__ = None; + let mut framerate__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Job => { - if job__.is_some() { - return Err(serde::de::Error::duplicate_field("job")); + GeneratedField::MimeType => { + if mime_type__.is_some() { + return Err(serde::de::Error::duplicate_field("mimeType")); } - job__ = map_.next_value()?; + mime_type__ = Some(map_.next_value()?); } - GeneratedField::Url => { - if url__.is_some() { - return Err(serde::de::Error::duplicate_field("url")); + GeneratedField::AverageBitrate => { + if average_bitrate__.is_some() { + return Err(serde::de::Error::duplicate_field("averageBitrate")); } - url__ = map_.next_value()?; + average_bitrate__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Token => { - if token__.is_some() { - return Err(serde::de::Error::duplicate_field("token")); + GeneratedField::Width => { + if width__.is_some() { + return Err(serde::de::Error::duplicate_field("width")); } - token__ = Some(map_.next_value()?); + width__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Framerate => { + if framerate__.is_some() { + return Err(serde::de::Error::duplicate_field("framerate")); + } + framerate__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(JobAssignment { - job: job__, - url: url__, - token: token__.unwrap_or_default(), + Ok(InputVideoState { + mime_type: mime_type__.unwrap_or_default(), + average_bitrate: average_bitrate__.unwrap_or_default(), + width: width__.unwrap_or_default(), + height: height__.unwrap_or_default(), + framerate: framerate__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.JobAssignment", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.InputVideoState", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for JobState { +impl serde::Serialize for Job { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10548,81 +11101,97 @@ impl serde::Serialize for JobState { { use serde::ser::SerializeStruct; let mut len = 0; - if self.status != 0 { + if !self.id.is_empty() { len += 1; } - if !self.error.is_empty() { + if !self.dispatch_id.is_empty() { len += 1; } - if self.started_at != 0 { + if self.r#type != 0 { len += 1; } - if self.ended_at != 0 { + if self.room.is_some() { len += 1; } - if self.updated_at != 0 { + if self.participant.is_some() { len += 1; } - if !self.participant_identity.is_empty() { + if !self.namespace.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.JobState", len)?; - if self.status != 0 { - let v = JobStatus::try_from(self.status) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.status)))?; - struct_ser.serialize_field("status", &v)?; + if !self.metadata.is_empty() { + len += 1; } - if !self.error.is_empty() { - struct_ser.serialize_field("error", &self.error)?; + if !self.agent_name.is_empty() { + len += 1; } - if self.started_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + if self.state.is_some() { + len += 1; } - if self.ended_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + let mut struct_ser = serializer.serialize_struct("livekit.Job", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; } - if self.updated_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("updatedAt", ToString::to_string(&self.updated_at).as_str())?; + if !self.dispatch_id.is_empty() { + struct_ser.serialize_field("dispatchId", &self.dispatch_id)?; } - if !self.participant_identity.is_empty() { - struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + if self.r#type != 0 { + let v = JobType::try_from(self.r#type) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; + struct_ser.serialize_field("type", &v)?; + } + if let Some(v) = self.room.as_ref() { + struct_ser.serialize_field("room", v)?; + } + if let Some(v) = self.participant.as_ref() { + struct_ser.serialize_field("participant", v)?; + } + if !self.namespace.is_empty() { + struct_ser.serialize_field("namespace", &self.namespace)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if !self.agent_name.is_empty() { + struct_ser.serialize_field("agentName", &self.agent_name)?; + } + if let Some(v) = self.state.as_ref() { + struct_ser.serialize_field("state", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for JobState { +impl<'de> serde::Deserialize<'de> for Job { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "status", - "error", - "started_at", - "startedAt", - "ended_at", - "endedAt", - "updated_at", - "updatedAt", - "participant_identity", - "participantIdentity", + "id", + "dispatch_id", + "dispatchId", + "type", + "room", + "participant", + "namespace", + "metadata", + "agent_name", + "agentName", + "state", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Status, - Error, - StartedAt, - EndedAt, - UpdatedAt, - ParticipantIdentity, + Id, + DispatchId, + Type, + Room, + Participant, + Namespace, + Metadata, + AgentName, + State, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10645,12 +11214,15 @@ impl<'de> serde::Deserialize<'de> for JobState { E: serde::de::Error, { match value { - "status" => Ok(GeneratedField::Status), - "error" => Ok(GeneratedField::Error), - "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), - "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), - "updatedAt" | "updated_at" => Ok(GeneratedField::UpdatedAt), - "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "id" => Ok(GeneratedField::Id), + "dispatchId" | "dispatch_id" => Ok(GeneratedField::DispatchId), + "type" => Ok(GeneratedField::Type), + "room" => Ok(GeneratedField::Room), + "participant" => Ok(GeneratedField::Participant), + "namespace" => Ok(GeneratedField::Namespace), + "metadata" => Ok(GeneratedField::Metadata), + "agentName" | "agent_name" => Ok(GeneratedField::AgentName), + "state" => Ok(GeneratedField::State), _ => Ok(GeneratedField::__SkipField__), } } @@ -10660,162 +11232,103 @@ impl<'de> serde::Deserialize<'de> for JobState { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = JobState; + type Value = Job; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.JobState") + formatter.write_str("struct livekit.Job") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut status__ = None; - let mut error__ = None; - let mut started_at__ = None; - let mut ended_at__ = None; - let mut updated_at__ = None; - let mut participant_identity__ = None; + let mut id__ = None; + let mut dispatch_id__ = None; + let mut r#type__ = None; + let mut room__ = None; + let mut participant__ = None; + let mut namespace__ = None; + let mut metadata__ = None; + let mut agent_name__ = None; + let mut state__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); } - status__ = Some(map_.next_value::()? as i32); + id__ = Some(map_.next_value()?); } - GeneratedField::Error => { - if error__.is_some() { - return Err(serde::de::Error::duplicate_field("error")); + GeneratedField::DispatchId => { + if dispatch_id__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatchId")); } - error__ = Some(map_.next_value()?); + dispatch_id__ = Some(map_.next_value()?); } - GeneratedField::StartedAt => { - if started_at__.is_some() { - return Err(serde::de::Error::duplicate_field("startedAt")); + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); } - started_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + r#type__ = Some(map_.next_value::()? as i32); } - GeneratedField::EndedAt => { - if ended_at__.is_some() { - return Err(serde::de::Error::duplicate_field("endedAt")); + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); } - ended_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + room__ = map_.next_value()?; } - GeneratedField::UpdatedAt => { - if updated_at__.is_some() { - return Err(serde::de::Error::duplicate_field("updatedAt")); + GeneratedField::Participant => { + if participant__.is_some() { + return Err(serde::de::Error::duplicate_field("participant")); } - updated_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + participant__ = map_.next_value()?; } - GeneratedField::ParticipantIdentity => { - if participant_identity__.is_some() { - return Err(serde::de::Error::duplicate_field("participantIdentity")); + GeneratedField::Namespace => { + if namespace__.is_some() { + return Err(serde::de::Error::duplicate_field("namespace")); } - participant_identity__ = Some(map_.next_value()?); + namespace__ = Some(map_.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map_.next_value()?); + } + GeneratedField::AgentName => { + if agent_name__.is_some() { + return Err(serde::de::Error::duplicate_field("agentName")); + } + agent_name__ = Some(map_.next_value()?); + } + GeneratedField::State => { + if state__.is_some() { + return Err(serde::de::Error::duplicate_field("state")); + } + state__ = map_.next_value()?; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(JobState { - status: status__.unwrap_or_default(), - error: error__.unwrap_or_default(), - started_at: started_at__.unwrap_or_default(), - ended_at: ended_at__.unwrap_or_default(), - updated_at: updated_at__.unwrap_or_default(), - participant_identity: participant_identity__.unwrap_or_default(), + Ok(Job { + id: id__.unwrap_or_default(), + dispatch_id: dispatch_id__.unwrap_or_default(), + r#type: r#type__.unwrap_or_default(), + room: room__, + participant: participant__, + namespace: namespace__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + agent_name: agent_name__.unwrap_or_default(), + state: state__, }) } } - deserializer.deserialize_struct("livekit.JobState", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for JobStatus { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::JsPending => "JS_PENDING", - Self::JsRunning => "JS_RUNNING", - Self::JsSuccess => "JS_SUCCESS", - Self::JsFailed => "JS_FAILED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for JobStatus { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "JS_PENDING", - "JS_RUNNING", - "JS_SUCCESS", - "JS_FAILED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = JobStatus; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "JS_PENDING" => Ok(JobStatus::JsPending), - "JS_RUNNING" => Ok(JobStatus::JsRunning), - "JS_SUCCESS" => Ok(JobStatus::JsSuccess), - "JS_FAILED" => Ok(JobStatus::JsFailed), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.Job", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for JobTermination { +impl serde::Serialize for JobAssignment { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -10823,30 +11336,45 @@ impl serde::Serialize for JobTermination { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.job_id.is_empty() { + if self.job.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.JobTermination", len)?; - if !self.job_id.is_empty() { - struct_ser.serialize_field("jobId", &self.job_id)?; + if self.url.is_some() { + len += 1; + } + if !self.token.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.JobAssignment", len)?; + if let Some(v) = self.job.as_ref() { + struct_ser.serialize_field("job", v)?; + } + if let Some(v) = self.url.as_ref() { + struct_ser.serialize_field("url", v)?; + } + if !self.token.is_empty() { + struct_ser.serialize_field("token", &self.token)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for JobTermination { +impl<'de> serde::Deserialize<'de> for JobAssignment { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "job_id", - "jobId", + "job", + "url", + "token", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - JobId, + Job, + Url, + Token, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -10869,7 +11397,9 @@ impl<'de> serde::Deserialize<'de> for JobTermination { E: serde::de::Error, { match value { - "jobId" | "job_id" => Ok(GeneratedField::JobId), + "job" => Ok(GeneratedField::Job), + "url" => Ok(GeneratedField::Url), + "token" => Ok(GeneratedField::Token), _ => Ok(GeneratedField::__SkipField__), } } @@ -10879,66 +11409,284 @@ impl<'de> serde::Deserialize<'de> for JobTermination { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = JobTermination; + type Value = JobAssignment; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.JobTermination") + formatter.write_str("struct livekit.JobAssignment") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut job_id__ = None; + let mut job__ = None; + let mut url__ = None; + let mut token__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::JobId => { - if job_id__.is_some() { - return Err(serde::de::Error::duplicate_field("jobId")); + GeneratedField::Job => { + if job__.is_some() { + return Err(serde::de::Error::duplicate_field("job")); } - job_id__ = Some(map_.next_value()?); + job__ = map_.next_value()?; + } + GeneratedField::Url => { + if url__.is_some() { + return Err(serde::de::Error::duplicate_field("url")); + } + url__ = map_.next_value()?; + } + GeneratedField::Token => { + if token__.is_some() { + return Err(serde::de::Error::duplicate_field("token")); + } + token__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(JobTermination { - job_id: job_id__.unwrap_or_default(), + Ok(JobAssignment { + job: job__, + url: url__, + token: token__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.JobTermination", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.JobAssignment", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for JobType { +impl serde::Serialize for JobState { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.status != 0 { + len += 1; + } + if !self.error.is_empty() { + len += 1; + } + if self.started_at != 0 { + len += 1; + } + if self.ended_at != 0 { + len += 1; + } + if self.updated_at != 0 { + len += 1; + } + if !self.participant_identity.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.JobState", len)?; + if self.status != 0 { + let v = JobStatus::try_from(self.status) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.status)))?; + struct_ser.serialize_field("status", &v)?; + } + if !self.error.is_empty() { + struct_ser.serialize_field("error", &self.error)?; + } + if self.started_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + } + if self.ended_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + } + if self.updated_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("updatedAt", ToString::to_string(&self.updated_at).as_str())?; + } + if !self.participant_identity.is_empty() { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for JobState { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "status", + "error", + "started_at", + "startedAt", + "ended_at", + "endedAt", + "updated_at", + "updatedAt", + "participant_identity", + "participantIdentity", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Status, + Error, + StartedAt, + EndedAt, + UpdatedAt, + ParticipantIdentity, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "status" => Ok(GeneratedField::Status), + "error" => Ok(GeneratedField::Error), + "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), + "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), + "updatedAt" | "updated_at" => Ok(GeneratedField::UpdatedAt), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = JobState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.JobState") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut status__ = None; + let mut error__ = None; + let mut started_at__ = None; + let mut ended_at__ = None; + let mut updated_at__ = None; + let mut participant_identity__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = Some(map_.next_value::()? as i32); + } + GeneratedField::Error => { + if error__.is_some() { + return Err(serde::de::Error::duplicate_field("error")); + } + error__ = Some(map_.next_value()?); + } + GeneratedField::StartedAt => { + if started_at__.is_some() { + return Err(serde::de::Error::duplicate_field("startedAt")); + } + started_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::EndedAt => { + if ended_at__.is_some() { + return Err(serde::de::Error::duplicate_field("endedAt")); + } + ended_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::UpdatedAt => { + if updated_at__.is_some() { + return Err(serde::de::Error::duplicate_field("updatedAt")); + } + updated_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(JobState { + status: status__.unwrap_or_default(), + error: error__.unwrap_or_default(), + started_at: started_at__.unwrap_or_default(), + ended_at: ended_at__.unwrap_or_default(), + updated_at: updated_at__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.JobState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for JobStatus { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { let variant = match self { - Self::JtRoom => "JT_ROOM", - Self::JtPublisher => "JT_PUBLISHER", + Self::JsPending => "JS_PENDING", + Self::JsRunning => "JS_RUNNING", + Self::JsSuccess => "JS_SUCCESS", + Self::JsFailed => "JS_FAILED", }; serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for JobType { +impl<'de> serde::Deserialize<'de> for JobStatus { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "JT_ROOM", - "JT_PUBLISHER", + "JS_PENDING", + "JS_RUNNING", + "JS_SUCCESS", + "JS_FAILED", ]; struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = JobType; + type Value = JobStatus; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(formatter, "expected one of: {:?}", &FIELDS) @@ -10973,8 +11721,10 @@ impl<'de> serde::Deserialize<'de> for JobType { E: serde::de::Error, { match value { - "JT_ROOM" => Ok(JobType::JtRoom), - "JT_PUBLISHER" => Ok(JobType::JtPublisher), + "JS_PENDING" => Ok(JobStatus::JsPending), + "JS_RUNNING" => Ok(JobStatus::JsRunning), + "JS_SUCCESS" => Ok(JobStatus::JsSuccess), + "JS_FAILED" => Ok(JobStatus::JsFailed), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -10982,7 +11732,174 @@ impl<'de> serde::Deserialize<'de> for JobType { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for JoinResponse { +impl serde::Serialize for JobTermination { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.job_id.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.JobTermination", len)?; + if !self.job_id.is_empty() { + struct_ser.serialize_field("jobId", &self.job_id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for JobTermination { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "job_id", + "jobId", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + JobId, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "jobId" | "job_id" => Ok(GeneratedField::JobId), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = JobTermination; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.JobTermination") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut job_id__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::JobId => { + if job_id__.is_some() { + return Err(serde::de::Error::duplicate_field("jobId")); + } + job_id__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(JobTermination { + job_id: job_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.JobTermination", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for JobType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::JtRoom => "JT_ROOM", + Self::JtPublisher => "JT_PUBLISHER", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for JobType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "JT_ROOM", + "JT_PUBLISHER", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = JobType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "JT_ROOM" => Ok(JobType::JtRoom), + "JT_PUBLISHER" => Ok(JobType::JtPublisher), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for JoinResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -11029,6 +11946,12 @@ impl serde::Serialize for JoinResponse { if !self.sif_trailer.is_empty() { len += 1; } + if !self.enabled_publish_codecs.is_empty() { + len += 1; + } + if self.fast_publish { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.JoinResponse", len)?; if let Some(v) = self.room.as_ref() { struct_ser.serialize_field("room", v)?; @@ -11071,6 +11994,12 @@ impl serde::Serialize for JoinResponse { #[allow(clippy::needless_borrows_for_generic_args)] struct_ser.serialize_field("sifTrailer", pbjson::private::base64::encode(&self.sif_trailer).as_str())?; } + if !self.enabled_publish_codecs.is_empty() { + struct_ser.serialize_field("enabledPublishCodecs", &self.enabled_publish_codecs)?; + } + if self.fast_publish { + struct_ser.serialize_field("fastPublish", &self.fast_publish)?; + } struct_ser.end() } } @@ -11105,6 +12034,10 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { "serverInfo", "sif_trailer", "sifTrailer", + "enabled_publish_codecs", + "enabledPublishCodecs", + "fast_publish", + "fastPublish", ]; #[allow(clippy::enum_variant_names)] @@ -11122,6 +12055,8 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { PingInterval, ServerInfo, SifTrailer, + EnabledPublishCodecs, + FastPublish, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -11157,6 +12092,8 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { "pingInterval" | "ping_interval" => Ok(GeneratedField::PingInterval), "serverInfo" | "server_info" => Ok(GeneratedField::ServerInfo), "sifTrailer" | "sif_trailer" => Ok(GeneratedField::SifTrailer), + "enabledPublishCodecs" | "enabled_publish_codecs" => Ok(GeneratedField::EnabledPublishCodecs), + "fastPublish" | "fast_publish" => Ok(GeneratedField::FastPublish), _ => Ok(GeneratedField::__SkipField__), } } @@ -11189,6 +12126,8 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { let mut ping_interval__ = None; let mut server_info__ = None; let mut sif_trailer__ = None; + let mut enabled_publish_codecs__ = None; + let mut fast_publish__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Room => { @@ -11275,6 +12214,18 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) ; } + GeneratedField::EnabledPublishCodecs => { + if enabled_publish_codecs__.is_some() { + return Err(serde::de::Error::duplicate_field("enabledPublishCodecs")); + } + enabled_publish_codecs__ = Some(map_.next_value()?); + } + GeneratedField::FastPublish => { + if fast_publish__.is_some() { + return Err(serde::de::Error::duplicate_field("fastPublish")); + } + fast_publish__ = Some(map_.next_value()?); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -11294,6 +12245,8 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { ping_interval: ping_interval__.unwrap_or_default(), server_info: server_info__, sif_trailer: sif_trailer__.unwrap_or_default(), + enabled_publish_codecs: enabled_publish_codecs__.unwrap_or_default(), + fast_publish: fast_publish__.unwrap_or_default(), }) } } @@ -13217,7 +14170,126 @@ impl<'de> serde::Deserialize<'de> for ListSipTrunkResponse { deserializer.deserialize_struct("livekit.ListSIPTrunkResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for MigrateJobRequest { +impl serde::Serialize for MetricLabel { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::AgentsLlmTtft => "AGENTS_LLM_TTFT", + Self::AgentsSttTtft => "AGENTS_STT_TTFT", + Self::AgentsTtsTtfb => "AGENTS_TTS_TTFB", + Self::ClientVideoSubscriberFreezeCount => "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT", + Self::ClientVideoSubscriberTotalFreezeDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION", + Self::ClientVideoSubscriberPauseCount => "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT", + Self::ClientVideoSubscriberTotalPausesDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION", + Self::ClientAudioSubscriberConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES", + Self::ClientAudioSubscriberSilentConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES", + Self::ClientAudioSubscriberConcealmentEvents => "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS", + Self::ClientAudioSubscriberInterruptionCount => "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT", + Self::ClientAudioSubscriberTotalInterruptionDuration => "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION", + Self::ClientSubscriberJitterBufferDelay => "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY", + Self::ClientSubscriberJitterBufferEmittedCount => "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT", + Self::ClientVideoPublisherQualityLimitationDurationBandwidth => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", + Self::ClientVideoPublisherQualityLimitationDurationCpu => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", + Self::ClientVideoPublisherQualityLimitationDurationOther => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", + Self::PredefinedMaxValue => "METRIC_LABEL_PREDEFINED_MAX_VALUE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for MetricLabel { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "AGENTS_LLM_TTFT", + "AGENTS_STT_TTFT", + "AGENTS_TTS_TTFB", + "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT", + "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION", + "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT", + "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION", + "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES", + "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES", + "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS", + "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT", + "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION", + "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY", + "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT", + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", + "METRIC_LABEL_PREDEFINED_MAX_VALUE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MetricLabel; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "AGENTS_LLM_TTFT" => Ok(MetricLabel::AgentsLlmTtft), + "AGENTS_STT_TTFT" => Ok(MetricLabel::AgentsSttTtft), + "AGENTS_TTS_TTFB" => Ok(MetricLabel::AgentsTtsTtfb), + "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT" => Ok(MetricLabel::ClientVideoSubscriberFreezeCount), + "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION" => Ok(MetricLabel::ClientVideoSubscriberTotalFreezeDuration), + "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT" => Ok(MetricLabel::ClientVideoSubscriberPauseCount), + "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION" => Ok(MetricLabel::ClientVideoSubscriberTotalPausesDuration), + "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES" => Ok(MetricLabel::ClientAudioSubscriberConcealedSamples), + "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES" => Ok(MetricLabel::ClientAudioSubscriberSilentConcealedSamples), + "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS" => Ok(MetricLabel::ClientAudioSubscriberConcealmentEvents), + "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT" => Ok(MetricLabel::ClientAudioSubscriberInterruptionCount), + "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION" => Ok(MetricLabel::ClientAudioSubscriberTotalInterruptionDuration), + "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY" => Ok(MetricLabel::ClientSubscriberJitterBufferDelay), + "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT" => Ok(MetricLabel::ClientSubscriberJitterBufferEmittedCount), + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH" => Ok(MetricLabel::ClientVideoPublisherQualityLimitationDurationBandwidth), + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU" => Ok(MetricLabel::ClientVideoPublisherQualityLimitationDurationCpu), + "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER" => Ok(MetricLabel::ClientVideoPublisherQualityLimitationDurationOther), + "METRIC_LABEL_PREDEFINED_MAX_VALUE" => Ok(MetricLabel::PredefinedMaxValue), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for MetricSample { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -13225,25 +14297,333 @@ impl serde::Serialize for MigrateJobRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.job_ids.is_empty() { + if self.timestamp_ms != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.MigrateJobRequest", len)?; - if !self.job_ids.is_empty() { - struct_ser.serialize_field("jobIds", &self.job_ids)?; + if self.normalized_timestamp.is_some() { + len += 1; + } + if self.value != 0. { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.MetricSample", len)?; + if self.timestamp_ms != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("timestampMs", ToString::to_string(&self.timestamp_ms).as_str())?; + } + if let Some(v) = self.normalized_timestamp.as_ref() { + struct_ser.serialize_field("normalizedTimestamp", v)?; + } + if self.value != 0. { + struct_ser.serialize_field("value", &self.value)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for MigrateJobRequest { +impl<'de> serde::Deserialize<'de> for MetricSample { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "job_ids", - "jobIds", + "timestamp_ms", + "timestampMs", + "normalized_timestamp", + "normalizedTimestamp", + "value", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TimestampMs, + NormalizedTimestamp, + Value, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "timestampMs" | "timestamp_ms" => Ok(GeneratedField::TimestampMs), + "normalizedTimestamp" | "normalized_timestamp" => Ok(GeneratedField::NormalizedTimestamp), + "value" => Ok(GeneratedField::Value), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MetricSample; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.MetricSample") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut timestamp_ms__ = None; + let mut normalized_timestamp__ = None; + let mut value__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::TimestampMs => { + if timestamp_ms__.is_some() { + return Err(serde::de::Error::duplicate_field("timestampMs")); + } + timestamp_ms__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::NormalizedTimestamp => { + if normalized_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("normalizedTimestamp")); + } + normalized_timestamp__ = map_.next_value()?; + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(MetricSample { + timestamp_ms: timestamp_ms__.unwrap_or_default(), + normalized_timestamp: normalized_timestamp__, + value: value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.MetricSample", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MetricsBatch { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.timestamp_ms != 0 { + len += 1; + } + if self.normalized_timestamp.is_some() { + len += 1; + } + if !self.str_data.is_empty() { + len += 1; + } + if !self.time_series.is_empty() { + len += 1; + } + if !self.events.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.MetricsBatch", len)?; + if self.timestamp_ms != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("timestampMs", ToString::to_string(&self.timestamp_ms).as_str())?; + } + if let Some(v) = self.normalized_timestamp.as_ref() { + struct_ser.serialize_field("normalizedTimestamp", v)?; + } + if !self.str_data.is_empty() { + struct_ser.serialize_field("strData", &self.str_data)?; + } + if !self.time_series.is_empty() { + struct_ser.serialize_field("timeSeries", &self.time_series)?; + } + if !self.events.is_empty() { + struct_ser.serialize_field("events", &self.events)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MetricsBatch { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "timestamp_ms", + "timestampMs", + "normalized_timestamp", + "normalizedTimestamp", + "str_data", + "strData", + "time_series", + "timeSeries", + "events", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TimestampMs, + NormalizedTimestamp, + StrData, + TimeSeries, + Events, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "timestampMs" | "timestamp_ms" => Ok(GeneratedField::TimestampMs), + "normalizedTimestamp" | "normalized_timestamp" => Ok(GeneratedField::NormalizedTimestamp), + "strData" | "str_data" => Ok(GeneratedField::StrData), + "timeSeries" | "time_series" => Ok(GeneratedField::TimeSeries), + "events" => Ok(GeneratedField::Events), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MetricsBatch; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.MetricsBatch") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut timestamp_ms__ = None; + let mut normalized_timestamp__ = None; + let mut str_data__ = None; + let mut time_series__ = None; + let mut events__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::TimestampMs => { + if timestamp_ms__.is_some() { + return Err(serde::de::Error::duplicate_field("timestampMs")); + } + timestamp_ms__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::NormalizedTimestamp => { + if normalized_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("normalizedTimestamp")); + } + normalized_timestamp__ = map_.next_value()?; + } + GeneratedField::StrData => { + if str_data__.is_some() { + return Err(serde::de::Error::duplicate_field("strData")); + } + str_data__ = Some(map_.next_value()?); + } + GeneratedField::TimeSeries => { + if time_series__.is_some() { + return Err(serde::de::Error::duplicate_field("timeSeries")); + } + time_series__ = Some(map_.next_value()?); + } + GeneratedField::Events => { + if events__.is_some() { + return Err(serde::de::Error::duplicate_field("events")); + } + events__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(MetricsBatch { + timestamp_ms: timestamp_ms__.unwrap_or_default(), + normalized_timestamp: normalized_timestamp__, + str_data: str_data__.unwrap_or_default(), + time_series: time_series__.unwrap_or_default(), + events: events__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.MetricsBatch", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MigrateJobRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.job_ids.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.MigrateJobRequest", len)?; + if !self.job_ids.is_empty() { + struct_ser.serialize_field("jobIds", &self.job_ids)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MigrateJobRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "job_ids", + "jobIds", ]; #[allow(clippy::enum_variant_names)] @@ -14428,6 +15808,9 @@ impl serde::Serialize for ParticipantPermission { if self.agent { len += 1; } + if self.can_subscribe_metrics { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.ParticipantPermission", len)?; if self.can_subscribe { struct_ser.serialize_field("canSubscribe", &self.can_subscribe)?; @@ -14457,6 +15840,9 @@ impl serde::Serialize for ParticipantPermission { if self.agent { struct_ser.serialize_field("agent", &self.agent)?; } + if self.can_subscribe_metrics { + struct_ser.serialize_field("canSubscribeMetrics", &self.can_subscribe_metrics)?; + } struct_ser.end() } } @@ -14480,6 +15866,8 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { "can_update_metadata", "canUpdateMetadata", "agent", + "can_subscribe_metrics", + "canSubscribeMetrics", ]; #[allow(clippy::enum_variant_names)] @@ -14492,6 +15880,7 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { Recorder, CanUpdateMetadata, Agent, + CanSubscribeMetrics, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -14522,6 +15911,7 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { "recorder" => Ok(GeneratedField::Recorder), "canUpdateMetadata" | "can_update_metadata" => Ok(GeneratedField::CanUpdateMetadata), "agent" => Ok(GeneratedField::Agent), + "canSubscribeMetrics" | "can_subscribe_metrics" => Ok(GeneratedField::CanSubscribeMetrics), _ => Ok(GeneratedField::__SkipField__), } } @@ -14549,6 +15939,7 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { let mut recorder__ = None; let mut can_update_metadata__ = None; let mut agent__ = None; + let mut can_subscribe_metrics__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::CanSubscribe => { @@ -14599,6 +15990,12 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { } agent__ = Some(map_.next_value()?); } + GeneratedField::CanSubscribeMetrics => { + if can_subscribe_metrics__.is_some() { + return Err(serde::de::Error::duplicate_field("canSubscribeMetrics")); + } + can_subscribe_metrics__ = Some(map_.next_value()?); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -14613,6 +16010,7 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { recorder: recorder__.unwrap_or_default(), can_update_metadata: can_update_metadata__.unwrap_or_default(), agent: agent__.unwrap_or_default(), + can_subscribe_metrics: can_subscribe_metrics__.unwrap_or_default(), }) } } @@ -15331,7 +16729,7 @@ impl<'de> serde::Deserialize<'de> for ProxyConfig { deserializer.deserialize_struct("livekit.ProxyConfig", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RtpDrift { +impl serde::Serialize for RtcpSenderReportState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -15339,96 +16737,321 @@ impl serde::Serialize for RtpDrift { { use serde::ser::SerializeStruct; let mut len = 0; - if self.start_time.is_some() { - len += 1; - } - if self.end_time.is_some() { - len += 1; - } - if self.duration != 0. { + if self.rtp_timestamp != 0 { len += 1; } - if self.start_timestamp != 0 { + if self.rtp_timestamp_ext != 0 { len += 1; } - if self.end_timestamp != 0 { + if self.ntp_timestamp != 0 { len += 1; } - if self.rtp_clock_ticks != 0 { + if self.at != 0 { len += 1; } - if self.drift_samples != 0 { + if self.at_adjusted != 0 { len += 1; } - if self.drift_ms != 0. { + if self.packets != 0 { len += 1; } - if self.clock_rate != 0. { + if self.octets != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RTPDrift", len)?; - if let Some(v) = self.start_time.as_ref() { - struct_ser.serialize_field("startTime", v)?; - } - if let Some(v) = self.end_time.as_ref() { - struct_ser.serialize_field("endTime", v)?; - } - if self.duration != 0. { - struct_ser.serialize_field("duration", &self.duration)?; + let mut struct_ser = serializer.serialize_struct("livekit.RTCPSenderReportState", len)?; + if self.rtp_timestamp != 0 { + struct_ser.serialize_field("rtpTimestamp", &self.rtp_timestamp)?; } - if self.start_timestamp != 0 { + if self.rtp_timestamp_ext != 0 { #[allow(clippy::needless_borrow)] #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("startTimestamp", ToString::to_string(&self.start_timestamp).as_str())?; + struct_ser.serialize_field("rtpTimestampExt", ToString::to_string(&self.rtp_timestamp_ext).as_str())?; } - if self.end_timestamp != 0 { + if self.ntp_timestamp != 0 { #[allow(clippy::needless_borrow)] #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("endTimestamp", ToString::to_string(&self.end_timestamp).as_str())?; + struct_ser.serialize_field("ntpTimestamp", ToString::to_string(&self.ntp_timestamp).as_str())?; } - if self.rtp_clock_ticks != 0 { + if self.at != 0 { #[allow(clippy::needless_borrow)] #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("rtpClockTicks", ToString::to_string(&self.rtp_clock_ticks).as_str())?; + struct_ser.serialize_field("at", ToString::to_string(&self.at).as_str())?; } - if self.drift_samples != 0 { + if self.at_adjusted != 0 { #[allow(clippy::needless_borrow)] #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("driftSamples", ToString::to_string(&self.drift_samples).as_str())?; + struct_ser.serialize_field("atAdjusted", ToString::to_string(&self.at_adjusted).as_str())?; } - if self.drift_ms != 0. { - struct_ser.serialize_field("driftMs", &self.drift_ms)?; + if self.packets != 0 { + struct_ser.serialize_field("packets", &self.packets)?; } - if self.clock_rate != 0. { - struct_ser.serialize_field("clockRate", &self.clock_rate)?; + if self.octets != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("octets", ToString::to_string(&self.octets).as_str())?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RtpDrift { +impl<'de> serde::Deserialize<'de> for RtcpSenderReportState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "start_time", - "startTime", - "end_time", - "endTime", - "duration", - "start_timestamp", - "startTimestamp", - "end_timestamp", - "endTimestamp", - "rtp_clock_ticks", - "rtpClockTicks", - "drift_samples", - "driftSamples", - "drift_ms", - "driftMs", - "clock_rate", - "clockRate", + "rtp_timestamp", + "rtpTimestamp", + "rtp_timestamp_ext", + "rtpTimestampExt", + "ntp_timestamp", + "ntpTimestamp", + "at", + "at_adjusted", + "atAdjusted", + "packets", + "octets", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RtpTimestamp, + RtpTimestampExt, + NtpTimestamp, + At, + AtAdjusted, + Packets, + Octets, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rtpTimestamp" | "rtp_timestamp" => Ok(GeneratedField::RtpTimestamp), + "rtpTimestampExt" | "rtp_timestamp_ext" => Ok(GeneratedField::RtpTimestampExt), + "ntpTimestamp" | "ntp_timestamp" => Ok(GeneratedField::NtpTimestamp), + "at" => Ok(GeneratedField::At), + "atAdjusted" | "at_adjusted" => Ok(GeneratedField::AtAdjusted), + "packets" => Ok(GeneratedField::Packets), + "octets" => Ok(GeneratedField::Octets), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RtcpSenderReportState; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RTCPSenderReportState") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rtp_timestamp__ = None; + let mut rtp_timestamp_ext__ = None; + let mut ntp_timestamp__ = None; + let mut at__ = None; + let mut at_adjusted__ = None; + let mut packets__ = None; + let mut octets__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::RtpTimestamp => { + if rtp_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("rtpTimestamp")); + } + rtp_timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::RtpTimestampExt => { + if rtp_timestamp_ext__.is_some() { + return Err(serde::de::Error::duplicate_field("rtpTimestampExt")); + } + rtp_timestamp_ext__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::NtpTimestamp => { + if ntp_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("ntpTimestamp")); + } + ntp_timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::At => { + if at__.is_some() { + return Err(serde::de::Error::duplicate_field("at")); + } + at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::AtAdjusted => { + if at_adjusted__.is_some() { + return Err(serde::de::Error::duplicate_field("atAdjusted")); + } + at_adjusted__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Packets => { + if packets__.is_some() { + return Err(serde::de::Error::duplicate_field("packets")); + } + packets__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Octets => { + if octets__.is_some() { + return Err(serde::de::Error::duplicate_field("octets")); + } + octets__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(RtcpSenderReportState { + rtp_timestamp: rtp_timestamp__.unwrap_or_default(), + rtp_timestamp_ext: rtp_timestamp_ext__.unwrap_or_default(), + ntp_timestamp: ntp_timestamp__.unwrap_or_default(), + at: at__.unwrap_or_default(), + at_adjusted: at_adjusted__.unwrap_or_default(), + packets: packets__.unwrap_or_default(), + octets: octets__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.RTCPSenderReportState", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RtpDrift { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.start_time.is_some() { + len += 1; + } + if self.end_time.is_some() { + len += 1; + } + if self.duration != 0. { + len += 1; + } + if self.start_timestamp != 0 { + len += 1; + } + if self.end_timestamp != 0 { + len += 1; + } + if self.rtp_clock_ticks != 0 { + len += 1; + } + if self.drift_samples != 0 { + len += 1; + } + if self.drift_ms != 0. { + len += 1; + } + if self.clock_rate != 0. { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RTPDrift", len)?; + if let Some(v) = self.start_time.as_ref() { + struct_ser.serialize_field("startTime", v)?; + } + if let Some(v) = self.end_time.as_ref() { + struct_ser.serialize_field("endTime", v)?; + } + if self.duration != 0. { + struct_ser.serialize_field("duration", &self.duration)?; + } + if self.start_timestamp != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("startTimestamp", ToString::to_string(&self.start_timestamp).as_str())?; + } + if self.end_timestamp != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("endTimestamp", ToString::to_string(&self.end_timestamp).as_str())?; + } + if self.rtp_clock_ticks != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("rtpClockTicks", ToString::to_string(&self.rtp_clock_ticks).as_str())?; + } + if self.drift_samples != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("driftSamples", ToString::to_string(&self.drift_samples).as_str())?; + } + if self.drift_ms != 0. { + struct_ser.serialize_field("driftMs", &self.drift_ms)?; + } + if self.clock_rate != 0. { + struct_ser.serialize_field("clockRate", &self.clock_rate)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RtpDrift { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "start_time", + "startTime", + "end_time", + "endTime", + "duration", + "start_timestamp", + "startTimestamp", + "end_timestamp", + "endTimestamp", + "rtp_clock_ticks", + "rtpClockTicks", + "drift_samples", + "driftSamples", + "drift_ms", + "driftMs", + "clock_rate", + "clockRate", ]; #[allow(clippy::enum_variant_names)] @@ -15618,6 +17241,9 @@ impl serde::Serialize for RtpForwarderState { if self.rtp_munger.is_some() { len += 1; } + if !self.sender_report_state.is_empty() { + len += 1; + } if self.codec_munger.is_some() { len += 1; } @@ -15646,6 +17272,9 @@ impl serde::Serialize for RtpForwarderState { if let Some(v) = self.rtp_munger.as_ref() { struct_ser.serialize_field("rtpMunger", v)?; } + if !self.sender_report_state.is_empty() { + struct_ser.serialize_field("senderReportState", &self.sender_report_state)?; + } if let Some(v) = self.codec_munger.as_ref() { match v { rtp_forwarder_state::CodecMunger::Vp8Munger(v) => { @@ -15674,6 +17303,8 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { "dummyStartTimestampOffset", "rtp_munger", "rtpMunger", + "sender_report_state", + "senderReportState", "vp8_munger", "vp8Munger", ]; @@ -15686,6 +17317,7 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { ExtFirstTimestamp, DummyStartTimestampOffset, RtpMunger, + SenderReportState, Vp8Munger, __SkipField__, } @@ -15715,6 +17347,7 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { "extFirstTimestamp" | "ext_first_timestamp" => Ok(GeneratedField::ExtFirstTimestamp), "dummyStartTimestampOffset" | "dummy_start_timestamp_offset" => Ok(GeneratedField::DummyStartTimestampOffset), "rtpMunger" | "rtp_munger" => Ok(GeneratedField::RtpMunger), + "senderReportState" | "sender_report_state" => Ok(GeneratedField::SenderReportState), "vp8Munger" | "vp8_munger" => Ok(GeneratedField::Vp8Munger), _ => Ok(GeneratedField::__SkipField__), } @@ -15741,6 +17374,7 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { let mut ext_first_timestamp__ = None; let mut dummy_start_timestamp_offset__ = None; let mut rtp_munger__ = None; + let mut sender_report_state__ = None; let mut codec_munger__ = None; while let Some(k) = map_.next_key()? { match k { @@ -15788,6 +17422,12 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { } rtp_munger__ = map_.next_value()?; } + GeneratedField::SenderReportState => { + if sender_report_state__.is_some() { + return Err(serde::de::Error::duplicate_field("senderReportState")); + } + sender_report_state__ = Some(map_.next_value()?); + } GeneratedField::Vp8Munger => { if codec_munger__.is_some() { return Err(serde::de::Error::duplicate_field("vp8Munger")); @@ -15807,6 +17447,7 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { ext_first_timestamp: ext_first_timestamp__.unwrap_or_default(), dummy_start_timestamp_offset: dummy_start_timestamp_offset__.unwrap_or_default(), rtp_munger: rtp_munger__, + sender_report_state: sender_report_state__.unwrap_or_default(), codec_munger: codec_munger__, }) } @@ -16150,12 +17791,15 @@ impl serde::Serialize for RtpStats { if self.packet_drift.is_some() { len += 1; } - if self.report_drift.is_some() { + if self.ntp_report_drift.is_some() { len += 1; } if self.rebased_report_drift.is_some() { len += 1; } + if self.received_report_drift.is_some() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.RTPStats", len)?; if let Some(v) = self.start_time.as_ref() { struct_ser.serialize_field("startTime", v)?; @@ -16295,12 +17939,15 @@ impl serde::Serialize for RtpStats { if let Some(v) = self.packet_drift.as_ref() { struct_ser.serialize_field("packetDrift", v)?; } - if let Some(v) = self.report_drift.as_ref() { - struct_ser.serialize_field("reportDrift", v)?; + if let Some(v) = self.ntp_report_drift.as_ref() { + struct_ser.serialize_field("ntpReportDrift", v)?; } if let Some(v) = self.rebased_report_drift.as_ref() { struct_ser.serialize_field("rebasedReportDrift", v)?; } + if let Some(v) = self.received_report_drift.as_ref() { + struct_ser.serialize_field("receivedReportDrift", v)?; + } struct_ser.end() } } @@ -16387,10 +18034,12 @@ impl<'de> serde::Deserialize<'de> for RtpStats { "lastLayerLockPli", "packet_drift", "packetDrift", - "report_drift", - "reportDrift", + "ntp_report_drift", + "ntpReportDrift", "rebased_report_drift", "rebasedReportDrift", + "received_report_drift", + "receivedReportDrift", ]; #[allow(clippy::enum_variant_names)] @@ -16437,8 +18086,9 @@ impl<'de> serde::Deserialize<'de> for RtpStats { LayerLockPlis, LastLayerLockPli, PacketDrift, - ReportDrift, + NtpReportDrift, RebasedReportDrift, + ReceivedReportDrift, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -16503,8 +18153,9 @@ impl<'de> serde::Deserialize<'de> for RtpStats { "layerLockPlis" | "layer_lock_plis" => Ok(GeneratedField::LayerLockPlis), "lastLayerLockPli" | "last_layer_lock_pli" => Ok(GeneratedField::LastLayerLockPli), "packetDrift" | "packet_drift" => Ok(GeneratedField::PacketDrift), - "reportDrift" | "report_drift" => Ok(GeneratedField::ReportDrift), + "ntpReportDrift" | "ntp_report_drift" => Ok(GeneratedField::NtpReportDrift), "rebasedReportDrift" | "rebased_report_drift" => Ok(GeneratedField::RebasedReportDrift), + "receivedReportDrift" | "received_report_drift" => Ok(GeneratedField::ReceivedReportDrift), _ => Ok(GeneratedField::__SkipField__), } } @@ -16566,8 +18217,9 @@ impl<'de> serde::Deserialize<'de> for RtpStats { let mut layer_lock_plis__ = None; let mut last_layer_lock_pli__ = None; let mut packet_drift__ = None; - let mut report_drift__ = None; + let mut ntp_report_drift__ = None; let mut rebased_report_drift__ = None; + let mut received_report_drift__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::StartTime => { @@ -16891,157 +18543,693 @@ impl<'de> serde::Deserialize<'de> for RtpStats { if packet_drift__.is_some() { return Err(serde::de::Error::duplicate_field("packetDrift")); } - packet_drift__ = map_.next_value()?; + packet_drift__ = map_.next_value()?; + } + GeneratedField::NtpReportDrift => { + if ntp_report_drift__.is_some() { + return Err(serde::de::Error::duplicate_field("ntpReportDrift")); + } + ntp_report_drift__ = map_.next_value()?; + } + GeneratedField::RebasedReportDrift => { + if rebased_report_drift__.is_some() { + return Err(serde::de::Error::duplicate_field("rebasedReportDrift")); + } + rebased_report_drift__ = map_.next_value()?; + } + GeneratedField::ReceivedReportDrift => { + if received_report_drift__.is_some() { + return Err(serde::de::Error::duplicate_field("receivedReportDrift")); + } + received_report_drift__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(RtpStats { + start_time: start_time__, + end_time: end_time__, + duration: duration__.unwrap_or_default(), + packets: packets__.unwrap_or_default(), + packet_rate: packet_rate__.unwrap_or_default(), + bytes: bytes__.unwrap_or_default(), + header_bytes: header_bytes__.unwrap_or_default(), + bitrate: bitrate__.unwrap_or_default(), + packets_lost: packets_lost__.unwrap_or_default(), + packet_loss_rate: packet_loss_rate__.unwrap_or_default(), + packet_loss_percentage: packet_loss_percentage__.unwrap_or_default(), + packets_duplicate: packets_duplicate__.unwrap_or_default(), + packet_duplicate_rate: packet_duplicate_rate__.unwrap_or_default(), + bytes_duplicate: bytes_duplicate__.unwrap_or_default(), + header_bytes_duplicate: header_bytes_duplicate__.unwrap_or_default(), + bitrate_duplicate: bitrate_duplicate__.unwrap_or_default(), + packets_padding: packets_padding__.unwrap_or_default(), + packet_padding_rate: packet_padding_rate__.unwrap_or_default(), + bytes_padding: bytes_padding__.unwrap_or_default(), + header_bytes_padding: header_bytes_padding__.unwrap_or_default(), + bitrate_padding: bitrate_padding__.unwrap_or_default(), + packets_out_of_order: packets_out_of_order__.unwrap_or_default(), + frames: frames__.unwrap_or_default(), + frame_rate: frame_rate__.unwrap_or_default(), + jitter_current: jitter_current__.unwrap_or_default(), + jitter_max: jitter_max__.unwrap_or_default(), + gap_histogram: gap_histogram__.unwrap_or_default(), + nacks: nacks__.unwrap_or_default(), + nack_acks: nack_acks__.unwrap_or_default(), + nack_misses: nack_misses__.unwrap_or_default(), + nack_repeated: nack_repeated__.unwrap_or_default(), + plis: plis__.unwrap_or_default(), + last_pli: last_pli__, + firs: firs__.unwrap_or_default(), + last_fir: last_fir__, + rtt_current: rtt_current__.unwrap_or_default(), + rtt_max: rtt_max__.unwrap_or_default(), + key_frames: key_frames__.unwrap_or_default(), + last_key_frame: last_key_frame__, + layer_lock_plis: layer_lock_plis__.unwrap_or_default(), + last_layer_lock_pli: last_layer_lock_pli__, + packet_drift: packet_drift__, + ntp_report_drift: ntp_report_drift__, + rebased_report_drift: rebased_report_drift__, + received_report_drift: received_report_drift__, + }) + } + } + deserializer.deserialize_struct("livekit.RTPStats", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ReconnectReason { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::RrUnknown => "RR_UNKNOWN", + Self::RrSignalDisconnected => "RR_SIGNAL_DISCONNECTED", + Self::RrPublisherFailed => "RR_PUBLISHER_FAILED", + Self::RrSubscriberFailed => "RR_SUBSCRIBER_FAILED", + Self::RrSwitchCandidate => "RR_SWITCH_CANDIDATE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ReconnectReason { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "RR_UNKNOWN", + "RR_SIGNAL_DISCONNECTED", + "RR_PUBLISHER_FAILED", + "RR_SUBSCRIBER_FAILED", + "RR_SWITCH_CANDIDATE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ReconnectReason; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "RR_UNKNOWN" => Ok(ReconnectReason::RrUnknown), + "RR_SIGNAL_DISCONNECTED" => Ok(ReconnectReason::RrSignalDisconnected), + "RR_PUBLISHER_FAILED" => Ok(ReconnectReason::RrPublisherFailed), + "RR_SUBSCRIBER_FAILED" => Ok(ReconnectReason::RrSubscriberFailed), + "RR_SWITCH_CANDIDATE" => Ok(ReconnectReason::RrSwitchCandidate), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for ReconnectResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.ice_servers.is_empty() { + len += 1; + } + if self.client_configuration.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ReconnectResponse", len)?; + if !self.ice_servers.is_empty() { + struct_ser.serialize_field("iceServers", &self.ice_servers)?; + } + if let Some(v) = self.client_configuration.as_ref() { + struct_ser.serialize_field("clientConfiguration", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ReconnectResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "ice_servers", + "iceServers", + "client_configuration", + "clientConfiguration", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + IceServers, + ClientConfiguration, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "iceServers" | "ice_servers" => Ok(GeneratedField::IceServers), + "clientConfiguration" | "client_configuration" => Ok(GeneratedField::ClientConfiguration), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ReconnectResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ReconnectResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut ice_servers__ = None; + let mut client_configuration__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::IceServers => { + if ice_servers__.is_some() { + return Err(serde::de::Error::duplicate_field("iceServers")); + } + ice_servers__ = Some(map_.next_value()?); + } + GeneratedField::ClientConfiguration => { + if client_configuration__.is_some() { + return Err(serde::de::Error::duplicate_field("clientConfiguration")); + } + client_configuration__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ReconnectResponse { + ice_servers: ice_servers__.unwrap_or_default(), + client_configuration: client_configuration__, + }) + } + } + deserializer.deserialize_struct("livekit.ReconnectResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RegionInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.region.is_empty() { + len += 1; + } + if !self.url.is_empty() { + len += 1; + } + if self.distance != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RegionInfo", len)?; + if !self.region.is_empty() { + struct_ser.serialize_field("region", &self.region)?; + } + if !self.url.is_empty() { + struct_ser.serialize_field("url", &self.url)?; + } + if self.distance != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("distance", ToString::to_string(&self.distance).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RegionInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "region", + "url", + "distance", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Region, + Url, + Distance, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "region" => Ok(GeneratedField::Region), + "url" => Ok(GeneratedField::Url), + "distance" => Ok(GeneratedField::Distance), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RegionInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RegionInfo") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut region__ = None; + let mut url__ = None; + let mut distance__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Region => { + if region__.is_some() { + return Err(serde::de::Error::duplicate_field("region")); + } + region__ = Some(map_.next_value()?); + } + GeneratedField::Url => { + if url__.is_some() { + return Err(serde::de::Error::duplicate_field("url")); + } + url__ = Some(map_.next_value()?); + } + GeneratedField::Distance => { + if distance__.is_some() { + return Err(serde::de::Error::duplicate_field("distance")); + } + distance__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(RegionInfo { + region: region__.unwrap_or_default(), + url: url__.unwrap_or_default(), + distance: distance__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.RegionInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RegionSettings { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.regions.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RegionSettings", len)?; + if !self.regions.is_empty() { + struct_ser.serialize_field("regions", &self.regions)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RegionSettings { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "regions", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Regions, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "regions" => Ok(GeneratedField::Regions), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RegionSettings; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RegionSettings") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut regions__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Regions => { + if regions__.is_some() { + return Err(serde::de::Error::duplicate_field("regions")); + } + regions__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(RegionSettings { + regions: regions__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.RegionSettings", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RegisterWorkerRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.r#type != 0 { + len += 1; + } + if !self.agent_name.is_empty() { + len += 1; + } + if !self.version.is_empty() { + len += 1; + } + if self.ping_interval != 0 { + len += 1; + } + if self.namespace.is_some() { + len += 1; + } + if self.allowed_permissions.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RegisterWorkerRequest", len)?; + if self.r#type != 0 { + let v = JobType::try_from(self.r#type) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; + struct_ser.serialize_field("type", &v)?; + } + if !self.agent_name.is_empty() { + struct_ser.serialize_field("agentName", &self.agent_name)?; + } + if !self.version.is_empty() { + struct_ser.serialize_field("version", &self.version)?; + } + if self.ping_interval != 0 { + struct_ser.serialize_field("pingInterval", &self.ping_interval)?; + } + if let Some(v) = self.namespace.as_ref() { + struct_ser.serialize_field("namespace", v)?; + } + if let Some(v) = self.allowed_permissions.as_ref() { + struct_ser.serialize_field("allowedPermissions", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RegisterWorkerRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "type", + "agent_name", + "agentName", + "version", + "ping_interval", + "pingInterval", + "namespace", + "allowed_permissions", + "allowedPermissions", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Type, + AgentName, + Version, + PingInterval, + Namespace, + AllowedPermissions, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "type" => Ok(GeneratedField::Type), + "agentName" | "agent_name" => Ok(GeneratedField::AgentName), + "version" => Ok(GeneratedField::Version), + "pingInterval" | "ping_interval" => Ok(GeneratedField::PingInterval), + "namespace" => Ok(GeneratedField::Namespace), + "allowedPermissions" | "allowed_permissions" => Ok(GeneratedField::AllowedPermissions), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RegisterWorkerRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RegisterWorkerRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut r#type__ = None; + let mut agent_name__ = None; + let mut version__ = None; + let mut ping_interval__ = None; + let mut namespace__ = None; + let mut allowed_permissions__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); + } + r#type__ = Some(map_.next_value::()? as i32); + } + GeneratedField::AgentName => { + if agent_name__.is_some() { + return Err(serde::de::Error::duplicate_field("agentName")); + } + agent_name__ = Some(map_.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = Some(map_.next_value()?); + } + GeneratedField::PingInterval => { + if ping_interval__.is_some() { + return Err(serde::de::Error::duplicate_field("pingInterval")); + } + ping_interval__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::ReportDrift => { - if report_drift__.is_some() { - return Err(serde::de::Error::duplicate_field("reportDrift")); + GeneratedField::Namespace => { + if namespace__.is_some() { + return Err(serde::de::Error::duplicate_field("namespace")); } - report_drift__ = map_.next_value()?; + namespace__ = map_.next_value()?; } - GeneratedField::RebasedReportDrift => { - if rebased_report_drift__.is_some() { - return Err(serde::de::Error::duplicate_field("rebasedReportDrift")); + GeneratedField::AllowedPermissions => { + if allowed_permissions__.is_some() { + return Err(serde::de::Error::duplicate_field("allowedPermissions")); } - rebased_report_drift__ = map_.next_value()?; + allowed_permissions__ = map_.next_value()?; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RtpStats { - start_time: start_time__, - end_time: end_time__, - duration: duration__.unwrap_or_default(), - packets: packets__.unwrap_or_default(), - packet_rate: packet_rate__.unwrap_or_default(), - bytes: bytes__.unwrap_or_default(), - header_bytes: header_bytes__.unwrap_or_default(), - bitrate: bitrate__.unwrap_or_default(), - packets_lost: packets_lost__.unwrap_or_default(), - packet_loss_rate: packet_loss_rate__.unwrap_or_default(), - packet_loss_percentage: packet_loss_percentage__.unwrap_or_default(), - packets_duplicate: packets_duplicate__.unwrap_or_default(), - packet_duplicate_rate: packet_duplicate_rate__.unwrap_or_default(), - bytes_duplicate: bytes_duplicate__.unwrap_or_default(), - header_bytes_duplicate: header_bytes_duplicate__.unwrap_or_default(), - bitrate_duplicate: bitrate_duplicate__.unwrap_or_default(), - packets_padding: packets_padding__.unwrap_or_default(), - packet_padding_rate: packet_padding_rate__.unwrap_or_default(), - bytes_padding: bytes_padding__.unwrap_or_default(), - header_bytes_padding: header_bytes_padding__.unwrap_or_default(), - bitrate_padding: bitrate_padding__.unwrap_or_default(), - packets_out_of_order: packets_out_of_order__.unwrap_or_default(), - frames: frames__.unwrap_or_default(), - frame_rate: frame_rate__.unwrap_or_default(), - jitter_current: jitter_current__.unwrap_or_default(), - jitter_max: jitter_max__.unwrap_or_default(), - gap_histogram: gap_histogram__.unwrap_or_default(), - nacks: nacks__.unwrap_or_default(), - nack_acks: nack_acks__.unwrap_or_default(), - nack_misses: nack_misses__.unwrap_or_default(), - nack_repeated: nack_repeated__.unwrap_or_default(), - plis: plis__.unwrap_or_default(), - last_pli: last_pli__, - firs: firs__.unwrap_or_default(), - last_fir: last_fir__, - rtt_current: rtt_current__.unwrap_or_default(), - rtt_max: rtt_max__.unwrap_or_default(), - key_frames: key_frames__.unwrap_or_default(), - last_key_frame: last_key_frame__, - layer_lock_plis: layer_lock_plis__.unwrap_or_default(), - last_layer_lock_pli: last_layer_lock_pli__, - packet_drift: packet_drift__, - report_drift: report_drift__, - rebased_report_drift: rebased_report_drift__, + Ok(RegisterWorkerRequest { + r#type: r#type__.unwrap_or_default(), + agent_name: agent_name__.unwrap_or_default(), + version: version__.unwrap_or_default(), + ping_interval: ping_interval__.unwrap_or_default(), + namespace: namespace__, + allowed_permissions: allowed_permissions__, }) } } - deserializer.deserialize_struct("livekit.RTPStats", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ReconnectReason { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::RrUnknown => "RR_UNKNOWN", - Self::RrSignalDisconnected => "RR_SIGNAL_DISCONNECTED", - Self::RrPublisherFailed => "RR_PUBLISHER_FAILED", - Self::RrSubscriberFailed => "RR_SUBSCRIBER_FAILED", - Self::RrSwitchCandidate => "RR_SWITCH_CANDIDATE", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for ReconnectReason { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "RR_UNKNOWN", - "RR_SIGNAL_DISCONNECTED", - "RR_PUBLISHER_FAILED", - "RR_SUBSCRIBER_FAILED", - "RR_SWITCH_CANDIDATE", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ReconnectReason; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "RR_UNKNOWN" => Ok(ReconnectReason::RrUnknown), - "RR_SIGNAL_DISCONNECTED" => Ok(ReconnectReason::RrSignalDisconnected), - "RR_PUBLISHER_FAILED" => Ok(ReconnectReason::RrPublisherFailed), - "RR_SUBSCRIBER_FAILED" => Ok(ReconnectReason::RrSubscriberFailed), - "RR_SWITCH_CANDIDATE" => Ok(ReconnectReason::RrSwitchCandidate), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.RegisterWorkerRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ReconnectResponse { +impl serde::Serialize for RegisterWorkerResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -17049,39 +19237,39 @@ impl serde::Serialize for ReconnectResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.ice_servers.is_empty() { + if !self.worker_id.is_empty() { len += 1; } - if self.client_configuration.is_some() { + if self.server_info.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.ReconnectResponse", len)?; - if !self.ice_servers.is_empty() { - struct_ser.serialize_field("iceServers", &self.ice_servers)?; + let mut struct_ser = serializer.serialize_struct("livekit.RegisterWorkerResponse", len)?; + if !self.worker_id.is_empty() { + struct_ser.serialize_field("workerId", &self.worker_id)?; } - if let Some(v) = self.client_configuration.as_ref() { - struct_ser.serialize_field("clientConfiguration", v)?; + if let Some(v) = self.server_info.as_ref() { + struct_ser.serialize_field("serverInfo", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for ReconnectResponse { +impl<'de> serde::Deserialize<'de> for RegisterWorkerResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "ice_servers", - "iceServers", - "client_configuration", - "clientConfiguration", + "worker_id", + "workerId", + "server_info", + "serverInfo", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - IceServers, - ClientConfiguration, + WorkerId, + ServerInfo, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17104,8 +19292,8 @@ impl<'de> serde::Deserialize<'de> for ReconnectResponse { E: serde::de::Error, { match value { - "iceServers" | "ice_servers" => Ok(GeneratedField::IceServers), - "clientConfiguration" | "client_configuration" => Ok(GeneratedField::ClientConfiguration), + "workerId" | "worker_id" => Ok(GeneratedField::WorkerId), + "serverInfo" | "server_info" => Ok(GeneratedField::ServerInfo), _ => Ok(GeneratedField::__SkipField__), } } @@ -17115,95 +19303,69 @@ impl<'de> serde::Deserialize<'de> for ReconnectResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ReconnectResponse; + type Value = RegisterWorkerResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ReconnectResponse") + formatter.write_str("struct livekit.RegisterWorkerResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut ice_servers__ = None; - let mut client_configuration__ = None; + let mut worker_id__ = None; + let mut server_info__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::IceServers => { - if ice_servers__.is_some() { - return Err(serde::de::Error::duplicate_field("iceServers")); + GeneratedField::WorkerId => { + if worker_id__.is_some() { + return Err(serde::de::Error::duplicate_field("workerId")); } - ice_servers__ = Some(map_.next_value()?); + worker_id__ = Some(map_.next_value()?); } - GeneratedField::ClientConfiguration => { - if client_configuration__.is_some() { - return Err(serde::de::Error::duplicate_field("clientConfiguration")); + GeneratedField::ServerInfo => { + if server_info__.is_some() { + return Err(serde::de::Error::duplicate_field("serverInfo")); } - client_configuration__ = map_.next_value()?; + server_info__ = map_.next_value()?; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(ReconnectResponse { - ice_servers: ice_servers__.unwrap_or_default(), - client_configuration: client_configuration__, + Ok(RegisterWorkerResponse { + worker_id: worker_id__.unwrap_or_default(), + server_info: server_info__, }) } } - deserializer.deserialize_struct("livekit.ReconnectResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RegisterWorkerResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RegionInfo { +impl serde::Serialize for RemoveParticipantResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let mut len = 0; - if !self.region.is_empty() { - len += 1; - } - if !self.url.is_empty() { - len += 1; - } - if self.distance != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.RegionInfo", len)?; - if !self.region.is_empty() { - struct_ser.serialize_field("region", &self.region)?; - } - if !self.url.is_empty() { - struct_ser.serialize_field("url", &self.url)?; - } - if self.distance != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("distance", ToString::to_string(&self.distance).as_str())?; - } + let len = 0; + let struct_ser = serializer.serialize_struct("livekit.RemoveParticipantResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RegionInfo { +impl<'de> serde::Deserialize<'de> for RemoveParticipantResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "region", - "url", - "distance", ]; #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Region, - Url, - Distance, + enum GeneratedField { __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17225,12 +19387,7 @@ impl<'de> serde::Deserialize<'de> for RegionInfo { where E: serde::de::Error, { - match value { - "region" => Ok(GeneratedField::Region), - "url" => Ok(GeneratedField::Url), - "distance" => Ok(GeneratedField::Distance), - _ => Ok(GeneratedField::__SkipField__), - } + Ok(GeneratedField::__SkipField__) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -17238,57 +19395,27 @@ impl<'de> serde::Deserialize<'de> for RegionInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RegionInfo; + type Value = RemoveParticipantResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RegionInfo") + formatter.write_str("struct livekit.RemoveParticipantResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut region__ = None; - let mut url__ = None; - let mut distance__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Region => { - if region__.is_some() { - return Err(serde::de::Error::duplicate_field("region")); - } - region__ = Some(map_.next_value()?); - } - GeneratedField::Url => { - if url__.is_some() { - return Err(serde::de::Error::duplicate_field("url")); - } - url__ = Some(map_.next_value()?); - } - GeneratedField::Distance => { - if distance__.is_some() { - return Err(serde::de::Error::duplicate_field("distance")); - } - distance__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(RegionInfo { - region: region__.unwrap_or_default(), - url: url__.unwrap_or_default(), - distance: distance__.unwrap_or_default(), + Ok(RemoveParticipantResponse { }) } } - deserializer.deserialize_struct("livekit.RegionInfo", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RemoveParticipantResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RegionSettings { +impl serde::Serialize for RequestResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -17296,29 +19423,48 @@ impl serde::Serialize for RegionSettings { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.regions.is_empty() { + if self.request_id != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RegionSettings", len)?; - if !self.regions.is_empty() { - struct_ser.serialize_field("regions", &self.regions)?; + if self.reason != 0 { + len += 1; + } + if !self.message.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RequestResponse", len)?; + if self.request_id != 0 { + struct_ser.serialize_field("requestId", &self.request_id)?; + } + if self.reason != 0 { + let v = request_response::Reason::try_from(self.reason) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.reason)))?; + struct_ser.serialize_field("reason", &v)?; + } + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RegionSettings { +impl<'de> serde::Deserialize<'de> for RequestResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "regions", + "request_id", + "requestId", + "reason", + "message", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Regions, + RequestId, + Reason, + Message, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17341,7 +19487,9 @@ impl<'de> serde::Deserialize<'de> for RegionSettings { E: serde::de::Error, { match value { - "regions" => Ok(GeneratedField::Regions), + "requestId" | "request_id" => Ok(GeneratedField::RequestId), + "reason" => Ok(GeneratedField::Reason), + "message" => Ok(GeneratedField::Message), _ => Ok(GeneratedField::__SkipField__), } } @@ -17351,39 +19499,134 @@ impl<'de> serde::Deserialize<'de> for RegionSettings { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RegionSettings; + type Value = RequestResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RegionSettings") + formatter.write_str("struct livekit.RequestResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut regions__ = None; + let mut request_id__ = None; + let mut reason__ = None; + let mut message__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Regions => { - if regions__.is_some() { - return Err(serde::de::Error::duplicate_field("regions")); + GeneratedField::RequestId => { + if request_id__.is_some() { + return Err(serde::de::Error::duplicate_field("requestId")); } - regions__ = Some(map_.next_value()?); + request_id__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Reason => { + if reason__.is_some() { + return Err(serde::de::Error::duplicate_field("reason")); + } + reason__ = Some(map_.next_value::()? as i32); + } + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); + } + message__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RegionSettings { - regions: regions__.unwrap_or_default(), + Ok(RequestResponse { + request_id: request_id__.unwrap_or_default(), + reason: reason__.unwrap_or_default(), + message: message__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RegionSettings", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RequestResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RegisterWorkerRequest { +impl serde::Serialize for request_response::Reason { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Ok => "OK", + Self::NotFound => "NOT_FOUND", + Self::NotAllowed => "NOT_ALLOWED", + Self::LimitExceeded => "LIMIT_EXCEEDED", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for request_response::Reason { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "OK", + "NOT_FOUND", + "NOT_ALLOWED", + "LIMIT_EXCEEDED", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = request_response::Reason; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "OK" => Ok(request_response::Reason::Ok), + "NOT_FOUND" => Ok(request_response::Reason::NotFound), + "NOT_ALLOWED" => Ok(request_response::Reason::NotAllowed), + "LIMIT_EXCEEDED" => Ok(request_response::Reason::LimitExceeded), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for Room { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -17391,74 +19634,136 @@ impl serde::Serialize for RegisterWorkerRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.r#type != 0 { + if !self.sid.is_empty() { len += 1; } - if !self.agent_name.is_empty() { + if !self.name.is_empty() { len += 1; } - if !self.version.is_empty() { + if self.empty_timeout != 0 { + len += 1; + } + if self.departure_timeout != 0 { + len += 1; + } + if self.max_participants != 0 { + len += 1; + } + if self.creation_time != 0 { + len += 1; + } + if !self.turn_password.is_empty() { + len += 1; + } + if !self.enabled_codecs.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if self.num_participants != 0 { + len += 1; + } + if self.num_publishers != 0 { len += 1; } - if self.ping_interval != 0 { - len += 1; + if self.active_recording { + len += 1; + } + if self.version.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.Room", len)?; + if !self.sid.is_empty() { + struct_ser.serialize_field("sid", &self.sid)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if self.empty_timeout != 0 { + struct_ser.serialize_field("emptyTimeout", &self.empty_timeout)?; + } + if self.departure_timeout != 0 { + struct_ser.serialize_field("departureTimeout", &self.departure_timeout)?; } - if self.namespace.is_some() { - len += 1; + if self.max_participants != 0 { + struct_ser.serialize_field("maxParticipants", &self.max_participants)?; } - if self.allowed_permissions.is_some() { - len += 1; + if self.creation_time != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("creationTime", ToString::to_string(&self.creation_time).as_str())?; } - let mut struct_ser = serializer.serialize_struct("livekit.RegisterWorkerRequest", len)?; - if self.r#type != 0 { - let v = JobType::try_from(self.r#type) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; - struct_ser.serialize_field("type", &v)?; + if !self.turn_password.is_empty() { + struct_ser.serialize_field("turnPassword", &self.turn_password)?; } - if !self.agent_name.is_empty() { - struct_ser.serialize_field("agentName", &self.agent_name)?; + if !self.enabled_codecs.is_empty() { + struct_ser.serialize_field("enabledCodecs", &self.enabled_codecs)?; } - if !self.version.is_empty() { - struct_ser.serialize_field("version", &self.version)?; + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; } - if self.ping_interval != 0 { - struct_ser.serialize_field("pingInterval", &self.ping_interval)?; + if self.num_participants != 0 { + struct_ser.serialize_field("numParticipants", &self.num_participants)?; } - if let Some(v) = self.namespace.as_ref() { - struct_ser.serialize_field("namespace", v)?; + if self.num_publishers != 0 { + struct_ser.serialize_field("numPublishers", &self.num_publishers)?; } - if let Some(v) = self.allowed_permissions.as_ref() { - struct_ser.serialize_field("allowedPermissions", v)?; + if self.active_recording { + struct_ser.serialize_field("activeRecording", &self.active_recording)?; + } + if let Some(v) = self.version.as_ref() { + struct_ser.serialize_field("version", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RegisterWorkerRequest { +impl<'de> serde::Deserialize<'de> for Room { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "type", - "agent_name", - "agentName", + "sid", + "name", + "empty_timeout", + "emptyTimeout", + "departure_timeout", + "departureTimeout", + "max_participants", + "maxParticipants", + "creation_time", + "creationTime", + "turn_password", + "turnPassword", + "enabled_codecs", + "enabledCodecs", + "metadata", + "num_participants", + "numParticipants", + "num_publishers", + "numPublishers", + "active_recording", + "activeRecording", "version", - "ping_interval", - "pingInterval", - "namespace", - "allowed_permissions", - "allowedPermissions", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Type, - AgentName, + Sid, + Name, + EmptyTimeout, + DepartureTimeout, + MaxParticipants, + CreationTime, + TurnPassword, + EnabledCodecs, + Metadata, + NumParticipants, + NumPublishers, + ActiveRecording, Version, - PingInterval, - Namespace, - AllowedPermissions, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17481,12 +19786,19 @@ impl<'de> serde::Deserialize<'de> for RegisterWorkerRequest { E: serde::de::Error, { match value { - "type" => Ok(GeneratedField::Type), - "agentName" | "agent_name" => Ok(GeneratedField::AgentName), + "sid" => Ok(GeneratedField::Sid), + "name" => Ok(GeneratedField::Name), + "emptyTimeout" | "empty_timeout" => Ok(GeneratedField::EmptyTimeout), + "departureTimeout" | "departure_timeout" => Ok(GeneratedField::DepartureTimeout), + "maxParticipants" | "max_participants" => Ok(GeneratedField::MaxParticipants), + "creationTime" | "creation_time" => Ok(GeneratedField::CreationTime), + "turnPassword" | "turn_password" => Ok(GeneratedField::TurnPassword), + "enabledCodecs" | "enabled_codecs" => Ok(GeneratedField::EnabledCodecs), + "metadata" => Ok(GeneratedField::Metadata), + "numParticipants" | "num_participants" => Ok(GeneratedField::NumParticipants), + "numPublishers" | "num_publishers" => Ok(GeneratedField::NumPublishers), + "activeRecording" | "active_recording" => Ok(GeneratedField::ActiveRecording), "version" => Ok(GeneratedField::Version), - "pingInterval" | "ping_interval" => Ok(GeneratedField::PingInterval), - "namespace" => Ok(GeneratedField::Namespace), - "allowedPermissions" | "allowed_permissions" => Ok(GeneratedField::AllowedPermissions), _ => Ok(GeneratedField::__SkipField__), } } @@ -17496,81 +19808,147 @@ impl<'de> serde::Deserialize<'de> for RegisterWorkerRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RegisterWorkerRequest; + type Value = Room; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RegisterWorkerRequest") + formatter.write_str("struct livekit.Room") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut r#type__ = None; - let mut agent_name__ = None; + let mut sid__ = None; + let mut name__ = None; + let mut empty_timeout__ = None; + let mut departure_timeout__ = None; + let mut max_participants__ = None; + let mut creation_time__ = None; + let mut turn_password__ = None; + let mut enabled_codecs__ = None; + let mut metadata__ = None; + let mut num_participants__ = None; + let mut num_publishers__ = None; + let mut active_recording__ = None; let mut version__ = None; - let mut ping_interval__ = None; - let mut namespace__ = None; - let mut allowed_permissions__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Type => { - if r#type__.is_some() { - return Err(serde::de::Error::duplicate_field("type")); + GeneratedField::Sid => { + if sid__.is_some() { + return Err(serde::de::Error::duplicate_field("sid")); } - r#type__ = Some(map_.next_value::()? as i32); + sid__ = Some(map_.next_value()?); } - GeneratedField::AgentName => { - if agent_name__.is_some() { - return Err(serde::de::Error::duplicate_field("agentName")); + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); } - agent_name__ = Some(map_.next_value()?); + name__ = Some(map_.next_value()?); } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); + GeneratedField::EmptyTimeout => { + if empty_timeout__.is_some() { + return Err(serde::de::Error::duplicate_field("emptyTimeout")); } - version__ = Some(map_.next_value()?); + empty_timeout__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::PingInterval => { - if ping_interval__.is_some() { - return Err(serde::de::Error::duplicate_field("pingInterval")); + GeneratedField::DepartureTimeout => { + if departure_timeout__.is_some() { + return Err(serde::de::Error::duplicate_field("departureTimeout")); } - ping_interval__ = + departure_timeout__ = Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::Namespace => { - if namespace__.is_some() { - return Err(serde::de::Error::duplicate_field("namespace")); + GeneratedField::MaxParticipants => { + if max_participants__.is_some() { + return Err(serde::de::Error::duplicate_field("maxParticipants")); } - namespace__ = map_.next_value()?; + max_participants__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::AllowedPermissions => { - if allowed_permissions__.is_some() { - return Err(serde::de::Error::duplicate_field("allowedPermissions")); + GeneratedField::CreationTime => { + if creation_time__.is_some() { + return Err(serde::de::Error::duplicate_field("creationTime")); } - allowed_permissions__ = map_.next_value()?; + creation_time__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::TurnPassword => { + if turn_password__.is_some() { + return Err(serde::de::Error::duplicate_field("turnPassword")); + } + turn_password__ = Some(map_.next_value()?); + } + GeneratedField::EnabledCodecs => { + if enabled_codecs__.is_some() { + return Err(serde::de::Error::duplicate_field("enabledCodecs")); + } + enabled_codecs__ = Some(map_.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map_.next_value()?); + } + GeneratedField::NumParticipants => { + if num_participants__.is_some() { + return Err(serde::de::Error::duplicate_field("numParticipants")); + } + num_participants__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::NumPublishers => { + if num_publishers__.is_some() { + return Err(serde::de::Error::duplicate_field("numPublishers")); + } + num_publishers__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ActiveRecording => { + if active_recording__.is_some() { + return Err(serde::de::Error::duplicate_field("activeRecording")); + } + active_recording__ = Some(map_.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = map_.next_value()?; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RegisterWorkerRequest { - r#type: r#type__.unwrap_or_default(), - agent_name: agent_name__.unwrap_or_default(), - version: version__.unwrap_or_default(), - ping_interval: ping_interval__.unwrap_or_default(), - namespace: namespace__, - allowed_permissions: allowed_permissions__, + Ok(Room { + sid: sid__.unwrap_or_default(), + name: name__.unwrap_or_default(), + empty_timeout: empty_timeout__.unwrap_or_default(), + departure_timeout: departure_timeout__.unwrap_or_default(), + max_participants: max_participants__.unwrap_or_default(), + creation_time: creation_time__.unwrap_or_default(), + turn_password: turn_password__.unwrap_or_default(), + enabled_codecs: enabled_codecs__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + num_participants: num_participants__.unwrap_or_default(), + num_publishers: num_publishers__.unwrap_or_default(), + active_recording: active_recording__.unwrap_or_default(), + version: version__, }) } } - deserializer.deserialize_struct("livekit.RegisterWorkerRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.Room", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RegisterWorkerResponse { +impl serde::Serialize for RoomAgent { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -17578,39 +19956,29 @@ impl serde::Serialize for RegisterWorkerResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.worker_id.is_empty() { - len += 1; - } - if self.server_info.is_some() { + if !self.dispatches.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RegisterWorkerResponse", len)?; - if !self.worker_id.is_empty() { - struct_ser.serialize_field("workerId", &self.worker_id)?; - } - if let Some(v) = self.server_info.as_ref() { - struct_ser.serialize_field("serverInfo", v)?; + let mut struct_ser = serializer.serialize_struct("livekit.RoomAgent", len)?; + if !self.dispatches.is_empty() { + struct_ser.serialize_field("dispatches", &self.dispatches)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RegisterWorkerResponse { +impl<'de> serde::Deserialize<'de> for RoomAgent { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "worker_id", - "workerId", - "server_info", - "serverInfo", + "dispatches", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - WorkerId, - ServerInfo, + Dispatches, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17633,8 +20001,7 @@ impl<'de> serde::Deserialize<'de> for RegisterWorkerResponse { E: serde::de::Error, { match value { - "workerId" | "worker_id" => Ok(GeneratedField::WorkerId), - "serverInfo" | "server_info" => Ok(GeneratedField::ServerInfo), + "dispatches" => Ok(GeneratedField::Dispatches), _ => Ok(GeneratedField::__SkipField__), } } @@ -17644,69 +20011,78 @@ impl<'de> serde::Deserialize<'de> for RegisterWorkerResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RegisterWorkerResponse; + type Value = RoomAgent; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RegisterWorkerResponse") + formatter.write_str("struct livekit.RoomAgent") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut worker_id__ = None; - let mut server_info__ = None; + let mut dispatches__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::WorkerId => { - if worker_id__.is_some() { - return Err(serde::de::Error::duplicate_field("workerId")); - } - worker_id__ = Some(map_.next_value()?); - } - GeneratedField::ServerInfo => { - if server_info__.is_some() { - return Err(serde::de::Error::duplicate_field("serverInfo")); + GeneratedField::Dispatches => { + if dispatches__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatches")); } - server_info__ = map_.next_value()?; + dispatches__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RegisterWorkerResponse { - worker_id: worker_id__.unwrap_or_default(), - server_info: server_info__, + Ok(RoomAgent { + dispatches: dispatches__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RegisterWorkerResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RoomAgent", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RemoveParticipantResponse { +impl serde::Serialize for RoomAgentDispatch { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("livekit.RemoveParticipantResponse", len)?; + let mut len = 0; + if !self.agent_name.is_empty() { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RoomAgentDispatch", len)?; + if !self.agent_name.is_empty() { + struct_ser.serialize_field("agentName", &self.agent_name)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RemoveParticipantResponse { +impl<'de> serde::Deserialize<'de> for RoomAgentDispatch { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "agent_name", + "agentName", + "metadata", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + AgentName, + Metadata, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17728,7 +20104,11 @@ impl<'de> serde::Deserialize<'de> for RemoveParticipantResponse { where E: serde::de::Error, { - Ok(GeneratedField::__SkipField__) + match value { + "agentName" | "agent_name" => Ok(GeneratedField::AgentName), + "metadata" => Ok(GeneratedField::Metadata), + _ => Ok(GeneratedField::__SkipField__), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -17736,27 +20116,47 @@ impl<'de> serde::Deserialize<'de> for RemoveParticipantResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RemoveParticipantResponse; + type Value = RoomAgentDispatch; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RemoveParticipantResponse") + formatter.write_str("struct livekit.RoomAgentDispatch") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - while map_.next_key::()?.is_some() { - let _ = map_.next_value::()?; + let mut agent_name__ = None; + let mut metadata__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::AgentName => { + if agent_name__.is_some() { + return Err(serde::de::Error::duplicate_field("agentName")); + } + agent_name__ = Some(map_.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } } - Ok(RemoveParticipantResponse { + Ok(RoomAgentDispatch { + agent_name: agent_name__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RemoveParticipantResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RoomAgentDispatch", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RequestResponse { +impl serde::Serialize for RoomCompositeEgressRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -17764,48 +20164,142 @@ impl serde::Serialize for RequestResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if self.request_id != 0 { + if !self.room_name.is_empty() { len += 1; } - if self.reason != 0 { + if !self.layout.is_empty() { len += 1; } - if !self.message.is_empty() { + if self.audio_only { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RequestResponse", len)?; - if self.request_id != 0 { - struct_ser.serialize_field("requestId", &self.request_id)?; + if self.video_only { + len += 1; } - if self.reason != 0 { - let v = request_response::Reason::try_from(self.reason) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.reason)))?; - struct_ser.serialize_field("reason", &v)?; + if !self.custom_base_url.is_empty() { + len += 1; } - if !self.message.is_empty() { - struct_ser.serialize_field("message", &self.message)?; + if !self.file_outputs.is_empty() { + len += 1; + } + if !self.stream_outputs.is_empty() { + len += 1; + } + if !self.segment_outputs.is_empty() { + len += 1; + } + if !self.image_outputs.is_empty() { + len += 1; + } + if self.output.is_some() { + len += 1; + } + if self.options.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RoomCompositeEgressRequest", len)?; + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + if !self.layout.is_empty() { + struct_ser.serialize_field("layout", &self.layout)?; + } + if self.audio_only { + struct_ser.serialize_field("audioOnly", &self.audio_only)?; + } + if self.video_only { + struct_ser.serialize_field("videoOnly", &self.video_only)?; + } + if !self.custom_base_url.is_empty() { + struct_ser.serialize_field("customBaseUrl", &self.custom_base_url)?; + } + if !self.file_outputs.is_empty() { + struct_ser.serialize_field("fileOutputs", &self.file_outputs)?; + } + if !self.stream_outputs.is_empty() { + struct_ser.serialize_field("streamOutputs", &self.stream_outputs)?; + } + if !self.segment_outputs.is_empty() { + struct_ser.serialize_field("segmentOutputs", &self.segment_outputs)?; + } + if !self.image_outputs.is_empty() { + struct_ser.serialize_field("imageOutputs", &self.image_outputs)?; + } + if let Some(v) = self.output.as_ref() { + match v { + room_composite_egress_request::Output::File(v) => { + struct_ser.serialize_field("file", v)?; + } + room_composite_egress_request::Output::Stream(v) => { + struct_ser.serialize_field("stream", v)?; + } + room_composite_egress_request::Output::Segments(v) => { + struct_ser.serialize_field("segments", v)?; + } + } + } + if let Some(v) = self.options.as_ref() { + match v { + room_composite_egress_request::Options::Preset(v) => { + let v = EncodingOptionsPreset::try_from(*v) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?; + struct_ser.serialize_field("preset", &v)?; + } + room_composite_egress_request::Options::Advanced(v) => { + struct_ser.serialize_field("advanced", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RequestResponse { +impl<'de> serde::Deserialize<'de> for RoomCompositeEgressRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "request_id", - "requestId", - "reason", - "message", + "room_name", + "roomName", + "layout", + "audio_only", + "audioOnly", + "video_only", + "videoOnly", + "custom_base_url", + "customBaseUrl", + "file_outputs", + "fileOutputs", + "stream_outputs", + "streamOutputs", + "segment_outputs", + "segmentOutputs", + "image_outputs", + "imageOutputs", + "file", + "stream", + "segments", + "preset", + "advanced", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - RequestId, - Reason, - Message, + RoomName, + Layout, + AudioOnly, + VideoOnly, + CustomBaseUrl, + FileOutputs, + StreamOutputs, + SegmentOutputs, + ImageOutputs, + File, + Stream, + Segments, + Preset, + Advanced, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -17828,9 +20322,20 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { E: serde::de::Error, { match value { - "requestId" | "request_id" => Ok(GeneratedField::RequestId), - "reason" => Ok(GeneratedField::Reason), - "message" => Ok(GeneratedField::Message), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + "layout" => Ok(GeneratedField::Layout), + "audioOnly" | "audio_only" => Ok(GeneratedField::AudioOnly), + "videoOnly" | "video_only" => Ok(GeneratedField::VideoOnly), + "customBaseUrl" | "custom_base_url" => Ok(GeneratedField::CustomBaseUrl), + "fileOutputs" | "file_outputs" => Ok(GeneratedField::FileOutputs), + "streamOutputs" | "stream_outputs" => Ok(GeneratedField::StreamOutputs), + "segmentOutputs" | "segment_outputs" => Ok(GeneratedField::SegmentOutputs), + "imageOutputs" | "image_outputs" => Ok(GeneratedField::ImageOutputs), + "file" => Ok(GeneratedField::File), + "stream" => Ok(GeneratedField::Stream), + "segments" => Ok(GeneratedField::Segments), + "preset" => Ok(GeneratedField::Preset), + "advanced" => Ok(GeneratedField::Advanced), _ => Ok(GeneratedField::__SkipField__), } } @@ -17840,134 +20345,141 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RequestResponse; + type Value = RoomCompositeEgressRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RequestResponse") + formatter.write_str("struct livekit.RoomCompositeEgressRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut request_id__ = None; - let mut reason__ = None; - let mut message__ = None; + let mut room_name__ = None; + let mut layout__ = None; + let mut audio_only__ = None; + let mut video_only__ = None; + let mut custom_base_url__ = None; + let mut file_outputs__ = None; + let mut stream_outputs__ = None; + let mut segment_outputs__ = None; + let mut image_outputs__ = None; + let mut output__ = None; + let mut options__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::RequestId => { - if request_id__.is_some() { - return Err(serde::de::Error::duplicate_field("requestId")); + GeneratedField::RoomName => { + if room_name__.is_some() { + return Err(serde::de::Error::duplicate_field("roomName")); } - request_id__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + room_name__ = Some(map_.next_value()?); } - GeneratedField::Reason => { - if reason__.is_some() { - return Err(serde::de::Error::duplicate_field("reason")); + GeneratedField::Layout => { + if layout__.is_some() { + return Err(serde::de::Error::duplicate_field("layout")); } - reason__ = Some(map_.next_value::()? as i32); + layout__ = Some(map_.next_value()?); } - GeneratedField::Message => { - if message__.is_some() { - return Err(serde::de::Error::duplicate_field("message")); + GeneratedField::AudioOnly => { + if audio_only__.is_some() { + return Err(serde::de::Error::duplicate_field("audioOnly")); } - message__ = Some(map_.next_value()?); + audio_only__ = Some(map_.next_value()?); + } + GeneratedField::VideoOnly => { + if video_only__.is_some() { + return Err(serde::de::Error::duplicate_field("videoOnly")); + } + video_only__ = Some(map_.next_value()?); + } + GeneratedField::CustomBaseUrl => { + if custom_base_url__.is_some() { + return Err(serde::de::Error::duplicate_field("customBaseUrl")); + } + custom_base_url__ = Some(map_.next_value()?); + } + GeneratedField::FileOutputs => { + if file_outputs__.is_some() { + return Err(serde::de::Error::duplicate_field("fileOutputs")); + } + file_outputs__ = Some(map_.next_value()?); + } + GeneratedField::StreamOutputs => { + if stream_outputs__.is_some() { + return Err(serde::de::Error::duplicate_field("streamOutputs")); + } + stream_outputs__ = Some(map_.next_value()?); + } + GeneratedField::SegmentOutputs => { + if segment_outputs__.is_some() { + return Err(serde::de::Error::duplicate_field("segmentOutputs")); + } + segment_outputs__ = Some(map_.next_value()?); + } + GeneratedField::ImageOutputs => { + if image_outputs__.is_some() { + return Err(serde::de::Error::duplicate_field("imageOutputs")); + } + image_outputs__ = Some(map_.next_value()?); + } + GeneratedField::File => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("file")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Output::File) +; + } + GeneratedField::Stream => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("stream")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Output::Stream) +; + } + GeneratedField::Segments => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("segments")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Output::Segments) +; + } + GeneratedField::Preset => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("preset")); + } + options__ = map_.next_value::<::std::option::Option>()?.map(|x| room_composite_egress_request::Options::Preset(x as i32)); + } + GeneratedField::Advanced => { + if options__.is_some() { + return Err(serde::de::Error::duplicate_field("advanced")); + } + options__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Options::Advanced) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RequestResponse { - request_id: request_id__.unwrap_or_default(), - reason: reason__.unwrap_or_default(), - message: message__.unwrap_or_default(), + Ok(RoomCompositeEgressRequest { + room_name: room_name__.unwrap_or_default(), + layout: layout__.unwrap_or_default(), + audio_only: audio_only__.unwrap_or_default(), + video_only: video_only__.unwrap_or_default(), + custom_base_url: custom_base_url__.unwrap_or_default(), + file_outputs: file_outputs__.unwrap_or_default(), + stream_outputs: stream_outputs__.unwrap_or_default(), + segment_outputs: segment_outputs__.unwrap_or_default(), + image_outputs: image_outputs__.unwrap_or_default(), + output: output__, + options: options__, }) } } - deserializer.deserialize_struct("livekit.RequestResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for request_response::Reason { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Ok => "OK", - Self::NotFound => "NOT_FOUND", - Self::NotAllowed => "NOT_ALLOWED", - Self::LimitExceeded => "LIMIT_EXCEEDED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for request_response::Reason { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "OK", - "NOT_FOUND", - "NOT_ALLOWED", - "LIMIT_EXCEEDED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = request_response::Reason; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "OK" => Ok(request_response::Reason::Ok), - "NOT_FOUND" => Ok(request_response::Reason::NotFound), - "NOT_ALLOWED" => Ok(request_response::Reason::NotAllowed), - "LIMIT_EXCEEDED" => Ok(request_response::Reason::LimitExceeded), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.RoomCompositeEgressRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for Room { +impl serde::Serialize for RoomConfiguration { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -17975,9 +20487,6 @@ impl serde::Serialize for Room { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sid.is_empty() { - len += 1; - } if !self.name.is_empty() { len += 1; } @@ -17990,34 +20499,22 @@ impl serde::Serialize for Room { if self.max_participants != 0 { len += 1; } - if self.creation_time != 0 { - len += 1; - } - if !self.turn_password.is_empty() { - len += 1; - } - if !self.enabled_codecs.is_empty() { - len += 1; - } - if !self.metadata.is_empty() { - len += 1; - } - if self.num_participants != 0 { + if self.egress.is_some() { len += 1; } - if self.num_publishers != 0 { + if self.agent.is_some() { len += 1; } - if self.active_recording { + if self.min_playout_delay != 0 { len += 1; } - if self.version.is_some() { + if self.max_playout_delay != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.Room", len)?; - if !self.sid.is_empty() { - struct_ser.serialize_field("sid", &self.sid)?; + if self.sync_streams { + len += 1; } + let mut struct_ser = serializer.serialize_struct("livekit.RoomConfiguration", len)?; if !self.name.is_empty() { struct_ser.serialize_field("name", &self.name)?; } @@ -18030,43 +20527,31 @@ impl serde::Serialize for Room { if self.max_participants != 0 { struct_ser.serialize_field("maxParticipants", &self.max_participants)?; } - if self.creation_time != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("creationTime", ToString::to_string(&self.creation_time).as_str())?; - } - if !self.turn_password.is_empty() { - struct_ser.serialize_field("turnPassword", &self.turn_password)?; - } - if !self.enabled_codecs.is_empty() { - struct_ser.serialize_field("enabledCodecs", &self.enabled_codecs)?; - } - if !self.metadata.is_empty() { - struct_ser.serialize_field("metadata", &self.metadata)?; + if let Some(v) = self.egress.as_ref() { + struct_ser.serialize_field("egress", v)?; } - if self.num_participants != 0 { - struct_ser.serialize_field("numParticipants", &self.num_participants)?; + if let Some(v) = self.agent.as_ref() { + struct_ser.serialize_field("agent", v)?; } - if self.num_publishers != 0 { - struct_ser.serialize_field("numPublishers", &self.num_publishers)?; + if self.min_playout_delay != 0 { + struct_ser.serialize_field("minPlayoutDelay", &self.min_playout_delay)?; } - if self.active_recording { - struct_ser.serialize_field("activeRecording", &self.active_recording)?; + if self.max_playout_delay != 0 { + struct_ser.serialize_field("maxPlayoutDelay", &self.max_playout_delay)?; } - if let Some(v) = self.version.as_ref() { - struct_ser.serialize_field("version", v)?; + if self.sync_streams { + struct_ser.serialize_field("syncStreams", &self.sync_streams)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for Room { +impl<'de> serde::Deserialize<'de> for RoomConfiguration { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sid", "name", "empty_timeout", "emptyTimeout", @@ -18074,37 +20559,27 @@ impl<'de> serde::Deserialize<'de> for Room { "departureTimeout", "max_participants", "maxParticipants", - "creation_time", - "creationTime", - "turn_password", - "turnPassword", - "enabled_codecs", - "enabledCodecs", - "metadata", - "num_participants", - "numParticipants", - "num_publishers", - "numPublishers", - "active_recording", - "activeRecording", - "version", + "egress", + "agent", + "min_playout_delay", + "minPlayoutDelay", + "max_playout_delay", + "maxPlayoutDelay", + "sync_streams", + "syncStreams", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sid, Name, EmptyTimeout, DepartureTimeout, MaxParticipants, - CreationTime, - TurnPassword, - EnabledCodecs, - Metadata, - NumParticipants, - NumPublishers, - ActiveRecording, - Version, + Egress, + Agent, + MinPlayoutDelay, + MaxPlayoutDelay, + SyncStreams, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -18127,19 +20602,15 @@ impl<'de> serde::Deserialize<'de> for Room { E: serde::de::Error, { match value { - "sid" => Ok(GeneratedField::Sid), "name" => Ok(GeneratedField::Name), "emptyTimeout" | "empty_timeout" => Ok(GeneratedField::EmptyTimeout), "departureTimeout" | "departure_timeout" => Ok(GeneratedField::DepartureTimeout), "maxParticipants" | "max_participants" => Ok(GeneratedField::MaxParticipants), - "creationTime" | "creation_time" => Ok(GeneratedField::CreationTime), - "turnPassword" | "turn_password" => Ok(GeneratedField::TurnPassword), - "enabledCodecs" | "enabled_codecs" => Ok(GeneratedField::EnabledCodecs), - "metadata" => Ok(GeneratedField::Metadata), - "numParticipants" | "num_participants" => Ok(GeneratedField::NumParticipants), - "numPublishers" | "num_publishers" => Ok(GeneratedField::NumPublishers), - "activeRecording" | "active_recording" => Ok(GeneratedField::ActiveRecording), - "version" => Ok(GeneratedField::Version), + "egress" => Ok(GeneratedField::Egress), + "agent" => Ok(GeneratedField::Agent), + "minPlayoutDelay" | "min_playout_delay" => Ok(GeneratedField::MinPlayoutDelay), + "maxPlayoutDelay" | "max_playout_delay" => Ok(GeneratedField::MaxPlayoutDelay), + "syncStreams" | "sync_streams" => Ok(GeneratedField::SyncStreams), _ => Ok(GeneratedField::__SkipField__), } } @@ -18149,37 +20620,27 @@ impl<'de> serde::Deserialize<'de> for Room { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Room; + type Value = RoomConfiguration; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.Room") + formatter.write_str("struct livekit.RoomConfiguration") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sid__ = None; let mut name__ = None; let mut empty_timeout__ = None; let mut departure_timeout__ = None; let mut max_participants__ = None; - let mut creation_time__ = None; - let mut turn_password__ = None; - let mut enabled_codecs__ = None; - let mut metadata__ = None; - let mut num_participants__ = None; - let mut num_publishers__ = None; - let mut active_recording__ = None; - let mut version__ = None; + let mut egress__ = None; + let mut agent__ = None; + let mut min_playout_delay__ = None; + let mut max_playout_delay__ = None; + let mut sync_streams__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Sid => { - if sid__.is_some() { - return Err(serde::de::Error::duplicate_field("sid")); - } - sid__ = Some(map_.next_value()?); - } GeneratedField::Name => { if name__.is_some() { return Err(serde::de::Error::duplicate_field("name")); @@ -18210,181 +20671,62 @@ impl<'de> serde::Deserialize<'de> for Room { Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::CreationTime => { - if creation_time__.is_some() { - return Err(serde::de::Error::duplicate_field("creationTime")); - } - creation_time__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TurnPassword => { - if turn_password__.is_some() { - return Err(serde::de::Error::duplicate_field("turnPassword")); - } - turn_password__ = Some(map_.next_value()?); - } - GeneratedField::EnabledCodecs => { - if enabled_codecs__.is_some() { - return Err(serde::de::Error::duplicate_field("enabledCodecs")); + GeneratedField::Egress => { + if egress__.is_some() { + return Err(serde::de::Error::duplicate_field("egress")); } - enabled_codecs__ = Some(map_.next_value()?); + egress__ = map_.next_value()?; } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); + GeneratedField::Agent => { + if agent__.is_some() { + return Err(serde::de::Error::duplicate_field("agent")); } - metadata__ = Some(map_.next_value()?); + agent__ = map_.next_value()?; } - GeneratedField::NumParticipants => { - if num_participants__.is_some() { - return Err(serde::de::Error::duplicate_field("numParticipants")); + GeneratedField::MinPlayoutDelay => { + if min_playout_delay__.is_some() { + return Err(serde::de::Error::duplicate_field("minPlayoutDelay")); } - num_participants__ = + min_playout_delay__ = Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::NumPublishers => { - if num_publishers__.is_some() { - return Err(serde::de::Error::duplicate_field("numPublishers")); + GeneratedField::MaxPlayoutDelay => { + if max_playout_delay__.is_some() { + return Err(serde::de::Error::duplicate_field("maxPlayoutDelay")); } - num_publishers__ = + max_playout_delay__ = Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ActiveRecording => { - if active_recording__.is_some() { - return Err(serde::de::Error::duplicate_field("activeRecording")); - } - active_recording__ = Some(map_.next_value()?); - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = map_.next_value()?; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } - } - Ok(Room { - sid: sid__.unwrap_or_default(), - name: name__.unwrap_or_default(), - empty_timeout: empty_timeout__.unwrap_or_default(), - departure_timeout: departure_timeout__.unwrap_or_default(), - max_participants: max_participants__.unwrap_or_default(), - creation_time: creation_time__.unwrap_or_default(), - turn_password: turn_password__.unwrap_or_default(), - enabled_codecs: enabled_codecs__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - num_participants: num_participants__.unwrap_or_default(), - num_publishers: num_publishers__.unwrap_or_default(), - active_recording: active_recording__.unwrap_or_default(), - version: version__, - }) - } - } - deserializer.deserialize_struct("livekit.Room", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RoomAgent { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.dispatches.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.RoomAgent", len)?; - if !self.dispatches.is_empty() { - struct_ser.serialize_field("dispatches", &self.dispatches)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RoomAgent { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "dispatches", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Dispatches, - __SkipField__, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "dispatches" => Ok(GeneratedField::Dispatches), - _ => Ok(GeneratedField::__SkipField__), + ; } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomAgent; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomAgent") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut dispatches__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Dispatches => { - if dispatches__.is_some() { - return Err(serde::de::Error::duplicate_field("dispatches")); + GeneratedField::SyncStreams => { + if sync_streams__.is_some() { + return Err(serde::de::Error::duplicate_field("syncStreams")); } - dispatches__ = Some(map_.next_value()?); + sync_streams__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomAgent { - dispatches: dispatches__.unwrap_or_default(), + Ok(RoomConfiguration { + name: name__.unwrap_or_default(), + empty_timeout: empty_timeout__.unwrap_or_default(), + departure_timeout: departure_timeout__.unwrap_or_default(), + max_participants: max_participants__.unwrap_or_default(), + egress: egress__, + agent: agent__, + min_playout_delay: min_playout_delay__.unwrap_or_default(), + max_playout_delay: max_playout_delay__.unwrap_or_default(), + sync_streams: sync_streams__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RoomAgent", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RoomConfiguration", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RoomAgentDispatch { +impl serde::Serialize for RoomEgress { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -18392,38 +20734,45 @@ impl serde::Serialize for RoomAgentDispatch { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.agent_name.is_empty() { + if self.room.is_some() { len += 1; } - if !self.metadata.is_empty() { + if self.participant.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RoomAgentDispatch", len)?; - if !self.agent_name.is_empty() { - struct_ser.serialize_field("agentName", &self.agent_name)?; + if self.tracks.is_some() { + len += 1; } - if !self.metadata.is_empty() { - struct_ser.serialize_field("metadata", &self.metadata)?; + let mut struct_ser = serializer.serialize_struct("livekit.RoomEgress", len)?; + if let Some(v) = self.room.as_ref() { + struct_ser.serialize_field("room", v)?; + } + if let Some(v) = self.participant.as_ref() { + struct_ser.serialize_field("participant", v)?; + } + if let Some(v) = self.tracks.as_ref() { + struct_ser.serialize_field("tracks", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RoomAgentDispatch { +impl<'de> serde::Deserialize<'de> for RoomEgress { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "agent_name", - "agentName", - "metadata", + "room", + "participant", + "tracks", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - AgentName, - Metadata, + Room, + Participant, + Tracks, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -18446,8 +20795,9 @@ impl<'de> serde::Deserialize<'de> for RoomAgentDispatch { E: serde::de::Error, { match value { - "agentName" | "agent_name" => Ok(GeneratedField::AgentName), - "metadata" => Ok(GeneratedField::Metadata), + "room" => Ok(GeneratedField::Room), + "participant" => Ok(GeneratedField::Participant), + "tracks" => Ok(GeneratedField::Tracks), _ => Ok(GeneratedField::__SkipField__), } } @@ -18457,47 +20807,55 @@ impl<'de> serde::Deserialize<'de> for RoomAgentDispatch { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomAgentDispatch; + type Value = RoomEgress; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomAgentDispatch") + formatter.write_str("struct livekit.RoomEgress") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut agent_name__ = None; - let mut metadata__ = None; + let mut room__ = None; + let mut participant__ = None; + let mut tracks__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::AgentName => { - if agent_name__.is_some() { - return Err(serde::de::Error::duplicate_field("agentName")); + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); } - agent_name__ = Some(map_.next_value()?); + room__ = map_.next_value()?; } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); + GeneratedField::Participant => { + if participant__.is_some() { + return Err(serde::de::Error::duplicate_field("participant")); } - metadata__ = Some(map_.next_value()?); + participant__ = map_.next_value()?; + } + GeneratedField::Tracks => { + if tracks__.is_some() { + return Err(serde::de::Error::duplicate_field("tracks")); + } + tracks__ = map_.next_value()?; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomAgentDispatch { - agent_name: agent_name__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), + Ok(RoomEgress { + room: room__, + participant: participant__, + tracks: tracks__, }) } } - deserializer.deserialize_struct("livekit.RoomAgentDispatch", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RoomEgress", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RoomCompositeEgressRequest { +impl serde::Serialize for RoomParticipantIdentity { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -18505,142 +20863,37 @@ impl serde::Serialize for RoomCompositeEgressRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.room_name.is_empty() { - len += 1; - } - if !self.layout.is_empty() { - len += 1; - } - if self.audio_only { - len += 1; - } - if self.video_only { - len += 1; - } - if !self.custom_base_url.is_empty() { - len += 1; - } - if !self.file_outputs.is_empty() { - len += 1; - } - if !self.stream_outputs.is_empty() { - len += 1; - } - if !self.segment_outputs.is_empty() { - len += 1; - } - if !self.image_outputs.is_empty() { - len += 1; - } - if self.output.is_some() { + if !self.room.is_empty() { len += 1; } - if self.options.is_some() { + if !self.identity.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RoomCompositeEgressRequest", len)?; - if !self.room_name.is_empty() { - struct_ser.serialize_field("roomName", &self.room_name)?; - } - if !self.layout.is_empty() { - struct_ser.serialize_field("layout", &self.layout)?; - } - if self.audio_only { - struct_ser.serialize_field("audioOnly", &self.audio_only)?; - } - if self.video_only { - struct_ser.serialize_field("videoOnly", &self.video_only)?; - } - if !self.custom_base_url.is_empty() { - struct_ser.serialize_field("customBaseUrl", &self.custom_base_url)?; - } - if !self.file_outputs.is_empty() { - struct_ser.serialize_field("fileOutputs", &self.file_outputs)?; - } - if !self.stream_outputs.is_empty() { - struct_ser.serialize_field("streamOutputs", &self.stream_outputs)?; - } - if !self.segment_outputs.is_empty() { - struct_ser.serialize_field("segmentOutputs", &self.segment_outputs)?; - } - if !self.image_outputs.is_empty() { - struct_ser.serialize_field("imageOutputs", &self.image_outputs)?; - } - if let Some(v) = self.output.as_ref() { - match v { - room_composite_egress_request::Output::File(v) => { - struct_ser.serialize_field("file", v)?; - } - room_composite_egress_request::Output::Stream(v) => { - struct_ser.serialize_field("stream", v)?; - } - room_composite_egress_request::Output::Segments(v) => { - struct_ser.serialize_field("segments", v)?; - } - } + let mut struct_ser = serializer.serialize_struct("livekit.RoomParticipantIdentity", len)?; + if !self.room.is_empty() { + struct_ser.serialize_field("room", &self.room)?; } - if let Some(v) = self.options.as_ref() { - match v { - room_composite_egress_request::Options::Preset(v) => { - let v = EncodingOptionsPreset::try_from(*v) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?; - struct_ser.serialize_field("preset", &v)?; - } - room_composite_egress_request::Options::Advanced(v) => { - struct_ser.serialize_field("advanced", v)?; - } - } + if !self.identity.is_empty() { + struct_ser.serialize_field("identity", &self.identity)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RoomCompositeEgressRequest { +impl<'de> serde::Deserialize<'de> for RoomParticipantIdentity { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "room_name", - "roomName", - "layout", - "audio_only", - "audioOnly", - "video_only", - "videoOnly", - "custom_base_url", - "customBaseUrl", - "file_outputs", - "fileOutputs", - "stream_outputs", - "streamOutputs", - "segment_outputs", - "segmentOutputs", - "image_outputs", - "imageOutputs", - "file", - "stream", - "segments", - "preset", - "advanced", + "room", + "identity", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - RoomName, - Layout, - AudioOnly, - VideoOnly, - CustomBaseUrl, - FileOutputs, - StreamOutputs, - SegmentOutputs, - ImageOutputs, - File, - Stream, - Segments, - Preset, - Advanced, + Room, + Identity, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -18663,20 +20916,8 @@ impl<'de> serde::Deserialize<'de> for RoomCompositeEgressRequest { E: serde::de::Error, { match value { - "roomName" | "room_name" => Ok(GeneratedField::RoomName), - "layout" => Ok(GeneratedField::Layout), - "audioOnly" | "audio_only" => Ok(GeneratedField::AudioOnly), - "videoOnly" | "video_only" => Ok(GeneratedField::VideoOnly), - "customBaseUrl" | "custom_base_url" => Ok(GeneratedField::CustomBaseUrl), - "fileOutputs" | "file_outputs" => Ok(GeneratedField::FileOutputs), - "streamOutputs" | "stream_outputs" => Ok(GeneratedField::StreamOutputs), - "segmentOutputs" | "segment_outputs" => Ok(GeneratedField::SegmentOutputs), - "imageOutputs" | "image_outputs" => Ok(GeneratedField::ImageOutputs), - "file" => Ok(GeneratedField::File), - "stream" => Ok(GeneratedField::Stream), - "segments" => Ok(GeneratedField::Segments), - "preset" => Ok(GeneratedField::Preset), - "advanced" => Ok(GeneratedField::Advanced), + "room" => Ok(GeneratedField::Room), + "identity" => Ok(GeneratedField::Identity), _ => Ok(GeneratedField::__SkipField__), } } @@ -18686,141 +20927,47 @@ impl<'de> serde::Deserialize<'de> for RoomCompositeEgressRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomCompositeEgressRequest; + type Value = RoomParticipantIdentity; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomCompositeEgressRequest") + formatter.write_str("struct livekit.RoomParticipantIdentity") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut room_name__ = None; - let mut layout__ = None; - let mut audio_only__ = None; - let mut video_only__ = None; - let mut custom_base_url__ = None; - let mut file_outputs__ = None; - let mut stream_outputs__ = None; - let mut segment_outputs__ = None; - let mut image_outputs__ = None; - let mut output__ = None; - let mut options__ = None; + let mut room__ = None; + let mut identity__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::RoomName => { - if room_name__.is_some() { - return Err(serde::de::Error::duplicate_field("roomName")); - } - room_name__ = Some(map_.next_value()?); - } - GeneratedField::Layout => { - if layout__.is_some() { - return Err(serde::de::Error::duplicate_field("layout")); - } - layout__ = Some(map_.next_value()?); - } - GeneratedField::AudioOnly => { - if audio_only__.is_some() { - return Err(serde::de::Error::duplicate_field("audioOnly")); - } - audio_only__ = Some(map_.next_value()?); - } - GeneratedField::VideoOnly => { - if video_only__.is_some() { - return Err(serde::de::Error::duplicate_field("videoOnly")); - } - video_only__ = Some(map_.next_value()?); - } - GeneratedField::CustomBaseUrl => { - if custom_base_url__.is_some() { - return Err(serde::de::Error::duplicate_field("customBaseUrl")); - } - custom_base_url__ = Some(map_.next_value()?); - } - GeneratedField::FileOutputs => { - if file_outputs__.is_some() { - return Err(serde::de::Error::duplicate_field("fileOutputs")); - } - file_outputs__ = Some(map_.next_value()?); - } - GeneratedField::StreamOutputs => { - if stream_outputs__.is_some() { - return Err(serde::de::Error::duplicate_field("streamOutputs")); - } - stream_outputs__ = Some(map_.next_value()?); - } - GeneratedField::SegmentOutputs => { - if segment_outputs__.is_some() { - return Err(serde::de::Error::duplicate_field("segmentOutputs")); - } - segment_outputs__ = Some(map_.next_value()?); - } - GeneratedField::ImageOutputs => { - if image_outputs__.is_some() { - return Err(serde::de::Error::duplicate_field("imageOutputs")); - } - image_outputs__ = Some(map_.next_value()?); - } - GeneratedField::File => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("file")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Output::File) -; - } - GeneratedField::Stream => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("stream")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Output::Stream) -; - } - GeneratedField::Segments => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("segments")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Output::Segments) -; - } - GeneratedField::Preset => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("preset")); + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); } - options__ = map_.next_value::<::std::option::Option>()?.map(|x| room_composite_egress_request::Options::Preset(x as i32)); + room__ = Some(map_.next_value()?); } - GeneratedField::Advanced => { - if options__.is_some() { - return Err(serde::de::Error::duplicate_field("advanced")); + GeneratedField::Identity => { + if identity__.is_some() { + return Err(serde::de::Error::duplicate_field("identity")); } - options__ = map_.next_value::<::std::option::Option<_>>()?.map(room_composite_egress_request::Options::Advanced) -; + identity__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomCompositeEgressRequest { - room_name: room_name__.unwrap_or_default(), - layout: layout__.unwrap_or_default(), - audio_only: audio_only__.unwrap_or_default(), - video_only: video_only__.unwrap_or_default(), - custom_base_url: custom_base_url__.unwrap_or_default(), - file_outputs: file_outputs__.unwrap_or_default(), - stream_outputs: stream_outputs__.unwrap_or_default(), - segment_outputs: segment_outputs__.unwrap_or_default(), - image_outputs: image_outputs__.unwrap_or_default(), - output: output__, - options: options__, + Ok(RoomParticipantIdentity { + room: room__.unwrap_or_default(), + identity: identity__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RoomCompositeEgressRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RoomParticipantIdentity", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RoomConfiguration { +impl serde::Serialize for RoomUpdate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -18828,99 +20975,125 @@ impl serde::Serialize for RoomConfiguration { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.name.is_empty() { - len += 1; - } - if self.empty_timeout != 0 { - len += 1; - } - if self.departure_timeout != 0 { - len += 1; - } - if self.max_participants != 0 { - len += 1; - } - if self.egress.is_some() { - len += 1; - } - if self.agent.is_some() { - len += 1; - } - if self.min_playout_delay != 0 { - len += 1; - } - if self.max_playout_delay != 0 { - len += 1; - } - if self.sync_streams { + if self.room.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RoomConfiguration", len)?; - if !self.name.is_empty() { - struct_ser.serialize_field("name", &self.name)?; - } - if self.empty_timeout != 0 { - struct_ser.serialize_field("emptyTimeout", &self.empty_timeout)?; - } - if self.departure_timeout != 0 { - struct_ser.serialize_field("departureTimeout", &self.departure_timeout)?; - } - if self.max_participants != 0 { - struct_ser.serialize_field("maxParticipants", &self.max_participants)?; + let mut struct_ser = serializer.serialize_struct("livekit.RoomUpdate", len)?; + if let Some(v) = self.room.as_ref() { + struct_ser.serialize_field("room", v)?; } - if let Some(v) = self.egress.as_ref() { - struct_ser.serialize_field("egress", v)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RoomUpdate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "room", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Room, + __SkipField__, } - if let Some(v) = self.agent.as_ref() { - struct_ser.serialize_field("agent", v)?; + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "room" => Ok(GeneratedField::Room), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } } - if self.min_playout_delay != 0 { - struct_ser.serialize_field("minPlayoutDelay", &self.min_playout_delay)?; + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RoomUpdate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RoomUpdate") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut room__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); + } + room__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(RoomUpdate { + room: room__, + }) + } } - if self.max_playout_delay != 0 { - struct_ser.serialize_field("maxPlayoutDelay", &self.max_playout_delay)?; + deserializer.deserialize_struct("livekit.RoomUpdate", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RpcAck { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.request_id.is_empty() { + len += 1; } - if self.sync_streams { - struct_ser.serialize_field("syncStreams", &self.sync_streams)?; + let mut struct_ser = serializer.serialize_struct("livekit.RpcAck", len)?; + if !self.request_id.is_empty() { + struct_ser.serialize_field("requestId", &self.request_id)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RoomConfiguration { +impl<'de> serde::Deserialize<'de> for RpcAck { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "name", - "empty_timeout", - "emptyTimeout", - "departure_timeout", - "departureTimeout", - "max_participants", - "maxParticipants", - "egress", - "agent", - "min_playout_delay", - "minPlayoutDelay", - "max_playout_delay", - "maxPlayoutDelay", - "sync_streams", - "syncStreams", + "request_id", + "requestId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Name, - EmptyTimeout, - DepartureTimeout, - MaxParticipants, - Egress, - Agent, - MinPlayoutDelay, - MaxPlayoutDelay, - SyncStreams, + RequestId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -18943,15 +21116,7 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { E: serde::de::Error, { match value { - "name" => Ok(GeneratedField::Name), - "emptyTimeout" | "empty_timeout" => Ok(GeneratedField::EmptyTimeout), - "departureTimeout" | "departure_timeout" => Ok(GeneratedField::DepartureTimeout), - "maxParticipants" | "max_participants" => Ok(GeneratedField::MaxParticipants), - "egress" => Ok(GeneratedField::Egress), - "agent" => Ok(GeneratedField::Agent), - "minPlayoutDelay" | "min_playout_delay" => Ok(GeneratedField::MinPlayoutDelay), - "maxPlayoutDelay" | "max_playout_delay" => Ok(GeneratedField::MaxPlayoutDelay), - "syncStreams" | "sync_streams" => Ok(GeneratedField::SyncStreams), + "requestId" | "request_id" => Ok(GeneratedField::RequestId), _ => Ok(GeneratedField::__SkipField__), } } @@ -18961,113 +21126,39 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomConfiguration; + type Value = RpcAck; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomConfiguration") + formatter.write_str("struct livekit.RpcAck") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut name__ = None; - let mut empty_timeout__ = None; - let mut departure_timeout__ = None; - let mut max_participants__ = None; - let mut egress__ = None; - let mut agent__ = None; - let mut min_playout_delay__ = None; - let mut max_playout_delay__ = None; - let mut sync_streams__ = None; + let mut request_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::EmptyTimeout => { - if empty_timeout__.is_some() { - return Err(serde::de::Error::duplicate_field("emptyTimeout")); - } - empty_timeout__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::DepartureTimeout => { - if departure_timeout__.is_some() { - return Err(serde::de::Error::duplicate_field("departureTimeout")); - } - departure_timeout__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::MaxParticipants => { - if max_participants__.is_some() { - return Err(serde::de::Error::duplicate_field("maxParticipants")); - } - max_participants__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Egress => { - if egress__.is_some() { - return Err(serde::de::Error::duplicate_field("egress")); - } - egress__ = map_.next_value()?; - } - GeneratedField::Agent => { - if agent__.is_some() { - return Err(serde::de::Error::duplicate_field("agent")); - } - agent__ = map_.next_value()?; - } - GeneratedField::MinPlayoutDelay => { - if min_playout_delay__.is_some() { - return Err(serde::de::Error::duplicate_field("minPlayoutDelay")); - } - min_playout_delay__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::MaxPlayoutDelay => { - if max_playout_delay__.is_some() { - return Err(serde::de::Error::duplicate_field("maxPlayoutDelay")); - } - max_playout_delay__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::SyncStreams => { - if sync_streams__.is_some() { - return Err(serde::de::Error::duplicate_field("syncStreams")); + GeneratedField::RequestId => { + if request_id__.is_some() { + return Err(serde::de::Error::duplicate_field("requestId")); } - sync_streams__ = Some(map_.next_value()?); + request_id__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomConfiguration { - name: name__.unwrap_or_default(), - empty_timeout: empty_timeout__.unwrap_or_default(), - departure_timeout: departure_timeout__.unwrap_or_default(), - max_participants: max_participants__.unwrap_or_default(), - egress: egress__, - agent: agent__, - min_playout_delay: min_playout_delay__.unwrap_or_default(), - max_playout_delay: max_playout_delay__.unwrap_or_default(), - sync_streams: sync_streams__.unwrap_or_default(), + Ok(RpcAck { + request_id: request_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RoomConfiguration", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RpcAck", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RoomEgress { +impl serde::Serialize for RpcError { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -19075,45 +21166,45 @@ impl serde::Serialize for RoomEgress { { use serde::ser::SerializeStruct; let mut len = 0; - if self.room.is_some() { + if self.code != 0 { len += 1; } - if self.participant.is_some() { + if !self.message.is_empty() { len += 1; } - if self.tracks.is_some() { + if !self.data.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RoomEgress", len)?; - if let Some(v) = self.room.as_ref() { - struct_ser.serialize_field("room", v)?; + let mut struct_ser = serializer.serialize_struct("livekit.RpcError", len)?; + if self.code != 0 { + struct_ser.serialize_field("code", &self.code)?; } - if let Some(v) = self.participant.as_ref() { - struct_ser.serialize_field("participant", v)?; + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; } - if let Some(v) = self.tracks.as_ref() { - struct_ser.serialize_field("tracks", v)?; + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RoomEgress { +impl<'de> serde::Deserialize<'de> for RpcError { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "room", - "participant", - "tracks", + "code", + "message", + "data", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Room, - Participant, - Tracks, + Code, + Message, + Data, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -19136,9 +21227,9 @@ impl<'de> serde::Deserialize<'de> for RoomEgress { E: serde::de::Error, { match value { - "room" => Ok(GeneratedField::Room), - "participant" => Ok(GeneratedField::Participant), - "tracks" => Ok(GeneratedField::Tracks), + "code" => Ok(GeneratedField::Code), + "message" => Ok(GeneratedField::Message), + "data" => Ok(GeneratedField::Data), _ => Ok(GeneratedField::__SkipField__), } } @@ -19148,55 +21239,57 @@ impl<'de> serde::Deserialize<'de> for RoomEgress { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomEgress; + type Value = RpcError; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomEgress") + formatter.write_str("struct livekit.RpcError") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut room__ = None; - let mut participant__ = None; - let mut tracks__ = None; + let mut code__ = None; + let mut message__ = None; + let mut data__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Room => { - if room__.is_some() { - return Err(serde::de::Error::duplicate_field("room")); + GeneratedField::Code => { + if code__.is_some() { + return Err(serde::de::Error::duplicate_field("code")); } - room__ = map_.next_value()?; + code__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Participant => { - if participant__.is_some() { - return Err(serde::de::Error::duplicate_field("participant")); + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); } - participant__ = map_.next_value()?; + message__ = Some(map_.next_value()?); } - GeneratedField::Tracks => { - if tracks__.is_some() { - return Err(serde::de::Error::duplicate_field("tracks")); + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); } - tracks__ = map_.next_value()?; + data__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomEgress { - room: room__, - participant: participant__, - tracks: tracks__, + Ok(RpcError { + code: code__.unwrap_or_default(), + message: message__.unwrap_or_default(), + data: data__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RoomEgress", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RpcError", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RoomParticipantIdentity { +impl serde::Serialize for RpcRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -19204,37 +21297,62 @@ impl serde::Serialize for RoomParticipantIdentity { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.room.is_empty() { + if !self.id.is_empty() { len += 1; } - if !self.identity.is_empty() { + if !self.method.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RoomParticipantIdentity", len)?; - if !self.room.is_empty() { - struct_ser.serialize_field("room", &self.room)?; + if !self.payload.is_empty() { + len += 1; + } + if self.response_timeout_ms != 0 { + len += 1; + } + if self.version != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RpcRequest", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.method.is_empty() { + struct_ser.serialize_field("method", &self.method)?; + } + if !self.payload.is_empty() { + struct_ser.serialize_field("payload", &self.payload)?; + } + if self.response_timeout_ms != 0 { + struct_ser.serialize_field("responseTimeoutMs", &self.response_timeout_ms)?; } - if !self.identity.is_empty() { - struct_ser.serialize_field("identity", &self.identity)?; + if self.version != 0 { + struct_ser.serialize_field("version", &self.version)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RoomParticipantIdentity { +impl<'de> serde::Deserialize<'de> for RpcRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "room", - "identity", + "id", + "method", + "payload", + "response_timeout_ms", + "responseTimeoutMs", + "version", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Room, - Identity, + Id, + Method, + Payload, + ResponseTimeoutMs, + Version, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -19257,8 +21375,11 @@ impl<'de> serde::Deserialize<'de> for RoomParticipantIdentity { E: serde::de::Error, { match value { - "room" => Ok(GeneratedField::Room), - "identity" => Ok(GeneratedField::Identity), + "id" => Ok(GeneratedField::Id), + "method" => Ok(GeneratedField::Method), + "payload" => Ok(GeneratedField::Payload), + "responseTimeoutMs" | "response_timeout_ms" => Ok(GeneratedField::ResponseTimeoutMs), + "version" => Ok(GeneratedField::Version), _ => Ok(GeneratedField::__SkipField__), } } @@ -19268,47 +21389,75 @@ impl<'de> serde::Deserialize<'de> for RoomParticipantIdentity { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomParticipantIdentity; + type Value = RpcRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomParticipantIdentity") + formatter.write_str("struct livekit.RpcRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut room__ = None; - let mut identity__ = None; + let mut id__ = None; + let mut method__ = None; + let mut payload__ = None; + let mut response_timeout_ms__ = None; + let mut version__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Room => { - if room__.is_some() { - return Err(serde::de::Error::duplicate_field("room")); + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); } - room__ = Some(map_.next_value()?); + id__ = Some(map_.next_value()?); } - GeneratedField::Identity => { - if identity__.is_some() { - return Err(serde::de::Error::duplicate_field("identity")); + GeneratedField::Method => { + if method__.is_some() { + return Err(serde::de::Error::duplicate_field("method")); } - identity__ = Some(map_.next_value()?); + method__ = Some(map_.next_value()?); + } + GeneratedField::Payload => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("payload")); + } + payload__ = Some(map_.next_value()?); + } + GeneratedField::ResponseTimeoutMs => { + if response_timeout_ms__.is_some() { + return Err(serde::de::Error::duplicate_field("responseTimeoutMs")); + } + response_timeout_ms__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomParticipantIdentity { - room: room__.unwrap_or_default(), - identity: identity__.unwrap_or_default(), + Ok(RpcRequest { + id: id__.unwrap_or_default(), + method: method__.unwrap_or_default(), + payload: payload__.unwrap_or_default(), + response_timeout_ms: response_timeout_ms__.unwrap_or_default(), + version: version__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.RoomParticipantIdentity", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RpcRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RoomUpdate { +impl serde::Serialize for RpcResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -19316,29 +21465,47 @@ impl serde::Serialize for RoomUpdate { { use serde::ser::SerializeStruct; let mut len = 0; - if self.room.is_some() { + if !self.request_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.RoomUpdate", len)?; - if let Some(v) = self.room.as_ref() { - struct_ser.serialize_field("room", v)?; + if self.value.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RpcResponse", len)?; + if !self.request_id.is_empty() { + struct_ser.serialize_field("requestId", &self.request_id)?; + } + if let Some(v) = self.value.as_ref() { + match v { + rpc_response::Value::Payload(v) => { + struct_ser.serialize_field("payload", v)?; + } + rpc_response::Value::Error(v) => { + struct_ser.serialize_field("error", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RoomUpdate { +impl<'de> serde::Deserialize<'de> for RpcResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "room", + "request_id", + "requestId", + "payload", + "error", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Room, + RequestId, + Payload, + Error, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -19361,7 +21528,9 @@ impl<'de> serde::Deserialize<'de> for RoomUpdate { E: serde::de::Error, { match value { - "room" => Ok(GeneratedField::Room), + "requestId" | "request_id" => Ok(GeneratedField::RequestId), + "payload" => Ok(GeneratedField::Payload), + "error" => Ok(GeneratedField::Error), _ => Ok(GeneratedField::__SkipField__), } } @@ -19371,36 +21540,51 @@ impl<'de> serde::Deserialize<'de> for RoomUpdate { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RoomUpdate; + type Value = RpcResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RoomUpdate") + formatter.write_str("struct livekit.RpcResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut room__ = None; + let mut request_id__ = None; + let mut value__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Room => { - if room__.is_some() { - return Err(serde::de::Error::duplicate_field("room")); + GeneratedField::RequestId => { + if request_id__.is_some() { + return Err(serde::de::Error::duplicate_field("requestId")); } - room__ = map_.next_value()?; + request_id__ = Some(map_.next_value()?); + } + GeneratedField::Payload => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("payload")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(rpc_response::Value::Payload); + } + GeneratedField::Error => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("error")); + } + value__ = map_.next_value::<::std::option::Option<_>>()?.map(rpc_response::Value::Error) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(RoomUpdate { - room: room__, + Ok(RpcResponse { + request_id: request_id__.unwrap_or_default(), + value: value__, }) } } - deserializer.deserialize_struct("livekit.RoomUpdate", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RpcResponse", FIELDS, GeneratedVisitor) } } impl serde::Serialize for S3Upload { @@ -19694,6 +21878,9 @@ impl serde::Serialize for SipDispatchRule { sip_dispatch_rule::Rule::DispatchRuleIndividual(v) => { struct_ser.serialize_field("dispatchRuleIndividual", v)?; } + sip_dispatch_rule::Rule::DispatchRuleCallee(v) => { + struct_ser.serialize_field("dispatchRuleCallee", v)?; + } } } struct_ser.end() @@ -19710,12 +21897,15 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRule { "dispatchRuleDirect", "dispatch_rule_individual", "dispatchRuleIndividual", + "dispatch_rule_callee", + "dispatchRuleCallee", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { DispatchRuleDirect, DispatchRuleIndividual, + DispatchRuleCallee, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -19740,6 +21930,7 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRule { match value { "dispatchRuleDirect" | "dispatch_rule_direct" => Ok(GeneratedField::DispatchRuleDirect), "dispatchRuleIndividual" | "dispatch_rule_individual" => Ok(GeneratedField::DispatchRuleIndividual), + "dispatchRuleCallee" | "dispatch_rule_callee" => Ok(GeneratedField::DispatchRuleCallee), _ => Ok(GeneratedField::__SkipField__), } } @@ -19774,6 +21965,13 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRule { return Err(serde::de::Error::duplicate_field("dispatchRuleIndividual")); } rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleIndividual) +; + } + GeneratedField::DispatchRuleCallee => { + if rule__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatchRuleCallee")); + } + rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleCallee) ; } GeneratedField::__SkipField__ => { @@ -19789,6 +21987,136 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRule { deserializer.deserialize_struct("livekit.SIPDispatchRule", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for SipDispatchRuleCallee { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.room_prefix.is_empty() { + len += 1; + } + if !self.pin.is_empty() { + len += 1; + } + if self.randomize { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.SIPDispatchRuleCallee", len)?; + if !self.room_prefix.is_empty() { + struct_ser.serialize_field("roomPrefix", &self.room_prefix)?; + } + if !self.pin.is_empty() { + struct_ser.serialize_field("pin", &self.pin)?; + } + if self.randomize { + struct_ser.serialize_field("randomize", &self.randomize)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SipDispatchRuleCallee { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "room_prefix", + "roomPrefix", + "pin", + "randomize", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RoomPrefix, + Pin, + Randomize, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "roomPrefix" | "room_prefix" => Ok(GeneratedField::RoomPrefix), + "pin" => Ok(GeneratedField::Pin), + "randomize" => Ok(GeneratedField::Randomize), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SipDispatchRuleCallee; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.SIPDispatchRuleCallee") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut room_prefix__ = None; + let mut pin__ = None; + let mut randomize__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::RoomPrefix => { + if room_prefix__.is_some() { + return Err(serde::de::Error::duplicate_field("roomPrefix")); + } + room_prefix__ = Some(map_.next_value()?); + } + GeneratedField::Pin => { + if pin__.is_some() { + return Err(serde::de::Error::duplicate_field("pin")); + } + pin__ = Some(map_.next_value()?); + } + GeneratedField::Randomize => { + if randomize__.is_some() { + return Err(serde::de::Error::duplicate_field("randomize")); + } + randomize__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(SipDispatchRuleCallee { + room_prefix: room_prefix__.unwrap_or_default(), + pin: pin__.unwrap_or_default(), + randomize: randomize__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.SIPDispatchRuleCallee", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for SipDispatchRuleDirect { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -20267,6 +22595,12 @@ impl serde::Serialize for SipInboundTrunkInfo { if !self.auth_password.is_empty() { len += 1; } + if !self.headers.is_empty() { + len += 1; + } + if !self.headers_to_attributes.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.SIPInboundTrunkInfo", len)?; if !self.sip_trunk_id.is_empty() { struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; @@ -20292,6 +22626,12 @@ impl serde::Serialize for SipInboundTrunkInfo { if !self.auth_password.is_empty() { struct_ser.serialize_field("authPassword", &self.auth_password)?; } + if !self.headers.is_empty() { + struct_ser.serialize_field("headers", &self.headers)?; + } + if !self.headers_to_attributes.is_empty() { + struct_ser.serialize_field("headersToAttributes", &self.headers_to_attributes)?; + } struct_ser.end() } } @@ -20315,6 +22655,9 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { "authUsername", "auth_password", "authPassword", + "headers", + "headers_to_attributes", + "headersToAttributes", ]; #[allow(clippy::enum_variant_names)] @@ -20327,6 +22670,8 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { AllowedNumbers, AuthUsername, AuthPassword, + Headers, + HeadersToAttributes, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -20357,6 +22702,8 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { "allowedNumbers" | "allowed_numbers" => Ok(GeneratedField::AllowedNumbers), "authUsername" | "auth_username" => Ok(GeneratedField::AuthUsername), "authPassword" | "auth_password" => Ok(GeneratedField::AuthPassword), + "headers" => Ok(GeneratedField::Headers), + "headersToAttributes" | "headers_to_attributes" => Ok(GeneratedField::HeadersToAttributes), _ => Ok(GeneratedField::__SkipField__), } } @@ -20384,6 +22731,8 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { let mut allowed_numbers__ = None; let mut auth_username__ = None; let mut auth_password__ = None; + let mut headers__ = None; + let mut headers_to_attributes__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SipTrunkId => { @@ -20434,6 +22783,22 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { } auth_password__ = Some(map_.next_value()?); } + GeneratedField::Headers => { + if headers__.is_some() { + return Err(serde::de::Error::duplicate_field("headers")); + } + headers__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::HeadersToAttributes => { + if headers_to_attributes__.is_some() { + return Err(serde::de::Error::duplicate_field("headersToAttributes")); + } + headers_to_attributes__ = Some( + map_.next_value::>()? + ); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -20448,6 +22813,8 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { allowed_numbers: allowed_numbers__.unwrap_or_default(), auth_username: auth_username__.unwrap_or_default(), auth_password: auth_password__.unwrap_or_default(), + headers: headers__.unwrap_or_default(), + headers_to_attributes: headers_to_attributes__.unwrap_or_default(), }) } } @@ -20480,10 +22847,16 @@ impl serde::Serialize for SipOutboundTrunkInfo { if !self.numbers.is_empty() { len += 1; } - if !self.auth_username.is_empty() { + if !self.auth_username.is_empty() { + len += 1; + } + if !self.auth_password.is_empty() { + len += 1; + } + if !self.headers.is_empty() { len += 1; } - if !self.auth_password.is_empty() { + if !self.headers_to_attributes.is_empty() { len += 1; } let mut struct_ser = serializer.serialize_struct("livekit.SIPOutboundTrunkInfo", len)?; @@ -20513,6 +22886,12 @@ impl serde::Serialize for SipOutboundTrunkInfo { if !self.auth_password.is_empty() { struct_ser.serialize_field("authPassword", &self.auth_password)?; } + if !self.headers.is_empty() { + struct_ser.serialize_field("headers", &self.headers)?; + } + if !self.headers_to_attributes.is_empty() { + struct_ser.serialize_field("headersToAttributes", &self.headers_to_attributes)?; + } struct_ser.end() } } @@ -20534,6 +22913,9 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { "authUsername", "auth_password", "authPassword", + "headers", + "headers_to_attributes", + "headersToAttributes", ]; #[allow(clippy::enum_variant_names)] @@ -20546,6 +22928,8 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { Numbers, AuthUsername, AuthPassword, + Headers, + HeadersToAttributes, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -20576,6 +22960,8 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { "numbers" => Ok(GeneratedField::Numbers), "authUsername" | "auth_username" => Ok(GeneratedField::AuthUsername), "authPassword" | "auth_password" => Ok(GeneratedField::AuthPassword), + "headers" => Ok(GeneratedField::Headers), + "headersToAttributes" | "headers_to_attributes" => Ok(GeneratedField::HeadersToAttributes), _ => Ok(GeneratedField::__SkipField__), } } @@ -20603,6 +22989,8 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { let mut numbers__ = None; let mut auth_username__ = None; let mut auth_password__ = None; + let mut headers__ = None; + let mut headers_to_attributes__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SipTrunkId => { @@ -20653,6 +23041,22 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { } auth_password__ = Some(map_.next_value()?); } + GeneratedField::Headers => { + if headers__.is_some() { + return Err(serde::de::Error::duplicate_field("headers")); + } + headers__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::HeadersToAttributes => { + if headers_to_attributes__.is_some() { + return Err(serde::de::Error::duplicate_field("headersToAttributes")); + } + headers_to_attributes__ = Some( + map_.next_value::>()? + ); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -20667,6 +23071,8 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { numbers: numbers__.unwrap_or_default(), auth_username: auth_username__.unwrap_or_default(), auth_password: auth_password__.unwrap_or_default(), + headers: headers__.unwrap_or_default(), + headers_to_attributes: headers_to_attributes__.unwrap_or_default(), }) } } @@ -26411,6 +28817,179 @@ impl<'de> serde::Deserialize<'de> for SyncState { deserializer.deserialize_struct("livekit.SyncState", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for TimeSeriesMetric { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.label != 0 { + len += 1; + } + if self.participant_identity != 0 { + len += 1; + } + if self.track_sid != 0 { + len += 1; + } + if !self.samples.is_empty() { + len += 1; + } + if self.rid != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.TimeSeriesMetric", len)?; + if self.label != 0 { + struct_ser.serialize_field("label", &self.label)?; + } + if self.participant_identity != 0 { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if self.track_sid != 0 { + struct_ser.serialize_field("trackSid", &self.track_sid)?; + } + if !self.samples.is_empty() { + struct_ser.serialize_field("samples", &self.samples)?; + } + if self.rid != 0 { + struct_ser.serialize_field("rid", &self.rid)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "label", + "participant_identity", + "participantIdentity", + "track_sid", + "trackSid", + "samples", + "rid", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Label, + ParticipantIdentity, + TrackSid, + Samples, + Rid, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "label" => Ok(GeneratedField::Label), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "trackSid" | "track_sid" => Ok(GeneratedField::TrackSid), + "samples" => Ok(GeneratedField::Samples), + "rid" => Ok(GeneratedField::Rid), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TimeSeriesMetric; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.TimeSeriesMetric") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut label__ = None; + let mut participant_identity__ = None; + let mut track_sid__ = None; + let mut samples__ = None; + let mut rid__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::TrackSid => { + if track_sid__.is_some() { + return Err(serde::de::Error::duplicate_field("trackSid")); + } + track_sid__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Samples => { + if samples__.is_some() { + return Err(serde::de::Error::duplicate_field("samples")); + } + samples__ = Some(map_.next_value()?); + } + GeneratedField::Rid => { + if rid__.is_some() { + return Err(serde::de::Error::duplicate_field("rid")); + } + rid__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(TimeSeriesMetric { + label: label__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + track_sid: track_sid__.unwrap_or_default(), + samples: samples__.unwrap_or_default(), + rid: rid__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.TimeSeriesMetric", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for TimedVersion { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -28315,6 +30894,138 @@ impl<'de> serde::Deserialize<'de> for TranscriptionSegment { deserializer.deserialize_struct("livekit.TranscriptionSegment", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for TransferSipParticipantRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.participant_identity.is_empty() { + len += 1; + } + if !self.room_name.is_empty() { + len += 1; + } + if !self.transfer_to.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.TransferSIPParticipantRequest", len)?; + if !self.participant_identity.is_empty() { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + if !self.transfer_to.is_empty() { + struct_ser.serialize_field("transferTo", &self.transfer_to)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "participant_identity", + "participantIdentity", + "room_name", + "roomName", + "transfer_to", + "transferTo", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ParticipantIdentity, + RoomName, + TransferTo, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + "transferTo" | "transfer_to" => Ok(GeneratedField::TransferTo), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TransferSipParticipantRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.TransferSIPParticipantRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut participant_identity__ = None; + let mut room_name__ = None; + let mut transfer_to__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = Some(map_.next_value()?); + } + GeneratedField::RoomName => { + if room_name__.is_some() { + return Err(serde::de::Error::duplicate_field("roomName")); + } + room_name__ = Some(map_.next_value()?); + } + GeneratedField::TransferTo => { + if transfer_to__.is_some() { + return Err(serde::de::Error::duplicate_field("transferTo")); + } + transfer_to__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(TransferSipParticipantRequest { + participant_identity: participant_identity__.unwrap_or_default(), + room_name: room_name__.unwrap_or_default(), + transfer_to: transfer_to__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.TransferSIPParticipantRequest", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for TrickleRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result From c109ba40dd864b797322ea411c452b984fcf48bc Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 00:51:16 +0000 Subject: [PATCH 02/16] generated protobuf --- livekit-protocol/src/livekit.rs | 690 +++++++++++++++++++++----------- 1 file changed, 456 insertions(+), 234 deletions(-) diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index d3f11ac4..19181c25 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -1,5 +1,6 @@ // @generated // This file is @generated by prost-build. +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MetricsBatch { /// time at which this batch is sent based on a monotonic clock (millisecond resolution) @@ -20,6 +21,7 @@ pub struct MetricsBatch { #[prost(message, repeated, tag="5")] pub events: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TimeSeriesMetric { /// Metric name e.g "speech_probablity". The string value is not directly stored in the message, but referenced by index @@ -38,7 +40,8 @@ pub struct TimeSeriesMetric { #[prost(uint32, tag="5")] pub rid: u32, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct MetricSample { /// time of metric based on a monotonic clock (in milliseconds) #[prost(int64, tag="1")] @@ -48,6 +51,7 @@ pub struct MetricSample { #[prost(float, tag="3")] pub value: f32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EventMetric { #[prost(uint32, tag="1")] @@ -129,24 +133,24 @@ impl MetricLabel { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::AgentsLlmTtft => "AGENTS_LLM_TTFT", - Self::AgentsSttTtft => "AGENTS_STT_TTFT", - Self::AgentsTtsTtfb => "AGENTS_TTS_TTFB", - Self::ClientVideoSubscriberFreezeCount => "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT", - Self::ClientVideoSubscriberTotalFreezeDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION", - Self::ClientVideoSubscriberPauseCount => "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT", - Self::ClientVideoSubscriberTotalPausesDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION", - Self::ClientAudioSubscriberConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES", - Self::ClientAudioSubscriberSilentConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES", - Self::ClientAudioSubscriberConcealmentEvents => "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS", - Self::ClientAudioSubscriberInterruptionCount => "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT", - Self::ClientAudioSubscriberTotalInterruptionDuration => "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION", - Self::ClientSubscriberJitterBufferDelay => "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY", - Self::ClientSubscriberJitterBufferEmittedCount => "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT", - Self::ClientVideoPublisherQualityLimitationDurationBandwidth => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", - Self::ClientVideoPublisherQualityLimitationDurationCpu => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", - Self::ClientVideoPublisherQualityLimitationDurationOther => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", - Self::PredefinedMaxValue => "METRIC_LABEL_PREDEFINED_MAX_VALUE", + MetricLabel::AgentsLlmTtft => "AGENTS_LLM_TTFT", + MetricLabel::AgentsSttTtft => "AGENTS_STT_TTFT", + MetricLabel::AgentsTtsTtfb => "AGENTS_TTS_TTFB", + MetricLabel::ClientVideoSubscriberFreezeCount => "CLIENT_VIDEO_SUBSCRIBER_FREEZE_COUNT", + MetricLabel::ClientVideoSubscriberTotalFreezeDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_FREEZE_DURATION", + MetricLabel::ClientVideoSubscriberPauseCount => "CLIENT_VIDEO_SUBSCRIBER_PAUSE_COUNT", + MetricLabel::ClientVideoSubscriberTotalPausesDuration => "CLIENT_VIDEO_SUBSCRIBER_TOTAL_PAUSES_DURATION", + MetricLabel::ClientAudioSubscriberConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_CONCEALED_SAMPLES", + MetricLabel::ClientAudioSubscriberSilentConcealedSamples => "CLIENT_AUDIO_SUBSCRIBER_SILENT_CONCEALED_SAMPLES", + MetricLabel::ClientAudioSubscriberConcealmentEvents => "CLIENT_AUDIO_SUBSCRIBER_CONCEALMENT_EVENTS", + MetricLabel::ClientAudioSubscriberInterruptionCount => "CLIENT_AUDIO_SUBSCRIBER_INTERRUPTION_COUNT", + MetricLabel::ClientAudioSubscriberTotalInterruptionDuration => "CLIENT_AUDIO_SUBSCRIBER_TOTAL_INTERRUPTION_DURATION", + MetricLabel::ClientSubscriberJitterBufferDelay => "CLIENT_SUBSCRIBER_JITTER_BUFFER_DELAY", + MetricLabel::ClientSubscriberJitterBufferEmittedCount => "CLIENT_SUBSCRIBER_JITTER_BUFFER_EMITTED_COUNT", + MetricLabel::ClientVideoPublisherQualityLimitationDurationBandwidth => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", + MetricLabel::ClientVideoPublisherQualityLimitationDurationCpu => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", + MetricLabel::ClientVideoPublisherQualityLimitationDurationOther => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", + MetricLabel::PredefinedMaxValue => "METRIC_LABEL_PREDEFINED_MAX_VALUE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -174,6 +178,7 @@ impl MetricLabel { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Room { #[prost(string, tag="1")] @@ -203,6 +208,7 @@ pub struct Room { #[prost(message, optional, tag="13")] pub version: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Codec { #[prost(string, tag="1")] @@ -210,7 +216,8 @@ pub struct Codec { #[prost(string, tag="2")] pub fmtp_line: ::prost::alloc::string::String, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct PlayoutDelay { #[prost(bool, tag="1")] pub enabled: bool, @@ -219,6 +226,7 @@ pub struct PlayoutDelay { #[prost(uint32, tag="3")] pub max: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantPermission { /// allow participant to subscribe to other tracks in the room @@ -253,6 +261,7 @@ pub struct ParticipantPermission { #[prost(bool, tag="12")] pub can_subscribe_metrics: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantInfo { #[prost(string, tag="1")] @@ -308,10 +317,10 @@ pub mod participant_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Joining => "JOINING", - Self::Joined => "JOINED", - Self::Active => "ACTIVE", - Self::Disconnected => "DISCONNECTED", + State::Joining => "JOINING", + State::Joined => "JOINED", + State::Active => "ACTIVE", + State::Disconnected => "DISCONNECTED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -346,11 +355,11 @@ pub mod participant_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Standard => "STANDARD", - Self::Ingress => "INGRESS", - Self::Egress => "EGRESS", - Self::Sip => "SIP", - Self::Agent => "AGENT", + Kind::Standard => "STANDARD", + Kind::Ingress => "INGRESS", + Kind::Egress => "EGRESS", + Kind::Sip => "SIP", + Kind::Agent => "AGENT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -366,7 +375,8 @@ pub mod participant_info { } } } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Encryption { } /// Nested message and enum types in `Encryption`. @@ -385,9 +395,9 @@ pub mod encryption { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::None => "NONE", - Self::Gcm => "GCM", - Self::Custom => "CUSTOM", + Type::None => "NONE", + Type::Gcm => "GCM", + Type::Custom => "CUSTOM", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -401,6 +411,7 @@ pub mod encryption { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodecInfo { #[prost(string, tag="1")] @@ -412,6 +423,7 @@ pub struct SimulcastCodecInfo { #[prost(message, repeated, tag="4")] pub layers: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackInfo { #[prost(string, tag="1")] @@ -462,7 +474,8 @@ pub struct TrackInfo { pub audio_features: ::prost::alloc::vec::Vec, } /// provide information about available spatial layers -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct VideoLayer { /// for tracks with a single layer, this should be HIGH #[prost(enumeration="VideoQuality", tag="1")] @@ -478,6 +491,7 @@ pub struct VideoLayer { pub ssrc: u32, } /// new DataPacket API +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataPacket { #[deprecated] @@ -507,8 +521,8 @@ pub mod data_packet { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Reliable => "RELIABLE", - Self::Lossy => "LOSSY", + Kind::Reliable => "RELIABLE", + Kind::Lossy => "LOSSY", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -520,7 +534,8 @@ pub mod data_packet { } } } - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { #[prost(message, tag="2")] User(super::UserPacket), @@ -542,11 +557,13 @@ pub mod data_packet { RpcResponse(super::RpcResponse), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActiveSpeakerUpdate { #[prost(message, repeated, tag="1")] pub speakers: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SpeakerInfo { #[prost(string, tag="1")] @@ -558,6 +575,7 @@ pub struct SpeakerInfo { #[prost(bool, tag="3")] pub active: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UserPacket { /// participant ID of user that sent the message @@ -590,6 +608,7 @@ pub struct UserPacket { #[prost(uint64, optional, tag="10")] pub end_time: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDtmf { #[prost(uint32, tag="3")] @@ -597,6 +616,7 @@ pub struct SipDtmf { #[prost(string, tag="4")] pub digit: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Transcription { /// Participant that got its speech transcribed @@ -607,6 +627,7 @@ pub struct Transcription { #[prost(message, repeated, tag="4")] pub segments: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TranscriptionSegment { #[prost(string, tag="1")] @@ -622,6 +643,7 @@ pub struct TranscriptionSegment { #[prost(string, tag="6")] pub language: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChatMessage { /// uuid @@ -641,6 +663,7 @@ pub struct ChatMessage { #[prost(bool, tag="6")] pub generated: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RpcRequest { #[prost(string, tag="1")] @@ -654,11 +677,13 @@ pub struct RpcRequest { #[prost(uint32, tag="5")] pub version: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RpcAck { #[prost(string, tag="1")] pub request_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RpcResponse { #[prost(string, tag="1")] @@ -668,7 +693,8 @@ pub struct RpcResponse { } /// Nested message and enum types in `RpcResponse`. pub mod rpc_response { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Value { #[prost(string, tag="2")] Payload(::prost::alloc::string::String), @@ -676,6 +702,7 @@ pub mod rpc_response { Error(super::RpcError), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RpcError { #[prost(uint32, tag="1")] @@ -685,6 +712,7 @@ pub struct RpcError { #[prost(string, tag="3")] pub data: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantTracks { /// participant ID of participant to whom the tracks belong @@ -694,6 +722,7 @@ pub struct ParticipantTracks { pub track_sids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// details about the server +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerInfo { #[prost(enumeration="server_info::Edition", tag="1")] @@ -727,8 +756,8 @@ pub mod server_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Standard => "Standard", - Self::Cloud => "Cloud", + Edition::Standard => "Standard", + Edition::Cloud => "Cloud", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -742,6 +771,7 @@ pub mod server_info { } } /// details about the client +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientInfo { #[prost(enumeration="client_info::Sdk", tag="1")] @@ -796,19 +826,19 @@ pub mod client_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unknown => "UNKNOWN", - Self::Js => "JS", - Self::Swift => "SWIFT", - Self::Android => "ANDROID", - Self::Flutter => "FLUTTER", - Self::Go => "GO", - Self::Unity => "UNITY", - Self::ReactNative => "REACT_NATIVE", - Self::Rust => "RUST", - Self::Python => "PYTHON", - Self::Cpp => "CPP", - Self::UnityWeb => "UNITY_WEB", - Self::Node => "NODE", + Sdk::Unknown => "UNKNOWN", + Sdk::Js => "JS", + Sdk::Swift => "SWIFT", + Sdk::Android => "ANDROID", + Sdk::Flutter => "FLUTTER", + Sdk::Go => "GO", + Sdk::Unity => "UNITY", + Sdk::ReactNative => "REACT_NATIVE", + Sdk::Rust => "RUST", + Sdk::Python => "PYTHON", + Sdk::Cpp => "CPP", + Sdk::UnityWeb => "UNITY_WEB", + Sdk::Node => "NODE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -833,6 +863,7 @@ pub mod client_info { } } /// server provided client configuration +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientConfiguration { #[prost(message, optional, tag="1")] @@ -846,11 +877,13 @@ pub struct ClientConfiguration { #[prost(enumeration="ClientConfigSetting", tag="5")] pub force_relay: i32, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct VideoConfiguration { #[prost(enumeration="ClientConfigSetting", tag="1")] pub hardware_encoder: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DisabledCodecs { /// disabled for both publish and subscribe @@ -860,7 +893,8 @@ pub struct DisabledCodecs { #[prost(message, repeated, tag="2")] pub publish: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpDrift { #[prost(message, optional, tag="1")] pub start_time: ::core::option::Option<::pbjson_types::Timestamp>, @@ -881,6 +915,7 @@ pub struct RtpDrift { #[prost(double, tag="9")] pub clock_rate: f64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpStats { #[prost(message, optional, tag="1")] @@ -975,7 +1010,8 @@ pub struct RtpStats { #[prost(message, optional, tag="47")] pub received_report_drift: ::core::option::Option, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct RtcpSenderReportState { #[prost(uint32, tag="1")] pub rtp_timestamp: u32, @@ -993,6 +1029,7 @@ pub struct RtcpSenderReportState { #[prost(uint64, tag="7")] pub octets: u64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpForwarderState { #[prost(bool, tag="1")] @@ -1014,13 +1051,15 @@ pub struct RtpForwarderState { } /// Nested message and enum types in `RTPForwarderState`. pub mod rtp_forwarder_state { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum CodecMunger { #[prost(message, tag="7")] Vp8Munger(super::Vp8MungerState), } } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpMungerState { #[prost(uint64, tag="1")] pub ext_last_sequence_number: u64, @@ -1035,7 +1074,8 @@ pub struct RtpMungerState { #[prost(bool, tag="6")] pub second_last_marker: bool, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Vp8MungerState { #[prost(int32, tag="1")] pub ext_last_picture_id: i32, @@ -1052,7 +1092,8 @@ pub struct Vp8MungerState { #[prost(bool, tag="7")] pub key_idx_used: bool, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct TimedVersion { #[prost(int64, tag="1")] pub unix_micro: i64, @@ -1073,9 +1114,9 @@ impl AudioCodec { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::DefaultAc => "DEFAULT_AC", - Self::Opus => "OPUS", - Self::Aac => "AAC", + AudioCodec::DefaultAc => "DEFAULT_AC", + AudioCodec::Opus => "OPUS", + AudioCodec::Aac => "AAC", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1104,11 +1145,11 @@ impl VideoCodec { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::DefaultVc => "DEFAULT_VC", - Self::H264Baseline => "H264_BASELINE", - Self::H264Main => "H264_MAIN", - Self::H264High => "H264_HIGH", - Self::Vp8 => "VP8", + VideoCodec::DefaultVc => "DEFAULT_VC", + VideoCodec::H264Baseline => "H264_BASELINE", + VideoCodec::H264Main => "H264_MAIN", + VideoCodec::H264High => "H264_HIGH", + VideoCodec::Vp8 => "VP8", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1136,8 +1177,8 @@ impl ImageCodec { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::IcDefault => "IC_DEFAULT", - Self::IcJpeg => "IC_JPEG", + ImageCodec::IcDefault => "IC_DEFAULT", + ImageCodec::IcJpeg => "IC_JPEG", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1163,9 +1204,9 @@ impl TrackType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Audio => "AUDIO", - Self::Video => "VIDEO", - Self::Data => "DATA", + TrackType::Audio => "AUDIO", + TrackType::Video => "VIDEO", + TrackType::Data => "DATA", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1194,11 +1235,11 @@ impl TrackSource { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unknown => "UNKNOWN", - Self::Camera => "CAMERA", - Self::Microphone => "MICROPHONE", - Self::ScreenShare => "SCREEN_SHARE", - Self::ScreenShareAudio => "SCREEN_SHARE_AUDIO", + TrackSource::Unknown => "UNKNOWN", + TrackSource::Camera => "CAMERA", + TrackSource::Microphone => "MICROPHONE", + TrackSource::ScreenShare => "SCREEN_SHARE", + TrackSource::ScreenShareAudio => "SCREEN_SHARE_AUDIO", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1228,10 +1269,10 @@ impl VideoQuality { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Low => "LOW", - Self::Medium => "MEDIUM", - Self::High => "HIGH", - Self::Off => "OFF", + VideoQuality::Low => "LOW", + VideoQuality::Medium => "MEDIUM", + VideoQuality::High => "HIGH", + VideoQuality::Off => "OFF", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1260,10 +1301,10 @@ impl ConnectionQuality { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Poor => "POOR", - Self::Good => "GOOD", - Self::Excellent => "EXCELLENT", - Self::Lost => "LOST", + ConnectionQuality::Poor => "POOR", + ConnectionQuality::Good => "GOOD", + ConnectionQuality::Excellent => "EXCELLENT", + ConnectionQuality::Lost => "LOST", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1291,9 +1332,9 @@ impl ClientConfigSetting { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Unset => "UNSET", - Self::Disabled => "DISABLED", - Self::Enabled => "ENABLED", + ClientConfigSetting::Unset => "UNSET", + ClientConfigSetting::Disabled => "DISABLED", + ClientConfigSetting::Enabled => "ENABLED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1338,17 +1379,17 @@ impl DisconnectReason { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::UnknownReason => "UNKNOWN_REASON", - Self::ClientInitiated => "CLIENT_INITIATED", - Self::DuplicateIdentity => "DUPLICATE_IDENTITY", - Self::ServerShutdown => "SERVER_SHUTDOWN", - Self::ParticipantRemoved => "PARTICIPANT_REMOVED", - Self::RoomDeleted => "ROOM_DELETED", - Self::StateMismatch => "STATE_MISMATCH", - Self::JoinFailure => "JOIN_FAILURE", - Self::Migration => "MIGRATION", - Self::SignalClose => "SIGNAL_CLOSE", - Self::RoomClosed => "ROOM_CLOSED", + DisconnectReason::UnknownReason => "UNKNOWN_REASON", + DisconnectReason::ClientInitiated => "CLIENT_INITIATED", + DisconnectReason::DuplicateIdentity => "DUPLICATE_IDENTITY", + DisconnectReason::ServerShutdown => "SERVER_SHUTDOWN", + DisconnectReason::ParticipantRemoved => "PARTICIPANT_REMOVED", + DisconnectReason::RoomDeleted => "ROOM_DELETED", + DisconnectReason::StateMismatch => "STATE_MISMATCH", + DisconnectReason::JoinFailure => "JOIN_FAILURE", + DisconnectReason::Migration => "MIGRATION", + DisconnectReason::SignalClose => "SIGNAL_CLOSE", + DisconnectReason::RoomClosed => "ROOM_CLOSED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1385,11 +1426,11 @@ impl ReconnectReason { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::RrUnknown => "RR_UNKNOWN", - Self::RrSignalDisconnected => "RR_SIGNAL_DISCONNECTED", - Self::RrPublisherFailed => "RR_PUBLISHER_FAILED", - Self::RrSubscriberFailed => "RR_SUBSCRIBER_FAILED", - Self::RrSwitchCandidate => "RR_SWITCH_CANDIDATE", + ReconnectReason::RrUnknown => "RR_UNKNOWN", + ReconnectReason::RrSignalDisconnected => "RR_SIGNAL_DISCONNECTED", + ReconnectReason::RrPublisherFailed => "RR_PUBLISHER_FAILED", + ReconnectReason::RrSubscriberFailed => "RR_SUBSCRIBER_FAILED", + ReconnectReason::RrSwitchCandidate => "RR_SWITCH_CANDIDATE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1418,9 +1459,9 @@ impl SubscriptionError { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::SeUnknown => "SE_UNKNOWN", - Self::SeCodecUnsupported => "SE_CODEC_UNSUPPORTED", - Self::SeTrackNotfound => "SE_TRACK_NOTFOUND", + SubscriptionError::SeUnknown => "SE_UNKNOWN", + SubscriptionError::SeCodecUnsupported => "SE_CODEC_UNSUPPORTED", + SubscriptionError::SeTrackNotfound => "SE_TRACK_NOTFOUND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1450,12 +1491,12 @@ impl AudioTrackFeature { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::TfStereo => "TF_STEREO", - Self::TfNoDtx => "TF_NO_DTX", - Self::TfAutoGainControl => "TF_AUTO_GAIN_CONTROL", - Self::TfEchoCancellation => "TF_ECHO_CANCELLATION", - Self::TfNoiseSuppression => "TF_NOISE_SUPPRESSION", - Self::TfEnhancedNoiseCancellation => "TF_ENHANCED_NOISE_CANCELLATION", + AudioTrackFeature::TfStereo => "TF_STEREO", + AudioTrackFeature::TfNoDtx => "TF_NO_DTX", + AudioTrackFeature::TfAutoGainControl => "TF_AUTO_GAIN_CONTROL", + AudioTrackFeature::TfEchoCancellation => "TF_ECHO_CANCELLATION", + AudioTrackFeature::TfNoiseSuppression => "TF_NOISE_SUPPRESSION", + AudioTrackFeature::TfEnhancedNoiseCancellation => "TF_ENHANCED_NOISE_CANCELLATION", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1472,6 +1513,7 @@ impl AudioTrackFeature { } } /// composite using a web browser +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomCompositeEgressRequest { /// required @@ -1506,7 +1548,8 @@ pub struct RoomCompositeEgressRequest { /// Nested message and enum types in `RoomCompositeEgressRequest`. pub mod room_composite_egress_request { /// deprecated (use _output fields) - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="6")] File(super::EncodedFileOutput), @@ -1515,7 +1558,8 @@ pub mod room_composite_egress_request { #[prost(message, tag="10")] Segments(super::SegmentedFileOutput), } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="8")] @@ -1526,6 +1570,7 @@ pub mod room_composite_egress_request { } } /// record any website +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WebEgressRequest { #[prost(string, tag="1")] @@ -1553,7 +1598,8 @@ pub struct WebEgressRequest { /// Nested message and enum types in `WebEgressRequest`. pub mod web_egress_request { /// deprecated (use _output fields) - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="4")] File(super::EncodedFileOutput), @@ -1562,7 +1608,8 @@ pub mod web_egress_request { #[prost(message, tag="6")] Segments(super::SegmentedFileOutput), } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Options { #[prost(enumeration="super::EncodingOptionsPreset", tag="7")] Preset(i32), @@ -1571,6 +1618,7 @@ pub mod web_egress_request { } } /// record audio and video from a single participant +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantEgressRequest { /// required @@ -1595,7 +1643,8 @@ pub struct ParticipantEgressRequest { } /// Nested message and enum types in `ParticipantEgressRequest`. pub mod participant_egress_request { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="4")] @@ -1606,6 +1655,7 @@ pub mod participant_egress_request { } } /// containerize up to one audio and one video track +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackCompositeEgressRequest { /// required @@ -1634,7 +1684,8 @@ pub struct TrackCompositeEgressRequest { /// Nested message and enum types in `TrackCompositeEgressRequest`. pub mod track_composite_egress_request { /// deprecated (use _output fields) - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="4")] File(super::EncodedFileOutput), @@ -1643,7 +1694,8 @@ pub mod track_composite_egress_request { #[prost(message, tag="8")] Segments(super::SegmentedFileOutput), } - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="6")] @@ -1654,6 +1706,7 @@ pub mod track_composite_egress_request { } } /// record tracks individually, without transcoding +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackEgressRequest { /// required @@ -1669,7 +1722,8 @@ pub struct TrackEgressRequest { /// Nested message and enum types in `TrackEgressRequest`. pub mod track_egress_request { /// required - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="3")] File(super::DirectFileOutput), @@ -1677,6 +1731,7 @@ pub mod track_egress_request { WebsocketUrl(::prost::alloc::string::String), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncodedFileOutput { /// (optional) @@ -1693,7 +1748,8 @@ pub struct EncodedFileOutput { } /// Nested message and enum types in `EncodedFileOutput`. pub mod encoded_file_output { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="3")] S3(super::S3Upload), @@ -1706,6 +1762,7 @@ pub mod encoded_file_output { } } /// Used to generate HLS segments or other kind of segmented output +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SegmentedFileOutput { /// (optional) @@ -1736,7 +1793,8 @@ pub struct SegmentedFileOutput { /// Nested message and enum types in `SegmentedFileOutput`. pub mod segmented_file_output { /// required - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="5")] S3(super::S3Upload), @@ -1748,6 +1806,7 @@ pub mod segmented_file_output { AliOss(super::AliOssUpload), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DirectFileOutput { /// see egress docs for templating (default {track_id}-{time}) @@ -1761,7 +1820,8 @@ pub struct DirectFileOutput { } /// Nested message and enum types in `DirectFileOutput`. pub mod direct_file_output { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="2")] S3(super::S3Upload), @@ -1773,6 +1833,7 @@ pub mod direct_file_output { AliOss(super::AliOssUpload), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImageOutput { /// in seconds (required) @@ -1803,7 +1864,8 @@ pub struct ImageOutput { /// Nested message and enum types in `ImageOutput`. pub mod image_output { /// required - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="8")] S3(super::S3Upload), @@ -1815,6 +1877,7 @@ pub mod image_output { AliOss(super::AliOssUpload), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct S3Upload { #[prost(string, tag="1")] @@ -1841,6 +1904,7 @@ pub struct S3Upload { #[prost(message, optional, tag="10")] pub proxy: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GcpUpload { /// service account credentials serialized in JSON "credentials.json" @@ -1851,6 +1915,7 @@ pub struct GcpUpload { #[prost(message, optional, tag="3")] pub proxy: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AzureBlobUpload { #[prost(string, tag="1")] @@ -1860,6 +1925,7 @@ pub struct AzureBlobUpload { #[prost(string, tag="3")] pub container_name: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AliOssUpload { #[prost(string, tag="1")] @@ -1873,6 +1939,7 @@ pub struct AliOssUpload { #[prost(string, tag="5")] pub bucket: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProxyConfig { #[prost(string, tag="1")] @@ -1882,6 +1949,7 @@ pub struct ProxyConfig { #[prost(string, tag="3")] pub password: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamOutput { /// required @@ -1891,7 +1959,8 @@ pub struct StreamOutput { #[prost(string, repeated, tag="2")] pub urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct EncodingOptions { /// (default 1920) #[prost(int32, tag="1")] @@ -1930,6 +1999,7 @@ pub struct EncodingOptions { #[prost(double, tag="10")] pub key_frame_interval: f64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateLayoutRequest { #[prost(string, tag="1")] @@ -1937,6 +2007,7 @@ pub struct UpdateLayoutRequest { #[prost(string, tag="2")] pub layout: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateStreamRequest { #[prost(string, tag="1")] @@ -1946,6 +2017,7 @@ pub struct UpdateStreamRequest { #[prost(string, repeated, tag="3")] pub remove_output_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEgressRequest { /// (optional, filter by room name) @@ -1958,16 +2030,19 @@ pub struct ListEgressRequest { #[prost(bool, tag="3")] pub active: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListEgressResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StopEgressRequest { #[prost(string, tag="1")] pub egress_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EgressInfo { #[prost(string, tag="1")] @@ -2006,7 +2081,8 @@ pub struct EgressInfo { } /// Nested message and enum types in `EgressInfo`. pub mod egress_info { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Request { #[prost(message, tag="4")] RoomComposite(super::RoomCompositeEgressRequest), @@ -2020,7 +2096,8 @@ pub mod egress_info { Track(super::TrackEgressRequest), } /// deprecated (use _result fields) - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag="7")] Stream(super::StreamInfoList), @@ -2030,11 +2107,13 @@ pub mod egress_info { Segments(super::SegmentsInfo), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamInfoList { #[prost(message, repeated, tag="1")] pub info: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamInfo { #[prost(string, tag="1")] @@ -2066,9 +2145,9 @@ pub mod stream_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Active => "ACTIVE", - Self::Finished => "FINISHED", - Self::Failed => "FAILED", + Status::Active => "ACTIVE", + Status::Finished => "FINISHED", + Status::Failed => "FAILED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2082,6 +2161,7 @@ pub mod stream_info { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileInfo { #[prost(string, tag="1")] @@ -2097,6 +2177,7 @@ pub struct FileInfo { #[prost(string, tag="5")] pub location: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SegmentsInfo { #[prost(string, tag="1")] @@ -2118,6 +2199,7 @@ pub struct SegmentsInfo { #[prost(int64, tag="7")] pub ended_at: i64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ImagesInfo { #[prost(string, tag="4")] @@ -2129,6 +2211,7 @@ pub struct ImagesInfo { #[prost(int64, tag="3")] pub ended_at: i64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutoParticipantEgress { #[prost(message, repeated, tag="3")] @@ -2140,7 +2223,8 @@ pub struct AutoParticipantEgress { } /// Nested message and enum types in `AutoParticipantEgress`. pub mod auto_participant_egress { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Options { /// (default H264_720P_30) #[prost(enumeration="super::EncodingOptionsPreset", tag="1")] @@ -2150,6 +2234,7 @@ pub mod auto_participant_egress { Advanced(super::EncodingOptions), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AutoTrackEgress { /// see docs for templating (default {track_id}-{time}) @@ -2163,7 +2248,8 @@ pub struct AutoTrackEgress { } /// Nested message and enum types in `AutoTrackEgress`. pub mod auto_track_egress { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Output { #[prost(message, tag="2")] S3(super::S3Upload), @@ -2190,9 +2276,9 @@ impl EncodedFileType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::DefaultFiletype => "DEFAULT_FILETYPE", - Self::Mp4 => "MP4", - Self::Ogg => "OGG", + EncodedFileType::DefaultFiletype => "DEFAULT_FILETYPE", + EncodedFileType::Mp4 => "MP4", + EncodedFileType::Ogg => "OGG", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2218,8 +2304,8 @@ impl SegmentedFileProtocol { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::DefaultSegmentedFileProtocol => "DEFAULT_SEGMENTED_FILE_PROTOCOL", - Self::HlsProtocol => "HLS_PROTOCOL", + SegmentedFileProtocol::DefaultSegmentedFileProtocol => "DEFAULT_SEGMENTED_FILE_PROTOCOL", + SegmentedFileProtocol::HlsProtocol => "HLS_PROTOCOL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2244,8 +2330,8 @@ impl SegmentedFileSuffix { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Index => "INDEX", - Self::Timestamp => "TIMESTAMP", + SegmentedFileSuffix::Index => "INDEX", + SegmentedFileSuffix::Timestamp => "TIMESTAMP", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2270,8 +2356,8 @@ impl ImageFileSuffix { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::ImageSuffixIndex => "IMAGE_SUFFIX_INDEX", - Self::ImageSuffixTimestamp => "IMAGE_SUFFIX_TIMESTAMP", + ImageFileSuffix::ImageSuffixIndex => "IMAGE_SUFFIX_INDEX", + ImageFileSuffix::ImageSuffixTimestamp => "IMAGE_SUFFIX_TIMESTAMP", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2298,9 +2384,9 @@ impl StreamProtocol { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::DefaultProtocol => "DEFAULT_PROTOCOL", - Self::Rtmp => "RTMP", - Self::Srt => "SRT", + StreamProtocol::DefaultProtocol => "DEFAULT_PROTOCOL", + StreamProtocol::Rtmp => "RTMP", + StreamProtocol::Srt => "SRT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2340,14 +2426,14 @@ impl EncodingOptionsPreset { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::H264720p30 => "H264_720P_30", - Self::H264720p60 => "H264_720P_60", - Self::H2641080p30 => "H264_1080P_30", - Self::H2641080p60 => "H264_1080P_60", - Self::PortraitH264720p30 => "PORTRAIT_H264_720P_30", - Self::PortraitH264720p60 => "PORTRAIT_H264_720P_60", - Self::PortraitH2641080p30 => "PORTRAIT_H264_1080P_30", - Self::PortraitH2641080p60 => "PORTRAIT_H264_1080P_60", + EncodingOptionsPreset::H264720p30 => "H264_720P_30", + EncodingOptionsPreset::H264720p60 => "H264_720P_60", + EncodingOptionsPreset::H2641080p30 => "H264_1080P_30", + EncodingOptionsPreset::H2641080p60 => "H264_1080P_60", + EncodingOptionsPreset::PortraitH264720p30 => "PORTRAIT_H264_720P_30", + EncodingOptionsPreset::PortraitH264720p60 => "PORTRAIT_H264_720P_60", + EncodingOptionsPreset::PortraitH2641080p30 => "PORTRAIT_H264_1080P_30", + EncodingOptionsPreset::PortraitH2641080p60 => "PORTRAIT_H264_1080P_60", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2383,13 +2469,13 @@ impl EgressStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::EgressStarting => "EGRESS_STARTING", - Self::EgressActive => "EGRESS_ACTIVE", - Self::EgressEnding => "EGRESS_ENDING", - Self::EgressComplete => "EGRESS_COMPLETE", - Self::EgressFailed => "EGRESS_FAILED", - Self::EgressAborted => "EGRESS_ABORTED", - Self::EgressLimitReached => "EGRESS_LIMIT_REACHED", + EgressStatus::EgressStarting => "EGRESS_STARTING", + EgressStatus::EgressActive => "EGRESS_ACTIVE", + EgressStatus::EgressEnding => "EGRESS_ENDING", + EgressStatus::EgressComplete => "EGRESS_COMPLETE", + EgressStatus::EgressFailed => "EGRESS_FAILED", + EgressStatus::EgressAborted => "EGRESS_ABORTED", + EgressStatus::EgressLimitReached => "EGRESS_LIMIT_REACHED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2406,6 +2492,7 @@ impl EgressStatus { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignalRequest { #[prost(oneof="signal_request::Message", tags="1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18")] @@ -2413,7 +2500,8 @@ pub struct SignalRequest { } /// Nested message and enum types in `SignalRequest`. pub mod signal_request { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// initial join exchange, for publisher #[prost(message, tag="1")] @@ -2468,6 +2556,7 @@ pub mod signal_request { UpdateVideoTrack(super::UpdateLocalVideoTrack), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignalResponse { #[prost(oneof="signal_response::Message", tags="1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23")] @@ -2475,7 +2564,8 @@ pub struct SignalResponse { } /// Nested message and enum types in `SignalResponse`. pub mod signal_response { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// sent when join is accepted #[prost(message, tag="1")] @@ -2548,6 +2638,7 @@ pub mod signal_response { TrackSubscribed(super::TrackSubscribed), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodec { #[prost(string, tag="1")] @@ -2555,6 +2646,7 @@ pub struct SimulcastCodec { #[prost(string, tag="2")] pub cid: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddTrackRequest { /// client ID of track, to match it when RTC track is received @@ -2596,6 +2688,7 @@ pub struct AddTrackRequest { #[prost(string, tag="15")] pub stream: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrickleRequest { #[prost(string, tag="1")] @@ -2605,6 +2698,7 @@ pub struct TrickleRequest { #[prost(bool, tag="3")] pub r#final: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MuteTrackRequest { #[prost(string, tag="1")] @@ -2612,6 +2706,7 @@ pub struct MuteTrackRequest { #[prost(bool, tag="2")] pub muted: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JoinResponse { #[prost(message, optional, tag="1")] @@ -2652,6 +2747,7 @@ pub struct JoinResponse { #[prost(bool, tag="15")] pub fast_publish: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ReconnectResponse { #[prost(message, repeated, tag="1")] @@ -2659,6 +2755,7 @@ pub struct ReconnectResponse { #[prost(message, optional, tag="2")] pub client_configuration: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackPublishedResponse { #[prost(string, tag="1")] @@ -2666,11 +2763,13 @@ pub struct TrackPublishedResponse { #[prost(message, optional, tag="2")] pub track: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackUnpublishedResponse { #[prost(string, tag="1")] pub track_sid: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SessionDescription { /// "answer" | "offer" | "pranswer" | "rollback" @@ -2679,11 +2778,13 @@ pub struct SessionDescription { #[prost(string, tag="2")] pub sdp: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantUpdate { #[prost(message, repeated, tag="1")] pub participants: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSubscription { #[prost(string, repeated, tag="1")] @@ -2693,6 +2794,7 @@ pub struct UpdateSubscription { #[prost(message, repeated, tag="3")] pub participant_tracks: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateTrackSettings { #[prost(string, repeated, tag="1")] @@ -2721,6 +2823,7 @@ pub struct UpdateTrackSettings { #[prost(uint32, tag="8")] pub priority: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateLocalAudioTrack { #[prost(string, tag="1")] @@ -2728,6 +2831,7 @@ pub struct UpdateLocalAudioTrack { #[prost(enumeration="AudioTrackFeature", repeated, tag="2")] pub features: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateLocalVideoTrack { #[prost(string, tag="1")] @@ -2737,6 +2841,7 @@ pub struct UpdateLocalVideoTrack { #[prost(uint32, tag="3")] pub height: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct LeaveRequest { /// sent when server initiates the disconnect due to server-restart @@ -2771,9 +2876,9 @@ pub mod leave_request { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Disconnect => "DISCONNECT", - Self::Resume => "RESUME", - Self::Reconnect => "RECONNECT", + Action::Disconnect => "DISCONNECT", + Action::Resume => "RESUME", + Action::Reconnect => "RECONNECT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2788,6 +2893,7 @@ pub mod leave_request { } } /// message to indicate published video track dimensions are changing +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateVideoLayers { #[prost(string, tag="1")] @@ -2795,6 +2901,7 @@ pub struct UpdateVideoLayers { #[prost(message, repeated, tag="2")] pub layers: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateParticipantMetadata { #[prost(string, tag="1")] @@ -2808,6 +2915,7 @@ pub struct UpdateParticipantMetadata { #[prost(uint32, tag="4")] pub request_id: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IceServer { #[prost(string, repeated, tag="1")] @@ -2817,16 +2925,19 @@ pub struct IceServer { #[prost(string, tag="3")] pub credential: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SpeakersChanged { #[prost(message, repeated, tag="1")] pub speakers: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomUpdate { #[prost(message, optional, tag="1")] pub room: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConnectionQualityInfo { #[prost(string, tag="1")] @@ -2836,11 +2947,13 @@ pub struct ConnectionQualityInfo { #[prost(float, tag="3")] pub score: f32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConnectionQualityUpdate { #[prost(message, repeated, tag="1")] pub updates: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamStateInfo { #[prost(string, tag="1")] @@ -2850,18 +2963,21 @@ pub struct StreamStateInfo { #[prost(enumeration="StreamState", tag="3")] pub state: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamStateUpdate { #[prost(message, repeated, tag="1")] pub stream_states: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribedQuality { #[prost(enumeration="VideoQuality", tag="1")] pub quality: i32, #[prost(bool, tag="2")] pub enabled: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribedCodec { #[prost(string, tag="1")] @@ -2869,6 +2985,7 @@ pub struct SubscribedCodec { #[prost(message, repeated, tag="2")] pub qualities: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribedQualityUpdate { #[prost(string, tag="1")] @@ -2878,6 +2995,7 @@ pub struct SubscribedQualityUpdate { #[prost(message, repeated, tag="3")] pub subscribed_codecs: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackPermission { /// permission could be granted either by participant sid or identity @@ -2890,6 +3008,7 @@ pub struct TrackPermission { #[prost(string, tag="4")] pub participant_identity: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionPermission { #[prost(bool, tag="1")] @@ -2897,6 +3016,7 @@ pub struct SubscriptionPermission { #[prost(message, repeated, tag="2")] pub track_permissions: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionPermissionUpdate { #[prost(string, tag="1")] @@ -2906,6 +3026,7 @@ pub struct SubscriptionPermissionUpdate { #[prost(bool, tag="3")] pub allowed: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SyncState { /// last subscribe answer before reconnecting @@ -2923,6 +3044,7 @@ pub struct SyncState { #[prost(string, repeated, tag="6")] pub track_sids_disabled: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DataChannelInfo { #[prost(string, tag="1")] @@ -2932,14 +3054,16 @@ pub struct DataChannelInfo { #[prost(enumeration="SignalTarget", tag="3")] pub target: i32, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateScenario { #[prost(oneof="simulate_scenario::Scenario", tags="1, 2, 3, 4, 5, 6, 7, 8, 9")] pub scenario: ::core::option::Option, } /// Nested message and enum types in `SimulateScenario`. pub mod simulate_scenario { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Scenario { /// simulate N seconds of speaker activity #[prost(int32, tag="1")] @@ -2971,7 +3095,8 @@ pub mod simulate_scenario { LeaveRequestFullReconnect(bool), } } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Ping { #[prost(int64, tag="1")] pub timestamp: i64, @@ -2979,7 +3104,8 @@ pub struct Ping { #[prost(int64, tag="2")] pub rtt: i64, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Pong { /// timestamp field of last received ping request #[prost(int64, tag="1")] @@ -2987,11 +3113,13 @@ pub struct Pong { #[prost(int64, tag="2")] pub timestamp: i64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionSettings { #[prost(message, repeated, tag="1")] pub regions: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegionInfo { #[prost(string, tag="1")] @@ -3001,6 +3129,7 @@ pub struct RegionInfo { #[prost(int64, tag="3")] pub distance: i64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscriptionResponse { #[prost(string, tag="1")] @@ -3008,6 +3137,7 @@ pub struct SubscriptionResponse { #[prost(enumeration="SubscriptionError", tag="2")] pub err: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RequestResponse { #[prost(uint32, tag="1")] @@ -3034,10 +3164,10 @@ pub mod request_response { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Ok => "OK", - Self::NotFound => "NOT_FOUND", - Self::NotAllowed => "NOT_ALLOWED", - Self::LimitExceeded => "LIMIT_EXCEEDED", + Reason::Ok => "OK", + Reason::NotFound => "NOT_FOUND", + Reason::NotAllowed => "NOT_ALLOWED", + Reason::LimitExceeded => "LIMIT_EXCEEDED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3052,6 +3182,7 @@ pub mod request_response { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackSubscribed { #[prost(string, tag="1")] @@ -3070,8 +3201,8 @@ impl SignalTarget { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Publisher => "PUBLISHER", - Self::Subscriber => "SUBSCRIBER", + SignalTarget::Publisher => "PUBLISHER", + SignalTarget::Subscriber => "SUBSCRIBER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3096,8 +3227,8 @@ impl StreamState { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Active => "ACTIVE", - Self::Paused => "PAUSED", + StreamState::Active => "ACTIVE", + StreamState::Paused => "PAUSED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3123,9 +3254,9 @@ impl CandidateProtocol { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Udp => "UDP", - Self::Tcp => "TCP", - Self::Tls => "TLS", + CandidateProtocol::Udp => "UDP", + CandidateProtocol::Tcp => "TCP", + CandidateProtocol::Tls => "TLS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3138,6 +3269,7 @@ impl CandidateProtocol { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Job { #[prost(string, tag="1")] @@ -3160,6 +3292,7 @@ pub struct Job { #[prost(message, optional, tag="8")] pub state: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobState { #[prost(enumeration="JobStatus", tag="1")] @@ -3176,6 +3309,7 @@ pub struct JobState { pub participant_identity: ::prost::alloc::string::String, } /// from Worker to Server +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WorkerMessage { #[prost(oneof="worker_message::Message", tags="1, 2, 3, 4, 5, 6, 7")] @@ -3183,7 +3317,8 @@ pub struct WorkerMessage { } /// Nested message and enum types in `WorkerMessage`. pub mod worker_message { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// agent workers need to register themselves with the server first #[prost(message, tag="1")] @@ -3206,6 +3341,7 @@ pub mod worker_message { } } /// from Server to Worker +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerMessage { #[prost(oneof="server_message::Message", tags="1, 2, 3, 5, 4")] @@ -3213,7 +3349,8 @@ pub struct ServerMessage { } /// Nested message and enum types in `ServerMessage`. pub mod server_message { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Message { /// server confirms the registration, from this moment on, the worker is considered active #[prost(message, tag="1")] @@ -3229,6 +3366,7 @@ pub mod server_message { Pong(super::WorkerPong), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulateJobRequest { #[prost(enumeration="JobType", tag="1")] @@ -3238,18 +3376,21 @@ pub struct SimulateJobRequest { #[prost(message, optional, tag="3")] pub participant: ::core::option::Option, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct WorkerPing { #[prost(int64, tag="1")] pub timestamp: i64, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct WorkerPong { #[prost(int64, tag="1")] pub last_timestamp: i64, #[prost(int64, tag="2")] pub timestamp: i64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterWorkerRequest { #[prost(enumeration="JobType", tag="1")] @@ -3267,6 +3408,7 @@ pub struct RegisterWorkerRequest { #[prost(message, optional, tag="7")] pub allowed_permissions: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterWorkerResponse { #[prost(string, tag="1")] @@ -3274,12 +3416,14 @@ pub struct RegisterWorkerResponse { #[prost(message, optional, tag="3")] pub server_info: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MigrateJobRequest { /// string job_id = 1 \[deprecated = true\]; #[prost(string, repeated, tag="2")] pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AvailabilityRequest { #[prost(message, optional, tag="1")] @@ -3289,6 +3433,7 @@ pub struct AvailabilityRequest { #[prost(bool, tag="2")] pub resuming: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AvailabilityResponse { #[prost(string, tag="1")] @@ -3306,6 +3451,7 @@ pub struct AvailabilityResponse { #[prost(map="string, string", tag="7")] pub participant_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateJobStatus { #[prost(string, tag="1")] @@ -3317,7 +3463,8 @@ pub struct UpdateJobStatus { #[prost(string, tag="3")] pub error: ::prost::alloc::string::String, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateWorkerStatus { #[prost(enumeration="WorkerStatus", optional, tag="1")] pub status: ::core::option::Option, @@ -3327,6 +3474,7 @@ pub struct UpdateWorkerStatus { #[prost(int32, tag="4")] pub job_count: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobAssignment { #[prost(message, optional, tag="1")] @@ -3336,6 +3484,7 @@ pub struct JobAssignment { #[prost(string, tag="3")] pub token: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobTermination { #[prost(string, tag="1")] @@ -3354,8 +3503,8 @@ impl JobType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::JtRoom => "JT_ROOM", - Self::JtPublisher => "JT_PUBLISHER", + JobType::JtRoom => "JT_ROOM", + JobType::JtPublisher => "JT_PUBLISHER", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3380,8 +3529,8 @@ impl WorkerStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::WsAvailable => "WS_AVAILABLE", - Self::WsFull => "WS_FULL", + WorkerStatus::WsAvailable => "WS_AVAILABLE", + WorkerStatus::WsFull => "WS_FULL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3408,10 +3557,10 @@ impl JobStatus { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::JsPending => "JS_PENDING", - Self::JsRunning => "JS_RUNNING", - Self::JsSuccess => "JS_SUCCESS", - Self::JsFailed => "JS_FAILED", + JobStatus::JsPending => "JS_PENDING", + JobStatus::JsRunning => "JS_RUNNING", + JobStatus::JsSuccess => "JS_SUCCESS", + JobStatus::JsFailed => "JS_FAILED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3425,6 +3574,7 @@ impl JobStatus { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAgentDispatchRequest { #[prost(string, tag="1")] @@ -3434,6 +3584,7 @@ pub struct CreateAgentDispatchRequest { #[prost(string, tag="3")] pub metadata: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomAgentDispatch { #[prost(string, tag="1")] @@ -3441,6 +3592,7 @@ pub struct RoomAgentDispatch { #[prost(string, tag="2")] pub metadata: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteAgentDispatchRequest { #[prost(string, tag="1")] @@ -3448,6 +3600,7 @@ pub struct DeleteAgentDispatchRequest { #[prost(string, tag="2")] pub room: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAgentDispatchRequest { /// if set, only the dispatch whose id is given will be returned @@ -3457,11 +3610,13 @@ pub struct ListAgentDispatchRequest { #[prost(string, tag="2")] pub room: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListAgentDispatchResponse { #[prost(message, repeated, tag="1")] pub agent_dispatches: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AgentDispatch { #[prost(string, tag="1")] @@ -3475,6 +3630,7 @@ pub struct AgentDispatch { #[prost(message, optional, tag="5")] pub state: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AgentDispatchState { /// For dispatches of tyoe JT_ROOM, there will be at most 1 job. @@ -3486,6 +3642,7 @@ pub struct AgentDispatchState { #[prost(int64, tag="3")] pub deleted_at: i64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateRoomRequest { /// name of the room @@ -3530,6 +3687,7 @@ pub struct CreateRoomRequest { #[prost(bool, tag="13")] pub replay_enabled: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomEgress { #[prost(message, optional, tag="1")] @@ -3539,42 +3697,50 @@ pub struct RoomEgress { #[prost(message, optional, tag="2")] pub tracks: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomAgent { #[prost(message, repeated, tag="1")] pub dispatches: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListRoomsRequest { /// when set, will only return rooms with name match #[prost(string, repeated, tag="1")] pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListRoomsResponse { #[prost(message, repeated, tag="1")] pub rooms: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRoomRequest { /// name of the room #[prost(string, tag="1")] pub room: ::prost::alloc::string::String, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteRoomResponse { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListParticipantsRequest { /// name of the room #[prost(string, tag="1")] pub room: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListParticipantsResponse { #[prost(message, repeated, tag="1")] pub participants: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomParticipantIdentity { /// name of the room @@ -3584,9 +3750,11 @@ pub struct RoomParticipantIdentity { #[prost(string, tag="2")] pub identity: ::prost::alloc::string::String, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct RemoveParticipantResponse { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MuteRoomTrackRequest { /// name of the room @@ -3601,11 +3769,13 @@ pub struct MuteRoomTrackRequest { #[prost(bool, tag="4")] pub muted: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MuteRoomTrackResponse { #[prost(message, optional, tag="1")] pub track: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateParticipantRequest { #[prost(string, tag="1")] @@ -3626,6 +3796,7 @@ pub struct UpdateParticipantRequest { #[prost(map="string, string", tag="6")] pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSubscriptionsRequest { #[prost(string, tag="1")] @@ -3643,9 +3814,11 @@ pub struct UpdateSubscriptionsRequest { pub participant_tracks: ::prost::alloc::vec::Vec, } /// empty for now -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateSubscriptionsResponse { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendDataRequest { #[prost(string, tag="1")] @@ -3665,9 +3838,11 @@ pub struct SendDataRequest { pub topic: ::core::option::Option<::prost::alloc::string::String>, } /// -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SendDataResponse { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateRoomMetadataRequest { #[prost(string, tag="1")] @@ -3676,6 +3851,7 @@ pub struct UpdateRoomMetadataRequest { #[prost(string, tag="2")] pub metadata: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomConfiguration { /// Used as ID, must be unique @@ -3706,6 +3882,7 @@ pub struct RoomConfiguration { #[prost(bool, tag="9")] pub sync_streams: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateIngressRequest { #[prost(enumeration="IngressInput", tag="1")] @@ -3740,6 +3917,7 @@ pub struct CreateIngressRequest { #[prost(message, optional, tag="7")] pub video: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressAudioOptions { #[prost(string, tag="1")] @@ -3751,7 +3929,8 @@ pub struct IngressAudioOptions { } /// Nested message and enum types in `IngressAudioOptions`. pub mod ingress_audio_options { - #[derive(Clone, Copy, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EncodingOptions { #[prost(enumeration="super::IngressAudioEncodingPreset", tag="3")] Preset(i32), @@ -3759,6 +3938,7 @@ pub mod ingress_audio_options { Options(super::IngressAudioEncodingOptions), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressVideoOptions { #[prost(string, tag="1")] @@ -3770,7 +3950,8 @@ pub struct IngressVideoOptions { } /// Nested message and enum types in `IngressVideoOptions`. pub mod ingress_video_options { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum EncodingOptions { #[prost(enumeration="super::IngressVideoEncodingPreset", tag="3")] Preset(i32), @@ -3778,7 +3959,8 @@ pub mod ingress_video_options { Options(super::IngressVideoEncodingOptions), } } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressAudioEncodingOptions { /// desired audio codec to publish to room #[prost(enumeration="AudioCodec", tag="1")] @@ -3790,6 +3972,7 @@ pub struct IngressAudioEncodingOptions { #[prost(uint32, tag="4")] pub channels: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressVideoEncodingOptions { /// desired codec to publish to room @@ -3801,6 +3984,7 @@ pub struct IngressVideoEncodingOptions { #[prost(message, repeated, tag="3")] pub layers: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressInfo { #[prost(string, tag="1")] @@ -3840,6 +4024,7 @@ pub struct IngressInfo { #[prost(message, optional, tag="12")] pub state: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IngressState { #[prost(enumeration="ingress_state::Status", tag="1")] @@ -3883,11 +4068,11 @@ pub mod ingress_state { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::EndpointInactive => "ENDPOINT_INACTIVE", - Self::EndpointBuffering => "ENDPOINT_BUFFERING", - Self::EndpointPublishing => "ENDPOINT_PUBLISHING", - Self::EndpointError => "ENDPOINT_ERROR", - Self::EndpointComplete => "ENDPOINT_COMPLETE", + Status::EndpointInactive => "ENDPOINT_INACTIVE", + Status::EndpointBuffering => "ENDPOINT_BUFFERING", + Status::EndpointPublishing => "ENDPOINT_PUBLISHING", + Status::EndpointError => "ENDPOINT_ERROR", + Status::EndpointComplete => "ENDPOINT_COMPLETE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3903,6 +4088,7 @@ pub mod ingress_state { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputVideoState { #[prost(string, tag="1")] @@ -3916,6 +4102,7 @@ pub struct InputVideoState { #[prost(double, tag="5")] pub framerate: f64, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputAudioState { #[prost(string, tag="1")] @@ -3927,6 +4114,7 @@ pub struct InputAudioState { #[prost(uint32, tag="4")] pub sample_rate: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UpdateIngressRequest { #[prost(string, tag="1")] @@ -3951,6 +4139,7 @@ pub struct UpdateIngressRequest { #[prost(message, optional, tag="7")] pub video: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListIngressRequest { /// when blank, lists all ingress endpoints @@ -3962,11 +4151,13 @@ pub struct ListIngressRequest { #[prost(string, tag="2")] pub ingress_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListIngressResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteIngressRequest { #[prost(string, tag="1")] @@ -3987,9 +4178,9 @@ impl IngressInput { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::RtmpInput => "RTMP_INPUT", - Self::WhipInput => "WHIP_INPUT", - Self::UrlInput => "URL_INPUT", + IngressInput::RtmpInput => "RTMP_INPUT", + IngressInput::WhipInput => "WHIP_INPUT", + IngressInput::UrlInput => "URL_INPUT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -4017,8 +4208,8 @@ impl IngressAudioEncodingPreset { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::OpusStereo96kbps => "OPUS_STEREO_96KBPS", - Self::OpusMono64kbs => "OPUS_MONO_64KBS", + IngressAudioEncodingPreset::OpusStereo96kbps => "OPUS_STEREO_96KBPS", + IngressAudioEncodingPreset::OpusMono64kbs => "OPUS_MONO_64KBS", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -4061,16 +4252,16 @@ impl IngressVideoEncodingPreset { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::H264720p30fps3Layers => "H264_720P_30FPS_3_LAYERS", - Self::H2641080p30fps3Layers => "H264_1080P_30FPS_3_LAYERS", - Self::H264540p25fps2Layers => "H264_540P_25FPS_2_LAYERS", - Self::H264720p30fps1Layer => "H264_720P_30FPS_1_LAYER", - Self::H2641080p30fps1Layer => "H264_1080P_30FPS_1_LAYER", - Self::H264720p30fps3LayersHighMotion => "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", - Self::H2641080p30fps3LayersHighMotion => "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", - Self::H264540p25fps2LayersHighMotion => "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", - Self::H264720p30fps1LayerHighMotion => "H264_720P_30FPS_1_LAYER_HIGH_MOTION", - Self::H2641080p30fps1LayerHighMotion => "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", + IngressVideoEncodingPreset::H264720p30fps3Layers => "H264_720P_30FPS_3_LAYERS", + IngressVideoEncodingPreset::H2641080p30fps3Layers => "H264_1080P_30FPS_3_LAYERS", + IngressVideoEncodingPreset::H264540p25fps2Layers => "H264_540P_25FPS_2_LAYERS", + IngressVideoEncodingPreset::H264720p30fps1Layer => "H264_720P_30FPS_1_LAYER", + IngressVideoEncodingPreset::H2641080p30fps1Layer => "H264_1080P_30FPS_1_LAYER", + IngressVideoEncodingPreset::H264720p30fps3LayersHighMotion => "H264_720P_30FPS_3_LAYERS_HIGH_MOTION", + IngressVideoEncodingPreset::H2641080p30fps3LayersHighMotion => "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION", + IngressVideoEncodingPreset::H264540p25fps2LayersHighMotion => "H264_540P_25FPS_2_LAYERS_HIGH_MOTION", + IngressVideoEncodingPreset::H264720p30fps1LayerHighMotion => "H264_720P_30FPS_1_LAYER_HIGH_MOTION", + IngressVideoEncodingPreset::H2641080p30fps1LayerHighMotion => "H264_1080P_30FPS_1_LAYER_HIGH_MOTION", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -4090,6 +4281,7 @@ impl IngressVideoEncodingPreset { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct WebhookEvent { /// one of room_started, room_finished, participant_joined, participant_left, @@ -4120,6 +4312,7 @@ pub struct WebhookEvent { #[prost(int32, tag="11")] pub num_dropped: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipTrunkRequest { /// CIDR or IPs that traffic is accepted from @@ -4157,6 +4350,7 @@ pub struct CreateSipTrunkRequest { #[prost(string, tag="11")] pub metadata: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipTrunkInfo { #[prost(string, tag="1")] @@ -4217,9 +4411,9 @@ pub mod sip_trunk_info { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::TrunkLegacy => "TRUNK_LEGACY", - Self::TrunkInbound => "TRUNK_INBOUND", - Self::TrunkOutbound => "TRUNK_OUTBOUND", + TrunkKind::TrunkLegacy => "TRUNK_LEGACY", + TrunkKind::TrunkInbound => "TRUNK_INBOUND", + TrunkKind::TrunkOutbound => "TRUNK_OUTBOUND", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -4233,12 +4427,14 @@ pub mod sip_trunk_info { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipInboundTrunkRequest { /// Trunk ID is ignored #[prost(message, optional, tag="1")] pub trunk: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipInboundTrunkInfo { #[prost(string, tag="1")] @@ -4274,12 +4470,14 @@ pub struct SipInboundTrunkInfo { #[prost(map="string, string", tag="10")] pub headers_to_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipOutboundTrunkRequest { /// Trunk ID is ignored #[prost(message, optional, tag="1")] pub trunk: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipOutboundTrunkInfo { #[prost(string, tag="1")] @@ -4315,55 +4513,67 @@ pub struct SipOutboundTrunkInfo { #[prost(map="string, string", tag="10")] pub headers_to_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSipInboundTrunkRequest { #[prost(string, tag="1")] pub sip_trunk_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSipInboundTrunkResponse { #[prost(message, optional, tag="1")] pub trunk: ::core::option::Option, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSipOutboundTrunkRequest { #[prost(string, tag="1")] pub sip_trunk_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSipOutboundTrunkResponse { #[prost(message, optional, tag="1")] pub trunk: ::core::option::Option, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipTrunkRequest { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipTrunkResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipInboundTrunkRequest { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipInboundTrunkResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipOutboundTrunkRequest { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipOutboundTrunkResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSipTrunkRequest { #[prost(string, tag="1")] pub sip_trunk_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleDirect { /// What room should call be directed into @@ -4373,6 +4583,7 @@ pub struct SipDispatchRuleDirect { #[prost(string, tag="2")] pub pin: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleIndividual { /// Prefix used on new room name @@ -4382,6 +4593,7 @@ pub struct SipDispatchRuleIndividual { #[prost(string, tag="2")] pub pin: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleCallee { /// Prefix used on new room name @@ -4394,6 +4606,7 @@ pub struct SipDispatchRuleCallee { #[prost(bool, tag="3")] pub randomize: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRule { #[prost(oneof="sip_dispatch_rule::Rule", tags="1, 2, 3")] @@ -4401,7 +4614,8 @@ pub struct SipDispatchRule { } /// Nested message and enum types in `SIPDispatchRule`. pub mod sip_dispatch_rule { - #[derive(Clone, PartialEq, ::prost::Oneof)] + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Rule { /// SIPDispatchRuleDirect is a `SIP Dispatch Rule` that puts a user directly into a room /// This places users into an existing room. Optionally you can require a pin before a user can @@ -4416,6 +4630,7 @@ pub mod sip_dispatch_rule { DispatchRuleCallee(super::SipDispatchRuleCallee), } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipDispatchRuleRequest { #[prost(message, optional, tag="1")] @@ -4443,6 +4658,7 @@ pub struct CreateSipDispatchRuleRequest { #[prost(map="string, string", tag="7")] pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDispatchRuleInfo { #[prost(string, tag="1")] @@ -4468,14 +4684,17 @@ pub struct SipDispatchRuleInfo { #[prost(map="string, string", tag="8")] pub attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipDispatchRuleRequest { } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListSipDispatchRuleResponse { #[prost(message, repeated, tag="1")] pub items: ::prost::alloc::vec::Vec, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteSipDispatchRuleRequest { #[prost(string, tag="1")] @@ -4483,6 +4702,7 @@ pub struct DeleteSipDispatchRuleRequest { } /// A SIP Participant is a singular SIP session connected to a LiveKit room via /// a SIP Trunk into a SIP DispatchRule +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateSipParticipantRequest { /// What SIP Trunk should be used to dial the user @@ -4518,6 +4738,7 @@ pub struct CreateSipParticipantRequest { #[prost(bool, tag="10")] pub hide_phone_number: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SipParticipantInfo { #[prost(string, tag="1")] @@ -4529,6 +4750,7 @@ pub struct SipParticipantInfo { #[prost(string, tag="4")] pub sip_call_id: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransferSipParticipantRequest { #[prost(string, tag="1")] @@ -4553,10 +4775,10 @@ impl SipTransport { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Self::Auto => "SIP_TRANSPORT_AUTO", - Self::Udp => "SIP_TRANSPORT_UDP", - Self::Tcp => "SIP_TRANSPORT_TCP", - Self::Tls => "SIP_TRANSPORT_TLS", + SipTransport::Auto => "SIP_TRANSPORT_AUTO", + SipTransport::Udp => "SIP_TRANSPORT_UDP", + SipTransport::Tcp => "SIP_TRANSPORT_TCP", + SipTransport::Tls => "SIP_TRANSPORT_TLS", } } /// Creates an enum from field names used in the ProtoBuf definition. From cda3e135dfd156b0c7d1d402fae599da6706cb3d Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 2 Oct 2024 18:03:23 -0700 Subject: [PATCH 03/16] stubs --- livekit-api/src/services/sip.rs | 6 ++++++ livekit/src/rtc_engine/rtc_session.rs | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/livekit-api/src/services/sip.rs b/livekit-api/src/services/sip.rs index 55ddf30a..15eef7b9 100644 --- a/livekit-api/src/services/sip.rs +++ b/livekit-api/src/services/sip.rs @@ -200,6 +200,9 @@ impl SIPClient { allowed_addresses: options.allowed_addresses.to_owned(), auth_username: options.auth_username.to_owned(), auth_password: options.auth_password.to_owned(), + + headers: HashMap::new(), + headers_to_attributes: HashMap::new(), }), }, self.base.auth_header( @@ -233,6 +236,9 @@ impl SIPClient { auth_username: options.auth_username.to_owned(), auth_password: options.auth_password.to_owned(), + + headers: HashMap::new(), + headers_to_attributes: HashMap::new(), }), }, self.base.auth_header( diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index 16dcf4e6..6ae7e66b 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -657,6 +657,11 @@ impl SessionInner { segments, }); } + proto::data_packet::Value::ChatMessage(_) => {} + proto::data_packet::Value::RpcRequest(_) => {} + proto::data_packet::Value::RpcResponse(_) => {} + proto::data_packet::Value::RpcAck(_) => {} + proto::data_packet::Value::Metrics(_) => {} } } } From d3136ee844d49e94c40845abc7faf0e64d3c12a2 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 11:18:19 -0700 Subject: [PATCH 04/16] Fix datatype --- soxr-sys/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index e8f77590..3d5562a0 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -51,8 +51,8 @@ mod tests { let mut error: soxr_error_t = ptr::null(); let io_spec = soxr_io_spec { - itype: SOXR_INT16_I as u32, - otype: SOXR_INT16_I as u32, + itype: soxr_datatype_t_SOXR_INT16_I as u32, + otype: soxr_datatype_t_SOXR_INT16_I as u32, scale: 1.0, e: ptr::null_mut(), flags: 0, From 0bb056b97717f0f228e574fd107188e55442ae0c Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 11:57:42 -0700 Subject: [PATCH 05/16] Fix tests --- .gitignore | 4 +++- soxr-sys/src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3d98c20c..a351965d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ target -/.idea \ No newline at end of file +/.idea +soxr-sys/test-output.wav +.DS_Store \ No newline at end of file diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index 3d5562a0..c6474ad9 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -24,8 +24,8 @@ mod tests { use hound::{WavReader, WavSpec, WavWriter}; - let input_wav_path = "input.wav"; - let output_wav_path = "output.wav"; + let input_wav_path = "../examples/play_from_disk/change-sophie.wav"; + let output_wav_path = "test-output.wav"; let mut reader = WavReader::open(input_wav_path).expect("Failed to open input WAV file"); From 2ce1b906bea784625bda2d4d2eebfe2fca1b8aae Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 12:08:36 -0700 Subject: [PATCH 06/16] file tweak --- examples/play_from_disk/change-sophie.wav | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/play_from_disk/change-sophie.wav b/examples/play_from_disk/change-sophie.wav index 80a9c6af..f4f760c7 100644 --- a/examples/play_from_disk/change-sophie.wav +++ b/examples/play_from_disk/change-sophie.wav @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16a978d4be2506cca5e25c5b7aa5b0e53451049d979684d9168c1a81beb4babd -size 570264 +oid sha256:d55ab1ab891488d129ab94ddc4ea567a5e297cc183f84a7d98c6741070334fb6 +size 570298 From 9744852ccde784f371786505a2a7636875cb1c5a Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 12:37:20 -0700 Subject: [PATCH 07/16] diag --- soxr-sys/src/lib.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index c6474ad9..60b2e0e7 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -6,6 +6,8 @@ include!("soxr.rs"); #[cfg(test)] mod tests { use super::*; + use std::fs::File; + use std::io::{Read, Seek, SeekFrom}; #[test] fn it_works() { @@ -27,7 +29,19 @@ mod tests { let input_wav_path = "../examples/play_from_disk/change-sophie.wav"; let output_wav_path = "test-output.wav"; - let mut reader = WavReader::open(input_wav_path).expect("Failed to open input WAV file"); + // Diagnostic: Read and print the first 12 bytes of the file + let mut file = File::open(input_wav_path).expect("Failed to open file"); + let mut header = [0u8; 12]; + file.read_exact(&mut header).expect("Failed to read header"); + println!("File header: {:?}", header); + file.seek(SeekFrom::Start(0)).expect("Failed to reset file position"); + + let reader = match WavReader::open(input_wav_path) { + Ok(reader) => reader, + Err(err) => { + panic!("Failed to open input WAV file: {}. File header: {:?}", err, header); + } + }; let wav_spec = reader.spec(); let input_rate = wav_spec.sample_rate as f64; From 7d8eb60df9459e1c871f4b8fce368e6a693e61ee Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 12:38:28 -0700 Subject: [PATCH 08/16] diag --- soxr-sys/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index 60b2e0e7..85fc42da 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -36,7 +36,7 @@ mod tests { println!("File header: {:?}", header); file.seek(SeekFrom::Start(0)).expect("Failed to reset file position"); - let reader = match WavReader::open(input_wav_path) { + let mut reader = match WavReader::open(input_wav_path) { Ok(reader) => reader, Err(err) => { panic!("Failed to open input WAV file: {}. File header: {:?}", err, header); From beec6dc1ee0cc8a0e3789e5050c5f63de661f95b Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 12:44:17 -0700 Subject: [PATCH 09/16] synthetic --- .gitignore | 1 + soxr-sys/src/lib.rs | 32 +++++++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index a351965d..b3753447 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target /.idea +soxr-sys/test-input.wav soxr-sys/test-output.wav .DS_Store \ No newline at end of file diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index 85fc42da..54de8f98 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -26,22 +26,24 @@ mod tests { use hound::{WavReader, WavSpec, WavWriter}; - let input_wav_path = "../examples/play_from_disk/change-sophie.wav"; + let input_wav_path = "test-input.wav"; let output_wav_path = "test-output.wav"; - // Diagnostic: Read and print the first 12 bytes of the file - let mut file = File::open(input_wav_path).expect("Failed to open file"); - let mut header = [0u8; 12]; - file.read_exact(&mut header).expect("Failed to read header"); - println!("File header: {:?}", header); - file.seek(SeekFrom::Start(0)).expect("Failed to reset file position"); - - let mut reader = match WavReader::open(input_wav_path) { - Ok(reader) => reader, - Err(err) => { - panic!("Failed to open input WAV file: {}. File header: {:?}", err, header); - } + let spec = WavSpec { + channels: 1, + sample_rate: 44100, + bits_per_sample: 16, + sample_format: hound::SampleFormat::Int, }; + let mut writer = WavWriter::create(input_wav_path, spec).expect("Failed to create test input WAV file"); + for t in (0..44100).map(|x| x as f32 / 44100.0) { + let sample = (t * 440.0 * 2.0 * std::f32::consts::PI).sin(); + let amplitude = i16::MAX as f32; + writer.write_sample((sample * amplitude) as i16).expect("Failed to write sample"); + } + writer.finalize().expect("Failed to finalize test input WAV file"); + + let mut reader = WavReader::open(input_wav_path).expect("Failed to open input WAV file"); let wav_spec = reader.spec(); let input_rate = wav_spec.sample_rate as f64; @@ -160,5 +162,9 @@ mod tests { unsafe { soxr_delete(soxr); } + + // Clean up the test files + std::fs::remove_file(input_wav_path).expect("Failed to remove test input file"); + std::fs::remove_file(output_wav_path).expect("Failed to remove test output file"); } } From 9b540b8951a6c1d25d080bd36709bcbbc47cc6d3 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 12:47:59 -0700 Subject: [PATCH 10/16] fmt --- soxr-sys/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index 54de8f98..fc01ddd6 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -35,7 +35,8 @@ mod tests { bits_per_sample: 16, sample_format: hound::SampleFormat::Int, }; - let mut writer = WavWriter::create(input_wav_path, spec).expect("Failed to create test input WAV file"); + let mut writer = + WavWriter::create(input_wav_path, spec).expect("Failed to create test input WAV file"); for t in (0..44100).map(|x| x as f32 / 44100.0) { let sample = (t * 440.0 * 2.0 * std::f32::consts::PI).sin(); let amplitude = i16::MAX as f32; From 7e9d3b3596a4376f793c426972fce45b0a587c36 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 13:00:31 -0700 Subject: [PATCH 11/16] Cleanup --- soxr-sys/src/lib.rs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index fc01ddd6..ace426ea 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -29,15 +29,23 @@ mod tests { let input_wav_path = "test-input.wav"; let output_wav_path = "test-output.wav"; - let spec = WavSpec { + let input_spec = WavSpec { channels: 1, sample_rate: 44100, bits_per_sample: 16, sample_format: hound::SampleFormat::Int, }; - let mut writer = - WavWriter::create(input_wav_path, spec).expect("Failed to create test input WAV file"); - for t in (0..44100).map(|x| x as f32 / 44100.0) { + + let output_spec = WavSpec { + channels: 1, + sample_rate: 24000, + bits_per_sample: 16, + sample_format: hound::SampleFormat::Int, + }; + + let mut writer = WavWriter::create(input_wav_path, input_spec) + .expect("Failed to create test input WAV file"); + for t in (0..input_spec.sample_rate).map(|x| x as f32 / input_spec.sample_rate as f32) { let sample = (t * 440.0 * 2.0 * std::f32::consts::PI).sin(); let amplitude = i16::MAX as f32; writer.write_sample((sample * amplitude) as i16).expect("Failed to write sample"); @@ -47,8 +55,6 @@ mod tests { let mut reader = WavReader::open(input_wav_path).expect("Failed to open input WAV file"); let wav_spec = reader.spec(); - let input_rate = wav_spec.sample_rate as f64; - let output_rate = 24000.0; let num_channels = wav_spec.channels as u32; @@ -56,8 +62,9 @@ mod tests { reader.samples::().map(|s| s.expect("Failed to read sample")).collect(); let buf_total_len = samples.len(); - let olen = - ((output_rate * buf_total_len as f64) / (input_rate + output_rate) + 0.5) as usize; + let olen = ((output_spec.sample_rate as f64 * buf_total_len as f64) + / (input_spec.sample_rate as f64 + output_spec.sample_rate as f64) + + 0.5) as usize; let ilen = buf_total_len - olen; let mut obuf = vec![0i16; olen]; @@ -77,8 +84,8 @@ mod tests { let soxr = unsafe { soxr_create( - input_rate, - output_rate, + input_spec.sample_rate as f64, + output_spec.sample_rate as f64, num_channels, &mut error, &io_spec, @@ -138,15 +145,8 @@ mod tests { need_input = (odone < olen) && ibuf.is_some(); } - let spec = WavSpec { - channels: wav_spec.channels, - sample_rate: output_rate as u32, - bits_per_sample: 16, - sample_format: hound::SampleFormat::Int, - }; - - let mut writer = - WavWriter::create(output_wav_path, spec).expect("Failed to create output WAV file"); + let mut writer = WavWriter::create(output_wav_path, output_spec) + .expect("Failed to create output WAV file"); for sample in output_samples { writer.write_sample(sample).expect("Failed to write sample"); From 2fa171a778177716b404ebeee43cba1e8f93b7ac Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 13:02:39 -0700 Subject: [PATCH 12/16] 3s --- soxr-sys/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index ace426ea..0a216f85 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -43,9 +43,13 @@ mod tests { sample_format: hound::SampleFormat::Int, }; + let input_duration: u32 = 3; // 3 second of audio + let mut writer = WavWriter::create(input_wav_path, input_spec) .expect("Failed to create test input WAV file"); - for t in (0..input_spec.sample_rate).map(|x| x as f32 / input_spec.sample_rate as f32) { + for t in (0..input_spec.sample_rate * input_duration) + .map(|x| x as f32 / input_spec.sample_rate as f32) + { let sample = (t * 440.0 * 2.0 * std::f32::consts::PI).sin(); let amplitude = i16::MAX as f32; writer.write_sample((sample * amplitude) as i16).expect("Failed to write sample"); From 5f94371e42179efe95cc1ec98354b9cdb23f5709 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 13:08:35 -0700 Subject: [PATCH 13/16] doc --- soxr-sys/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soxr-sys/src/lib.rs b/soxr-sys/src/lib.rs index 0a216f85..545f21c7 100644 --- a/soxr-sys/src/lib.rs +++ b/soxr-sys/src/lib.rs @@ -50,7 +50,8 @@ mod tests { for t in (0..input_spec.sample_rate * input_duration) .map(|x| x as f32 / input_spec.sample_rate as f32) { - let sample = (t * 440.0 * 2.0 * std::f32::consts::PI).sin(); + let a4note = 440.0; // 440Hz = A4 + let sample = (t * a4note * 2.0 * std::f32::consts::PI).sin(); let amplitude = i16::MAX as f32; writer.write_sample((sample * amplitude) as i16).expect("Failed to write sample"); } @@ -168,7 +169,6 @@ mod tests { soxr_delete(soxr); } - // Clean up the test files std::fs::remove_file(input_wav_path).expect("Failed to remove test input file"); std::fs::remove_file(output_wav_path).expect("Failed to remove test output file"); } From 02c8bc3d54cd8fcd0aad26e7454d5d0aaabae64c Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 13:11:24 -0700 Subject: [PATCH 14/16] Default::default(), --- livekit-api/src/services/sip.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/livekit-api/src/services/sip.rs b/livekit-api/src/services/sip.rs index 15eef7b9..2274555b 100644 --- a/livekit-api/src/services/sip.rs +++ b/livekit-api/src/services/sip.rs @@ -201,8 +201,8 @@ impl SIPClient { auth_username: options.auth_username.to_owned(), auth_password: options.auth_password.to_owned(), - headers: HashMap::new(), - headers_to_attributes: HashMap::new(), + headers: Default::default(), + headers_to_attributes: Default::default(), }), }, self.base.auth_header( @@ -237,8 +237,8 @@ impl SIPClient { auth_username: options.auth_username.to_owned(), auth_password: options.auth_password.to_owned(), - headers: HashMap::new(), - headers_to_attributes: HashMap::new(), + headers: Default::default(), + headers_to_attributes: Default::default() }), }, self.base.auth_header( From b21c094f8eb71b097e10c79c7d4608aa4ac2be15 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 13:11:36 -0700 Subject: [PATCH 15/16] comma --- livekit-api/src/services/sip.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/livekit-api/src/services/sip.rs b/livekit-api/src/services/sip.rs index 2274555b..aaf796f5 100644 --- a/livekit-api/src/services/sip.rs +++ b/livekit-api/src/services/sip.rs @@ -238,7 +238,7 @@ impl SIPClient { auth_password: options.auth_password.to_owned(), headers: Default::default(), - headers_to_attributes: Default::default() + headers_to_attributes: Default::default(), }), }, self.base.auth_header( From 07f4f1c697c717c89fad1c9a9d643f18a917e778 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Thu, 3 Oct 2024 15:07:35 -0700 Subject: [PATCH 16/16] Update livekit/src/rtc_engine/rtc_session.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Théo Monnom --- livekit/src/rtc_engine/rtc_session.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index 6ae7e66b..100ef839 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -657,11 +657,7 @@ impl SessionInner { segments, }); } - proto::data_packet::Value::ChatMessage(_) => {} - proto::data_packet::Value::RpcRequest(_) => {} - proto::data_packet::Value::RpcResponse(_) => {} - proto::data_packet::Value::RpcAck(_) => {} - proto::data_packet::Value::Metrics(_) => {} + _ => {} } } }