From d91d9396eab6e3e3685a122c76d9941122b9ffa6 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 7 Aug 2025 18:09:39 +0200 Subject: [PATCH 1/2] Add TrackData to protos --- fishjam/events/__init__.py | 10 ++++++++++ fishjam/events/_protos/fishjam/__init__.py | 13 +++++++++++++ fishjam/events/allowed_notifications.py | 15 +++++++++++++++ protos | 2 +- 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/fishjam/events/__init__.py b/fishjam/events/__init__.py index 10e1029..f812913 100644 --- a/fishjam/events/__init__.py +++ b/fishjam/events/__init__.py @@ -13,11 +13,16 @@ ServerMessageRoomCrashed, ServerMessageRoomCreated, ServerMessageRoomDeleted, + ServerMessageStreamConnected, + ServerMessageStreamDisconnected, ServerMessageTrack, ServerMessageTrackAdded, + ServerMessageTrackData, ServerMessageTrackMetadataUpdated, ServerMessageTrackRemoved, ServerMessageTrackType, + ServerMessageViewerConnected, + ServerMessageViewerDisconnected, ) __all__ = [ @@ -30,9 +35,14 @@ "ServerMessagePeerDisconnected", "ServerMessagePeerMetadataUpdated", "ServerMessagePeerCrashed", + "ServerMessageStreamConnected", + "ServerMessageStreamDisconnected", "ServerMessageTrack", "ServerMessageTrackType", "ServerMessageTrackAdded", + "ServerMessageTrackData", "ServerMessageTrackMetadataUpdated", "ServerMessageTrackRemoved", + "ServerMessageViewerConnected", + "ServerMessageViewerDisconnected", ] diff --git a/fishjam/events/_protos/fishjam/__init__.py b/fishjam/events/_protos/fishjam/__init__.py index dae96c1..65d2563 100644 --- a/fishjam/events/_protos/fishjam/__init__.py +++ b/fishjam/events/_protos/fishjam/__init__.py @@ -99,6 +99,9 @@ class ServerMessage(betterproto.Message): viewer_disconnected: "ServerMessageViewerDisconnected" = betterproto.message_field( 25, group="content" ) + track_data: "ServerMessageTrackData" = betterproto.message_field( + 26, group="content" + ) @dataclass(eq=False, repr=False) @@ -271,6 +274,16 @@ class ServerMessageTrackMetadataUpdated(betterproto.Message): track: "ServerMessageTrack" = betterproto.message_field(4) +@dataclass(eq=False, repr=False) +class ServerMessageTrackData(betterproto.Message): + """Notification containing a chunk of a track's data stream""" + + room_id: str = betterproto.string_field(1) + peer_id: str = betterproto.string_field(2) + track: "ServerMessageTrack" = betterproto.message_field(3) + data: bytes = betterproto.bytes_field(4) + + @dataclass(eq=False, repr=False) class ServerMessageStreamConnected(betterproto.Message): """Notification sent when streamer successfully connects""" diff --git a/fishjam/events/allowed_notifications.py b/fishjam/events/allowed_notifications.py index 8845eb8..b86e81b 100644 --- a/fishjam/events/allowed_notifications.py +++ b/fishjam/events/allowed_notifications.py @@ -10,9 +10,14 @@ ServerMessageRoomCrashed, ServerMessageRoomCreated, ServerMessageRoomDeleted, + ServerMessageStreamConnected, + ServerMessageStreamDisconnected, ServerMessageTrackAdded, + ServerMessageTrackData, ServerMessageTrackMetadataUpdated, ServerMessageTrackRemoved, + ServerMessageViewerConnected, + ServerMessageViewerDisconnected, ) ALLOWED_NOTIFICATIONS = ( @@ -25,9 +30,14 @@ ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, + ServerMessageStreamConnected, + ServerMessageStreamDisconnected, + ServerMessageViewerConnected, + ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated, + ServerMessageTrackData, ) AllowedNotification = Union[ @@ -40,7 +50,12 @@ ServerMessagePeerDisconnected, ServerMessagePeerMetadataUpdated, ServerMessagePeerCrashed, + ServerMessageStreamConnected, + ServerMessageStreamDisconnected, + ServerMessageViewerConnected, + ServerMessageViewerDisconnected, ServerMessageTrackAdded, ServerMessageTrackRemoved, ServerMessageTrackMetadataUpdated, + ServerMessageTrackData, ] diff --git a/protos b/protos index 03330b8..edd3347 160000 --- a/protos +++ b/protos @@ -1 +1 @@ -Subproject commit 03330b83a315adc84a209db0a8fe8e2d9bcf50cc +Subproject commit edd3347e1ad01f38304ea643dab19ad522f83a70 From 342faf7f87536dcc74af47067ec5d1ce843c3257 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur <47872060+AHGIJMKLKKZNPJKQR@users.noreply.github.com> Date: Thu, 7 Aug 2025 18:15:18 +0200 Subject: [PATCH 2/2] Remove components --- .../_openapi_client/api/default/drain_node.py | 127 --------- .../api/default/shutdown_status.py | 129 --------- .../_openapi_client/api/health/__init__.py | 0 .../_openapi_client/api/health/healthcheck.py | 129 --------- fishjam/_openapi_client/api/hls/__init__.py | 0 .../api/hls/get_hls_content.py | 250 ------------------ .../_openapi_client/api/recording/__init__.py | 0 .../api/recording/delete_recording.py | 161 ----------- .../api/recording/get_recording_content.py | 171 ------------ .../api/recording/get_recordings.py | 133 ---------- .../_openapi_client/api/room/add_component.py | 185 ------------- .../api/room/delete_component.py | 179 ------------- .../_openapi_client/api/room/subscribe_to.py | 197 -------------- fishjam/_openapi_client/api/sip/__init__.py | 0 fishjam/_openapi_client/api/sip/dial.py | 197 -------------- fishjam/_openapi_client/api/sip/end_call.py | 179 ------------- fishjam/_openapi_client/api/user/__init__.py | 0 .../_openapi_client/api/user/delete_user.py | 157 ----------- .../_openapi_client/api/user/get_all_users.py | 133 ---------- fishjam/_openapi_client/models/__init__.py | 84 ------ .../models/add_component_json_body.py | 181 ------------- .../models/component_details_response.py | 156 ----------- .../_openapi_client/models/component_file.py | 109 -------- .../_openapi_client/models/component_hls.py | 100 ------- .../models/component_options_file.py | 70 ----- .../models/component_options_hls.py | 125 --------- .../component_options_hls_subscribe_mode.py | 11 - .../component_options_hlss3_credentials.py | 84 ------ .../models/component_options_recording.py | 108 -------- ...ponent_options_recording_s3_credentials.py | 84 ------ ...ponent_options_recording_subscribe_mode.py | 11 - .../models/component_options_rtsp.py | 94 ------- .../models/component_options_sip.py | 72 ----- .../component_options_sipsip_credentials.py | 74 ------ .../models/component_properties_file.py | 67 ----- .../models/component_properties_hls.py | 93 ------- ...component_properties_hls_subscribe_mode.py | 11 - .../models/component_properties_recording.py | 66 ----- ...ent_properties_recording_subscribe_mode.py | 11 - .../models/component_properties_rtsp.py | 88 ------ .../models/component_properties_sip.py | 72 ----- ...component_properties_sipsip_credentials.py | 74 ------ .../models/component_recording.py | 100 ------- .../_openapi_client/models/component_rtsp.py | 100 ------- .../_openapi_client/models/component_sip.py | 100 ------- fishjam/_openapi_client/models/dial_config.py | 60 ----- .../_openapi_client/models/health_report.py | 97 ------- .../models/healthcheck_response.py | 66 ----- fishjam/_openapi_client/models/node_status.py | 91 ------- .../models/node_status_status.py | 11 - .../models/recording_list_response.py | 60 ----- fishjam/_openapi_client/models/room.py | 113 +------- .../_openapi_client/models/s3_credentials.py | 84 ------ .../_openapi_client/models/shutdown_status.py | 60 ----- .../models/shutdown_status_response.py | 66 ----- .../_openapi_client/models/sip_credentials.py | 74 ------ .../models/subscription_config.py | 62 ----- fishjam/_openapi_client/models/user.py | 67 ----- .../models/user_listing_response.py | 75 ------ 59 files changed, 1 insertion(+), 5457 deletions(-) delete mode 100644 fishjam/_openapi_client/api/default/drain_node.py delete mode 100644 fishjam/_openapi_client/api/default/shutdown_status.py delete mode 100644 fishjam/_openapi_client/api/health/__init__.py delete mode 100644 fishjam/_openapi_client/api/health/healthcheck.py delete mode 100644 fishjam/_openapi_client/api/hls/__init__.py delete mode 100644 fishjam/_openapi_client/api/hls/get_hls_content.py delete mode 100644 fishjam/_openapi_client/api/recording/__init__.py delete mode 100644 fishjam/_openapi_client/api/recording/delete_recording.py delete mode 100644 fishjam/_openapi_client/api/recording/get_recording_content.py delete mode 100644 fishjam/_openapi_client/api/recording/get_recordings.py delete mode 100644 fishjam/_openapi_client/api/room/add_component.py delete mode 100644 fishjam/_openapi_client/api/room/delete_component.py delete mode 100644 fishjam/_openapi_client/api/room/subscribe_to.py delete mode 100644 fishjam/_openapi_client/api/sip/__init__.py delete mode 100644 fishjam/_openapi_client/api/sip/dial.py delete mode 100644 fishjam/_openapi_client/api/sip/end_call.py delete mode 100644 fishjam/_openapi_client/api/user/__init__.py delete mode 100644 fishjam/_openapi_client/api/user/delete_user.py delete mode 100644 fishjam/_openapi_client/api/user/get_all_users.py delete mode 100644 fishjam/_openapi_client/models/add_component_json_body.py delete mode 100644 fishjam/_openapi_client/models/component_details_response.py delete mode 100644 fishjam/_openapi_client/models/component_file.py delete mode 100644 fishjam/_openapi_client/models/component_hls.py delete mode 100644 fishjam/_openapi_client/models/component_options_file.py delete mode 100644 fishjam/_openapi_client/models/component_options_hls.py delete mode 100644 fishjam/_openapi_client/models/component_options_hls_subscribe_mode.py delete mode 100644 fishjam/_openapi_client/models/component_options_hlss3_credentials.py delete mode 100644 fishjam/_openapi_client/models/component_options_recording.py delete mode 100644 fishjam/_openapi_client/models/component_options_recording_s3_credentials.py delete mode 100644 fishjam/_openapi_client/models/component_options_recording_subscribe_mode.py delete mode 100644 fishjam/_openapi_client/models/component_options_rtsp.py delete mode 100644 fishjam/_openapi_client/models/component_options_sip.py delete mode 100644 fishjam/_openapi_client/models/component_options_sipsip_credentials.py delete mode 100644 fishjam/_openapi_client/models/component_properties_file.py delete mode 100644 fishjam/_openapi_client/models/component_properties_hls.py delete mode 100644 fishjam/_openapi_client/models/component_properties_hls_subscribe_mode.py delete mode 100644 fishjam/_openapi_client/models/component_properties_recording.py delete mode 100644 fishjam/_openapi_client/models/component_properties_recording_subscribe_mode.py delete mode 100644 fishjam/_openapi_client/models/component_properties_rtsp.py delete mode 100644 fishjam/_openapi_client/models/component_properties_sip.py delete mode 100644 fishjam/_openapi_client/models/component_properties_sipsip_credentials.py delete mode 100644 fishjam/_openapi_client/models/component_recording.py delete mode 100644 fishjam/_openapi_client/models/component_rtsp.py delete mode 100644 fishjam/_openapi_client/models/component_sip.py delete mode 100644 fishjam/_openapi_client/models/dial_config.py delete mode 100644 fishjam/_openapi_client/models/health_report.py delete mode 100644 fishjam/_openapi_client/models/healthcheck_response.py delete mode 100644 fishjam/_openapi_client/models/node_status.py delete mode 100644 fishjam/_openapi_client/models/node_status_status.py delete mode 100644 fishjam/_openapi_client/models/recording_list_response.py delete mode 100644 fishjam/_openapi_client/models/s3_credentials.py delete mode 100644 fishjam/_openapi_client/models/shutdown_status.py delete mode 100644 fishjam/_openapi_client/models/shutdown_status_response.py delete mode 100644 fishjam/_openapi_client/models/sip_credentials.py delete mode 100644 fishjam/_openapi_client/models/subscription_config.py delete mode 100644 fishjam/_openapi_client/models/user.py delete mode 100644 fishjam/_openapi_client/models/user_listing_response.py diff --git a/fishjam/_openapi_client/api/default/drain_node.py b/fishjam/_openapi_client/api/default/drain_node.py deleted file mode 100644 index 5b58a33..0000000 --- a/fishjam/_openapi_client/api/default/drain_node.py +++ /dev/null @@ -1,127 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import Response - - -def _get_kwargs() -> Dict[str, Any]: - return { - "method": "post", - "url": "/admin/shutdown/drain", - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.OK: - response_200 = cast(Any, None) - return response_200 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Marks node as draining, making it the last in the load balancing order. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Marks node as draining, making it the last in the load balancing order. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Marks node as draining, making it the last in the load balancing order. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Marks node as draining, making it the last in the load balancing order. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/default/shutdown_status.py b/fishjam/_openapi_client/api/default/shutdown_status.py deleted file mode 100644 index b68e607..0000000 --- a/fishjam/_openapi_client/api/default/shutdown_status.py +++ /dev/null @@ -1,129 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...models.shutdown_status_response import ShutdownStatusResponse -from ...types import Response - - -def _get_kwargs() -> Dict[str, Any]: - return { - "method": "get", - "url": "/admin/shutdown/status", - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Error, ShutdownStatusResponse]]: - if response.status_code == HTTPStatus.OK: - response_200 = ShutdownStatusResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Error, ShutdownStatusResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, ShutdownStatusResponse]]: - """Returns status information for the shutdown process of Fishjam. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, ShutdownStatusResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, ShutdownStatusResponse]]: - """Returns status information for the shutdown process of Fishjam. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, ShutdownStatusResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, ShutdownStatusResponse]]: - """Returns status information for the shutdown process of Fishjam. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, ShutdownStatusResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, ShutdownStatusResponse]]: - """Returns status information for the shutdown process of Fishjam. - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, ShutdownStatusResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/health/__init__.py b/fishjam/_openapi_client/api/health/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/fishjam/_openapi_client/api/health/healthcheck.py b/fishjam/_openapi_client/api/health/healthcheck.py deleted file mode 100644 index 7d0a9ba..0000000 --- a/fishjam/_openapi_client/api/health/healthcheck.py +++ /dev/null @@ -1,129 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...models.healthcheck_response import HealthcheckResponse -from ...types import Response - - -def _get_kwargs() -> Dict[str, Any]: - return { - "method": "get", - "url": "/admin/health", - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Error, HealthcheckResponse]]: - if response.status_code == HTTPStatus.OK: - response_200 = HealthcheckResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Error, HealthcheckResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, HealthcheckResponse]]: - """Describes the health of Fishjam - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, HealthcheckResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, HealthcheckResponse]]: - """Describes the health of Fishjam - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, HealthcheckResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, HealthcheckResponse]]: - """Describes the health of Fishjam - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, HealthcheckResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, HealthcheckResponse]]: - """Describes the health of Fishjam - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, HealthcheckResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/hls/__init__.py b/fishjam/_openapi_client/api/hls/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/fishjam/_openapi_client/api/hls/get_hls_content.py b/fishjam/_openapi_client/api/hls/get_hls_content.py deleted file mode 100644 index 1783620..0000000 --- a/fishjam/_openapi_client/api/hls/get_hls_content.py +++ /dev/null @@ -1,250 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import UNSET, Response, Unset - - -def _get_kwargs( - room_id: str, - filename: str, - *, - field_hls_msn: Union[Unset, None, int] = UNSET, - field_hls_part: Union[Unset, None, int] = UNSET, - field_hls_skip: Union[Unset, None, str] = UNSET, - range_: Union[Unset, str] = UNSET, -) -> Dict[str, Any]: - headers = {} - if not isinstance(range_, Unset): - headers["range"] = range_ - - params: Dict[str, Any] = {} - params["_HLS_msn"] = field_hls_msn - - params["_HLS_part"] = field_hls_part - - params["_HLS_skip"] = field_hls_skip - - params = {k: v for k, v in params.items() if v is not UNSET and v is not None} - - return { - "method": "get", - "url": "/hls/{room_id}/{filename}".format( - room_id=room_id, - filename=filename, - ), - "params": params, - "headers": headers, - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error, str]]: - if response.status_code == HTTPStatus.OK: - response_200 = cast(str, response.json()) - return response_200 - if response.status_code == HTTPStatus.MOVED_PERMANENTLY: - response_301 = cast(Any, None) - return response_301 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - room_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], - field_hls_msn: Union[Unset, None, int] = UNSET, - field_hls_part: Union[Unset, None, int] = UNSET, - field_hls_skip: Union[Unset, None, str] = UNSET, - range_: Union[Unset, str] = UNSET, -) -> Response[Union[Any, Error, str]]: - """Retrieve HLS Content - - Args: - room_id (str): - filename (str): - field_hls_msn (Union[Unset, None, int]): Segment sequence number Example: 10. - field_hls_part (Union[Unset, None, int]): Partial segment sequence number Example: 10. - field_hls_skip (Union[Unset, None, str]): Set to "YES" if delta manifest should be - requested Example: True. - range_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error, str]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - filename=filename, - field_hls_msn=field_hls_msn, - field_hls_part=field_hls_part, - field_hls_skip=field_hls_skip, - range_=range_, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - room_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], - field_hls_msn: Union[Unset, None, int] = UNSET, - field_hls_part: Union[Unset, None, int] = UNSET, - field_hls_skip: Union[Unset, None, str] = UNSET, - range_: Union[Unset, str] = UNSET, -) -> Optional[Union[Any, Error, str]]: - """Retrieve HLS Content - - Args: - room_id (str): - filename (str): - field_hls_msn (Union[Unset, None, int]): Segment sequence number Example: 10. - field_hls_part (Union[Unset, None, int]): Partial segment sequence number Example: 10. - field_hls_skip (Union[Unset, None, str]): Set to "YES" if delta manifest should be - requested Example: True. - range_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error, str] - """ - - return sync_detailed( - room_id=room_id, - filename=filename, - client=client, - field_hls_msn=field_hls_msn, - field_hls_part=field_hls_part, - field_hls_skip=field_hls_skip, - range_=range_, - ).parsed - - -async def asyncio_detailed( - room_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], - field_hls_msn: Union[Unset, None, int] = UNSET, - field_hls_part: Union[Unset, None, int] = UNSET, - field_hls_skip: Union[Unset, None, str] = UNSET, - range_: Union[Unset, str] = UNSET, -) -> Response[Union[Any, Error, str]]: - """Retrieve HLS Content - - Args: - room_id (str): - filename (str): - field_hls_msn (Union[Unset, None, int]): Segment sequence number Example: 10. - field_hls_part (Union[Unset, None, int]): Partial segment sequence number Example: 10. - field_hls_skip (Union[Unset, None, str]): Set to "YES" if delta manifest should be - requested Example: True. - range_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error, str]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - filename=filename, - field_hls_msn=field_hls_msn, - field_hls_part=field_hls_part, - field_hls_skip=field_hls_skip, - range_=range_, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - room_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], - field_hls_msn: Union[Unset, None, int] = UNSET, - field_hls_part: Union[Unset, None, int] = UNSET, - field_hls_skip: Union[Unset, None, str] = UNSET, - range_: Union[Unset, str] = UNSET, -) -> Optional[Union[Any, Error, str]]: - """Retrieve HLS Content - - Args: - room_id (str): - filename (str): - field_hls_msn (Union[Unset, None, int]): Segment sequence number Example: 10. - field_hls_part (Union[Unset, None, int]): Partial segment sequence number Example: 10. - field_hls_skip (Union[Unset, None, str]): Set to "YES" if delta manifest should be - requested Example: True. - range_ (Union[Unset, str]): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error, str] - """ - - return ( - await asyncio_detailed( - room_id=room_id, - filename=filename, - client=client, - field_hls_msn=field_hls_msn, - field_hls_part=field_hls_part, - field_hls_skip=field_hls_skip, - range_=range_, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/recording/__init__.py b/fishjam/_openapi_client/api/recording/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/fishjam/_openapi_client/api/recording/delete_recording.py b/fishjam/_openapi_client/api/recording/delete_recording.py deleted file mode 100644 index 22509ba..0000000 --- a/fishjam/_openapi_client/api/recording/delete_recording.py +++ /dev/null @@ -1,161 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - recording_id: str, -) -> Dict[str, Any]: - return { - "method": "delete", - "url": "/recording/{recording_id}".format( - recording_id=recording_id, - ), - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.NO_CONTENT: - response_204 = cast(Any, None) - return response_204 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - recording_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Deletes the recording - - Args: - recording_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - recording_id=recording_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - recording_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Deletes the recording - - Args: - recording_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - recording_id=recording_id, - client=client, - ).parsed - - -async def asyncio_detailed( - recording_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Deletes the recording - - Args: - recording_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - recording_id=recording_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - recording_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Deletes the recording - - Args: - recording_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - recording_id=recording_id, - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/recording/get_recording_content.py b/fishjam/_openapi_client/api/recording/get_recording_content.py deleted file mode 100644 index 436b522..0000000 --- a/fishjam/_openapi_client/api/recording/get_recording_content.py +++ /dev/null @@ -1,171 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - recording_id: str, - filename: str, -) -> Dict[str, Any]: - return { - "method": "get", - "url": "/recording/{recording_id}/{filename}".format( - recording_id=recording_id, - filename=filename, - ), - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Error, str]]: - if response.status_code == HTTPStatus.OK: - response_200 = cast(str, response.json()) - return response_200 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Error, str]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - recording_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Error, str]]: - """Retrieve Recording (HLS) Content - - Args: - recording_id (str): - filename (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, str]] - """ - - kwargs = _get_kwargs( - recording_id=recording_id, - filename=filename, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - recording_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Error, str]]: - """Retrieve Recording (HLS) Content - - Args: - recording_id (str): - filename (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, str] - """ - - return sync_detailed( - recording_id=recording_id, - filename=filename, - client=client, - ).parsed - - -async def asyncio_detailed( - recording_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[Error, str]]: - """Retrieve Recording (HLS) Content - - Args: - recording_id (str): - filename (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, str]] - """ - - kwargs = _get_kwargs( - recording_id=recording_id, - filename=filename, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - recording_id: str, - filename: str, - *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[Error, str]]: - """Retrieve Recording (HLS) Content - - Args: - recording_id (str): - filename (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, str] - """ - - return ( - await asyncio_detailed( - recording_id=recording_id, - filename=filename, - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/recording/get_recordings.py b/fishjam/_openapi_client/api/recording/get_recordings.py deleted file mode 100644 index 6464144..0000000 --- a/fishjam/_openapi_client/api/recording/get_recordings.py +++ /dev/null @@ -1,133 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...models.recording_list_response import RecordingListResponse -from ...types import Response - - -def _get_kwargs() -> Dict[str, Any]: - return { - "method": "get", - "url": "/recording", - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Error, RecordingListResponse]]: - if response.status_code == HTTPStatus.OK: - response_200 = RecordingListResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Error, RecordingListResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, RecordingListResponse]]: - """Lists all available recordings - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, RecordingListResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, RecordingListResponse]]: - """Lists all available recordings - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, RecordingListResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, RecordingListResponse]]: - """Lists all available recordings - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, RecordingListResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, RecordingListResponse]]: - """Lists all available recordings - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, RecordingListResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/room/add_component.py b/fishjam/_openapi_client/api/room/add_component.py deleted file mode 100644 index 343a915..0000000 --- a/fishjam/_openapi_client/api/room/add_component.py +++ /dev/null @@ -1,185 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.add_component_json_body import AddComponentJsonBody -from ...models.component_details_response import ComponentDetailsResponse -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - room_id: str, - *, - json_body: AddComponentJsonBody, -) -> Dict[str, Any]: - json_json_body = json_body.to_dict() - - return { - "method": "post", - "url": "/room/{room_id}/component".format( - room_id=room_id, - ), - "json": json_json_body, - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ComponentDetailsResponse, Error]]: - if response.status_code == HTTPStatus.CREATED: - response_201 = ComponentDetailsResponse.from_dict(response.json()) - - return response_201 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ComponentDetailsResponse, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - room_id: str, - *, - client: AuthenticatedClient, - json_body: AddComponentJsonBody, -) -> Response[Union[ComponentDetailsResponse, Error]]: - """Creates the component and adds it to the room - - Args: - room_id (str): - json_body (AddComponentJsonBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ComponentDetailsResponse, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - json_body=json_body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - room_id: str, - *, - client: AuthenticatedClient, - json_body: AddComponentJsonBody, -) -> Optional[Union[ComponentDetailsResponse, Error]]: - """Creates the component and adds it to the room - - Args: - room_id (str): - json_body (AddComponentJsonBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ComponentDetailsResponse, Error] - """ - - return sync_detailed( - room_id=room_id, - client=client, - json_body=json_body, - ).parsed - - -async def asyncio_detailed( - room_id: str, - *, - client: AuthenticatedClient, - json_body: AddComponentJsonBody, -) -> Response[Union[ComponentDetailsResponse, Error]]: - """Creates the component and adds it to the room - - Args: - room_id (str): - json_body (AddComponentJsonBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[ComponentDetailsResponse, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - json_body=json_body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - room_id: str, - *, - client: AuthenticatedClient, - json_body: AddComponentJsonBody, -) -> Optional[Union[ComponentDetailsResponse, Error]]: - """Creates the component and adds it to the room - - Args: - room_id (str): - json_body (AddComponentJsonBody): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[ComponentDetailsResponse, Error] - """ - - return ( - await asyncio_detailed( - room_id=room_id, - client=client, - json_body=json_body, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/room/delete_component.py b/fishjam/_openapi_client/api/room/delete_component.py deleted file mode 100644 index b190eb5..0000000 --- a/fishjam/_openapi_client/api/room/delete_component.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - room_id: str, - id: str, -) -> Dict[str, Any]: - return { - "method": "delete", - "url": "/room/{room_id}/component/{id}".format( - room_id=room_id, - id=id, - ), - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.NO_CONTENT: - response_204 = cast(Any, None) - return response_204 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - room_id: str, - id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Delete the component from the room - - Args: - room_id (str): - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - id=id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - room_id: str, - id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Delete the component from the room - - Args: - room_id (str): - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - room_id=room_id, - id=id, - client=client, - ).parsed - - -async def asyncio_detailed( - room_id: str, - id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Delete the component from the room - - Args: - room_id (str): - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - id=id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - room_id: str, - id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Delete the component from the room - - Args: - room_id (str): - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - room_id=room_id, - id=id, - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/room/subscribe_to.py b/fishjam/_openapi_client/api/room/subscribe_to.py deleted file mode 100644 index 465f4de..0000000 --- a/fishjam/_openapi_client/api/room/subscribe_to.py +++ /dev/null @@ -1,197 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...models.subscription_config import SubscriptionConfig -from ...types import Response - - -def _get_kwargs( - room_id: str, - component_id: str, - *, - json_body: SubscriptionConfig, -) -> Dict[str, Any]: - json_json_body = json_body.to_dict() - - return { - "method": "post", - "url": "/room/{room_id}/component/{component_id}/subscribe".format( - room_id=room_id, - component_id=component_id, - ), - "json": json_json_body, - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.CREATED: - response_201 = cast(Any, None) - return response_201 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: SubscriptionConfig, -) -> Response[Union[Any, Error]]: - """Subscribe component to the tracks of peers or components - - Args: - room_id (str): - component_id (str): - json_body (SubscriptionConfig): Subscription config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - component_id=component_id, - json_body=json_body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: SubscriptionConfig, -) -> Optional[Union[Any, Error]]: - """Subscribe component to the tracks of peers or components - - Args: - room_id (str): - component_id (str): - json_body (SubscriptionConfig): Subscription config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - room_id=room_id, - component_id=component_id, - client=client, - json_body=json_body, - ).parsed - - -async def asyncio_detailed( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: SubscriptionConfig, -) -> Response[Union[Any, Error]]: - """Subscribe component to the tracks of peers or components - - Args: - room_id (str): - component_id (str): - json_body (SubscriptionConfig): Subscription config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - component_id=component_id, - json_body=json_body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: SubscriptionConfig, -) -> Optional[Union[Any, Error]]: - """Subscribe component to the tracks of peers or components - - Args: - room_id (str): - component_id (str): - json_body (SubscriptionConfig): Subscription config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - room_id=room_id, - component_id=component_id, - client=client, - json_body=json_body, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/sip/__init__.py b/fishjam/_openapi_client/api/sip/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/fishjam/_openapi_client/api/sip/dial.py b/fishjam/_openapi_client/api/sip/dial.py deleted file mode 100644 index 2b96c96..0000000 --- a/fishjam/_openapi_client/api/sip/dial.py +++ /dev/null @@ -1,197 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.dial_config import DialConfig -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - room_id: str, - component_id: str, - *, - json_body: DialConfig, -) -> Dict[str, Any]: - json_json_body = json_body.to_dict() - - return { - "method": "post", - "url": "/sip/{room_id}/{component_id}/call".format( - room_id=room_id, - component_id=component_id, - ), - "json": json_json_body, - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.CREATED: - response_201 = cast(Any, None) - return response_201 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: DialConfig, -) -> Response[Union[Any, Error]]: - """Make a call from the SIP component to the provided phone number - - Args: - room_id (str): - component_id (str): - json_body (DialConfig): Dial config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - component_id=component_id, - json_body=json_body, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: DialConfig, -) -> Optional[Union[Any, Error]]: - """Make a call from the SIP component to the provided phone number - - Args: - room_id (str): - component_id (str): - json_body (DialConfig): Dial config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - room_id=room_id, - component_id=component_id, - client=client, - json_body=json_body, - ).parsed - - -async def asyncio_detailed( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: DialConfig, -) -> Response[Union[Any, Error]]: - """Make a call from the SIP component to the provided phone number - - Args: - room_id (str): - component_id (str): - json_body (DialConfig): Dial config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - component_id=component_id, - json_body=json_body, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, - json_body: DialConfig, -) -> Optional[Union[Any, Error]]: - """Make a call from the SIP component to the provided phone number - - Args: - room_id (str): - component_id (str): - json_body (DialConfig): Dial config - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - room_id=room_id, - component_id=component_id, - client=client, - json_body=json_body, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/sip/end_call.py b/fishjam/_openapi_client/api/sip/end_call.py deleted file mode 100644 index 484aadf..0000000 --- a/fishjam/_openapi_client/api/sip/end_call.py +++ /dev/null @@ -1,179 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - room_id: str, - component_id: str, -) -> Dict[str, Any]: - return { - "method": "delete", - "url": "/sip/{room_id}/{component_id}/call".format( - room_id=room_id, - component_id=component_id, - ), - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.CREATED: - response_201 = cast(Any, None) - return response_201 - if response.status_code == HTTPStatus.BAD_REQUEST: - response_400 = Error.from_dict(response.json()) - - return response_400 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.NOT_FOUND: - response_404 = Error.from_dict(response.json()) - - return response_404 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Finish call made by SIP component - - Args: - room_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - component_id=component_id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Finish call made by SIP component - - Args: - room_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - room_id=room_id, - component_id=component_id, - client=client, - ).parsed - - -async def asyncio_detailed( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Finish call made by SIP component - - Args: - room_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - room_id=room_id, - component_id=component_id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - room_id: str, - component_id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Finish call made by SIP component - - Args: - room_id (str): - component_id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - room_id=room_id, - component_id=component_id, - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/user/__init__.py b/fishjam/_openapi_client/api/user/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/fishjam/_openapi_client/api/user/delete_user.py b/fishjam/_openapi_client/api/user/delete_user.py deleted file mode 100644 index 09836cd..0000000 --- a/fishjam/_openapi_client/api/user/delete_user.py +++ /dev/null @@ -1,157 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union, cast - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...types import Response - - -def _get_kwargs( - id: str, -) -> Dict[str, Any]: - return { - "method": "delete", - "url": "/admin/user/{id}".format( - id=id, - ), - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, Error]]: - if response.status_code == HTTPStatus.NO_CONTENT: - response_204 = cast(Any, None) - return response_204 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, Error]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Removes user with provided user id - - Args: - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - id=id, - ) - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Removes user with provided user id - - Args: - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return sync_detailed( - id=id, - client=client, - ).parsed - - -async def asyncio_detailed( - id: str, - *, - client: AuthenticatedClient, -) -> Response[Union[Any, Error]]: - """Removes user with provided user id - - Args: - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Any, Error]] - """ - - kwargs = _get_kwargs( - id=id, - ) - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - id: str, - *, - client: AuthenticatedClient, -) -> Optional[Union[Any, Error]]: - """Removes user with provided user id - - Args: - id (str): - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Any, Error] - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/api/user/get_all_users.py b/fishjam/_openapi_client/api/user/get_all_users.py deleted file mode 100644 index 3dbc290..0000000 --- a/fishjam/_openapi_client/api/user/get_all_users.py +++ /dev/null @@ -1,133 +0,0 @@ -from http import HTTPStatus -from typing import Any, Dict, Optional, Union - -import httpx - -from ... import errors -from ...client import AuthenticatedClient, Client -from ...models.error import Error -from ...models.user_listing_response import UserListingResponse -from ...types import Response - - -def _get_kwargs() -> Dict[str, Any]: - return { - "method": "get", - "url": "/admin/user", - } - - -def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Error, UserListingResponse]]: - if response.status_code == HTTPStatus.OK: - response_200 = UserListingResponse.from_dict(response.json()) - - return response_200 - if response.status_code == HTTPStatus.UNAUTHORIZED: - response_401 = Error.from_dict(response.json()) - - return response_401 - if response.status_code == HTTPStatus.SERVICE_UNAVAILABLE: - response_503 = Error.from_dict(response.json()) - - return response_503 - if client.raise_on_unexpected_status: - raise errors.UnexpectedStatus(response.status_code, response.content) - else: - return None - - -def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Error, UserListingResponse]]: - return Response( - status_code=HTTPStatus(response.status_code), - content=response.content, - headers=response.headers, - parsed=_parse_response(client=client, response=response), - ) - - -def sync_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, UserListingResponse]]: - """Show information about all users - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, UserListingResponse]] - """ - - kwargs = _get_kwargs() - - response = client.get_httpx_client().request( - **kwargs, - ) - - return _build_response(client=client, response=response) - - -def sync( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, UserListingResponse]]: - """Show information about all users - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, UserListingResponse] - """ - - return sync_detailed( - client=client, - ).parsed - - -async def asyncio_detailed( - *, - client: AuthenticatedClient, -) -> Response[Union[Error, UserListingResponse]]: - """Show information about all users - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Response[Union[Error, UserListingResponse]] - """ - - kwargs = _get_kwargs() - - response = await client.get_async_httpx_client().request(**kwargs) - - return _build_response(client=client, response=response) - - -async def asyncio( - *, - client: AuthenticatedClient, -) -> Optional[Union[Error, UserListingResponse]]: - """Show information about all users - - Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. - httpx.TimeoutException: If the request takes longer than Client.timeout. - - Returns: - Union[Error, UserListingResponse] - """ - - return ( - await asyncio_detailed( - client=client, - ) - ).parsed diff --git a/fishjam/_openapi_client/models/__init__.py b/fishjam/_openapi_client/models/__init__.py index 29075cf..dd105f3 100644 --- a/fishjam/_openapi_client/models/__init__.py +++ b/fishjam/_openapi_client/models/__init__.py @@ -1,47 +1,9 @@ """ Contains all the data models used in inputs/outputs """ -from .add_component_json_body import AddComponentJsonBody from .add_peer_json_body import AddPeerJsonBody from .broadcaster_verify_token_response import BroadcasterVerifyTokenResponse from .broadcaster_verify_token_response_data import BroadcasterVerifyTokenResponseData -from .component_details_response import ComponentDetailsResponse -from .component_file import ComponentFile -from .component_hls import ComponentHLS -from .component_options_file import ComponentOptionsFile -from .component_options_hls import ComponentOptionsHLS -from .component_options_hls_subscribe_mode import ComponentOptionsHLSSubscribeMode -from .component_options_hlss3_credentials import ComponentOptionsHLSS3Credentials -from .component_options_recording import ComponentOptionsRecording -from .component_options_recording_s3_credentials import ( - ComponentOptionsRecordingS3Credentials, -) -from .component_options_recording_subscribe_mode import ( - ComponentOptionsRecordingSubscribeMode, -) -from .component_options_rtsp import ComponentOptionsRTSP -from .component_options_sip import ComponentOptionsSIP -from .component_options_sipsip_credentials import ComponentOptionsSIPSIPCredentials -from .component_properties_file import ComponentPropertiesFile -from .component_properties_hls import ComponentPropertiesHLS -from .component_properties_hls_subscribe_mode import ComponentPropertiesHLSSubscribeMode -from .component_properties_recording import ComponentPropertiesRecording -from .component_properties_recording_subscribe_mode import ( - ComponentPropertiesRecordingSubscribeMode, -) -from .component_properties_rtsp import ComponentPropertiesRTSP -from .component_properties_sip import ComponentPropertiesSIP -from .component_properties_sipsip_credentials import ( - ComponentPropertiesSIPSIPCredentials, -) -from .component_recording import ComponentRecording -from .component_rtsp import ComponentRTSP -from .component_sip import ComponentSIP -from .dial_config import DialConfig from .error import Error -from .health_report import HealthReport -from .healthcheck_response import HealthcheckResponse -from .node_status import NodeStatus -from .node_status_status import NodeStatusStatus from .peer import Peer from .peer_details_response import PeerDetailsResponse from .peer_details_response_data import PeerDetailsResponseData @@ -50,7 +12,6 @@ from .peer_refresh_token_response import PeerRefreshTokenResponse from .peer_refresh_token_response_data import PeerRefreshTokenResponseData from .peer_status import PeerStatus -from .recording_list_response import RecordingListResponse from .room import Room from .room_config import RoomConfig from .room_config_room_type import RoomConfigRoomType @@ -59,53 +20,16 @@ from .room_create_details_response_data import RoomCreateDetailsResponseData from .room_details_response import RoomDetailsResponse from .rooms_listing_response import RoomsListingResponse -from .s3_credentials import S3Credentials -from .shutdown_status import ShutdownStatus -from .shutdown_status_response import ShutdownStatusResponse -from .sip_credentials import SIPCredentials from .streamer_token import StreamerToken -from .subscription_config import SubscriptionConfig from .track import Track from .track_type import TrackType -from .user import User -from .user_listing_response import UserListingResponse from .viewer_token import ViewerToken __all__ = ( - "AddComponentJsonBody", "AddPeerJsonBody", "BroadcasterVerifyTokenResponse", "BroadcasterVerifyTokenResponseData", - "ComponentDetailsResponse", - "ComponentFile", - "ComponentHLS", - "ComponentOptionsFile", - "ComponentOptionsHLS", - "ComponentOptionsHLSS3Credentials", - "ComponentOptionsHLSSubscribeMode", - "ComponentOptionsRecording", - "ComponentOptionsRecordingS3Credentials", - "ComponentOptionsRecordingSubscribeMode", - "ComponentOptionsRTSP", - "ComponentOptionsSIP", - "ComponentOptionsSIPSIPCredentials", - "ComponentPropertiesFile", - "ComponentPropertiesHLS", - "ComponentPropertiesHLSSubscribeMode", - "ComponentPropertiesRecording", - "ComponentPropertiesRecordingSubscribeMode", - "ComponentPropertiesRTSP", - "ComponentPropertiesSIP", - "ComponentPropertiesSIPSIPCredentials", - "ComponentRecording", - "ComponentRTSP", - "ComponentSIP", - "DialConfig", "Error", - "HealthcheckResponse", - "HealthReport", - "NodeStatus", - "NodeStatusStatus", "Peer", "PeerDetailsResponse", "PeerDetailsResponseData", @@ -114,7 +38,6 @@ "PeerRefreshTokenResponse", "PeerRefreshTokenResponseData", "PeerStatus", - "RecordingListResponse", "Room", "RoomConfig", "RoomConfigRoomType", @@ -123,15 +46,8 @@ "RoomCreateDetailsResponseData", "RoomDetailsResponse", "RoomsListingResponse", - "S3Credentials", - "ShutdownStatus", - "ShutdownStatusResponse", - "SIPCredentials", "StreamerToken", - "SubscriptionConfig", "Track", "TrackType", - "User", - "UserListingResponse", "ViewerToken", ) diff --git a/fishjam/_openapi_client/models/add_component_json_body.py b/fishjam/_openapi_client/models/add_component_json_body.py deleted file mode 100644 index 23697da..0000000 --- a/fishjam/_openapi_client/models/add_component_json_body.py +++ /dev/null @@ -1,181 +0,0 @@ -from typing import ( - TYPE_CHECKING, - 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 - -if TYPE_CHECKING: - from ..models.component_options_file import ComponentOptionsFile - from ..models.component_options_hls import ComponentOptionsHLS - from ..models.component_options_recording import ComponentOptionsRecording - from ..models.component_options_rtsp import ComponentOptionsRTSP - from ..models.component_options_sip import ComponentOptionsSIP - - -T = TypeVar("T", bound="AddComponentJsonBody") - - -@_attrs_define -class AddComponentJsonBody: - """ """ - - type: str - """Component type""" - options: Union[ - "ComponentOptionsFile", - "ComponentOptionsHLS", - "ComponentOptionsRTSP", - "ComponentOptionsRecording", - "ComponentOptionsSIP", - Unset, - ] = UNSET - """Component-specific options""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - from ..models.component_options_file import ComponentOptionsFile - from ..models.component_options_hls import ComponentOptionsHLS - from ..models.component_options_rtsp import ComponentOptionsRTSP - from ..models.component_options_sip import ComponentOptionsSIP - - type = self.type - options: Union[Dict[str, Any], Unset] - if isinstance(self.options, Unset): - options = UNSET - - elif isinstance(self.options, ComponentOptionsHLS): - options = self.options.to_dict() - - elif isinstance(self.options, ComponentOptionsRTSP): - options = self.options.to_dict() - - elif isinstance(self.options, ComponentOptionsFile): - options = self.options.to_dict() - - elif isinstance(self.options, ComponentOptionsSIP): - options = self.options.to_dict() - - else: - options = self.options.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "type": type, - } - ) - if options is not UNSET: - field_dict["options"] = options - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_options_file import ComponentOptionsFile - from ..models.component_options_hls import ComponentOptionsHLS - from ..models.component_options_recording import ComponentOptionsRecording - from ..models.component_options_rtsp import ComponentOptionsRTSP - from ..models.component_options_sip import ComponentOptionsSIP - - d = src_dict.copy() - type = d.pop("type") - - def _parse_options( - data: object, - ) -> Union[ - "ComponentOptionsFile", - "ComponentOptionsHLS", - "ComponentOptionsRTSP", - "ComponentOptionsRecording", - "ComponentOptionsSIP", - Unset, - ]: - if isinstance(data, Unset): - return data - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_options_type_0 = ( - ComponentOptionsHLS.from_dict(data) - ) - - return componentsschemas_component_options_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_options_type_1 = ( - ComponentOptionsRTSP.from_dict(data) - ) - - return componentsschemas_component_options_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_options_type_2 = ( - ComponentOptionsFile.from_dict(data) - ) - - return componentsschemas_component_options_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_options_type_3 = ( - ComponentOptionsSIP.from_dict(data) - ) - - return componentsschemas_component_options_type_3 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_options_type_4 = ( - ComponentOptionsRecording.from_dict(data) - ) - - return componentsschemas_component_options_type_4 - - options = _parse_options(d.pop("options", UNSET)) - - add_component_json_body = cls( - type=type, - options=options, - ) - - add_component_json_body.additional_properties = d - return add_component_json_body - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_details_response.py b/fishjam/_openapi_client/models/component_details_response.py deleted file mode 100644 index b2d91b6..0000000 --- a/fishjam/_openapi_client/models/component_details_response.py +++ /dev/null @@ -1,156 +0,0 @@ -from typing import ( - TYPE_CHECKING, - Any, - Dict, - List, - Type, - TypeVar, - Union, -) - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_file import ComponentFile - from ..models.component_hls import ComponentHLS - from ..models.component_recording import ComponentRecording - from ..models.component_rtsp import ComponentRTSP - from ..models.component_sip import ComponentSIP - - -T = TypeVar("T", bound="ComponentDetailsResponse") - - -@_attrs_define -class ComponentDetailsResponse: - """Response containing component details""" - - data: Union[ - "ComponentFile", - "ComponentHLS", - "ComponentRTSP", - "ComponentRecording", - "ComponentSIP", - ] - """Describes component""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - from ..models.component_file import ComponentFile - from ..models.component_hls import ComponentHLS - from ..models.component_rtsp import ComponentRTSP - from ..models.component_sip import ComponentSIP - - data: Dict[str, Any] - - if isinstance(self.data, ComponentHLS): - data = self.data.to_dict() - - elif isinstance(self.data, ComponentRTSP): - data = self.data.to_dict() - - elif isinstance(self.data, ComponentFile): - data = self.data.to_dict() - - elif isinstance(self.data, ComponentSIP): - data = self.data.to_dict() - - else: - data = self.data.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data": data, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_file import ComponentFile - from ..models.component_hls import ComponentHLS - from ..models.component_recording import ComponentRecording - from ..models.component_rtsp import ComponentRTSP - from ..models.component_sip import ComponentSIP - - d = src_dict.copy() - - def _parse_data( - data: object, - ) -> Union[ - "ComponentFile", - "ComponentHLS", - "ComponentRTSP", - "ComponentRecording", - "ComponentSIP", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_0 = ComponentHLS.from_dict(data) - - return componentsschemas_component_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_1 = ComponentRTSP.from_dict(data) - - return componentsschemas_component_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_2 = ComponentFile.from_dict(data) - - return componentsschemas_component_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_3 = ComponentSIP.from_dict(data) - - return componentsschemas_component_type_3 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_4 = ComponentRecording.from_dict(data) - - return componentsschemas_component_type_4 - - data = _parse_data(d.pop("data")) - - component_details_response = cls( - data=data, - ) - - component_details_response.additional_properties = d - return component_details_response - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_file.py b/fishjam/_openapi_client/models/component_file.py deleted file mode 100644 index 1af26c8..0000000 --- a/fishjam/_openapi_client/models/component_file.py +++ /dev/null @@ -1,109 +0,0 @@ -from typing import TYPE_CHECKING, 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 - -if TYPE_CHECKING: - from ..models.component_properties_file import ComponentPropertiesFile - from ..models.track import Track - - -T = TypeVar("T", bound="ComponentFile") - - -@_attrs_define -class ComponentFile: - """Describes the File component""" - - id: str - """Assigned component ID""" - tracks: List["Track"] - """List of all component's tracks""" - type: str - """Component type""" - properties: Union[Unset, "ComponentPropertiesFile"] = UNSET - """Properties specific to the File component""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - id = self.id - tracks = [] - for tracks_item_data in self.tracks: - tracks_item = tracks_item_data.to_dict() - - tracks.append(tracks_item) - - type = self.type - properties: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.properties, Unset): - properties = self.properties.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "tracks": tracks, - "type": type, - } - ) - if properties is not UNSET: - field_dict["properties"] = properties - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_properties_file import ComponentPropertiesFile - from ..models.track import Track - - d = src_dict.copy() - id = d.pop("id") - - tracks = [] - _tracks = d.pop("tracks") - for tracks_item_data in _tracks: - tracks_item = Track.from_dict(tracks_item_data) - - tracks.append(tracks_item) - - type = d.pop("type") - - _properties = d.pop("properties", UNSET) - properties: Union[Unset, ComponentPropertiesFile] - if isinstance(_properties, Unset): - properties = UNSET - else: - properties = ComponentPropertiesFile.from_dict(_properties) - - component_file = cls( - id=id, - tracks=tracks, - type=type, - properties=properties, - ) - - component_file.additional_properties = d - return component_file - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_hls.py b/fishjam/_openapi_client/models/component_hls.py deleted file mode 100644 index 41c2797..0000000 --- a/fishjam/_openapi_client/models/component_hls.py +++ /dev/null @@ -1,100 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_properties_hls import ComponentPropertiesHLS - from ..models.track import Track - - -T = TypeVar("T", bound="ComponentHLS") - - -@_attrs_define -class ComponentHLS: - """Describes the HLS component""" - - id: str - """Assigned component ID""" - properties: "ComponentPropertiesHLS" - """Properties specific to the HLS component""" - tracks: List["Track"] - """List of all component's tracks""" - type: str - """Component type""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - id = self.id - properties = self.properties.to_dict() - - tracks = [] - for tracks_item_data in self.tracks: - tracks_item = tracks_item_data.to_dict() - - tracks.append(tracks_item) - - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "properties": properties, - "tracks": tracks, - "type": type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_properties_hls import ComponentPropertiesHLS - from ..models.track import Track - - d = src_dict.copy() - id = d.pop("id") - - properties = ComponentPropertiesHLS.from_dict(d.pop("properties")) - - tracks = [] - _tracks = d.pop("tracks") - for tracks_item_data in _tracks: - tracks_item = Track.from_dict(tracks_item_data) - - tracks.append(tracks_item) - - type = d.pop("type") - - component_hls = cls( - id=id, - properties=properties, - tracks=tracks, - type=type, - ) - - component_hls.additional_properties = d - return component_hls - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_file.py b/fishjam/_openapi_client/models/component_options_file.py deleted file mode 100644 index f843c8e..0000000 --- a/fishjam/_openapi_client/models/component_options_file.py +++ /dev/null @@ -1,70 +0,0 @@ -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") - - -@_attrs_define -class ComponentOptionsFile: - """Options specific to the File component""" - - 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) - field_dict.update( - { - "filePath": file_path, - } - ) - if framerate is not UNSET: - field_dict["framerate"] = framerate - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - 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 - return component_options_file - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_hls.py b/fishjam/_openapi_client/models/component_options_hls.py deleted file mode 100644 index 434e092..0000000 --- a/fishjam/_openapi_client/models/component_options_hls.py +++ /dev/null @@ -1,125 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.component_options_hls_subscribe_mode import ( - ComponentOptionsHLSSubscribeMode, -) -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.component_options_hlss3_credentials import ( - ComponentOptionsHLSS3Credentials, - ) - - -T = TypeVar("T", bound="ComponentOptionsHLS") - - -@_attrs_define -class ComponentOptionsHLS: - """Options specific to the HLS component""" - - low_latency: Union[Unset, bool] = False - """Whether the component should use LL-HLS""" - persistent: Union[Unset, bool] = False - """Whether the video is stored after end of stream""" - s3: Union[Unset, None, "ComponentOptionsHLSS3Credentials"] = UNSET - """An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are provided""" - subscribe_mode: Union[ - Unset, ComponentOptionsHLSSubscribeMode - ] = ComponentOptionsHLSSubscribeMode.AUTO - """Whether the HLS component should subscribe to tracks automatically or manually.""" - target_window_duration: Union[Unset, None, int] = UNSET - """Duration of stream available for viewer""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - low_latency = self.low_latency - persistent = self.persistent - s3: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(self.s3, Unset): - s3 = self.s3.to_dict() if self.s3 else None - - subscribe_mode: Union[Unset, str] = UNSET - if not isinstance(self.subscribe_mode, Unset): - subscribe_mode = self.subscribe_mode.value - - target_window_duration = self.target_window_duration - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if low_latency is not UNSET: - field_dict["lowLatency"] = low_latency - if persistent is not UNSET: - field_dict["persistent"] = persistent - if s3 is not UNSET: - field_dict["s3"] = s3 - if subscribe_mode is not UNSET: - field_dict["subscribeMode"] = subscribe_mode - if target_window_duration is not UNSET: - field_dict["targetWindowDuration"] = target_window_duration - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_options_hlss3_credentials import ( - ComponentOptionsHLSS3Credentials, - ) - - d = src_dict.copy() - low_latency = d.pop("lowLatency", UNSET) - - persistent = d.pop("persistent", UNSET) - - _s3 = d.pop("s3", UNSET) - s3: Union[Unset, None, ComponentOptionsHLSS3Credentials] - if _s3 is None: - s3 = None - elif isinstance(_s3, Unset): - s3 = UNSET - else: - s3 = ComponentOptionsHLSS3Credentials.from_dict(_s3) - - _subscribe_mode = d.pop("subscribeMode", UNSET) - subscribe_mode: Union[Unset, ComponentOptionsHLSSubscribeMode] - if isinstance(_subscribe_mode, Unset): - subscribe_mode = UNSET - else: - subscribe_mode = ComponentOptionsHLSSubscribeMode(_subscribe_mode) - - target_window_duration = d.pop("targetWindowDuration", UNSET) - - component_options_hls = cls( - low_latency=low_latency, - persistent=persistent, - s3=s3, - subscribe_mode=subscribe_mode, - target_window_duration=target_window_duration, - ) - - component_options_hls.additional_properties = d - return component_options_hls - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_hls_subscribe_mode.py b/fishjam/_openapi_client/models/component_options_hls_subscribe_mode.py deleted file mode 100644 index 5336deb..0000000 --- a/fishjam/_openapi_client/models/component_options_hls_subscribe_mode.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class ComponentOptionsHLSSubscribeMode(str, Enum): - """Whether the HLS component should subscribe to tracks automatically or manually.""" - - AUTO = "auto" - MANUAL = "manual" - - def __str__(self) -> str: - return str(self.value) diff --git a/fishjam/_openapi_client/models/component_options_hlss3_credentials.py b/fishjam/_openapi_client/models/component_options_hlss3_credentials.py deleted file mode 100644 index e81234e..0000000 --- a/fishjam/_openapi_client/models/component_options_hlss3_credentials.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ComponentOptionsHLSS3Credentials") - - -@_attrs_define -class ComponentOptionsHLSS3Credentials: - """An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are - provided - - """ - - access_key_id: str - """An AWS access key identifier, linked to your AWS account.""" - bucket: str - """The name of the S3 bucket where your data will be stored.""" - region: str - """The AWS region where your bucket is located.""" - secret_access_key: str - """The secret key that is linked to the Access Key ID.""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - access_key_id = self.access_key_id - bucket = self.bucket - region = self.region - secret_access_key = self.secret_access_key - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "accessKeyId": access_key_id, - "bucket": bucket, - "region": region, - "secretAccessKey": secret_access_key, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - access_key_id = d.pop("accessKeyId") - - bucket = d.pop("bucket") - - region = d.pop("region") - - secret_access_key = d.pop("secretAccessKey") - - component_options_hlss3_credentials = cls( - access_key_id=access_key_id, - bucket=bucket, - region=region, - secret_access_key=secret_access_key, - ) - - component_options_hlss3_credentials.additional_properties = d - return component_options_hlss3_credentials - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_recording.py b/fishjam/_openapi_client/models/component_options_recording.py deleted file mode 100644 index 3dab688..0000000 --- a/fishjam/_openapi_client/models/component_options_recording.py +++ /dev/null @@ -1,108 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.component_options_recording_subscribe_mode import ( - ComponentOptionsRecordingSubscribeMode, -) -from ..types import UNSET, Unset - -if TYPE_CHECKING: - from ..models.component_options_recording_s3_credentials import ( - ComponentOptionsRecordingS3Credentials, - ) - - -T = TypeVar("T", bound="ComponentOptionsRecording") - - -@_attrs_define -class ComponentOptionsRecording: - """Options specific to the Recording component""" - - credentials: Union[Unset, None, "ComponentOptionsRecordingS3Credentials"] = UNSET - """An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are provided""" - path_prefix: Union[Unset, None, str] = UNSET - """Path prefix under which all recording are stored""" - subscribe_mode: Union[ - Unset, ComponentOptionsRecordingSubscribeMode - ] = ComponentOptionsRecordingSubscribeMode.AUTO - """Whether the Recording component should subscribe to tracks automatically or manually.""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - credentials: Union[Unset, None, Dict[str, Any]] = UNSET - if not isinstance(self.credentials, Unset): - credentials = self.credentials.to_dict() if self.credentials else None - - path_prefix = self.path_prefix - subscribe_mode: Union[Unset, str] = UNSET - if not isinstance(self.subscribe_mode, Unset): - subscribe_mode = self.subscribe_mode.value - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if credentials is not UNSET: - field_dict["credentials"] = credentials - if path_prefix is not UNSET: - field_dict["pathPrefix"] = path_prefix - if subscribe_mode is not UNSET: - field_dict["subscribeMode"] = subscribe_mode - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_options_recording_s3_credentials import ( - ComponentOptionsRecordingS3Credentials, - ) - - d = src_dict.copy() - _credentials = d.pop("credentials", UNSET) - credentials: Union[Unset, None, ComponentOptionsRecordingS3Credentials] - if _credentials is None: - credentials = None - elif isinstance(_credentials, Unset): - credentials = UNSET - else: - credentials = ComponentOptionsRecordingS3Credentials.from_dict(_credentials) - - path_prefix = d.pop("pathPrefix", UNSET) - - _subscribe_mode = d.pop("subscribeMode", UNSET) - subscribe_mode: Union[Unset, ComponentOptionsRecordingSubscribeMode] - if isinstance(_subscribe_mode, Unset): - subscribe_mode = UNSET - else: - subscribe_mode = ComponentOptionsRecordingSubscribeMode(_subscribe_mode) - - component_options_recording = cls( - credentials=credentials, - path_prefix=path_prefix, - subscribe_mode=subscribe_mode, - ) - - component_options_recording.additional_properties = d - return component_options_recording - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_recording_s3_credentials.py b/fishjam/_openapi_client/models/component_options_recording_s3_credentials.py deleted file mode 100644 index 9f3ce46..0000000 --- a/fishjam/_openapi_client/models/component_options_recording_s3_credentials.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ComponentOptionsRecordingS3Credentials") - - -@_attrs_define -class ComponentOptionsRecordingS3Credentials: - """An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are - provided - - """ - - access_key_id: str - """An AWS access key identifier, linked to your AWS account.""" - bucket: str - """The name of the S3 bucket where your data will be stored.""" - region: str - """The AWS region where your bucket is located.""" - secret_access_key: str - """The secret key that is linked to the Access Key ID.""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - access_key_id = self.access_key_id - bucket = self.bucket - region = self.region - secret_access_key = self.secret_access_key - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "accessKeyId": access_key_id, - "bucket": bucket, - "region": region, - "secretAccessKey": secret_access_key, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - access_key_id = d.pop("accessKeyId") - - bucket = d.pop("bucket") - - region = d.pop("region") - - secret_access_key = d.pop("secretAccessKey") - - component_options_recording_s3_credentials = cls( - access_key_id=access_key_id, - bucket=bucket, - region=region, - secret_access_key=secret_access_key, - ) - - component_options_recording_s3_credentials.additional_properties = d - return component_options_recording_s3_credentials - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_recording_subscribe_mode.py b/fishjam/_openapi_client/models/component_options_recording_subscribe_mode.py deleted file mode 100644 index 4792705..0000000 --- a/fishjam/_openapi_client/models/component_options_recording_subscribe_mode.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class ComponentOptionsRecordingSubscribeMode(str, Enum): - """Whether the Recording component should subscribe to tracks automatically or manually.""" - - AUTO = "auto" - MANUAL = "manual" - - def __str__(self) -> str: - return str(self.value) diff --git a/fishjam/_openapi_client/models/component_options_rtsp.py b/fishjam/_openapi_client/models/component_options_rtsp.py deleted file mode 100644 index 83dc334..0000000 --- a/fishjam/_openapi_client/models/component_options_rtsp.py +++ /dev/null @@ -1,94 +0,0 @@ -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="ComponentOptionsRTSP") - - -@_attrs_define -class ComponentOptionsRTSP: - """Options specific to the RTSP component""" - - source_uri: str - """URI of RTSP source stream""" - keep_alive_interval: Union[Unset, int] = 15000 - """Interval (in ms) in which keep-alive RTSP messages will be sent to the remote stream source""" - pierce_nat: Union[Unset, bool] = True - """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] = 15000 - """Delay (in ms) between successive reconnect attempts""" - rtp_port: Union[Unset, int] = 20000 - """Local port RTP stream will be received at""" - 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 - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "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 - - @classmethod - 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", UNSET) - - pierce_nat = d.pop("pierceNat", UNSET) - - reconnect_delay = d.pop("reconnectDelay", UNSET) - - rtp_port = d.pop("rtpPort", UNSET) - - component_options_rtsp = cls( - source_uri=source_uri, - keep_alive_interval=keep_alive_interval, - pierce_nat=pierce_nat, - reconnect_delay=reconnect_delay, - rtp_port=rtp_port, - ) - - component_options_rtsp.additional_properties = d - return component_options_rtsp - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_sip.py b/fishjam/_openapi_client/models/component_options_sip.py deleted file mode 100644 index 9bdc819..0000000 --- a/fishjam/_openapi_client/models/component_options_sip.py +++ /dev/null @@ -1,72 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_options_sipsip_credentials import ( - ComponentOptionsSIPSIPCredentials, - ) - - -T = TypeVar("T", bound="ComponentOptionsSIP") - - -@_attrs_define -class ComponentOptionsSIP: - """Options specific to the SIP component""" - - registrar_credentials: "ComponentOptionsSIPSIPCredentials" - """Credentials used to authorize in SIP Provider service""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - registrar_credentials = self.registrar_credentials.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "registrarCredentials": registrar_credentials, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_options_sipsip_credentials import ( - ComponentOptionsSIPSIPCredentials, - ) - - d = src_dict.copy() - registrar_credentials = ComponentOptionsSIPSIPCredentials.from_dict( - d.pop("registrarCredentials") - ) - - component_options_sip = cls( - registrar_credentials=registrar_credentials, - ) - - component_options_sip.additional_properties = d - return component_options_sip - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_options_sipsip_credentials.py b/fishjam/_openapi_client/models/component_options_sipsip_credentials.py deleted file mode 100644 index 4cf83a3..0000000 --- a/fishjam/_openapi_client/models/component_options_sipsip_credentials.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ComponentOptionsSIPSIPCredentials") - - -@_attrs_define -class ComponentOptionsSIPSIPCredentials: - """Credentials used to authorize in SIP Provider service""" - - address: str - """SIP provider address. Can be in the form of FQDN (my-sip-registrar.net) or IPv4 (1.2.3.4). Port can be specified e.g: 5.6.7.8:9999. If not given, the default SIP port `5060` will be assumed""" - password: str - """Password in SIP service provider""" - username: str - """Username in SIP service provider""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - address = self.address - password = self.password - username = self.username - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "address": address, - "password": password, - "username": username, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - address = d.pop("address") - - password = d.pop("password") - - username = d.pop("username") - - component_options_sipsip_credentials = cls( - address=address, - password=password, - username=username, - ) - - component_options_sipsip_credentials.additional_properties = d - return component_options_sipsip_credentials - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_properties_file.py b/fishjam/_openapi_client/models/component_properties_file.py deleted file mode 100644 index b357604..0000000 --- a/fishjam/_openapi_client/models/component_properties_file.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Any, Dict, List, Optional, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ComponentPropertiesFile") - - -@_attrs_define -class ComponentPropertiesFile: - """Properties specific to the File component""" - - file_path: str - """Relative path to track file. Must be either opus encapsulated in Ogg or raw h264""" - framerate: Optional[int] - """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) - field_dict.update( - { - "filePath": file_path, - "framerate": framerate, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - file_path = d.pop("filePath") - - framerate = d.pop("framerate") - - component_properties_file = cls( - file_path=file_path, - framerate=framerate, - ) - - component_properties_file.additional_properties = d - return component_properties_file - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_properties_hls.py b/fishjam/_openapi_client/models/component_properties_hls.py deleted file mode 100644 index 6575ca2..0000000 --- a/fishjam/_openapi_client/models/component_properties_hls.py +++ /dev/null @@ -1,93 +0,0 @@ -from typing import Any, Dict, List, Optional, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.component_properties_hls_subscribe_mode import ( - ComponentPropertiesHLSSubscribeMode, -) - -T = TypeVar("T", bound="ComponentPropertiesHLS") - - -@_attrs_define -class ComponentPropertiesHLS: - """Properties specific to the HLS component""" - - low_latency: bool - """Whether the component uses LL-HLS""" - persistent: bool - """Whether the video is stored after end of stream""" - playable: bool - """Whether the generated HLS playlist is playable""" - subscribe_mode: ComponentPropertiesHLSSubscribeMode - """Whether the HLS component should subscribe to tracks automatically or manually""" - target_window_duration: Optional[int] - """Duration of stream available for viewer""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - low_latency = self.low_latency - persistent = self.persistent - playable = self.playable - subscribe_mode = self.subscribe_mode.value - - target_window_duration = self.target_window_duration - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "lowLatency": low_latency, - "persistent": persistent, - "playable": playable, - "subscribeMode": subscribe_mode, - "targetWindowDuration": target_window_duration, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - low_latency = d.pop("lowLatency") - - persistent = d.pop("persistent") - - playable = d.pop("playable") - - subscribe_mode = ComponentPropertiesHLSSubscribeMode(d.pop("subscribeMode")) - - target_window_duration = d.pop("targetWindowDuration") - - component_properties_hls = cls( - low_latency=low_latency, - persistent=persistent, - playable=playable, - subscribe_mode=subscribe_mode, - target_window_duration=target_window_duration, - ) - - component_properties_hls.additional_properties = d - return component_properties_hls - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_properties_hls_subscribe_mode.py b/fishjam/_openapi_client/models/component_properties_hls_subscribe_mode.py deleted file mode 100644 index d95a59e..0000000 --- a/fishjam/_openapi_client/models/component_properties_hls_subscribe_mode.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class ComponentPropertiesHLSSubscribeMode(str, Enum): - """Whether the HLS component should subscribe to tracks automatically or manually""" - - AUTO = "auto" - MANUAL = "manual" - - def __str__(self) -> str: - return str(self.value) diff --git a/fishjam/_openapi_client/models/component_properties_recording.py b/fishjam/_openapi_client/models/component_properties_recording.py deleted file mode 100644 index d9b53e5..0000000 --- a/fishjam/_openapi_client/models/component_properties_recording.py +++ /dev/null @@ -1,66 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.component_properties_recording_subscribe_mode import ( - ComponentPropertiesRecordingSubscribeMode, -) - -T = TypeVar("T", bound="ComponentPropertiesRecording") - - -@_attrs_define -class ComponentPropertiesRecording: - """Properties specific to the Recording component""" - - subscribe_mode: ComponentPropertiesRecordingSubscribeMode - """Whether the Recording component should subscribe to tracks automatically or manually""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - subscribe_mode = self.subscribe_mode.value - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "subscribeMode": subscribe_mode, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - subscribe_mode = ComponentPropertiesRecordingSubscribeMode( - d.pop("subscribeMode") - ) - - component_properties_recording = cls( - subscribe_mode=subscribe_mode, - ) - - component_properties_recording.additional_properties = d - return component_properties_recording - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_properties_recording_subscribe_mode.py b/fishjam/_openapi_client/models/component_properties_recording_subscribe_mode.py deleted file mode 100644 index 0c44ab2..0000000 --- a/fishjam/_openapi_client/models/component_properties_recording_subscribe_mode.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class ComponentPropertiesRecordingSubscribeMode(str, Enum): - """Whether the Recording component should subscribe to tracks automatically or manually""" - - AUTO = "auto" - MANUAL = "manual" - - def __str__(self) -> str: - return str(self.value) diff --git a/fishjam/_openapi_client/models/component_properties_rtsp.py b/fishjam/_openapi_client/models/component_properties_rtsp.py deleted file mode 100644 index 52840e1..0000000 --- a/fishjam/_openapi_client/models/component_properties_rtsp.py +++ /dev/null @@ -1,88 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ComponentPropertiesRTSP") - - -@_attrs_define -class ComponentPropertiesRTSP: - """Properties specific to the RTSP component""" - - keep_alive_interval: int - """Interval (in ms) in which keep-alive RTSP messages will be sent to the remote stream source""" - 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: int - """Delay (in ms) between successive reconnect attempts""" - 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""" - 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, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - keep_alive_interval = d.pop("keepAliveInterval") - - pierce_nat = d.pop("pierceNat") - - reconnect_delay = d.pop("reconnectDelay") - - rtp_port = d.pop("rtpPort") - - source_uri = d.pop("sourceUri") - - component_properties_rtsp = cls( - 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 - return component_properties_rtsp - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_properties_sip.py b/fishjam/_openapi_client/models/component_properties_sip.py deleted file mode 100644 index adb6b1c..0000000 --- a/fishjam/_openapi_client/models/component_properties_sip.py +++ /dev/null @@ -1,72 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_properties_sipsip_credentials import ( - ComponentPropertiesSIPSIPCredentials, - ) - - -T = TypeVar("T", bound="ComponentPropertiesSIP") - - -@_attrs_define -class ComponentPropertiesSIP: - """Properties specific to the SIP component""" - - registrar_credentials: "ComponentPropertiesSIPSIPCredentials" - """Credentials used to authorize in SIP Provider service""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - registrar_credentials = self.registrar_credentials.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "registrarCredentials": registrar_credentials, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_properties_sipsip_credentials import ( - ComponentPropertiesSIPSIPCredentials, - ) - - d = src_dict.copy() - registrar_credentials = ComponentPropertiesSIPSIPCredentials.from_dict( - d.pop("registrarCredentials") - ) - - component_properties_sip = cls( - registrar_credentials=registrar_credentials, - ) - - component_properties_sip.additional_properties = d - return component_properties_sip - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_properties_sipsip_credentials.py b/fishjam/_openapi_client/models/component_properties_sipsip_credentials.py deleted file mode 100644 index 2757aea..0000000 --- a/fishjam/_openapi_client/models/component_properties_sipsip_credentials.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ComponentPropertiesSIPSIPCredentials") - - -@_attrs_define -class ComponentPropertiesSIPSIPCredentials: - """Credentials used to authorize in SIP Provider service""" - - address: str - """SIP provider address. Can be in the form of FQDN (my-sip-registrar.net) or IPv4 (1.2.3.4). Port can be specified e.g: 5.6.7.8:9999. If not given, the default SIP port `5060` will be assumed""" - password: str - """Password in SIP service provider""" - username: str - """Username in SIP service provider""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - address = self.address - password = self.password - username = self.username - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "address": address, - "password": password, - "username": username, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - address = d.pop("address") - - password = d.pop("password") - - username = d.pop("username") - - component_properties_sipsip_credentials = cls( - address=address, - password=password, - username=username, - ) - - component_properties_sipsip_credentials.additional_properties = d - return component_properties_sipsip_credentials - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_recording.py b/fishjam/_openapi_client/models/component_recording.py deleted file mode 100644 index 5c1fcab..0000000 --- a/fishjam/_openapi_client/models/component_recording.py +++ /dev/null @@ -1,100 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_properties_recording import ComponentPropertiesRecording - from ..models.track import Track - - -T = TypeVar("T", bound="ComponentRecording") - - -@_attrs_define -class ComponentRecording: - """Describes the Recording component""" - - id: str - """Assigned component ID""" - properties: "ComponentPropertiesRecording" - """Properties specific to the Recording component""" - tracks: List["Track"] - """List of all component's tracks""" - type: str - """Component type""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - id = self.id - properties = self.properties.to_dict() - - tracks = [] - for tracks_item_data in self.tracks: - tracks_item = tracks_item_data.to_dict() - - tracks.append(tracks_item) - - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "properties": properties, - "tracks": tracks, - "type": type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_properties_recording import ComponentPropertiesRecording - from ..models.track import Track - - d = src_dict.copy() - id = d.pop("id") - - properties = ComponentPropertiesRecording.from_dict(d.pop("properties")) - - tracks = [] - _tracks = d.pop("tracks") - for tracks_item_data in _tracks: - tracks_item = Track.from_dict(tracks_item_data) - - tracks.append(tracks_item) - - type = d.pop("type") - - component_recording = cls( - id=id, - properties=properties, - tracks=tracks, - type=type, - ) - - component_recording.additional_properties = d - return component_recording - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_rtsp.py b/fishjam/_openapi_client/models/component_rtsp.py deleted file mode 100644 index eb876da..0000000 --- a/fishjam/_openapi_client/models/component_rtsp.py +++ /dev/null @@ -1,100 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_properties_rtsp import ComponentPropertiesRTSP - from ..models.track import Track - - -T = TypeVar("T", bound="ComponentRTSP") - - -@_attrs_define -class ComponentRTSP: - """Describes the RTSP component""" - - id: str - """Assigned component ID""" - properties: "ComponentPropertiesRTSP" - """Properties specific to the RTSP component""" - tracks: List["Track"] - """List of all component's tracks""" - type: str - """Component type""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - id = self.id - properties = self.properties.to_dict() - - tracks = [] - for tracks_item_data in self.tracks: - tracks_item = tracks_item_data.to_dict() - - tracks.append(tracks_item) - - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "properties": properties, - "tracks": tracks, - "type": type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_properties_rtsp import ComponentPropertiesRTSP - from ..models.track import Track - - d = src_dict.copy() - id = d.pop("id") - - properties = ComponentPropertiesRTSP.from_dict(d.pop("properties")) - - tracks = [] - _tracks = d.pop("tracks") - for tracks_item_data in _tracks: - tracks_item = Track.from_dict(tracks_item_data) - - tracks.append(tracks_item) - - type = d.pop("type") - - component_rtsp = cls( - id=id, - properties=properties, - tracks=tracks, - type=type, - ) - - component_rtsp.additional_properties = d - return component_rtsp - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/component_sip.py b/fishjam/_openapi_client/models/component_sip.py deleted file mode 100644 index 7cbab9d..0000000 --- a/fishjam/_openapi_client/models/component_sip.py +++ /dev/null @@ -1,100 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.component_properties_sip import ComponentPropertiesSIP - from ..models.track import Track - - -T = TypeVar("T", bound="ComponentSIP") - - -@_attrs_define -class ComponentSIP: - """Describes the SIP component""" - - id: str - """Assigned component ID""" - properties: "ComponentPropertiesSIP" - """Properties specific to the SIP component""" - tracks: List["Track"] - """List of all component's tracks""" - type: str - """Component type""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - id = self.id - properties = self.properties.to_dict() - - tracks = [] - for tracks_item_data in self.tracks: - tracks_item = tracks_item_data.to_dict() - - tracks.append(tracks_item) - - type = self.type - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "id": id, - "properties": properties, - "tracks": tracks, - "type": type, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.component_properties_sip import ComponentPropertiesSIP - from ..models.track import Track - - d = src_dict.copy() - id = d.pop("id") - - properties = ComponentPropertiesSIP.from_dict(d.pop("properties")) - - tracks = [] - _tracks = d.pop("tracks") - for tracks_item_data in _tracks: - tracks_item = Track.from_dict(tracks_item_data) - - tracks.append(tracks_item) - - type = d.pop("type") - - component_sip = cls( - id=id, - properties=properties, - tracks=tracks, - type=type, - ) - - component_sip.additional_properties = d - return component_sip - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/dial_config.py b/fishjam/_openapi_client/models/dial_config.py deleted file mode 100644 index 4b6b021..0000000 --- a/fishjam/_openapi_client/models/dial_config.py +++ /dev/null @@ -1,60 +0,0 @@ -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="DialConfig") - - -@_attrs_define -class DialConfig: - """Dial config""" - - phone_number: Union[Unset, str] = UNSET - """Phone number on which SIP Component will call""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - phone_number = self.phone_number - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if phone_number is not UNSET: - field_dict["phoneNumber"] = phone_number - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - phone_number = d.pop("phoneNumber", UNSET) - - dial_config = cls( - phone_number=phone_number, - ) - - dial_config.additional_properties = d - return dial_config - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/health_report.py b/fishjam/_openapi_client/models/health_report.py deleted file mode 100644 index b7d000f..0000000 --- a/fishjam/_openapi_client/models/health_report.py +++ /dev/null @@ -1,97 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.node_status import NodeStatus - - -T = TypeVar("T", bound="HealthReport") - - -@_attrs_define -class HealthReport: - """Describes overall Fishjam health""" - - distribution_enabled: bool - """Cluster distribution enabled/disabled""" - local_status: "NodeStatus" - """Informs about the status of node""" - nodes_in_cluster: int - """Number of nodes in cluster""" - nodes_status: List["NodeStatus"] - """Status of each node in cluster""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - distribution_enabled = self.distribution_enabled - local_status = self.local_status.to_dict() - - nodes_in_cluster = self.nodes_in_cluster - nodes_status = [] - for nodes_status_item_data in self.nodes_status: - nodes_status_item = nodes_status_item_data.to_dict() - - nodes_status.append(nodes_status_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "distributionEnabled": distribution_enabled, - "localStatus": local_status, - "nodesInCluster": nodes_in_cluster, - "nodesStatus": nodes_status, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.node_status import NodeStatus - - d = src_dict.copy() - distribution_enabled = d.pop("distributionEnabled") - - local_status = NodeStatus.from_dict(d.pop("localStatus")) - - nodes_in_cluster = d.pop("nodesInCluster") - - nodes_status = [] - _nodes_status = d.pop("nodesStatus") - for nodes_status_item_data in _nodes_status: - nodes_status_item = NodeStatus.from_dict(nodes_status_item_data) - - nodes_status.append(nodes_status_item) - - health_report = cls( - distribution_enabled=distribution_enabled, - local_status=local_status, - nodes_in_cluster=nodes_in_cluster, - nodes_status=nodes_status, - ) - - health_report.additional_properties = d - return health_report - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/healthcheck_response.py b/fishjam/_openapi_client/models/healthcheck_response.py deleted file mode 100644 index 0eb71ae..0000000 --- a/fishjam/_openapi_client/models/healthcheck_response.py +++ /dev/null @@ -1,66 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.health_report import HealthReport - - -T = TypeVar("T", bound="HealthcheckResponse") - - -@_attrs_define -class HealthcheckResponse: - """Response containing health report of Fishjam""" - - data: "HealthReport" - """Describes overall Fishjam health""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - data = self.data.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data": data, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.health_report import HealthReport - - d = src_dict.copy() - data = HealthReport.from_dict(d.pop("data")) - - healthcheck_response = cls( - data=data, - ) - - healthcheck_response.additional_properties = d - return healthcheck_response - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/node_status.py b/fishjam/_openapi_client/models/node_status.py deleted file mode 100644 index 6e3c52f..0000000 --- a/fishjam/_openapi_client/models/node_status.py +++ /dev/null @@ -1,91 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..models.node_status_status import NodeStatusStatus - -T = TypeVar("T", bound="NodeStatus") - - -@_attrs_define -class NodeStatus: - """Informs about the status of node""" - - git_commit: str - """Commit hash of the build""" - node_name: str - """Name of the node""" - status: NodeStatusStatus - """Informs about the status of Fishjam or a specific service""" - uptime: int - """Uptime of Fishjam (in seconds)""" - version: str - """Version of Fishjam""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - git_commit = self.git_commit - node_name = self.node_name - status = self.status.value - - uptime = self.uptime - version = self.version - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "gitCommit": git_commit, - "nodeName": node_name, - "status": status, - "uptime": uptime, - "version": version, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - git_commit = d.pop("gitCommit") - - node_name = d.pop("nodeName") - - status = NodeStatusStatus(d.pop("status")) - - uptime = d.pop("uptime") - - version = d.pop("version") - - node_status = cls( - git_commit=git_commit, - node_name=node_name, - status=status, - uptime=uptime, - version=version, - ) - - node_status.additional_properties = d - return node_status - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/node_status_status.py b/fishjam/_openapi_client/models/node_status_status.py deleted file mode 100644 index 1e5fa8d..0000000 --- a/fishjam/_openapi_client/models/node_status_status.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class NodeStatusStatus(str, Enum): - """Informs about the status of Fishjam or a specific service""" - - DOWN = "DOWN" - UP = "UP" - - def __str__(self) -> str: - return str(self.value) diff --git a/fishjam/_openapi_client/models/recording_list_response.py b/fishjam/_openapi_client/models/recording_list_response.py deleted file mode 100644 index de63699..0000000 --- a/fishjam/_openapi_client/models/recording_list_response.py +++ /dev/null @@ -1,60 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="RecordingListResponse") - - -@_attrs_define -class RecordingListResponse: - """Response containing list of all recording""" - - data: List[str] - """None""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - data = self.data - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data": data, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - data = cast(List[str], d.pop("data")) - - recording_list_response = cls( - data=data, - ) - - recording_list_response.additional_properties = d - return recording_list_response - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/room.py b/fishjam/_openapi_client/models/room.py index 3597993..b9f970f 100644 --- a/fishjam/_openapi_client/models/room.py +++ b/fishjam/_openapi_client/models/room.py @@ -1,22 +1,9 @@ -from typing import ( - TYPE_CHECKING, - Any, - Dict, - List, - Type, - TypeVar, - Union, -) +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field if TYPE_CHECKING: - from ..models.component_file import ComponentFile - from ..models.component_hls import ComponentHLS - from ..models.component_recording import ComponentRecording - from ..models.component_rtsp import ComponentRTSP - from ..models.component_sip import ComponentSIP from ..models.peer import Peer from ..models.room_config import RoomConfig @@ -28,16 +15,6 @@ class Room: """Description of the room state""" - components: List[ - Union[ - "ComponentFile", - "ComponentHLS", - "ComponentRTSP", - "ComponentRecording", - "ComponentSIP", - ] - ] - """List of all components""" config: "RoomConfig" """Room configuration""" id: str @@ -49,32 +26,6 @@ class Room: def to_dict(self) -> Dict[str, Any]: """@private""" - from ..models.component_file import ComponentFile - from ..models.component_hls import ComponentHLS - from ..models.component_rtsp import ComponentRTSP - from ..models.component_sip import ComponentSIP - - components = [] - for components_item_data in self.components: - components_item: Dict[str, Any] - - if isinstance(components_item_data, ComponentHLS): - components_item = components_item_data.to_dict() - - elif isinstance(components_item_data, ComponentRTSP): - components_item = components_item_data.to_dict() - - elif isinstance(components_item_data, ComponentFile): - components_item = components_item_data.to_dict() - - elif isinstance(components_item_data, ComponentSIP): - components_item = components_item_data.to_dict() - - else: - components_item = components_item_data.to_dict() - - components.append(components_item) - config = self.config.to_dict() id = self.id @@ -88,7 +39,6 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { - "components": components, "config": config, "id": id, "peers": peers, @@ -100,70 +50,10 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: """@private""" - from ..models.component_file import ComponentFile - from ..models.component_hls import ComponentHLS - from ..models.component_recording import ComponentRecording - from ..models.component_rtsp import ComponentRTSP - from ..models.component_sip import ComponentSIP from ..models.peer import Peer from ..models.room_config import RoomConfig d = src_dict.copy() - components = [] - _components = d.pop("components") - for components_item_data in _components: - - def _parse_components_item( - data: object, - ) -> Union[ - "ComponentFile", - "ComponentHLS", - "ComponentRTSP", - "ComponentRecording", - "ComponentSIP", - ]: - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_0 = ComponentHLS.from_dict(data) - - return componentsschemas_component_type_0 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_1 = ComponentRTSP.from_dict(data) - - return componentsschemas_component_type_1 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_2 = ComponentFile.from_dict(data) - - return componentsschemas_component_type_2 - except: # noqa: E722 - pass - try: - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_3 = ComponentSIP.from_dict(data) - - return componentsschemas_component_type_3 - except: # noqa: E722 - pass - if not isinstance(data, dict): - raise TypeError() - componentsschemas_component_type_4 = ComponentRecording.from_dict(data) - - return componentsschemas_component_type_4 - - components_item = _parse_components_item(components_item_data) - - components.append(components_item) - config = RoomConfig.from_dict(d.pop("config")) id = d.pop("id") @@ -176,7 +66,6 @@ def _parse_components_item( peers.append(peers_item) room = cls( - components=components, config=config, id=id, peers=peers, diff --git a/fishjam/_openapi_client/models/s3_credentials.py b/fishjam/_openapi_client/models/s3_credentials.py deleted file mode 100644 index f662177..0000000 --- a/fishjam/_openapi_client/models/s3_credentials.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="S3Credentials") - - -@_attrs_define -class S3Credentials: - """An AWS S3 credential that will be used to send HLS stream. The stream will only be uploaded if credentials are - provided - - """ - - access_key_id: str - """An AWS access key identifier, linked to your AWS account.""" - bucket: str - """The name of the S3 bucket where your data will be stored.""" - region: str - """The AWS region where your bucket is located.""" - secret_access_key: str - """The secret key that is linked to the Access Key ID.""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - access_key_id = self.access_key_id - bucket = self.bucket - region = self.region - secret_access_key = self.secret_access_key - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "accessKeyId": access_key_id, - "bucket": bucket, - "region": region, - "secretAccessKey": secret_access_key, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - access_key_id = d.pop("accessKeyId") - - bucket = d.pop("bucket") - - region = d.pop("region") - - secret_access_key = d.pop("secretAccessKey") - - s3_credentials = cls( - access_key_id=access_key_id, - bucket=bucket, - region=region, - secret_access_key=secret_access_key, - ) - - s3_credentials.additional_properties = d - return s3_credentials - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/shutdown_status.py b/fishjam/_openapi_client/models/shutdown_status.py deleted file mode 100644 index 25127f2..0000000 --- a/fishjam/_openapi_client/models/shutdown_status.py +++ /dev/null @@ -1,60 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="ShutdownStatus") - - -@_attrs_define -class ShutdownStatus: - """Returns status information for the shutdown process of Fishjam.""" - - node_busy: bool - """Informs if node is busy and cannot be shutdown""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - node_busy = self.node_busy - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "node_busy": node_busy, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - node_busy = d.pop("node_busy") - - shutdown_status = cls( - node_busy=node_busy, - ) - - shutdown_status.additional_properties = d - return shutdown_status - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/shutdown_status_response.py b/fishjam/_openapi_client/models/shutdown_status_response.py deleted file mode 100644 index 3c6285f..0000000 --- a/fishjam/_openapi_client/models/shutdown_status_response.py +++ /dev/null @@ -1,66 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.shutdown_status import ShutdownStatus - - -T = TypeVar("T", bound="ShutdownStatusResponse") - - -@_attrs_define -class ShutdownStatusResponse: - """Returns status information for the shutdown process of Fishjam""" - - data: "ShutdownStatus" - """Returns status information for the shutdown process of Fishjam.""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - data = self.data.to_dict() - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data": data, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.shutdown_status import ShutdownStatus - - d = src_dict.copy() - data = ShutdownStatus.from_dict(d.pop("data")) - - shutdown_status_response = cls( - data=data, - ) - - shutdown_status_response.additional_properties = d - return shutdown_status_response - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/sip_credentials.py b/fishjam/_openapi_client/models/sip_credentials.py deleted file mode 100644 index 9b8678c..0000000 --- a/fishjam/_openapi_client/models/sip_credentials.py +++ /dev/null @@ -1,74 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="SIPCredentials") - - -@_attrs_define -class SIPCredentials: - """Credentials used to authorize in SIP Provider service""" - - address: str - """SIP provider address. Can be in the form of FQDN (my-sip-registrar.net) or IPv4 (1.2.3.4). Port can be specified e.g: 5.6.7.8:9999. If not given, the default SIP port `5060` will be assumed""" - password: str - """Password in SIP service provider""" - username: str - """Username in SIP service provider""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - address = self.address - password = self.password - username = self.username - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "address": address, - "password": password, - "username": username, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - address = d.pop("address") - - password = d.pop("password") - - username = d.pop("username") - - sip_credentials = cls( - address=address, - password=password, - username=username, - ) - - sip_credentials.additional_properties = d - return sip_credentials - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/subscription_config.py b/fishjam/_openapi_client/models/subscription_config.py deleted file mode 100644 index d95a88c..0000000 --- a/fishjam/_openapi_client/models/subscription_config.py +++ /dev/null @@ -1,62 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -T = TypeVar("T", bound="SubscriptionConfig") - - -@_attrs_define -class SubscriptionConfig: - """Subscription config""" - - origins: Union[Unset, List[str]] = UNSET - """List of peers and components ids whose tracks the HLS endpoint will subscribe to""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - origins: Union[Unset, List[str]] = UNSET - if not isinstance(self.origins, Unset): - origins = self.origins - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if origins is not UNSET: - field_dict["origins"] = origins - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - origins = cast(List[str], d.pop("origins", UNSET)) - - subscription_config = cls( - origins=origins, - ) - - subscription_config.additional_properties = d - return subscription_config - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/user.py b/fishjam/_openapi_client/models/user.py deleted file mode 100644 index 1725167..0000000 --- a/fishjam/_openapi_client/models/user.py +++ /dev/null @@ -1,67 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -T = TypeVar("T", bound="User") - - -@_attrs_define -class User: - """Description of the user state""" - - token: str - """User token, has to be in UUID format""" - user_id: str - """User ID""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - token = self.token - user_id = self.user_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "token": token, - "user_id": user_id, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - d = src_dict.copy() - token = d.pop("token") - - user_id = d.pop("user_id") - - user = cls( - token=token, - user_id=user_id, - ) - - user.additional_properties = d - return user - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/fishjam/_openapi_client/models/user_listing_response.py b/fishjam/_openapi_client/models/user_listing_response.py deleted file mode 100644 index 1d1ee77..0000000 --- a/fishjam/_openapi_client/models/user_listing_response.py +++ /dev/null @@ -1,75 +0,0 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar - -from attrs import define as _attrs_define -from attrs import field as _attrs_field - -if TYPE_CHECKING: - from ..models.user import User - - -T = TypeVar("T", bound="UserListingResponse") - - -@_attrs_define -class UserListingResponse: - """Response containing list of all users""" - - data: List["User"] - """None""" - additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) - """@private""" - - def to_dict(self) -> Dict[str, Any]: - """@private""" - data = [] - for data_item_data in self.data: - data_item = data_item_data.to_dict() - - data.append(data_item) - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update( - { - "data": data, - } - ) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - """@private""" - from ..models.user import User - - d = src_dict.copy() - data = [] - _data = d.pop("data") - for data_item_data in _data: - data_item = User.from_dict(data_item_data) - - data.append(data_item) - - user_listing_response = cls( - data=data, - ) - - user_listing_response.additional_properties = d - return user_listing_response - - @property - def additional_keys(self) -> List[str]: - """@private""" - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties