class
RoomConfig:
16@_attrs_define 17class RoomConfig: 18 """Room configuration 19 20 Attributes: 21 batch_webhook_notifications (bool | Unset): If true, webhook notifications for this room are coalesced into a 22 single NotificationBatch per HTTP send instead of one request per notification. VAD notifications are 23 unaffected. Default: False. 24 max_peers (int | None | Unset): Maximum amount of peers allowed into the room Example: 10. 25 public (bool | Unset): True if livestream viewers can omit specifying a token. Default: False. 26 room_type (RoomType | Unset): The use-case of the room. If not provided, this defaults to conference. 27 video_codec (VideoCodec | Unset): Enforces video codec for each peer in the room 28 webhook_url (None | str | Unset): URL where Fishjam notifications will be sent Example: 29 https://backend.address.com/fishjam-notifications-endpoint. 30 """ 31 32 batch_webhook_notifications: bool | Unset = False 33 max_peers: int | None | Unset = UNSET 34 public: bool | Unset = False 35 room_type: RoomType | Unset = UNSET 36 video_codec: VideoCodec | Unset = UNSET 37 webhook_url: None | str | Unset = UNSET 38 39 def to_dict(self) -> dict[str, Any]: 40 batch_webhook_notifications = self.batch_webhook_notifications 41 42 max_peers: int | None | Unset 43 if isinstance(self.max_peers, Unset): 44 max_peers = UNSET 45 else: 46 max_peers = self.max_peers 47 48 public = self.public 49 50 room_type: str | Unset = UNSET 51 if not isinstance(self.room_type, Unset): 52 room_type = self.room_type.value 53 54 video_codec: str | Unset = UNSET 55 if not isinstance(self.video_codec, Unset): 56 video_codec = self.video_codec.value 57 58 webhook_url: None | str | Unset 59 if isinstance(self.webhook_url, Unset): 60 webhook_url = UNSET 61 else: 62 webhook_url = self.webhook_url 63 64 field_dict: dict[str, Any] = {} 65 66 field_dict.update({}) 67 if batch_webhook_notifications is not UNSET: 68 field_dict["batchWebhookNotifications"] = batch_webhook_notifications 69 if max_peers is not UNSET: 70 field_dict["maxPeers"] = max_peers 71 if public is not UNSET: 72 field_dict["public"] = public 73 if room_type is not UNSET: 74 field_dict["roomType"] = room_type 75 if video_codec is not UNSET: 76 field_dict["videoCodec"] = video_codec 77 if webhook_url is not UNSET: 78 field_dict["webhookUrl"] = webhook_url 79 80 return field_dict 81 82 @classmethod 83 def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 84 d = dict(src_dict) 85 batch_webhook_notifications = d.pop("batchWebhookNotifications", UNSET) 86 87 def _parse_max_peers(data: object) -> int | None | Unset: 88 if data is None: 89 return data 90 if isinstance(data, Unset): 91 return data 92 return cast(int | None | Unset, data) 93 94 max_peers = _parse_max_peers(d.pop("maxPeers", UNSET)) 95 96 public = d.pop("public", UNSET) 97 98 _room_type = d.pop("roomType", UNSET) 99 room_type: RoomType | Unset 100 if isinstance(_room_type, Unset): 101 room_type = UNSET 102 else: 103 room_type = RoomType(_room_type) 104 105 _video_codec = d.pop("videoCodec", UNSET) 106 video_codec: VideoCodec | Unset 107 if isinstance(_video_codec, Unset): 108 video_codec = UNSET 109 else: 110 video_codec = VideoCodec(_video_codec) 111 112 def _parse_webhook_url(data: object) -> None | str | Unset: 113 if data is None: 114 return data 115 if isinstance(data, Unset): 116 return data 117 return cast(None | str | Unset, data) 118 119 webhook_url = _parse_webhook_url(d.pop("webhookUrl", UNSET)) 120 121 room_config = cls( 122 batch_webhook_notifications=batch_webhook_notifications, 123 max_peers=max_peers, 124 public=public, 125 room_type=room_type, 126 video_codec=video_codec, 127 webhook_url=webhook_url, 128 ) 129 130 return room_config
Room configuration
Attributes:
- batch_webhook_notifications (bool | Unset): If true, webhook notifications for this room are coalesced into a single NotificationBatch per HTTP send instead of one request per notification. VAD notifications are unaffected. Default: False.
- max_peers (int | None | Unset): Maximum amount of peers allowed into the room Example: 10.
- public (bool | Unset): True if livestream viewers can omit specifying a token. Default: False.
- room_type (RoomType | Unset): The use-case of the room. If not provided, this defaults to conference.
- video_codec (VideoCodec | Unset): Enforces video codec for each peer in the room
- webhook_url (None | str | Unset): URL where Fishjam notifications will be sent Example: https://backend.address.com/fishjam-notifications-endpoint.
RoomConfig( batch_webhook_notifications: 'bool | Unset' = False, max_peers: 'int | None | Unset' = <fishjam._openapi_client.types.Unset object>, public: 'bool | Unset' = False, room_type: 'RoomType | Unset' = <fishjam._openapi_client.types.Unset object>, video_codec: 'VideoCodec | Unset' = <fishjam._openapi_client.types.Unset object>, webhook_url: 'None | str | Unset' = <fishjam._openapi_client.types.Unset object>)
28def __init__(self, batch_webhook_notifications=attr_dict['batch_webhook_notifications'].default, max_peers=attr_dict['max_peers'].default, public=attr_dict['public'].default, room_type=attr_dict['room_type'].default, video_codec=attr_dict['video_codec'].default, webhook_url=attr_dict['webhook_url'].default): 29 self.batch_webhook_notifications = batch_webhook_notifications 30 self.max_peers = max_peers 31 self.public = public 32 self.room_type = room_type 33 self.video_codec = video_codec 34 self.webhook_url = webhook_url
Method generated by attrs for class RoomConfig.
def
to_dict(self) -> 'dict[str, Any]':
39 def to_dict(self) -> dict[str, Any]: 40 batch_webhook_notifications = self.batch_webhook_notifications 41 42 max_peers: int | None | Unset 43 if isinstance(self.max_peers, Unset): 44 max_peers = UNSET 45 else: 46 max_peers = self.max_peers 47 48 public = self.public 49 50 room_type: str | Unset = UNSET 51 if not isinstance(self.room_type, Unset): 52 room_type = self.room_type.value 53 54 video_codec: str | Unset = UNSET 55 if not isinstance(self.video_codec, Unset): 56 video_codec = self.video_codec.value 57 58 webhook_url: None | str | Unset 59 if isinstance(self.webhook_url, Unset): 60 webhook_url = UNSET 61 else: 62 webhook_url = self.webhook_url 63 64 field_dict: dict[str, Any] = {} 65 66 field_dict.update({}) 67 if batch_webhook_notifications is not UNSET: 68 field_dict["batchWebhookNotifications"] = batch_webhook_notifications 69 if max_peers is not UNSET: 70 field_dict["maxPeers"] = max_peers 71 if public is not UNSET: 72 field_dict["public"] = public 73 if room_type is not UNSET: 74 field_dict["roomType"] = room_type 75 if video_codec is not UNSET: 76 field_dict["videoCodec"] = video_codec 77 if webhook_url is not UNSET: 78 field_dict["webhookUrl"] = webhook_url 79 80 return field_dict
@classmethod
def
from_dict(cls: 'type[T]', src_dict: 'Mapping[str, Any]') -> 'T':
82 @classmethod 83 def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 84 d = dict(src_dict) 85 batch_webhook_notifications = d.pop("batchWebhookNotifications", UNSET) 86 87 def _parse_max_peers(data: object) -> int | None | Unset: 88 if data is None: 89 return data 90 if isinstance(data, Unset): 91 return data 92 return cast(int | None | Unset, data) 93 94 max_peers = _parse_max_peers(d.pop("maxPeers", UNSET)) 95 96 public = d.pop("public", UNSET) 97 98 _room_type = d.pop("roomType", UNSET) 99 room_type: RoomType | Unset 100 if isinstance(_room_type, Unset): 101 room_type = UNSET 102 else: 103 room_type = RoomType(_room_type) 104 105 _video_codec = d.pop("videoCodec", UNSET) 106 video_codec: VideoCodec | Unset 107 if isinstance(_video_codec, Unset): 108 video_codec = UNSET 109 else: 110 video_codec = VideoCodec(_video_codec) 111 112 def _parse_webhook_url(data: object) -> None | str | Unset: 113 if data is None: 114 return data 115 if isinstance(data, Unset): 116 return data 117 return cast(None | str | Unset, data) 118 119 webhook_url = _parse_webhook_url(d.pop("webhookUrl", UNSET)) 120 121 room_config = cls( 122 batch_webhook_notifications=batch_webhook_notifications, 123 max_peers=max_peers, 124 public=public, 125 room_type=room_type, 126 video_codec=video_codec, 127 webhook_url=webhook_url, 128 ) 129 130 return room_config
class
VideoCodec(builtins.str, enum.Enum):
5class VideoCodec(str, Enum): 6 """Enforces video codec for each peer in the room""" 7 8 H264 = "h264" 9 VP8 = "vp8" 10 11 def __str__(self) -> str: 12 return str(self.value)
Enforces video codec for each peer in the room
H264 =
<VideoCodec.H264: 'h264'>
VP8 =
<VideoCodec.VP8: 'vp8'>
Inherited Members
- enum.Enum
- name
- value
- builtins.str
- encode
- replace
- split
- rsplit
- join
- capitalize
- casefold
- title
- center
- count
- expandtabs
- find
- partition
- index
- ljust
- lower
- lstrip
- rfind
- rindex
- rjust
- rstrip
- rpartition
- splitlines
- strip
- swapcase
- translate
- upper
- startswith
- endswith
- removeprefix
- removesuffix
- isascii
- islower
- isupper
- istitle
- isspace
- isdecimal
- isdigit
- isnumeric
- isalpha
- isalnum
- isidentifier
- isprintable
- zfill
- format
- format_map
- maketrans
class
RoomType(builtins.str, enum.Enum):
5class RoomType(str, Enum): 6 """The use-case of the room. If not provided, this defaults to conference.""" 7 8 AUDIO_ONLY = "audio_only" 9 AUDIO_ONLY_LIVESTREAM = "audio_only_livestream" 10 BROADCASTER = "broadcaster" 11 CONFERENCE = "conference" 12 FULL_FEATURE = "full_feature" 13 LIVESTREAM = "livestream" 14 15 def __str__(self) -> str: 16 return str(self.value)
The use-case of the room. If not provided, this defaults to conference.
AUDIO_ONLY =
<RoomType.AUDIO_ONLY: 'audio_only'>
AUDIO_ONLY_LIVESTREAM =
<RoomType.AUDIO_ONLY_LIVESTREAM: 'audio_only_livestream'>
BROADCASTER =
<RoomType.BROADCASTER: 'broadcaster'>
CONFERENCE =
<RoomType.CONFERENCE: 'conference'>
FULL_FEATURE =
<RoomType.FULL_FEATURE: 'full_feature'>
LIVESTREAM =
<RoomType.LIVESTREAM: 'livestream'>
Inherited Members
- enum.Enum
- name
- value
- builtins.str
- encode
- replace
- split
- rsplit
- join
- capitalize
- casefold
- title
- center
- count
- expandtabs
- find
- partition
- index
- ljust
- lower
- lstrip
- rfind
- rindex
- rjust
- rstrip
- rpartition
- splitlines
- strip
- swapcase
- translate
- upper
- startswith
- endswith
- removeprefix
- removesuffix
- isascii
- islower
- isupper
- istitle
- isspace
- isdecimal
- isdigit
- isnumeric
- isalpha
- isalnum
- isidentifier
- isprintable
- zfill
- format
- format_map
- maketrans