From faf71a28da40dd5158c40d1c3ecf87d9af6b0395 Mon Sep 17 00:00:00 2001 From: Anunay Maheshwari Date: Wed, 19 Nov 2025 05:19:32 +0530 Subject: [PATCH 1/4] feat(connector): initial service impl --- livekit-api/src/services/connector.rs | 283 ++ livekit-api/src/services/mod.rs | 1 + livekit-protocol/generate_proto.sh | 5 +- livekit-protocol/protocol | 2 +- livekit-protocol/src/livekit.rs | 453 ++- livekit-protocol/src/livekit.serde.rs | 4062 ++++++++++++++++++++++--- 6 files changed, 4365 insertions(+), 441 deletions(-) create mode 100644 livekit-api/src/services/connector.rs diff --git a/livekit-api/src/services/connector.rs b/livekit-api/src/services/connector.rs new file mode 100644 index 000000000..2e0e79ceb --- /dev/null +++ b/livekit-api/src/services/connector.rs @@ -0,0 +1,283 @@ +// Copyright 2025 LiveKit, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use livekit_protocol as proto; +use std::collections::HashMap; + +use super::{ServiceBase, ServiceResult, LIVEKIT_PACKAGE}; +use crate::{access_token::VideoGrants, get_env_keys, services::twirp_client::TwirpClient}; + +const SVC: &str = "Connector"; + +/// Options for dialing a WhatsApp call +#[derive(Default, Clone, Debug)] +pub struct DialWhatsAppCallOptions { + /// Optional - An arbitrary string useful for tracking and logging purposes + pub biz_opaque_callback_data: Option, + /// Optional - What LiveKit room should this participant be connected to + pub room_name: Option, + /// Optional - Agents to dispatch the call to + pub agents: Option>, + /// Optional - Identity of the participant in LiveKit room + pub participant_identity: Option, + /// Optional - Name of the participant in LiveKit room + pub participant_name: Option, + /// Optional - User-defined metadata attached to the participant in the room + pub participant_metadata: Option, + /// Optional - User-defined attributes attached to the participant in the room + pub participant_attributes: Option>, + /// Optional - Country where the call terminates as ISO 3166-1 alpha-2 + pub destination_country: Option, +} + +/// Options for accepting a WhatsApp call +#[derive(Default, Clone, Debug)] +pub struct AcceptWhatsAppCallOptions { + /// Optional - An arbitrary string useful for tracking and logging purposes + pub biz_opaque_callback_data: Option, + /// Optional - What LiveKit room should this participant be connected to + pub room_name: Option, + /// Optional - Agents to dispatch the call to + pub agents: Option>, + /// Optional - Identity of the participant in LiveKit room + pub participant_identity: Option, + /// Optional - Name of the participant in LiveKit room + pub participant_name: Option, + /// Optional - User-defined metadata attached to the participant in the room + pub participant_metadata: Option, + /// Optional - User-defined attributes attached to the participant in the room + pub participant_attributes: Option>, + /// Optional - Country where the call terminates as ISO 3166-1 alpha-2 + pub destination_country: Option, +} + +/// Options for connecting a Twilio call +#[derive(Default, Clone, Debug)] +pub struct ConnectTwilioCallOptions { + /// Optional - Agents to dispatch the call to + pub agents: Option>, + /// Optional - Identity of the participant in LiveKit room + pub participant_identity: Option, + /// Optional - Name of the participant in LiveKit room + pub participant_name: Option, + /// Optional - User-defined metadata attached to the participant in the room + pub participant_metadata: Option, + /// Optional - User-defined attributes attached to the participant in the room + pub participant_attributes: Option>, + /// Optional - Country where the call terminates as ISO 3166-1 alpha-2 + pub destination_country: Option, +} + +#[derive(Debug)] +pub struct ConnectorClient { + base: ServiceBase, + client: TwirpClient, +} + +impl ConnectorClient { + pub fn with_api_key(host: &str, api_key: &str, api_secret: &str) -> Self { + Self { + base: ServiceBase::with_api_key(api_key, api_secret), + client: TwirpClient::new(host, LIVEKIT_PACKAGE, None), + } + } + + pub fn new(host: &str) -> ServiceResult { + let (api_key, api_secret) = get_env_keys()?; + Ok(Self::with_api_key(host, &api_key, &api_secret)) + } + + /// Dials a WhatsApp call + /// + /// # Arguments + /// * `phone_number_id` - The number of the business initiating the call + /// * `to_phone_number` - The number of the user that should receive the call + /// * `api_key` - The API key of the business initiating the call + /// * `cloud_api_version` - WhatsApp Cloud API version (e.g., "23.0", "24.0") + /// * `options` - Additional options for the call + /// + /// # Returns + /// Information about the dialed call including the WhatsApp call ID and room name + pub async fn dial_whatsapp_call( + &self, + phone_number_id: impl Into, + to_phone_number: impl Into, + api_key: impl Into, + cloud_api_version: impl Into, + options: DialWhatsAppCallOptions, + ) -> ServiceResult { + self.client + .request( + SVC, + "DialWhatsAppCall", + proto::DialWhatsAppCallRequest { + whatsapp_phone_number_id: phone_number_id.into(), + whatsapp_to_phone_number: to_phone_number.into(), + whatsapp_api_key: api_key.into(), + whatsapp_cloud_api_version: cloud_api_version.into(), + whatsapp_biz_opaque_callback_data: options.biz_opaque_callback_data.unwrap_or_default(), + room_name: options.room_name.unwrap_or_default(), + agents: options.agents.unwrap_or_default(), + participant_identity: options.participant_identity.unwrap_or_default(), + participant_name: options.participant_name.unwrap_or_default(), + participant_metadata: options.participant_metadata.unwrap_or_default(), + participant_attributes: options.participant_attributes.unwrap_or_default(), + destination_country: options.destination_country.unwrap_or_default(), + }, + self.base + .auth_header(VideoGrants { room_create: true, ..Default::default() }, None)?, + ) + .await + .map_err(Into::into) + } + + /// Disconnects a WhatsApp call + /// + /// # Arguments + /// * `call_id` - Call ID sent by Meta + /// * `api_key` - The API key of the business disconnecting the call + /// + /// # Returns + /// Empty response on success + pub async fn disconnect_whatsapp_call( + &self, + call_id: impl Into, + api_key: impl Into, + ) -> ServiceResult { + self.client + .request( + SVC, + "DisconnectWhatsAppCall", + proto::DisconnectWhatsAppCallRequest { + whatsapp_call_id: call_id.into(), + whatsapp_api_key: api_key.into(), + }, + self.base + .auth_header(VideoGrants { room_create: true, ..Default::default() }, None)?, + ) + .await + .map_err(Into::into) + } + + /// Connects a WhatsApp call (handles the SDP exchange) + /// + /// # Arguments + /// * `call_id` - Call ID sent by Meta + /// * `sdp` - The SDP from Meta (answer SDP for business-initiated call) + /// + /// # Returns + /// Empty response on success + pub async fn connect_whatsapp_call( + &self, + call_id: impl Into, + sdp: proto::SessionDescription, + ) -> ServiceResult { + self.client + .request( + SVC, + "ConnectWhatsAppCall", + proto::ConnectWhatsAppCallRequest { + whatsapp_call_id: call_id.into(), + sdp: Some(sdp), + }, + self.base + .auth_header(VideoGrants { room_create: true, ..Default::default() }, None)?, + ) + .await + .map_err(Into::into) + } + + /// Accepts an incoming WhatsApp call + /// + /// # Arguments + /// * `phone_number_id` - The number of the business connecting the call + /// * `api_key` - The API key of the business connecting the call + /// * `cloud_api_version` - WhatsApp Cloud API version (e.g., "23.0", "24.0") + /// * `call_id` - Call ID sent by Meta + /// * `sdp` - The SDP from Meta (for user-initiated call) + /// * `options` - Additional options for the call + /// + /// # Returns + /// Information about the accepted call including the room name + pub async fn accept_whatsapp_call( + &self, + phone_number_id: impl Into, + api_key: impl Into, + cloud_api_version: impl Into, + call_id: impl Into, + sdp: proto::SessionDescription, + options: AcceptWhatsAppCallOptions, + ) -> ServiceResult { + self.client + .request( + SVC, + "AcceptWhatsAppCall", + proto::AcceptWhatsAppCallRequest { + whatsapp_phone_number_id: phone_number_id.into(), + whatsapp_api_key: api_key.into(), + whatsapp_cloud_api_version: cloud_api_version.into(), + whatsapp_call_id: call_id.into(), + whatsapp_biz_opaque_callback_data: options.biz_opaque_callback_data.unwrap_or_default(), + sdp: Some(sdp), + room_name: options.room_name.unwrap_or_default(), + agents: options.agents.unwrap_or_default(), + participant_identity: options.participant_identity.unwrap_or_default(), + participant_name: options.participant_name.unwrap_or_default(), + participant_metadata: options.participant_metadata.unwrap_or_default(), + participant_attributes: options.participant_attributes.unwrap_or_default(), + destination_country: options.destination_country.unwrap_or_default(), + }, + self.base + .auth_header(VideoGrants { room_create: true, ..Default::default() }, None)?, + ) + .await + .map_err(Into::into) + } + + /// Connects a Twilio call + /// + /// # Arguments + /// * `direction` - The direction of the call (inbound or outbound) + /// * `room_name` - What LiveKit room should this call be connected to + /// * `options` - Additional options for the call + /// + /// # Returns + /// The WebSocket URL which Twilio media stream should connect to + pub async fn connect_twilio_call( + &self, + direction: proto::connect_twilio_call_request::TwilioCallDirection, + room_name: impl Into, + options: ConnectTwilioCallOptions, + ) -> ServiceResult { + self.client + .request( + SVC, + "ConnectTwilioCall", + proto::ConnectTwilioCallRequest { + twilio_call_direction: direction as i32, + room_name: room_name.into(), + agents: options.agents.unwrap_or_default(), + participant_identity: options.participant_identity.unwrap_or_default(), + participant_name: options.participant_name.unwrap_or_default(), + participant_metadata: options.participant_metadata.unwrap_or_default(), + participant_attributes: options.participant_attributes.unwrap_or_default(), + destination_country: options.destination_country.unwrap_or_default(), + }, + self.base + .auth_header(VideoGrants { room_create: true, ..Default::default() }, None)?, + ) + .await + .map_err(Into::into) + } +} \ No newline at end of file diff --git a/livekit-api/src/services/mod.rs b/livekit-api/src/services/mod.rs index b65676e9c..186891654 100644 --- a/livekit-api/src/services/mod.rs +++ b/livekit-api/src/services/mod.rs @@ -22,6 +22,7 @@ use crate::access_token::{AccessToken, AccessTokenError, SIPGrants, VideoGrants} pub use twirp_client::{TwirpError, TwirpErrorCode, TwirpResult}; pub mod agent_dispatch; +pub mod connector; pub mod egress; pub mod ingress; pub mod room; diff --git a/livekit-protocol/generate_proto.sh b/livekit-protocol/generate_proto.sh index a1f6adc66..a244ed1bc 100755 --- a/livekit-protocol/generate_proto.sh +++ b/livekit-protocol/generate_proto.sh @@ -31,4 +31,7 @@ protoc \ $PROTOCOL/livekit_room.proto \ $PROTOCOL/livekit_webhook.proto \ $PROTOCOL/livekit_sip.proto \ - $PROTOCOL/livekit_models.proto + $PROTOCOL/livekit_models.proto \ + $PROTOCOL/livekit_connector.proto \ + $PROTOCOL/livekit_connector_whatsapp.proto \ + $PROTOCOL/livekit_connector_twilio.proto diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index 2bc93ddc2..ad2cb9af4 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit 2bc93ddc27ccfa66ee8d270a1bcd115586fb601d +Subproject commit ad2cb9af4442a0ee04bb0815ba4b8ee4e2f6ba6f diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index 676becb62..a1d2f4a9e 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -12,7 +12,7 @@ pub struct MetricsBatch { /// This is useful for storing participant identities, track names, etc. /// There is also a predefined list of labels that can be used to reference common metrics. /// They have reserved indices from 0 to (METRIC_LABEL_PREDEFINED_MAX_VALUE - 1). - /// Indexes pointing at str_data should start from METRIC_LABEL_PREDEFINED_MAX_VALUE, + /// 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>, @@ -78,6 +78,17 @@ pub struct EventMetric { #[prost(uint32, tag="9")] pub rid: u32, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetricsRecordingHeader { + #[prost(string, tag="1")] + pub room_id: ::prost::alloc::string::String, + /// milliseconds + #[prost(uint64, tag="3")] + pub duration: u64, + #[prost(message, optional, tag="4")] + pub start_time: ::core::option::Option<::pbjson_types::Timestamp>, +} // // Protocol used to record metrics for a specific session. // @@ -217,7 +228,7 @@ pub struct ListUpdate { pub add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// delete items from a list #[prost(string, repeated, tag="3")] - pub del: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + pub remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// sets the list to an empty list #[prost(bool, tag="4")] pub clear: bool, @@ -398,6 +409,10 @@ pub mod participant_info { Sip = 3, /// LiveKit agents Agent = 4, + /// Connectors participants + /// + /// NEXT_ID: 8 + Connector = 7, } impl Kind { /// String value of the enum field names used in the ProtoBuf definition. @@ -411,6 +426,7 @@ pub mod participant_info { Kind::Egress => "EGRESS", Kind::Sip => "SIP", Kind::Agent => "AGENT", + Kind::Connector => "CONNECTOR", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -421,6 +437,7 @@ pub mod participant_info { "EGRESS" => Some(Self::Egress), "SIP" => Some(Self::Sip), "AGENT" => Some(Self::Agent), + "CONNECTOR" => Some(Self::Connector), _ => None, } } @@ -521,11 +538,9 @@ pub struct TrackInfo { pub muted: bool, /// original width of video (unset for audio) /// clients may receive a lower resolution version with simulcast - #[deprecated] #[prost(uint32, tag="5")] pub width: u32, /// original height of video (unset for audio) - #[deprecated] #[prost(uint32, tag="6")] pub height: u32, /// true if track is simulcasted @@ -601,6 +616,7 @@ pub mod video_layer { Unused = 0, OneSpatialLayerPerStream = 1, MultipleSpatialLayersPerStream = 2, + OneSpatialLayerPerStreamIncompleteRtcpSr = 3, } impl Mode { /// String value of the enum field names used in the ProtoBuf definition. @@ -612,6 +628,7 @@ pub mod video_layer { Mode::Unused => "MODE_UNUSED", Mode::OneSpatialLayerPerStream => "ONE_SPATIAL_LAYER_PER_STREAM", Mode::MultipleSpatialLayersPerStream => "MULTIPLE_SPATIAL_LAYERS_PER_STREAM", + Mode::OneSpatialLayerPerStreamIncompleteRtcpSr => "ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -620,6 +637,7 @@ pub mod video_layer { "MODE_UNUSED" => Some(Self::Unused), "ONE_SPATIAL_LAYER_PER_STREAM" => Some(Self::OneSpatialLayerPerStream), "MULTIPLE_SPATIAL_LAYERS_PER_STREAM" => Some(Self::MultipleSpatialLayersPerStream), + "ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR" => Some(Self::OneSpatialLayerPerStreamIncompleteRtcpSr), _ => None, } } @@ -715,7 +733,7 @@ pub struct EncryptedPacket { pub iv: ::prost::alloc::vec::Vec, #[prost(uint32, tag="3")] pub key_index: u32, - /// This is an encrypted EncryptedPacketPayload message representation + /// This is an encrypted EncryptedPacketPayload message representation #[prost(bytes="vec", tag="4")] pub encrypted_value: ::prost::alloc::vec::Vec, } @@ -1440,11 +1458,29 @@ pub mod data_stream { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct FilterParams { + #[prost(string, repeated, tag="1")] + pub include_events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="2")] + pub exclude_events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct WebhookConfig { #[prost(string, tag="1")] pub url: ::prost::alloc::string::String, #[prost(string, tag="2")] pub signing_key: ::prost::alloc::string::String, + #[prost(message, optional, tag="3")] + pub filter_params: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SubscribedAudioCodec { + #[prost(string, tag="1")] + pub codec: ::prost::alloc::string::String, + #[prost(bool, tag="2")] + pub enabled: bool, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -1452,6 +1488,7 @@ pub enum AudioCodec { DefaultAc = 0, Opus = 1, Aac = 2, + AcMp3 = 3, } impl AudioCodec { /// String value of the enum field names used in the ProtoBuf definition. @@ -1463,6 +1500,7 @@ impl AudioCodec { AudioCodec::DefaultAc => "DEFAULT_AC", AudioCodec::Opus => "OPUS", AudioCodec::Aac => "AAC", + AudioCodec::AcMp3 => "AC_MP3", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1471,6 +1509,7 @@ impl AudioCodec { "DEFAULT_AC" => Some(Self::DefaultAc), "OPUS" => Some(Self::Opus), "AAC" => Some(Self::Aac), + "AC_MP3" => Some(Self::AcMp3), _ => None, } } @@ -2703,6 +2742,7 @@ pub enum EncodedFileType { DefaultFiletype = 0, Mp4 = 1, Ogg = 2, + Mp3 = 3, } impl EncodedFileType { /// String value of the enum field names used in the ProtoBuf definition. @@ -2714,6 +2754,7 @@ impl EncodedFileType { EncodedFileType::DefaultFiletype => "DEFAULT_FILETYPE", EncodedFileType::Mp4 => "MP4", EncodedFileType::Ogg => "OGG", + EncodedFileType::Mp3 => "MP3", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2722,6 +2763,7 @@ impl EncodedFileType { "DEFAULT_FILETYPE" => Some(Self::DefaultFiletype), "MP4" => Some(Self::Mp4), "OGG" => Some(Self::Ogg), + "MP3" => Some(Self::Mp3), _ => None, } } @@ -3056,7 +3098,7 @@ pub mod signal_request { #[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, 24, 25")] + #[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, 24, 25, 26")] pub message: ::core::option::Option, } /// Nested message and enum types in `SignalResponse`. @@ -3139,6 +3181,9 @@ pub mod signal_response { /// notify number of required media sections to satisfy subscribed tracks #[prost(message, tag="25")] MediaSectionsRequirement(super::MediaSectionsRequirement), + /// when audio subscription changes, used to enable simulcasting of audio codecs based on subscriptions + #[prost(message, tag="26")] + SubscribedAudioCodecUpdate(super::SubscribedAudioCodecUpdate), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -3299,6 +3344,8 @@ pub struct SessionDescription { pub sdp: ::prost::alloc::string::String, #[prost(uint32, tag="3")] pub id: u32, + #[prost(map="string, string", tag="4")] + pub mid_to_track_id: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -3520,6 +3567,14 @@ pub struct SubscribedQualityUpdate { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct SubscribedAudioCodecUpdate { + #[prost(string, tag="1")] + pub track_sid: ::prost::alloc::string::String, + #[prost(message, repeated, tag="2")] + pub subscribed_audio_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 #[prost(string, tag="1")] @@ -3697,6 +3752,8 @@ pub struct RequestResponse { pub reason: i32, #[prost(string, tag="3")] pub message: ::prost::alloc::string::String, + #[prost(oneof="request_response::Request", tags="4, 5, 6, 7, 8, 9")] + pub request: ::core::option::Option, } /// Nested message and enum types in `RequestResponse`. pub mod request_response { @@ -3707,6 +3764,9 @@ pub mod request_response { NotFound = 1, NotAllowed = 2, LimitExceeded = 3, + Queued = 4, + UnsupportedType = 5, + UnclassifiedError = 6, } impl Reason { /// String value of the enum field names used in the ProtoBuf definition. @@ -3719,6 +3779,9 @@ pub mod request_response { Reason::NotFound => "NOT_FOUND", Reason::NotAllowed => "NOT_ALLOWED", Reason::LimitExceeded => "LIMIT_EXCEEDED", + Reason::Queued => "QUEUED", + Reason::UnsupportedType => "UNSUPPORTED_TYPE", + Reason::UnclassifiedError => "UNCLASSIFIED_ERROR", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3728,10 +3791,29 @@ pub mod request_response { "NOT_FOUND" => Some(Self::NotFound), "NOT_ALLOWED" => Some(Self::NotAllowed), "LIMIT_EXCEEDED" => Some(Self::LimitExceeded), + "QUEUED" => Some(Self::Queued), + "UNSUPPORTED_TYPE" => Some(Self::UnsupportedType), + "UNCLASSIFIED_ERROR" => Some(Self::UnclassifiedError), _ => None, } } } + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Request { + #[prost(message, tag="4")] + Trickle(super::TrickleRequest), + #[prost(message, tag="5")] + AddTrack(super::AddTrackRequest), + #[prost(message, tag="6")] + Mute(super::MuteTrackRequest), + #[prost(message, tag="7")] + UpdateMetadata(super::UpdateParticipantMetadata), + #[prost(message, tag="8")] + UpdateAudioTrack(super::UpdateLocalAudioTrack), + #[prost(message, tag="9")] + UpdateVideoTrack(super::UpdateLocalVideoTrack), + } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -3928,6 +4010,8 @@ pub struct Job { pub agent_name: ::prost::alloc::string::String, #[prost(message, optional, tag="8")] pub state: ::core::option::Option, + #[prost(bool, tag="10")] + pub enable_recording: bool, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -4571,6 +4655,26 @@ pub struct MoveParticipantResponse { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct PerformRpcRequest { + #[prost(string, tag="1")] + pub room: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub destination_identity: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub method: ::prost::alloc::string::String, + #[prost(string, tag="4")] + pub payload: ::prost::alloc::string::String, + #[prost(uint32, tag="5")] + pub response_timeout_ms: u32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PerformRpcResponse { + #[prost(string, tag="1")] + pub payload: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateIngressRequest { #[prost(enumeration="IngressInput", tag="1")] pub input_type: i32, @@ -5058,6 +5162,18 @@ pub struct CreateSipTrunkRequest { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProviderInfo { + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub name: ::prost::alloc::string::String, + #[prost(enumeration="ProviderType", tag="3")] + pub r#type: i32, + #[prost(bool, tag="4")] + pub prevent_transfer: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SipTrunkInfo { #[prost(string, tag="1")] pub sip_trunk_id: ::prost::alloc::string::String, @@ -5715,10 +5831,19 @@ pub struct CreateSipParticipantRequest { #[prost(enumeration="SipMediaEncryption", tag="18")] pub media_encryption: i32, /// Wait for the answer for the call before returning. - /// - /// NEXT ID: 21 #[prost(bool, tag="19")] pub wait_until_answered: bool, + /// Optional display name for the 'From' SIP header. + /// + /// Cases: + /// 1) Unspecified: Use legacy behavior - display name will be set to be the caller's number. + /// 2) Empty string: Do not send a display name, which will result in a CNAM lookup downstream. + /// 3) Non-empty: Use the specified value as the display name. + #[prost(string, optional, tag="21")] + pub display_name: ::core::option::Option<::prost::alloc::string::String>, + /// NEXT ID: 23 + #[prost(message, optional, tag="22")] + pub destination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -5806,6 +5931,12 @@ pub struct SipCallInfo { pub audio_codec: ::prost::alloc::string::String, #[prost(string, tag="21")] pub media_encryption: ::prost::alloc::string::String, + #[prost(string, tag="25")] + pub pcap_file_link: ::prost::alloc::string::String, + #[prost(message, repeated, tag="26")] + pub call_context: ::prost::alloc::vec::Vec<::pbjson_types::Any>, + #[prost(message, optional, tag="27")] + pub provider_info: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -5841,6 +5972,16 @@ pub struct SipUri { #[prost(enumeration="SipTransport", tag="5")] pub transport: i32, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Destination { + #[prost(string, tag="1")] + pub city: ::prost::alloc::string::String, + #[prost(string, tag="2")] + pub country: ::prost::alloc::string::String, + #[prost(string, tag="3")] + pub region: ::prost::alloc::string::String, +} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum SipStatusCode { @@ -6106,6 +6247,37 @@ impl SipMediaEncryption { } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] +pub enum ProviderType { + Unknown = 0, + /// Internally implemented + Internal = 1, + /// Vendor provided + External = 2, +} +impl ProviderType { + /// 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 { + ProviderType::Unknown => "PROVIDER_TYPE_UNKNOWN", + ProviderType::Internal => "PROVIDER_TYPE_INTERNAL", + ProviderType::External => "PROVIDER_TYPE_EXTERNAL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "PROVIDER_TYPE_UNKNOWN" => Some(Self::Unknown), + "PROVIDER_TYPE_INTERNAL" => Some(Self::Internal), + "PROVIDER_TYPE_EXTERNAL" => Some(Self::External), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] pub enum SipCallStatus { /// Incoming call is being handled by the SIP service. The SIP participant hasn't joined a LiveKit room yet ScsCallIncoming = 0, @@ -6228,5 +6400,270 @@ impl SipCallDirection { } } } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DialWhatsAppCallRequest { + /// Required - The number of the business that is initiating the call + #[prost(string, tag="1")] + pub whatsapp_phone_number_id: ::prost::alloc::string::String, + /// Required - The number of the user that is supossed to receive the call + #[prost(string, tag="2")] + pub whatsapp_to_phone_number: ::prost::alloc::string::String, + /// Required - The API key of the business that is initiating the call + #[prost(string, tag="3")] + pub whatsapp_api_key: ::prost::alloc::string::String, + /// Required - WhatsApp Cloud API version, eg: 23.0, 24.0, etc. + #[prost(string, tag="12")] + pub whatsapp_cloud_api_version: ::prost::alloc::string::String, + /// Optional - An arbitrary string you can pass in that is useful for tracking and logging purposes. + #[prost(string, tag="4")] + pub whatsapp_biz_opaque_callback_data: ::prost::alloc::string::String, + /// Optional - What LiveKit room should this participant be connected too + #[prost(string, tag="5")] + pub room_name: ::prost::alloc::string::String, + /// Optional - Agents to dispatch the call to + #[prost(message, repeated, tag="6")] + pub agents: ::prost::alloc::vec::Vec, + /// Optional - Identity of the participant in LiveKit room + #[prost(string, tag="7")] + pub participant_identity: ::prost::alloc::string::String, + /// Optional - Name of the participant in LiveKit room + #[prost(string, tag="8")] + pub participant_name: ::prost::alloc::string::String, + /// Optional - User-defined metadata. Will be attached to a created Participant in the room. + #[prost(string, tag="9")] + pub participant_metadata: ::prost::alloc::string::String, + /// Optional - User-defined attributes. Will be attached to a created Participant in the room. + #[prost(map="string, string", tag="10")] + pub participant_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Optional - Country where the call terminates as ISO 3166-1 alpha-2 (). This will be used by the livekit infrastructure to route calls. + /// + /// Next - 13 + #[prost(string, tag="11")] + pub destination_country: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DialWhatsAppCallResponse { + /// Call ID sent by Meta + #[prost(string, tag="1")] + pub whatsapp_call_id: ::prost::alloc::string::String, + /// The name of the LiveKit room that the call is connected to + #[prost(string, tag="2")] + pub room_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisconnectWhatsAppCallRequest { + /// Required - Call ID sent by Meta + #[prost(string, tag="1")] + pub whatsapp_call_id: ::prost::alloc::string::String, + /// Required - The API key of the business that is disconnecting the call + #[prost(string, tag="2")] + pub whatsapp_api_key: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DisconnectWhatsAppCallResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectWhatsAppCallRequest { + /// Required - Call ID sent by Meta + #[prost(string, tag="1")] + pub whatsapp_call_id: ::prost::alloc::string::String, + /// Required - The call connect webhook comes with SDP from Meta + /// It is the answer SDP for a business initiated call + #[prost(message, optional, tag="2")] + pub sdp: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectWhatsAppCallResponse { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AcceptWhatsAppCallRequest { + /// Required - The number of the business that is conencting the call + #[prost(string, tag="1")] + pub whatsapp_phone_number_id: ::prost::alloc::string::String, + /// Required - The API key of the business that is connecting the call + #[prost(string, tag="2")] + pub whatsapp_api_key: ::prost::alloc::string::String, + /// Required - WhatsApp Cloud API version, eg: 23.0, 24.0, etc. + #[prost(string, tag="13")] + pub whatsapp_cloud_api_version: ::prost::alloc::string::String, + /// Required - Call ID sent by Meta + #[prost(string, tag="3")] + pub whatsapp_call_id: ::prost::alloc::string::String, + /// Optional - An arbitrary string you can pass in that is useful for tracking and logging purposes. + #[prost(string, tag="4")] + pub whatsapp_biz_opaque_callback_data: ::prost::alloc::string::String, + /// Required - The call accept webhook comes with SDP from Meta + /// It is the for a user initiated call + #[prost(message, optional, tag="5")] + pub sdp: ::core::option::Option, + /// Optional - What LiveKit room should this participant be connected too + #[prost(string, tag="6")] + pub room_name: ::prost::alloc::string::String, + /// Optional - Agents to dispatch the call to + #[prost(message, repeated, tag="7")] + pub agents: ::prost::alloc::vec::Vec, + /// Optional - Identity of the participant in LiveKit room + #[prost(string, tag="8")] + pub participant_identity: ::prost::alloc::string::String, + /// Optional - Name of the participant in LiveKit room + #[prost(string, tag="9")] + pub participant_name: ::prost::alloc::string::String, + /// Optional - User-defined metadata. Will be attached to a created Participant in the room. + #[prost(string, tag="10")] + pub participant_metadata: ::prost::alloc::string::String, + /// Optional - User-defined attributes. Will be attached to a created Participant in the room. + #[prost(map="string, string", tag="11")] + pub participant_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Optional - Country where the call terminates as ISO 3166-1 alpha-2 (). This will be used by the livekit infrastructure to route calls. + /// + /// Next - 14 + #[prost(string, tag="12")] + pub destination_country: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AcceptWhatsAppCallResponse { + /// The name of the LiveKit room that the call is connected to + #[prost(string, tag="1")] + pub room_name: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WhatsAppCall { + /// list of call ids that are currently active + #[prost(string, tag="1")] + pub whatsapp_call_id: ::prost::alloc::string::String, + /// Direction of the call + #[prost(enumeration="WhatsAppCallDirection", tag="2")] + pub direction: i32, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum WhatsAppCallDirection { + WhatsappCallDirectionInbound = 0, + WhatsappCallDirectionOutbound = 2, +} +impl WhatsAppCallDirection { + /// 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 { + WhatsAppCallDirection::WhatsappCallDirectionInbound => "WHATSAPP_CALL_DIRECTION_INBOUND", + WhatsAppCallDirection::WhatsappCallDirectionOutbound => "WHATSAPP_CALL_DIRECTION_OUTBOUND", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "WHATSAPP_CALL_DIRECTION_INBOUND" => Some(Self::WhatsappCallDirectionInbound), + "WHATSAPP_CALL_DIRECTION_OUTBOUND" => Some(Self::WhatsappCallDirectionOutbound), + _ => None, + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectTwilioCallRequest { + /// The Direction of the call + #[prost(enumeration="connect_twilio_call_request::TwilioCallDirection", tag="1")] + pub twilio_call_direction: i32, + /// What LiveKit room should this call be connected to + #[prost(string, tag="2")] + pub room_name: ::prost::alloc::string::String, + /// Optional agents to dispatch the call to + #[prost(message, repeated, tag="3")] + pub agents: ::prost::alloc::vec::Vec, + /// Optional identity of the participant in LiveKit room + #[prost(string, tag="4")] + pub participant_identity: ::prost::alloc::string::String, + /// Optional name of the participant in LiveKit room + #[prost(string, tag="5")] + pub participant_name: ::prost::alloc::string::String, + /// Optional user-defined metadata. Will be attached to a created Participant in the room. + #[prost(string, tag="6")] + pub participant_metadata: ::prost::alloc::string::String, + /// Optional user-defined attributes. Will be attached to a created Participant in the room. + #[prost(map="string, string", tag="7")] + pub participant_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Country where the call terminates as ISO 3166-1 alpha-2 (). This will be used by the livekit infrastructure to route calls. + #[prost(string, tag="8")] + pub destination_country: ::prost::alloc::string::String, +} +/// Nested message and enum types in `ConnectTwilioCallRequest`. +pub mod connect_twilio_call_request { + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum TwilioCallDirection { + /// Call is inbound to LiveKit from Twilio + Inbound = 0, + /// Call is outbound from LiveKit to Twilio + Outbound = 1, + } + impl TwilioCallDirection { + /// 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 { + TwilioCallDirection::Inbound => "TWILIO_CALL_DIRECTION_INBOUND", + TwilioCallDirection::Outbound => "TWILIO_CALL_DIRECTION_OUTBOUND", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TWILIO_CALL_DIRECTION_INBOUND" => Some(Self::Inbound), + "TWILIO_CALL_DIRECTION_OUTBOUND" => Some(Self::Outbound), + _ => None, + } + } + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectTwilioCallResponse { + /// The websocket URL which twilio media stream will connect to + #[prost(string, tag="1")] + pub connect_url: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ConnectorType { + Unspecified = 0, + WhatsApp = 1, + Twilio = 2, +} +impl ConnectorType { + /// 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 { + ConnectorType::Unspecified => "Unspecified", + ConnectorType::WhatsApp => "WhatsApp", + ConnectorType::Twilio => "Twilio", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "Unspecified" => Some(Self::Unspecified), + "WhatsApp" => Some(Self::WhatsApp), + "Twilio" => Some(Self::Twilio), + _ => None, + } + } +} include!("livekit.serde.rs"); // @@protoc_insertion_point(module) diff --git a/livekit-protocol/src/livekit.serde.rs b/livekit-protocol/src/livekit.serde.rs index 3c79f6c7a..68f003636 100644 --- a/livekit-protocol/src/livekit.serde.rs +++ b/livekit-protocol/src/livekit.serde.rs @@ -1,4 +1,412 @@ // @generated +impl serde::Serialize for AcceptWhatsAppCallRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.whatsapp_phone_number_id.is_empty() { + len += 1; + } + if !self.whatsapp_api_key.is_empty() { + len += 1; + } + if !self.whatsapp_cloud_api_version.is_empty() { + len += 1; + } + if !self.whatsapp_call_id.is_empty() { + len += 1; + } + if !self.whatsapp_biz_opaque_callback_data.is_empty() { + len += 1; + } + if self.sdp.is_some() { + len += 1; + } + if !self.room_name.is_empty() { + len += 1; + } + if !self.agents.is_empty() { + len += 1; + } + if !self.participant_identity.is_empty() { + len += 1; + } + if !self.participant_name.is_empty() { + len += 1; + } + if !self.participant_metadata.is_empty() { + len += 1; + } + if !self.participant_attributes.is_empty() { + len += 1; + } + if !self.destination_country.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.AcceptWhatsAppCallRequest", len)?; + if !self.whatsapp_phone_number_id.is_empty() { + struct_ser.serialize_field("whatsappPhoneNumberId", &self.whatsapp_phone_number_id)?; + } + if !self.whatsapp_api_key.is_empty() { + struct_ser.serialize_field("whatsappApiKey", &self.whatsapp_api_key)?; + } + if !self.whatsapp_cloud_api_version.is_empty() { + struct_ser.serialize_field("whatsappCloudApiVersion", &self.whatsapp_cloud_api_version)?; + } + if !self.whatsapp_call_id.is_empty() { + struct_ser.serialize_field("whatsappCallId", &self.whatsapp_call_id)?; + } + if !self.whatsapp_biz_opaque_callback_data.is_empty() { + struct_ser.serialize_field("whatsappBizOpaqueCallbackData", &self.whatsapp_biz_opaque_callback_data)?; + } + if let Some(v) = self.sdp.as_ref() { + struct_ser.serialize_field("sdp", v)?; + } + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + if !self.agents.is_empty() { + struct_ser.serialize_field("agents", &self.agents)?; + } + if !self.participant_identity.is_empty() { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if !self.participant_name.is_empty() { + struct_ser.serialize_field("participantName", &self.participant_name)?; + } + if !self.participant_metadata.is_empty() { + struct_ser.serialize_field("participantMetadata", &self.participant_metadata)?; + } + if !self.participant_attributes.is_empty() { + struct_ser.serialize_field("participantAttributes", &self.participant_attributes)?; + } + if !self.destination_country.is_empty() { + struct_ser.serialize_field("destinationCountry", &self.destination_country)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AcceptWhatsAppCallRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "whatsapp_phone_number_id", + "whatsappPhoneNumberId", + "whatsapp_api_key", + "whatsappApiKey", + "whatsapp_cloud_api_version", + "whatsappCloudApiVersion", + "whatsapp_call_id", + "whatsappCallId", + "whatsapp_biz_opaque_callback_data", + "whatsappBizOpaqueCallbackData", + "sdp", + "room_name", + "roomName", + "agents", + "participant_identity", + "participantIdentity", + "participant_name", + "participantName", + "participant_metadata", + "participantMetadata", + "participant_attributes", + "participantAttributes", + "destination_country", + "destinationCountry", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WhatsappPhoneNumberId, + WhatsappApiKey, + WhatsappCloudApiVersion, + WhatsappCallId, + WhatsappBizOpaqueCallbackData, + Sdp, + RoomName, + Agents, + ParticipantIdentity, + ParticipantName, + ParticipantMetadata, + ParticipantAttributes, + DestinationCountry, + __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 { + "whatsappPhoneNumberId" | "whatsapp_phone_number_id" => Ok(GeneratedField::WhatsappPhoneNumberId), + "whatsappApiKey" | "whatsapp_api_key" => Ok(GeneratedField::WhatsappApiKey), + "whatsappCloudApiVersion" | "whatsapp_cloud_api_version" => Ok(GeneratedField::WhatsappCloudApiVersion), + "whatsappCallId" | "whatsapp_call_id" => Ok(GeneratedField::WhatsappCallId), + "whatsappBizOpaqueCallbackData" | "whatsapp_biz_opaque_callback_data" => Ok(GeneratedField::WhatsappBizOpaqueCallbackData), + "sdp" => Ok(GeneratedField::Sdp), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + "agents" => Ok(GeneratedField::Agents), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "participantName" | "participant_name" => Ok(GeneratedField::ParticipantName), + "participantMetadata" | "participant_metadata" => Ok(GeneratedField::ParticipantMetadata), + "participantAttributes" | "participant_attributes" => Ok(GeneratedField::ParticipantAttributes), + "destinationCountry" | "destination_country" => Ok(GeneratedField::DestinationCountry), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AcceptWhatsAppCallRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.AcceptWhatsAppCallRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut whatsapp_phone_number_id__ = None; + let mut whatsapp_api_key__ = None; + let mut whatsapp_cloud_api_version__ = None; + let mut whatsapp_call_id__ = None; + let mut whatsapp_biz_opaque_callback_data__ = None; + let mut sdp__ = None; + let mut room_name__ = None; + let mut agents__ = None; + let mut participant_identity__ = None; + let mut participant_name__ = None; + let mut participant_metadata__ = None; + let mut participant_attributes__ = None; + let mut destination_country__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::WhatsappPhoneNumberId => { + if whatsapp_phone_number_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappPhoneNumberId")); + } + whatsapp_phone_number_id__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappApiKey => { + if whatsapp_api_key__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappApiKey")); + } + whatsapp_api_key__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappCloudApiVersion => { + if whatsapp_cloud_api_version__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCloudApiVersion")); + } + whatsapp_cloud_api_version__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappCallId => { + if whatsapp_call_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCallId")); + } + whatsapp_call_id__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappBizOpaqueCallbackData => { + if whatsapp_biz_opaque_callback_data__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappBizOpaqueCallbackData")); + } + whatsapp_biz_opaque_callback_data__ = Some(map_.next_value()?); + } + GeneratedField::Sdp => { + if sdp__.is_some() { + return Err(serde::de::Error::duplicate_field("sdp")); + } + sdp__ = 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::Agents => { + if agents__.is_some() { + return Err(serde::de::Error::duplicate_field("agents")); + } + agents__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantName => { + if participant_name__.is_some() { + return Err(serde::de::Error::duplicate_field("participantName")); + } + participant_name__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantMetadata => { + if participant_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("participantMetadata")); + } + participant_metadata__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantAttributes => { + if participant_attributes__.is_some() { + return Err(serde::de::Error::duplicate_field("participantAttributes")); + } + participant_attributes__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::DestinationCountry => { + if destination_country__.is_some() { + return Err(serde::de::Error::duplicate_field("destinationCountry")); + } + destination_country__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(AcceptWhatsAppCallRequest { + whatsapp_phone_number_id: whatsapp_phone_number_id__.unwrap_or_default(), + whatsapp_api_key: whatsapp_api_key__.unwrap_or_default(), + whatsapp_cloud_api_version: whatsapp_cloud_api_version__.unwrap_or_default(), + whatsapp_call_id: whatsapp_call_id__.unwrap_or_default(), + whatsapp_biz_opaque_callback_data: whatsapp_biz_opaque_callback_data__.unwrap_or_default(), + sdp: sdp__, + room_name: room_name__.unwrap_or_default(), + agents: agents__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + participant_name: participant_name__.unwrap_or_default(), + participant_metadata: participant_metadata__.unwrap_or_default(), + participant_attributes: participant_attributes__.unwrap_or_default(), + destination_country: destination_country__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.AcceptWhatsAppCallRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for AcceptWhatsAppCallResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.room_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.AcceptWhatsAppCallResponse", len)?; + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AcceptWhatsAppCallResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "room_name", + "roomName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RoomName, + __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 { + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AcceptWhatsAppCallResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.AcceptWhatsAppCallResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut room_name__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::RoomName => { + if room_name__.is_some() { + return Err(serde::de::Error::duplicate_field("roomName")); + } + room_name__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(AcceptWhatsAppCallResponse { + room_name: room_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.AcceptWhatsAppCallResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for ActiveSpeakerUpdate { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -959,6 +1367,7 @@ impl serde::Serialize for AudioCodec { Self::DefaultAc => "DEFAULT_AC", Self::Opus => "OPUS", Self::Aac => "AAC", + Self::AcMp3 => "AC_MP3", }; serializer.serialize_str(variant) } @@ -973,6 +1382,7 @@ impl<'de> serde::Deserialize<'de> for AudioCodec { "DEFAULT_AC", "OPUS", "AAC", + "AC_MP3", ]; struct GeneratedVisitor; @@ -1016,6 +1426,7 @@ impl<'de> serde::Deserialize<'de> for AudioCodec { "DEFAULT_AC" => Ok(AudioCodec::DefaultAc), "OPUS" => Ok(AudioCodec::Opus), "AAC" => Ok(AudioCodec::Aac), + "AC_MP3" => Ok(AudioCodec::AcMp3), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -3050,6 +3461,583 @@ impl<'de> serde::Deserialize<'de> for Codec { deserializer.deserialize_struct("livekit.Codec", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for ConnectTwilioCallRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.twilio_call_direction != 0 { + len += 1; + } + if !self.room_name.is_empty() { + len += 1; + } + if !self.agents.is_empty() { + len += 1; + } + if !self.participant_identity.is_empty() { + len += 1; + } + if !self.participant_name.is_empty() { + len += 1; + } + if !self.participant_metadata.is_empty() { + len += 1; + } + if !self.participant_attributes.is_empty() { + len += 1; + } + if !self.destination_country.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ConnectTwilioCallRequest", len)?; + if self.twilio_call_direction != 0 { + let v = connect_twilio_call_request::TwilioCallDirection::try_from(self.twilio_call_direction) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.twilio_call_direction)))?; + struct_ser.serialize_field("twilioCallDirection", &v)?; + } + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + if !self.agents.is_empty() { + struct_ser.serialize_field("agents", &self.agents)?; + } + if !self.participant_identity.is_empty() { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if !self.participant_name.is_empty() { + struct_ser.serialize_field("participantName", &self.participant_name)?; + } + if !self.participant_metadata.is_empty() { + struct_ser.serialize_field("participantMetadata", &self.participant_metadata)?; + } + if !self.participant_attributes.is_empty() { + struct_ser.serialize_field("participantAttributes", &self.participant_attributes)?; + } + if !self.destination_country.is_empty() { + struct_ser.serialize_field("destinationCountry", &self.destination_country)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConnectTwilioCallRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "twilio_call_direction", + "twilioCallDirection", + "room_name", + "roomName", + "agents", + "participant_identity", + "participantIdentity", + "participant_name", + "participantName", + "participant_metadata", + "participantMetadata", + "participant_attributes", + "participantAttributes", + "destination_country", + "destinationCountry", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TwilioCallDirection, + RoomName, + Agents, + ParticipantIdentity, + ParticipantName, + ParticipantMetadata, + ParticipantAttributes, + DestinationCountry, + __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 { + "twilioCallDirection" | "twilio_call_direction" => Ok(GeneratedField::TwilioCallDirection), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + "agents" => Ok(GeneratedField::Agents), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "participantName" | "participant_name" => Ok(GeneratedField::ParticipantName), + "participantMetadata" | "participant_metadata" => Ok(GeneratedField::ParticipantMetadata), + "participantAttributes" | "participant_attributes" => Ok(GeneratedField::ParticipantAttributes), + "destinationCountry" | "destination_country" => Ok(GeneratedField::DestinationCountry), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConnectTwilioCallRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ConnectTwilioCallRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut twilio_call_direction__ = None; + let mut room_name__ = None; + let mut agents__ = None; + let mut participant_identity__ = None; + let mut participant_name__ = None; + let mut participant_metadata__ = None; + let mut participant_attributes__ = None; + let mut destination_country__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::TwilioCallDirection => { + if twilio_call_direction__.is_some() { + return Err(serde::de::Error::duplicate_field("twilioCallDirection")); + } + twilio_call_direction__ = Some(map_.next_value::()? as i32); + } + GeneratedField::RoomName => { + if room_name__.is_some() { + return Err(serde::de::Error::duplicate_field("roomName")); + } + room_name__ = Some(map_.next_value()?); + } + GeneratedField::Agents => { + if agents__.is_some() { + return Err(serde::de::Error::duplicate_field("agents")); + } + agents__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantName => { + if participant_name__.is_some() { + return Err(serde::de::Error::duplicate_field("participantName")); + } + participant_name__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantMetadata => { + if participant_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("participantMetadata")); + } + participant_metadata__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantAttributes => { + if participant_attributes__.is_some() { + return Err(serde::de::Error::duplicate_field("participantAttributes")); + } + participant_attributes__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::DestinationCountry => { + if destination_country__.is_some() { + return Err(serde::de::Error::duplicate_field("destinationCountry")); + } + destination_country__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ConnectTwilioCallRequest { + twilio_call_direction: twilio_call_direction__.unwrap_or_default(), + room_name: room_name__.unwrap_or_default(), + agents: agents__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + participant_name: participant_name__.unwrap_or_default(), + participant_metadata: participant_metadata__.unwrap_or_default(), + participant_attributes: participant_attributes__.unwrap_or_default(), + destination_country: destination_country__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.ConnectTwilioCallRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for connect_twilio_call_request::TwilioCallDirection { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Inbound => "TWILIO_CALL_DIRECTION_INBOUND", + Self::Outbound => "TWILIO_CALL_DIRECTION_OUTBOUND", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for connect_twilio_call_request::TwilioCallDirection { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "TWILIO_CALL_DIRECTION_INBOUND", + "TWILIO_CALL_DIRECTION_OUTBOUND", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = connect_twilio_call_request::TwilioCallDirection; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "TWILIO_CALL_DIRECTION_INBOUND" => Ok(connect_twilio_call_request::TwilioCallDirection::Inbound), + "TWILIO_CALL_DIRECTION_OUTBOUND" => Ok(connect_twilio_call_request::TwilioCallDirection::Outbound), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for ConnectTwilioCallResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.connect_url.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ConnectTwilioCallResponse", len)?; + if !self.connect_url.is_empty() { + struct_ser.serialize_field("connectUrl", &self.connect_url)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConnectTwilioCallResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "connect_url", + "connectUrl", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ConnectUrl, + __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 { + "connectUrl" | "connect_url" => Ok(GeneratedField::ConnectUrl), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConnectTwilioCallResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ConnectTwilioCallResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut connect_url__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ConnectUrl => { + if connect_url__.is_some() { + return Err(serde::de::Error::duplicate_field("connectUrl")); + } + connect_url__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ConnectTwilioCallResponse { + connect_url: connect_url__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.ConnectTwilioCallResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ConnectWhatsAppCallRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.whatsapp_call_id.is_empty() { + len += 1; + } + if self.sdp.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ConnectWhatsAppCallRequest", len)?; + if !self.whatsapp_call_id.is_empty() { + struct_ser.serialize_field("whatsappCallId", &self.whatsapp_call_id)?; + } + if let Some(v) = self.sdp.as_ref() { + struct_ser.serialize_field("sdp", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConnectWhatsAppCallRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "whatsapp_call_id", + "whatsappCallId", + "sdp", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WhatsappCallId, + Sdp, + __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 { + "whatsappCallId" | "whatsapp_call_id" => Ok(GeneratedField::WhatsappCallId), + "sdp" => Ok(GeneratedField::Sdp), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConnectWhatsAppCallRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ConnectWhatsAppCallRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut whatsapp_call_id__ = None; + let mut sdp__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::WhatsappCallId => { + if whatsapp_call_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCallId")); + } + whatsapp_call_id__ = Some(map_.next_value()?); + } + GeneratedField::Sdp => { + if sdp__.is_some() { + return Err(serde::de::Error::duplicate_field("sdp")); + } + sdp__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(ConnectWhatsAppCallRequest { + whatsapp_call_id: whatsapp_call_id__.unwrap_or_default(), + sdp: sdp__, + }) + } + } + deserializer.deserialize_struct("livekit.ConnectWhatsAppCallRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ConnectWhatsAppCallResponse { + #[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.ConnectWhatsAppCallResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConnectWhatsAppCallResponse { + #[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 = ConnectWhatsAppCallResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.ConnectWhatsAppCallResponse") + } + + 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(ConnectWhatsAppCallResponse { + }) + } + } + deserializer.deserialize_struct("livekit.ConnectWhatsAppCallResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for ConnectionQuality { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -3506,6 +4494,80 @@ impl<'de> serde::Deserialize<'de> for ConnectionSettings { deserializer.deserialize_struct("livekit.ConnectionSettings", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for ConnectorType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unspecified => "Unspecified", + Self::WhatsApp => "WhatsApp", + Self::Twilio => "Twilio", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for ConnectorType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "Unspecified", + "WhatsApp", + "Twilio", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConnectorType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "Unspecified" => Ok(ConnectorType::Unspecified), + "WhatsApp" => Ok(ConnectorType::WhatsApp), + "Twilio" => Ok(ConnectorType::Twilio), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} impl serde::Serialize for CreateAgentDispatchRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4759,6 +5821,12 @@ impl serde::Serialize for CreateSipParticipantRequest { if self.wait_until_answered { len += 1; } + if self.display_name.is_some() { + len += 1; + } + if self.destination.is_some() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.CreateSIPParticipantRequest", len)?; if !self.sip_trunk_id.is_empty() { struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; @@ -4824,6 +5892,12 @@ impl serde::Serialize for CreateSipParticipantRequest { if self.wait_until_answered { struct_ser.serialize_field("waitUntilAnswered", &self.wait_until_answered)?; } + if let Some(v) = self.display_name.as_ref() { + struct_ser.serialize_field("displayName", v)?; + } + if let Some(v) = self.destination.as_ref() { + struct_ser.serialize_field("destination", v)?; + } struct_ser.end() } } @@ -4871,6 +5945,9 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { "mediaEncryption", "wait_until_answered", "waitUntilAnswered", + "display_name", + "displayName", + "destination", ]; #[allow(clippy::enum_variant_names)] @@ -4895,6 +5972,8 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { KrispEnabled, MediaEncryption, WaitUntilAnswered, + DisplayName, + Destination, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4937,6 +6016,8 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { "krispEnabled" | "krisp_enabled" => Ok(GeneratedField::KrispEnabled), "mediaEncryption" | "media_encryption" => Ok(GeneratedField::MediaEncryption), "waitUntilAnswered" | "wait_until_answered" => Ok(GeneratedField::WaitUntilAnswered), + "displayName" | "display_name" => Ok(GeneratedField::DisplayName), + "destination" => Ok(GeneratedField::Destination), _ => Ok(GeneratedField::__SkipField__), } } @@ -4976,6 +6057,8 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { let mut krisp_enabled__ = None; let mut media_encryption__ = None; let mut wait_until_answered__ = None; + let mut display_name__ = None; + let mut destination__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SipTrunkId => { @@ -5102,6 +6185,18 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { } wait_until_answered__ = Some(map_.next_value()?); } + GeneratedField::DisplayName => { + if display_name__.is_some() { + return Err(serde::de::Error::duplicate_field("displayName")); + } + display_name__ = map_.next_value()?; + } + GeneratedField::Destination => { + if destination__.is_some() { + return Err(serde::de::Error::duplicate_field("destination")); + } + destination__ = map_.next_value()?; + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -5128,6 +6223,8 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { krisp_enabled: krisp_enabled__.unwrap_or_default(), media_encryption: media_encryption__.unwrap_or_default(), wait_until_answered: wait_until_answered__.unwrap_or_default(), + display_name: display_name__, + destination: destination__, }) } } @@ -7266,10 +8363,273 @@ impl<'de> serde::Deserialize<'de> for DeleteIngressRequest { }) } } - deserializer.deserialize_struct("livekit.DeleteIngressRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteIngressRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DeleteRoomRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.room.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DeleteRoomRequest", len)?; + if !self.room.is_empty() { + struct_ser.serialize_field("room", &self.room)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "room", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Room, + __SkipField__, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "room" => Ok(GeneratedField::Room), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DeleteRoomRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.DeleteRoomRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut room__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); + } + room__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(DeleteRoomRequest { + room: room__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.DeleteRoomRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DeleteRoomResponse { + #[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.DeleteRoomResponse", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DeleteRoomResponse { + #[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 = DeleteRoomResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.DeleteRoomResponse") + } + + 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(DeleteRoomResponse { + }) + } + } + deserializer.deserialize_struct("livekit.DeleteRoomResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DeleteSipDispatchRuleRequest { + #[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_dispatch_rule_id.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DeleteSIPDispatchRuleRequest", len)?; + if !self.sip_dispatch_rule_id.is_empty() { + struct_ser.serialize_field("sipDispatchRuleId", &self.sip_dispatch_rule_id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DeleteSipDispatchRuleRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sip_dispatch_rule_id", + "sipDispatchRuleId", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SipDispatchRuleId, + __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 { + "sipDispatchRuleId" | "sip_dispatch_rule_id" => Ok(GeneratedField::SipDispatchRuleId), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DeleteSipDispatchRuleRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.DeleteSIPDispatchRuleRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sip_dispatch_rule_id__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::SipDispatchRuleId => { + if sip_dispatch_rule_id__.is_some() { + return Err(serde::de::Error::duplicate_field("sipDispatchRuleId")); + } + sip_dispatch_rule_id__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(DeleteSipDispatchRuleRequest { + sip_dispatch_rule_id: sip_dispatch_rule_id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.DeleteSIPDispatchRuleRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteRoomRequest { +impl serde::Serialize for DeleteSipTrunkRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7277,29 +8637,30 @@ impl serde::Serialize for DeleteRoomRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.room.is_empty() { + if !self.sip_trunk_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DeleteRoomRequest", len)?; - if !self.room.is_empty() { - struct_ser.serialize_field("room", &self.room)?; + let mut struct_ser = serializer.serialize_struct("livekit.DeleteSIPTrunkRequest", 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 DeleteRoomRequest { +impl<'de> serde::Deserialize<'de> for DeleteSipTrunkRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "room", + "sip_trunk_id", + "sipTrunkId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Room, + SipTrunkId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7322,7 +8683,7 @@ impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { E: serde::de::Error, { match value { - "room" => Ok(GeneratedField::Room), + "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), _ => Ok(GeneratedField::__SkipField__), } } @@ -7332,61 +8693,85 @@ impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteRoomRequest; + type Value = DeleteSipTrunkRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteRoomRequest") + formatter.write_str("struct livekit.DeleteSIPTrunkRequest") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut room__ = None; + let mut sip_trunk_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Room => { - if room__.is_some() { - return Err(serde::de::Error::duplicate_field("room")); + GeneratedField::SipTrunkId => { + if sip_trunk_id__.is_some() { + return Err(serde::de::Error::duplicate_field("sipTrunkId")); } - room__ = Some(map_.next_value()?); + sip_trunk_id__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(DeleteRoomRequest { - room: room__.unwrap_or_default(), + Ok(DeleteSipTrunkRequest { + sip_trunk_id: sip_trunk_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DeleteRoomRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteSIPTrunkRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteRoomResponse { +impl serde::Serialize for Destination { #[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.DeleteRoomResponse", len)?; + let mut len = 0; + if !self.city.is_empty() { + len += 1; + } + if !self.country.is_empty() { + len += 1; + } + if !self.region.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.Destination", len)?; + if !self.city.is_empty() { + struct_ser.serialize_field("city", &self.city)?; + } + if !self.country.is_empty() { + struct_ser.serialize_field("country", &self.country)?; + } + if !self.region.is_empty() { + struct_ser.serialize_field("region", &self.region)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DeleteRoomResponse { +impl<'de> serde::Deserialize<'de> for Destination { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "city", + "country", + "region", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + City, + Country, + Region, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7408,7 +8793,12 @@ impl<'de> serde::Deserialize<'de> for DeleteRoomResponse { where E: serde::de::Error, { - Ok(GeneratedField::__SkipField__) + match value { + "city" => Ok(GeneratedField::City), + "country" => Ok(GeneratedField::Country), + "region" => Ok(GeneratedField::Region), + _ => Ok(GeneratedField::__SkipField__), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -7416,27 +8806,55 @@ impl<'de> serde::Deserialize<'de> for DeleteRoomResponse { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteRoomResponse; + type Value = Destination; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteRoomResponse") + formatter.write_str("struct livekit.Destination") } - 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 city__ = None; + let mut country__ = None; + let mut region__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::City => { + if city__.is_some() { + return Err(serde::de::Error::duplicate_field("city")); + } + city__ = Some(map_.next_value()?); + } + GeneratedField::Country => { + if country__.is_some() { + return Err(serde::de::Error::duplicate_field("country")); + } + country__ = Some(map_.next_value()?); + } + GeneratedField::Region => { + if region__.is_some() { + return Err(serde::de::Error::duplicate_field("region")); + } + region__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } } - Ok(DeleteRoomResponse { + Ok(Destination { + city: city__.unwrap_or_default(), + country: country__.unwrap_or_default(), + region: region__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DeleteRoomResponse", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.Destination", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteSipDispatchRuleRequest { +impl serde::Serialize for DialWhatsAppCallRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7444,30 +8862,128 @@ impl serde::Serialize for DeleteSipDispatchRuleRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sip_dispatch_rule_id.is_empty() { + if !self.whatsapp_phone_number_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DeleteSIPDispatchRuleRequest", len)?; - if !self.sip_dispatch_rule_id.is_empty() { - struct_ser.serialize_field("sipDispatchRuleId", &self.sip_dispatch_rule_id)?; + if !self.whatsapp_to_phone_number.is_empty() { + len += 1; + } + if !self.whatsapp_api_key.is_empty() { + len += 1; + } + if !self.whatsapp_cloud_api_version.is_empty() { + len += 1; + } + if !self.whatsapp_biz_opaque_callback_data.is_empty() { + len += 1; + } + if !self.room_name.is_empty() { + len += 1; + } + if !self.agents.is_empty() { + len += 1; + } + if !self.participant_identity.is_empty() { + len += 1; + } + if !self.participant_name.is_empty() { + len += 1; + } + if !self.participant_metadata.is_empty() { + len += 1; + } + if !self.participant_attributes.is_empty() { + len += 1; + } + if !self.destination_country.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DialWhatsAppCallRequest", len)?; + if !self.whatsapp_phone_number_id.is_empty() { + struct_ser.serialize_field("whatsappPhoneNumberId", &self.whatsapp_phone_number_id)?; + } + if !self.whatsapp_to_phone_number.is_empty() { + struct_ser.serialize_field("whatsappToPhoneNumber", &self.whatsapp_to_phone_number)?; + } + if !self.whatsapp_api_key.is_empty() { + struct_ser.serialize_field("whatsappApiKey", &self.whatsapp_api_key)?; + } + if !self.whatsapp_cloud_api_version.is_empty() { + struct_ser.serialize_field("whatsappCloudApiVersion", &self.whatsapp_cloud_api_version)?; + } + if !self.whatsapp_biz_opaque_callback_data.is_empty() { + struct_ser.serialize_field("whatsappBizOpaqueCallbackData", &self.whatsapp_biz_opaque_callback_data)?; + } + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; + } + if !self.agents.is_empty() { + struct_ser.serialize_field("agents", &self.agents)?; + } + if !self.participant_identity.is_empty() { + struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + } + if !self.participant_name.is_empty() { + struct_ser.serialize_field("participantName", &self.participant_name)?; + } + if !self.participant_metadata.is_empty() { + struct_ser.serialize_field("participantMetadata", &self.participant_metadata)?; + } + if !self.participant_attributes.is_empty() { + struct_ser.serialize_field("participantAttributes", &self.participant_attributes)?; + } + if !self.destination_country.is_empty() { + struct_ser.serialize_field("destinationCountry", &self.destination_country)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DeleteSipDispatchRuleRequest { +impl<'de> serde::Deserialize<'de> for DialWhatsAppCallRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sip_dispatch_rule_id", - "sipDispatchRuleId", + "whatsapp_phone_number_id", + "whatsappPhoneNumberId", + "whatsapp_to_phone_number", + "whatsappToPhoneNumber", + "whatsapp_api_key", + "whatsappApiKey", + "whatsapp_cloud_api_version", + "whatsappCloudApiVersion", + "whatsapp_biz_opaque_callback_data", + "whatsappBizOpaqueCallbackData", + "room_name", + "roomName", + "agents", + "participant_identity", + "participantIdentity", + "participant_name", + "participantName", + "participant_metadata", + "participantMetadata", + "participant_attributes", + "participantAttributes", + "destination_country", + "destinationCountry", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - SipDispatchRuleId, + WhatsappPhoneNumberId, + WhatsappToPhoneNumber, + WhatsappApiKey, + WhatsappCloudApiVersion, + WhatsappBizOpaqueCallbackData, + RoomName, + Agents, + ParticipantIdentity, + ParticipantName, + ParticipantMetadata, + ParticipantAttributes, + DestinationCountry, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7490,7 +9006,18 @@ impl<'de> serde::Deserialize<'de> for DeleteSipDispatchRuleRequest { E: serde::de::Error, { match value { - "sipDispatchRuleId" | "sip_dispatch_rule_id" => Ok(GeneratedField::SipDispatchRuleId), + "whatsappPhoneNumberId" | "whatsapp_phone_number_id" => Ok(GeneratedField::WhatsappPhoneNumberId), + "whatsappToPhoneNumber" | "whatsapp_to_phone_number" => Ok(GeneratedField::WhatsappToPhoneNumber), + "whatsappApiKey" | "whatsapp_api_key" => Ok(GeneratedField::WhatsappApiKey), + "whatsappCloudApiVersion" | "whatsapp_cloud_api_version" => Ok(GeneratedField::WhatsappCloudApiVersion), + "whatsappBizOpaqueCallbackData" | "whatsapp_biz_opaque_callback_data" => Ok(GeneratedField::WhatsappBizOpaqueCallbackData), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), + "agents" => Ok(GeneratedField::Agents), + "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), + "participantName" | "participant_name" => Ok(GeneratedField::ParticipantName), + "participantMetadata" | "participant_metadata" => Ok(GeneratedField::ParticipantMetadata), + "participantAttributes" | "participant_attributes" => Ok(GeneratedField::ParticipantAttributes), + "destinationCountry" | "destination_country" => Ok(GeneratedField::DestinationCountry), _ => Ok(GeneratedField::__SkipField__), } } @@ -7500,39 +9027,129 @@ impl<'de> serde::Deserialize<'de> for DeleteSipDispatchRuleRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteSipDispatchRuleRequest; + type Value = DialWhatsAppCallRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteSIPDispatchRuleRequest") + formatter.write_str("struct livekit.DialWhatsAppCallRequest") } - 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 sip_dispatch_rule_id__ = None; + let mut whatsapp_phone_number_id__ = None; + let mut whatsapp_to_phone_number__ = None; + let mut whatsapp_api_key__ = None; + let mut whatsapp_cloud_api_version__ = None; + let mut whatsapp_biz_opaque_callback_data__ = None; + let mut room_name__ = None; + let mut agents__ = None; + let mut participant_identity__ = None; + let mut participant_name__ = None; + let mut participant_metadata__ = None; + let mut participant_attributes__ = None; + let mut destination_country__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::SipDispatchRuleId => { - if sip_dispatch_rule_id__.is_some() { - return Err(serde::de::Error::duplicate_field("sipDispatchRuleId")); + GeneratedField::WhatsappPhoneNumberId => { + if whatsapp_phone_number_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappPhoneNumberId")); } - sip_dispatch_rule_id__ = Some(map_.next_value()?); + whatsapp_phone_number_id__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappToPhoneNumber => { + if whatsapp_to_phone_number__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappToPhoneNumber")); + } + whatsapp_to_phone_number__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappApiKey => { + if whatsapp_api_key__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappApiKey")); + } + whatsapp_api_key__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappCloudApiVersion => { + if whatsapp_cloud_api_version__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCloudApiVersion")); + } + whatsapp_cloud_api_version__ = Some(map_.next_value()?); + } + GeneratedField::WhatsappBizOpaqueCallbackData => { + if whatsapp_biz_opaque_callback_data__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappBizOpaqueCallbackData")); + } + whatsapp_biz_opaque_callback_data__ = 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::Agents => { + if agents__.is_some() { + return Err(serde::de::Error::duplicate_field("agents")); + } + agents__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantIdentity => { + if participant_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("participantIdentity")); + } + participant_identity__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantName => { + if participant_name__.is_some() { + return Err(serde::de::Error::duplicate_field("participantName")); + } + participant_name__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantMetadata => { + if participant_metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("participantMetadata")); + } + participant_metadata__ = Some(map_.next_value()?); + } + GeneratedField::ParticipantAttributes => { + if participant_attributes__.is_some() { + return Err(serde::de::Error::duplicate_field("participantAttributes")); + } + participant_attributes__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::DestinationCountry => { + if destination_country__.is_some() { + return Err(serde::de::Error::duplicate_field("destinationCountry")); + } + destination_country__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(DeleteSipDispatchRuleRequest { - sip_dispatch_rule_id: sip_dispatch_rule_id__.unwrap_or_default(), + Ok(DialWhatsAppCallRequest { + whatsapp_phone_number_id: whatsapp_phone_number_id__.unwrap_or_default(), + whatsapp_to_phone_number: whatsapp_to_phone_number__.unwrap_or_default(), + whatsapp_api_key: whatsapp_api_key__.unwrap_or_default(), + whatsapp_cloud_api_version: whatsapp_cloud_api_version__.unwrap_or_default(), + whatsapp_biz_opaque_callback_data: whatsapp_biz_opaque_callback_data__.unwrap_or_default(), + room_name: room_name__.unwrap_or_default(), + agents: agents__.unwrap_or_default(), + participant_identity: participant_identity__.unwrap_or_default(), + participant_name: participant_name__.unwrap_or_default(), + participant_metadata: participant_metadata__.unwrap_or_default(), + participant_attributes: participant_attributes__.unwrap_or_default(), + destination_country: destination_country__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DeleteSIPDispatchRuleRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DialWhatsAppCallRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteSipTrunkRequest { +impl serde::Serialize for DialWhatsAppCallResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -7540,30 +9157,39 @@ impl serde::Serialize for DeleteSipTrunkRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sip_trunk_id.is_empty() { + if !self.whatsapp_call_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DeleteSIPTrunkRequest", len)?; - if !self.sip_trunk_id.is_empty() { - struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; + if !self.room_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DialWhatsAppCallResponse", len)?; + if !self.whatsapp_call_id.is_empty() { + struct_ser.serialize_field("whatsappCallId", &self.whatsapp_call_id)?; + } + if !self.room_name.is_empty() { + struct_ser.serialize_field("roomName", &self.room_name)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DeleteSipTrunkRequest { +impl<'de> serde::Deserialize<'de> for DialWhatsAppCallResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sip_trunk_id", - "sipTrunkId", + "whatsapp_call_id", + "whatsappCallId", + "room_name", + "roomName", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - SipTrunkId, + WhatsappCallId, + RoomName, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -7586,7 +9212,8 @@ impl<'de> serde::Deserialize<'de> for DeleteSipTrunkRequest { E: serde::de::Error, { match value { - "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), + "whatsappCallId" | "whatsapp_call_id" => Ok(GeneratedField::WhatsappCallId), + "roomName" | "room_name" => Ok(GeneratedField::RoomName), _ => Ok(GeneratedField::__SkipField__), } } @@ -7596,36 +9223,44 @@ impl<'de> serde::Deserialize<'de> for DeleteSipTrunkRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteSipTrunkRequest; + type Value = DialWhatsAppCallResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteSIPTrunkRequest") + formatter.write_str("struct livekit.DialWhatsAppCallResponse") } - 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 sip_trunk_id__ = None; + let mut whatsapp_call_id__ = None; + let mut room_name__ = 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")); + GeneratedField::WhatsappCallId => { + if whatsapp_call_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCallId")); } - sip_trunk_id__ = Some(map_.next_value()?); + whatsapp_call_id__ = 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::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(DeleteSipTrunkRequest { - sip_trunk_id: sip_trunk_id__.unwrap_or_default(), + Ok(DialWhatsAppCallResponse { + whatsapp_call_id: whatsapp_call_id__.unwrap_or_default(), + room_name: room_name__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DeleteSIPTrunkRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DialWhatsAppCallResponse", FIELDS, GeneratedVisitor) } } impl serde::Serialize for DirectFileOutput { @@ -7863,8 +9498,235 @@ impl<'de> serde::Deserialize<'de> for DisabledCodecs { E: serde::de::Error, { match value { - "codecs" => Ok(GeneratedField::Codecs), - "publish" => Ok(GeneratedField::Publish), + "codecs" => Ok(GeneratedField::Codecs), + "publish" => Ok(GeneratedField::Publish), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DisabledCodecs; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.DisabledCodecs") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut codecs__ = None; + let mut publish__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Codecs => { + if codecs__.is_some() { + return Err(serde::de::Error::duplicate_field("codecs")); + } + codecs__ = Some(map_.next_value()?); + } + GeneratedField::Publish => { + if publish__.is_some() { + return Err(serde::de::Error::duplicate_field("publish")); + } + publish__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(DisabledCodecs { + codecs: codecs__.unwrap_or_default(), + publish: publish__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.DisabledCodecs", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for DisconnectReason { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::UnknownReason => "UNKNOWN_REASON", + Self::ClientInitiated => "CLIENT_INITIATED", + Self::DuplicateIdentity => "DUPLICATE_IDENTITY", + Self::ServerShutdown => "SERVER_SHUTDOWN", + Self::ParticipantRemoved => "PARTICIPANT_REMOVED", + Self::RoomDeleted => "ROOM_DELETED", + Self::StateMismatch => "STATE_MISMATCH", + Self::JoinFailure => "JOIN_FAILURE", + Self::Migration => "MIGRATION", + Self::SignalClose => "SIGNAL_CLOSE", + Self::RoomClosed => "ROOM_CLOSED", + Self::UserUnavailable => "USER_UNAVAILABLE", + Self::UserRejected => "USER_REJECTED", + Self::SipTrunkFailure => "SIP_TRUNK_FAILURE", + Self::ConnectionTimeout => "CONNECTION_TIMEOUT", + Self::MediaFailure => "MEDIA_FAILURE", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for DisconnectReason { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "UNKNOWN_REASON", + "CLIENT_INITIATED", + "DUPLICATE_IDENTITY", + "SERVER_SHUTDOWN", + "PARTICIPANT_REMOVED", + "ROOM_DELETED", + "STATE_MISMATCH", + "JOIN_FAILURE", + "MIGRATION", + "SIGNAL_CLOSE", + "ROOM_CLOSED", + "USER_UNAVAILABLE", + "USER_REJECTED", + "SIP_TRUNK_FAILURE", + "CONNECTION_TIMEOUT", + "MEDIA_FAILURE", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DisconnectReason; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "UNKNOWN_REASON" => Ok(DisconnectReason::UnknownReason), + "CLIENT_INITIATED" => Ok(DisconnectReason::ClientInitiated), + "DUPLICATE_IDENTITY" => Ok(DisconnectReason::DuplicateIdentity), + "SERVER_SHUTDOWN" => Ok(DisconnectReason::ServerShutdown), + "PARTICIPANT_REMOVED" => Ok(DisconnectReason::ParticipantRemoved), + "ROOM_DELETED" => Ok(DisconnectReason::RoomDeleted), + "STATE_MISMATCH" => Ok(DisconnectReason::StateMismatch), + "JOIN_FAILURE" => Ok(DisconnectReason::JoinFailure), + "MIGRATION" => Ok(DisconnectReason::Migration), + "SIGNAL_CLOSE" => Ok(DisconnectReason::SignalClose), + "ROOM_CLOSED" => Ok(DisconnectReason::RoomClosed), + "USER_UNAVAILABLE" => Ok(DisconnectReason::UserUnavailable), + "USER_REJECTED" => Ok(DisconnectReason::UserRejected), + "SIP_TRUNK_FAILURE" => Ok(DisconnectReason::SipTrunkFailure), + "CONNECTION_TIMEOUT" => Ok(DisconnectReason::ConnectionTimeout), + "MEDIA_FAILURE" => Ok(DisconnectReason::MediaFailure), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for DisconnectWhatsAppCallRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.whatsapp_call_id.is_empty() { + len += 1; + } + if !self.whatsapp_api_key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DisconnectWhatsAppCallRequest", len)?; + if !self.whatsapp_call_id.is_empty() { + struct_ser.serialize_field("whatsappCallId", &self.whatsapp_call_id)?; + } + if !self.whatsapp_api_key.is_empty() { + struct_ser.serialize_field("whatsappApiKey", &self.whatsapp_api_key)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for DisconnectWhatsAppCallRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "whatsapp_call_id", + "whatsappCallId", + "whatsapp_api_key", + "whatsappApiKey", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WhatsappCallId, + WhatsappApiKey, + __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 { + "whatsappCallId" | "whatsapp_call_id" => Ok(GeneratedField::WhatsappCallId), + "whatsappApiKey" | "whatsapp_api_key" => Ok(GeneratedField::WhatsappApiKey), _ => Ok(GeneratedField::__SkipField__), } } @@ -7874,157 +9736,116 @@ impl<'de> serde::Deserialize<'de> for DisabledCodecs { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DisabledCodecs; + type Value = DisconnectWhatsAppCallRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DisabledCodecs") + formatter.write_str("struct livekit.DisconnectWhatsAppCallRequest") } - 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 codecs__ = None; - let mut publish__ = None; + let mut whatsapp_call_id__ = None; + let mut whatsapp_api_key__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Codecs => { - if codecs__.is_some() { - return Err(serde::de::Error::duplicate_field("codecs")); + GeneratedField::WhatsappCallId => { + if whatsapp_call_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCallId")); } - codecs__ = Some(map_.next_value()?); + whatsapp_call_id__ = Some(map_.next_value()?); } - GeneratedField::Publish => { - if publish__.is_some() { - return Err(serde::de::Error::duplicate_field("publish")); + GeneratedField::WhatsappApiKey => { + if whatsapp_api_key__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappApiKey")); } - publish__ = Some(map_.next_value()?); + whatsapp_api_key__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(DisabledCodecs { - codecs: codecs__.unwrap_or_default(), - publish: publish__.unwrap_or_default(), + Ok(DisconnectWhatsAppCallRequest { + whatsapp_call_id: whatsapp_call_id__.unwrap_or_default(), + whatsapp_api_key: whatsapp_api_key__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DisabledCodecs", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DisconnectWhatsAppCallRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DisconnectReason { +impl serde::Serialize for DisconnectWhatsAppCallResponse { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { - let variant = match self { - Self::UnknownReason => "UNKNOWN_REASON", - Self::ClientInitiated => "CLIENT_INITIATED", - Self::DuplicateIdentity => "DUPLICATE_IDENTITY", - Self::ServerShutdown => "SERVER_SHUTDOWN", - Self::ParticipantRemoved => "PARTICIPANT_REMOVED", - Self::RoomDeleted => "ROOM_DELETED", - Self::StateMismatch => "STATE_MISMATCH", - Self::JoinFailure => "JOIN_FAILURE", - Self::Migration => "MIGRATION", - Self::SignalClose => "SIGNAL_CLOSE", - Self::RoomClosed => "ROOM_CLOSED", - Self::UserUnavailable => "USER_UNAVAILABLE", - Self::UserRejected => "USER_REJECTED", - Self::SipTrunkFailure => "SIP_TRUNK_FAILURE", - Self::ConnectionTimeout => "CONNECTION_TIMEOUT", - Self::MediaFailure => "MEDIA_FAILURE", - }; - serializer.serialize_str(variant) + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("livekit.DisconnectWhatsAppCallResponse", len)?; + struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DisconnectReason { +impl<'de> serde::Deserialize<'de> for DisconnectWhatsAppCallResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "UNKNOWN_REASON", - "CLIENT_INITIATED", - "DUPLICATE_IDENTITY", - "SERVER_SHUTDOWN", - "PARTICIPANT_REMOVED", - "ROOM_DELETED", - "STATE_MISMATCH", - "JOIN_FAILURE", - "MIGRATION", - "SIGNAL_CLOSE", - "ROOM_CLOSED", - "USER_UNAVAILABLE", - "USER_REJECTED", - "SIP_TRUNK_FAILURE", - "CONNECTION_TIMEOUT", - "MEDIA_FAILURE", ]; - struct GeneratedVisitor; + #[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 = DisconnectReason; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + Ok(GeneratedField::__SkipField__) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = DisconnectWhatsAppCallResponse; - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - i32::try_from(v) - .ok() - .and_then(|x| x.try_into().ok()) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.DisconnectWhatsAppCallResponse") } - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, { - match value { - "UNKNOWN_REASON" => Ok(DisconnectReason::UnknownReason), - "CLIENT_INITIATED" => Ok(DisconnectReason::ClientInitiated), - "DUPLICATE_IDENTITY" => Ok(DisconnectReason::DuplicateIdentity), - "SERVER_SHUTDOWN" => Ok(DisconnectReason::ServerShutdown), - "PARTICIPANT_REMOVED" => Ok(DisconnectReason::ParticipantRemoved), - "ROOM_DELETED" => Ok(DisconnectReason::RoomDeleted), - "STATE_MISMATCH" => Ok(DisconnectReason::StateMismatch), - "JOIN_FAILURE" => Ok(DisconnectReason::JoinFailure), - "MIGRATION" => Ok(DisconnectReason::Migration), - "SIGNAL_CLOSE" => Ok(DisconnectReason::SignalClose), - "ROOM_CLOSED" => Ok(DisconnectReason::RoomClosed), - "USER_UNAVAILABLE" => Ok(DisconnectReason::UserUnavailable), - "USER_REJECTED" => Ok(DisconnectReason::UserRejected), - "SIP_TRUNK_FAILURE" => Ok(DisconnectReason::SipTrunkFailure), - "CONNECTION_TIMEOUT" => Ok(DisconnectReason::ConnectionTimeout), - "MEDIA_FAILURE" => Ok(DisconnectReason::MediaFailure), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } + Ok(DisconnectWhatsAppCallResponse { + }) } } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.DisconnectWhatsAppCallResponse", FIELDS, GeneratedVisitor) } } impl serde::Serialize for EgressInfo { @@ -8911,6 +10732,7 @@ impl serde::Serialize for EncodedFileType { Self::DefaultFiletype => "DEFAULT_FILETYPE", Self::Mp4 => "MP4", Self::Ogg => "OGG", + Self::Mp3 => "MP3", }; serializer.serialize_str(variant) } @@ -8925,6 +10747,7 @@ impl<'de> serde::Deserialize<'de> for EncodedFileType { "DEFAULT_FILETYPE", "MP4", "OGG", + "MP3", ]; struct GeneratedVisitor; @@ -8968,6 +10791,7 @@ impl<'de> serde::Deserialize<'de> for EncodedFileType { "DEFAULT_FILETYPE" => Ok(EncodedFileType::DefaultFiletype), "MP4" => Ok(EncodedFileType::Mp4), "OGG" => Ok(EncodedFileType::Ogg), + "MP3" => Ok(EncodedFileType::Mp3), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -10334,6 +12158,120 @@ impl<'de> serde::Deserialize<'de> for FileInfo { deserializer.deserialize_struct("livekit.FileInfo", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for FilterParams { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.include_events.is_empty() { + len += 1; + } + if !self.exclude_events.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.FilterParams", len)?; + if !self.include_events.is_empty() { + struct_ser.serialize_field("includeEvents", &self.include_events)?; + } + if !self.exclude_events.is_empty() { + struct_ser.serialize_field("excludeEvents", &self.exclude_events)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for FilterParams { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "include_events", + "includeEvents", + "exclude_events", + "excludeEvents", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + IncludeEvents, + ExcludeEvents, + __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 { + "includeEvents" | "include_events" => Ok(GeneratedField::IncludeEvents), + "excludeEvents" | "exclude_events" => Ok(GeneratedField::ExcludeEvents), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = FilterParams; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.FilterParams") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut include_events__ = None; + let mut exclude_events__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::IncludeEvents => { + if include_events__.is_some() { + return Err(serde::de::Error::duplicate_field("includeEvents")); + } + include_events__ = Some(map_.next_value()?); + } + GeneratedField::ExcludeEvents => { + if exclude_events__.is_some() { + return Err(serde::de::Error::duplicate_field("excludeEvents")); + } + exclude_events__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(FilterParams { + include_events: include_events__.unwrap_or_default(), + exclude_events: exclude_events__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.FilterParams", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for ForwardParticipantRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -13656,6 +15594,9 @@ impl serde::Serialize for Job { if self.state.is_some() { len += 1; } + if self.enable_recording { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.Job", len)?; if !self.id.is_empty() { struct_ser.serialize_field("id", &self.id)?; @@ -13686,6 +15627,9 @@ impl serde::Serialize for Job { if let Some(v) = self.state.as_ref() { struct_ser.serialize_field("state", v)?; } + if self.enable_recording { + struct_ser.serialize_field("enableRecording", &self.enable_recording)?; + } struct_ser.end() } } @@ -13707,6 +15651,8 @@ impl<'de> serde::Deserialize<'de> for Job { "agent_name", "agentName", "state", + "enable_recording", + "enableRecording", ]; #[allow(clippy::enum_variant_names)] @@ -13720,6 +15666,7 @@ impl<'de> serde::Deserialize<'de> for Job { Metadata, AgentName, State, + EnableRecording, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -13751,6 +15698,7 @@ impl<'de> serde::Deserialize<'de> for Job { "metadata" => Ok(GeneratedField::Metadata), "agentName" | "agent_name" => Ok(GeneratedField::AgentName), "state" => Ok(GeneratedField::State), + "enableRecording" | "enable_recording" => Ok(GeneratedField::EnableRecording), _ => Ok(GeneratedField::__SkipField__), } } @@ -13779,6 +15727,7 @@ impl<'de> serde::Deserialize<'de> for Job { let mut metadata__ = None; let mut agent_name__ = None; let mut state__ = None; + let mut enable_recording__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { @@ -13835,6 +15784,12 @@ impl<'de> serde::Deserialize<'de> for Job { } state__ = map_.next_value()?; } + GeneratedField::EnableRecording => { + if enable_recording__.is_some() { + return Err(serde::de::Error::duplicate_field("enableRecording")); + } + enable_recording__ = Some(map_.next_value()?); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -13850,6 +15805,7 @@ impl<'de> serde::Deserialize<'de> for Job { metadata: metadata__.unwrap_or_default(), agent_name: agent_name__.unwrap_or_default(), state: state__, + enable_recording: enable_recording__.unwrap_or_default(), }) } } @@ -17209,7 +19165,7 @@ impl serde::Serialize for ListUpdate { if !self.add.is_empty() { len += 1; } - if !self.del.is_empty() { + if !self.remove.is_empty() { len += 1; } if self.clear { @@ -17222,8 +19178,8 @@ impl serde::Serialize for ListUpdate { if !self.add.is_empty() { struct_ser.serialize_field("add", &self.add)?; } - if !self.del.is_empty() { - struct_ser.serialize_field("del", &self.del)?; + if !self.remove.is_empty() { + struct_ser.serialize_field("remove", &self.remove)?; } if self.clear { struct_ser.serialize_field("clear", &self.clear)?; @@ -17240,7 +19196,7 @@ impl<'de> serde::Deserialize<'de> for ListUpdate { const FIELDS: &[&str] = &[ "set", "add", - "del", + "remove", "clear", ]; @@ -17248,7 +19204,7 @@ impl<'de> serde::Deserialize<'de> for ListUpdate { enum GeneratedField { Set, Add, - Del, + Remove, Clear, __SkipField__, } @@ -17274,7 +19230,7 @@ impl<'de> serde::Deserialize<'de> for ListUpdate { match value { "set" => Ok(GeneratedField::Set), "add" => Ok(GeneratedField::Add), - "del" => Ok(GeneratedField::Del), + "remove" => Ok(GeneratedField::Remove), "clear" => Ok(GeneratedField::Clear), _ => Ok(GeneratedField::__SkipField__), } @@ -17297,7 +19253,7 @@ impl<'de> serde::Deserialize<'de> for ListUpdate { { let mut set__ = None; let mut add__ = None; - let mut del__ = None; + let mut remove__ = None; let mut clear__ = None; while let Some(k) = map_.next_key()? { match k { @@ -17313,11 +19269,11 @@ impl<'de> serde::Deserialize<'de> for ListUpdate { } add__ = Some(map_.next_value()?); } - GeneratedField::Del => { - if del__.is_some() { - return Err(serde::de::Error::duplicate_field("del")); + GeneratedField::Remove => { + if remove__.is_some() { + return Err(serde::de::Error::duplicate_field("remove")); } - del__ = Some(map_.next_value()?); + remove__ = Some(map_.next_value()?); } GeneratedField::Clear => { if clear__.is_some() { @@ -17333,7 +19289,7 @@ impl<'de> serde::Deserialize<'de> for ListUpdate { Ok(ListUpdate { set: set__.unwrap_or_default(), add: add__.unwrap_or_default(), - del: del__.unwrap_or_default(), + remove: remove__.unwrap_or_default(), clear: clear__.unwrap_or_default(), }) } @@ -17895,6 +19851,141 @@ impl<'de> serde::Deserialize<'de> for MetricsBatch { deserializer.deserialize_struct("livekit.MetricsBatch", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for MetricsRecordingHeader { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.room_id.is_empty() { + len += 1; + } + if self.duration != 0 { + len += 1; + } + if self.start_time.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.MetricsRecordingHeader", len)?; + if !self.room_id.is_empty() { + struct_ser.serialize_field("roomId", &self.room_id)?; + } + 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 let Some(v) = self.start_time.as_ref() { + struct_ser.serialize_field("startTime", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MetricsRecordingHeader { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "room_id", + "roomId", + "duration", + "start_time", + "startTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RoomId, + Duration, + StartTime, + __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 { + "roomId" | "room_id" => Ok(GeneratedField::RoomId), + "duration" => Ok(GeneratedField::Duration), + "startTime" | "start_time" => Ok(GeneratedField::StartTime), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MetricsRecordingHeader; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.MetricsRecordingHeader") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut room_id__ = None; + let mut duration__ = None; + let mut start_time__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::RoomId => { + if room_id__.is_some() { + return Err(serde::de::Error::duplicate_field("roomId")); + } + room_id__ = Some(map_.next_value()?); + } + GeneratedField::Duration => { + if duration__.is_some() { + return Err(serde::de::Error::duplicate_field("duration")); + } + duration__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::StartTime => { + if start_time__.is_some() { + return Err(serde::de::Error::duplicate_field("startTime")); + } + start_time__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(MetricsRecordingHeader { + room_id: room_id__.unwrap_or_default(), + duration: duration__.unwrap_or_default(), + start_time: start_time__, + }) + } + } + deserializer.deserialize_struct("livekit.MetricsRecordingHeader", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for MigrateJobRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -19307,6 +21398,7 @@ impl serde::Serialize for participant_info::Kind { Self::Egress => "EGRESS", Self::Sip => "SIP", Self::Agent => "AGENT", + Self::Connector => "CONNECTOR", }; serializer.serialize_str(variant) } @@ -19323,6 +21415,7 @@ impl<'de> serde::Deserialize<'de> for participant_info::Kind { "EGRESS", "SIP", "AGENT", + "CONNECTOR", ]; struct GeneratedVisitor; @@ -19368,6 +21461,7 @@ impl<'de> serde::Deserialize<'de> for participant_info::Kind { "EGRESS" => Ok(participant_info::Kind::Egress), "SIP" => Ok(participant_info::Kind::Sip), "AGENT" => Ok(participant_info::Kind::Agent), + "CONNECTOR" => Ok(participant_info::Kind::Connector), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -19973,6 +22067,268 @@ impl<'de> serde::Deserialize<'de> for ParticipantUpdate { deserializer.deserialize_struct("livekit.ParticipantUpdate", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for PerformRpcRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.room.is_empty() { + len += 1; + } + if !self.destination_identity.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; + } + let mut struct_ser = serializer.serialize_struct("livekit.PerformRpcRequest", len)?; + if !self.room.is_empty() { + struct_ser.serialize_field("room", &self.room)?; + } + if !self.destination_identity.is_empty() { + struct_ser.serialize_field("destinationIdentity", &self.destination_identity)?; + } + 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)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PerformRpcRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "room", + "destination_identity", + "destinationIdentity", + "method", + "payload", + "response_timeout_ms", + "responseTimeoutMs", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Room, + DestinationIdentity, + Method, + Payload, + ResponseTimeoutMs, + __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 { + "room" => Ok(GeneratedField::Room), + "destinationIdentity" | "destination_identity" => Ok(GeneratedField::DestinationIdentity), + "method" => Ok(GeneratedField::Method), + "payload" => Ok(GeneratedField::Payload), + "responseTimeoutMs" | "response_timeout_ms" => Ok(GeneratedField::ResponseTimeoutMs), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PerformRpcRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.PerformRpcRequest") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut room__ = None; + let mut destination_identity__ = None; + let mut method__ = None; + let mut payload__ = None; + let mut response_timeout_ms__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); + } + room__ = Some(map_.next_value()?); + } + GeneratedField::DestinationIdentity => { + if destination_identity__.is_some() { + return Err(serde::de::Error::duplicate_field("destinationIdentity")); + } + destination_identity__ = 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::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(PerformRpcRequest { + room: room__.unwrap_or_default(), + destination_identity: destination_identity__.unwrap_or_default(), + method: method__.unwrap_or_default(), + payload: payload__.unwrap_or_default(), + response_timeout_ms: response_timeout_ms__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.PerformRpcRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PerformRpcResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.payload.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.PerformRpcResponse", len)?; + if !self.payload.is_empty() { + struct_ser.serialize_field("payload", &self.payload)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PerformRpcResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "payload", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Payload, + __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 { + "payload" => Ok(GeneratedField::Payload), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PerformRpcResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.PerformRpcResponse") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut payload__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Payload => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("payload")); + } + payload__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(PerformRpcResponse { + payload: payload__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.PerformRpcResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for Ping { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -20162,9 +22518,275 @@ impl<'de> serde::Deserialize<'de> for PlayoutDelay { E: serde::de::Error, { match value { - "enabled" => Ok(GeneratedField::Enabled), - "min" => Ok(GeneratedField::Min), - "max" => Ok(GeneratedField::Max), + "enabled" => Ok(GeneratedField::Enabled), + "min" => Ok(GeneratedField::Min), + "max" => Ok(GeneratedField::Max), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PlayoutDelay; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.PlayoutDelay") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut enabled__ = None; + let mut min__ = None; + let mut max__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Enabled => { + if enabled__.is_some() { + return Err(serde::de::Error::duplicate_field("enabled")); + } + enabled__ = Some(map_.next_value()?); + } + GeneratedField::Min => { + if min__.is_some() { + return Err(serde::de::Error::duplicate_field("min")); + } + min__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Max => { + if max__.is_some() { + return Err(serde::de::Error::duplicate_field("max")); + } + max__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(PlayoutDelay { + enabled: enabled__.unwrap_or_default(), + min: min__.unwrap_or_default(), + max: max__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.PlayoutDelay", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Pong { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.last_ping_timestamp != 0 { + len += 1; + } + if self.timestamp != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.Pong", len)?; + if self.last_ping_timestamp != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("lastPingTimestamp", ToString::to_string(&self.last_ping_timestamp).as_str())?; + } + 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())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Pong { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "last_ping_timestamp", + "lastPingTimestamp", + "timestamp", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + LastPingTimestamp, + Timestamp, + __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 { + "lastPingTimestamp" | "last_ping_timestamp" => Ok(GeneratedField::LastPingTimestamp), + "timestamp" => Ok(GeneratedField::Timestamp), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Pong; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.Pong") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut last_ping_timestamp__ = None; + let mut timestamp__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::LastPingTimestamp => { + if last_ping_timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("lastPingTimestamp")); + } + last_ping_timestamp__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Timestamp => { + if timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("timestamp")); + } + 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 ProviderInfo { + #[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.name.is_empty() { + len += 1; + } + if self.r#type != 0 { + len += 1; + } + if self.prevent_transfer { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.ProviderInfo", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.name.is_empty() { + struct_ser.serialize_field("name", &self.name)?; + } + if self.r#type != 0 { + let v = ProviderType::try_from(self.r#type) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; + struct_ser.serialize_field("type", &v)?; + } + if self.prevent_transfer { + struct_ser.serialize_field("preventTransfer", &self.prevent_transfer)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ProviderInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "name", + "type", + "prevent_transfer", + "preventTransfer", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Name, + Type, + PreventTransfer, + __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), + "name" => Ok(GeneratedField::Name), + "type" => Ok(GeneratedField::Type), + "preventTransfer" | "prevent_transfer" => Ok(GeneratedField::PreventTransfer), _ => Ok(GeneratedField::__SkipField__), } } @@ -20174,177 +22796,134 @@ impl<'de> serde::Deserialize<'de> for PlayoutDelay { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PlayoutDelay; + type Value = ProviderInfo; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.PlayoutDelay") + formatter.write_str("struct livekit.ProviderInfo") } - 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 enabled__ = None; - let mut min__ = None; - let mut max__ = None; + let mut id__ = None; + let mut name__ = None; + let mut r#type__ = None; + let mut prevent_transfer__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::Enabled => { - if enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("enabled")); + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); } - enabled__ = Some(map_.next_value()?); + id__ = Some(map_.next_value()?); } - GeneratedField::Min => { - if min__.is_some() { - return Err(serde::de::Error::duplicate_field("min")); + GeneratedField::Name => { + if name__.is_some() { + return Err(serde::de::Error::duplicate_field("name")); } - min__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + name__ = Some(map_.next_value()?); } - GeneratedField::Max => { - if max__.is_some() { - return Err(serde::de::Error::duplicate_field("max")); + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); } - max__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + r#type__ = Some(map_.next_value::()? as i32); + } + GeneratedField::PreventTransfer => { + if prevent_transfer__.is_some() { + return Err(serde::de::Error::duplicate_field("preventTransfer")); + } + prevent_transfer__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(PlayoutDelay { - enabled: enabled__.unwrap_or_default(), - min: min__.unwrap_or_default(), - max: max__.unwrap_or_default(), + Ok(ProviderInfo { + id: id__.unwrap_or_default(), + name: name__.unwrap_or_default(), + r#type: r#type__.unwrap_or_default(), + prevent_transfer: prevent_transfer__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.PlayoutDelay", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.ProviderInfo", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for Pong { +impl serde::Serialize for ProviderType { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.last_ping_timestamp != 0 { - len += 1; - } - if self.timestamp != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.Pong", len)?; - if self.last_ping_timestamp != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("lastPingTimestamp", ToString::to_string(&self.last_ping_timestamp).as_str())?; - } - 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())?; - } - struct_ser.end() + let variant = match self { + Self::Unknown => "PROVIDER_TYPE_UNKNOWN", + Self::Internal => "PROVIDER_TYPE_INTERNAL", + Self::External => "PROVIDER_TYPE_EXTERNAL", + }; + serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for Pong { +impl<'de> serde::Deserialize<'de> for ProviderType { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "last_ping_timestamp", - "lastPingTimestamp", - "timestamp", + "PROVIDER_TYPE_UNKNOWN", + "PROVIDER_TYPE_INTERNAL", + "PROVIDER_TYPE_EXTERNAL", ]; - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LastPingTimestamp, - Timestamp, - __SkipField__, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; + struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ProviderType; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "lastPingTimestamp" | "last_ping_timestamp" => Ok(GeneratedField::LastPingTimestamp), - "timestamp" => Ok(GeneratedField::Timestamp), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Pong; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.Pong") + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) } - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, { - let mut last_ping_timestamp__ = None; - let mut timestamp__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::LastPingTimestamp => { - if last_ping_timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("lastPingTimestamp")); - } - last_ping_timestamp__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Timestamp => { - if timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("timestamp")); - } - timestamp__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } + match value { + "PROVIDER_TYPE_UNKNOWN" => Ok(ProviderType::Unknown), + "PROVIDER_TYPE_INTERNAL" => Ok(ProviderType::Internal), + "PROVIDER_TYPE_EXTERNAL" => Ok(ProviderType::External), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } - Ok(Pong { - last_ping_timestamp: last_ping_timestamp__.unwrap_or_default(), - timestamp: timestamp__.unwrap_or_default(), - }) } } - deserializer.deserialize_struct("livekit.Pong", FIELDS, GeneratedVisitor) + deserializer.deserialize_any(GeneratedVisitor) } } impl serde::Serialize for ProxyConfig { @@ -23217,6 +25796,9 @@ impl serde::Serialize for RequestResponse { if !self.message.is_empty() { len += 1; } + if self.request.is_some() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.RequestResponse", len)?; if self.request_id != 0 { struct_ser.serialize_field("requestId", &self.request_id)?; @@ -23229,6 +25811,28 @@ impl serde::Serialize for RequestResponse { if !self.message.is_empty() { struct_ser.serialize_field("message", &self.message)?; } + if let Some(v) = self.request.as_ref() { + match v { + request_response::Request::Trickle(v) => { + struct_ser.serialize_field("trickle", v)?; + } + request_response::Request::AddTrack(v) => { + struct_ser.serialize_field("addTrack", v)?; + } + request_response::Request::Mute(v) => { + struct_ser.serialize_field("mute", v)?; + } + request_response::Request::UpdateMetadata(v) => { + struct_ser.serialize_field("updateMetadata", v)?; + } + request_response::Request::UpdateAudioTrack(v) => { + struct_ser.serialize_field("updateAudioTrack", v)?; + } + request_response::Request::UpdateVideoTrack(v) => { + struct_ser.serialize_field("updateVideoTrack", v)?; + } + } + } struct_ser.end() } } @@ -23243,6 +25847,16 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { "requestId", "reason", "message", + "trickle", + "add_track", + "addTrack", + "mute", + "update_metadata", + "updateMetadata", + "update_audio_track", + "updateAudioTrack", + "update_video_track", + "updateVideoTrack", ]; #[allow(clippy::enum_variant_names)] @@ -23250,6 +25864,12 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { RequestId, Reason, Message, + Trickle, + AddTrack, + Mute, + UpdateMetadata, + UpdateAudioTrack, + UpdateVideoTrack, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -23275,6 +25895,12 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { "requestId" | "request_id" => Ok(GeneratedField::RequestId), "reason" => Ok(GeneratedField::Reason), "message" => Ok(GeneratedField::Message), + "trickle" => Ok(GeneratedField::Trickle), + "addTrack" | "add_track" => Ok(GeneratedField::AddTrack), + "mute" => Ok(GeneratedField::Mute), + "updateMetadata" | "update_metadata" => Ok(GeneratedField::UpdateMetadata), + "updateAudioTrack" | "update_audio_track" => Ok(GeneratedField::UpdateAudioTrack), + "updateVideoTrack" | "update_video_track" => Ok(GeneratedField::UpdateVideoTrack), _ => Ok(GeneratedField::__SkipField__), } } @@ -23297,6 +25923,7 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { let mut request_id__ = None; let mut reason__ = None; let mut message__ = None; + let mut request__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::RequestId => { @@ -23319,6 +25946,48 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { } message__ = Some(map_.next_value()?); } + GeneratedField::Trickle => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("trickle")); + } + request__ = map_.next_value::<::std::option::Option<_>>()?.map(request_response::Request::Trickle) +; + } + GeneratedField::AddTrack => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("addTrack")); + } + request__ = map_.next_value::<::std::option::Option<_>>()?.map(request_response::Request::AddTrack) +; + } + GeneratedField::Mute => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("mute")); + } + request__ = map_.next_value::<::std::option::Option<_>>()?.map(request_response::Request::Mute) +; + } + GeneratedField::UpdateMetadata => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("updateMetadata")); + } + request__ = map_.next_value::<::std::option::Option<_>>()?.map(request_response::Request::UpdateMetadata) +; + } + GeneratedField::UpdateAudioTrack => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("updateAudioTrack")); + } + request__ = map_.next_value::<::std::option::Option<_>>()?.map(request_response::Request::UpdateAudioTrack) +; + } + GeneratedField::UpdateVideoTrack => { + if request__.is_some() { + return Err(serde::de::Error::duplicate_field("updateVideoTrack")); + } + request__ = map_.next_value::<::std::option::Option<_>>()?.map(request_response::Request::UpdateVideoTrack) +; + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -23328,6 +25997,7 @@ impl<'de> serde::Deserialize<'de> for RequestResponse { request_id: request_id__.unwrap_or_default(), reason: reason__.unwrap_or_default(), message: message__.unwrap_or_default(), + request: request__, }) } } @@ -23345,6 +26015,9 @@ impl serde::Serialize for request_response::Reason { Self::NotFound => "NOT_FOUND", Self::NotAllowed => "NOT_ALLOWED", Self::LimitExceeded => "LIMIT_EXCEEDED", + Self::Queued => "QUEUED", + Self::UnsupportedType => "UNSUPPORTED_TYPE", + Self::UnclassifiedError => "UNCLASSIFIED_ERROR", }; serializer.serialize_str(variant) } @@ -23360,6 +26033,9 @@ impl<'de> serde::Deserialize<'de> for request_response::Reason { "NOT_FOUND", "NOT_ALLOWED", "LIMIT_EXCEEDED", + "QUEUED", + "UNSUPPORTED_TYPE", + "UNCLASSIFIED_ERROR", ]; struct GeneratedVisitor; @@ -23404,6 +26080,9 @@ impl<'de> serde::Deserialize<'de> for request_response::Reason { "NOT_FOUND" => Ok(request_response::Reason::NotFound), "NOT_ALLOWED" => Ok(request_response::Reason::NotAllowed), "LIMIT_EXCEEDED" => Ok(request_response::Reason::LimitExceeded), + "QUEUED" => Ok(request_response::Reason::Queued), + "UNSUPPORTED_TYPE" => Ok(request_response::Reason::UnsupportedType), + "UNCLASSIFIED_ERROR" => Ok(request_response::Reason::UnclassifiedError), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -26056,6 +28735,15 @@ impl serde::Serialize for SipCallInfo { if !self.media_encryption.is_empty() { len += 1; } + if !self.pcap_file_link.is_empty() { + len += 1; + } + if !self.call_context.is_empty() { + len += 1; + } + if self.provider_info.is_some() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.SIPCallInfo", len)?; if !self.call_id.is_empty() { struct_ser.serialize_field("callId", &self.call_id)?; @@ -26151,6 +28839,15 @@ impl serde::Serialize for SipCallInfo { if !self.media_encryption.is_empty() { struct_ser.serialize_field("mediaEncryption", &self.media_encryption)?; } + if !self.pcap_file_link.is_empty() { + struct_ser.serialize_field("pcapFileLink", &self.pcap_file_link)?; + } + if !self.call_context.is_empty() { + struct_ser.serialize_field("callContext", &self.call_context)?; + } + if let Some(v) = self.provider_info.as_ref() { + struct_ser.serialize_field("providerInfo", v)?; + } struct_ser.end() } } @@ -26207,6 +28904,12 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { "audioCodec", "media_encryption", "mediaEncryption", + "pcap_file_link", + "pcapFileLink", + "call_context", + "callContext", + "provider_info", + "providerInfo", ]; #[allow(clippy::enum_variant_names)] @@ -26235,6 +28938,9 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { CallStatusCode, AudioCodec, MediaEncryption, + PcapFileLink, + CallContext, + ProviderInfo, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -26281,6 +28987,9 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { "callStatusCode" | "call_status_code" => Ok(GeneratedField::CallStatusCode), "audioCodec" | "audio_codec" => Ok(GeneratedField::AudioCodec), "mediaEncryption" | "media_encryption" => Ok(GeneratedField::MediaEncryption), + "pcapFileLink" | "pcap_file_link" => Ok(GeneratedField::PcapFileLink), + "callContext" | "call_context" => Ok(GeneratedField::CallContext), + "providerInfo" | "provider_info" => Ok(GeneratedField::ProviderInfo), _ => Ok(GeneratedField::__SkipField__), } } @@ -26324,6 +29033,9 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { let mut call_status_code__ = None; let mut audio_codec__ = None; let mut media_encryption__ = None; + let mut pcap_file_link__ = None; + let mut call_context__ = None; + let mut provider_info__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::CallId => { @@ -26484,6 +29196,24 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { } media_encryption__ = Some(map_.next_value()?); } + GeneratedField::PcapFileLink => { + if pcap_file_link__.is_some() { + return Err(serde::de::Error::duplicate_field("pcapFileLink")); + } + pcap_file_link__ = Some(map_.next_value()?); + } + GeneratedField::CallContext => { + if call_context__.is_some() { + return Err(serde::de::Error::duplicate_field("callContext")); + } + call_context__ = Some(map_.next_value()?); + } + GeneratedField::ProviderInfo => { + if provider_info__.is_some() { + return Err(serde::de::Error::duplicate_field("providerInfo")); + } + provider_info__ = map_.next_value()?; + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -26514,6 +29244,9 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { call_status_code: call_status_code__, audio_codec: audio_codec__.unwrap_or_default(), media_encryption: media_encryption__.unwrap_or_default(), + pcap_file_link: pcap_file_link__.unwrap_or_default(), + call_context: call_context__.unwrap_or_default(), + provider_info: provider_info__, }) } } @@ -31986,6 +34719,9 @@ impl serde::Serialize for SessionDescription { if self.id != 0 { len += 1; } + if !self.mid_to_track_id.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.SessionDescription", len)?; if !self.r#type.is_empty() { struct_ser.serialize_field("type", &self.r#type)?; @@ -31996,6 +34732,9 @@ impl serde::Serialize for SessionDescription { if self.id != 0 { struct_ser.serialize_field("id", &self.id)?; } + if !self.mid_to_track_id.is_empty() { + struct_ser.serialize_field("midToTrackId", &self.mid_to_track_id)?; + } struct_ser.end() } } @@ -32009,6 +34748,8 @@ impl<'de> serde::Deserialize<'de> for SessionDescription { "type", "sdp", "id", + "mid_to_track_id", + "midToTrackId", ]; #[allow(clippy::enum_variant_names)] @@ -32016,6 +34757,7 @@ impl<'de> serde::Deserialize<'de> for SessionDescription { Type, Sdp, Id, + MidToTrackId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -32041,6 +34783,7 @@ impl<'de> serde::Deserialize<'de> for SessionDescription { "type" => Ok(GeneratedField::Type), "sdp" => Ok(GeneratedField::Sdp), "id" => Ok(GeneratedField::Id), + "midToTrackId" | "mid_to_track_id" => Ok(GeneratedField::MidToTrackId), _ => Ok(GeneratedField::__SkipField__), } } @@ -32063,6 +34806,7 @@ impl<'de> serde::Deserialize<'de> for SessionDescription { let mut r#type__ = None; let mut sdp__ = None; let mut id__ = None; + let mut mid_to_track_id__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Type => { @@ -32085,6 +34829,14 @@ impl<'de> serde::Deserialize<'de> for SessionDescription { Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::MidToTrackId => { + if mid_to_track_id__.is_some() { + return Err(serde::de::Error::duplicate_field("midToTrackId")); + } + mid_to_track_id__ = Some( + map_.next_value::>()? + ); + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -32094,6 +34846,7 @@ impl<'de> serde::Deserialize<'de> for SessionDescription { r#type: r#type__.unwrap_or_default(), sdp: sdp__.unwrap_or_default(), id: id__.unwrap_or_default(), + mid_to_track_id: mid_to_track_id__.unwrap_or_default(), }) } } @@ -32506,6 +35259,9 @@ impl serde::Serialize for SignalResponse { signal_response::Message::MediaSectionsRequirement(v) => { struct_ser.serialize_field("mediaSectionsRequirement", v)?; } + signal_response::Message::SubscribedAudioCodecUpdate(v) => { + struct_ser.serialize_field("subscribedAudioCodecUpdate", v)?; + } } } struct_ser.end() @@ -32557,6 +35313,8 @@ impl<'de> serde::Deserialize<'de> for SignalResponse { "roomMoved", "media_sections_requirement", "mediaSectionsRequirement", + "subscribed_audio_codec_update", + "subscribedAudioCodecUpdate", ]; #[allow(clippy::enum_variant_names)] @@ -32585,6 +35343,7 @@ impl<'de> serde::Deserialize<'de> for SignalResponse { TrackSubscribed, RoomMoved, MediaSectionsRequirement, + SubscribedAudioCodecUpdate, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -32631,6 +35390,7 @@ impl<'de> serde::Deserialize<'de> for SignalResponse { "trackSubscribed" | "track_subscribed" => Ok(GeneratedField::TrackSubscribed), "roomMoved" | "room_moved" => Ok(GeneratedField::RoomMoved), "mediaSectionsRequirement" | "media_sections_requirement" => Ok(GeneratedField::MediaSectionsRequirement), + "subscribedAudioCodecUpdate" | "subscribed_audio_codec_update" => Ok(GeneratedField::SubscribedAudioCodecUpdate), _ => Ok(GeneratedField::__SkipField__), } } @@ -32817,6 +35577,13 @@ impl<'de> serde::Deserialize<'de> for SignalResponse { return Err(serde::de::Error::duplicate_field("mediaSectionsRequirement")); } message__ = map_.next_value::<::std::option::Option<_>>()?.map(signal_response::Message::MediaSectionsRequirement) +; + } + GeneratedField::SubscribedAudioCodecUpdate => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("subscribedAudioCodecUpdate")); + } + message__ = map_.next_value::<::std::option::Option<_>>()?.map(signal_response::Message::SubscribedAudioCodecUpdate) ; } GeneratedField::__SkipField__ => { @@ -34708,9 +37475,339 @@ impl<'de> serde::Deserialize<'de> for StreamStateInfo { E: serde::de::Error, { match value { - "participantSid" | "participant_sid" => Ok(GeneratedField::ParticipantSid), + "participantSid" | "participant_sid" => Ok(GeneratedField::ParticipantSid), + "trackSid" | "track_sid" => Ok(GeneratedField::TrackSid), + "state" => Ok(GeneratedField::State), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StreamStateInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.StreamStateInfo") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut participant_sid__ = None; + let mut track_sid__ = None; + let mut state__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ParticipantSid => { + if participant_sid__.is_some() { + return Err(serde::de::Error::duplicate_field("participantSid")); + } + participant_sid__ = Some(map_.next_value()?); + } + GeneratedField::TrackSid => { + if track_sid__.is_some() { + return Err(serde::de::Error::duplicate_field("trackSid")); + } + track_sid__ = Some(map_.next_value()?); + } + GeneratedField::State => { + if state__.is_some() { + return Err(serde::de::Error::duplicate_field("state")); + } + state__ = Some(map_.next_value::()? as i32); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(StreamStateInfo { + participant_sid: participant_sid__.unwrap_or_default(), + track_sid: track_sid__.unwrap_or_default(), + state: state__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.StreamStateInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for StreamStateUpdate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.stream_states.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.StreamStateUpdate", len)?; + if !self.stream_states.is_empty() { + struct_ser.serialize_field("streamStates", &self.stream_states)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StreamStateUpdate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "stream_states", + "streamStates", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + StreamStates, + __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 { + "streamStates" | "stream_states" => Ok(GeneratedField::StreamStates), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StreamStateUpdate; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.StreamStateUpdate") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut stream_states__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::StreamStates => { + if stream_states__.is_some() { + return Err(serde::de::Error::duplicate_field("streamStates")); + } + stream_states__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(StreamStateUpdate { + stream_states: stream_states__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.StreamStateUpdate", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SubscribedAudioCodec { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.codec.is_empty() { + len += 1; + } + if self.enabled { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.SubscribedAudioCodec", len)?; + if !self.codec.is_empty() { + struct_ser.serialize_field("codec", &self.codec)?; + } + if self.enabled { + struct_ser.serialize_field("enabled", &self.enabled)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SubscribedAudioCodec { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "codec", + "enabled", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Codec, + Enabled, + __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 { + "codec" => Ok(GeneratedField::Codec), + "enabled" => Ok(GeneratedField::Enabled), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SubscribedAudioCodec; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.SubscribedAudioCodec") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut codec__ = None; + let mut enabled__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Codec => { + if codec__.is_some() { + return Err(serde::de::Error::duplicate_field("codec")); + } + codec__ = Some(map_.next_value()?); + } + GeneratedField::Enabled => { + if enabled__.is_some() { + return Err(serde::de::Error::duplicate_field("enabled")); + } + enabled__ = Some(map_.next_value()?); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(SubscribedAudioCodec { + codec: codec__.unwrap_or_default(), + enabled: enabled__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.SubscribedAudioCodec", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SubscribedAudioCodecUpdate { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.track_sid.is_empty() { + len += 1; + } + if !self.subscribed_audio_codecs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.SubscribedAudioCodecUpdate", len)?; + if !self.track_sid.is_empty() { + struct_ser.serialize_field("trackSid", &self.track_sid)?; + } + if !self.subscribed_audio_codecs.is_empty() { + struct_ser.serialize_field("subscribedAudioCodecs", &self.subscribed_audio_codecs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SubscribedAudioCodecUpdate { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "track_sid", + "trackSid", + "subscribed_audio_codecs", + "subscribedAudioCodecs", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TrackSid, + SubscribedAudioCodecs, + __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 { "trackSid" | "track_sid" => Ok(GeneratedField::TrackSid), - "state" => Ok(GeneratedField::State), + "subscribedAudioCodecs" | "subscribed_audio_codecs" => Ok(GeneratedField::SubscribedAudioCodecs), _ => Ok(GeneratedField::__SkipField__), } } @@ -34720,148 +37817,44 @@ impl<'de> serde::Deserialize<'de> for StreamStateInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StreamStateInfo; + type Value = SubscribedAudioCodecUpdate; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.StreamStateInfo") + formatter.write_str("struct livekit.SubscribedAudioCodecUpdate") } - 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 participant_sid__ = None; let mut track_sid__ = None; - let mut state__ = None; + let mut subscribed_audio_codecs__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::ParticipantSid => { - if participant_sid__.is_some() { - return Err(serde::de::Error::duplicate_field("participantSid")); - } - participant_sid__ = Some(map_.next_value()?); - } GeneratedField::TrackSid => { if track_sid__.is_some() { return Err(serde::de::Error::duplicate_field("trackSid")); } track_sid__ = Some(map_.next_value()?); } - GeneratedField::State => { - if state__.is_some() { - return Err(serde::de::Error::duplicate_field("state")); + GeneratedField::SubscribedAudioCodecs => { + if subscribed_audio_codecs__.is_some() { + return Err(serde::de::Error::duplicate_field("subscribedAudioCodecs")); } - state__ = Some(map_.next_value::()? as i32); + subscribed_audio_codecs__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(StreamStateInfo { - participant_sid: participant_sid__.unwrap_or_default(), + Ok(SubscribedAudioCodecUpdate { track_sid: track_sid__.unwrap_or_default(), - state: state__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("livekit.StreamStateInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for StreamStateUpdate { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.stream_states.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.StreamStateUpdate", len)?; - if !self.stream_states.is_empty() { - struct_ser.serialize_field("streamStates", &self.stream_states)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for StreamStateUpdate { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "stream_states", - "streamStates", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - StreamStates, - __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 { - "streamStates" | "stream_states" => Ok(GeneratedField::StreamStates), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StreamStateUpdate; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.StreamStateUpdate") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut stream_states__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::StreamStates => { - if stream_states__.is_some() { - return Err(serde::de::Error::duplicate_field("streamStates")); - } - stream_states__ = Some(map_.next_value()?); - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } - } - Ok(StreamStateUpdate { - stream_states: stream_states__.unwrap_or_default(), + subscribed_audio_codecs: subscribed_audio_codecs__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.StreamStateUpdate", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.SubscribedAudioCodecUpdate", FIELDS, GeneratedVisitor) } } impl serde::Serialize for SubscribedCodec { @@ -41842,6 +44835,7 @@ impl serde::Serialize for video_layer::Mode { Self::Unused => "MODE_UNUSED", Self::OneSpatialLayerPerStream => "ONE_SPATIAL_LAYER_PER_STREAM", Self::MultipleSpatialLayersPerStream => "MULTIPLE_SPATIAL_LAYERS_PER_STREAM", + Self::OneSpatialLayerPerStreamIncompleteRtcpSr => "ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR", }; serializer.serialize_str(variant) } @@ -41856,6 +44850,7 @@ impl<'de> serde::Deserialize<'de> for video_layer::Mode { "MODE_UNUSED", "ONE_SPATIAL_LAYER_PER_STREAM", "MULTIPLE_SPATIAL_LAYERS_PER_STREAM", + "ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR", ]; struct GeneratedVisitor; @@ -41899,6 +44894,7 @@ impl<'de> serde::Deserialize<'de> for video_layer::Mode { "MODE_UNUSED" => Ok(video_layer::Mode::Unused), "ONE_SPATIAL_LAYER_PER_STREAM" => Ok(video_layer::Mode::OneSpatialLayerPerStream), "MULTIPLE_SPATIAL_LAYERS_PER_STREAM" => Ok(video_layer::Mode::MultipleSpatialLayersPerStream), + "ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR" => Ok(video_layer::Mode::OneSpatialLayerPerStreamIncompleteRtcpSr), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -42319,6 +45315,9 @@ impl serde::Serialize for WebhookConfig { if !self.signing_key.is_empty() { len += 1; } + if self.filter_params.is_some() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.WebhookConfig", len)?; if !self.url.is_empty() { struct_ser.serialize_field("url", &self.url)?; @@ -42326,6 +45325,9 @@ impl serde::Serialize for WebhookConfig { if !self.signing_key.is_empty() { struct_ser.serialize_field("signingKey", &self.signing_key)?; } + if let Some(v) = self.filter_params.as_ref() { + struct_ser.serialize_field("filterParams", v)?; + } struct_ser.end() } } @@ -42339,12 +45341,15 @@ impl<'de> serde::Deserialize<'de> for WebhookConfig { "url", "signing_key", "signingKey", + "filter_params", + "filterParams", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Url, SigningKey, + FilterParams, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -42369,6 +45374,7 @@ impl<'de> serde::Deserialize<'de> for WebhookConfig { match value { "url" => Ok(GeneratedField::Url), "signingKey" | "signing_key" => Ok(GeneratedField::SigningKey), + "filterParams" | "filter_params" => Ok(GeneratedField::FilterParams), _ => Ok(GeneratedField::__SkipField__), } } @@ -42390,6 +45396,7 @@ impl<'de> serde::Deserialize<'de> for WebhookConfig { { let mut url__ = None; let mut signing_key__ = None; + let mut filter_params__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Url => { @@ -42404,6 +45411,12 @@ impl<'de> serde::Deserialize<'de> for WebhookConfig { } signing_key__ = Some(map_.next_value()?); } + GeneratedField::FilterParams => { + if filter_params__.is_some() { + return Err(serde::de::Error::duplicate_field("filterParams")); + } + filter_params__ = map_.next_value()?; + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -42412,6 +45425,7 @@ impl<'de> serde::Deserialize<'de> for WebhookConfig { Ok(WebhookConfig { url: url__.unwrap_or_default(), signing_key: signing_key__.unwrap_or_default(), + filter_params: filter_params__, }) } } @@ -42659,6 +45673,192 @@ impl<'de> serde::Deserialize<'de> for WebhookEvent { deserializer.deserialize_struct("livekit.WebhookEvent", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for WhatsAppCall { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.whatsapp_call_id.is_empty() { + len += 1; + } + if self.direction != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.WhatsAppCall", len)?; + if !self.whatsapp_call_id.is_empty() { + struct_ser.serialize_field("whatsappCallId", &self.whatsapp_call_id)?; + } + if self.direction != 0 { + let v = WhatsAppCallDirection::try_from(self.direction) + .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.direction)))?; + struct_ser.serialize_field("direction", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for WhatsAppCall { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "whatsapp_call_id", + "whatsappCallId", + "direction", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WhatsappCallId, + Direction, + __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 { + "whatsappCallId" | "whatsapp_call_id" => Ok(GeneratedField::WhatsappCallId), + "direction" => Ok(GeneratedField::Direction), + _ => Ok(GeneratedField::__SkipField__), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = WhatsAppCall; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct livekit.WhatsAppCall") + } + + fn visit_map(self, mut map_: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut whatsapp_call_id__ = None; + let mut direction__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::WhatsappCallId => { + if whatsapp_call_id__.is_some() { + return Err(serde::de::Error::duplicate_field("whatsappCallId")); + } + whatsapp_call_id__ = Some(map_.next_value()?); + } + GeneratedField::Direction => { + if direction__.is_some() { + return Err(serde::de::Error::duplicate_field("direction")); + } + direction__ = Some(map_.next_value::()? as i32); + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } + } + Ok(WhatsAppCall { + whatsapp_call_id: whatsapp_call_id__.unwrap_or_default(), + direction: direction__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("livekit.WhatsAppCall", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for WhatsAppCallDirection { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::WhatsappCallDirectionInbound => "WHATSAPP_CALL_DIRECTION_INBOUND", + Self::WhatsappCallDirectionOutbound => "WHATSAPP_CALL_DIRECTION_OUTBOUND", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for WhatsAppCallDirection { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "WHATSAPP_CALL_DIRECTION_INBOUND", + "WHATSAPP_CALL_DIRECTION_OUTBOUND", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = WhatsAppCallDirection; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + i32::try_from(v) + .ok() + .and_then(|x| x.try_into().ok()) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "WHATSAPP_CALL_DIRECTION_INBOUND" => Ok(WhatsAppCallDirection::WhatsappCallDirectionInbound), + "WHATSAPP_CALL_DIRECTION_OUTBOUND" => Ok(WhatsAppCallDirection::WhatsappCallDirectionOutbound), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} impl serde::Serialize for WorkerMessage { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result From c457ec57aefada3c003f7bc5329eb005390ab62d Mon Sep 17 00:00:00 2001 From: Anunay Maheshwari Date: Wed, 19 Nov 2025 05:28:21 +0530 Subject: [PATCH 2/4] build fixes from proto upgrade --- livekit-ffi/protocol/participant.proto | 1 + livekit-ffi/src/conversion/participant.rs | 1 + livekit/src/proto.rs | 1 + livekit/src/room/mod.rs | 2 ++ livekit/src/room/participant/mod.rs | 1 + livekit/src/rtc_engine/rtc_session.rs | 2 ++ 6 files changed, 8 insertions(+) diff --git a/livekit-ffi/protocol/participant.proto b/livekit-ffi/protocol/participant.proto index 390deaa9c..b74ed3709 100644 --- a/livekit-ffi/protocol/participant.proto +++ b/livekit-ffi/protocol/participant.proto @@ -40,6 +40,7 @@ enum ParticipantKind { PARTICIPANT_KIND_EGRESS = 2; PARTICIPANT_KIND_SIP = 3; PARTICIPANT_KIND_AGENT = 4; + PARTICIPANT_KIND_CONNECTOR = 5; } enum DisconnectReason { diff --git a/livekit-ffi/src/conversion/participant.rs b/livekit-ffi/src/conversion/participant.rs index 7a56dc2ff..d89fb852a 100644 --- a/livekit-ffi/src/conversion/participant.rs +++ b/livekit-ffi/src/conversion/participant.rs @@ -46,6 +46,7 @@ impl From for proto::ParticipantKind { ParticipantKind::Ingress => proto::ParticipantKind::Ingress, ParticipantKind::Egress => proto::ParticipantKind::Egress, ParticipantKind::Agent => proto::ParticipantKind::Agent, + ParticipantKind::Connector => proto::ParticipantKind::Connector, } } } diff --git a/livekit/src/proto.rs b/livekit/src/proto.rs index ee178b040..c70a90ec3 100644 --- a/livekit/src/proto.rs +++ b/livekit/src/proto.rs @@ -154,6 +154,7 @@ impl From for participant::ParticipantKind { participant_info::Kind::Egress => participant::ParticipantKind::Egress, participant_info::Kind::Sip => participant::ParticipantKind::Sip, participant_info::Kind::Agent => participant::ParticipantKind::Agent, + participant_info::Kind::Connector => participant::ParticipantKind::Connector, } } } diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index aebe35a56..8724b6e15 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -1186,11 +1186,13 @@ impl RoomSession { sdp: answer.to_string(), r#type: answer.sdp_type().to_string(), id: 0, + mid_to_track_id: Default::default(), }), offer: Some(proto::SessionDescription { sdp: offer.to_string(), r#type: offer.sdp_type().to_string(), id: 0, + mid_to_track_id: Default::default(), }), track_sids_disabled: Vec::default(), // TODO: New protocol version subscription: Some(proto::UpdateSubscription { diff --git a/livekit/src/room/participant/mod.rs b/livekit/src/room/participant/mod.rs index cbe687776..7c77975eb 100644 --- a/livekit/src/room/participant/mod.rs +++ b/livekit/src/room/participant/mod.rs @@ -44,6 +44,7 @@ pub enum ParticipantKind { Egress, Sip, Agent, + Connector, } #[derive(Debug, Clone, Copy, Eq, PartialEq)] diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index d3dcb9056..42895cfbc 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -932,6 +932,7 @@ impl SessionInner { r#type: "answer".to_string(), sdp: answer.to_string(), id: 0, + mid_to_track_id: Default::default(), })) .await; } @@ -1056,6 +1057,7 @@ impl SessionInner { r#type: "offer".to_string(), sdp: offer.to_string(), id: 0, + mid_to_track_id: Default::default(), })) .await; } From 318805aad31b18a32c57d519575262bffa0c0a96 Mon Sep 17 00:00:00 2001 From: Anunay Maheshwari Date: Wed, 19 Nov 2025 06:04:10 +0530 Subject: [PATCH 3/4] fmt --- livekit-api/src/services/connector.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/livekit-api/src/services/connector.rs b/livekit-api/src/services/connector.rs index 2e0e79ceb..7e295c954 100644 --- a/livekit-api/src/services/connector.rs +++ b/livekit-api/src/services/connector.rs @@ -126,7 +126,9 @@ impl ConnectorClient { whatsapp_to_phone_number: to_phone_number.into(), whatsapp_api_key: api_key.into(), whatsapp_cloud_api_version: cloud_api_version.into(), - whatsapp_biz_opaque_callback_data: options.biz_opaque_callback_data.unwrap_or_default(), + whatsapp_biz_opaque_callback_data: options + .biz_opaque_callback_data + .unwrap_or_default(), room_name: options.room_name.unwrap_or_default(), agents: options.agents.unwrap_or_default(), participant_identity: options.participant_identity.unwrap_or_default(), @@ -228,7 +230,9 @@ impl ConnectorClient { whatsapp_api_key: api_key.into(), whatsapp_cloud_api_version: cloud_api_version.into(), whatsapp_call_id: call_id.into(), - whatsapp_biz_opaque_callback_data: options.biz_opaque_callback_data.unwrap_or_default(), + whatsapp_biz_opaque_callback_data: options + .biz_opaque_callback_data + .unwrap_or_default(), sdp: Some(sdp), room_name: options.room_name.unwrap_or_default(), agents: options.agents.unwrap_or_default(), @@ -280,4 +284,4 @@ impl ConnectorClient { .await .map_err(Into::into) } -} \ No newline at end of file +} From 42534ef16c6dbf8241dd3d58f90323ead584a32e Mon Sep 17 00:00:00 2001 From: Anunay Maheshwari Date: Thu, 20 Nov 2025 00:41:27 +0530 Subject: [PATCH 4/4] bump protocol --- livekit-protocol/protocol | 2 +- livekit-protocol/src/livekit.rs | 91 ++++++++++++++++++ livekit-protocol/src/livekit.serde.rs | 128 ++++++++++++++++++++++++++ 3 files changed, 220 insertions(+), 1 deletion(-) diff --git a/livekit-protocol/protocol b/livekit-protocol/protocol index ad2cb9af4..fcc48786b 160000 --- a/livekit-protocol/protocol +++ b/livekit-protocol/protocol @@ -1 +1 @@ -Subproject commit ad2cb9af4442a0ee04bb0815ba4b8ee4e2f6ba6f +Subproject commit fcc48786b42607b8ba87e840a5c1d39e00b5f4e9 diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index a1d2f4a9e..da058ae5a 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -447,6 +447,8 @@ pub mod participant_info { pub enum KindDetail { CloudAgent = 0, Forwarded = 1, + ConnectorWhatsapp = 2, + ConnectorTwilio = 3, } impl KindDetail { /// String value of the enum field names used in the ProtoBuf definition. @@ -457,6 +459,8 @@ pub mod participant_info { match self { KindDetail::CloudAgent => "CLOUD_AGENT", KindDetail::Forwarded => "FORWARDED", + KindDetail::ConnectorWhatsapp => "CONNECTOR_WHATSAPP", + KindDetail::ConnectorTwilio => "CONNECTOR_TWILIO", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -464,6 +468,8 @@ pub mod participant_info { match value { "CLOUD_AGENT" => Some(Self::CloudAgent), "FORWARDED" => Some(Self::Forwarded), + "CONNECTOR_WHATSAPP" => Some(Self::ConnectorWhatsapp), + "CONNECTOR_TWILIO" => Some(Self::ConnectorTwilio), _ => None, } } @@ -2602,6 +2608,10 @@ pub struct StreamInfo { pub status: i32, #[prost(string, tag="6")] pub error: ::prost::alloc::string::String, + #[prost(int64, tag="7")] + pub last_retry_at: i64, + #[prost(uint32, tag="8")] + pub retries: u32, } /// Nested message and enum types in `StreamInfo`. pub mod stream_info { @@ -5991,11 +6001,15 @@ pub enum SipStatusCode { SipStatusCallIsForwarded = 181, SipStatusQueued = 182, SipStatusSessionProgress = 183, + SipStatusEarlyDialogTerminated = 199, SipStatusOk = 200, SipStatusAccepted = 202, + SipStatusNoNotification = 204, + SipStatusMultipleChoices = 300, SipStatusMovedPermanently = 301, SipStatusMovedTemporarily = 302, SipStatusUseProxy = 305, + SipStatusAlternativeService = 380, SipStatusBadRequest = 400, SipStatusUnauthorized = 401, SipStatusPaymentRequired = 402, @@ -6007,13 +6021,30 @@ pub enum SipStatusCode { SipStatusRequestTimeout = 408, SipStatusConflict = 409, SipStatusGone = 410, + SipStatusLengthRequired = 411, + SipStatusConditionalRequestFailed = 412, SipStatusRequestEntityTooLarge = 413, SipStatusRequestUriTooLong = 414, SipStatusUnsupportedMediaType = 415, SipStatusRequestedRangeNotSatisfiable = 416, + SipStatusUnknownResourcePriority = 417, SipStatusBadExtension = 420, SipStatusExtensionRequired = 421, + SipStatusSessionIntervalTooSmall = 422, SipStatusIntervalTooBrief = 423, + SipStatusBadLocationInformation = 424, + SipStatusBadAlertMessage = 425, + SipStatusUseIdentityHeader = 428, + SipStatusProvideReferrerIdentity = 429, + SipStatusFlowFailed = 430, + SipStatusAnonymityDisallowed = 433, + SipStatusBadIdentityInfo = 436, + SipStatusUnsupportedCertificate = 437, + SipStatusInvalidIdentityHeader = 438, + SipStatusFirstHopLacksOutboundSupport = 439, + SipStatusMaxBreadthExceeded = 440, + SipStatusBadInfoPackage = 469, + SipStatusConsentNeeded = 470, SipStatusTemporarilyUnavailable = 480, SipStatusCallTransactionDoesNotExists = 481, SipStatusLoopDetected = 482, @@ -6023,6 +6054,10 @@ pub enum SipStatusCode { SipStatusBusyHere = 486, SipStatusRequestTerminated = 487, SipStatusNotAcceptableHere = 488, + SipStatusBadEvent = 489, + SipStatusRequestPending = 491, + SipStatusUndecipherable = 493, + SipStatusSecurityAgreementRequired = 494, SipStatusInternalServerError = 500, SipStatusNotImplemented = 501, SipStatusBadGateway = 502, @@ -6034,6 +6069,8 @@ pub enum SipStatusCode { SipStatusGlobalDecline = 603, SipStatusGlobalDoesNotExistAnywhere = 604, SipStatusGlobalNotAcceptable = 606, + SipStatusGlobalUnwanted = 607, + SipStatusGlobalRejected = 608, } impl SipStatusCode { /// String value of the enum field names used in the ProtoBuf definition. @@ -6048,11 +6085,15 @@ impl SipStatusCode { SipStatusCode::SipStatusCallIsForwarded => "SIP_STATUS_CALL_IS_FORWARDED", SipStatusCode::SipStatusQueued => "SIP_STATUS_QUEUED", SipStatusCode::SipStatusSessionProgress => "SIP_STATUS_SESSION_PROGRESS", + SipStatusCode::SipStatusEarlyDialogTerminated => "SIP_STATUS_EARLY_DIALOG_TERMINATED", SipStatusCode::SipStatusOk => "SIP_STATUS_OK", SipStatusCode::SipStatusAccepted => "SIP_STATUS_ACCEPTED", + SipStatusCode::SipStatusNoNotification => "SIP_STATUS_NO_NOTIFICATION", + SipStatusCode::SipStatusMultipleChoices => "SIP_STATUS_MULTIPLE_CHOICES", SipStatusCode::SipStatusMovedPermanently => "SIP_STATUS_MOVED_PERMANENTLY", SipStatusCode::SipStatusMovedTemporarily => "SIP_STATUS_MOVED_TEMPORARILY", SipStatusCode::SipStatusUseProxy => "SIP_STATUS_USE_PROXY", + SipStatusCode::SipStatusAlternativeService => "SIP_STATUS_ALTERNATIVE_SERVICE", SipStatusCode::SipStatusBadRequest => "SIP_STATUS_BAD_REQUEST", SipStatusCode::SipStatusUnauthorized => "SIP_STATUS_UNAUTHORIZED", SipStatusCode::SipStatusPaymentRequired => "SIP_STATUS_PAYMENT_REQUIRED", @@ -6064,13 +6105,30 @@ impl SipStatusCode { SipStatusCode::SipStatusRequestTimeout => "SIP_STATUS_REQUEST_TIMEOUT", SipStatusCode::SipStatusConflict => "SIP_STATUS_CONFLICT", SipStatusCode::SipStatusGone => "SIP_STATUS_GONE", + SipStatusCode::SipStatusLengthRequired => "SIP_STATUS_LENGTH_REQUIRED", + SipStatusCode::SipStatusConditionalRequestFailed => "SIP_STATUS_CONDITIONAL_REQUEST_FAILED", SipStatusCode::SipStatusRequestEntityTooLarge => "SIP_STATUS_REQUEST_ENTITY_TOO_LARGE", SipStatusCode::SipStatusRequestUriTooLong => "SIP_STATUS_REQUEST_URI_TOO_LONG", SipStatusCode::SipStatusUnsupportedMediaType => "SIP_STATUS_UNSUPPORTED_MEDIA_TYPE", SipStatusCode::SipStatusRequestedRangeNotSatisfiable => "SIP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE", + SipStatusCode::SipStatusUnknownResourcePriority => "SIP_STATUS_UNKNOWN_RESOURCE_PRIORITY", SipStatusCode::SipStatusBadExtension => "SIP_STATUS_BAD_EXTENSION", SipStatusCode::SipStatusExtensionRequired => "SIP_STATUS_EXTENSION_REQUIRED", + SipStatusCode::SipStatusSessionIntervalTooSmall => "SIP_STATUS_SESSION_INTERVAL_TOO_SMALL", SipStatusCode::SipStatusIntervalTooBrief => "SIP_STATUS_INTERVAL_TOO_BRIEF", + SipStatusCode::SipStatusBadLocationInformation => "SIP_STATUS_BAD_LOCATION_INFORMATION", + SipStatusCode::SipStatusBadAlertMessage => "SIP_STATUS_BAD_ALERT_MESSAGE", + SipStatusCode::SipStatusUseIdentityHeader => "SIP_STATUS_USE_IDENTITY_HEADER", + SipStatusCode::SipStatusProvideReferrerIdentity => "SIP_STATUS_PROVIDE_REFERRER_IDENTITY", + SipStatusCode::SipStatusFlowFailed => "SIP_STATUS_FLOW_FAILED", + SipStatusCode::SipStatusAnonymityDisallowed => "SIP_STATUS_ANONYMITY_DISALLOWED", + SipStatusCode::SipStatusBadIdentityInfo => "SIP_STATUS_BAD_IDENTITY_INFO", + SipStatusCode::SipStatusUnsupportedCertificate => "SIP_STATUS_UNSUPPORTED_CERTIFICATE", + SipStatusCode::SipStatusInvalidIdentityHeader => "SIP_STATUS_INVALID_IDENTITY_HEADER", + SipStatusCode::SipStatusFirstHopLacksOutboundSupport => "SIP_STATUS_FIRST_HOP_LACKS_OUTBOUND_SUPPORT", + SipStatusCode::SipStatusMaxBreadthExceeded => "SIP_STATUS_MAX_BREADTH_EXCEEDED", + SipStatusCode::SipStatusBadInfoPackage => "SIP_STATUS_BAD_INFO_PACKAGE", + SipStatusCode::SipStatusConsentNeeded => "SIP_STATUS_CONSENT_NEEDED", SipStatusCode::SipStatusTemporarilyUnavailable => "SIP_STATUS_TEMPORARILY_UNAVAILABLE", SipStatusCode::SipStatusCallTransactionDoesNotExists => "SIP_STATUS_CALL_TRANSACTION_DOES_NOT_EXISTS", SipStatusCode::SipStatusLoopDetected => "SIP_STATUS_LOOP_DETECTED", @@ -6080,6 +6138,10 @@ impl SipStatusCode { SipStatusCode::SipStatusBusyHere => "SIP_STATUS_BUSY_HERE", SipStatusCode::SipStatusRequestTerminated => "SIP_STATUS_REQUEST_TERMINATED", SipStatusCode::SipStatusNotAcceptableHere => "SIP_STATUS_NOT_ACCEPTABLE_HERE", + SipStatusCode::SipStatusBadEvent => "SIP_STATUS_BAD_EVENT", + SipStatusCode::SipStatusRequestPending => "SIP_STATUS_REQUEST_PENDING", + SipStatusCode::SipStatusUndecipherable => "SIP_STATUS_UNDECIPHERABLE", + SipStatusCode::SipStatusSecurityAgreementRequired => "SIP_STATUS_SECURITY_AGREEMENT_REQUIRED", SipStatusCode::SipStatusInternalServerError => "SIP_STATUS_INTERNAL_SERVER_ERROR", SipStatusCode::SipStatusNotImplemented => "SIP_STATUS_NOT_IMPLEMENTED", SipStatusCode::SipStatusBadGateway => "SIP_STATUS_BAD_GATEWAY", @@ -6091,6 +6153,8 @@ impl SipStatusCode { SipStatusCode::SipStatusGlobalDecline => "SIP_STATUS_GLOBAL_DECLINE", SipStatusCode::SipStatusGlobalDoesNotExistAnywhere => "SIP_STATUS_GLOBAL_DOES_NOT_EXIST_ANYWHERE", SipStatusCode::SipStatusGlobalNotAcceptable => "SIP_STATUS_GLOBAL_NOT_ACCEPTABLE", + SipStatusCode::SipStatusGlobalUnwanted => "SIP_STATUS_GLOBAL_UNWANTED", + SipStatusCode::SipStatusGlobalRejected => "SIP_STATUS_GLOBAL_REJECTED", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -6102,11 +6166,15 @@ impl SipStatusCode { "SIP_STATUS_CALL_IS_FORWARDED" => Some(Self::SipStatusCallIsForwarded), "SIP_STATUS_QUEUED" => Some(Self::SipStatusQueued), "SIP_STATUS_SESSION_PROGRESS" => Some(Self::SipStatusSessionProgress), + "SIP_STATUS_EARLY_DIALOG_TERMINATED" => Some(Self::SipStatusEarlyDialogTerminated), "SIP_STATUS_OK" => Some(Self::SipStatusOk), "SIP_STATUS_ACCEPTED" => Some(Self::SipStatusAccepted), + "SIP_STATUS_NO_NOTIFICATION" => Some(Self::SipStatusNoNotification), + "SIP_STATUS_MULTIPLE_CHOICES" => Some(Self::SipStatusMultipleChoices), "SIP_STATUS_MOVED_PERMANENTLY" => Some(Self::SipStatusMovedPermanently), "SIP_STATUS_MOVED_TEMPORARILY" => Some(Self::SipStatusMovedTemporarily), "SIP_STATUS_USE_PROXY" => Some(Self::SipStatusUseProxy), + "SIP_STATUS_ALTERNATIVE_SERVICE" => Some(Self::SipStatusAlternativeService), "SIP_STATUS_BAD_REQUEST" => Some(Self::SipStatusBadRequest), "SIP_STATUS_UNAUTHORIZED" => Some(Self::SipStatusUnauthorized), "SIP_STATUS_PAYMENT_REQUIRED" => Some(Self::SipStatusPaymentRequired), @@ -6118,13 +6186,30 @@ impl SipStatusCode { "SIP_STATUS_REQUEST_TIMEOUT" => Some(Self::SipStatusRequestTimeout), "SIP_STATUS_CONFLICT" => Some(Self::SipStatusConflict), "SIP_STATUS_GONE" => Some(Self::SipStatusGone), + "SIP_STATUS_LENGTH_REQUIRED" => Some(Self::SipStatusLengthRequired), + "SIP_STATUS_CONDITIONAL_REQUEST_FAILED" => Some(Self::SipStatusConditionalRequestFailed), "SIP_STATUS_REQUEST_ENTITY_TOO_LARGE" => Some(Self::SipStatusRequestEntityTooLarge), "SIP_STATUS_REQUEST_URI_TOO_LONG" => Some(Self::SipStatusRequestUriTooLong), "SIP_STATUS_UNSUPPORTED_MEDIA_TYPE" => Some(Self::SipStatusUnsupportedMediaType), "SIP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE" => Some(Self::SipStatusRequestedRangeNotSatisfiable), + "SIP_STATUS_UNKNOWN_RESOURCE_PRIORITY" => Some(Self::SipStatusUnknownResourcePriority), "SIP_STATUS_BAD_EXTENSION" => Some(Self::SipStatusBadExtension), "SIP_STATUS_EXTENSION_REQUIRED" => Some(Self::SipStatusExtensionRequired), + "SIP_STATUS_SESSION_INTERVAL_TOO_SMALL" => Some(Self::SipStatusSessionIntervalTooSmall), "SIP_STATUS_INTERVAL_TOO_BRIEF" => Some(Self::SipStatusIntervalTooBrief), + "SIP_STATUS_BAD_LOCATION_INFORMATION" => Some(Self::SipStatusBadLocationInformation), + "SIP_STATUS_BAD_ALERT_MESSAGE" => Some(Self::SipStatusBadAlertMessage), + "SIP_STATUS_USE_IDENTITY_HEADER" => Some(Self::SipStatusUseIdentityHeader), + "SIP_STATUS_PROVIDE_REFERRER_IDENTITY" => Some(Self::SipStatusProvideReferrerIdentity), + "SIP_STATUS_FLOW_FAILED" => Some(Self::SipStatusFlowFailed), + "SIP_STATUS_ANONYMITY_DISALLOWED" => Some(Self::SipStatusAnonymityDisallowed), + "SIP_STATUS_BAD_IDENTITY_INFO" => Some(Self::SipStatusBadIdentityInfo), + "SIP_STATUS_UNSUPPORTED_CERTIFICATE" => Some(Self::SipStatusUnsupportedCertificate), + "SIP_STATUS_INVALID_IDENTITY_HEADER" => Some(Self::SipStatusInvalidIdentityHeader), + "SIP_STATUS_FIRST_HOP_LACKS_OUTBOUND_SUPPORT" => Some(Self::SipStatusFirstHopLacksOutboundSupport), + "SIP_STATUS_MAX_BREADTH_EXCEEDED" => Some(Self::SipStatusMaxBreadthExceeded), + "SIP_STATUS_BAD_INFO_PACKAGE" => Some(Self::SipStatusBadInfoPackage), + "SIP_STATUS_CONSENT_NEEDED" => Some(Self::SipStatusConsentNeeded), "SIP_STATUS_TEMPORARILY_UNAVAILABLE" => Some(Self::SipStatusTemporarilyUnavailable), "SIP_STATUS_CALL_TRANSACTION_DOES_NOT_EXISTS" => Some(Self::SipStatusCallTransactionDoesNotExists), "SIP_STATUS_LOOP_DETECTED" => Some(Self::SipStatusLoopDetected), @@ -6134,6 +6219,10 @@ impl SipStatusCode { "SIP_STATUS_BUSY_HERE" => Some(Self::SipStatusBusyHere), "SIP_STATUS_REQUEST_TERMINATED" => Some(Self::SipStatusRequestTerminated), "SIP_STATUS_NOT_ACCEPTABLE_HERE" => Some(Self::SipStatusNotAcceptableHere), + "SIP_STATUS_BAD_EVENT" => Some(Self::SipStatusBadEvent), + "SIP_STATUS_REQUEST_PENDING" => Some(Self::SipStatusRequestPending), + "SIP_STATUS_UNDECIPHERABLE" => Some(Self::SipStatusUndecipherable), + "SIP_STATUS_SECURITY_AGREEMENT_REQUIRED" => Some(Self::SipStatusSecurityAgreementRequired), "SIP_STATUS_INTERNAL_SERVER_ERROR" => Some(Self::SipStatusInternalServerError), "SIP_STATUS_NOT_IMPLEMENTED" => Some(Self::SipStatusNotImplemented), "SIP_STATUS_BAD_GATEWAY" => Some(Self::SipStatusBadGateway), @@ -6145,6 +6234,8 @@ impl SipStatusCode { "SIP_STATUS_GLOBAL_DECLINE" => Some(Self::SipStatusGlobalDecline), "SIP_STATUS_GLOBAL_DOES_NOT_EXIST_ANYWHERE" => Some(Self::SipStatusGlobalDoesNotExistAnywhere), "SIP_STATUS_GLOBAL_NOT_ACCEPTABLE" => Some(Self::SipStatusGlobalNotAcceptable), + "SIP_STATUS_GLOBAL_UNWANTED" => Some(Self::SipStatusGlobalUnwanted), + "SIP_STATUS_GLOBAL_REJECTED" => Some(Self::SipStatusGlobalRejected), _ => None, } } diff --git a/livekit-protocol/src/livekit.serde.rs b/livekit-protocol/src/livekit.serde.rs index 68f003636..ae66f2b6c 100644 --- a/livekit-protocol/src/livekit.serde.rs +++ b/livekit-protocol/src/livekit.serde.rs @@ -21478,6 +21478,8 @@ impl serde::Serialize for participant_info::KindDetail { let variant = match self { Self::CloudAgent => "CLOUD_AGENT", Self::Forwarded => "FORWARDED", + Self::ConnectorWhatsapp => "CONNECTOR_WHATSAPP", + Self::ConnectorTwilio => "CONNECTOR_TWILIO", }; serializer.serialize_str(variant) } @@ -21491,6 +21493,8 @@ impl<'de> serde::Deserialize<'de> for participant_info::KindDetail { const FIELDS: &[&str] = &[ "CLOUD_AGENT", "FORWARDED", + "CONNECTOR_WHATSAPP", + "CONNECTOR_TWILIO", ]; struct GeneratedVisitor; @@ -21533,6 +21537,8 @@ impl<'de> serde::Deserialize<'de> for participant_info::KindDetail { match value { "CLOUD_AGENT" => Ok(participant_info::KindDetail::CloudAgent), "FORWARDED" => Ok(participant_info::KindDetail::Forwarded), + "CONNECTOR_WHATSAPP" => Ok(participant_info::KindDetail::ConnectorWhatsapp), + "CONNECTOR_TWILIO" => Ok(participant_info::KindDetail::ConnectorTwilio), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -32170,11 +32176,15 @@ impl serde::Serialize for SipStatusCode { Self::SipStatusCallIsForwarded => "SIP_STATUS_CALL_IS_FORWARDED", Self::SipStatusQueued => "SIP_STATUS_QUEUED", Self::SipStatusSessionProgress => "SIP_STATUS_SESSION_PROGRESS", + Self::SipStatusEarlyDialogTerminated => "SIP_STATUS_EARLY_DIALOG_TERMINATED", Self::SipStatusOk => "SIP_STATUS_OK", Self::SipStatusAccepted => "SIP_STATUS_ACCEPTED", + Self::SipStatusNoNotification => "SIP_STATUS_NO_NOTIFICATION", + Self::SipStatusMultipleChoices => "SIP_STATUS_MULTIPLE_CHOICES", Self::SipStatusMovedPermanently => "SIP_STATUS_MOVED_PERMANENTLY", Self::SipStatusMovedTemporarily => "SIP_STATUS_MOVED_TEMPORARILY", Self::SipStatusUseProxy => "SIP_STATUS_USE_PROXY", + Self::SipStatusAlternativeService => "SIP_STATUS_ALTERNATIVE_SERVICE", Self::SipStatusBadRequest => "SIP_STATUS_BAD_REQUEST", Self::SipStatusUnauthorized => "SIP_STATUS_UNAUTHORIZED", Self::SipStatusPaymentRequired => "SIP_STATUS_PAYMENT_REQUIRED", @@ -32186,13 +32196,30 @@ impl serde::Serialize for SipStatusCode { Self::SipStatusRequestTimeout => "SIP_STATUS_REQUEST_TIMEOUT", Self::SipStatusConflict => "SIP_STATUS_CONFLICT", Self::SipStatusGone => "SIP_STATUS_GONE", + Self::SipStatusLengthRequired => "SIP_STATUS_LENGTH_REQUIRED", + Self::SipStatusConditionalRequestFailed => "SIP_STATUS_CONDITIONAL_REQUEST_FAILED", Self::SipStatusRequestEntityTooLarge => "SIP_STATUS_REQUEST_ENTITY_TOO_LARGE", Self::SipStatusRequestUriTooLong => "SIP_STATUS_REQUEST_URI_TOO_LONG", Self::SipStatusUnsupportedMediaType => "SIP_STATUS_UNSUPPORTED_MEDIA_TYPE", Self::SipStatusRequestedRangeNotSatisfiable => "SIP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE", + Self::SipStatusUnknownResourcePriority => "SIP_STATUS_UNKNOWN_RESOURCE_PRIORITY", Self::SipStatusBadExtension => "SIP_STATUS_BAD_EXTENSION", Self::SipStatusExtensionRequired => "SIP_STATUS_EXTENSION_REQUIRED", + Self::SipStatusSessionIntervalTooSmall => "SIP_STATUS_SESSION_INTERVAL_TOO_SMALL", Self::SipStatusIntervalTooBrief => "SIP_STATUS_INTERVAL_TOO_BRIEF", + Self::SipStatusBadLocationInformation => "SIP_STATUS_BAD_LOCATION_INFORMATION", + Self::SipStatusBadAlertMessage => "SIP_STATUS_BAD_ALERT_MESSAGE", + Self::SipStatusUseIdentityHeader => "SIP_STATUS_USE_IDENTITY_HEADER", + Self::SipStatusProvideReferrerIdentity => "SIP_STATUS_PROVIDE_REFERRER_IDENTITY", + Self::SipStatusFlowFailed => "SIP_STATUS_FLOW_FAILED", + Self::SipStatusAnonymityDisallowed => "SIP_STATUS_ANONYMITY_DISALLOWED", + Self::SipStatusBadIdentityInfo => "SIP_STATUS_BAD_IDENTITY_INFO", + Self::SipStatusUnsupportedCertificate => "SIP_STATUS_UNSUPPORTED_CERTIFICATE", + Self::SipStatusInvalidIdentityHeader => "SIP_STATUS_INVALID_IDENTITY_HEADER", + Self::SipStatusFirstHopLacksOutboundSupport => "SIP_STATUS_FIRST_HOP_LACKS_OUTBOUND_SUPPORT", + Self::SipStatusMaxBreadthExceeded => "SIP_STATUS_MAX_BREADTH_EXCEEDED", + Self::SipStatusBadInfoPackage => "SIP_STATUS_BAD_INFO_PACKAGE", + Self::SipStatusConsentNeeded => "SIP_STATUS_CONSENT_NEEDED", Self::SipStatusTemporarilyUnavailable => "SIP_STATUS_TEMPORARILY_UNAVAILABLE", Self::SipStatusCallTransactionDoesNotExists => "SIP_STATUS_CALL_TRANSACTION_DOES_NOT_EXISTS", Self::SipStatusLoopDetected => "SIP_STATUS_LOOP_DETECTED", @@ -32202,6 +32229,10 @@ impl serde::Serialize for SipStatusCode { Self::SipStatusBusyHere => "SIP_STATUS_BUSY_HERE", Self::SipStatusRequestTerminated => "SIP_STATUS_REQUEST_TERMINATED", Self::SipStatusNotAcceptableHere => "SIP_STATUS_NOT_ACCEPTABLE_HERE", + Self::SipStatusBadEvent => "SIP_STATUS_BAD_EVENT", + Self::SipStatusRequestPending => "SIP_STATUS_REQUEST_PENDING", + Self::SipStatusUndecipherable => "SIP_STATUS_UNDECIPHERABLE", + Self::SipStatusSecurityAgreementRequired => "SIP_STATUS_SECURITY_AGREEMENT_REQUIRED", Self::SipStatusInternalServerError => "SIP_STATUS_INTERNAL_SERVER_ERROR", Self::SipStatusNotImplemented => "SIP_STATUS_NOT_IMPLEMENTED", Self::SipStatusBadGateway => "SIP_STATUS_BAD_GATEWAY", @@ -32213,6 +32244,8 @@ impl serde::Serialize for SipStatusCode { Self::SipStatusGlobalDecline => "SIP_STATUS_GLOBAL_DECLINE", Self::SipStatusGlobalDoesNotExistAnywhere => "SIP_STATUS_GLOBAL_DOES_NOT_EXIST_ANYWHERE", Self::SipStatusGlobalNotAcceptable => "SIP_STATUS_GLOBAL_NOT_ACCEPTABLE", + Self::SipStatusGlobalUnwanted => "SIP_STATUS_GLOBAL_UNWANTED", + Self::SipStatusGlobalRejected => "SIP_STATUS_GLOBAL_REJECTED", }; serializer.serialize_str(variant) } @@ -32230,11 +32263,15 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_CALL_IS_FORWARDED", "SIP_STATUS_QUEUED", "SIP_STATUS_SESSION_PROGRESS", + "SIP_STATUS_EARLY_DIALOG_TERMINATED", "SIP_STATUS_OK", "SIP_STATUS_ACCEPTED", + "SIP_STATUS_NO_NOTIFICATION", + "SIP_STATUS_MULTIPLE_CHOICES", "SIP_STATUS_MOVED_PERMANENTLY", "SIP_STATUS_MOVED_TEMPORARILY", "SIP_STATUS_USE_PROXY", + "SIP_STATUS_ALTERNATIVE_SERVICE", "SIP_STATUS_BAD_REQUEST", "SIP_STATUS_UNAUTHORIZED", "SIP_STATUS_PAYMENT_REQUIRED", @@ -32246,13 +32283,30 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_REQUEST_TIMEOUT", "SIP_STATUS_CONFLICT", "SIP_STATUS_GONE", + "SIP_STATUS_LENGTH_REQUIRED", + "SIP_STATUS_CONDITIONAL_REQUEST_FAILED", "SIP_STATUS_REQUEST_ENTITY_TOO_LARGE", "SIP_STATUS_REQUEST_URI_TOO_LONG", "SIP_STATUS_UNSUPPORTED_MEDIA_TYPE", "SIP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE", + "SIP_STATUS_UNKNOWN_RESOURCE_PRIORITY", "SIP_STATUS_BAD_EXTENSION", "SIP_STATUS_EXTENSION_REQUIRED", + "SIP_STATUS_SESSION_INTERVAL_TOO_SMALL", "SIP_STATUS_INTERVAL_TOO_BRIEF", + "SIP_STATUS_BAD_LOCATION_INFORMATION", + "SIP_STATUS_BAD_ALERT_MESSAGE", + "SIP_STATUS_USE_IDENTITY_HEADER", + "SIP_STATUS_PROVIDE_REFERRER_IDENTITY", + "SIP_STATUS_FLOW_FAILED", + "SIP_STATUS_ANONYMITY_DISALLOWED", + "SIP_STATUS_BAD_IDENTITY_INFO", + "SIP_STATUS_UNSUPPORTED_CERTIFICATE", + "SIP_STATUS_INVALID_IDENTITY_HEADER", + "SIP_STATUS_FIRST_HOP_LACKS_OUTBOUND_SUPPORT", + "SIP_STATUS_MAX_BREADTH_EXCEEDED", + "SIP_STATUS_BAD_INFO_PACKAGE", + "SIP_STATUS_CONSENT_NEEDED", "SIP_STATUS_TEMPORARILY_UNAVAILABLE", "SIP_STATUS_CALL_TRANSACTION_DOES_NOT_EXISTS", "SIP_STATUS_LOOP_DETECTED", @@ -32262,6 +32316,10 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_BUSY_HERE", "SIP_STATUS_REQUEST_TERMINATED", "SIP_STATUS_NOT_ACCEPTABLE_HERE", + "SIP_STATUS_BAD_EVENT", + "SIP_STATUS_REQUEST_PENDING", + "SIP_STATUS_UNDECIPHERABLE", + "SIP_STATUS_SECURITY_AGREEMENT_REQUIRED", "SIP_STATUS_INTERNAL_SERVER_ERROR", "SIP_STATUS_NOT_IMPLEMENTED", "SIP_STATUS_BAD_GATEWAY", @@ -32273,6 +32331,8 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_GLOBAL_DECLINE", "SIP_STATUS_GLOBAL_DOES_NOT_EXIST_ANYWHERE", "SIP_STATUS_GLOBAL_NOT_ACCEPTABLE", + "SIP_STATUS_GLOBAL_UNWANTED", + "SIP_STATUS_GLOBAL_REJECTED", ]; struct GeneratedVisitor; @@ -32319,11 +32379,15 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_CALL_IS_FORWARDED" => Ok(SipStatusCode::SipStatusCallIsForwarded), "SIP_STATUS_QUEUED" => Ok(SipStatusCode::SipStatusQueued), "SIP_STATUS_SESSION_PROGRESS" => Ok(SipStatusCode::SipStatusSessionProgress), + "SIP_STATUS_EARLY_DIALOG_TERMINATED" => Ok(SipStatusCode::SipStatusEarlyDialogTerminated), "SIP_STATUS_OK" => Ok(SipStatusCode::SipStatusOk), "SIP_STATUS_ACCEPTED" => Ok(SipStatusCode::SipStatusAccepted), + "SIP_STATUS_NO_NOTIFICATION" => Ok(SipStatusCode::SipStatusNoNotification), + "SIP_STATUS_MULTIPLE_CHOICES" => Ok(SipStatusCode::SipStatusMultipleChoices), "SIP_STATUS_MOVED_PERMANENTLY" => Ok(SipStatusCode::SipStatusMovedPermanently), "SIP_STATUS_MOVED_TEMPORARILY" => Ok(SipStatusCode::SipStatusMovedTemporarily), "SIP_STATUS_USE_PROXY" => Ok(SipStatusCode::SipStatusUseProxy), + "SIP_STATUS_ALTERNATIVE_SERVICE" => Ok(SipStatusCode::SipStatusAlternativeService), "SIP_STATUS_BAD_REQUEST" => Ok(SipStatusCode::SipStatusBadRequest), "SIP_STATUS_UNAUTHORIZED" => Ok(SipStatusCode::SipStatusUnauthorized), "SIP_STATUS_PAYMENT_REQUIRED" => Ok(SipStatusCode::SipStatusPaymentRequired), @@ -32335,13 +32399,30 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_REQUEST_TIMEOUT" => Ok(SipStatusCode::SipStatusRequestTimeout), "SIP_STATUS_CONFLICT" => Ok(SipStatusCode::SipStatusConflict), "SIP_STATUS_GONE" => Ok(SipStatusCode::SipStatusGone), + "SIP_STATUS_LENGTH_REQUIRED" => Ok(SipStatusCode::SipStatusLengthRequired), + "SIP_STATUS_CONDITIONAL_REQUEST_FAILED" => Ok(SipStatusCode::SipStatusConditionalRequestFailed), "SIP_STATUS_REQUEST_ENTITY_TOO_LARGE" => Ok(SipStatusCode::SipStatusRequestEntityTooLarge), "SIP_STATUS_REQUEST_URI_TOO_LONG" => Ok(SipStatusCode::SipStatusRequestUriTooLong), "SIP_STATUS_UNSUPPORTED_MEDIA_TYPE" => Ok(SipStatusCode::SipStatusUnsupportedMediaType), "SIP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE" => Ok(SipStatusCode::SipStatusRequestedRangeNotSatisfiable), + "SIP_STATUS_UNKNOWN_RESOURCE_PRIORITY" => Ok(SipStatusCode::SipStatusUnknownResourcePriority), "SIP_STATUS_BAD_EXTENSION" => Ok(SipStatusCode::SipStatusBadExtension), "SIP_STATUS_EXTENSION_REQUIRED" => Ok(SipStatusCode::SipStatusExtensionRequired), + "SIP_STATUS_SESSION_INTERVAL_TOO_SMALL" => Ok(SipStatusCode::SipStatusSessionIntervalTooSmall), "SIP_STATUS_INTERVAL_TOO_BRIEF" => Ok(SipStatusCode::SipStatusIntervalTooBrief), + "SIP_STATUS_BAD_LOCATION_INFORMATION" => Ok(SipStatusCode::SipStatusBadLocationInformation), + "SIP_STATUS_BAD_ALERT_MESSAGE" => Ok(SipStatusCode::SipStatusBadAlertMessage), + "SIP_STATUS_USE_IDENTITY_HEADER" => Ok(SipStatusCode::SipStatusUseIdentityHeader), + "SIP_STATUS_PROVIDE_REFERRER_IDENTITY" => Ok(SipStatusCode::SipStatusProvideReferrerIdentity), + "SIP_STATUS_FLOW_FAILED" => Ok(SipStatusCode::SipStatusFlowFailed), + "SIP_STATUS_ANONYMITY_DISALLOWED" => Ok(SipStatusCode::SipStatusAnonymityDisallowed), + "SIP_STATUS_BAD_IDENTITY_INFO" => Ok(SipStatusCode::SipStatusBadIdentityInfo), + "SIP_STATUS_UNSUPPORTED_CERTIFICATE" => Ok(SipStatusCode::SipStatusUnsupportedCertificate), + "SIP_STATUS_INVALID_IDENTITY_HEADER" => Ok(SipStatusCode::SipStatusInvalidIdentityHeader), + "SIP_STATUS_FIRST_HOP_LACKS_OUTBOUND_SUPPORT" => Ok(SipStatusCode::SipStatusFirstHopLacksOutboundSupport), + "SIP_STATUS_MAX_BREADTH_EXCEEDED" => Ok(SipStatusCode::SipStatusMaxBreadthExceeded), + "SIP_STATUS_BAD_INFO_PACKAGE" => Ok(SipStatusCode::SipStatusBadInfoPackage), + "SIP_STATUS_CONSENT_NEEDED" => Ok(SipStatusCode::SipStatusConsentNeeded), "SIP_STATUS_TEMPORARILY_UNAVAILABLE" => Ok(SipStatusCode::SipStatusTemporarilyUnavailable), "SIP_STATUS_CALL_TRANSACTION_DOES_NOT_EXISTS" => Ok(SipStatusCode::SipStatusCallTransactionDoesNotExists), "SIP_STATUS_LOOP_DETECTED" => Ok(SipStatusCode::SipStatusLoopDetected), @@ -32351,6 +32432,10 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_BUSY_HERE" => Ok(SipStatusCode::SipStatusBusyHere), "SIP_STATUS_REQUEST_TERMINATED" => Ok(SipStatusCode::SipStatusRequestTerminated), "SIP_STATUS_NOT_ACCEPTABLE_HERE" => Ok(SipStatusCode::SipStatusNotAcceptableHere), + "SIP_STATUS_BAD_EVENT" => Ok(SipStatusCode::SipStatusBadEvent), + "SIP_STATUS_REQUEST_PENDING" => Ok(SipStatusCode::SipStatusRequestPending), + "SIP_STATUS_UNDECIPHERABLE" => Ok(SipStatusCode::SipStatusUndecipherable), + "SIP_STATUS_SECURITY_AGREEMENT_REQUIRED" => Ok(SipStatusCode::SipStatusSecurityAgreementRequired), "SIP_STATUS_INTERNAL_SERVER_ERROR" => Ok(SipStatusCode::SipStatusInternalServerError), "SIP_STATUS_NOT_IMPLEMENTED" => Ok(SipStatusCode::SipStatusNotImplemented), "SIP_STATUS_BAD_GATEWAY" => Ok(SipStatusCode::SipStatusBadGateway), @@ -32362,6 +32447,8 @@ impl<'de> serde::Deserialize<'de> for SipStatusCode { "SIP_STATUS_GLOBAL_DECLINE" => Ok(SipStatusCode::SipStatusGlobalDecline), "SIP_STATUS_GLOBAL_DOES_NOT_EXIST_ANYWHERE" => Ok(SipStatusCode::SipStatusGlobalDoesNotExistAnywhere), "SIP_STATUS_GLOBAL_NOT_ACCEPTABLE" => Ok(SipStatusCode::SipStatusGlobalNotAcceptable), + "SIP_STATUS_GLOBAL_UNWANTED" => Ok(SipStatusCode::SipStatusGlobalUnwanted), + "SIP_STATUS_GLOBAL_REJECTED" => Ok(SipStatusCode::SipStatusGlobalRejected), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -36804,6 +36891,12 @@ impl serde::Serialize for StreamInfo { if !self.error.is_empty() { len += 1; } + if self.last_retry_at != 0 { + len += 1; + } + if self.retries != 0 { + len += 1; + } let mut struct_ser = serializer.serialize_struct("livekit.StreamInfo", len)?; if !self.url.is_empty() { struct_ser.serialize_field("url", &self.url)?; @@ -36831,6 +36924,14 @@ impl serde::Serialize for StreamInfo { if !self.error.is_empty() { struct_ser.serialize_field("error", &self.error)?; } + if self.last_retry_at != 0 { + #[allow(clippy::needless_borrow)] + #[allow(clippy::needless_borrows_for_generic_args)] + struct_ser.serialize_field("lastRetryAt", ToString::to_string(&self.last_retry_at).as_str())?; + } + if self.retries != 0 { + struct_ser.serialize_field("retries", &self.retries)?; + } struct_ser.end() } } @@ -36849,6 +36950,9 @@ impl<'de> serde::Deserialize<'de> for StreamInfo { "duration", "status", "error", + "last_retry_at", + "lastRetryAt", + "retries", ]; #[allow(clippy::enum_variant_names)] @@ -36859,6 +36963,8 @@ impl<'de> serde::Deserialize<'de> for StreamInfo { Duration, Status, Error, + LastRetryAt, + Retries, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -36887,6 +36993,8 @@ impl<'de> serde::Deserialize<'de> for StreamInfo { "duration" => Ok(GeneratedField::Duration), "status" => Ok(GeneratedField::Status), "error" => Ok(GeneratedField::Error), + "lastRetryAt" | "last_retry_at" => Ok(GeneratedField::LastRetryAt), + "retries" => Ok(GeneratedField::Retries), _ => Ok(GeneratedField::__SkipField__), } } @@ -36912,6 +37020,8 @@ impl<'de> serde::Deserialize<'de> for StreamInfo { let mut duration__ = None; let mut status__ = None; let mut error__ = None; + let mut last_retry_at__ = None; + let mut retries__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Url => { @@ -36956,6 +37066,22 @@ impl<'de> serde::Deserialize<'de> for StreamInfo { } error__ = Some(map_.next_value()?); } + GeneratedField::LastRetryAt => { + if last_retry_at__.is_some() { + return Err(serde::de::Error::duplicate_field("lastRetryAt")); + } + last_retry_at__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Retries => { + if retries__.is_some() { + return Err(serde::de::Error::duplicate_field("retries")); + } + retries__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -36968,6 +37094,8 @@ impl<'de> serde::Deserialize<'de> for StreamInfo { duration: duration__.unwrap_or_default(), status: status__.unwrap_or_default(), error: error__.unwrap_or_default(), + last_retry_at: last_retry_at__.unwrap_or_default(), + retries: retries__.unwrap_or_default(), }) } }