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): Deprecated: configure the webhook in the Dashboard instead. URL where Fishjam 29 notifications will be sent; overrides the Dashboard-configured webhook URL Example: 30 https://backend.address.com/fishjam-notifications-endpoint. 31 """ 32 33 batch_webhook_notifications: bool | Unset = False 34 max_peers: int | None | Unset = UNSET 35 public: bool | Unset = False 36 room_type: RoomType | Unset = UNSET 37 video_codec: VideoCodec | Unset = UNSET 38 webhook_url: None | str | Unset = UNSET 39 40 def to_dict(self) -> dict[str, Any]: 41 batch_webhook_notifications = self.batch_webhook_notifications 42 43 max_peers: int | None | Unset 44 if isinstance(self.max_peers, Unset): 45 max_peers = UNSET 46 else: 47 max_peers = self.max_peers 48 49 public = self.public 50 51 room_type: str | Unset = UNSET 52 if not isinstance(self.room_type, Unset): 53 room_type = self.room_type.value 54 55 video_codec: str | Unset = UNSET 56 if not isinstance(self.video_codec, Unset): 57 video_codec = self.video_codec.value 58 59 webhook_url: None | str | Unset 60 if isinstance(self.webhook_url, Unset): 61 webhook_url = UNSET 62 else: 63 webhook_url = self.webhook_url 64 65 field_dict: dict[str, Any] = {} 66 67 field_dict.update({}) 68 if batch_webhook_notifications is not UNSET: 69 field_dict["batchWebhookNotifications"] = batch_webhook_notifications 70 if max_peers is not UNSET: 71 field_dict["maxPeers"] = max_peers 72 if public is not UNSET: 73 field_dict["public"] = public 74 if room_type is not UNSET: 75 field_dict["roomType"] = room_type 76 if video_codec is not UNSET: 77 field_dict["videoCodec"] = video_codec 78 if webhook_url is not UNSET: 79 field_dict["webhookUrl"] = webhook_url 80 81 return field_dict 82 83 @classmethod 84 def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 85 d = dict(src_dict) 86 batch_webhook_notifications = d.pop("batchWebhookNotifications", UNSET) 87 88 def _parse_max_peers(data: object) -> int | None | Unset: 89 if data is None: 90 return data 91 if isinstance(data, Unset): 92 return data 93 return cast(int | None | Unset, data) 94 95 max_peers = _parse_max_peers(d.pop("maxPeers", UNSET)) 96 97 public = d.pop("public", UNSET) 98 99 _room_type = d.pop("roomType", UNSET) 100 room_type: RoomType | Unset 101 if isinstance(_room_type, Unset): 102 room_type = UNSET 103 else: 104 room_type = RoomType(_room_type) 105 106 _video_codec = d.pop("videoCodec", UNSET) 107 video_codec: VideoCodec | Unset 108 if isinstance(_video_codec, Unset): 109 video_codec = UNSET 110 else: 111 video_codec = VideoCodec(_video_codec) 112 113 def _parse_webhook_url(data: object) -> None | str | Unset: 114 if data is None: 115 return data 116 if isinstance(data, Unset): 117 return data 118 return cast(None | str | Unset, data) 119 120 webhook_url = _parse_webhook_url(d.pop("webhookUrl", UNSET)) 121 122 room_config = cls( 123 batch_webhook_notifications=batch_webhook_notifications, 124 max_peers=max_peers, 125 public=public, 126 room_type=room_type, 127 video_codec=video_codec, 128 webhook_url=webhook_url, 129 ) 130 131 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): Deprecated: configure the webhook in the Dashboard instead. URL where Fishjam notifications will be sent; overrides the Dashboard-configured webhook URL 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]':
40 def to_dict(self) -> dict[str, Any]: 41 batch_webhook_notifications = self.batch_webhook_notifications 42 43 max_peers: int | None | Unset 44 if isinstance(self.max_peers, Unset): 45 max_peers = UNSET 46 else: 47 max_peers = self.max_peers 48 49 public = self.public 50 51 room_type: str | Unset = UNSET 52 if not isinstance(self.room_type, Unset): 53 room_type = self.room_type.value 54 55 video_codec: str | Unset = UNSET 56 if not isinstance(self.video_codec, Unset): 57 video_codec = self.video_codec.value 58 59 webhook_url: None | str | Unset 60 if isinstance(self.webhook_url, Unset): 61 webhook_url = UNSET 62 else: 63 webhook_url = self.webhook_url 64 65 field_dict: dict[str, Any] = {} 66 67 field_dict.update({}) 68 if batch_webhook_notifications is not UNSET: 69 field_dict["batchWebhookNotifications"] = batch_webhook_notifications 70 if max_peers is not UNSET: 71 field_dict["maxPeers"] = max_peers 72 if public is not UNSET: 73 field_dict["public"] = public 74 if room_type is not UNSET: 75 field_dict["roomType"] = room_type 76 if video_codec is not UNSET: 77 field_dict["videoCodec"] = video_codec 78 if webhook_url is not UNSET: 79 field_dict["webhookUrl"] = webhook_url 80 81 return field_dict
@classmethod
def
from_dict(cls: 'type[T]', src_dict: 'Mapping[str, Any]') -> 'T':
83 @classmethod 84 def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 85 d = dict(src_dict) 86 batch_webhook_notifications = d.pop("batchWebhookNotifications", UNSET) 87 88 def _parse_max_peers(data: object) -> int | None | Unset: 89 if data is None: 90 return data 91 if isinstance(data, Unset): 92 return data 93 return cast(int | None | Unset, data) 94 95 max_peers = _parse_max_peers(d.pop("maxPeers", UNSET)) 96 97 public = d.pop("public", UNSET) 98 99 _room_type = d.pop("roomType", UNSET) 100 room_type: RoomType | Unset 101 if isinstance(_room_type, Unset): 102 room_type = UNSET 103 else: 104 room_type = RoomType(_room_type) 105 106 _video_codec = d.pop("videoCodec", UNSET) 107 video_codec: VideoCodec | Unset 108 if isinstance(_video_codec, Unset): 109 video_codec = UNSET 110 else: 111 video_codec = VideoCodec(_video_codec) 112 113 def _parse_webhook_url(data: object) -> None | str | Unset: 114 if data is None: 115 return data 116 if isinstance(data, Unset): 117 return data 118 return cast(None | str | Unset, data) 119 120 webhook_url = _parse_webhook_url(d.pop("webhookUrl", UNSET)) 121 122 room_config = cls( 123 batch_webhook_notifications=batch_webhook_notifications, 124 max_peers=max_peers, 125 public=public, 126 room_type=room_type, 127 video_codec=video_codec, 128 webhook_url=webhook_url, 129 ) 130 131 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