diff --git a/jellyfish/_openapi_client/models/component_options_file.py b/jellyfish/_openapi_client/models/component_options_file.py index 7760da7..e2945fc 100644 --- a/jellyfish/_openapi_client/models/component_options_file.py +++ b/jellyfish/_openapi_client/models/component_options_file.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ComponentOptionsFile") @@ -12,12 +14,15 @@ class ComponentOptionsFile: file_path: str """Path to track file. Must be either OPUS encapsulated in Ogg or raw h264""" + framerate: Union[Unset, None, int] = UNSET + """Framerate of video in a file. It is only valid for video track""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" def to_dict(self) -> Dict[str, Any]: """@private""" file_path = self.file_path + framerate = self.framerate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -26,6 +31,8 @@ def to_dict(self) -> Dict[str, Any]: "filePath": file_path, } ) + if framerate is not UNSET: + field_dict["framerate"] = framerate return field_dict @@ -35,8 +42,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() file_path = d.pop("filePath") + framerate = d.pop("framerate", UNSET) + component_options_file = cls( file_path=file_path, + framerate=framerate, ) component_options_file.additional_properties = d diff --git a/jellyfish/_openapi_client/models/component_properties_file.py b/jellyfish/_openapi_client/models/component_properties_file.py index ea4357d..c78a29c 100644 --- a/jellyfish/_openapi_client/models/component_properties_file.py +++ b/jellyfish/_openapi_client/models/component_properties_file.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ComponentPropertiesFile") @@ -11,13 +13,16 @@ class ComponentPropertiesFile: """Properties specific to the File component""" file_path: str - """Path to track file. Must be either OPUS encapsulated in Ogg or raw h264""" + """Relative path to track file. Must be either OPUS encapsulated in Ogg or raw h264""" + framerate: Union[Unset, None, int] = UNSET + """Framerate of video in a file. It is only valid for video track""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" def to_dict(self) -> Dict[str, Any]: """@private""" file_path = self.file_path + framerate = self.framerate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -26,6 +31,8 @@ def to_dict(self) -> Dict[str, Any]: "filePath": file_path, } ) + if framerate is not UNSET: + field_dict["framerate"] = framerate return field_dict @@ -35,8 +42,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() file_path = d.pop("filePath") + framerate = d.pop("framerate", UNSET) + component_properties_file = cls( file_path=file_path, + framerate=framerate, ) component_properties_file.additional_properties = d diff --git a/jellyfish/_openapi_client/models/component_properties_rtsp.py b/jellyfish/_openapi_client/models/component_properties_rtsp.py index 9782006..52840e1 100644 --- a/jellyfish/_openapi_client/models/component_properties_rtsp.py +++ b/jellyfish/_openapi_client/models/component_properties_rtsp.py @@ -1,10 +1,8 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - T = TypeVar("T", bound="ComponentPropertiesRTSP") @@ -12,42 +10,38 @@ class ComponentPropertiesRTSP: """Properties specific to the RTSP component""" - source_uri: str - """URI of RTSP source stream""" - keep_alive_interval: Union[Unset, int] = UNSET + keep_alive_interval: int """Interval (in ms) in which keep-alive RTSP messages will be sent to the remote stream source""" - pierce_nat: Union[Unset, bool] = UNSET + pierce_nat: bool """Whether to attempt to create client-side NAT binding by sending an empty datagram from client to source, after the completion of RTSP setup""" - reconnect_delay: Union[Unset, int] = UNSET + reconnect_delay: int """Delay (in ms) between successive reconnect attempts""" - rtp_port: Union[Unset, int] = UNSET + rtp_port: int """Local port RTP stream will be received at""" + source_uri: str + """URI of RTSP source stream""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) """@private""" def to_dict(self) -> Dict[str, Any]: """@private""" - source_uri = self.source_uri keep_alive_interval = self.keep_alive_interval pierce_nat = self.pierce_nat reconnect_delay = self.reconnect_delay rtp_port = self.rtp_port + source_uri = self.source_uri field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "keepAliveInterval": keep_alive_interval, + "pierceNat": pierce_nat, + "reconnectDelay": reconnect_delay, + "rtpPort": rtp_port, "sourceUri": source_uri, } ) - if keep_alive_interval is not UNSET: - field_dict["keepAliveInterval"] = keep_alive_interval - if pierce_nat is not UNSET: - field_dict["pierceNat"] = pierce_nat - if reconnect_delay is not UNSET: - field_dict["reconnectDelay"] = reconnect_delay - if rtp_port is not UNSET: - field_dict["rtpPort"] = rtp_port return field_dict @@ -55,22 +49,22 @@ def to_dict(self) -> Dict[str, Any]: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: """@private""" d = src_dict.copy() - source_uri = d.pop("sourceUri") + keep_alive_interval = d.pop("keepAliveInterval") - keep_alive_interval = d.pop("keepAliveInterval", UNSET) + pierce_nat = d.pop("pierceNat") - pierce_nat = d.pop("pierceNat", UNSET) + reconnect_delay = d.pop("reconnectDelay") - reconnect_delay = d.pop("reconnectDelay", UNSET) + rtp_port = d.pop("rtpPort") - rtp_port = d.pop("rtpPort", UNSET) + source_uri = d.pop("sourceUri") component_properties_rtsp = cls( - source_uri=source_uri, keep_alive_interval=keep_alive_interval, pierce_nat=pierce_nat, reconnect_delay=reconnect_delay, rtp_port=rtp_port, + source_uri=source_uri, ) component_properties_rtsp.additional_properties = d diff --git a/tests/test_room_api.py b/tests/test_room_api.py index 25211ad..cce3dde 100644 --- a/tests/test_room_api.py +++ b/tests/test_room_api.py @@ -63,7 +63,9 @@ ) FILE_OPTIONS = ComponentOptionsFile(file_path="video.h264") -FILE_PROPERTIES = ComponentPropertiesFile(file_path=FILE_OPTIONS.file_path) +FILE_PROPERTIES = ComponentPropertiesFile( + file_path=FILE_OPTIONS.file_path, framerate=30 +) class TestAuthentication: