From a065d916a45fd2c2e5d49d874e9f070ca41de5ef Mon Sep 17 00:00:00 2001 From: lukasIO Date: Fri, 20 Sep 2024 15:53:48 +0200 Subject: [PATCH 01/14] Add chat APIs - wip --- .gitignore | 3 +- Cargo.lock | 2 +- Cargo.toml | 1 + livekit-api/src/services/sip.rs | 5 + livekit-ffi/protocol/ffi.proto | 6 + livekit-ffi/protocol/room.proto | 27 + livekit-ffi/src/livekit.proto.rs | 57 +- livekit-ffi/src/server/requests.rs | 14 + livekit-ffi/src/server/room.rs | 34 + livekit-protocol/protocol | 2 +- livekit-protocol/src/livekit.rs | 546 +++- livekit-protocol/src/livekit.serde.rs | 2404 +++++++++++++++-- livekit/src/room/mod.rs | 14 + .../src/room/participant/local_participant.rs | 22 +- livekit/src/rtc_engine/rtc_session.rs | 4 + 15 files changed, 2834 insertions(+), 307 deletions(-) diff --git a/.gitignore b/.gitignore index 3d98c20c..d69b9b0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ target -/.idea \ No newline at end of file +/.idea +.DS_Store \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 91bcfced..4cce0749 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1591,7 +1591,7 @@ dependencies = [ [[package]] name = "livekit-ffi" -version = "0.10.1" +version = "0.10.2" dependencies = [ "console-subscriber", "dashmap", diff --git a/Cargo.toml b/Cargo.toml index 507af224..2ed8a383 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,4 @@ members = [ "webrtc-sys", "webrtc-sys/build", ] +resolver = "2" diff --git a/livekit-api/src/services/sip.rs b/livekit-api/src/services/sip.rs index 55ddf30a..3f789a73 100644 --- a/livekit-api/src/services/sip.rs +++ b/livekit-api/src/services/sip.rs @@ -200,6 +200,8 @@ 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(), // FIXME Lukas + headers_to_attributes: HashMap::new(), // FIXME Lukas }), }, self.base.auth_header( @@ -233,6 +235,9 @@ impl SIPClient { auth_username: options.auth_username.to_owned(), auth_password: options.auth_password.to_owned(), + + headers: HashMap::new(), // FIXME Lukas + headers_to_attributes: HashMap::new(), // FIXME Lukas }), }, self.base.auth_header( diff --git a/livekit-ffi/protocol/ffi.proto b/livekit-ffi/protocol/ffi.proto index 173d3628..3c7d9d7c 100644 --- a/livekit-ffi/protocol/ffi.proto +++ b/livekit-ffi/protocol/ffi.proto @@ -69,6 +69,7 @@ message FfiRequest { GetSessionStatsRequest get_session_stats = 12; PublishTranscriptionRequest publish_transcription = 13; PublishSipDtmfRequest publish_sip_dtmf = 14; + SendChatMessageRequest send_chat_message = 33; // Track CreateVideoTrackRequest create_video_track = 15; @@ -93,6 +94,8 @@ message FfiRequest { RemixAndResampleRequest remix_and_resample = 30; E2eeRequest e2ee = 31; AudioStreamFromParticipantRequest audio_stream_from_participant = 32; + + // next-id 34 } } @@ -114,6 +117,7 @@ message FfiResponse { GetSessionStatsResponse get_session_stats = 12; PublishTranscriptionResponse publish_transcription = 13; PublishSipDtmfResponse publish_sip_dtmf = 14; + SendChatMessageResponse send_chat_message = 33; // Track CreateVideoTrackResponse create_video_track = 15; @@ -138,6 +142,8 @@ message FfiResponse { RemixAndResampleResponse remix_and_resample = 30; AudioStreamFromParticipantResponse audio_stream_from_participant = 31; E2eeResponse e2ee = 32; + + // next-id 34 } } diff --git a/livekit-ffi/protocol/room.proto b/livekit-ffi/protocol/room.proto index 1cdbb977..c32f9a6e 100644 --- a/livekit-ffi/protocol/room.proto +++ b/livekit-ffi/protocol/room.proto @@ -144,6 +144,19 @@ message SetLocalMetadataCallback { optional string error = 2; } +message SendChatMessageRequest { + uint64 local_participant_handle = 1; + string message = 2; +} +message SendChatMessageResponse { + uint64 async_id = 1; + ChatMessage message = 2; +} +message SendChatMessageCallback { + uint64 async_id = 1; + optional string error = 2; +} + // Change the local participant's attributes message SetLocalAttributesRequest { uint64 local_participant_handle = 1; @@ -457,6 +470,20 @@ message UserPacket { optional string topic = 2; } +message ChatMessage { + string id = 1; + uint64 timestamp = 2; + string message = 3; + optional uint64 edit_timestamp = 4; + optional bool delete = 5; + optional bool generated = 6; +} + +message ChatMessageReceived { + ChatMessage message = 1; + string participant_identity = 2; +} + message SipDTMF { uint32 code = 1; optional string digit = 2; diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index 1cfce957..2b42a685 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -1,4 +1,5 @@ // @generated +// This file is @generated by prost-build. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FrameCryptor { @@ -2209,6 +2210,30 @@ pub struct SetLocalMetadataCallback { #[prost(string, optional, tag="2")] pub error: ::core::option::Option<::prost::alloc::string::String>, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendChatMessageRequest { + #[prost(uint64, tag="1")] + pub local_participant_handle: u64, + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendChatMessageResponse { + #[prost(uint64, tag="1")] + pub async_id: u64, + #[prost(message, optional, tag="2")] + pub message: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendChatMessageCallback { + #[prost(uint64, tag="1")] + pub async_id: u64, + #[prost(string, optional, tag="2")] + pub error: ::core::option::Option<::prost::alloc::string::String>, +} /// Change the local participant's attributes #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2654,6 +2679,30 @@ pub struct UserPacket { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChatMessage { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(uint64, tag="2")] + pub timestamp: u64, + #[prost(string, tag="3")] + pub message: ::prost::alloc::string::String, + #[prost(uint64, optional, tag="4")] + pub edit_timestamp: ::core::option::Option, + #[prost(bool, optional, tag="5")] + pub delete: ::core::option::Option, + #[prost(bool, optional, tag="6")] + pub generated: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChatMessageReceived { + #[prost(message, optional, tag="1")] + pub message: ::core::option::Option, + #[prost(string, tag="2")] + pub participant_identity: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SipDtmf { #[prost(uint32, tag="1")] pub code: u32, @@ -3250,7 +3299,7 @@ impl AudioSourceType { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiRequest { - #[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32")] + #[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 33, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiRequest`. @@ -3285,6 +3334,8 @@ pub mod ffi_request { PublishTranscription(super::PublishTranscriptionRequest), #[prost(message, tag="14")] PublishSipDtmf(super::PublishSipDtmfRequest), + #[prost(message, tag="33")] + SendChatMessage(super::SendChatMessageRequest), /// Track #[prost(message, tag="15")] CreateVideoTrack(super::CreateVideoTrackRequest), @@ -3330,7 +3381,7 @@ pub mod ffi_request { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiResponse { - #[prost(oneof="ffi_response::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32")] + #[prost(oneof="ffi_response::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 33, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiResponse`. @@ -3365,6 +3416,8 @@ pub mod ffi_response { PublishTranscription(super::PublishTranscriptionResponse), #[prost(message, tag="14")] PublishSipDtmf(super::PublishSipDtmfResponse), + #[prost(message, tag="33")] + SendChatMessage(super::SendChatMessageResponse), /// Track #[prost(message, tag="15")] CreateVideoTrack(super::CreateVideoTrackResponse), diff --git a/livekit-ffi/src/server/requests.rs b/livekit-ffi/src/server/requests.rs index 89e39576..e63ede45 100644 --- a/livekit-ffi/src/server/requests.rs +++ b/livekit-ffi/src/server/requests.rs @@ -182,6 +182,17 @@ fn on_set_local_attributes( Ok(ffi_participant.room.set_local_attributes(server, set_local_attributes)) } +fn on_send_chat_message( + server: &'static FfiServer, + send_chat_message: proto::SendChatMessageRequest, +) -> FfiResult { + let ffi_participant = server + .retrieve_handle::(send_chat_message.local_participant_handle)? + .clone(); + + Ok(ffi_participant.room.send_chat_message(server, send_chat_message)) +} + /// Create a new video track from a source fn on_create_video_track( server: &'static FfiServer, @@ -708,6 +719,9 @@ pub fn handle_request( server, update, )?) } + proto::ffi_request::Message::SendChatMessage(update) => { + proto::ffi_response::Message::SendChatMessage(on_send_chat_message(server, update)?) + } proto::ffi_request::Message::CreateVideoTrack(create) => { proto::ffi_response::Message::CreateVideoTrack(on_create_video_track(server, create)?) } diff --git a/livekit-ffi/src/server/room.rs b/livekit-ffi/src/server/room.rs index cf6fe02f..b3e9a066 100644 --- a/livekit-ffi/src/server/room.rs +++ b/livekit-ffi/src/server/room.rs @@ -569,6 +569,28 @@ impl RoomInner { server.watch_panic(handle); proto::SetLocalAttributesResponse { async_id } } + + pub fn send_chat_message( + self: &Arc, + server: &'static FfiServer, + send_chat_message: proto::SendChatMessageRequest, + ) -> proto::SendChatMessageResponse { + let async_id = server.next_id(); + let inner = self.clone(); + let handle = server.async_runtime.spawn(async move { + let res = + inner.room.local_participant().send_chat_message(send_chat_message.message).await; + + let message = server.send_event(proto::ffi_event::Message::SendChatMessage( + proto::SendChatMessageCallback { + async_id, + error: res.err().map(|e| e.to_string()), + }, + )); + }); + server.watch_panic(handle); + proto::SendChatMessageResponse { async_id, message } + } } // Task used to publish data without blocking the client thread @@ -977,6 +999,18 @@ async fn forward_event( }, )); } + RoomEvent::ChatMessage { message, participant } => { + let (sid, identity) = match participant { + Some(p) => (Some(p.sid().to_string()), p.identity().to_string()), + None => (None, String::new()), + }; + let _ = send_event(proto::room_event::Message::ChatMessageReceived( + proto::ChatMessageReceived { + message: proto::ChatMessage::from(message).into(), + participant_identity: identity, + }, + )); + } RoomEvent::ConnectionStateChanged(state) => { let _ = send_event(proto::room_event::Message::ConnectionStateChanged( proto::ConnectionStateChanged { state: proto::ConnectionState::from(state).into() }, diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index 5c7350d2..0aee0cac 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit 5c7350d25904ed8fd8163e91ff47f0577ca6afad +Subproject commit 0aee0cac9b1f078d238a581faec76e625a684e0a diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index e7cc3d0c..b91c5188 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -1,5 +1,120 @@ // @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) + #[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, +} +#[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 + /// 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, +} +#[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")] + 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, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[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, +} +// +// 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, + 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 { + MetricLabel::AgentsLlmTtft => "AGENTS_LLM_TTFT", + MetricLabel::AgentsSttTtft => "AGENTS_STT_TTFT", + MetricLabel::AgentsTtsTtfb => "AGENTS_TTS_TTFB", + MetricLabel::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), + "METRIC_LABEL_PREDEFINED_MAX_VALUE" => Some(Self::PredefinedMaxValue), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Room { #[prost(string, tag="1")] @@ -29,6 +144,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")] @@ -36,7 +152,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, @@ -45,6 +162,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 @@ -75,7 +193,11 @@ 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")] @@ -189,7 +311,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`. @@ -224,6 +347,7 @@ pub mod encryption { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodecInfo { #[prost(string, tag="1")] @@ -235,6 +359,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")] @@ -285,7 +410,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")] @@ -301,6 +427,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] @@ -312,7 +439,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")] pub value: ::core::option::Option, } /// Nested message and enum types in `DataPacket`. @@ -343,7 +470,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), @@ -353,13 +481,19 @@ 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), } } +#[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")] @@ -371,6 +505,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 @@ -403,6 +538,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")] @@ -410,6 +546,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 @@ -420,6 +557,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")] @@ -435,6 +573,27 @@ 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, +} +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantTracks { /// participant ID of participant to whom the tracks belong @@ -444,6 +603,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")] @@ -492,6 +652,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")] @@ -532,6 +693,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. @@ -551,6 +714,8 @@ pub mod client_info { 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. @@ -567,12 +732,15 @@ 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")] @@ -586,11 +754,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 @@ -600,7 +770,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>, @@ -621,6 +792,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")] @@ -708,12 +880,34 @@ 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, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, 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, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct RtpForwarderState { #[prost(bool, tag="1")] pub started: bool, @@ -727,18 +921,22 @@ 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 { - #[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, @@ -753,7 +951,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, @@ -770,7 +969,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, @@ -1190,6 +1390,7 @@ impl AudioTrackFeature { } } /// composite using a web browser +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomCompositeEgressRequest { /// required @@ -1224,7 +1425,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), @@ -1233,7 +1435,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")] @@ -1244,6 +1447,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")] @@ -1271,7 +1475,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), @@ -1280,7 +1485,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), @@ -1289,6 +1495,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 @@ -1313,7 +1520,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")] @@ -1324,6 +1532,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 @@ -1352,7 +1561,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), @@ -1361,7 +1571,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")] @@ -1372,6 +1583,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 @@ -1387,7 +1599,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), @@ -1395,6 +1608,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) @@ -1411,7 +1625,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), @@ -1424,6 +1639,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) @@ -1454,7 +1670,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), @@ -1466,6 +1683,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}) @@ -1479,7 +1697,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), @@ -1491,6 +1710,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) @@ -1521,7 +1741,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), @@ -1533,6 +1754,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")] @@ -1559,6 +1781,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" @@ -1569,6 +1792,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")] @@ -1578,6 +1802,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")] @@ -1591,6 +1816,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")] @@ -1600,6 +1826,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 @@ -1609,7 +1836,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")] @@ -1648,6 +1876,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")] @@ -1655,6 +1884,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")] @@ -1664,6 +1894,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) @@ -1676,16 +1907,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")] @@ -1724,7 +1958,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), @@ -1738,7 +1973,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), @@ -1748,11 +1984,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")] @@ -1800,6 +2038,7 @@ pub mod stream_info { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileInfo { #[prost(string, tag="1")] @@ -1815,6 +2054,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")] @@ -1836,6 +2076,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")] @@ -1847,6 +2088,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")] @@ -1858,7 +2100,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")] @@ -1868,6 +2111,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}) @@ -1881,7 +2125,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), @@ -2124,6 +2369,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")] @@ -2131,7 +2377,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")] @@ -2186,6 +2433,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")] @@ -2193,7 +2441,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")] @@ -2266,6 +2515,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")] @@ -2273,6 +2523,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 @@ -2314,6 +2565,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")] @@ -2323,6 +2575,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")] @@ -2330,6 +2583,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")] @@ -2364,7 +2618,13 @@ 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")] @@ -2372,6 +2632,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")] @@ -2379,11 +2640,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" @@ -2392,11 +2655,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")] @@ -2406,6 +2671,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")] @@ -2434,6 +2700,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")] @@ -2441,6 +2708,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")] @@ -2450,6 +2718,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 @@ -2501,6 +2770,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")] @@ -2508,6 +2778,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")] @@ -2521,6 +2792,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")] @@ -2530,16 +2802,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")] @@ -2549,11 +2824,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")] @@ -2563,18 +2840,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")] @@ -2582,6 +2862,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")] @@ -2591,6 +2872,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 @@ -2603,6 +2885,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")] @@ -2610,6 +2893,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")] @@ -2619,6 +2903,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 @@ -2636,6 +2921,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")] @@ -2645,14 +2931,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")] @@ -2684,7 +2972,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, @@ -2692,7 +2981,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")] @@ -2700,11 +2990,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")] @@ -2714,6 +3006,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")] @@ -2721,6 +3014,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")] @@ -2765,6 +3059,7 @@ pub mod request_response { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackSubscribed { #[prost(string, tag="1")] @@ -2851,6 +3146,7 @@ impl CandidateProtocol { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Job { #[prost(string, tag="1")] @@ -2873,6 +3169,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")] @@ -2889,6 +3186,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")] @@ -2896,7 +3194,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")] @@ -2919,6 +3218,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")] @@ -2926,7 +3226,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")] @@ -2942,6 +3243,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")] @@ -2951,18 +3253,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")] @@ -2980,6 +3285,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")] @@ -2987,12 +3293,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")] @@ -3002,6 +3310,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")] @@ -3019,6 +3328,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")] @@ -3030,7 +3340,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, @@ -3040,6 +3351,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")] @@ -3049,6 +3361,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")] @@ -3138,6 +3451,7 @@ impl JobStatus { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAgentDispatchRequest { #[prost(string, tag="1")] @@ -3147,6 +3461,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")] @@ -3154,6 +3469,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")] @@ -3161,6 +3477,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 @@ -3170,11 +3487,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")] @@ -3188,6 +3507,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. @@ -3199,6 +3519,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 @@ -3243,6 +3564,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")] @@ -3252,42 +3574,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 @@ -3297,9 +3627,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 @@ -3314,11 +3646,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")] @@ -3339,6 +3673,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")] @@ -3356,9 +3691,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")] @@ -3378,9 +3715,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")] @@ -3389,6 +3728,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 @@ -3419,6 +3759,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")] @@ -3453,6 +3794,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")] @@ -3464,7 +3806,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), @@ -3472,6 +3815,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")] @@ -3483,7 +3827,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), @@ -3491,7 +3836,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")] @@ -3503,6 +3849,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 @@ -3514,6 +3861,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")] @@ -3553,6 +3901,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")] @@ -3616,6 +3965,7 @@ pub mod ingress_state { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputVideoState { #[prost(string, tag="1")] @@ -3629,6 +3979,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")] @@ -3640,6 +3991,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")] @@ -3664,6 +4016,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 @@ -3675,11 +4028,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")] @@ -3803,6 +4158,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, @@ -3833,6 +4189,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 @@ -3870,6 +4227,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")] @@ -3946,12 +4304,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")] @@ -3980,13 +4340,21 @@ 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")] @@ -4013,36 +4381,76 @@ 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>, +} +#[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, } -#[derive(Clone, Copy, PartialEq, ::prost::Message)] +#[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, +} +#[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 @@ -4052,6 +4460,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 @@ -4061,14 +4470,29 @@ 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, +} +#[allow(clippy::derive_partial_eq_without_eq)] #[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 { - #[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 @@ -4078,8 +4502,12 @@ 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")] @@ -4107,6 +4535,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")] @@ -4132,14 +4561,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")] @@ -4147,6 +4579,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 @@ -4182,6 +4615,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")] diff --git a/livekit-protocol/src/livekit.serde.rs b/livekit-protocol/src/livekit.serde.rs index 62e7c690..8fae83e9 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 @@ -2428,6 +2617,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 +2641,8 @@ impl<'de> serde::Deserialize<'de> for client_info::Sdk { "RUST", "PYTHON", "CPP", + "UNITY_WEB", + "NODE", ]; struct GeneratedVisitor; @@ -2501,6 +2694,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 +4948,12 @@ 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)?; + } } } struct_ser.end() @@ -4775,6 +4976,9 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "sip_dtmf", "sipDtmf", "transcription", + "metrics", + "chat_message", + "chatMessage", ]; #[allow(clippy::enum_variant_names)] @@ -4786,6 +4990,8 @@ impl<'de> serde::Deserialize<'de> for DataPacket { Speaker, SipDtmf, Transcription, + Metrics, + ChatMessage, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4815,6 +5021,8 @@ 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), _ => Ok(GeneratedField::__SkipField__), } } @@ -4884,6 +5092,20 @@ 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::__SkipField__ => { @@ -7295,7 +7517,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 +7525,95 @@ 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())?; + let mut struct_ser = serializer.serialize_struct("livekit.EventMetric", len)?; + if self.label != 0 { + struct_ser.serialize_field("label", &self.label)?; } - if self.duration != 0 { + 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)?; } 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", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Filename, - StartedAt, - EndedAt, - Duration, - Size, - Location, + Label, + ParticipantIdentity, + TrackSid, + StartTimestampMs, + EndTimestampMs, + NormalizedStartTimestamp, + NormalizedEndTimestamp, + Metadata, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7398,12 +7636,14 @@ 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), _ => Ok(GeneratedField::__SkipField__), } } @@ -7413,40 +7653,256 @@ 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 location__ = 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; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Filename => { - if filename__.is_some() { - return Err(serde::de::Error::duplicate_field("filename")); + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); } - filename__ = Some(map_.next_value()?); + label__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::StartedAt => { - if started_at__.is_some() { - return Err(serde::de::Error::duplicate_field("startedAt")); + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); } - started_at__ = + participant_identity__ = Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::EndedAt => { - if ended_at__.is_some() { + 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::__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(), + }) + } + } + 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 { + GeneratedField::Filename => { + if filename__.is_some() { + return Err(serde::de::Error::duplicate_field("filename")); + } + filename__ = 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__ = @@ -7605,21 +8061,403 @@ impl<'de> serde::Deserialize<'de> for GcpUpload { if proxy__.is_some() { return Err(serde::de::Error::duplicate_field("proxy")); } - proxy__ = map_.next_value()?; + proxy__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(GcpUpload { + credentials: credentials__.unwrap_or_default(), + bucket: bucket__.unwrap_or_default(), + proxy: proxy__, + }) + } + } + deserializer.deserialize_struct("livekit.GCPUpload", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetSipInboundTrunkRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + 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.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 GetSipInboundTrunkRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sip_trunk_id", + "sipTrunkId", + ]; + + #[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 = 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 { + "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 = GetSipInboundTrunkRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.GetSIPInboundTrunkRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + 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(GetSipInboundTrunkRequest { + sip_trunk_id: sip_trunk_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.GetSIPInboundTrunkRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetSipInboundTrunkResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + 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 GetSipInboundTrunkResponse { + #[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 + 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 { + "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 expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.GetSIPInboundTrunkResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + 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_struct("livekit.GetSIPInboundTrunkResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetSipOutboundTrunkRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + 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 GetSipOutboundTrunkRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sip_trunk_id", + "sipTrunkId", + ]; + + #[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 = 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 { + "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 expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.GetSIPOutboundTrunkRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + 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_struct("livekit.GetSIPOutboundTrunkRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetSipOutboundTrunkResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.trunk.is_some() { + 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)?; + } + 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 + 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 { + "trunk" => Ok(GeneratedField::Trunk), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetSipOutboundTrunkResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.GetSIPOutboundTrunkResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + 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(GcpUpload { - credentials: credentials__.unwrap_or_default(), - bucket: bucket__.unwrap_or_default(), - proxy: proxy__, + Ok(GetSipOutboundTrunkResponse { + trunk: trunk__, }) } } - deserializer.deserialize_struct("livekit.GCPUpload", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.GetSIPOutboundTrunkResponse", FIELDS, GeneratedVisitor) } } impl serde::Serialize for IceServer { @@ -11029,6 +11867,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 +11915,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 +11955,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 +11976,8 @@ impl<'de> serde::Deserialize<'de> for JoinResponse { PingInterval, ServerInfo, SifTrailer, + EnabledPublishCodecs, + FastPublish, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -11157,6 +12013,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 +12047,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 +12135,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 +12166,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(), }) } } @@ -13024,55 +13898,327 @@ impl<'de> serde::Deserialize<'de> for ListSipOutboundTrunkResponse { formatter.write_str("struct livekit.ListSIPOutboundTrunkResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut items__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Items => { + if items__.is_some() { + return Err(serde::de::Error::duplicate_field("items")); + } + items__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ListSipOutboundTrunkResponse { + items: items__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.ListSIPOutboundTrunkResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ListSipTrunkRequest { + #[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.ListSIPTrunkRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ListSipTrunkRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + __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, + { + Ok(GeneratedField::__SkipField__) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ListSipTrunkRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ListSIPTrunkRequest") + } + + 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::()?; + } + Ok(ListSipTrunkRequest { + }) + } + } + deserializer.deserialize_struct("livekit.ListSIPTrunkRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ListSipTrunkResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.items.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ListSIPTrunkResponse", len)?; + if !self.items.is_empty() { + struct_ser.serialize_field("items", &self.items)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ListSipTrunkResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "items", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Items, + __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 { + "items" => Ok(GeneratedField::Items), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ListSipTrunkResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ListSIPTrunkResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut items__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Items => { + if items__.is_some() { + return Err(serde::de::Error::duplicate_field("items")); + } + items__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ListSipTrunkResponse { + items: items__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.ListSIPTrunkResponse", FIELDS, GeneratedVisitor) + } +} +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::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", + "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, { - let mut items__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Items => { - if items__.is_some() { - return Err(serde::de::Error::duplicate_field("items")); - } - items__ = Some(map_.next_value()?); - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } + match value { + "AGENTS_LLM_TTFT" => Ok(MetricLabel::AgentsLlmTtft), + "AGENTS_STT_TTFT" => Ok(MetricLabel::AgentsSttTtft), + "AGENTS_TTS_TTFB" => Ok(MetricLabel::AgentsTtsTtfb), + "METRIC_LABEL_PREDEFINED_MAX_VALUE" => Ok(MetricLabel::PredefinedMaxValue), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } - Ok(ListSipOutboundTrunkResponse { - items: items__.unwrap_or_default(), - }) } } - deserializer.deserialize_struct("livekit.ListSIPOutboundTrunkResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for ListSipTrunkRequest { +impl serde::Serialize for MetricSample { #[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.ListSIPTrunkRequest", len)?; + let mut len = 0; + if self.timestamp_ms != 0 { + len += 1; + } + 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 ListSipTrunkRequest { +impl<'de> serde::Deserialize<'de> for MetricSample { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "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 { @@ -13094,7 +14240,12 @@ impl<'de> serde::Deserialize<'de> for ListSipTrunkRequest { where E: serde::de::Error, { - Ok(GeneratedField::__SkipField__) + 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) @@ -13102,27 +14253,59 @@ impl<'de> serde::Deserialize<'de> for ListSipTrunkRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ListSipTrunkRequest; + type Value = MetricSample; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ListSIPTrunkRequest") + formatter.write_str("struct livekit.MetricSample") } - 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 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(ListSipTrunkRequest { + Ok(MetricSample { + timestamp_ms: timestamp_ms__.unwrap_or_default(), + normalized_timestamp: normalized_timestamp__, + value: value__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.ListSIPTrunkRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.MetricSample", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ListSipTrunkResponse { +impl serde::Serialize for MetricsBatch { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -13130,29 +14313,67 @@ impl serde::Serialize for ListSipTrunkResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.items.is_empty() { + if self.timestamp_ms != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.ListSIPTrunkResponse", len)?; - if !self.items.is_empty() { - struct_ser.serialize_field("items", &self.items)?; + 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 ListSipTrunkResponse { +impl<'de> serde::Deserialize<'de> for MetricsBatch { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "items", + "timestamp_ms", + "timestampMs", + "normalized_timestamp", + "normalizedTimestamp", + "str_data", + "strData", + "time_series", + "timeSeries", + "events", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Items, + TimestampMs, + NormalizedTimestamp, + StrData, + TimeSeries, + Events, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -13175,7 +14396,11 @@ impl<'de> serde::Deserialize<'de> for ListSipTrunkResponse { E: serde::de::Error, { match value { - "items" => Ok(GeneratedField::Items), + "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__), } } @@ -13185,36 +14410,70 @@ impl<'de> serde::Deserialize<'de> for ListSipTrunkResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ListSipTrunkResponse; + type Value = MetricsBatch; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ListSIPTrunkResponse") + formatter.write_str("struct livekit.MetricsBatch") } - 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 items__ = None; + 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::Items => { - if items__.is_some() { - return Err(serde::de::Error::duplicate_field("items")); + GeneratedField::TimestampMs => { + if timestamp_ms__.is_some() { + return Err(serde::de::Error::duplicate_field("timestampMs")); } - items__ = Some(map_.next_value()?); + 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(ListSipTrunkResponse { - items: items__.unwrap_or_default(), + 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.ListSIPTrunkResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.MetricsBatch", FIELDS, GeneratedVisitor) } } impl serde::Serialize for MigrateJobRequest { @@ -14428,6 +15687,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 +15719,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 +15745,8 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { "can_update_metadata", "canUpdateMetadata", "agent", + "can_subscribe_metrics", + "canSubscribeMetrics", ]; #[allow(clippy::enum_variant_names)] @@ -14492,6 +15759,7 @@ impl<'de> serde::Deserialize<'de> for ParticipantPermission { Recorder, CanUpdateMetadata, Agent, + CanSubscribeMetrics, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -14522,6 +15790,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 +15818,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 +15869,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 +15889,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(), }) } } @@ -15184,25 +16461,154 @@ impl<'de> serde::Deserialize<'de> for Pong { if timestamp__.is_some() { return Err(serde::de::Error::duplicate_field("timestamp")); } - timestamp__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(Pong { + last_ping_timestamp: last_ping_timestamp__.unwrap_or_default(), + timestamp: timestamp__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.Pong", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ProxyConfig { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.url.is_empty() { + len += 1; + } + if !self.username.is_empty() { + len += 1; + } + if !self.password.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ProxyConfig", len)?; + if !self.url.is_empty() { + struct_ser.serialize_field("url", &self.url)?; + } + if !self.username.is_empty() { + struct_ser.serialize_field("username", &self.username)?; + } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ProxyConfig { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "url", + "username", + "password", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Url, + Username, + Password, + __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 { + "url" => Ok(GeneratedField::Url), + "username" => Ok(GeneratedField::Username), + "password" => Ok(GeneratedField::Password), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProxyConfig; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ProxyConfig") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut url__ = None; + let mut username__ = None; + let mut password__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Url => { + if url__.is_some() { + return Err(serde::de::Error::duplicate_field("url")); + } + url__ = Some(map_.next_value()?); + } + GeneratedField::Username => { + if username__.is_some() { + return Err(serde::de::Error::duplicate_field("username")); + } + username__ = Some(map_.next_value()?); + } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(Pong { - last_ping_timestamp: last_ping_timestamp__.unwrap_or_default(), - timestamp: timestamp__.unwrap_or_default(), + Ok(ProxyConfig { + url: url__.unwrap_or_default(), + username: username__.unwrap_or_default(), + password: password__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.Pong", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.ProxyConfig", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for ProxyConfig { +impl serde::Serialize for RtcpSenderReportState { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -15210,45 +16616,91 @@ impl serde::Serialize for ProxyConfig { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.url.is_empty() { + if self.rtp_timestamp != 0 { len += 1; } - if !self.username.is_empty() { + if self.rtp_timestamp_ext != 0 { len += 1; } - if !self.password.is_empty() { + if self.ntp_timestamp != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.ProxyConfig", len)?; - if !self.url.is_empty() { - struct_ser.serialize_field("url", &self.url)?; + if self.at != 0 { + len += 1; } - if !self.username.is_empty() { - struct_ser.serialize_field("username", &self.username)?; + if self.at_adjusted != 0 { + len += 1; } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; + if self.packets != 0 { + len += 1; + } + if self.octets != 0 { + len += 1; + } + 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.rtp_timestamp_ext != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("rtpTimestampExt", ToString::to_string(&self.rtp_timestamp_ext).as_str())?; + } + if self.ntp_timestamp != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("ntpTimestamp", ToString::to_string(&self.ntp_timestamp).as_str())?; + } + if self.at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("at", ToString::to_string(&self.at).as_str())?; + } + if self.at_adjusted != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("atAdjusted", ToString::to_string(&self.at_adjusted).as_str())?; + } + if self.packets != 0 { + struct_ser.serialize_field("packets", &self.packets)?; + } + 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 ProxyConfig { +impl<'de> serde::Deserialize<'de> for RtcpSenderReportState { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "url", - "username", - "password", + "rtp_timestamp", + "rtpTimestamp", + "rtp_timestamp_ext", + "rtpTimestampExt", + "ntp_timestamp", + "ntpTimestamp", + "at", + "at_adjusted", + "atAdjusted", + "packets", + "octets", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Url, - Username, - Password, + RtpTimestamp, + RtpTimestampExt, + NtpTimestamp, + At, + AtAdjusted, + Packets, + Octets, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -15271,9 +16723,13 @@ impl<'de> serde::Deserialize<'de> for ProxyConfig { E: serde::de::Error, { match value { - "url" => Ok(GeneratedField::Url), - "username" => Ok(GeneratedField::Username), - "password" => Ok(GeneratedField::Password), + "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__), } } @@ -15283,52 +16739,98 @@ impl<'de> serde::Deserialize<'de> for ProxyConfig { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ProxyConfig; + type Value = RtcpSenderReportState; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.ProxyConfig") + formatter.write_str("struct livekit.RTCPSenderReportState") } - 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 url__ = None; - let mut username__ = None; - let mut password__ = None; + 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::Url => { - if url__.is_some() { - return Err(serde::de::Error::duplicate_field("url")); + GeneratedField::RtpTimestamp => { + if rtp_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("rtpTimestamp")); } - url__ = Some(map_.next_value()?); + rtp_timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Username => { - if username__.is_some() { - return Err(serde::de::Error::duplicate_field("username")); + GeneratedField::RtpTimestampExt => { + if rtp_timestamp_ext__.is_some() { + return Err(serde::de::Error::duplicate_field("rtpTimestampExt")); } - username__ = Some(map_.next_value()?); + rtp_timestamp_ext__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; } - GeneratedField::Password => { - if password__.is_some() { - return Err(serde::de::Error::duplicate_field("password")); + GeneratedField::NtpTimestamp => { + if ntp_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("ntpTimestamp")); } - password__ = Some(map_.next_value()?); + 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(ProxyConfig { - url: url__.unwrap_or_default(), - username: username__.unwrap_or_default(), - password: password__.unwrap_or_default(), + 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.ProxyConfig", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RTCPSenderReportState", FIELDS, GeneratedVisitor) } } impl serde::Serialize for RtpDrift { @@ -15618,6 +17120,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 +17151,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 +17182,8 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { "dummyStartTimestampOffset", "rtp_munger", "rtpMunger", + "sender_report_state", + "senderReportState", "vp8_munger", "vp8Munger", ]; @@ -15686,6 +17196,7 @@ impl<'de> serde::Deserialize<'de> for RtpForwarderState { ExtFirstTimestamp, DummyStartTimestampOffset, RtpMunger, + SenderReportState, Vp8Munger, __SkipField__, } @@ -15715,6 +17226,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 +17253,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 +17301,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 +17326,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 +17670,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 +17818,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 +17913,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 +17965,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 +18032,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 +18096,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 => { @@ -16893,11 +18424,11 @@ impl<'de> serde::Deserialize<'de> for RtpStats { } packet_drift__ = map_.next_value()?; } - GeneratedField::ReportDrift => { - if report_drift__.is_some() { - return Err(serde::de::Error::duplicate_field("reportDrift")); + GeneratedField::NtpReportDrift => { + if ntp_report_drift__.is_some() { + return Err(serde::de::Error::duplicate_field("ntpReportDrift")); } - report_drift__ = map_.next_value()?; + ntp_report_drift__ = map_.next_value()?; } GeneratedField::RebasedReportDrift => { if rebased_report_drift__.is_some() { @@ -16905,6 +18436,12 @@ impl<'de> serde::Deserialize<'de> for RtpStats { } 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::()?; } @@ -16953,8 +18490,9 @@ impl<'de> serde::Deserialize<'de> for RtpStats { 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__, + ntp_report_drift: ntp_report_drift__, rebased_report_drift: rebased_report_drift__, + received_report_drift: received_report_drift__, }) } } @@ -19639,42 +21177,171 @@ impl<'de> serde::Deserialize<'de> for S3Upload { } tagging__ = Some(map_.next_value()?); } - GeneratedField::ContentDisposition => { - if content_disposition__.is_some() { - return Err(serde::de::Error::duplicate_field("contentDisposition")); + GeneratedField::ContentDisposition => { + if content_disposition__.is_some() { + return Err(serde::de::Error::duplicate_field("contentDisposition")); + } + content_disposition__ = Some(map_.next_value()?); + } + GeneratedField::Proxy => { + if proxy__.is_some() { + return Err(serde::de::Error::duplicate_field("proxy")); + } + proxy__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(S3Upload { + access_key: access_key__.unwrap_or_default(), + secret: secret__.unwrap_or_default(), + session_token: session_token__.unwrap_or_default(), + region: region__.unwrap_or_default(), + endpoint: endpoint__.unwrap_or_default(), + bucket: bucket__.unwrap_or_default(), + force_path_style: force_path_style__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + tagging: tagging__.unwrap_or_default(), + content_disposition: content_disposition__.unwrap_or_default(), + proxy: proxy__, + }) + } + } + deserializer.deserialize_struct("livekit.S3Upload", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SipDispatchRule { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.rule.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.SIPDispatchRule", len)?; + if let Some(v) = self.rule.as_ref() { + match v { + sip_dispatch_rule::Rule::DispatchRuleDirect(v) => { + struct_ser.serialize_field("dispatchRuleDirect", v)?; + } + 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() + } +} +impl<'de> serde::Deserialize<'de> for SipDispatchRule { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "dispatch_rule_direct", + "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 { + 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 { + "dispatchRuleDirect" | "dispatch_rule_direct" => Ok(GeneratedField::DispatchRuleDirect), + "dispatchRuleIndividual" | "dispatch_rule_individual" => Ok(GeneratedField::DispatchRuleIndividual), + "dispatchRuleCallee" | "dispatch_rule_callee" => Ok(GeneratedField::DispatchRuleCallee), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SipDispatchRule; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.SIPDispatchRule") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut rule__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::DispatchRuleDirect => { + if rule__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatchRuleDirect")); + } + rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleDirect) +; + } + GeneratedField::DispatchRuleIndividual => { + if rule__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatchRuleIndividual")); } - content_disposition__ = Some(map_.next_value()?); + rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleIndividual) +; } - GeneratedField::Proxy => { - if proxy__.is_some() { - return Err(serde::de::Error::duplicate_field("proxy")); + GeneratedField::DispatchRuleCallee => { + if rule__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatchRuleCallee")); } - proxy__ = map_.next_value()?; + rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleCallee) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(S3Upload { - access_key: access_key__.unwrap_or_default(), - secret: secret__.unwrap_or_default(), - session_token: session_token__.unwrap_or_default(), - region: region__.unwrap_or_default(), - endpoint: endpoint__.unwrap_or_default(), - bucket: bucket__.unwrap_or_default(), - force_path_style: force_path_style__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - tagging: tagging__.unwrap_or_default(), - content_disposition: content_disposition__.unwrap_or_default(), - proxy: proxy__, + Ok(SipDispatchRule { + rule: rule__, }) } } - deserializer.deserialize_struct("livekit.S3Upload", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.SIPDispatchRule", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for SipDispatchRule { +impl serde::Serialize for SipDispatchRuleCallee { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -19682,40 +21349,46 @@ impl serde::Serialize for SipDispatchRule { { use serde::ser::SerializeStruct; let mut len = 0; - if self.rule.is_some() { + if !self.room_prefix.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.SIPDispatchRule", len)?; - if let Some(v) = self.rule.as_ref() { - match v { - sip_dispatch_rule::Rule::DispatchRuleDirect(v) => { - struct_ser.serialize_field("dispatchRuleDirect", v)?; - } - sip_dispatch_rule::Rule::DispatchRuleIndividual(v) => { - struct_ser.serialize_field("dispatchRuleIndividual", v)?; - } - } + 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 SipDispatchRule { +impl<'de> serde::Deserialize<'de> for SipDispatchRuleCallee { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "dispatch_rule_direct", - "dispatchRuleDirect", - "dispatch_rule_individual", - "dispatchRuleIndividual", + "room_prefix", + "roomPrefix", + "pin", + "randomize", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - DispatchRuleDirect, - DispatchRuleIndividual, + RoomPrefix, + Pin, + Randomize, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -19738,8 +21411,9 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRule { E: serde::de::Error, { match value { - "dispatchRuleDirect" | "dispatch_rule_direct" => Ok(GeneratedField::DispatchRuleDirect), - "dispatchRuleIndividual" | "dispatch_rule_individual" => Ok(GeneratedField::DispatchRuleIndividual), + "roomPrefix" | "room_prefix" => Ok(GeneratedField::RoomPrefix), + "pin" => Ok(GeneratedField::Pin), + "randomize" => Ok(GeneratedField::Randomize), _ => Ok(GeneratedField::__SkipField__), } } @@ -19749,44 +21423,52 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRule { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SipDispatchRule; + type Value = SipDispatchRuleCallee; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.SIPDispatchRule") + formatter.write_str("struct livekit.SIPDispatchRuleCallee") } - 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 rule__ = None; + let mut room_prefix__ = None; + let mut pin__ = None; + let mut randomize__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::DispatchRuleDirect => { - if rule__.is_some() { - return Err(serde::de::Error::duplicate_field("dispatchRuleDirect")); + GeneratedField::RoomPrefix => { + if room_prefix__.is_some() { + return Err(serde::de::Error::duplicate_field("roomPrefix")); } - rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleDirect) -; + room_prefix__ = Some(map_.next_value()?); } - GeneratedField::DispatchRuleIndividual => { - if rule__.is_some() { - return Err(serde::de::Error::duplicate_field("dispatchRuleIndividual")); + GeneratedField::Pin => { + if pin__.is_some() { + return Err(serde::de::Error::duplicate_field("pin")); } - rule__ = map_.next_value::<::std::option::Option<_>>()?.map(sip_dispatch_rule::Rule::DispatchRuleIndividual) -; + 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(SipDispatchRule { - rule: rule__, + Ok(SipDispatchRuleCallee { + room_prefix: room_prefix__.unwrap_or_default(), + pin: pin__.unwrap_or_default(), + randomize: randomize__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.SIPDispatchRule", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.SIPDispatchRuleCallee", FIELDS, GeneratedVisitor) } } impl serde::Serialize for SipDispatchRuleDirect { @@ -20267,6 +21949,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 +21980,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 +22009,9 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { "authUsername", "auth_password", "authPassword", + "headers", + "headers_to_attributes", + "headersToAttributes", ]; #[allow(clippy::enum_variant_names)] @@ -20327,6 +22024,8 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { AllowedNumbers, AuthUsername, AuthPassword, + Headers, + HeadersToAttributes, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -20357,6 +22056,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 +22085,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 +22137,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 +22167,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(), }) } } @@ -20486,6 +22207,12 @@ impl serde::Serialize for SipOutboundTrunkInfo { 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.SIPOutboundTrunkInfo", len)?; if !self.sip_trunk_id.is_empty() { struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; @@ -20513,6 +22240,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 +22267,9 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { "authUsername", "auth_password", "authPassword", + "headers", + "headers_to_attributes", + "headersToAttributes", ]; #[allow(clippy::enum_variant_names)] @@ -20546,6 +22282,8 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { Numbers, AuthUsername, AuthPassword, + Headers, + HeadersToAttributes, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -20576,6 +22314,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 +22343,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 +22395,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 +22425,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 +28171,160 @@ 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; + } + 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)?; + } + 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", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Label, + ParticipantIdentity, + TrackSid, + Samples, + __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), + _ => 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; + 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::__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(), + }) + } + } + deserializer.deserialize_struct("livekit.TimeSeriesMetric", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for TimedVersion { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index 9b3e1bdc..4ef24b67 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -162,6 +162,10 @@ pub enum RoomEvent { digit: Option, participant: Option, }, + ChatMessage { + message: ChatMessage, + participant: Option, + }, E2eeStateChanged { participant: Participant, state: EncryptionState, @@ -236,6 +240,16 @@ pub struct SipDTMF { pub destination_identities: Vec, } +#[derive(Default, Debug, Clone)] +pub struct ChatMessage { + pub id: String, + pub message: String, + pub timestamp: u64, + pub edit_timestamp: Option, + pub delete: Option, + pub generated: Option, +} + #[derive(Debug, Clone)] pub struct RoomOptions { pub auto_subscribe: bool, diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index b9dde45d..fd568c37 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -19,7 +19,7 @@ use std::{ time::Duration, }; -use libwebrtc::rtp_parameters::RtpEncodingParameters; +use libwebrtc::{native::create_random_uuid, rtp_parameters::RtpEncodingParameters}; use livekit_api::signal_client::SignalError; use livekit_protocol as proto; use livekit_runtime::timeout; @@ -331,6 +331,26 @@ impl LocalParticipant { } } + pub async fn send_chat_message(&self, message: String) -> RoomResult { + let chat_message = proto::ChatMessage { + id: create_random_uuid(), + timestamp: 0, + message, + ..Default::default() + }; + + let data = proto::DataPacket { + value: Some(proto::data_packet::Value::ChatMessage(chat_message)), + ..Default::default() + }; + + self.inner + .rtc_engine + .publish_data(&data, DataPacketKind::Reliable) + .await + .map_err(Into::into) + } + pub async fn unpublish_track( &self, sid: &TrackSid, diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index 7fb4c46d..d6f2087f 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -654,6 +654,10 @@ impl SessionInner { segments, }); } + proto::data_packet::Value::Metrics(_) => {} + proto::data_packet::Value::ChatMessage(message) => { + self.emitter.send(message: SessionEvent::ChatMessage) + } } } } From 7cc3785dad76f8768ef848767cb3bb5e6b342dd3 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:54:59 +0000 Subject: [PATCH 02/14] generated protobuf --- livekit-protocol/src/livekit.rs | 322 ++++++-------------------------- 1 file changed, 53 insertions(+), 269 deletions(-) diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index b91c5188..92b143f9 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -1,6 +1,5 @@ // @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) @@ -19,7 +18,6 @@ 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 @@ -35,8 +33,7 @@ pub struct TimeSeriesMetric { #[prost(message, repeated, tag="4")] pub samples: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct MetricSample { /// time of metric based on a monotonic clock (in milliseconds) #[prost(int64, tag="1")] @@ -46,7 +43,6 @@ 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")] @@ -114,7 +110,6 @@ impl MetricLabel { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Room { #[prost(string, tag="1")] @@ -144,7 +139,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")] @@ -152,8 +146,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, @@ -162,7 +155,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 @@ -197,7 +189,6 @@ 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")] @@ -311,8 +302,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`. @@ -347,7 +337,6 @@ pub mod encryption { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodecInfo { #[prost(string, tag="1")] @@ -359,7 +348,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")] @@ -410,8 +398,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")] @@ -427,7 +414,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] @@ -470,8 +456,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), @@ -487,13 +472,11 @@ pub mod data_packet { ChatMessage(super::ChatMessage), } } -#[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")] @@ -505,7 +488,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 @@ -538,7 +520,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")] @@ -546,7 +527,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 @@ -557,7 +537,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")] @@ -573,7 +552,6 @@ 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 @@ -593,7 +571,6 @@ pub struct ChatMessage { #[prost(bool, tag="6")] pub generated: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantTracks { /// participant ID of participant to whom the tracks belong @@ -603,7 +580,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")] @@ -652,7 +628,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")] @@ -740,7 +715,6 @@ 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")] @@ -754,13 +728,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 @@ -770,8 +742,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>, @@ -792,7 +763,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")] @@ -887,8 +857,7 @@ pub struct RtpStats { #[prost(message, optional, tag="47")] pub received_report_drift: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct RtcpSenderReportState { #[prost(uint32, tag="1")] pub rtp_timestamp: u32, @@ -906,7 +875,6 @@ 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")] @@ -928,15 +896,13 @@ pub struct RtpForwarderState { } /// 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, @@ -951,8 +917,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, @@ -969,8 +934,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, @@ -1390,7 +1354,6 @@ impl AudioTrackFeature { } } /// composite using a web browser -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomCompositeEgressRequest { /// required @@ -1425,8 +1388,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), @@ -1435,8 +1397,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")] @@ -1447,7 +1408,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")] @@ -1475,8 +1435,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), @@ -1485,8 +1444,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), @@ -1495,7 +1453,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 @@ -1520,8 +1477,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")] @@ -1532,7 +1488,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 @@ -1561,8 +1516,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), @@ -1571,8 +1525,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")] @@ -1583,7 +1536,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 @@ -1599,8 +1551,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), @@ -1608,7 +1559,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) @@ -1625,8 +1575,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), @@ -1639,7 +1588,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) @@ -1670,8 +1618,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), @@ -1683,7 +1630,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}) @@ -1697,8 +1643,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), @@ -1710,7 +1655,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) @@ -1741,8 +1685,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), @@ -1754,7 +1697,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")] @@ -1781,7 +1723,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" @@ -1792,7 +1733,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")] @@ -1802,7 +1742,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")] @@ -1816,7 +1755,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")] @@ -1826,7 +1764,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 @@ -1836,8 +1773,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")] @@ -1876,7 +1812,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")] @@ -1884,7 +1819,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")] @@ -1894,7 +1828,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) @@ -1907,19 +1840,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")] @@ -1958,8 +1888,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), @@ -1973,8 +1902,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), @@ -1984,13 +1912,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")] @@ -2038,7 +1964,6 @@ pub mod stream_info { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileInfo { #[prost(string, tag="1")] @@ -2054,7 +1979,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")] @@ -2076,7 +2000,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")] @@ -2088,7 +2011,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")] @@ -2100,8 +2022,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")] @@ -2111,7 +2032,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}) @@ -2125,8 +2045,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), @@ -2369,7 +2288,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")] @@ -2377,8 +2295,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")] @@ -2433,7 +2350,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")] @@ -2441,8 +2357,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")] @@ -2515,7 +2430,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")] @@ -2523,7 +2437,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 @@ -2565,7 +2478,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")] @@ -2575,7 +2487,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")] @@ -2583,7 +2494,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")] @@ -2624,7 +2534,6 @@ 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")] @@ -2632,7 +2541,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")] @@ -2640,13 +2548,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" @@ -2655,13 +2561,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")] @@ -2671,7 +2575,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")] @@ -2700,7 +2603,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")] @@ -2708,7 +2610,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")] @@ -2718,7 +2619,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 @@ -2770,7 +2670,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")] @@ -2778,7 +2677,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")] @@ -2792,7 +2690,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")] @@ -2802,19 +2699,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")] @@ -2824,13 +2718,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")] @@ -2840,21 +2732,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")] @@ -2862,7 +2751,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")] @@ -2872,7 +2760,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 @@ -2885,7 +2772,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")] @@ -2893,7 +2779,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")] @@ -2903,7 +2788,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 @@ -2921,7 +2805,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")] @@ -2931,16 +2814,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")] @@ -2972,8 +2853,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, @@ -2981,8 +2861,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")] @@ -2990,13 +2869,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")] @@ -3006,7 +2883,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")] @@ -3014,7 +2890,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")] @@ -3059,7 +2934,6 @@ pub mod request_response { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackSubscribed { #[prost(string, tag="1")] @@ -3146,7 +3020,6 @@ impl CandidateProtocol { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Job { #[prost(string, tag="1")] @@ -3169,7 +3042,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")] @@ -3186,7 +3058,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")] @@ -3194,8 +3065,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")] @@ -3218,7 +3088,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")] @@ -3226,8 +3095,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")] @@ -3243,7 +3111,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")] @@ -3253,21 +3120,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")] @@ -3285,7 +3149,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")] @@ -3293,14 +3156,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")] @@ -3310,7 +3171,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")] @@ -3328,7 +3188,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")] @@ -3340,8 +3199,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, @@ -3351,7 +3209,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")] @@ -3361,7 +3218,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")] @@ -3451,7 +3307,6 @@ impl JobStatus { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAgentDispatchRequest { #[prost(string, tag="1")] @@ -3461,7 +3316,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")] @@ -3469,7 +3323,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")] @@ -3477,7 +3330,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 @@ -3487,13 +3339,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")] @@ -3507,7 +3357,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. @@ -3519,7 +3368,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 @@ -3564,7 +3412,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")] @@ -3574,50 +3421,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 @@ -3627,11 +3466,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 @@ -3646,13 +3483,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")] @@ -3673,7 +3508,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")] @@ -3691,11 +3525,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")] @@ -3715,11 +3547,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")] @@ -3728,7 +3558,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 @@ -3759,7 +3588,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")] @@ -3794,7 +3622,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")] @@ -3806,8 +3633,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), @@ -3815,7 +3641,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")] @@ -3827,8 +3652,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), @@ -3836,8 +3660,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")] @@ -3849,7 +3672,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 @@ -3861,7 +3683,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")] @@ -3901,7 +3722,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")] @@ -3965,7 +3785,6 @@ pub mod ingress_state { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputVideoState { #[prost(string, tag="1")] @@ -3979,7 +3798,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")] @@ -3991,7 +3809,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")] @@ -4016,7 +3833,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 @@ -4028,13 +3844,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")] @@ -4158,7 +3972,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, @@ -4189,7 +4002,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 @@ -4227,7 +4039,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")] @@ -4304,14 +4115,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")] @@ -4347,14 +4156,12 @@ 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")] @@ -4390,67 +4197,55 @@ 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, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] +#[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 @@ -4460,7 +4255,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 @@ -4470,7 +4264,6 @@ 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 @@ -4483,7 +4276,6 @@ 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")] @@ -4491,8 +4283,7 @@ pub struct SipDispatchRule { } /// 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 @@ -4507,7 +4298,6 @@ 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")] @@ -4535,7 +4325,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")] @@ -4561,17 +4350,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")] @@ -4579,7 +4365,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 @@ -4615,7 +4400,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")] From f97fc0934f3534500ee3f467337426bb1b872ba5 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 24 Sep 2024 14:53:53 +0200 Subject: [PATCH 03/14] updates --- livekit-ffi/protocol/ffi.proto | 1 + livekit-ffi/protocol/room.proto | 10 +++-- livekit-ffi/src/livekit.proto.rs | 24 +++++++----- livekit-ffi/src/server/room.rs | 37 +++++++++++++----- livekit/src/room/mod.rs | 39 +++++++++++++++++-- .../src/room/participant/local_participant.rs | 19 +++++---- livekit/src/rtc_engine/mod.rs | 10 ++++- livekit/src/rtc_engine/rtc_session.rs | 13 +++++-- 8 files changed, 114 insertions(+), 39 deletions(-) diff --git a/livekit-ffi/protocol/ffi.proto b/livekit-ffi/protocol/ffi.proto index 3c7d9d7c..6892eb32 100644 --- a/livekit-ffi/protocol/ffi.proto +++ b/livekit-ffi/protocol/ffi.proto @@ -172,6 +172,7 @@ message FfiEvent { GetSessionStatsCallback get_session_stats = 19; Panic panic = 20; PublishSipDtmfCallback publish_sip_dtmf = 21; + SendChatMessageCallback chat_message = 22; } } diff --git a/livekit-ffi/protocol/room.proto b/livekit-ffi/protocol/room.proto index c32f9a6e..66c5792e 100644 --- a/livekit-ffi/protocol/room.proto +++ b/livekit-ffi/protocol/room.proto @@ -147,14 +147,15 @@ message SetLocalMetadataCallback { message SendChatMessageRequest { uint64 local_participant_handle = 1; string message = 2; + optional string sender_identity = 3; } message SendChatMessageResponse { uint64 async_id = 1; - ChatMessage message = 2; } message SendChatMessageCallback { uint64 async_id = 1; optional string error = 2; + optional ChatMessage chat_message = 3; } // Change the local participant's attributes @@ -356,6 +357,7 @@ message RoomEvent { RoomEOS eos = 26; // The stream of room events has ended DataPacketReceived data_packet_received = 27; TranscriptionReceived transcription_received = 28; + ChatMessage chat_message = 29; } } @@ -472,10 +474,10 @@ message UserPacket { message ChatMessage { string id = 1; - uint64 timestamp = 2; + int64 timestamp = 2; string message = 3; - optional uint64 edit_timestamp = 4; - optional bool delete = 5; + optional int64 edit_timestamp = 4; + optional bool deleted = 5; optional bool generated = 6; } diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index 2b42a685..dc2b020f 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -2217,14 +2217,14 @@ pub struct SendChatMessageRequest { pub local_participant_handle: u64, #[prost(string, tag="2")] pub message: ::prost::alloc::string::String, + #[prost(string, optional, tag="3")] + pub sender_identity: ::core::option::Option<::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendChatMessageResponse { #[prost(uint64, tag="1")] pub async_id: u64, - #[prost(message, optional, tag="2")] - pub message: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2233,6 +2233,8 @@ pub struct SendChatMessageCallback { pub async_id: u64, #[prost(string, optional, tag="2")] pub error: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, optional, tag="3")] + pub chat_message: ::core::option::Option, } /// Change the local participant's attributes #[allow(clippy::derive_partial_eq_without_eq)] @@ -2431,7 +2433,7 @@ pub struct OwnedBuffer { pub struct RoomEvent { #[prost(uint64, tag="1")] pub room_handle: u64, - #[prost(oneof="room_event::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28")] + #[prost(oneof="room_event::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29")] pub message: ::core::option::Option, } /// Nested message and enum types in `RoomEvent`. @@ -2495,6 +2497,8 @@ pub mod room_event { DataPacketReceived(super::DataPacketReceived), #[prost(message, tag="28")] TranscriptionReceived(super::TranscriptionReceived), + #[prost(message, tag="29")] + ChatMessage(super::ChatMessage), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -2682,14 +2686,14 @@ pub struct UserPacket { pub struct ChatMessage { #[prost(string, tag="1")] pub id: ::prost::alloc::string::String, - #[prost(uint64, tag="2")] - pub timestamp: u64, + #[prost(int64, tag="2")] + pub timestamp: i64, #[prost(string, tag="3")] pub message: ::prost::alloc::string::String, - #[prost(uint64, optional, tag="4")] - pub edit_timestamp: ::core::option::Option, + #[prost(int64, optional, tag="4")] + pub edit_timestamp: ::core::option::Option, #[prost(bool, optional, tag="5")] - pub delete: ::core::option::Option, + pub deleted: ::core::option::Option, #[prost(bool, optional, tag="6")] pub generated: ::core::option::Option, } @@ -3465,7 +3469,7 @@ pub mod ffi_response { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiEvent { - #[prost(oneof="ffi_event::Message", tags="1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21")] + #[prost(oneof="ffi_event::Message", tags="1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiEvent`. @@ -3513,6 +3517,8 @@ pub mod ffi_event { Panic(super::Panic), #[prost(message, tag="21")] PublishSipDtmf(super::PublishSipDtmfCallback), + #[prost(message, tag="22")] + ChatMessage(super::SendChatMessageCallback), } } /// Stop all rooms synchronously (Do we need async here?). diff --git a/livekit-ffi/src/server/room.rs b/livekit-ffi/src/server/room.rs index b3e9a066..ab306d67 100644 --- a/livekit-ffi/src/server/room.rs +++ b/livekit-ffi/src/server/room.rs @@ -16,7 +16,7 @@ use std::collections::HashMap; use std::{collections::HashSet, slice, sync::Arc, time::Duration}; use livekit::prelude::*; -use livekit::{participant, track}; +use livekit::{participant, track, ChatMessage}; use parking_lot::Mutex; use tokio::sync::{broadcast, mpsc, oneshot, Mutex as AsyncMutex}; use tokio::task::JoinHandle; @@ -53,6 +53,19 @@ impl FfiHandle for FfiPublication {} impl FfiHandle for FfiParticipant {} impl FfiHandle for FfiRoom {} +impl From for proto::ChatMessage { + fn from(msg: ChatMessage) -> Self { + proto::ChatMessage { + id: msg.id, + message: msg.message, + timestamp: msg.timestamp, + edit_timestamp: msg.edit_timestamp, + deleted: msg.deleted, + generated: msg.generated, + } + } +} + #[derive(Clone)] pub struct FfiRoom { pub inner: Arc, @@ -578,18 +591,23 @@ impl RoomInner { let async_id = server.next_id(); let inner = self.clone(); let handle = server.async_runtime.spawn(async move { - let res = - inner.room.local_participant().send_chat_message(send_chat_message.message).await; - - let message = server.send_event(proto::ffi_event::Message::SendChatMessage( + let res = inner + .room + .local_participant() + .send_chat_message(send_chat_message.message, send_chat_message.sender_identity) + .await; + let sent_message = res.as_ref().unwrap().clone(); + let proto_msg = proto::ChatMessage::from(sent_message); + let _ = server.send_event(proto::ffi_event::Message::ChatMessage( proto::SendChatMessageCallback { async_id, error: res.err().map(|e| e.to_string()), + chat_message: proto_msg.into(), }, )); }); server.watch_panic(handle); - proto::SendChatMessageResponse { async_id, message } + proto::SendChatMessageResponse { async_id } } } @@ -1004,12 +1022,11 @@ async fn forward_event( Some(p) => (Some(p.sid().to_string()), p.identity().to_string()), None => (None, String::new()), }; - let _ = send_event(proto::room_event::Message::ChatMessageReceived( - proto::ChatMessageReceived { + let _ = + send_event(proto::room_event::Message::ChatMessage(proto::ChatMessageReceived { message: proto::ChatMessage::from(message).into(), participant_identity: identity, - }, - )); + })); } RoomEvent::ConnectionStateChanged(state) => { let _ = send_event(proto::room_event::Message::ConnectionStateChanged( diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index 4ef24b67..964bf854 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -164,7 +164,7 @@ pub enum RoomEvent { }, ChatMessage { message: ChatMessage, - participant: Option, + participant: Option, }, E2eeStateChanged { participant: Participant, @@ -244,12 +244,25 @@ pub struct SipDTMF { pub struct ChatMessage { pub id: String, pub message: String, - pub timestamp: u64, - pub edit_timestamp: Option, - pub delete: Option, + pub timestamp: i64, + pub edit_timestamp: Option, + pub deleted: Option, pub generated: Option, } +impl From for ChatMessage { + fn from(proto_msg: proto::ChatMessage) -> Self { + ChatMessage { + id: proto_msg.id, + message: proto_msg.message, + timestamp: proto_msg.timestamp, + edit_timestamp: proto_msg.edit_timestamp, + deleted: proto_msg.deleted.into(), + generated: proto_msg.generated.into(), + } + } +} + #[derive(Debug, Clone)] pub struct RoomOptions { pub auto_subscribe: bool, @@ -620,6 +633,9 @@ impl RoomSession { EngineEvent::Data { payload, topic, kind, participant_sid, participant_identity } => { self.handle_data(payload, topic, kind, participant_sid, participant_identity); } + EngineEvent::ChatMessage { participant_identity, message } => { + self.handle_chat_message(participant_identity, message); + } EngineEvent::Transcription { participant_identity, track_sid, segments } => { self.handle_transcription(participant_identity, track_sid, segments); } @@ -1082,6 +1098,21 @@ impl RoomSession { }); } + fn handle_chat_message( + &self, + participant_identity: ParticipantIdentity, + chat_message: ChatMessage, + ) { + let participant = self.get_participant_by_identity(&participant_identity); + + if participant.is_none() { + // We received a data packet from a participant that is not in the participants list + return; + } + + self.dispatcher.dispatch(&RoomEvent::ChatMessage { message: chat_message, participant }); + } + fn handle_dtmf( &self, code: u32, diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index fd568c37..19bf5bb1 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -32,7 +32,7 @@ use crate::{ options::{self, compute_video_encodings, video_layers_from_encodings, TrackPublishOptions}, prelude::*, rtc_engine::{EngineError, RtcEngine}, - DataPacket, SipDTMF, Transcription, + ChatMessage, DataPacket, SipDTMF, Transcription, }; const REQUEST_TIMEOUT: Duration = Duration::from_secs(5); @@ -331,7 +331,11 @@ impl LocalParticipant { } } - pub async fn send_chat_message(&self, message: String) -> RoomResult { + pub async fn send_chat_message( + &self, + message: String, + sender_identity: Option, + ) -> RoomResult { let chat_message = proto::ChatMessage { id: create_random_uuid(), timestamp: 0, @@ -340,15 +344,14 @@ impl LocalParticipant { }; let data = proto::DataPacket { - value: Some(proto::data_packet::Value::ChatMessage(chat_message)), + value: Some(proto::data_packet::Value::ChatMessage(chat_message.clone())), + participant_identity: sender_identity.unwrap(), ..Default::default() }; - self.inner - .rtc_engine - .publish_data(&data, DataPacketKind::Reliable) - .await - .map_err(Into::into) + let _ = self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await; + + Ok(ChatMessage::from(chat_message)) } pub async fn unpublish_track( diff --git a/livekit/src/rtc_engine/mod.rs b/livekit/src/rtc_engine/mod.rs index fb49b689..cb6feed5 100644 --- a/livekit/src/rtc_engine/mod.rs +++ b/livekit/src/rtc_engine/mod.rs @@ -27,7 +27,6 @@ use tokio::sync::{ pub use self::rtc_session::SessionStats; use crate::prelude::ParticipantIdentity; -use crate::TranscriptionSegment; use crate::{ id::ParticipantSid, options::TrackPublishOptions, @@ -39,6 +38,7 @@ use crate::{ }, DataPacketKind, }; +use crate::{ChatMessage, TranscriptionSegment}; pub mod lk_runtime; mod peer_transport; @@ -99,6 +99,10 @@ pub enum EngineEvent { topic: Option, kind: DataPacketKind, }, + ChatMessage { + participant_identity: ParticipantIdentity, + message: ChatMessage, + }, Transcription { participant_identity: ParticipantIdentity, track_sid: String, @@ -431,6 +435,10 @@ impl EngineInner { kind, }); } + SessionEvent::ChatMessage { participant_identity, message } => { + let _ = + self.engine_tx.send(EngineEvent::ChatMessage { participant_identity, message }); + } SessionEvent::SipDTMF { participant_identity, code, digit } => { let _ = self.engine_tx.send(EngineEvent::SipDTMF { participant_identity, code, digit }); diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index d6f2087f..a3d5c45a 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -34,11 +34,11 @@ use proto::{ debouncer::{self, Debouncer}, SignalTarget, }; -use serde::{Deserialize, Serialize}; +use serde::{de::IntoDeserializer, Deserialize, Serialize}; use tokio::sync::{mpsc, oneshot, watch}; use super::{rtc_events, EngineError, EngineOptions, EngineResult, SimulateScenario}; -use crate::{id::ParticipantIdentity, TranscriptionSegment}; +use crate::{id::ParticipantIdentity, ChatMessage, TranscriptionSegment}; use crate::{ id::ParticipantSid, options::TrackPublishOptions, @@ -81,6 +81,10 @@ pub enum SessionEvent { topic: Option, kind: DataPacketKind, }, + ChatMessage { + participant_identity: ParticipantIdentity, + message: ChatMessage, + }, Transcription { participant_identity: ParticipantIdentity, track_sid: String, @@ -656,7 +660,10 @@ impl SessionInner { } proto::data_packet::Value::Metrics(_) => {} proto::data_packet::Value::ChatMessage(message) => { - self.emitter.send(message: SessionEvent::ChatMessage) + let _ = self.emitter.send(SessionEvent::ChatMessage { + participant_identity: ParticipantIdentity(data.participant_identity), + message: ChatMessage::from(message.clone()), + }); } } } From 1d575c70595f3052f032ade2b47612a4f486144c Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 25 Sep 2024 11:10:02 +0200 Subject: [PATCH 04/14] fix types and build --- livekit-ffi/protocol/room.proto | 2 +- livekit-ffi/src/livekit.proto.rs | 2 +- livekit-protocol/Cargo.toml | 8 +- livekit-protocol/src/livekit.rs | 322 ++++++++++++++++++++++++++----- 4 files changed, 277 insertions(+), 57 deletions(-) diff --git a/livekit-ffi/protocol/room.proto b/livekit-ffi/protocol/room.proto index 66c5792e..94762cdf 100644 --- a/livekit-ffi/protocol/room.proto +++ b/livekit-ffi/protocol/room.proto @@ -357,7 +357,7 @@ message RoomEvent { RoomEOS eos = 26; // The stream of room events has ended DataPacketReceived data_packet_received = 27; TranscriptionReceived transcription_received = 28; - ChatMessage chat_message = 29; + ChatMessageReceived chat_message = 29; } } diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index dc2b020f..821c7343 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -2498,7 +2498,7 @@ pub mod room_event { #[prost(message, tag="28")] TranscriptionReceived(super::TranscriptionReceived), #[prost(message, tag="29")] - ChatMessage(super::ChatMessage), + ChatMessage(super::ChatMessageReceived), } } #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/livekit-protocol/Cargo.toml b/livekit-protocol/Cargo.toml index 7831959a..60bef185 100644 --- a/livekit-protocol/Cargo.toml +++ b/livekit-protocol/Cargo.toml @@ -8,13 +8,17 @@ repository = "https://github.com/livekit/rust-sdks" [dependencies] livekit-runtime = { path = "../livekit-runtime", version = "0.3.0" } -tokio = { version = "1", default-features = false, features = [ "sync", "macros", "rt" ] } +tokio = { version = "1", default-features = false, features = [ + "sync", + "macros", + "rt", +] } futures-util = { version = "0.3", features = ["sink"] } parking_lot = "0.12" prost = "0.12" prost-types = "0.12" -serde = "1.0" +serde = "1.0.210" pbjson = "0.6" pbjson-types = "0.6" thiserror = "1.0" diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index 92b143f9..b91c5188 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) @@ -18,6 +19,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 @@ -33,7 +35,8 @@ pub struct TimeSeriesMetric { #[prost(message, repeated, tag="4")] pub samples: ::prost::alloc::vec::Vec, } -#[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")] @@ -43,6 +46,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")] @@ -110,6 +114,7 @@ impl MetricLabel { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Room { #[prost(string, tag="1")] @@ -139,6 +144,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")] @@ -146,7 +152,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, @@ -155,6 +162,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 @@ -189,6 +197,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")] @@ -302,7 +311,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`. @@ -337,6 +347,7 @@ pub mod encryption { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SimulcastCodecInfo { #[prost(string, tag="1")] @@ -348,6 +359,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")] @@ -398,7 +410,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")] @@ -414,6 +427,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] @@ -456,7 +470,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), @@ -472,11 +487,13 @@ pub mod data_packet { ChatMessage(super::ChatMessage), } } +#[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")] @@ -488,6 +505,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 @@ -520,6 +538,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")] @@ -527,6 +546,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 @@ -537,6 +557,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")] @@ -552,6 +573,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 @@ -571,6 +593,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 ParticipantTracks { /// participant ID of participant to whom the tracks belong @@ -580,6 +603,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")] @@ -628,6 +652,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")] @@ -715,6 +740,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")] @@ -728,11 +754,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 @@ -742,7 +770,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>, @@ -763,6 +792,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")] @@ -857,7 +887,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, @@ -875,6 +906,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")] @@ -896,13 +928,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, @@ -917,7 +951,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, @@ -934,7 +969,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, @@ -1354,6 +1390,7 @@ impl AudioTrackFeature { } } /// composite using a web browser +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RoomCompositeEgressRequest { /// required @@ -1388,7 +1425,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), @@ -1397,7 +1435,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")] @@ -1408,6 +1447,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")] @@ -1435,7 +1475,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), @@ -1444,7 +1485,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), @@ -1453,6 +1495,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 @@ -1477,7 +1520,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")] @@ -1488,6 +1532,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 @@ -1516,7 +1561,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), @@ -1525,7 +1571,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")] @@ -1536,6 +1583,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 @@ -1551,7 +1599,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), @@ -1559,6 +1608,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) @@ -1575,7 +1625,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), @@ -1588,6 +1639,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) @@ -1618,7 +1670,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), @@ -1630,6 +1683,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}) @@ -1643,7 +1697,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), @@ -1655,6 +1710,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) @@ -1685,7 +1741,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), @@ -1697,6 +1754,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")] @@ -1723,6 +1781,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" @@ -1733,6 +1792,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")] @@ -1742,6 +1802,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")] @@ -1755,6 +1816,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")] @@ -1764,6 +1826,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 @@ -1773,7 +1836,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")] @@ -1812,6 +1876,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")] @@ -1819,6 +1884,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")] @@ -1828,6 +1894,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) @@ -1840,16 +1907,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")] @@ -1888,7 +1958,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), @@ -1902,7 +1973,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), @@ -1912,11 +1984,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")] @@ -1964,6 +2038,7 @@ pub mod stream_info { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FileInfo { #[prost(string, tag="1")] @@ -1979,6 +2054,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")] @@ -2000,6 +2076,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")] @@ -2011,6 +2088,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")] @@ -2022,7 +2100,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")] @@ -2032,6 +2111,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}) @@ -2045,7 +2125,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), @@ -2288,6 +2369,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")] @@ -2295,7 +2377,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")] @@ -2350,6 +2433,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")] @@ -2357,7 +2441,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")] @@ -2430,6 +2515,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")] @@ -2437,6 +2523,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 @@ -2478,6 +2565,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")] @@ -2487,6 +2575,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")] @@ -2494,6 +2583,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")] @@ -2534,6 +2624,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")] @@ -2541,6 +2632,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")] @@ -2548,11 +2640,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" @@ -2561,11 +2655,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")] @@ -2575,6 +2671,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")] @@ -2603,6 +2700,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")] @@ -2610,6 +2708,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")] @@ -2619,6 +2718,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 @@ -2670,6 +2770,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")] @@ -2677,6 +2778,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")] @@ -2690,6 +2792,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")] @@ -2699,16 +2802,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")] @@ -2718,11 +2824,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")] @@ -2732,18 +2840,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")] @@ -2751,6 +2862,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")] @@ -2760,6 +2872,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 @@ -2772,6 +2885,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")] @@ -2779,6 +2893,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")] @@ -2788,6 +2903,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 @@ -2805,6 +2921,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")] @@ -2814,14 +2931,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")] @@ -2853,7 +2972,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, @@ -2861,7 +2981,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")] @@ -2869,11 +2990,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")] @@ -2883,6 +3006,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")] @@ -2890,6 +3014,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")] @@ -2934,6 +3059,7 @@ pub mod request_response { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TrackSubscribed { #[prost(string, tag="1")] @@ -3020,6 +3146,7 @@ impl CandidateProtocol { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Job { #[prost(string, tag="1")] @@ -3042,6 +3169,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")] @@ -3058,6 +3186,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")] @@ -3065,7 +3194,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")] @@ -3088,6 +3218,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")] @@ -3095,7 +3226,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")] @@ -3111,6 +3243,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")] @@ -3120,18 +3253,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")] @@ -3149,6 +3285,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")] @@ -3156,12 +3293,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")] @@ -3171,6 +3310,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")] @@ -3188,6 +3328,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")] @@ -3199,7 +3340,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, @@ -3209,6 +3351,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")] @@ -3218,6 +3361,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")] @@ -3307,6 +3451,7 @@ impl JobStatus { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateAgentDispatchRequest { #[prost(string, tag="1")] @@ -3316,6 +3461,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")] @@ -3323,6 +3469,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")] @@ -3330,6 +3477,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 @@ -3339,11 +3487,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")] @@ -3357,6 +3507,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. @@ -3368,6 +3519,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 @@ -3412,6 +3564,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")] @@ -3421,42 +3574,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 @@ -3466,9 +3627,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 @@ -3483,11 +3646,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")] @@ -3508,6 +3673,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")] @@ -3525,9 +3691,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")] @@ -3547,9 +3715,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")] @@ -3558,6 +3728,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 @@ -3588,6 +3759,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")] @@ -3622,6 +3794,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")] @@ -3633,7 +3806,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), @@ -3641,6 +3815,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")] @@ -3652,7 +3827,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), @@ -3660,7 +3836,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")] @@ -3672,6 +3849,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 @@ -3683,6 +3861,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")] @@ -3722,6 +3901,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")] @@ -3785,6 +3965,7 @@ pub mod ingress_state { } } } +#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputVideoState { #[prost(string, tag="1")] @@ -3798,6 +3979,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")] @@ -3809,6 +3991,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")] @@ -3833,6 +4016,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 @@ -3844,11 +4028,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")] @@ -3972,6 +4158,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, @@ -4002,6 +4189,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 @@ -4039,6 +4227,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")] @@ -4115,12 +4304,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")] @@ -4156,12 +4347,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")] @@ -4197,55 +4390,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 @@ -4255,6 +4460,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 @@ -4264,6 +4470,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 @@ -4276,6 +4483,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")] @@ -4283,7 +4491,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 @@ -4298,6 +4507,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")] @@ -4325,6 +4535,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")] @@ -4350,14 +4561,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")] @@ -4365,6 +4579,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 @@ -4400,6 +4615,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")] From f07f655f0d05bbd63a7f21c9299ee36eea8172e0 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 25 Sep 2024 12:18:49 +0200 Subject: [PATCH 05/14] Add conversion traits and update API --- livekit-ffi/protocol/room.proto | 3 +- livekit-ffi/src/livekit.proto.rs | 4 ++- livekit-ffi/src/proto.rs | 28 +++++++++++++++++ livekit-ffi/src/server/room.rs | 22 ++++---------- livekit-protocol/Cargo.toml | 2 +- livekit/src/proto.rs | 30 ++++++++++++++++++- livekit/src/room/mod.rs | 13 -------- .../src/room/participant/local_participant.rs | 29 ++++++++++++++++-- 8 files changed, 96 insertions(+), 35 deletions(-) diff --git a/livekit-ffi/protocol/room.proto b/livekit-ffi/protocol/room.proto index 94762cdf..63484913 100644 --- a/livekit-ffi/protocol/room.proto +++ b/livekit-ffi/protocol/room.proto @@ -147,7 +147,8 @@ message SetLocalMetadataCallback { message SendChatMessageRequest { uint64 local_participant_handle = 1; string message = 2; - optional string sender_identity = 3; + repeated string destination_identities = 3; + optional string sender_identity = 4; } message SendChatMessageResponse { uint64 async_id = 1; diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index 821c7343..f103aa7b 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -2217,7 +2217,9 @@ pub struct SendChatMessageRequest { pub local_participant_handle: u64, #[prost(string, tag="2")] pub message: ::prost::alloc::string::String, - #[prost(string, optional, tag="3")] + #[prost(string, repeated, tag="3")] + pub destination_identities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, optional, tag="4")] pub sender_identity: ::core::option::Option<::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/livekit-ffi/src/proto.rs b/livekit-ffi/src/proto.rs index b1601bf1..e891c3c0 100644 --- a/livekit-ffi/src/proto.rs +++ b/livekit-ffi/src/proto.rs @@ -1,4 +1,32 @@ #![allow(non_snake_case)] #![allow(clippy::enum_variant_names)] +use livekit::ChatMessage as RoomChatMessage; + include!("livekit.proto.rs"); + +impl From for RoomChatMessage { + fn from(proto_msg: ChatMessage) -> Self { + RoomChatMessage { + id: proto_msg.id, + message: proto_msg.message, + timestamp: proto_msg.timestamp, + edit_timestamp: proto_msg.edit_timestamp, + deleted: proto_msg.deleted, + generated: proto_msg.generated, + } + } +} + +impl From for ChatMessage { + fn from(msg: RoomChatMessage) -> Self { + ChatMessage { + id: msg.id, + message: msg.message, + timestamp: msg.timestamp, + edit_timestamp: msg.edit_timestamp, + deleted: msg.deleted.into(), + generated: msg.generated.into(), + } + } +} diff --git a/livekit-ffi/src/server/room.rs b/livekit-ffi/src/server/room.rs index ab306d67..8cb2aac0 100644 --- a/livekit-ffi/src/server/room.rs +++ b/livekit-ffi/src/server/room.rs @@ -53,19 +53,6 @@ impl FfiHandle for FfiPublication {} impl FfiHandle for FfiParticipant {} impl FfiHandle for FfiRoom {} -impl From for proto::ChatMessage { - fn from(msg: ChatMessage) -> Self { - proto::ChatMessage { - id: msg.id, - message: msg.message, - timestamp: msg.timestamp, - edit_timestamp: msg.edit_timestamp, - deleted: msg.deleted, - generated: msg.generated, - } - } -} - #[derive(Clone)] pub struct FfiRoom { pub inner: Arc, @@ -594,15 +581,18 @@ impl RoomInner { let res = inner .room .local_participant() - .send_chat_message(send_chat_message.message, send_chat_message.sender_identity) + .send_chat_message( + send_chat_message.message, + send_chat_message.destination_identities.into(), + send_chat_message.sender_identity, + ) .await; let sent_message = res.as_ref().unwrap().clone(); - let proto_msg = proto::ChatMessage::from(sent_message); let _ = server.send_event(proto::ffi_event::Message::ChatMessage( proto::SendChatMessageCallback { async_id, error: res.err().map(|e| e.to_string()), - chat_message: proto_msg.into(), + chat_message: proto::ChatMessage::from(sent_message).into(), }, )); }); diff --git a/livekit-protocol/Cargo.toml b/livekit-protocol/Cargo.toml index 60bef185..7d44495a 100644 --- a/livekit-protocol/Cargo.toml +++ b/livekit-protocol/Cargo.toml @@ -18,7 +18,7 @@ parking_lot = "0.12" prost = "0.12" prost-types = "0.12" -serde = "1.0.210" +serde = "1.0" pbjson = "0.6" pbjson-types = "0.6" thiserror = "1.0" diff --git a/livekit/src/proto.rs b/livekit/src/proto.rs index ed6a4aaf..b96ae2c5 100644 --- a/livekit/src/proto.rs +++ b/livekit/src/proto.rs @@ -14,7 +14,9 @@ use livekit_protocol::*; -use crate::{e2ee::EncryptionType, participant, track, DataPacketKind}; +use crate::{ + e2ee::EncryptionType, participant, room::ChatMessage as RoomChatMessage, track, DataPacketKind, +}; // Conversions impl From for participant::ConnectionQuality { @@ -122,3 +124,29 @@ impl From for participant::ParticipantKind { } } } + +impl From for RoomChatMessage { + fn from(proto_msg: ChatMessage) -> Self { + RoomChatMessage { + id: proto_msg.id, + message: proto_msg.message, + timestamp: proto_msg.timestamp, + edit_timestamp: proto_msg.edit_timestamp, + deleted: proto_msg.deleted.into(), + generated: proto_msg.generated.into(), + } + } +} + +impl From for ChatMessage { + fn from(msg: RoomChatMessage) -> Self { + ChatMessage { + id: msg.id, + message: msg.message, + timestamp: msg.timestamp, + edit_timestamp: msg.edit_timestamp, + deleted: msg.deleted.unwrap_or(false), + generated: msg.generated.unwrap_or(false), + } + } +} diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index 964bf854..346d4145 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -250,19 +250,6 @@ pub struct ChatMessage { pub generated: Option, } -impl From for ChatMessage { - fn from(proto_msg: proto::ChatMessage) -> Self { - ChatMessage { - id: proto_msg.id, - message: proto_msg.message, - timestamp: proto_msg.timestamp, - edit_timestamp: proto_msg.edit_timestamp, - deleted: proto_msg.deleted.into(), - generated: proto_msg.generated.into(), - } - } -} - #[derive(Debug, Clone)] pub struct RoomOptions { pub auto_subscribe: bool, diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index 19bf5bb1..d778d9dc 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -333,19 +333,44 @@ impl LocalParticipant { pub async fn send_chat_message( &self, - message: String, + text: String, + destination_identities: Option>, sender_identity: Option, ) -> RoomResult { let chat_message = proto::ChatMessage { id: create_random_uuid(), timestamp: 0, - message, + message: text, ..Default::default() }; let data = proto::DataPacket { value: Some(proto::data_packet::Value::ChatMessage(chat_message.clone())), participant_identity: sender_identity.unwrap(), + destination_identities: destination_identities.unwrap(), + ..Default::default() + }; + + let _ = self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await; + + Ok(ChatMessage::from(chat_message)) + } + + pub async fn update_chat_message( + &self, + edit_text: String, + original_message: ChatMessage, + destination_identities: Option>, + sender_identity: Option, + ) -> RoomResult { + let mut chat_message = proto::ChatMessage::from(original_message); + chat_message.message = edit_text; + chat_message.edit_timestamp = Some(0); + + let data = proto::DataPacket { + value: Some(proto::data_packet::Value::ChatMessage(chat_message.clone())), + participant_identity: sender_identity.unwrap(), + destination_identities: destination_identities.unwrap(), ..Default::default() }; From 961496320e235032f601092b3930553e0c4a7aa6 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 25 Sep 2024 13:10:59 +0200 Subject: [PATCH 06/14] fix unwrapping --- livekit/src/room/participant/local_participant.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index d778d9dc..2908e8f1 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -346,8 +346,8 @@ impl LocalParticipant { let data = proto::DataPacket { value: Some(proto::data_packet::Value::ChatMessage(chat_message.clone())), - participant_identity: sender_identity.unwrap(), - destination_identities: destination_identities.unwrap(), + participant_identity: sender_identity.unwrap_or_default(), + destination_identities: destination_identities.unwrap_or_default(), ..Default::default() }; From 9363544e9b5a45690c9cf8b1b3f291aa7a151cca Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 25 Sep 2024 15:13:26 +0200 Subject: [PATCH 07/14] Populate timestamps and add edit support --- Cargo.lock | 57 ++++++++++++++++++- livekit-ffi/protocol/ffi.proto | 1 + livekit-ffi/protocol/room.proto | 7 +++ livekit-ffi/src/livekit.proto.rs | 18 +++++- livekit-ffi/src/server/requests.rs | 14 +++++ livekit-ffi/src/server/room.rs | 31 ++++++++++ livekit/Cargo.toml | 1 + .../src/room/participant/local_participant.rs | 20 ++++--- 8 files changed, 138 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 36351b45..b0c9cc47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,6 +37,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" version = "1.0.75" @@ -447,11 +462,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", "num-traits", + "wasm-bindgen", + "windows-targets 0.52.0", ] [[package]] @@ -1260,6 +1280,29 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "idna" version = "0.5.0" @@ -1548,6 +1591,7 @@ checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" name = "livekit" version = "0.6.0" dependencies = [ + "chrono", "futures-util", "lazy_static", "libwebrtc", @@ -3300,6 +3344,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-sys" version = "0.45.0" diff --git a/livekit-ffi/protocol/ffi.proto b/livekit-ffi/protocol/ffi.proto index 6892eb32..075929fb 100644 --- a/livekit-ffi/protocol/ffi.proto +++ b/livekit-ffi/protocol/ffi.proto @@ -70,6 +70,7 @@ message FfiRequest { PublishTranscriptionRequest publish_transcription = 13; PublishSipDtmfRequest publish_sip_dtmf = 14; SendChatMessageRequest send_chat_message = 33; + EditChatMessageRequest edit_chat_message = 34; // Track CreateVideoTrackRequest create_video_track = 15; diff --git a/livekit-ffi/protocol/room.proto b/livekit-ffi/protocol/room.proto index 63484913..6c46e6d9 100644 --- a/livekit-ffi/protocol/room.proto +++ b/livekit-ffi/protocol/room.proto @@ -150,6 +150,13 @@ message SendChatMessageRequest { repeated string destination_identities = 3; optional string sender_identity = 4; } +message EditChatMessageRequest { + uint64 local_participant_handle = 1; + string edit_text = 2; + ChatMessage original_message = 3; + repeated string destination_identities = 4; + optional string sender_identity = 5; +} message SendChatMessageResponse { uint64 async_id = 1; } diff --git a/livekit-ffi/src/livekit.proto.rs b/livekit-ffi/src/livekit.proto.rs index f103aa7b..55160440 100644 --- a/livekit-ffi/src/livekit.proto.rs +++ b/livekit-ffi/src/livekit.proto.rs @@ -2224,6 +2224,20 @@ pub struct SendChatMessageRequest { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct EditChatMessageRequest { + #[prost(uint64, tag="1")] + pub local_participant_handle: u64, + #[prost(string, tag="2")] + pub edit_text: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub original_message: ::core::option::Option, + #[prost(string, repeated, tag="4")] + pub destination_identities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, optional, tag="5")] + pub sender_identity: ::core::option::Option<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SendChatMessageResponse { #[prost(uint64, tag="1")] pub async_id: u64, @@ -3305,7 +3319,7 @@ impl AudioSourceType { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FfiRequest { - #[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 33, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32")] + #[prost(oneof="ffi_request::Message", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 33, 34, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32")] pub message: ::core::option::Option, } /// Nested message and enum types in `FfiRequest`. @@ -3342,6 +3356,8 @@ pub mod ffi_request { PublishSipDtmf(super::PublishSipDtmfRequest), #[prost(message, tag="33")] SendChatMessage(super::SendChatMessageRequest), + #[prost(message, tag="34")] + EditChatMessage(super::EditChatMessageRequest), /// Track #[prost(message, tag="15")] CreateVideoTrack(super::CreateVideoTrackRequest), diff --git a/livekit-ffi/src/server/requests.rs b/livekit-ffi/src/server/requests.rs index e63ede45..414371d0 100644 --- a/livekit-ffi/src/server/requests.rs +++ b/livekit-ffi/src/server/requests.rs @@ -193,6 +193,17 @@ fn on_send_chat_message( Ok(ffi_participant.room.send_chat_message(server, send_chat_message)) } +fn on_edit_chat_message( + server: &'static FfiServer, + edit_chat_message: proto::EditChatMessageRequest, +) -> FfiResult { + let ffi_participant = server + .retrieve_handle::(edit_chat_message.local_participant_handle)? + .clone(); + + Ok(ffi_participant.room.edit_chat_message(server, edit_chat_message)) +} + /// Create a new video track from a source fn on_create_video_track( server: &'static FfiServer, @@ -722,6 +733,9 @@ pub fn handle_request( proto::ffi_request::Message::SendChatMessage(update) => { proto::ffi_response::Message::SendChatMessage(on_send_chat_message(server, update)?) } + proto::ffi_request::Message::EditChatMessage(update) => { + proto::ffi_response::Message::SendChatMessage(on_edit_chat_message(server, update)?) + } proto::ffi_request::Message::CreateVideoTrack(create) => { proto::ffi_response::Message::CreateVideoTrack(on_create_video_track(server, create)?) } diff --git a/livekit-ffi/src/server/room.rs b/livekit-ffi/src/server/room.rs index 8cb2aac0..92a6fcb1 100644 --- a/livekit-ffi/src/server/room.rs +++ b/livekit-ffi/src/server/room.rs @@ -599,6 +599,37 @@ impl RoomInner { server.watch_panic(handle); proto::SendChatMessageResponse { async_id } } + + pub fn edit_chat_message( + self: &Arc, + server: &'static FfiServer, + edit_chat_message: proto::EditChatMessageRequest, + ) -> proto::SendChatMessageResponse { + let async_id = server.next_id(); + let inner = self.clone(); + let handle = server.async_runtime.spawn(async move { + let res = inner + .room + .local_participant() + .edit_chat_message( + edit_chat_message.edit_text, + edit_chat_message.original_message.unwrap().into(), + edit_chat_message.destination_identities.into(), + edit_chat_message.sender_identity, + ) + .await; + let sent_message: ChatMessage = res.as_ref().unwrap().clone(); + let _ = server.send_event(proto::ffi_event::Message::ChatMessage( + proto::SendChatMessageCallback { + async_id, + error: res.err().map(|e| e.to_string()), + chat_message: proto::ChatMessage::from(sent_message).into(), + }, + )); + }); + server.watch_panic(handle); + proto::SendChatMessageResponse { async_id } + } } // Task used to publish data without blocking the client thread diff --git a/livekit/Cargo.toml b/livekit/Cargo.toml index be31f592..269ffdf1 100644 --- a/livekit/Cargo.toml +++ b/livekit/Cargo.toml @@ -40,3 +40,4 @@ futures-util = { version = "0.3", default-features = false, features = ["sink"] thiserror = "1.0" lazy_static = "1.4" log = "0.4" +chrono = "0.4.38" diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index 2908e8f1..869cb41e 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -19,6 +19,8 @@ use std::{ time::Duration, }; +use chrono::{TimeZone, Utc}; + use libwebrtc::{native::create_random_uuid, rtp_parameters::RtpEncodingParameters}; use livekit_api::signal_client::SignalError; use livekit_protocol as proto; @@ -339,7 +341,7 @@ impl LocalParticipant { ) -> RoomResult { let chat_message = proto::ChatMessage { id: create_random_uuid(), - timestamp: 0, + timestamp: Utc::now().timestamp_millis(), message: text, ..Default::default() }; @@ -356,19 +358,21 @@ impl LocalParticipant { Ok(ChatMessage::from(chat_message)) } - pub async fn update_chat_message( + pub async fn edit_chat_message( &self, edit_text: String, original_message: ChatMessage, destination_identities: Option>, sender_identity: Option, ) -> RoomResult { - let mut chat_message = proto::ChatMessage::from(original_message); - chat_message.message = edit_text; - chat_message.edit_timestamp = Some(0); - + let edited_message = ChatMessage { + message: edit_text, + edit_timestamp: Utc::now().timestamp_millis().into(), + ..original_message + }; + let proto_msg = proto::ChatMessage::from(edited_message); let data = proto::DataPacket { - value: Some(proto::data_packet::Value::ChatMessage(chat_message.clone())), + value: Some(proto::data_packet::Value::ChatMessage(proto_msg.clone())), participant_identity: sender_identity.unwrap(), destination_identities: destination_identities.unwrap(), ..Default::default() @@ -376,7 +380,7 @@ impl LocalParticipant { let _ = self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await; - Ok(ChatMessage::from(chat_message)) + Ok(ChatMessage::from(proto_msg)) } pub async fn unpublish_track( From 078f69658af8bee02184f7eb7888d5256df6be19 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 25 Sep 2024 15:27:33 +0200 Subject: [PATCH 08/14] fix default values --- livekit/src/room/participant/local_participant.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index 869cb41e..b94b29c4 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -373,8 +373,8 @@ impl LocalParticipant { let proto_msg = proto::ChatMessage::from(edited_message); let data = proto::DataPacket { value: Some(proto::data_packet::Value::ChatMessage(proto_msg.clone())), - participant_identity: sender_identity.unwrap(), - destination_identities: destination_identities.unwrap(), + participant_identity: sender_identity.unwrap_or_default(), + destination_identities: destination_identities.unwrap_or_default(), ..Default::default() }; From 752b018fbc4a758ccbb103eef10372b03c44db8a Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:44:09 +0000 Subject: [PATCH 09/14] generated protobuf --- livekit-protocol/src/livekit.rs | 137 ++- livekit-protocol/src/livekit.serde.rs | 1229 ++++++++++++++++++++----- 2 files changed, 1148 insertions(+), 218 deletions(-) diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index b91c5188..19181c25 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -11,7 +11,9 @@ pub struct MetricsBatch { /// 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) + /// 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")] @@ -34,6 +36,9 @@ pub struct TimeSeriesMetric { 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, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -69,6 +74,9 @@ pub struct EventMetric { 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. @@ -88,6 +96,34 @@ pub enum MetricLabel { 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 { @@ -100,6 +136,20 @@ impl MetricLabel { 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", } } @@ -109,6 +159,20 @@ impl MetricLabel { "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, } @@ -439,7 +503,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, 8, 9")] + #[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`. @@ -485,6 +549,12 @@ pub mod data_packet { 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)] @@ -595,6 +665,55 @@ pub struct ChatMessage { } #[allow(clippy::derive_partial_eq_without_eq)] #[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, +} +#[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")] + 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 { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Value { + #[prost(string, tag="2")] + Payload(::prost::alloc::string::String), + #[prost(message, tag="3")] + Error(super::RpcError), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[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, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ParticipantTracks { /// participant ID of participant to whom the tracks belong #[prost(string, tag="1")] @@ -676,6 +795,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 { @@ -4627,6 +4750,16 @@ 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")] + 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 { diff --git a/livekit-protocol/src/livekit.serde.rs b/livekit-protocol/src/livekit.serde.rs index 8fae83e9..4e6a0fb0 100644 --- a/livekit-protocol/src/livekit.serde.rs +++ b/livekit-protocol/src/livekit.serde.rs @@ -2382,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) @@ -2415,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() } } @@ -2438,6 +2444,8 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { "browserVersion", "address", "network", + "other_sdks", + "otherSdks", ]; #[allow(clippy::enum_variant_names)] @@ -2452,6 +2460,7 @@ impl<'de> serde::Deserialize<'de> for ClientInfo { BrowserVersion, Address, Network, + OtherSdks, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -2484,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__), } } @@ -2513,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 => { @@ -2577,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::()?; } @@ -2593,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(), }) } } @@ -4954,6 +4972,15 @@ impl serde::Serialize for DataPacket { 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() @@ -4979,6 +5006,12 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "metrics", "chat_message", "chatMessage", + "rpc_request", + "rpcRequest", + "rpc_ack", + "rpcAck", + "rpc_response", + "rpcResponse", ]; #[allow(clippy::enum_variant_names)] @@ -4992,6 +5025,9 @@ impl<'de> serde::Deserialize<'de> for DataPacket { Transcription, Metrics, ChatMessage, + RpcRequest, + RpcAck, + RpcResponse, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5023,6 +5059,9 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "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__), } } @@ -5106,6 +5145,27 @@ impl<'de> serde::Deserialize<'de> for DataPacket { 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__ => { @@ -7549,6 +7609,9 @@ impl serde::Serialize for EventMetric { if !self.metadata.is_empty() { len += 1; } + if self.rid != 0 { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.EventMetric", len)?; if self.label != 0 { struct_ser.serialize_field("label", &self.label)?; @@ -7578,6 +7641,9 @@ impl serde::Serialize for EventMetric { 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() } } @@ -7602,6 +7668,7 @@ impl<'de> serde::Deserialize<'de> for EventMetric { "normalized_end_timestamp", "normalizedEndTimestamp", "metadata", + "rid", ]; #[allow(clippy::enum_variant_names)] @@ -7614,6 +7681,7 @@ impl<'de> serde::Deserialize<'de> for EventMetric { NormalizedStartTimestamp, NormalizedEndTimestamp, Metadata, + Rid, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7644,6 +7712,7 @@ impl<'de> serde::Deserialize<'de> for EventMetric { "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__), } } @@ -7671,6 +7740,7 @@ impl<'de> serde::Deserialize<'de> for EventMetric { 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 => { @@ -7731,6 +7801,14 @@ impl<'de> serde::Deserialize<'de> for EventMetric { } 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::()?; } @@ -7745,6 +7823,7 @@ impl<'de> serde::Deserialize<'de> for EventMetric { normalized_start_timestamp: normalized_start_timestamp__, normalized_end_timestamp: normalized_end_timestamp__, metadata: metadata__.unwrap_or_default(), + rid: rid__.unwrap_or_default(), }) } } @@ -14101,6 +14180,20 @@ impl serde::Serialize for MetricLabel { 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) @@ -14116,6 +14209,20 @@ impl<'de> serde::Deserialize<'de> for MetricLabel { "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", ]; @@ -14160,6 +14267,20 @@ impl<'de> serde::Deserialize<'de> for MetricLabel { "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)), } @@ -20941,7 +21062,7 @@ impl<'de> serde::Deserialize<'de> for RoomUpdate { deserializer.deserialize_struct("livekit.RoomUpdate", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for S3Upload { +impl serde::Serialize for RpcAck { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -20949,113 +21070,30 @@ impl serde::Serialize for S3Upload { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.access_key.is_empty() { - len += 1; - } - if !self.secret.is_empty() { + if !self.request_id.is_empty() { len += 1; } - if !self.session_token.is_empty() { - len += 1; - } - if !self.region.is_empty() { - len += 1; - } - if !self.endpoint.is_empty() { - len += 1; - } - if !self.bucket.is_empty() { - len += 1; - } - if self.force_path_style { - len += 1; - } - if !self.metadata.is_empty() { - len += 1; - } - if !self.tagging.is_empty() { - len += 1; - } - if !self.content_disposition.is_empty() { - len += 1; - } - if self.proxy.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.S3Upload", len)?; - if !self.access_key.is_empty() { - struct_ser.serialize_field("accessKey", &self.access_key)?; - } - if !self.secret.is_empty() { - struct_ser.serialize_field("secret", &self.secret)?; - } - if !self.session_token.is_empty() { - struct_ser.serialize_field("sessionToken", &self.session_token)?; - } - if !self.region.is_empty() { - struct_ser.serialize_field("region", &self.region)?; - } - if !self.endpoint.is_empty() { - struct_ser.serialize_field("endpoint", &self.endpoint)?; - } - if !self.bucket.is_empty() { - struct_ser.serialize_field("bucket", &self.bucket)?; - } - if self.force_path_style { - struct_ser.serialize_field("forcePathStyle", &self.force_path_style)?; - } - if !self.metadata.is_empty() { - struct_ser.serialize_field("metadata", &self.metadata)?; - } - if !self.tagging.is_empty() { - struct_ser.serialize_field("tagging", &self.tagging)?; - } - if !self.content_disposition.is_empty() { - struct_ser.serialize_field("contentDisposition", &self.content_disposition)?; - } - if let Some(v) = self.proxy.as_ref() { - struct_ser.serialize_field("proxy", v)?; + 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 S3Upload { +impl<'de> serde::Deserialize<'de> for RpcAck { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "access_key", - "accessKey", - "secret", - "session_token", - "sessionToken", - "region", - "endpoint", - "bucket", - "force_path_style", - "forcePathStyle", - "metadata", - "tagging", - "content_disposition", - "contentDisposition", - "proxy", + "request_id", + "requestId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - AccessKey, - Secret, - SessionToken, - Region, - Endpoint, - Bucket, - ForcePathStyle, - Metadata, - Tagging, - ContentDisposition, - Proxy, + RequestId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -21078,17 +21116,7 @@ impl<'de> serde::Deserialize<'de> for S3Upload { E: serde::de::Error, { match value { - "accessKey" | "access_key" => Ok(GeneratedField::AccessKey), - "secret" => Ok(GeneratedField::Secret), - "sessionToken" | "session_token" => Ok(GeneratedField::SessionToken), - "region" => Ok(GeneratedField::Region), - "endpoint" => Ok(GeneratedField::Endpoint), - "bucket" => Ok(GeneratedField::Bucket), - "forcePathStyle" | "force_path_style" => Ok(GeneratedField::ForcePathStyle), - "metadata" => Ok(GeneratedField::Metadata), - "tagging" => Ok(GeneratedField::Tagging), - "contentDisposition" | "content_disposition" => Ok(GeneratedField::ContentDisposition), - "proxy" => Ok(GeneratedField::Proxy), + "requestId" | "request_id" => Ok(GeneratedField::RequestId), _ => Ok(GeneratedField::__SkipField__), } } @@ -21098,121 +21126,39 @@ impl<'de> serde::Deserialize<'de> for S3Upload { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = S3Upload; + type Value = RpcAck; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.S3Upload") + 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 access_key__ = None; - let mut secret__ = None; - let mut session_token__ = None; - let mut region__ = None; - let mut endpoint__ = None; - let mut bucket__ = None; - let mut force_path_style__ = None; - let mut metadata__ = None; - let mut tagging__ = None; - let mut content_disposition__ = None; - let mut proxy__ = None; + let mut request_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::AccessKey => { - if access_key__.is_some() { - return Err(serde::de::Error::duplicate_field("accessKey")); - } - access_key__ = Some(map_.next_value()?); - } - GeneratedField::Secret => { - if secret__.is_some() { - return Err(serde::de::Error::duplicate_field("secret")); - } - secret__ = Some(map_.next_value()?); - } - GeneratedField::SessionToken => { - if session_token__.is_some() { - return Err(serde::de::Error::duplicate_field("sessionToken")); - } - session_token__ = Some(map_.next_value()?); - } - GeneratedField::Region => { - if region__.is_some() { - return Err(serde::de::Error::duplicate_field("region")); - } - region__ = Some(map_.next_value()?); - } - GeneratedField::Endpoint => { - if endpoint__.is_some() { - return Err(serde::de::Error::duplicate_field("endpoint")); - } - endpoint__ = Some(map_.next_value()?); - } - GeneratedField::Bucket => { - if bucket__.is_some() { - return Err(serde::de::Error::duplicate_field("bucket")); - } - bucket__ = Some(map_.next_value()?); - } - GeneratedField::ForcePathStyle => { - if force_path_style__.is_some() { - return Err(serde::de::Error::duplicate_field("forcePathStyle")); - } - force_path_style__ = Some(map_.next_value()?); - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some( - map_.next_value::>()? - ); - } - GeneratedField::Tagging => { - if tagging__.is_some() { - return Err(serde::de::Error::duplicate_field("tagging")); - } - tagging__ = Some(map_.next_value()?); - } - GeneratedField::ContentDisposition => { - if content_disposition__.is_some() { - return Err(serde::de::Error::duplicate_field("contentDisposition")); - } - content_disposition__ = Some(map_.next_value()?); - } - GeneratedField::Proxy => { - if proxy__.is_some() { - return Err(serde::de::Error::duplicate_field("proxy")); + GeneratedField::RequestId => { + if request_id__.is_some() { + return Err(serde::de::Error::duplicate_field("requestId")); } - proxy__ = map_.next_value()?; + request_id__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(S3Upload { - access_key: access_key__.unwrap_or_default(), - secret: secret__.unwrap_or_default(), - session_token: session_token__.unwrap_or_default(), - region: region__.unwrap_or_default(), - endpoint: endpoint__.unwrap_or_default(), - bucket: bucket__.unwrap_or_default(), - force_path_style: force_path_style__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - tagging: tagging__.unwrap_or_default(), - content_disposition: content_disposition__.unwrap_or_default(), - proxy: proxy__, + Ok(RpcAck { + request_id: request_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.S3Upload", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RpcAck", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for SipDispatchRule { +impl serde::Serialize for RpcError { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -21220,28 +21166,728 @@ impl serde::Serialize for SipDispatchRule { { use serde::ser::SerializeStruct; let mut len = 0; - if self.rule.is_some() { + if self.code != 0 { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.SIPDispatchRule", len)?; - if let Some(v) = self.rule.as_ref() { - match v { - sip_dispatch_rule::Rule::DispatchRuleDirect(v) => { - struct_ser.serialize_field("dispatchRuleDirect", v)?; - } - sip_dispatch_rule::Rule::DispatchRuleIndividual(v) => { - struct_ser.serialize_field("dispatchRuleIndividual", v)?; - } - sip_dispatch_rule::Rule::DispatchRuleCallee(v) => { - struct_ser.serialize_field("dispatchRuleCallee", v)?; - } - } + if !self.message.is_empty() { + len += 1; } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SipDispatchRule { - #[allow(deprecated)] + if !self.data.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.RpcError", len)?; + if self.code != 0 { + struct_ser.serialize_field("code", &self.code)?; + } + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; + } + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RpcError { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "code", + "message", + "data", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Code, + Message, + Data, + __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 { + "code" => Ok(GeneratedField::Code), + "message" => Ok(GeneratedField::Message), + "data" => Ok(GeneratedField::Data), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RpcError; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RpcError") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut code__ = None; + let mut message__ = None; + let mut data__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Code => { + if code__.is_some() { + return Err(serde::de::Error::duplicate_field("code")); + } + code__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); + } + message__ = Some(map_.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(RpcError { + code: code__.unwrap_or_default(), + message: message__.unwrap_or_default(), + data: data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.RpcError", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RpcRequest { + #[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.method.is_empty() { + len += 1; + } + 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.version != 0 { + struct_ser.serialize_field("version", &self.version)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RpcRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "method", + "payload", + "response_timeout_ms", + "responseTimeoutMs", + "version", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Method, + Payload, + ResponseTimeoutMs, + Version, + __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), + "method" => Ok(GeneratedField::Method), + "payload" => Ok(GeneratedField::Payload), + "responseTimeoutMs" | "response_timeout_ms" => Ok(GeneratedField::ResponseTimeoutMs), + "version" => Ok(GeneratedField::Version), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RpcRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RpcRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + 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::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map_.next_value()?); + } + GeneratedField::Method => { + if method__.is_some() { + return Err(serde::de::Error::duplicate_field("method")); + } + 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(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.RpcRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RpcResponse { + #[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.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 RpcResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "request_id", + "requestId", + "payload", + "error", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RequestId, + Payload, + Error, + __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 { + "requestId" | "request_id" => Ok(GeneratedField::RequestId), + "payload" => Ok(GeneratedField::Payload), + "error" => Ok(GeneratedField::Error), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RpcResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.RpcResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut request_id__ = None; + let mut value__ = 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")); + } + 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(RpcResponse { + request_id: request_id__.unwrap_or_default(), + value: value__, + }) + } + } + deserializer.deserialize_struct("livekit.RpcResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for S3Upload { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.access_key.is_empty() { + len += 1; + } + if !self.secret.is_empty() { + len += 1; + } + if !self.session_token.is_empty() { + len += 1; + } + if !self.region.is_empty() { + len += 1; + } + if !self.endpoint.is_empty() { + len += 1; + } + if !self.bucket.is_empty() { + len += 1; + } + if self.force_path_style { + len += 1; + } + if !self.metadata.is_empty() { + len += 1; + } + if !self.tagging.is_empty() { + len += 1; + } + if !self.content_disposition.is_empty() { + len += 1; + } + if self.proxy.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.S3Upload", len)?; + if !self.access_key.is_empty() { + struct_ser.serialize_field("accessKey", &self.access_key)?; + } + if !self.secret.is_empty() { + struct_ser.serialize_field("secret", &self.secret)?; + } + if !self.session_token.is_empty() { + struct_ser.serialize_field("sessionToken", &self.session_token)?; + } + if !self.region.is_empty() { + struct_ser.serialize_field("region", &self.region)?; + } + if !self.endpoint.is_empty() { + struct_ser.serialize_field("endpoint", &self.endpoint)?; + } + if !self.bucket.is_empty() { + struct_ser.serialize_field("bucket", &self.bucket)?; + } + if self.force_path_style { + struct_ser.serialize_field("forcePathStyle", &self.force_path_style)?; + } + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; + } + if !self.tagging.is_empty() { + struct_ser.serialize_field("tagging", &self.tagging)?; + } + if !self.content_disposition.is_empty() { + struct_ser.serialize_field("contentDisposition", &self.content_disposition)?; + } + if let Some(v) = self.proxy.as_ref() { + struct_ser.serialize_field("proxy", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for S3Upload { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "access_key", + "accessKey", + "secret", + "session_token", + "sessionToken", + "region", + "endpoint", + "bucket", + "force_path_style", + "forcePathStyle", + "metadata", + "tagging", + "content_disposition", + "contentDisposition", + "proxy", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + AccessKey, + Secret, + SessionToken, + Region, + Endpoint, + Bucket, + ForcePathStyle, + Metadata, + Tagging, + ContentDisposition, + Proxy, + __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 { + "accessKey" | "access_key" => Ok(GeneratedField::AccessKey), + "secret" => Ok(GeneratedField::Secret), + "sessionToken" | "session_token" => Ok(GeneratedField::SessionToken), + "region" => Ok(GeneratedField::Region), + "endpoint" => Ok(GeneratedField::Endpoint), + "bucket" => Ok(GeneratedField::Bucket), + "forcePathStyle" | "force_path_style" => Ok(GeneratedField::ForcePathStyle), + "metadata" => Ok(GeneratedField::Metadata), + "tagging" => Ok(GeneratedField::Tagging), + "contentDisposition" | "content_disposition" => Ok(GeneratedField::ContentDisposition), + "proxy" => Ok(GeneratedField::Proxy), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = S3Upload; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.S3Upload") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut access_key__ = None; + let mut secret__ = None; + let mut session_token__ = None; + let mut region__ = None; + let mut endpoint__ = None; + let mut bucket__ = None; + let mut force_path_style__ = None; + let mut metadata__ = None; + let mut tagging__ = None; + let mut content_disposition__ = None; + let mut proxy__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::AccessKey => { + if access_key__.is_some() { + return Err(serde::de::Error::duplicate_field("accessKey")); + } + access_key__ = Some(map_.next_value()?); + } + GeneratedField::Secret => { + if secret__.is_some() { + return Err(serde::de::Error::duplicate_field("secret")); + } + secret__ = Some(map_.next_value()?); + } + GeneratedField::SessionToken => { + if session_token__.is_some() { + return Err(serde::de::Error::duplicate_field("sessionToken")); + } + session_token__ = Some(map_.next_value()?); + } + GeneratedField::Region => { + if region__.is_some() { + return Err(serde::de::Error::duplicate_field("region")); + } + region__ = Some(map_.next_value()?); + } + GeneratedField::Endpoint => { + if endpoint__.is_some() { + return Err(serde::de::Error::duplicate_field("endpoint")); + } + endpoint__ = Some(map_.next_value()?); + } + GeneratedField::Bucket => { + if bucket__.is_some() { + return Err(serde::de::Error::duplicate_field("bucket")); + } + bucket__ = Some(map_.next_value()?); + } + GeneratedField::ForcePathStyle => { + if force_path_style__.is_some() { + return Err(serde::de::Error::duplicate_field("forcePathStyle")); + } + force_path_style__ = Some(map_.next_value()?); + } + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::Tagging => { + if tagging__.is_some() { + return Err(serde::de::Error::duplicate_field("tagging")); + } + tagging__ = Some(map_.next_value()?); + } + GeneratedField::ContentDisposition => { + if content_disposition__.is_some() { + return Err(serde::de::Error::duplicate_field("contentDisposition")); + } + content_disposition__ = Some(map_.next_value()?); + } + GeneratedField::Proxy => { + if proxy__.is_some() { + return Err(serde::de::Error::duplicate_field("proxy")); + } + proxy__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(S3Upload { + access_key: access_key__.unwrap_or_default(), + secret: secret__.unwrap_or_default(), + session_token: session_token__.unwrap_or_default(), + region: region__.unwrap_or_default(), + endpoint: endpoint__.unwrap_or_default(), + bucket: bucket__.unwrap_or_default(), + force_path_style: force_path_style__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + tagging: tagging__.unwrap_or_default(), + content_disposition: content_disposition__.unwrap_or_default(), + proxy: proxy__, + }) + } + } + deserializer.deserialize_struct("livekit.S3Upload", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SipDispatchRule { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.rule.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.SIPDispatchRule", len)?; + if let Some(v) = self.rule.as_ref() { + match v { + sip_dispatch_rule::Rule::DispatchRuleDirect(v) => { + struct_ser.serialize_field("dispatchRuleDirect", v)?; + } + 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() + } +} +impl<'de> serde::Deserialize<'de> for SipDispatchRule { + #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, @@ -28191,6 +28837,9 @@ impl serde::Serialize for TimeSeriesMetric { 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)?; @@ -28204,6 +28853,9 @@ impl serde::Serialize for TimeSeriesMetric { 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() } } @@ -28220,6 +28872,7 @@ impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { "track_sid", "trackSid", "samples", + "rid", ]; #[allow(clippy::enum_variant_names)] @@ -28228,6 +28881,7 @@ impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { ParticipantIdentity, TrackSid, Samples, + Rid, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -28254,6 +28908,7 @@ impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), "trackSid" | "track_sid" => Ok(GeneratedField::TrackSid), "samples" => Ok(GeneratedField::Samples), + "rid" => Ok(GeneratedField::Rid), _ => Ok(GeneratedField::__SkipField__), } } @@ -28277,6 +28932,7 @@ impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { 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 => { @@ -28309,6 +28965,14 @@ impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { } 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::()?; } @@ -28319,6 +28983,7 @@ impl<'de> serde::Deserialize<'de> for TimeSeriesMetric { participant_identity: participant_identity__.unwrap_or_default(), track_sid: track_sid__.unwrap_or_default(), samples: samples__.unwrap_or_default(), + rid: rid__.unwrap_or_default(), }) } } @@ -30229,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 ef71fb918d7d684933dfd6dc84c502c43799f8c4 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 8 Oct 2024 12:52:33 +0200 Subject: [PATCH 10/14] fix match --- livekit/src/rtc_engine/rtc_session.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index c9dec804..58168359 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -661,15 +661,16 @@ impl SessionInner { segments, }); } + proto::data_packet::Value::ChatMessage(message) => { + let _ = self.emitter.send(SessionEvent::ChatMessage { + participant_identity: ParticipantIdentity( + data.participant_identity, + ), + message: ChatMessage::from(message.clone()), + }); + } _ => {} } - proto::data_packet::Value::Metrics(_) => {} - proto::data_packet::Value::ChatMessage(message) => { - let _ = self.emitter.send(SessionEvent::ChatMessage { - participant_identity: ParticipantIdentity(data.participant_identity), - message: ChatMessage::from(message.clone()), - }); - } } } } From f29816227db5c1ba146783cf7a9697de91736b26 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 8 Oct 2024 13:03:41 +0200 Subject: [PATCH 11/14] remove explicit resolver --- Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 746847eb..47c7ce8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,4 +9,3 @@ members = [ "webrtc-sys", "webrtc-sys/build", ] -resolver = "2" From 466e3429b2a1083cb537ce4b6d88c9fc3b63bcf9 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 9 Oct 2024 14:47:09 +0200 Subject: [PATCH 12/14] move conversion --- livekit-ffi/src/conversion/room.rs | 31 ++++++++++++++++++++++++++++-- livekit-ffi/src/proto.rs | 28 --------------------------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/livekit-ffi/src/conversion/room.rs b/livekit-ffi/src/conversion/room.rs index a42d58fc..5bfabc10 100644 --- a/livekit-ffi/src/conversion/room.rs +++ b/livekit-ffi/src/conversion/room.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +use crate::{proto, server::room::FfiRoom}; +use livekit::ChatMessage as RoomChatMessage; use livekit::{ e2ee::{ key_provider::{KeyProvider, KeyProviderOptions}, @@ -24,8 +26,7 @@ use livekit::{ prelude::{ContinualGatheringPolicy, IceServer, IceTransportsType, RtcConfiguration}, }, }; - -use crate::{proto, server::room::FfiRoom}; +use proto::ChatMessage; impl From for proto::EncryptionState { fn from(value: EncryptionState) -> Self { @@ -241,3 +242,29 @@ impl From<&FfiRoom> for proto::RoomInfo { } } } + +impl From for RoomChatMessage { + fn from(proto_msg: ChatMessage) -> Self { + RoomChatMessage { + id: proto_msg.id, + message: proto_msg.message, + timestamp: proto_msg.timestamp, + edit_timestamp: proto_msg.edit_timestamp, + deleted: proto_msg.deleted, + generated: proto_msg.generated, + } + } +} + +impl From for ChatMessage { + fn from(msg: RoomChatMessage) -> Self { + ChatMessage { + id: msg.id, + message: msg.message, + timestamp: msg.timestamp, + edit_timestamp: msg.edit_timestamp, + deleted: msg.deleted.into(), + generated: msg.generated.into(), + } + } +} diff --git a/livekit-ffi/src/proto.rs b/livekit-ffi/src/proto.rs index e891c3c0..b1601bf1 100644 --- a/livekit-ffi/src/proto.rs +++ b/livekit-ffi/src/proto.rs @@ -1,32 +1,4 @@ #![allow(non_snake_case)] #![allow(clippy::enum_variant_names)] -use livekit::ChatMessage as RoomChatMessage; - include!("livekit.proto.rs"); - -impl From for RoomChatMessage { - fn from(proto_msg: ChatMessage) -> Self { - RoomChatMessage { - id: proto_msg.id, - message: proto_msg.message, - timestamp: proto_msg.timestamp, - edit_timestamp: proto_msg.edit_timestamp, - deleted: proto_msg.deleted, - generated: proto_msg.generated, - } - } -} - -impl From for ChatMessage { - fn from(msg: RoomChatMessage) -> Self { - ChatMessage { - id: msg.id, - message: msg.message, - timestamp: msg.timestamp, - edit_timestamp: msg.edit_timestamp, - deleted: msg.deleted.into(), - generated: msg.generated.into(), - } - } -} From 336f697074c021a01452251c7360001286a0055a Mon Sep 17 00:00:00 2001 From: lukasIO Date: Wed, 9 Oct 2024 15:03:09 +0200 Subject: [PATCH 13/14] error handling --- livekit/src/room/participant/local_participant.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/livekit/src/room/participant/local_participant.rs b/livekit/src/room/participant/local_participant.rs index b94b29c4..6b334abb 100644 --- a/livekit/src/room/participant/local_participant.rs +++ b/livekit/src/room/participant/local_participant.rs @@ -353,9 +353,10 @@ impl LocalParticipant { ..Default::default() }; - let _ = self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await; - - Ok(ChatMessage::from(chat_message)) + match self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await { + Ok(_) => Ok(ChatMessage::from(chat_message)), + Err(e) => Err(Into::into(e)), + } } pub async fn edit_chat_message( @@ -378,9 +379,10 @@ impl LocalParticipant { ..Default::default() }; - let _ = self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await; - - Ok(ChatMessage::from(proto_msg)) + match self.inner.rtc_engine.publish_data(&data, DataPacketKind::Reliable).await { + Ok(_) => Ok(ChatMessage::from(proto_msg)), + Err(e) => Err(Into::into(e)), + } } pub async fn unpublish_track( From bb8bea4d8a7f53e16a6dd357bfdf2454ba1f55f3 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Thu, 10 Oct 2024 12:25:45 +0200 Subject: [PATCH 14/14] no imports --- livekit-ffi/src/conversion/room.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/livekit-ffi/src/conversion/room.rs b/livekit-ffi/src/conversion/room.rs index 5bfabc10..199fd734 100644 --- a/livekit-ffi/src/conversion/room.rs +++ b/livekit-ffi/src/conversion/room.rs @@ -13,7 +13,6 @@ // limitations under the License. use crate::{proto, server::room::FfiRoom}; -use livekit::ChatMessage as RoomChatMessage; use livekit::{ e2ee::{ key_provider::{KeyProvider, KeyProviderOptions}, @@ -26,7 +25,6 @@ use livekit::{ prelude::{ContinualGatheringPolicy, IceServer, IceTransportsType, RtcConfiguration}, }, }; -use proto::ChatMessage; impl From for proto::EncryptionState { fn from(value: EncryptionState) -> Self { @@ -243,9 +241,9 @@ impl From<&FfiRoom> for proto::RoomInfo { } } -impl From for RoomChatMessage { - fn from(proto_msg: ChatMessage) -> Self { - RoomChatMessage { +impl From for livekit::ChatMessage { + fn from(proto_msg: proto::ChatMessage) -> Self { + livekit::ChatMessage { id: proto_msg.id, message: proto_msg.message, timestamp: proto_msg.timestamp, @@ -256,9 +254,9 @@ impl From for RoomChatMessage { } } -impl From for ChatMessage { - fn from(msg: RoomChatMessage) -> Self { - ChatMessage { +impl From for proto::ChatMessage { + fn from(msg: livekit::ChatMessage) -> Self { + proto::ChatMessage { id: msg.id, message: msg.message, timestamp: msg.timestamp,