diff --git a/livekit-protocol/src/livekit.rs b/livekit-protocol/src/livekit.rs index 9c3107e4..19181c25 100644 --- a/livekit-protocol/src/livekit.rs +++ b/livekit-protocol/src/livekit.rs @@ -124,12 +124,6 @@ pub enum MetricLabel { ClientVideoPublisherQualityLimitationDurationCpu = 15, /// total duration spent in other quality limitation ClientVideoPublisherQualityLimitationDurationOther = 16, - /// Publisher RTT (participant -> server) - PublisherRtt = 17, - /// RTT between publisher node and subscriber node (could involve intermedia node(s)) - ServerMeshRtt = 18, - /// Subscribe RTT (server -> participant) - SubscriberRtt = 19, PredefinedMaxValue = 4096, } impl MetricLabel { @@ -156,9 +150,6 @@ impl MetricLabel { MetricLabel::ClientVideoPublisherQualityLimitationDurationBandwidth => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", MetricLabel::ClientVideoPublisherQualityLimitationDurationCpu => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", MetricLabel::ClientVideoPublisherQualityLimitationDurationOther => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", - MetricLabel::PublisherRtt => "PUBLISHER_RTT", - MetricLabel::ServerMeshRtt => "SERVER_MESH_RTT", - MetricLabel::SubscriberRtt => "SUBSCRIBER_RTT", MetricLabel::PredefinedMaxValue => "METRIC_LABEL_PREDEFINED_MAX_VALUE", } } @@ -182,9 +173,6 @@ impl MetricLabel { "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH" => Some(Self::ClientVideoPublisherQualityLimitationDurationBandwidth), "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU" => Some(Self::ClientVideoPublisherQualityLimitationDurationCpu), "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER" => Some(Self::ClientVideoPublisherQualityLimitationDurationOther), - "PUBLISHER_RTT" => Some(Self::PublisherRtt), - "SERVER_MESH_RTT" => Some(Self::ServerMeshRtt), - "SUBSCRIBER_RTT" => Some(Self::SubscriberRtt), "METRIC_LABEL_PREDEFINED_MAX_VALUE" => Some(Self::PredefinedMaxValue), _ => None, } @@ -515,7 +503,7 @@ pub struct DataPacket { /// identities of participants who will receive the message (sent to all by default) #[prost(string, repeated, tag="5")] pub destination_identities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(oneof="data_packet::Value", tags="2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14")] + #[prost(oneof="data_packet::Value", tags="2, 3, 6, 7, 8, 9, 10, 11, 12")] pub value: ::core::option::Option, } /// Nested message and enum types in `DataPacket`. @@ -567,10 +555,6 @@ pub mod data_packet { RpcAck(super::RpcAck), #[prost(message, tag="12")] RpcResponse(super::RpcResponse), - #[prost(message, tag="13")] - StreamHeader(super::data_stream::Header), - #[prost(message, tag="14")] - StreamChunk(super::data_stream::Chunk), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -1116,136 +1100,6 @@ pub struct TimedVersion { #[prost(int32, tag="2")] pub ticks: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DataStream { -} -/// Nested message and enum types in `DataStream`. -pub mod data_stream { - /// header properties specific to text streams - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct TextHeader { - #[prost(enumeration="OperationType", tag="1")] - pub operation_type: i32, - /// Optional: Version for updates/edits - #[prost(int32, tag="2")] - pub version: i32, - /// Optional: Reply to specific message - #[prost(string, tag="3")] - pub reply_to_stream_id: ::prost::alloc::string::String, - /// file attachments for text streams - #[prost(string, repeated, tag="4")] - pub attached_stream_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// true if the text has been generated by an agent from a participant's audio transcription - #[prost(bool, tag="5")] - pub generated: bool, - } - /// header properties specific to file or image streams - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct FileHeader { - /// name of the file - #[prost(string, tag="1")] - pub file_name: ::prost::alloc::string::String, - } - /// main DataStream.Header that contains a oneof for specific headers - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Header { - /// unique identifier for this data stream - #[prost(string, tag="1")] - pub stream_id: ::prost::alloc::string::String, - /// using int64 for Unix timestamp - #[prost(int64, tag="2")] - pub timestamp: i64, - #[prost(string, tag="3")] - pub topic: ::prost::alloc::string::String, - #[prost(string, tag="4")] - pub mime_type: ::prost::alloc::string::String, - /// only populated for finite streams, if it's a stream of unknown size this stays empty - #[prost(uint64, optional, tag="5")] - pub total_length: ::core::option::Option, - /// only populated for finite streams, if it's a stream of unknown size this stays empty - #[prost(uint64, optional, tag="6")] - pub total_chunks: ::core::option::Option, - /// defaults to NONE - #[prost(enumeration="super::encryption::Type", tag="7")] - pub encryption_type: i32, - /// user defined extensions map that can carry additional info - #[prost(map="string, string", tag="8")] - pub extensions: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// oneof to choose between specific header types - #[prost(oneof="header::ContentHeader", tags="9, 10")] - pub content_header: ::core::option::Option, - } - /// Nested message and enum types in `Header`. - pub mod header { - /// oneof to choose between specific header types - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum ContentHeader { - #[prost(message, tag="9")] - TextHeader(super::TextHeader), - #[prost(message, tag="10")] - FileHeader(super::FileHeader), - } - } - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] - pub struct Chunk { - /// unique identifier for this data stream to map it to the correct header - #[prost(string, tag="1")] - pub stream_id: ::prost::alloc::string::String, - #[prost(uint64, tag="2")] - pub chunk_index: u64, - /// content as binary (bytes) - #[prost(bytes="vec", tag="3")] - pub content: ::prost::alloc::vec::Vec, - /// true only if this is the last chunk of this stream - can also be sent with empty content - #[prost(bool, tag="4")] - pub complete: bool, - /// a version indicating that this chunk_index has been retroactively modified and the original one needs to be replaced - #[prost(int32, tag="5")] - pub version: i32, - /// optional, initialization vector for AES-GCM encryption - #[prost(bytes="vec", optional, tag="6")] - pub iv: ::core::option::Option<::prost::alloc::vec::Vec>, - } - /// enum for operation types (specific to TextHeader) - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - pub enum OperationType { - Create = 0, - Update = 1, - Delete = 2, - Reaction = 3, - } - impl OperationType { - /// 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 { - OperationType::Create => "CREATE", - OperationType::Update => "UPDATE", - OperationType::Delete => "DELETE", - OperationType::Reaction => "REACTION", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "CREATE" => Some(Self::Create), - "UPDATE" => Some(Self::Update), - "DELETE" => Some(Self::Delete), - "REACTION" => Some(Self::Reaction), - _ => None, - } - } - } -} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum AudioCodec { @@ -1517,12 +1371,6 @@ pub enum DisconnectReason { SignalClose = 9, /// the room was closed, due to all Standard and Ingress participants having left RoomClosed = 10, - /// SIP callee did not respond in time - UserUnavailable = 11, - /// SIP callee rejected the call (busy) - UserRejected = 12, - /// SIP protocol failure or unexpected response - SipTrunkFailure = 13, } impl DisconnectReason { /// String value of the enum field names used in the ProtoBuf definition. @@ -1542,9 +1390,6 @@ impl DisconnectReason { DisconnectReason::Migration => "MIGRATION", DisconnectReason::SignalClose => "SIGNAL_CLOSE", DisconnectReason::RoomClosed => "ROOM_CLOSED", - DisconnectReason::UserUnavailable => "USER_UNAVAILABLE", - DisconnectReason::UserRejected => "USER_REJECTED", - DisconnectReason::SipTrunkFailure => "SIP_TRUNK_FAILURE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1561,9 +1406,6 @@ impl DisconnectReason { "MIGRATION" => Some(Self::Migration), "SIGNAL_CLOSE" => Some(Self::SignalClose), "ROOM_CLOSED" => Some(Self::RoomClosed), - "USER_UNAVAILABLE" => Some(Self::UserUnavailable), - "USER_REJECTED" => Some(Self::UserRejected), - "SIP_TRUNK_FAILURE" => Some(Self::SipTrunkFailure), _ => None, } } @@ -2231,11 +2073,6 @@ pub struct EgressInfo { pub segment_results: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag="20")] pub image_results: ::prost::alloc::vec::Vec, - #[prost(string, tag="23")] - pub manifest_location: ::prost::alloc::string::String, - /// next ID: 26 - #[prost(bool, tag="25")] - pub backup_storage_used: bool, #[prost(oneof="egress_info::Request", tags="4, 14, 19, 5, 6")] pub request: ::core::option::Option, /// deprecated (use _result fields) @@ -3634,8 +3471,8 @@ pub struct UpdateWorkerStatus { /// optional string metadata = 2 \[deprecated=true\]; #[prost(float, tag="3")] pub load: f32, - #[prost(uint32, tag="4")] - pub job_count: u32, + #[prost(int32, tag="4")] + pub job_count: i32, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -3813,7 +3650,7 @@ pub struct CreateRoomRequest { pub name: ::prost::alloc::string::String, /// configuration to use for this room parameters. Setting parameters below override the config defaults. #[prost(string, tag="12")] - pub room_preset: ::prost::alloc::string::String, + pub config_name: ::prost::alloc::string::String, /// number of seconds to keep the room open if no one joins #[prost(uint32, tag="2")] pub empty_timeout: u32, @@ -3829,9 +3666,12 @@ pub struct CreateRoomRequest { /// metadata of room #[prost(string, tag="5")] pub metadata: ::prost::alloc::string::String, - /// auto-egress configurations + /// egress #[prost(message, optional, tag="6")] pub egress: ::core::option::Option, + /// agent + #[prost(message, optional, tag="11")] + pub agent: ::core::option::Option, /// playout delay of subscriber #[prost(uint32, tag="7")] pub min_playout_delay: u32, @@ -3842,13 +3682,10 @@ pub struct CreateRoomRequest { #[prost(bool, tag="9")] pub sync_streams: bool, /// replay + /// + /// NEXT-ID: 14 #[prost(bool, tag="13")] pub replay_enabled: bool, - /// Define agents that should be dispatched to this room - /// - /// NEXT-ID: 15 - #[prost(message, repeated, tag="14")] - pub agents: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -4026,12 +3863,15 @@ pub struct RoomConfiguration { /// number of seconds to keep the room open after everyone leaves #[prost(uint32, tag="3")] pub departure_timeout: u32, - /// limit number of participants that can be in a room, excluding Egress and Ingress participants + /// limit number of participants that can be in a room #[prost(uint32, tag="4")] pub max_participants: u32, /// egress #[prost(message, optional, tag="5")] pub egress: ::core::option::Option, + /// agent + #[prost(message, optional, tag="6")] + pub agent: ::core::option::Option, /// playout delay of subscriber #[prost(uint32, tag="7")] pub min_playout_delay: u32, @@ -4041,9 +3881,6 @@ pub struct RoomConfiguration { /// so not recommended for rooms with frequent subscription changes #[prost(bool, tag="9")] pub sync_streams: bool, - /// Define agents that should be dispatched to this room - #[prost(message, repeated, tag="10")] - pub agents: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -4632,18 +4469,6 @@ pub struct SipInboundTrunkInfo { /// Map SIP X-* headers from INVITE to SIP participant attributes. #[prost(map="string, string", tag="10")] pub headers_to_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// Map LiveKit attributes to SIP X-* headers when sending BYE or REFER requests. - /// Keys are the names of attributes and values are the names of X-* headers they will be mapped to. - #[prost(map="string, string", tag="14")] - pub attributes_to_headers: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// Max time for the caller to wait for track subscription. - #[prost(message, optional, tag="11")] - pub ringing_timeout: ::core::option::Option<::pbjson_types::Duration>, - /// Max call duration. - #[prost(message, optional, tag="12")] - pub max_call_duration: ::core::option::Option<::pbjson_types::Duration>, - #[prost(bool, tag="13")] - pub krisp_enabled: bool, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -4687,10 +4512,6 @@ pub struct SipOutboundTrunkInfo { /// Keys are the names of X-* headers and values are the names of attributes they will be mapped to. #[prost(map="string, string", tag="10")] pub headers_to_attributes: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - /// Map LiveKit attributes to SIP X-* headers when sending BYE or REFER requests. - /// Keys are the names of attributes and values are the names of X-* headers they will be mapped to. - #[prost(map="string, string", tag="11")] - pub attributes_to_headers: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -4890,9 +4711,6 @@ pub struct CreateSipParticipantRequest { /// What number should be dialed via SIP #[prost(string, tag="2")] pub sip_call_to: ::prost::alloc::string::String, - /// Optional SIP From number to use. If empty, trunk number is used. - #[prost(string, tag="15")] - pub sip_number: ::prost::alloc::string::String, /// What LiveKit room should this participant be connected too #[prost(string, tag="3")] pub room_name: ::prost::alloc::string::String, @@ -4912,27 +4730,13 @@ pub struct CreateSipParticipantRequest { /// Character 'w' can be used to add a 0.5 sec delay. #[prost(string, tag="5")] pub dtmf: ::prost::alloc::string::String, - /// Optionally play dialtone in the room as an audible indicator for existing participants. The `play_ringtone` option is deprectated but has the same effect. - #[deprecated] + /// Optionally play ringtone in the room as an audible indicator for existing participants #[prost(bool, tag="6")] pub play_ringtone: bool, - #[prost(bool, tag="13")] - pub play_dialtone: bool, /// By default the From value (Phone number) is used for participant name/identity (if not set) and added to attributes. /// If true, a random value for identity will be used and numbers will be omitted from attributes. #[prost(bool, tag="10")] pub hide_phone_number: bool, - /// Max time for the callee to answer the call. - #[prost(message, optional, tag="11")] - pub ringing_timeout: ::core::option::Option<::pbjson_types::Duration>, - /// Max call duration. - #[prost(message, optional, tag="12")] - pub max_call_duration: ::core::option::Option<::pbjson_types::Duration>, - /// Enable voice isolation for the callee. - /// - /// NEXT ID: 16 - #[prost(bool, tag="14")] - pub enable_krisp: bool, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -4955,56 +4759,6 @@ pub struct TransferSipParticipantRequest { pub room_name: ::prost::alloc::string::String, #[prost(string, tag="3")] pub transfer_to: ::prost::alloc::string::String, - /// Optionally play dialtone to the SIP participant as an audible indicator of being transferred - #[prost(bool, tag="4")] - pub play_dialtone: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SipCallInfo { - #[prost(string, tag="1")] - pub call_id: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub trunk_id: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub room_name: ::prost::alloc::string::String, - /// ID of the current/previous room published to - #[prost(string, tag="4")] - pub room_id: ::prost::alloc::string::String, - #[prost(string, tag="5")] - pub participant_identity: ::prost::alloc::string::String, - #[prost(message, optional, tag="6")] - pub from_uri: ::core::option::Option, - #[prost(message, optional, tag="7")] - pub to_uri: ::core::option::Option, - #[prost(enumeration="SipFeature", repeated, tag="14")] - pub enabled_features: ::prost::alloc::vec::Vec, - #[prost(enumeration="SipCallStatus", tag="8")] - pub call_status: i32, - #[prost(int64, tag="9")] - pub created_at: i64, - #[prost(int64, tag="10")] - pub started_at: i64, - #[prost(int64, tag="11")] - pub ended_at: i64, - #[prost(enumeration="DisconnectReason", tag="12")] - pub disconnect_reason: i32, - #[prost(string, tag="13")] - pub error: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SipUri { - #[prost(string, tag="1")] - pub user: ::prost::alloc::string::String, - #[prost(string, tag="2")] - pub host: ::prost::alloc::string::String, - #[prost(string, tag="3")] - pub ip: ::prost::alloc::string::String, - #[prost(uint32, tag="4")] - pub port: u32, - #[prost(enumeration="SipTransport", tag="5")] - pub transport: i32, } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -5038,71 +4792,5 @@ impl SipTransport { } } } -#[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, - /// SIP participant for outgoing call has been created. The SIP outgoing call is being established - ScsParticipantJoined = 1, - /// Call is ongoing. SIP participant is active in the LiveKit room - ScsActive = 2, - /// Call has ended - ScsDisconnected = 3, - /// Call has ended or never succeeded because of an error - ScsError = 4, -} -impl SipCallStatus { - /// 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 { - SipCallStatus::ScsCallIncoming => "SCS_CALL_INCOMING", - SipCallStatus::ScsParticipantJoined => "SCS_PARTICIPANT_JOINED", - SipCallStatus::ScsActive => "SCS_ACTIVE", - SipCallStatus::ScsDisconnected => "SCS_DISCONNECTED", - SipCallStatus::ScsError => "SCS_ERROR", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "SCS_CALL_INCOMING" => Some(Self::ScsCallIncoming), - "SCS_PARTICIPANT_JOINED" => Some(Self::ScsParticipantJoined), - "SCS_ACTIVE" => Some(Self::ScsActive), - "SCS_DISCONNECTED" => Some(Self::ScsDisconnected), - "SCS_ERROR" => Some(Self::ScsError), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum SipFeature { - None = 0, - KrispEnabled = 1, -} -impl SipFeature { - /// 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 { - SipFeature::None => "NONE", - SipFeature::KrispEnabled => "KRISP_ENABLED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NONE" => Some(Self::None), - "KRISP_ENABLED" => Some(Self::KrispEnabled), - _ => 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 5da36416..4e6a0fb0 100644 --- a/livekit-protocol/src/livekit.serde.rs +++ b/livekit-protocol/src/livekit.serde.rs @@ -3555,7 +3555,7 @@ impl serde::Serialize for CreateRoomRequest { if !self.name.is_empty() { len += 1; } - if !self.room_preset.is_empty() { + if !self.config_name.is_empty() { len += 1; } if self.empty_timeout != 0 { @@ -3576,6 +3576,9 @@ impl serde::Serialize for CreateRoomRequest { if self.egress.is_some() { len += 1; } + if self.agent.is_some() { + len += 1; + } if self.min_playout_delay != 0 { len += 1; } @@ -3588,15 +3591,12 @@ impl serde::Serialize for CreateRoomRequest { if self.replay_enabled { len += 1; } - if !self.agents.is_empty() { - len += 1; - } let mut struct_ser = serializer.serialize_struct("livekit.CreateRoomRequest", len)?; if !self.name.is_empty() { struct_ser.serialize_field("name", &self.name)?; } - if !self.room_preset.is_empty() { - struct_ser.serialize_field("roomPreset", &self.room_preset)?; + if !self.config_name.is_empty() { + struct_ser.serialize_field("configName", &self.config_name)?; } if self.empty_timeout != 0 { struct_ser.serialize_field("emptyTimeout", &self.empty_timeout)?; @@ -3616,6 +3616,9 @@ impl serde::Serialize for CreateRoomRequest { if let Some(v) = self.egress.as_ref() { struct_ser.serialize_field("egress", v)?; } + if let Some(v) = self.agent.as_ref() { + struct_ser.serialize_field("agent", v)?; + } if self.min_playout_delay != 0 { struct_ser.serialize_field("minPlayoutDelay", &self.min_playout_delay)?; } @@ -3628,9 +3631,6 @@ impl serde::Serialize for CreateRoomRequest { if self.replay_enabled { struct_ser.serialize_field("replayEnabled", &self.replay_enabled)?; } - if !self.agents.is_empty() { - struct_ser.serialize_field("agents", &self.agents)?; - } struct_ser.end() } } @@ -3642,8 +3642,8 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { { const FIELDS: &[&str] = &[ "name", - "room_preset", - "roomPreset", + "config_name", + "configName", "empty_timeout", "emptyTimeout", "departure_timeout", @@ -3654,6 +3654,7 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { "nodeId", "metadata", "egress", + "agent", "min_playout_delay", "minPlayoutDelay", "max_playout_delay", @@ -3662,24 +3663,23 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { "syncStreams", "replay_enabled", "replayEnabled", - "agents", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Name, - RoomPreset, + ConfigName, EmptyTimeout, DepartureTimeout, MaxParticipants, NodeId, Metadata, Egress, + Agent, MinPlayoutDelay, MaxPlayoutDelay, SyncStreams, ReplayEnabled, - Agents, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -3703,18 +3703,18 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { { match value { "name" => Ok(GeneratedField::Name), - "roomPreset" | "room_preset" => Ok(GeneratedField::RoomPreset), + "configName" | "config_name" => Ok(GeneratedField::ConfigName), "emptyTimeout" | "empty_timeout" => Ok(GeneratedField::EmptyTimeout), "departureTimeout" | "departure_timeout" => Ok(GeneratedField::DepartureTimeout), "maxParticipants" | "max_participants" => Ok(GeneratedField::MaxParticipants), "nodeId" | "node_id" => Ok(GeneratedField::NodeId), "metadata" => Ok(GeneratedField::Metadata), "egress" => Ok(GeneratedField::Egress), + "agent" => Ok(GeneratedField::Agent), "minPlayoutDelay" | "min_playout_delay" => Ok(GeneratedField::MinPlayoutDelay), "maxPlayoutDelay" | "max_playout_delay" => Ok(GeneratedField::MaxPlayoutDelay), "syncStreams" | "sync_streams" => Ok(GeneratedField::SyncStreams), "replayEnabled" | "replay_enabled" => Ok(GeneratedField::ReplayEnabled), - "agents" => Ok(GeneratedField::Agents), _ => Ok(GeneratedField::__SkipField__), } } @@ -3735,18 +3735,18 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { V: serde::de::MapAccess<'de>, { let mut name__ = None; - let mut room_preset__ = None; + let mut config_name__ = None; let mut empty_timeout__ = None; let mut departure_timeout__ = None; let mut max_participants__ = None; let mut node_id__ = None; let mut metadata__ = None; let mut egress__ = None; + let mut agent__ = None; let mut min_playout_delay__ = None; let mut max_playout_delay__ = None; let mut sync_streams__ = None; let mut replay_enabled__ = None; - let mut agents__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { @@ -3755,11 +3755,11 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { } name__ = Some(map_.next_value()?); } - GeneratedField::RoomPreset => { - if room_preset__.is_some() { - return Err(serde::de::Error::duplicate_field("roomPreset")); + GeneratedField::ConfigName => { + if config_name__.is_some() { + return Err(serde::de::Error::duplicate_field("configName")); } - room_preset__ = Some(map_.next_value()?); + config_name__ = Some(map_.next_value()?); } GeneratedField::EmptyTimeout => { if empty_timeout__.is_some() { @@ -3803,6 +3803,12 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { } egress__ = map_.next_value()?; } + GeneratedField::Agent => { + if agent__.is_some() { + return Err(serde::de::Error::duplicate_field("agent")); + } + agent__ = map_.next_value()?; + } GeneratedField::MinPlayoutDelay => { if min_playout_delay__.is_some() { return Err(serde::de::Error::duplicate_field("minPlayoutDelay")); @@ -3831,12 +3837,6 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { } replay_enabled__ = Some(map_.next_value()?); } - GeneratedField::Agents => { - if agents__.is_some() { - return Err(serde::de::Error::duplicate_field("agents")); - } - agents__ = Some(map_.next_value()?); - } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -3844,18 +3844,18 @@ impl<'de> serde::Deserialize<'de> for CreateRoomRequest { } Ok(CreateRoomRequest { name: name__.unwrap_or_default(), - room_preset: room_preset__.unwrap_or_default(), + config_name: config_name__.unwrap_or_default(), empty_timeout: empty_timeout__.unwrap_or_default(), departure_timeout: departure_timeout__.unwrap_or_default(), max_participants: max_participants__.unwrap_or_default(), node_id: node_id__.unwrap_or_default(), metadata: metadata__.unwrap_or_default(), egress: egress__, + agent: agent__, min_playout_delay: min_playout_delay__.unwrap_or_default(), max_playout_delay: max_playout_delay__.unwrap_or_default(), sync_streams: sync_streams__.unwrap_or_default(), replay_enabled: replay_enabled__.unwrap_or_default(), - agents: agents__.unwrap_or_default(), }) } } @@ -4268,9 +4268,6 @@ impl serde::Serialize for CreateSipParticipantRequest { if !self.sip_call_to.is_empty() { len += 1; } - if !self.sip_number.is_empty() { - len += 1; - } if !self.room_name.is_empty() { len += 1; } @@ -4292,21 +4289,9 @@ impl serde::Serialize for CreateSipParticipantRequest { if self.play_ringtone { len += 1; } - if self.play_dialtone { - len += 1; - } if self.hide_phone_number { len += 1; } - if self.ringing_timeout.is_some() { - len += 1; - } - if self.max_call_duration.is_some() { - len += 1; - } - if self.enable_krisp { - 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)?; @@ -4314,9 +4299,6 @@ impl serde::Serialize for CreateSipParticipantRequest { if !self.sip_call_to.is_empty() { struct_ser.serialize_field("sipCallTo", &self.sip_call_to)?; } - if !self.sip_number.is_empty() { - struct_ser.serialize_field("sipNumber", &self.sip_number)?; - } if !self.room_name.is_empty() { struct_ser.serialize_field("roomName", &self.room_name)?; } @@ -4338,21 +4320,9 @@ impl serde::Serialize for CreateSipParticipantRequest { if self.play_ringtone { struct_ser.serialize_field("playRingtone", &self.play_ringtone)?; } - if self.play_dialtone { - struct_ser.serialize_field("playDialtone", &self.play_dialtone)?; - } if self.hide_phone_number { struct_ser.serialize_field("hidePhoneNumber", &self.hide_phone_number)?; } - if let Some(v) = self.ringing_timeout.as_ref() { - struct_ser.serialize_field("ringingTimeout", v)?; - } - if let Some(v) = self.max_call_duration.as_ref() { - struct_ser.serialize_field("maxCallDuration", v)?; - } - if self.enable_krisp { - struct_ser.serialize_field("enableKrisp", &self.enable_krisp)?; - } struct_ser.end() } } @@ -4367,8 +4337,6 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { "sipTrunkId", "sip_call_to", "sipCallTo", - "sip_number", - "sipNumber", "room_name", "roomName", "participant_identity", @@ -4382,23 +4350,14 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { "dtmf", "play_ringtone", "playRingtone", - "play_dialtone", - "playDialtone", "hide_phone_number", "hidePhoneNumber", - "ringing_timeout", - "ringingTimeout", - "max_call_duration", - "maxCallDuration", - "enable_krisp", - "enableKrisp", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { SipTrunkId, SipCallTo, - SipNumber, RoomName, ParticipantIdentity, ParticipantName, @@ -4406,11 +4365,7 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { ParticipantAttributes, Dtmf, PlayRingtone, - PlayDialtone, HidePhoneNumber, - RingingTimeout, - MaxCallDuration, - EnableKrisp, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -4435,7 +4390,6 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { match value { "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), "sipCallTo" | "sip_call_to" => Ok(GeneratedField::SipCallTo), - "sipNumber" | "sip_number" => Ok(GeneratedField::SipNumber), "roomName" | "room_name" => Ok(GeneratedField::RoomName), "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), "participantName" | "participant_name" => Ok(GeneratedField::ParticipantName), @@ -4443,11 +4397,7 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { "participantAttributes" | "participant_attributes" => Ok(GeneratedField::ParticipantAttributes), "dtmf" => Ok(GeneratedField::Dtmf), "playRingtone" | "play_ringtone" => Ok(GeneratedField::PlayRingtone), - "playDialtone" | "play_dialtone" => Ok(GeneratedField::PlayDialtone), "hidePhoneNumber" | "hide_phone_number" => Ok(GeneratedField::HidePhoneNumber), - "ringingTimeout" | "ringing_timeout" => Ok(GeneratedField::RingingTimeout), - "maxCallDuration" | "max_call_duration" => Ok(GeneratedField::MaxCallDuration), - "enableKrisp" | "enable_krisp" => Ok(GeneratedField::EnableKrisp), _ => Ok(GeneratedField::__SkipField__), } } @@ -4469,7 +4419,6 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { { let mut sip_trunk_id__ = None; let mut sip_call_to__ = None; - let mut sip_number__ = None; let mut room_name__ = None; let mut participant_identity__ = None; let mut participant_name__ = None; @@ -4477,11 +4426,7 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { let mut participant_attributes__ = None; let mut dtmf__ = None; let mut play_ringtone__ = None; - let mut play_dialtone__ = None; let mut hide_phone_number__ = None; - let mut ringing_timeout__ = None; - let mut max_call_duration__ = None; - let mut enable_krisp__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SipTrunkId => { @@ -4496,12 +4441,6 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { } sip_call_to__ = Some(map_.next_value()?); } - GeneratedField::SipNumber => { - if sip_number__.is_some() { - return Err(serde::de::Error::duplicate_field("sipNumber")); - } - sip_number__ = Some(map_.next_value()?); - } GeneratedField::RoomName => { if room_name__.is_some() { return Err(serde::de::Error::duplicate_field("roomName")); @@ -4546,36 +4485,12 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { } play_ringtone__ = Some(map_.next_value()?); } - GeneratedField::PlayDialtone => { - if play_dialtone__.is_some() { - return Err(serde::de::Error::duplicate_field("playDialtone")); - } - play_dialtone__ = Some(map_.next_value()?); - } GeneratedField::HidePhoneNumber => { if hide_phone_number__.is_some() { return Err(serde::de::Error::duplicate_field("hidePhoneNumber")); } hide_phone_number__ = Some(map_.next_value()?); } - GeneratedField::RingingTimeout => { - if ringing_timeout__.is_some() { - return Err(serde::de::Error::duplicate_field("ringingTimeout")); - } - ringing_timeout__ = map_.next_value()?; - } - GeneratedField::MaxCallDuration => { - if max_call_duration__.is_some() { - return Err(serde::de::Error::duplicate_field("maxCallDuration")); - } - max_call_duration__ = map_.next_value()?; - } - GeneratedField::EnableKrisp => { - if enable_krisp__.is_some() { - return Err(serde::de::Error::duplicate_field("enableKrisp")); - } - enable_krisp__ = Some(map_.next_value()?); - } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -4584,7 +4499,6 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { Ok(CreateSipParticipantRequest { sip_trunk_id: sip_trunk_id__.unwrap_or_default(), sip_call_to: sip_call_to__.unwrap_or_default(), - sip_number: sip_number__.unwrap_or_default(), room_name: room_name__.unwrap_or_default(), participant_identity: participant_identity__.unwrap_or_default(), participant_name: participant_name__.unwrap_or_default(), @@ -4592,11 +4506,7 @@ impl<'de> serde::Deserialize<'de> for CreateSipParticipantRequest { participant_attributes: participant_attributes__.unwrap_or_default(), dtmf: dtmf__.unwrap_or_default(), play_ringtone: play_ringtone__.unwrap_or_default(), - play_dialtone: play_dialtone__.unwrap_or_default(), hide_phone_number: hide_phone_number__.unwrap_or_default(), - ringing_timeout: ringing_timeout__, - max_call_duration: max_call_duration__, - enable_krisp: enable_krisp__.unwrap_or_default(), }) } } @@ -5071,12 +4981,6 @@ impl serde::Serialize for DataPacket { data_packet::Value::RpcResponse(v) => { struct_ser.serialize_field("rpcResponse", v)?; } - data_packet::Value::StreamHeader(v) => { - struct_ser.serialize_field("streamHeader", v)?; - } - data_packet::Value::StreamChunk(v) => { - struct_ser.serialize_field("streamChunk", v)?; - } } } struct_ser.end() @@ -5108,10 +5012,6 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "rpcAck", "rpc_response", "rpcResponse", - "stream_header", - "streamHeader", - "stream_chunk", - "streamChunk", ]; #[allow(clippy::enum_variant_names)] @@ -5128,8 +5028,6 @@ impl<'de> serde::Deserialize<'de> for DataPacket { RpcRequest, RpcAck, RpcResponse, - StreamHeader, - StreamChunk, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5164,8 +5062,6 @@ impl<'de> serde::Deserialize<'de> for DataPacket { "rpcRequest" | "rpc_request" => Ok(GeneratedField::RpcRequest), "rpcAck" | "rpc_ack" => Ok(GeneratedField::RpcAck), "rpcResponse" | "rpc_response" => Ok(GeneratedField::RpcResponse), - "streamHeader" | "stream_header" => Ok(GeneratedField::StreamHeader), - "streamChunk" | "stream_chunk" => Ok(GeneratedField::StreamChunk), _ => Ok(GeneratedField::__SkipField__), } } @@ -5270,20 +5166,6 @@ impl<'de> serde::Deserialize<'de> for DataPacket { return Err(serde::de::Error::duplicate_field("rpcResponse")); } value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::RpcResponse) -; - } - GeneratedField::StreamHeader => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("streamHeader")); - } - value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::StreamHeader) -; - } - GeneratedField::StreamChunk => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("streamChunk")); - } - value__ = map_.next_value::<::std::option::Option<_>>()?.map(data_packet::Value::StreamChunk) ; } GeneratedField::__SkipField__ => { @@ -5373,29 +5255,46 @@ impl<'de> serde::Deserialize<'de> for data_packet::Kind { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for DataStream { +impl serde::Serialize for DeleteAgentDispatchRequest { #[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.DataStream", len)?; + let mut len = 0; + if !self.dispatch_id.is_empty() { + len += 1; + } + if !self.room.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DeleteAgentDispatchRequest", len)?; + if !self.dispatch_id.is_empty() { + struct_ser.serialize_field("dispatchId", &self.dispatch_id)?; + } + if !self.room.is_empty() { + struct_ser.serialize_field("room", &self.room)?; + } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DataStream { +impl<'de> serde::Deserialize<'de> for DeleteAgentDispatchRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "dispatch_id", + "dispatchId", + "room", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + DispatchId, + Room, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5417,7 +5316,11 @@ impl<'de> serde::Deserialize<'de> for DataStream { where E: serde::de::Error, { - Ok(GeneratedField::__SkipField__) + match value { + "dispatchId" | "dispatch_id" => Ok(GeneratedField::DispatchId), + "room" => Ok(GeneratedField::Room), + _ => Ok(GeneratedField::__SkipField__), + } } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -5425,27 +5328,47 @@ impl<'de> serde::Deserialize<'de> for DataStream { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DataStream; + type Value = DeleteAgentDispatchRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DataStream") + formatter.write_str("struct livekit.DeleteAgentDispatchRequest") } - 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 dispatch_id__ = None; + let mut room__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::DispatchId => { + if dispatch_id__.is_some() { + return Err(serde::de::Error::duplicate_field("dispatchId")); + } + dispatch_id__ = Some(map_.next_value()?); + } + 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(DataStream { + Ok(DeleteAgentDispatchRequest { + dispatch_id: dispatch_id__.unwrap_or_default(), + room: room__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DataStream", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteAgentDispatchRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for data_stream::Chunk { +impl serde::Serialize for DeleteIngressRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5453,77 +5376,30 @@ impl serde::Serialize for data_stream::Chunk { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.stream_id.is_empty() { - len += 1; - } - if self.chunk_index != 0 { - len += 1; - } - if !self.content.is_empty() { - len += 1; - } - if self.complete { - len += 1; - } - if self.version != 0 { - len += 1; - } - if self.iv.is_some() { + if !self.ingress_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DataStream.Chunk", len)?; - if !self.stream_id.is_empty() { - struct_ser.serialize_field("streamId", &self.stream_id)?; - } - if self.chunk_index != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("chunkIndex", ToString::to_string(&self.chunk_index).as_str())?; - } - if !self.content.is_empty() { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("content", pbjson::private::base64::encode(&self.content).as_str())?; - } - if self.complete { - struct_ser.serialize_field("complete", &self.complete)?; - } - if self.version != 0 { - struct_ser.serialize_field("version", &self.version)?; - } - if let Some(v) = self.iv.as_ref() { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("iv", pbjson::private::base64::encode(&v).as_str())?; + let mut struct_ser = serializer.serialize_struct("livekit.DeleteIngressRequest", len)?; + if !self.ingress_id.is_empty() { + struct_ser.serialize_field("ingressId", &self.ingress_id)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for data_stream::Chunk { +impl<'de> serde::Deserialize<'de> for DeleteIngressRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "stream_id", - "streamId", - "chunk_index", - "chunkIndex", - "content", - "complete", - "version", - "iv", + "ingress_id", + "ingressId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - StreamId, - ChunkIndex, - Content, - Complete, - Version, - Iv, + IngressId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5546,12 +5422,7 @@ impl<'de> serde::Deserialize<'de> for data_stream::Chunk { E: serde::de::Error, { match value { - "streamId" | "stream_id" => Ok(GeneratedField::StreamId), - "chunkIndex" | "chunk_index" => Ok(GeneratedField::ChunkIndex), - "content" => Ok(GeneratedField::Content), - "complete" => Ok(GeneratedField::Complete), - "version" => Ok(GeneratedField::Version), - "iv" => Ok(GeneratedField::Iv), + "ingressId" | "ingress_id" => Ok(GeneratedField::IngressId), _ => Ok(GeneratedField::__SkipField__), } } @@ -5561,87 +5432,39 @@ impl<'de> serde::Deserialize<'de> for data_stream::Chunk { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = data_stream::Chunk; + type Value = DeleteIngressRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DataStream.Chunk") + formatter.write_str("struct livekit.DeleteIngressRequest") } - 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 stream_id__ = None; - let mut chunk_index__ = None; - let mut content__ = None; - let mut complete__ = None; - let mut version__ = None; - let mut iv__ = None; + let mut ingress_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::StreamId => { - if stream_id__.is_some() { - return Err(serde::de::Error::duplicate_field("streamId")); - } - stream_id__ = Some(map_.next_value()?); - } - GeneratedField::ChunkIndex => { - if chunk_index__.is_some() { - return Err(serde::de::Error::duplicate_field("chunkIndex")); - } - chunk_index__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Content => { - if content__.is_some() { - return Err(serde::de::Error::duplicate_field("content")); - } - content__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Complete => { - if complete__.is_some() { - return Err(serde::de::Error::duplicate_field("complete")); - } - complete__ = Some(map_.next_value()?); - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Iv => { - if iv__.is_some() { - return Err(serde::de::Error::duplicate_field("iv")); + GeneratedField::IngressId => { + if ingress_id__.is_some() { + return Err(serde::de::Error::duplicate_field("ingressId")); } - iv__ = - map_.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| x.0) - ; + ingress_id__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(data_stream::Chunk { - stream_id: stream_id__.unwrap_or_default(), - chunk_index: chunk_index__.unwrap_or_default(), - content: content__.unwrap_or_default(), - complete: complete__.unwrap_or_default(), - version: version__.unwrap_or_default(), - iv: iv__, + Ok(DeleteIngressRequest { + ingress_id: ingress_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DataStream.Chunk", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteIngressRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for data_stream::FileHeader { +impl serde::Serialize for DeleteRoomRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -5649,30 +5472,29 @@ impl serde::Serialize for data_stream::FileHeader { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.file_name.is_empty() { + if !self.room.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DataStream.FileHeader", len)?; - if !self.file_name.is_empty() { - struct_ser.serialize_field("fileName", &self.file_name)?; + 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 data_stream::FileHeader { +impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "file_name", - "fileName", + "room", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - FileName, + Room, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5695,7 +5517,7 @@ impl<'de> serde::Deserialize<'de> for data_stream::FileHeader { E: serde::de::Error, { match value { - "fileName" | "file_name" => Ok(GeneratedField::FileName), + "room" => Ok(GeneratedField::Room), _ => Ok(GeneratedField::__SkipField__), } } @@ -5705,157 +5527,61 @@ impl<'de> serde::Deserialize<'de> for data_stream::FileHeader { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = data_stream::FileHeader; + type Value = DeleteRoomRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DataStream.FileHeader") + formatter.write_str("struct livekit.DeleteRoomRequest") } - 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 file_name__ = None; + let mut room__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::FileName => { - if file_name__.is_some() { - return Err(serde::de::Error::duplicate_field("fileName")); + GeneratedField::Room => { + if room__.is_some() { + return Err(serde::de::Error::duplicate_field("room")); } - file_name__ = Some(map_.next_value()?); + room__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(data_stream::FileHeader { - file_name: file_name__.unwrap_or_default(), + Ok(DeleteRoomRequest { + room: room__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DataStream.FileHeader", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteRoomRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for data_stream::Header { +impl serde::Serialize for DeleteRoomResponse { #[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_id.is_empty() { - len += 1; - } - if self.timestamp != 0 { - len += 1; - } - if !self.topic.is_empty() { - len += 1; - } - if !self.mime_type.is_empty() { - len += 1; - } - if self.total_length.is_some() { - len += 1; - } - if self.total_chunks.is_some() { - len += 1; - } - if self.encryption_type != 0 { - len += 1; - } - if !self.extensions.is_empty() { - len += 1; - } - if self.content_header.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.DataStream.Header", len)?; - if !self.stream_id.is_empty() { - struct_ser.serialize_field("streamId", &self.stream_id)?; - } - if self.timestamp != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("timestamp", ToString::to_string(&self.timestamp).as_str())?; - } - if !self.topic.is_empty() { - struct_ser.serialize_field("topic", &self.topic)?; - } - if !self.mime_type.is_empty() { - struct_ser.serialize_field("mimeType", &self.mime_type)?; - } - if let Some(v) = self.total_length.as_ref() { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("totalLength", ToString::to_string(&v).as_str())?; - } - if let Some(v) = self.total_chunks.as_ref() { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("totalChunks", ToString::to_string(&v).as_str())?; - } - if self.encryption_type != 0 { - let v = encryption::Type::try_from(self.encryption_type) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.encryption_type)))?; - struct_ser.serialize_field("encryptionType", &v)?; - } - if !self.extensions.is_empty() { - struct_ser.serialize_field("extensions", &self.extensions)?; - } - if let Some(v) = self.content_header.as_ref() { - match v { - data_stream::header::ContentHeader::TextHeader(v) => { - struct_ser.serialize_field("textHeader", v)?; - } - data_stream::header::ContentHeader::FileHeader(v) => { - struct_ser.serialize_field("fileHeader", v)?; - } - } - } + let len = 0; + let struct_ser = serializer.serialize_struct("livekit.DeleteRoomResponse", len)?; struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for data_stream::Header { +impl<'de> serde::Deserialize<'de> for DeleteRoomResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "stream_id", - "streamId", - "timestamp", - "topic", - "mime_type", - "mimeType", - "total_length", - "totalLength", - "total_chunks", - "totalChunks", - "encryption_type", - "encryptionType", - "extensions", - "text_header", - "textHeader", - "file_header", - "fileHeader", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - StreamId, - Timestamp, - Topic, - MimeType, - TotalLength, - TotalChunks, - EncryptionType, - Extensions, - TextHeader, - FileHeader, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -5877,19 +5603,7 @@ impl<'de> serde::Deserialize<'de> for data_stream::Header { where E: serde::de::Error, { - match value { - "streamId" | "stream_id" => Ok(GeneratedField::StreamId), - "timestamp" => Ok(GeneratedField::Timestamp), - "topic" => Ok(GeneratedField::Topic), - "mimeType" | "mime_type" => Ok(GeneratedField::MimeType), - "totalLength" | "total_length" => Ok(GeneratedField::TotalLength), - "totalChunks" | "total_chunks" => Ok(GeneratedField::TotalChunks), - "encryptionType" | "encryption_type" => Ok(GeneratedField::EncryptionType), - "extensions" => Ok(GeneratedField::Extensions), - "textHeader" | "text_header" => Ok(GeneratedField::TextHeader), - "fileHeader" | "file_header" => Ok(GeneratedField::FileHeader), - _ => Ok(GeneratedField::__SkipField__), - } + Ok(GeneratedField::__SkipField__) } } deserializer.deserialize_identifier(GeneratedVisitor) @@ -5897,196 +5611,27 @@ impl<'de> serde::Deserialize<'de> for data_stream::Header { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = data_stream::Header; + type Value = DeleteRoomResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DataStream.Header") + formatter.write_str("struct livekit.DeleteRoomResponse") } - 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 stream_id__ = None; - let mut timestamp__ = None; - let mut topic__ = None; - let mut mime_type__ = None; - let mut total_length__ = None; - let mut total_chunks__ = None; - let mut encryption_type__ = None; - let mut extensions__ = None; - let mut content_header__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::StreamId => { - if stream_id__.is_some() { - return Err(serde::de::Error::duplicate_field("streamId")); - } - stream_id__ = Some(map_.next_value()?); - } - GeneratedField::Timestamp => { - if timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("timestamp")); - } - timestamp__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Topic => { - if topic__.is_some() { - return Err(serde::de::Error::duplicate_field("topic")); - } - topic__ = Some(map_.next_value()?); - } - GeneratedField::MimeType => { - if mime_type__.is_some() { - return Err(serde::de::Error::duplicate_field("mimeType")); - } - mime_type__ = Some(map_.next_value()?); - } - GeneratedField::TotalLength => { - if total_length__.is_some() { - return Err(serde::de::Error::duplicate_field("totalLength")); - } - total_length__ = - map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) - ; - } - GeneratedField::TotalChunks => { - if total_chunks__.is_some() { - return Err(serde::de::Error::duplicate_field("totalChunks")); - } - total_chunks__ = - map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| x.0) - ; - } - GeneratedField::EncryptionType => { - if encryption_type__.is_some() { - return Err(serde::de::Error::duplicate_field("encryptionType")); - } - encryption_type__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Extensions => { - if extensions__.is_some() { - return Err(serde::de::Error::duplicate_field("extensions")); - } - extensions__ = Some( - map_.next_value::>()? - ); - } - GeneratedField::TextHeader => { - if content_header__.is_some() { - return Err(serde::de::Error::duplicate_field("textHeader")); - } - content_header__ = map_.next_value::<::std::option::Option<_>>()?.map(data_stream::header::ContentHeader::TextHeader) -; - } - GeneratedField::FileHeader => { - if content_header__.is_some() { - return Err(serde::de::Error::duplicate_field("fileHeader")); - } - content_header__ = map_.next_value::<::std::option::Option<_>>()?.map(data_stream::header::ContentHeader::FileHeader) -; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; } - Ok(data_stream::Header { - stream_id: stream_id__.unwrap_or_default(), - timestamp: timestamp__.unwrap_or_default(), - topic: topic__.unwrap_or_default(), - mime_type: mime_type__.unwrap_or_default(), - total_length: total_length__, - total_chunks: total_chunks__, - encryption_type: encryption_type__.unwrap_or_default(), - extensions: extensions__.unwrap_or_default(), - content_header: content_header__, + Ok(DeleteRoomResponse { }) } } - deserializer.deserialize_struct("livekit.DataStream.Header", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for data_stream::OperationType { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Create => "CREATE", - Self::Update => "UPDATE", - Self::Delete => "DELETE", - Self::Reaction => "REACTION", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for data_stream::OperationType { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "CREATE", - "UPDATE", - "DELETE", - "REACTION", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = data_stream::OperationType; - - 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 { - "CREATE" => Ok(data_stream::OperationType::Create), - "UPDATE" => Ok(data_stream::OperationType::Update), - "DELETE" => Ok(data_stream::OperationType::Delete), - "REACTION" => Ok(data_stream::OperationType::Reaction), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteRoomResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for data_stream::TextHeader { +impl serde::Serialize for DeleteSipDispatchRuleRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6094,66 +5639,30 @@ impl serde::Serialize for data_stream::TextHeader { { use serde::ser::SerializeStruct; let mut len = 0; - if self.operation_type != 0 { - len += 1; - } - if self.version != 0 { - len += 1; - } - if !self.reply_to_stream_id.is_empty() { - len += 1; - } - if !self.attached_stream_ids.is_empty() { - len += 1; - } - if self.generated { + if !self.sip_dispatch_rule_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DataStream.TextHeader", len)?; - if self.operation_type != 0 { - let v = data_stream::OperationType::try_from(self.operation_type) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.operation_type)))?; - struct_ser.serialize_field("operationType", &v)?; - } - if self.version != 0 { - struct_ser.serialize_field("version", &self.version)?; - } - if !self.reply_to_stream_id.is_empty() { - struct_ser.serialize_field("replyToStreamId", &self.reply_to_stream_id)?; - } - if !self.attached_stream_ids.is_empty() { - struct_ser.serialize_field("attachedStreamIds", &self.attached_stream_ids)?; - } - if self.generated { - struct_ser.serialize_field("generated", &self.generated)?; + 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 data_stream::TextHeader { +impl<'de> serde::Deserialize<'de> for DeleteSipDispatchRuleRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "operation_type", - "operationType", - "version", - "reply_to_stream_id", - "replyToStreamId", - "attached_stream_ids", - "attachedStreamIds", - "generated", + "sip_dispatch_rule_id", + "sipDispatchRuleId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - OperationType, - Version, - ReplyToStreamId, - AttachedStreamIds, - Generated, + SipDispatchRuleId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6176,11 +5685,7 @@ impl<'de> serde::Deserialize<'de> for data_stream::TextHeader { E: serde::de::Error, { match value { - "operationType" | "operation_type" => Ok(GeneratedField::OperationType), - "version" => Ok(GeneratedField::Version), - "replyToStreamId" | "reply_to_stream_id" => Ok(GeneratedField::ReplyToStreamId), - "attachedStreamIds" | "attached_stream_ids" => Ok(GeneratedField::AttachedStreamIds), - "generated" => Ok(GeneratedField::Generated), + "sipDispatchRuleId" | "sip_dispatch_rule_id" => Ok(GeneratedField::SipDispatchRuleId), _ => Ok(GeneratedField::__SkipField__), } } @@ -6190,73 +5695,39 @@ impl<'de> serde::Deserialize<'de> for data_stream::TextHeader { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = data_stream::TextHeader; + type Value = DeleteSipDispatchRuleRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DataStream.TextHeader") + formatter.write_str("struct livekit.DeleteSIPDispatchRuleRequest") } - 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 operation_type__ = None; - let mut version__ = None; - let mut reply_to_stream_id__ = None; - let mut attached_stream_ids__ = None; - let mut generated__ = None; + let mut sip_dispatch_rule_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::OperationType => { - if operation_type__.is_some() { - return Err(serde::de::Error::duplicate_field("operationType")); - } - operation_type__ = Some(map_.next_value::()? as i32); - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ReplyToStreamId => { - if reply_to_stream_id__.is_some() { - return Err(serde::de::Error::duplicate_field("replyToStreamId")); - } - reply_to_stream_id__ = Some(map_.next_value()?); - } - GeneratedField::AttachedStreamIds => { - if attached_stream_ids__.is_some() { - return Err(serde::de::Error::duplicate_field("attachedStreamIds")); - } - attached_stream_ids__ = Some(map_.next_value()?); - } - GeneratedField::Generated => { - if generated__.is_some() { - return Err(serde::de::Error::duplicate_field("generated")); + GeneratedField::SipDispatchRuleId => { + if sip_dispatch_rule_id__.is_some() { + return Err(serde::de::Error::duplicate_field("sipDispatchRuleId")); } - generated__ = Some(map_.next_value()?); + sip_dispatch_rule_id__ = Some(map_.next_value()?); } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(data_stream::TextHeader { - operation_type: operation_type__.unwrap_or_default(), - version: version__.unwrap_or_default(), - reply_to_stream_id: reply_to_stream_id__.unwrap_or_default(), - attached_stream_ids: attached_stream_ids__.unwrap_or_default(), - generated: generated__.unwrap_or_default(), + Ok(DeleteSipDispatchRuleRequest { + sip_dispatch_rule_id: sip_dispatch_rule_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DataStream.TextHeader", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteSIPDispatchRuleRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteAgentDispatchRequest { +impl serde::Serialize for DeleteSipTrunkRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6264,38 +5735,30 @@ impl serde::Serialize for DeleteAgentDispatchRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.dispatch_id.is_empty() { - len += 1; - } - if !self.room.is_empty() { + if !self.sip_trunk_id.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DeleteAgentDispatchRequest", len)?; - if !self.dispatch_id.is_empty() { - struct_ser.serialize_field("dispatchId", &self.dispatch_id)?; - } - 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 DeleteAgentDispatchRequest { +impl<'de> serde::Deserialize<'de> for DeleteSipTrunkRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "dispatch_id", - "dispatchId", - "room", + "sip_trunk_id", + "sipTrunkId", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - DispatchId, - Room, + SipTrunkId, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6318,8 +5781,7 @@ impl<'de> serde::Deserialize<'de> for DeleteAgentDispatchRequest { E: serde::de::Error, { match value { - "dispatchId" | "dispatch_id" => Ok(GeneratedField::DispatchId), - "room" => Ok(GeneratedField::Room), + "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), _ => Ok(GeneratedField::__SkipField__), } } @@ -6329,47 +5791,39 @@ impl<'de> serde::Deserialize<'de> for DeleteAgentDispatchRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteAgentDispatchRequest; + type Value = DeleteSipTrunkRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteAgentDispatchRequest") + 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 dispatch_id__ = None; - let mut room__ = None; + let mut sip_trunk_id__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::DispatchId => { - if dispatch_id__.is_some() { - return Err(serde::de::Error::duplicate_field("dispatchId")); - } - dispatch_id__ = Some(map_.next_value()?); - } - 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(DeleteAgentDispatchRequest { - dispatch_id: dispatch_id__.unwrap_or_default(), - room: room__.unwrap_or_default(), + Ok(DeleteSipTrunkRequest { + sip_trunk_id: sip_trunk_id__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DeleteAgentDispatchRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DeleteSIPTrunkRequest", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteIngressRequest { +impl serde::Serialize for DirectFileOutput { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6377,30 +5831,65 @@ impl serde::Serialize for DeleteIngressRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.ingress_id.is_empty() { + if !self.filepath.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("livekit.DeleteIngressRequest", len)?; - if !self.ingress_id.is_empty() { - struct_ser.serialize_field("ingressId", &self.ingress_id)?; + if self.disable_manifest { + len += 1; + } + if self.output.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DirectFileOutput", len)?; + if !self.filepath.is_empty() { + struct_ser.serialize_field("filepath", &self.filepath)?; + } + if self.disable_manifest { + struct_ser.serialize_field("disableManifest", &self.disable_manifest)?; + } + if let Some(v) = self.output.as_ref() { + match v { + direct_file_output::Output::S3(v) => { + struct_ser.serialize_field("s3", v)?; + } + direct_file_output::Output::Gcp(v) => { + struct_ser.serialize_field("gcp", v)?; + } + direct_file_output::Output::Azure(v) => { + struct_ser.serialize_field("azure", v)?; + } + direct_file_output::Output::AliOss(v) => { + struct_ser.serialize_field("aliOSS", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DeleteIngressRequest { +impl<'de> serde::Deserialize<'de> for DirectFileOutput { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "ingress_id", - "ingressId", + "filepath", + "disable_manifest", + "disableManifest", + "s3", + "gcp", + "azure", + "aliOSS", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - IngressId, + Filepath, + DisableManifest, + S3, + Gcp, + Azure, + AliOss, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6423,7 +5912,12 @@ impl<'de> serde::Deserialize<'de> for DeleteIngressRequest { E: serde::de::Error, { match value { - "ingressId" | "ingress_id" => Ok(GeneratedField::IngressId), + "filepath" => Ok(GeneratedField::Filepath), + "disableManifest" | "disable_manifest" => Ok(GeneratedField::DisableManifest), + "s3" => Ok(GeneratedField::S3), + "gcp" => Ok(GeneratedField::Gcp), + "azure" => Ok(GeneratedField::Azure), + "aliOSS" => Ok(GeneratedField::AliOss), _ => Ok(GeneratedField::__SkipField__), } } @@ -6433,39 +5927,77 @@ impl<'de> serde::Deserialize<'de> for DeleteIngressRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteIngressRequest; + type Value = DirectFileOutput; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteIngressRequest") + formatter.write_str("struct livekit.DirectFileOutput") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut ingress_id__ = None; + let mut filepath__ = None; + let mut disable_manifest__ = None; + let mut output__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::IngressId => { - if ingress_id__.is_some() { - return Err(serde::de::Error::duplicate_field("ingressId")); + GeneratedField::Filepath => { + if filepath__.is_some() { + return Err(serde::de::Error::duplicate_field("filepath")); } - ingress_id__ = Some(map_.next_value()?); + filepath__ = Some(map_.next_value()?); + } + GeneratedField::DisableManifest => { + if disable_manifest__.is_some() { + return Err(serde::de::Error::duplicate_field("disableManifest")); + } + disable_manifest__ = Some(map_.next_value()?); + } + GeneratedField::S3 => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("s3")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::S3) +; + } + GeneratedField::Gcp => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("gcp")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::Gcp) +; + } + GeneratedField::Azure => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("azure")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::Azure) +; + } + GeneratedField::AliOss => { + if output__.is_some() { + return Err(serde::de::Error::duplicate_field("aliOSS")); + } + output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::AliOss) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(DeleteIngressRequest { - ingress_id: ingress_id__.unwrap_or_default(), + Ok(DirectFileOutput { + filepath: filepath__.unwrap_or_default(), + disable_manifest: disable_manifest__.unwrap_or_default(), + output: output__, }) } } - deserializer.deserialize_struct("livekit.DeleteIngressRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DirectFileOutput", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteRoomRequest { +impl serde::Serialize for DisabledCodecs { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -6473,29 +6005,37 @@ impl serde::Serialize for DeleteRoomRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.room.is_empty() { + if !self.codecs.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)?; + if !self.publish.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("livekit.DisabledCodecs", len)?; + if !self.codecs.is_empty() { + struct_ser.serialize_field("codecs", &self.codecs)?; + } + if !self.publish.is_empty() { + struct_ser.serialize_field("publish", &self.publish)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { +impl<'de> serde::Deserialize<'de> for DisabledCodecs { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "room", + "codecs", + "publish", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Room, + Codecs, + Publish, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -6518,7 +6058,8 @@ impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { E: serde::de::Error, { match value { - "room" => Ok(GeneratedField::Room), + "codecs" => Ok(GeneratedField::Codecs), + "publish" => Ok(GeneratedField::Publish), _ => Ok(GeneratedField::__SkipField__), } } @@ -6528,648 +6069,100 @@ impl<'de> serde::Deserialize<'de> for DeleteRoomRequest { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteRoomRequest; + type Value = DisabledCodecs; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteRoomRequest") + formatter.write_str("struct livekit.DisabledCodecs") } - 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 codecs__ = None; + let mut publish__ = 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::Codecs => { + if codecs__.is_some() { + return Err(serde::de::Error::duplicate_field("codecs")); } - room__ = Some(map_.next_value()?); + 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(DeleteRoomRequest { - room: room__.unwrap_or_default(), + Ok(DisabledCodecs { + codecs: codecs__.unwrap_or_default(), + publish: publish__.unwrap_or_default(), }) } } - deserializer.deserialize_struct("livekit.DeleteRoomRequest", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.DisabledCodecs", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for DeleteRoomResponse { +impl serde::Serialize for DisconnectReason { #[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() + 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", + }; + serializer.serialize_str(variant) } } -impl<'de> serde::Deserialize<'de> for DeleteRoomResponse { +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", ]; - #[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; + type Value = DisconnectReason; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteRoomResponse") + write!(formatter, "expected one of: {:?}", &FIELDS) } - 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 DeleteSipTrunkRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sip_trunk_id.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.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 DeleteSipTrunkRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sip_trunk_id", - "sipTrunkId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SipTrunkId, - __SkipField__, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sipTrunkId" | "sip_trunk_id" => Ok(GeneratedField::SipTrunkId), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DeleteSipTrunkRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DeleteSIPTrunkRequest") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sip_trunk_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::SipTrunkId => { - if sip_trunk_id__.is_some() { - return Err(serde::de::Error::duplicate_field("sipTrunkId")); - } - sip_trunk_id__ = Some(map_.next_value()?); - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } - } - Ok(DeleteSipTrunkRequest { - sip_trunk_id: sip_trunk_id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("livekit.DeleteSIPTrunkRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DirectFileOutput { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.filepath.is_empty() { - len += 1; - } - if self.disable_manifest { - len += 1; - } - if self.output.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.DirectFileOutput", len)?; - if !self.filepath.is_empty() { - struct_ser.serialize_field("filepath", &self.filepath)?; - } - if self.disable_manifest { - struct_ser.serialize_field("disableManifest", &self.disable_manifest)?; - } - if let Some(v) = self.output.as_ref() { - match v { - direct_file_output::Output::S3(v) => { - struct_ser.serialize_field("s3", v)?; - } - direct_file_output::Output::Gcp(v) => { - struct_ser.serialize_field("gcp", v)?; - } - direct_file_output::Output::Azure(v) => { - struct_ser.serialize_field("azure", v)?; - } - direct_file_output::Output::AliOss(v) => { - struct_ser.serialize_field("aliOSS", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DirectFileOutput { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "filepath", - "disable_manifest", - "disableManifest", - "s3", - "gcp", - "azure", - "aliOSS", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Filepath, - DisableManifest, - S3, - Gcp, - Azure, - AliOss, - __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 { - "filepath" => Ok(GeneratedField::Filepath), - "disableManifest" | "disable_manifest" => Ok(GeneratedField::DisableManifest), - "s3" => Ok(GeneratedField::S3), - "gcp" => Ok(GeneratedField::Gcp), - "azure" => Ok(GeneratedField::Azure), - "aliOSS" => Ok(GeneratedField::AliOss), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = DirectFileOutput; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.DirectFileOutput") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut filepath__ = None; - let mut disable_manifest__ = None; - let mut output__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Filepath => { - if filepath__.is_some() { - return Err(serde::de::Error::duplicate_field("filepath")); - } - filepath__ = Some(map_.next_value()?); - } - GeneratedField::DisableManifest => { - if disable_manifest__.is_some() { - return Err(serde::de::Error::duplicate_field("disableManifest")); - } - disable_manifest__ = Some(map_.next_value()?); - } - GeneratedField::S3 => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("s3")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::S3) -; - } - GeneratedField::Gcp => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("gcp")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::Gcp) -; - } - GeneratedField::Azure => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("azure")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::Azure) -; - } - GeneratedField::AliOss => { - if output__.is_some() { - return Err(serde::de::Error::duplicate_field("aliOSS")); - } - output__ = map_.next_value::<::std::option::Option<_>>()?.map(direct_file_output::Output::AliOss) -; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } - } - Ok(DirectFileOutput { - filepath: filepath__.unwrap_or_default(), - disable_manifest: disable_manifest__.unwrap_or_default(), - output: output__, - }) - } - } - deserializer.deserialize_struct("livekit.DirectFileOutput", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for DisabledCodecs { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.codecs.is_empty() { - len += 1; - } - if !self.publish.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.DisabledCodecs", len)?; - if !self.codecs.is_empty() { - struct_ser.serialize_field("codecs", &self.codecs)?; - } - if !self.publish.is_empty() { - struct_ser.serialize_field("publish", &self.publish)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for DisabledCodecs { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "codecs", - "publish", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Codecs, - Publish, - __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 { - "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", - }; - 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", - ]; - - 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, + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, { i32::try_from(v) .ok() @@ -7207,9 +6200,6 @@ impl<'de> serde::Deserialize<'de> for DisconnectReason { "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), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -7267,12 +6257,6 @@ impl serde::Serialize for EgressInfo { if !self.image_results.is_empty() { len += 1; } - if !self.manifest_location.is_empty() { - len += 1; - } - if self.backup_storage_used { - len += 1; - } if self.request.is_some() { len += 1; } @@ -7330,12 +6314,6 @@ impl serde::Serialize for EgressInfo { if !self.image_results.is_empty() { struct_ser.serialize_field("imageResults", &self.image_results)?; } - if !self.manifest_location.is_empty() { - struct_ser.serialize_field("manifestLocation", &self.manifest_location)?; - } - if self.backup_storage_used { - struct_ser.serialize_field("backupStorageUsed", &self.backup_storage_used)?; - } if let Some(v) = self.request.as_ref() { match v { egress_info::Request::RoomComposite(v) => { @@ -7403,10 +6381,6 @@ impl<'de> serde::Deserialize<'de> for EgressInfo { "segmentResults", "image_results", "imageResults", - "manifest_location", - "manifestLocation", - "backup_storage_used", - "backupStorageUsed", "room_composite", "roomComposite", "web", @@ -7435,8 +6409,6 @@ impl<'de> serde::Deserialize<'de> for EgressInfo { FileResults, SegmentResults, ImageResults, - ManifestLocation, - BackupStorageUsed, RoomComposite, Web, Participant, @@ -7481,8 +6453,6 @@ impl<'de> serde::Deserialize<'de> for EgressInfo { "fileResults" | "file_results" => Ok(GeneratedField::FileResults), "segmentResults" | "segment_results" => Ok(GeneratedField::SegmentResults), "imageResults" | "image_results" => Ok(GeneratedField::ImageResults), - "manifestLocation" | "manifest_location" => Ok(GeneratedField::ManifestLocation), - "backupStorageUsed" | "backup_storage_used" => Ok(GeneratedField::BackupStorageUsed), "roomComposite" | "room_composite" => Ok(GeneratedField::RoomComposite), "web" => Ok(GeneratedField::Web), "participant" => Ok(GeneratedField::Participant), @@ -7524,8 +6494,6 @@ impl<'de> serde::Deserialize<'de> for EgressInfo { let mut file_results__ = None; let mut segment_results__ = None; let mut image_results__ = None; - let mut manifest_location__ = None; - let mut backup_storage_used__ = None; let mut request__ = None; let mut result__ = None; while let Some(k) = map_.next_key()? { @@ -7622,18 +6590,6 @@ impl<'de> serde::Deserialize<'de> for EgressInfo { } image_results__ = Some(map_.next_value()?); } - GeneratedField::ManifestLocation => { - if manifest_location__.is_some() { - return Err(serde::de::Error::duplicate_field("manifestLocation")); - } - manifest_location__ = Some(map_.next_value()?); - } - GeneratedField::BackupStorageUsed => { - if backup_storage_used__.is_some() { - return Err(serde::de::Error::duplicate_field("backupStorageUsed")); - } - backup_storage_used__ = Some(map_.next_value()?); - } GeneratedField::RoomComposite => { if request__.is_some() { return Err(serde::de::Error::duplicate_field("roomComposite")); @@ -7710,8 +6666,6 @@ impl<'de> serde::Deserialize<'de> for EgressInfo { file_results: file_results__.unwrap_or_default(), segment_results: segment_results__.unwrap_or_default(), image_results: image_results__.unwrap_or_default(), - manifest_location: manifest_location__.unwrap_or_default(), - backup_storage_used: backup_storage_used__.unwrap_or_default(), request: request__, result: result__, }) @@ -15240,9 +14194,6 @@ impl serde::Serialize for MetricLabel { Self::ClientVideoPublisherQualityLimitationDurationBandwidth => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", Self::ClientVideoPublisherQualityLimitationDurationCpu => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", Self::ClientVideoPublisherQualityLimitationDurationOther => "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", - Self::PublisherRtt => "PUBLISHER_RTT", - Self::ServerMeshRtt => "SERVER_MESH_RTT", - Self::SubscriberRtt => "SUBSCRIBER_RTT", Self::PredefinedMaxValue => "METRIC_LABEL_PREDEFINED_MAX_VALUE", }; serializer.serialize_str(variant) @@ -15272,9 +14223,6 @@ impl<'de> serde::Deserialize<'de> for MetricLabel { "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH", "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU", "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER", - "PUBLISHER_RTT", - "SERVER_MESH_RTT", - "SUBSCRIBER_RTT", "METRIC_LABEL_PREDEFINED_MAX_VALUE", ]; @@ -15333,9 +14281,6 @@ impl<'de> serde::Deserialize<'de> for MetricLabel { "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_BANDWIDTH" => Ok(MetricLabel::ClientVideoPublisherQualityLimitationDurationBandwidth), "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_CPU" => Ok(MetricLabel::ClientVideoPublisherQualityLimitationDurationCpu), "CLIENT_VIDEO_PUBLISHER_QUALITY_LIMITATION_DURATION_OTHER" => Ok(MetricLabel::ClientVideoPublisherQualityLimitationDurationOther), - "PUBLISHER_RTT" => Ok(MetricLabel::PublisherRtt), - "SERVER_MESH_RTT" => Ok(MetricLabel::ServerMeshRtt), - "SUBSCRIBER_RTT" => Ok(MetricLabel::SubscriberRtt), "METRIC_LABEL_PREDEFINED_MAX_VALUE" => Ok(MetricLabel::PredefinedMaxValue), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } @@ -21557,6 +20502,9 @@ impl serde::Serialize for RoomConfiguration { if self.egress.is_some() { len += 1; } + if self.agent.is_some() { + len += 1; + } if self.min_playout_delay != 0 { len += 1; } @@ -21566,9 +20514,6 @@ impl serde::Serialize for RoomConfiguration { if self.sync_streams { len += 1; } - if !self.agents.is_empty() { - len += 1; - } let mut struct_ser = serializer.serialize_struct("livekit.RoomConfiguration", len)?; if !self.name.is_empty() { struct_ser.serialize_field("name", &self.name)?; @@ -21585,6 +20530,9 @@ impl serde::Serialize for RoomConfiguration { if let Some(v) = self.egress.as_ref() { struct_ser.serialize_field("egress", v)?; } + if let Some(v) = self.agent.as_ref() { + struct_ser.serialize_field("agent", v)?; + } if self.min_playout_delay != 0 { struct_ser.serialize_field("minPlayoutDelay", &self.min_playout_delay)?; } @@ -21594,9 +20542,6 @@ impl serde::Serialize for RoomConfiguration { if self.sync_streams { struct_ser.serialize_field("syncStreams", &self.sync_streams)?; } - if !self.agents.is_empty() { - struct_ser.serialize_field("agents", &self.agents)?; - } struct_ser.end() } } @@ -21615,13 +20560,13 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { "max_participants", "maxParticipants", "egress", + "agent", "min_playout_delay", "minPlayoutDelay", "max_playout_delay", "maxPlayoutDelay", "sync_streams", "syncStreams", - "agents", ]; #[allow(clippy::enum_variant_names)] @@ -21631,10 +20576,10 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { DepartureTimeout, MaxParticipants, Egress, + Agent, MinPlayoutDelay, MaxPlayoutDelay, SyncStreams, - Agents, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -21662,10 +20607,10 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { "departureTimeout" | "departure_timeout" => Ok(GeneratedField::DepartureTimeout), "maxParticipants" | "max_participants" => Ok(GeneratedField::MaxParticipants), "egress" => Ok(GeneratedField::Egress), + "agent" => Ok(GeneratedField::Agent), "minPlayoutDelay" | "min_playout_delay" => Ok(GeneratedField::MinPlayoutDelay), "maxPlayoutDelay" | "max_playout_delay" => Ok(GeneratedField::MaxPlayoutDelay), "syncStreams" | "sync_streams" => Ok(GeneratedField::SyncStreams), - "agents" => Ok(GeneratedField::Agents), _ => Ok(GeneratedField::__SkipField__), } } @@ -21690,10 +20635,10 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { let mut departure_timeout__ = None; let mut max_participants__ = None; let mut egress__ = None; + let mut agent__ = None; let mut min_playout_delay__ = None; let mut max_playout_delay__ = None; let mut sync_streams__ = None; - let mut agents__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Name => { @@ -21732,6 +20677,12 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { } egress__ = map_.next_value()?; } + GeneratedField::Agent => { + if agent__.is_some() { + return Err(serde::de::Error::duplicate_field("agent")); + } + agent__ = map_.next_value()?; + } GeneratedField::MinPlayoutDelay => { if min_playout_delay__.is_some() { return Err(serde::de::Error::duplicate_field("minPlayoutDelay")); @@ -21754,12 +20705,6 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { } sync_streams__ = Some(map_.next_value()?); } - GeneratedField::Agents => { - if agents__.is_some() { - return Err(serde::de::Error::duplicate_field("agents")); - } - agents__ = Some(map_.next_value()?); - } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -21771,10 +20716,10 @@ impl<'de> serde::Deserialize<'de> for RoomConfiguration { departure_timeout: departure_timeout__.unwrap_or_default(), max_participants: max_participants__.unwrap_or_default(), egress: egress__, + agent: agent__, min_playout_delay: min_playout_delay__.unwrap_or_default(), max_playout_delay: max_playout_delay__.unwrap_or_default(), sync_streams: sync_streams__.unwrap_or_default(), - agents: agents__.unwrap_or_default(), }) } } @@ -22518,245 +21463,49 @@ impl serde::Serialize for RpcResponse { where S: serde::Serializer, { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.request_id.is_empty() { - len += 1; - } - if self.value.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.RpcResponse", len)?; - if !self.request_id.is_empty() { - struct_ser.serialize_field("requestId", &self.request_id)?; - } - if let Some(v) = self.value.as_ref() { - match v { - rpc_response::Value::Payload(v) => { - struct_ser.serialize_field("payload", v)?; - } - rpc_response::Value::Error(v) => { - struct_ser.serialize_field("error", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RpcResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "request_id", - "requestId", - "payload", - "error", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - RequestId, - Payload, - Error, - __SkipField__, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "requestId" | "request_id" => Ok(GeneratedField::RequestId), - "payload" => Ok(GeneratedField::Payload), - "error" => Ok(GeneratedField::Error), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RpcResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.RpcResponse") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut request_id__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::RequestId => { - if request_id__.is_some() { - return Err(serde::de::Error::duplicate_field("requestId")); - } - request_id__ = Some(map_.next_value()?); - } - GeneratedField::Payload => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("payload")); - } - value__ = map_.next_value::<::std::option::Option<_>>()?.map(rpc_response::Value::Payload); - } - GeneratedField::Error => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("error")); - } - value__ = map_.next_value::<::std::option::Option<_>>()?.map(rpc_response::Value::Error) -; - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } - } - Ok(RpcResponse { - request_id: request_id__.unwrap_or_default(), - value: value__, - }) - } - } - deserializer.deserialize_struct("livekit.RpcResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for S3Upload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.access_key.is_empty() { - len += 1; - } - if !self.secret.is_empty() { - len += 1; - } - if !self.session_token.is_empty() { - len += 1; - } - if !self.region.is_empty() { - len += 1; - } - if !self.endpoint.is_empty() { - len += 1; - } - if !self.bucket.is_empty() { - len += 1; - } - if self.force_path_style { - len += 1; - } - if !self.metadata.is_empty() { - len += 1; - } - if !self.tagging.is_empty() { - len += 1; - } - if !self.content_disposition.is_empty() { - len += 1; - } - if self.proxy.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.S3Upload", len)?; - if !self.access_key.is_empty() { - struct_ser.serialize_field("accessKey", &self.access_key)?; - } - if !self.secret.is_empty() { - struct_ser.serialize_field("secret", &self.secret)?; - } - if !self.session_token.is_empty() { - struct_ser.serialize_field("sessionToken", &self.session_token)?; - } - if !self.region.is_empty() { - struct_ser.serialize_field("region", &self.region)?; - } - if !self.endpoint.is_empty() { - struct_ser.serialize_field("endpoint", &self.endpoint)?; - } - if !self.bucket.is_empty() { - struct_ser.serialize_field("bucket", &self.bucket)?; - } - if self.force_path_style { - struct_ser.serialize_field("forcePathStyle", &self.force_path_style)?; - } - if !self.metadata.is_empty() { - struct_ser.serialize_field("metadata", &self.metadata)?; + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.request_id.is_empty() { + len += 1; } - if !self.tagging.is_empty() { - struct_ser.serialize_field("tagging", &self.tagging)?; + if self.value.is_some() { + len += 1; } - if !self.content_disposition.is_empty() { - struct_ser.serialize_field("contentDisposition", &self.content_disposition)?; + let mut struct_ser = serializer.serialize_struct("livekit.RpcResponse", len)?; + if !self.request_id.is_empty() { + struct_ser.serialize_field("requestId", &self.request_id)?; } - if let Some(v) = self.proxy.as_ref() { - struct_ser.serialize_field("proxy", v)?; + if let Some(v) = self.value.as_ref() { + match v { + rpc_response::Value::Payload(v) => { + struct_ser.serialize_field("payload", v)?; + } + rpc_response::Value::Error(v) => { + struct_ser.serialize_field("error", v)?; + } + } } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for S3Upload { +impl<'de> serde::Deserialize<'de> for RpcResponse { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "access_key", - "accessKey", - "secret", - "session_token", - "sessionToken", - "region", - "endpoint", - "bucket", - "force_path_style", - "forcePathStyle", - "metadata", - "tagging", - "content_disposition", - "contentDisposition", - "proxy", + "request_id", + "requestId", + "payload", + "error", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - AccessKey, - Secret, - SessionToken, - Region, - Endpoint, - Bucket, - ForcePathStyle, - Metadata, - Tagging, - ContentDisposition, - Proxy, + RequestId, + Payload, + Error, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -22779,17 +21528,9 @@ impl<'de> serde::Deserialize<'de> for S3Upload { E: serde::de::Error, { match value { - "accessKey" | "access_key" => Ok(GeneratedField::AccessKey), - "secret" => Ok(GeneratedField::Secret), - "sessionToken" | "session_token" => Ok(GeneratedField::SessionToken), - "region" => Ok(GeneratedField::Region), - "endpoint" => Ok(GeneratedField::Endpoint), - "bucket" => Ok(GeneratedField::Bucket), - "forcePathStyle" | "force_path_style" => Ok(GeneratedField::ForcePathStyle), - "metadata" => Ok(GeneratedField::Metadata), - "tagging" => Ok(GeneratedField::Tagging), - "contentDisposition" | "content_disposition" => Ok(GeneratedField::ContentDisposition), - "proxy" => Ok(GeneratedField::Proxy), + "requestId" | "request_id" => Ok(GeneratedField::RequestId), + "payload" => Ok(GeneratedField::Payload), + "error" => Ok(GeneratedField::Error), _ => Ok(GeneratedField::__SkipField__), } } @@ -22799,121 +21540,54 @@ impl<'de> serde::Deserialize<'de> for S3Upload { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = S3Upload; + type Value = RpcResponse; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.S3Upload") + formatter.write_str("struct livekit.RpcResponse") } - fn visit_map(self, mut map_: V) -> std::result::Result + fn visit_map(self, mut map_: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut access_key__ = None; - let mut secret__ = None; - let mut session_token__ = None; - let mut region__ = None; - let mut endpoint__ = None; - let mut bucket__ = None; - let mut force_path_style__ = None; - let mut metadata__ = None; - let mut tagging__ = None; - let mut content_disposition__ = None; - let mut proxy__ = None; + let mut request_id__ = None; + let mut value__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::AccessKey => { - if access_key__.is_some() { - return Err(serde::de::Error::duplicate_field("accessKey")); - } - access_key__ = Some(map_.next_value()?); - } - GeneratedField::Secret => { - if secret__.is_some() { - return Err(serde::de::Error::duplicate_field("secret")); - } - secret__ = Some(map_.next_value()?); - } - GeneratedField::SessionToken => { - if session_token__.is_some() { - return Err(serde::de::Error::duplicate_field("sessionToken")); - } - session_token__ = Some(map_.next_value()?); - } - GeneratedField::Region => { - if region__.is_some() { - return Err(serde::de::Error::duplicate_field("region")); - } - region__ = Some(map_.next_value()?); - } - GeneratedField::Endpoint => { - if endpoint__.is_some() { - return Err(serde::de::Error::duplicate_field("endpoint")); - } - endpoint__ = Some(map_.next_value()?); - } - GeneratedField::Bucket => { - if bucket__.is_some() { - return Err(serde::de::Error::duplicate_field("bucket")); - } - bucket__ = Some(map_.next_value()?); - } - GeneratedField::ForcePathStyle => { - if force_path_style__.is_some() { - return Err(serde::de::Error::duplicate_field("forcePathStyle")); - } - force_path_style__ = Some(map_.next_value()?); - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = Some( - map_.next_value::>()? - ); - } - GeneratedField::Tagging => { - if tagging__.is_some() { - return Err(serde::de::Error::duplicate_field("tagging")); + GeneratedField::RequestId => { + if request_id__.is_some() { + return Err(serde::de::Error::duplicate_field("requestId")); } - tagging__ = Some(map_.next_value()?); + request_id__ = Some(map_.next_value()?); } - GeneratedField::ContentDisposition => { - if content_disposition__.is_some() { - return Err(serde::de::Error::duplicate_field("contentDisposition")); + GeneratedField::Payload => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("payload")); } - content_disposition__ = Some(map_.next_value()?); + value__ = map_.next_value::<::std::option::Option<_>>()?.map(rpc_response::Value::Payload); } - GeneratedField::Proxy => { - if proxy__.is_some() { - return Err(serde::de::Error::duplicate_field("proxy")); + GeneratedField::Error => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("error")); } - proxy__ = map_.next_value()?; + value__ = map_.next_value::<::std::option::Option<_>>()?.map(rpc_response::Value::Error) +; } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } } } - Ok(S3Upload { - access_key: access_key__.unwrap_or_default(), - secret: secret__.unwrap_or_default(), - session_token: session_token__.unwrap_or_default(), - region: region__.unwrap_or_default(), - endpoint: endpoint__.unwrap_or_default(), - bucket: bucket__.unwrap_or_default(), - force_path_style: force_path_style__.unwrap_or_default(), - metadata: metadata__.unwrap_or_default(), - tagging: tagging__.unwrap_or_default(), - content_disposition: content_disposition__.unwrap_or_default(), - proxy: proxy__, + Ok(RpcResponse { + request_id: request_id__.unwrap_or_default(), + value: value__, }) } } - deserializer.deserialize_struct("livekit.S3Upload", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("livekit.RpcResponse", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for SipCallInfo { +impl serde::Serialize for S3Upload { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -22921,160 +21595,113 @@ impl serde::Serialize for SipCallInfo { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.call_id.is_empty() { - len += 1; - } - if !self.trunk_id.is_empty() { - len += 1; - } - if !self.room_name.is_empty() { - len += 1; - } - if !self.room_id.is_empty() { + if !self.access_key.is_empty() { len += 1; } - if !self.participant_identity.is_empty() { + if !self.secret.is_empty() { len += 1; } - if self.from_uri.is_some() { + if !self.session_token.is_empty() { len += 1; } - if self.to_uri.is_some() { + if !self.region.is_empty() { len += 1; } - if !self.enabled_features.is_empty() { + if !self.endpoint.is_empty() { len += 1; } - if self.call_status != 0 { + if !self.bucket.is_empty() { len += 1; } - if self.created_at != 0 { + if self.force_path_style { len += 1; } - if self.started_at != 0 { + if !self.metadata.is_empty() { len += 1; } - if self.ended_at != 0 { + if !self.tagging.is_empty() { len += 1; } - if self.disconnect_reason != 0 { + if !self.content_disposition.is_empty() { len += 1; } - if !self.error.is_empty() { + if self.proxy.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)?; - } - if !self.trunk_id.is_empty() { - struct_ser.serialize_field("trunkId", &self.trunk_id)?; - } - if !self.room_name.is_empty() { - struct_ser.serialize_field("roomName", &self.room_name)?; - } - if !self.room_id.is_empty() { - struct_ser.serialize_field("roomId", &self.room_id)?; - } - if !self.participant_identity.is_empty() { - struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; + let mut struct_ser = serializer.serialize_struct("livekit.S3Upload", len)?; + if !self.access_key.is_empty() { + struct_ser.serialize_field("accessKey", &self.access_key)?; } - if let Some(v) = self.from_uri.as_ref() { - struct_ser.serialize_field("fromUri", v)?; + if !self.secret.is_empty() { + struct_ser.serialize_field("secret", &self.secret)?; } - if let Some(v) = self.to_uri.as_ref() { - struct_ser.serialize_field("toUri", v)?; + if !self.session_token.is_empty() { + struct_ser.serialize_field("sessionToken", &self.session_token)?; } - if !self.enabled_features.is_empty() { - let v = self.enabled_features.iter().cloned().map(|v| { - SipFeature::try_from(v) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", v))) - }).collect::, _>>()?; - struct_ser.serialize_field("enabledFeatures", &v)?; + if !self.region.is_empty() { + struct_ser.serialize_field("region", &self.region)?; } - if self.call_status != 0 { - let v = SipCallStatus::try_from(self.call_status) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.call_status)))?; - struct_ser.serialize_field("callStatus", &v)?; + if !self.endpoint.is_empty() { + struct_ser.serialize_field("endpoint", &self.endpoint)?; } - if self.created_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("createdAt", ToString::to_string(&self.created_at).as_str())?; + if !self.bucket.is_empty() { + struct_ser.serialize_field("bucket", &self.bucket)?; } - if self.started_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + if self.force_path_style { + struct_ser.serialize_field("forcePathStyle", &self.force_path_style)?; } - if self.ended_at != 0 { - #[allow(clippy::needless_borrow)] - #[allow(clippy::needless_borrows_for_generic_args)] - struct_ser.serialize_field("endedAt", ToString::to_string(&self.ended_at).as_str())?; + if !self.metadata.is_empty() { + struct_ser.serialize_field("metadata", &self.metadata)?; } - if self.disconnect_reason != 0 { - let v = DisconnectReason::try_from(self.disconnect_reason) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.disconnect_reason)))?; - struct_ser.serialize_field("disconnectReason", &v)?; + if !self.tagging.is_empty() { + struct_ser.serialize_field("tagging", &self.tagging)?; } - if !self.error.is_empty() { - struct_ser.serialize_field("error", &self.error)?; + if !self.content_disposition.is_empty() { + struct_ser.serialize_field("contentDisposition", &self.content_disposition)?; + } + if let Some(v) = self.proxy.as_ref() { + struct_ser.serialize_field("proxy", v)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for SipCallInfo { +impl<'de> serde::Deserialize<'de> for S3Upload { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "call_id", - "callId", - "trunk_id", - "trunkId", - "room_name", - "roomName", - "room_id", - "roomId", - "participant_identity", - "participantIdentity", - "from_uri", - "fromUri", - "to_uri", - "toUri", - "enabled_features", - "enabledFeatures", - "call_status", - "callStatus", - "created_at", - "createdAt", - "started_at", - "startedAt", - "ended_at", - "endedAt", - "disconnect_reason", - "disconnectReason", - "error", + "access_key", + "accessKey", + "secret", + "session_token", + "sessionToken", + "region", + "endpoint", + "bucket", + "force_path_style", + "forcePathStyle", + "metadata", + "tagging", + "content_disposition", + "contentDisposition", + "proxy", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - CallId, - TrunkId, - RoomName, - RoomId, - ParticipantIdentity, - FromUri, - ToUri, - EnabledFeatures, - CallStatus, - CreatedAt, - StartedAt, - EndedAt, - DisconnectReason, - Error, + AccessKey, + Secret, + SessionToken, + Region, + Endpoint, + Bucket, + ForcePathStyle, + Metadata, + Tagging, + ContentDisposition, + Proxy, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -23097,20 +21724,17 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { E: serde::de::Error, { match value { - "callId" | "call_id" => Ok(GeneratedField::CallId), - "trunkId" | "trunk_id" => Ok(GeneratedField::TrunkId), - "roomName" | "room_name" => Ok(GeneratedField::RoomName), - "roomId" | "room_id" => Ok(GeneratedField::RoomId), - "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), - "fromUri" | "from_uri" => Ok(GeneratedField::FromUri), - "toUri" | "to_uri" => Ok(GeneratedField::ToUri), - "enabledFeatures" | "enabled_features" => Ok(GeneratedField::EnabledFeatures), - "callStatus" | "call_status" => Ok(GeneratedField::CallStatus), - "createdAt" | "created_at" => Ok(GeneratedField::CreatedAt), - "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), - "endedAt" | "ended_at" => Ok(GeneratedField::EndedAt), - "disconnectReason" | "disconnect_reason" => Ok(GeneratedField::DisconnectReason), - "error" => Ok(GeneratedField::Error), + "accessKey" | "access_key" => Ok(GeneratedField::AccessKey), + "secret" => Ok(GeneratedField::Secret), + "sessionToken" | "session_token" => Ok(GeneratedField::SessionToken), + "region" => Ok(GeneratedField::Region), + "endpoint" => Ok(GeneratedField::Endpoint), + "bucket" => Ok(GeneratedField::Bucket), + "forcePathStyle" | "force_path_style" => Ok(GeneratedField::ForcePathStyle), + "metadata" => Ok(GeneratedField::Metadata), + "tagging" => Ok(GeneratedField::Tagging), + "contentDisposition" | "content_disposition" => Ok(GeneratedField::ContentDisposition), + "proxy" => Ok(GeneratedField::Proxy), _ => Ok(GeneratedField::__SkipField__), } } @@ -23120,226 +21744,118 @@ impl<'de> serde::Deserialize<'de> for SipCallInfo { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SipCallInfo; + type Value = S3Upload; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.SIPCallInfo") + formatter.write_str("struct livekit.S3Upload") } - 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 call_id__ = None; - let mut trunk_id__ = None; - let mut room_name__ = None; - let mut room_id__ = None; - let mut participant_identity__ = None; - let mut from_uri__ = None; - let mut to_uri__ = None; - let mut enabled_features__ = None; - let mut call_status__ = None; - let mut created_at__ = None; - let mut started_at__ = None; - let mut ended_at__ = None; - let mut disconnect_reason__ = None; - let mut error__ = None; + let mut access_key__ = None; + let mut secret__ = None; + let mut session_token__ = None; + let mut region__ = None; + let mut endpoint__ = None; + let mut bucket__ = None; + let mut force_path_style__ = None; + let mut metadata__ = None; + let mut tagging__ = None; + let mut content_disposition__ = None; + let mut proxy__ = None; while let Some(k) = map_.next_key()? { match k { - GeneratedField::CallId => { - if call_id__.is_some() { - return Err(serde::de::Error::duplicate_field("callId")); - } - call_id__ = Some(map_.next_value()?); - } - GeneratedField::TrunkId => { - if trunk_id__.is_some() { - return Err(serde::de::Error::duplicate_field("trunkId")); - } - trunk_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::RoomId => { - if room_id__.is_some() { - return Err(serde::de::Error::duplicate_field("roomId")); - } - room_id__ = 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::FromUri => { - if from_uri__.is_some() { - return Err(serde::de::Error::duplicate_field("fromUri")); - } - from_uri__ = map_.next_value()?; - } - GeneratedField::ToUri => { - if to_uri__.is_some() { - return Err(serde::de::Error::duplicate_field("toUri")); - } - to_uri__ = map_.next_value()?; - } - GeneratedField::EnabledFeatures => { - if enabled_features__.is_some() { - return Err(serde::de::Error::duplicate_field("enabledFeatures")); + GeneratedField::AccessKey => { + if access_key__.is_some() { + return Err(serde::de::Error::duplicate_field("accessKey")); } - enabled_features__ = Some(map_.next_value::>()?.into_iter().map(|x| x as i32).collect()); + access_key__ = Some(map_.next_value()?); } - GeneratedField::CallStatus => { - if call_status__.is_some() { - return Err(serde::de::Error::duplicate_field("callStatus")); + GeneratedField::Secret => { + if secret__.is_some() { + return Err(serde::de::Error::duplicate_field("secret")); } - call_status__ = Some(map_.next_value::()? as i32); + secret__ = Some(map_.next_value()?); } - GeneratedField::CreatedAt => { - if created_at__.is_some() { - return Err(serde::de::Error::duplicate_field("createdAt")); + GeneratedField::SessionToken => { + if session_token__.is_some() { + return Err(serde::de::Error::duplicate_field("sessionToken")); } - created_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + session_token__ = Some(map_.next_value()?); } - GeneratedField::StartedAt => { - if started_at__.is_some() { - return Err(serde::de::Error::duplicate_field("startedAt")); + GeneratedField::Region => { + if region__.is_some() { + return Err(serde::de::Error::duplicate_field("region")); } - started_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + region__ = Some(map_.next_value()?); } - GeneratedField::EndedAt => { - if ended_at__.is_some() { - return Err(serde::de::Error::duplicate_field("endedAt")); + GeneratedField::Endpoint => { + if endpoint__.is_some() { + return Err(serde::de::Error::duplicate_field("endpoint")); } - ended_at__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; + endpoint__ = Some(map_.next_value()?); } - GeneratedField::DisconnectReason => { - if disconnect_reason__.is_some() { - return Err(serde::de::Error::duplicate_field("disconnectReason")); + GeneratedField::Bucket => { + if bucket__.is_some() { + return Err(serde::de::Error::duplicate_field("bucket")); } - disconnect_reason__ = Some(map_.next_value::()? as i32); + bucket__ = Some(map_.next_value()?); } - GeneratedField::Error => { - if error__.is_some() { - return Err(serde::de::Error::duplicate_field("error")); + GeneratedField::ForcePathStyle => { + if force_path_style__.is_some() { + return Err(serde::de::Error::duplicate_field("forcePathStyle")); } - error__ = Some(map_.next_value()?); - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; + force_path_style__ = Some(map_.next_value()?); } - } - } - Ok(SipCallInfo { - call_id: call_id__.unwrap_or_default(), - trunk_id: trunk_id__.unwrap_or_default(), - room_name: room_name__.unwrap_or_default(), - room_id: room_id__.unwrap_or_default(), - participant_identity: participant_identity__.unwrap_or_default(), - from_uri: from_uri__, - to_uri: to_uri__, - enabled_features: enabled_features__.unwrap_or_default(), - call_status: call_status__.unwrap_or_default(), - created_at: created_at__.unwrap_or_default(), - started_at: started_at__.unwrap_or_default(), - ended_at: ended_at__.unwrap_or_default(), - disconnect_reason: disconnect_reason__.unwrap_or_default(), - error: error__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("livekit.SIPCallInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SipCallStatus { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::ScsCallIncoming => "SCS_CALL_INCOMING", - Self::ScsParticipantJoined => "SCS_PARTICIPANT_JOINED", - Self::ScsActive => "SCS_ACTIVE", - Self::ScsDisconnected => "SCS_DISCONNECTED", - Self::ScsError => "SCS_ERROR", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for SipCallStatus { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "SCS_CALL_INCOMING", - "SCS_PARTICIPANT_JOINED", - "SCS_ACTIVE", - "SCS_DISCONNECTED", - "SCS_ERROR", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SipCallStatus; - - 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 { - "SCS_CALL_INCOMING" => Ok(SipCallStatus::ScsCallIncoming), - "SCS_PARTICIPANT_JOINED" => Ok(SipCallStatus::ScsParticipantJoined), - "SCS_ACTIVE" => Ok(SipCallStatus::ScsActive), - "SCS_DISCONNECTED" => Ok(SipCallStatus::ScsDisconnected), - "SCS_ERROR" => Ok(SipCallStatus::ScsError), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = Some( + map_.next_value::>()? + ); + } + GeneratedField::Tagging => { + if tagging__.is_some() { + return Err(serde::de::Error::duplicate_field("tagging")); + } + tagging__ = Some(map_.next_value()?); + } + GeneratedField::ContentDisposition => { + if content_disposition__.is_some() { + return Err(serde::de::Error::duplicate_field("contentDisposition")); + } + content_disposition__ = Some(map_.next_value()?); + } + GeneratedField::Proxy => { + if proxy__.is_some() { + return Err(serde::de::Error::duplicate_field("proxy")); + } + proxy__ = map_.next_value()?; + } + GeneratedField::__SkipField__ => { + let _ = map_.next_value::()?; + } + } } + Ok(S3Upload { + access_key: access_key__.unwrap_or_default(), + secret: secret__.unwrap_or_default(), + session_token: session_token__.unwrap_or_default(), + region: region__.unwrap_or_default(), + endpoint: endpoint__.unwrap_or_default(), + bucket: bucket__.unwrap_or_default(), + force_path_style: force_path_style__.unwrap_or_default(), + metadata: metadata__.unwrap_or_default(), + tagging: tagging__.unwrap_or_default(), + content_disposition: content_disposition__.unwrap_or_default(), + proxy: proxy__, + }) } } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("livekit.S3Upload", FIELDS, GeneratedVisitor) } } impl serde::Serialize for SipDispatchRule { @@ -24047,77 +22563,6 @@ impl<'de> serde::Deserialize<'de> for SipDispatchRuleInfo { deserializer.deserialize_struct("livekit.SIPDispatchRuleInfo", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for SipFeature { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::None => "NONE", - Self::KrispEnabled => "KRISP_ENABLED", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for SipFeature { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "NONE", - "KRISP_ENABLED", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SipFeature; - - 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 { - "NONE" => Ok(SipFeature::None), - "KRISP_ENABLED" => Ok(SipFeature::KrispEnabled), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} impl serde::Serialize for SipInboundTrunkInfo { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -24156,18 +22601,6 @@ impl serde::Serialize for SipInboundTrunkInfo { if !self.headers_to_attributes.is_empty() { len += 1; } - if !self.attributes_to_headers.is_empty() { - len += 1; - } - if self.ringing_timeout.is_some() { - len += 1; - } - if self.max_call_duration.is_some() { - len += 1; - } - if self.krisp_enabled { - len += 1; - } let mut struct_ser = serializer.serialize_struct("livekit.SIPInboundTrunkInfo", len)?; if !self.sip_trunk_id.is_empty() { struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; @@ -24199,18 +22632,6 @@ impl serde::Serialize for SipInboundTrunkInfo { if !self.headers_to_attributes.is_empty() { struct_ser.serialize_field("headersToAttributes", &self.headers_to_attributes)?; } - if !self.attributes_to_headers.is_empty() { - struct_ser.serialize_field("attributesToHeaders", &self.attributes_to_headers)?; - } - if let Some(v) = self.ringing_timeout.as_ref() { - struct_ser.serialize_field("ringingTimeout", v)?; - } - if let Some(v) = self.max_call_duration.as_ref() { - struct_ser.serialize_field("maxCallDuration", v)?; - } - if self.krisp_enabled { - struct_ser.serialize_field("krispEnabled", &self.krisp_enabled)?; - } struct_ser.end() } } @@ -24237,14 +22658,6 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { "headers", "headers_to_attributes", "headersToAttributes", - "attributes_to_headers", - "attributesToHeaders", - "ringing_timeout", - "ringingTimeout", - "max_call_duration", - "maxCallDuration", - "krisp_enabled", - "krispEnabled", ]; #[allow(clippy::enum_variant_names)] @@ -24259,10 +22672,6 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { AuthPassword, Headers, HeadersToAttributes, - AttributesToHeaders, - RingingTimeout, - MaxCallDuration, - KrispEnabled, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -24295,10 +22704,6 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { "authPassword" | "auth_password" => Ok(GeneratedField::AuthPassword), "headers" => Ok(GeneratedField::Headers), "headersToAttributes" | "headers_to_attributes" => Ok(GeneratedField::HeadersToAttributes), - "attributesToHeaders" | "attributes_to_headers" => Ok(GeneratedField::AttributesToHeaders), - "ringingTimeout" | "ringing_timeout" => Ok(GeneratedField::RingingTimeout), - "maxCallDuration" | "max_call_duration" => Ok(GeneratedField::MaxCallDuration), - "krispEnabled" | "krisp_enabled" => Ok(GeneratedField::KrispEnabled), _ => Ok(GeneratedField::__SkipField__), } } @@ -24328,10 +22733,6 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { let mut auth_password__ = None; let mut headers__ = None; let mut headers_to_attributes__ = None; - let mut attributes_to_headers__ = None; - let mut ringing_timeout__ = None; - let mut max_call_duration__ = None; - let mut krisp_enabled__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SipTrunkId => { @@ -24398,32 +22799,6 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { map_.next_value::>()? ); } - GeneratedField::AttributesToHeaders => { - if attributes_to_headers__.is_some() { - return Err(serde::de::Error::duplicate_field("attributesToHeaders")); - } - attributes_to_headers__ = Some( - map_.next_value::>()? - ); - } - GeneratedField::RingingTimeout => { - if ringing_timeout__.is_some() { - return Err(serde::de::Error::duplicate_field("ringingTimeout")); - } - ringing_timeout__ = map_.next_value()?; - } - GeneratedField::MaxCallDuration => { - if max_call_duration__.is_some() { - return Err(serde::de::Error::duplicate_field("maxCallDuration")); - } - max_call_duration__ = map_.next_value()?; - } - GeneratedField::KrispEnabled => { - if krisp_enabled__.is_some() { - return Err(serde::de::Error::duplicate_field("krispEnabled")); - } - krisp_enabled__ = Some(map_.next_value()?); - } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -24440,10 +22815,6 @@ impl<'de> serde::Deserialize<'de> for SipInboundTrunkInfo { auth_password: auth_password__.unwrap_or_default(), headers: headers__.unwrap_or_default(), headers_to_attributes: headers_to_attributes__.unwrap_or_default(), - attributes_to_headers: attributes_to_headers__.unwrap_or_default(), - ringing_timeout: ringing_timeout__, - max_call_duration: max_call_duration__, - krisp_enabled: krisp_enabled__.unwrap_or_default(), }) } } @@ -24488,9 +22859,6 @@ impl serde::Serialize for SipOutboundTrunkInfo { if !self.headers_to_attributes.is_empty() { len += 1; } - if !self.attributes_to_headers.is_empty() { - len += 1; - } let mut struct_ser = serializer.serialize_struct("livekit.SIPOutboundTrunkInfo", len)?; if !self.sip_trunk_id.is_empty() { struct_ser.serialize_field("sipTrunkId", &self.sip_trunk_id)?; @@ -24524,9 +22892,6 @@ impl serde::Serialize for SipOutboundTrunkInfo { if !self.headers_to_attributes.is_empty() { struct_ser.serialize_field("headersToAttributes", &self.headers_to_attributes)?; } - if !self.attributes_to_headers.is_empty() { - struct_ser.serialize_field("attributesToHeaders", &self.attributes_to_headers)?; - } struct_ser.end() } } @@ -24551,8 +22916,6 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { "headers", "headers_to_attributes", "headersToAttributes", - "attributes_to_headers", - "attributesToHeaders", ]; #[allow(clippy::enum_variant_names)] @@ -24567,7 +22930,6 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { AuthPassword, Headers, HeadersToAttributes, - AttributesToHeaders, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -24600,7 +22962,6 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { "authPassword" | "auth_password" => Ok(GeneratedField::AuthPassword), "headers" => Ok(GeneratedField::Headers), "headersToAttributes" | "headers_to_attributes" => Ok(GeneratedField::HeadersToAttributes), - "attributesToHeaders" | "attributes_to_headers" => Ok(GeneratedField::AttributesToHeaders), _ => Ok(GeneratedField::__SkipField__), } } @@ -24630,7 +22991,6 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { let mut auth_password__ = None; let mut headers__ = None; let mut headers_to_attributes__ = None; - let mut attributes_to_headers__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::SipTrunkId => { @@ -24697,14 +23057,6 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { map_.next_value::>()? ); } - GeneratedField::AttributesToHeaders => { - if attributes_to_headers__.is_some() { - return Err(serde::de::Error::duplicate_field("attributesToHeaders")); - } - attributes_to_headers__ = Some( - map_.next_value::>()? - ); - } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -24721,7 +23073,6 @@ impl<'de> serde::Deserialize<'de> for SipOutboundTrunkInfo { auth_password: auth_password__.unwrap_or_default(), headers: headers__.unwrap_or_default(), headers_to_attributes: headers_to_attributes__.unwrap_or_default(), - attributes_to_headers: attributes_to_headers__.unwrap_or_default(), }) } } @@ -25359,173 +23710,6 @@ impl<'de> serde::Deserialize<'de> for sip_trunk_info::TrunkKind { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for SipUri { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.user.is_empty() { - len += 1; - } - if !self.host.is_empty() { - len += 1; - } - if !self.ip.is_empty() { - len += 1; - } - if self.port != 0 { - len += 1; - } - if self.transport != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("livekit.SIPUri", len)?; - if !self.user.is_empty() { - struct_ser.serialize_field("user", &self.user)?; - } - if !self.host.is_empty() { - struct_ser.serialize_field("host", &self.host)?; - } - if !self.ip.is_empty() { - struct_ser.serialize_field("ip", &self.ip)?; - } - if self.port != 0 { - struct_ser.serialize_field("port", &self.port)?; - } - if self.transport != 0 { - let v = SipTransport::try_from(self.transport) - .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.transport)))?; - struct_ser.serialize_field("transport", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SipUri { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "user", - "host", - "ip", - "port", - "transport", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - User, - Host, - Ip, - Port, - Transport, - __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 { - "user" => Ok(GeneratedField::User), - "host" => Ok(GeneratedField::Host), - "ip" => Ok(GeneratedField::Ip), - "port" => Ok(GeneratedField::Port), - "transport" => Ok(GeneratedField::Transport), - _ => Ok(GeneratedField::__SkipField__), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SipUri; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct livekit.SIPUri") - } - - fn visit_map(self, mut map_: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut user__ = None; - let mut host__ = None; - let mut ip__ = None; - let mut port__ = None; - let mut transport__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::User => { - if user__.is_some() { - return Err(serde::de::Error::duplicate_field("user")); - } - user__ = Some(map_.next_value()?); - } - GeneratedField::Host => { - if host__.is_some() { - return Err(serde::de::Error::duplicate_field("host")); - } - host__ = Some(map_.next_value()?); - } - GeneratedField::Ip => { - if ip__.is_some() { - return Err(serde::de::Error::duplicate_field("ip")); - } - ip__ = Some(map_.next_value()?); - } - GeneratedField::Port => { - if port__.is_some() { - return Err(serde::de::Error::duplicate_field("port")); - } - port__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Transport => { - if transport__.is_some() { - return Err(serde::de::Error::duplicate_field("transport")); - } - transport__ = Some(map_.next_value::()? as i32); - } - GeneratedField::__SkipField__ => { - let _ = map_.next_value::()?; - } - } - } - Ok(SipUri { - user: user__.unwrap_or_default(), - host: host__.unwrap_or_default(), - ip: ip__.unwrap_or_default(), - port: port__.unwrap_or_default(), - transport: transport__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("livekit.SIPUri", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for SegmentedFileOutput { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -32727,9 +30911,6 @@ impl serde::Serialize for TransferSipParticipantRequest { if !self.transfer_to.is_empty() { len += 1; } - if self.play_dialtone { - len += 1; - } let mut struct_ser = serializer.serialize_struct("livekit.TransferSIPParticipantRequest", len)?; if !self.participant_identity.is_empty() { struct_ser.serialize_field("participantIdentity", &self.participant_identity)?; @@ -32740,9 +30921,6 @@ impl serde::Serialize for TransferSipParticipantRequest { if !self.transfer_to.is_empty() { struct_ser.serialize_field("transferTo", &self.transfer_to)?; } - if self.play_dialtone { - struct_ser.serialize_field("playDialtone", &self.play_dialtone)?; - } struct_ser.end() } } @@ -32759,8 +30937,6 @@ impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { "roomName", "transfer_to", "transferTo", - "play_dialtone", - "playDialtone", ]; #[allow(clippy::enum_variant_names)] @@ -32768,7 +30944,6 @@ impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { ParticipantIdentity, RoomName, TransferTo, - PlayDialtone, __SkipField__, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -32794,7 +30969,6 @@ impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { "participantIdentity" | "participant_identity" => Ok(GeneratedField::ParticipantIdentity), "roomName" | "room_name" => Ok(GeneratedField::RoomName), "transferTo" | "transfer_to" => Ok(GeneratedField::TransferTo), - "playDialtone" | "play_dialtone" => Ok(GeneratedField::PlayDialtone), _ => Ok(GeneratedField::__SkipField__), } } @@ -32817,7 +30991,6 @@ impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { let mut participant_identity__ = None; let mut room_name__ = None; let mut transfer_to__ = None; - let mut play_dialtone__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::ParticipantIdentity => { @@ -32838,12 +31011,6 @@ impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { } transfer_to__ = Some(map_.next_value()?); } - GeneratedField::PlayDialtone => { - if play_dialtone__.is_some() { - return Err(serde::de::Error::duplicate_field("playDialtone")); - } - play_dialtone__ = Some(map_.next_value()?); - } GeneratedField::__SkipField__ => { let _ = map_.next_value::()?; } @@ -32853,7 +31020,6 @@ impl<'de> serde::Deserialize<'de> for TransferSipParticipantRequest { participant_identity: participant_identity__.unwrap_or_default(), room_name: room_name__.unwrap_or_default(), transfer_to: transfer_to__.unwrap_or_default(), - play_dialtone: play_dialtone__.unwrap_or_default(), }) } }