From 042b663cc9a78595e5a4aa4947ef4d092dc9a013 Mon Sep 17 00:00:00 2001 From: mj23000 Date: Fri, 22 Nov 2024 14:48:28 +0100 Subject: [PATCH] Improve API client typing Remove unused websockets dependency Pin aiohttp to avoid next major version breaking API client Use ruff for formatting instead of black Add mozart_client classes to mozart_api.__init__py imports Update OpenAPI generator to 7.10 Improve API documentation --- README.md | 2 +- docs/mozart-api.yaml | 3328 ++++++++++++----- python_client/PKG-INFO | 8 +- python_client/README.md | 2 +- python_client/mozart_api/__init__.py | 20 +- python_client/mozart_api/api/beolink_api.py | 97 +- python_client/mozart_api/api/bluetooth_api.py | 33 +- python_client/mozart_api/api/content_api.py | 35 +- python_client/mozart_api/api/deezer_api.py | 33 +- python_client/mozart_api/api/mozart_api.py | 377 +- python_client/mozart_api/api/output_api.py | 33 +- python_client/mozart_api/api/overlay_api.py | 29 +- python_client/mozart_api/api/playback_api.py | 101 +- python_client/mozart_api/api/power_api.py | 35 +- python_client/mozart_api/api/product_api.py | 35 +- python_client/mozart_api/api/remote_api.py | 43 +- python_client/mozart_api/api/scenes_api.py | 53 +- python_client/mozart_api/api/settings_api.py | 57 +- .../mozart_api/api/software_update_api.py | 37 +- python_client/mozart_api/api/sound_api.py | 101 +- .../mozart_api/api/speaker_group_api.py | 33 +- python_client/mozart_api/api/stand_api.py | 29 +- python_client/mozart_api/api_client.py | 48 +- python_client/mozart_api/api_response.py | 1 + python_client/mozart_api/configuration.py | 19 +- python_client/mozart_api/exceptions.py | 18 +- python_client/mozart_api/models/__init__.py | 13 +- python_client/mozart_api/models/action.py | 76 +- .../mozart_api/models/action_sound_profile.py | 18 +- .../models/alarm_timer_event_data.py | 29 +- .../mozart_api/models/alarm_triggered_info.py | 18 +- python_client/mozart_api/models/ambience.py | 18 +- .../mozart_api/models/ambience_feature.py | 34 +- .../mozart_api/models/ambience_range.py | 34 +- python_client/mozart_api/models/art.py | 18 +- python_client/mozart_api/models/balance.py | 18 +- .../mozart_api/models/balance_feature.py | 34 +- .../mozart_api/models/balance_range.py | 34 +- python_client/mozart_api/models/bass.py | 17 +- .../mozart_api/models/bass_feature.py | 34 +- .../mozart_api/models/bass_management.py | 22 +- .../models/bass_management_feature.py | 39 +- .../models/bass_management_range.py | 34 +- python_client/mozart_api/models/bass_range.py | 34 +- .../mozart_api/models/battery_state.py | 18 +- .../mozart_api/models/beo_remote_button.py | 23 +- .../mozart_api/models/beo_shape_status.py | 28 +- .../models/beo_shape_status_sound_profile.py | 18 +- .../models/beolink_available_listener.py | 17 +- .../mozart_api/models/beolink_experience.py | 26 +- .../models/beolink_experiences_result.py | 38 +- .../mozart_api/models/beolink_join_request.py | 18 +- .../mozart_api/models/beolink_join_result.py | 31 +- .../mozart_api/models/beolink_leader.py | 17 +- .../mozart_api/models/beolink_listener.py | 17 +- .../mozart_api/models/beolink_peer.py | 17 +- .../mozart_api/models/beolink_self.py | 17 +- .../mozart_api/models/bluetooth_device.py | 18 +- .../models/bluetooth_device_list.py | 28 +- .../mozart_api/models/button_event.py | 18 +- .../mozart_api/models/compression.py | 23 +- .../mozart_api/models/compression_feature.py | 40 +- .../mozart_api/models/compression_range.py | 34 +- .../mozart_api/models/content_item.py | 34 +- .../mozart_api/models/content_item_with_id.py | 26 +- .../mozart_api/models/directivity.py | 17 +- .../mozart_api/models/directivity_feature.py | 34 +- .../mozart_api/models/directivity_range.py | 34 +- .../mozart_api/models/error_model.py | 18 +- python_client/mozart_api/models/fader.py | 18 +- .../mozart_api/models/fader_feature.py | 34 +- .../mozart_api/models/fader_range.py | 34 +- python_client/mozart_api/models/hdmi_input.py | 18 +- .../mozart_api/models/hdmi_video_format.py | 34 +- .../mozart_api/models/home_control_ixp.py | 18 +- .../mozart_api/models/home_control_uri.py | 18 +- .../models/install_record_id_state.py | 18 +- .../mozart_api/models/latency_profile.py | 23 +- .../models/lge_tv_sound_settings.py | 25 +- .../mozart_api/models/listening_mode.py | 52 +- .../models/listening_mode_features.py | 138 +- .../mozart_api/models/listening_mode_props.py | 52 +- .../mozart_api/models/listening_mode_ref.py | 18 +- .../models/listening_mode_trigger.py | 24 +- python_client/mozart_api/models/loudness.py | 18 +- .../mozart_api/models/microphone_state.py | 23 +- .../mozart_api/models/microphones_state.py | 38 +- .../mozart_api/models/overlay_play_request.py | 48 +- .../models/overlay_play_request_common.py | 18 +- .../models/overlay_play_request_from_usb.py | 26 +- .../overlay_play_request_from_usb_from_usb.py | 17 +- .../overlay_play_request_text_to_speech.py | 28 +- ...y_request_text_to_speech_text_to_speech.py | 18 +- .../models/overlay_play_request_uri.py | 26 +- .../mozart_api/models/paired_remote.py | 22 +- .../models/paired_remote_response.py | 26 +- .../mozart_api/models/play_queue_item.py | 46 +- .../mozart_api/models/play_queue_item_type.py | 26 +- .../mozart_api/models/play_queue_settings.py | 24 +- .../models/playback_content_metadata.py | 45 +- .../mozart_api/models/playback_error.py | 26 +- .../mozart_api/models/playback_progress.py | 18 +- .../mozart_api/models/playback_state.py | 50 +- .../mozart_api/models/power_link_trigger.py | 18 +- .../mozart_api/models/power_state_enum.py | 26 +- .../models/powerlink_connection_state_enum.py | 24 +- python_client/mozart_api/models/preset.py | 44 +- .../models/product_curtain_status.py | 25 +- .../models/product_friendly_name.py | 18 +- .../mozart_api/models/product_state.py | 84 +- .../mozart_api/models/remote_menu_item.py | 41 +- .../models/remote_menu_item_properties.py | 33 +- .../mozart_api/models/remote_ui_key_state.py | 26 +- .../mozart_api/models/rendering_state.py | 18 +- .../mozart_api/models/room_compensation.py | 18 +- .../room_compensation_current_measurement.py | 25 +- .../models/room_compensation_debug.py | 18 +- .../models/room_compensation_enabled.py | 18 +- .../models/room_compensation_error_details.py | 32 +- .../models/room_compensation_feature.py | 18 +- .../models/room_compensation_info.py | 66 +- .../room_compensation_measurement_error.py | 18 +- .../models/room_compensation_properties.py | 37 +- .../models/room_compensation_range.py | 18 +- .../models/room_compensation_response.py | 18 +- .../models/room_compensation_result.py | 75 +- .../models/room_compensation_state.py | 45 +- .../models/room_compensation_state_value.py | 26 +- .../models/room_compensation_type.py | 23 +- .../models/room_compensation_version.py | 18 +- python_client/mozart_api/models/scene.py | 33 +- .../mozart_api/models/scene_classification.py | 23 +- .../mozart_api/models/scene_match.py | 18 +- .../mozart_api/models/scene_properties.py | 28 +- .../models/scene_trigger_base_properties.py | 28 +- .../models/software_update_state.py | 18 +- .../models/software_update_status.py | 32 +- .../mozart_api/models/sound_adjustments.py | 18 +- .../mozart_api/models/sound_feature_set.py | 168 +- .../mozart_api/models/sound_settings.py | 44 +- .../mozart_api/models/sound_tone_touch.py | 18 +- python_client/mozart_api/models/source.py | 26 +- .../mozart_api/models/source_array.py | 26 +- .../mozart_api/models/source_type_enum.py | 18 +- .../mozart_api/models/spatial_envelopment.py | 18 +- .../models/spatial_envelopment_feature.py | 36 +- .../models/spatial_envelopment_range.py | 36 +- .../mozart_api/models/spatial_height.py | 18 +- .../models/spatial_height_feature.py | 34 +- .../mozart_api/models/spatial_height_range.py | 34 +- .../mozart_api/models/spatial_processing.py | 23 +- .../models/spatial_processing_feature.py | 42 +- .../models/spatial_processing_range.py | 36 +- .../mozart_api/models/spatial_surround.py | 18 +- .../models/spatial_surround_feature.py | 36 +- .../models/spatial_surround_range.py | 36 +- .../mozart_api/models/spatial_width.py | 18 +- .../models/spatial_width_feature.py | 34 +- .../mozart_api/models/spatial_width_range.py | 34 +- .../mozart_api/models/speaker_group.py | 36 +- .../mozart_api/models/speaker_group_member.py | 26 +- .../models/speaker_group_member_location.py | 17 +- .../models/speaker_group_overview.py | 17 +- .../models/speaker_link_member_status.py | 30 +- .../mozart_api/models/speaker_link_status.py | 38 +- .../mozart_api/models/speaker_role_enum.py | 23 +- .../mozart_api/models/speech_enhance.py | 18 +- .../models/speech_enhance_feature.py | 34 +- .../mozart_api/models/speech_enhance_range.py | 34 +- .../mozart_api/models/stand_connected.py | 18 +- .../mozart_api/models/stand_movement.py | 26 +- .../mozart_api/models/stand_position.py | 18 +- python_client/mozart_api/models/tone_touch.py | 34 +- .../mozart_api/models/tone_touch_type.py | 18 +- .../models/tone_touch_type_range.py | 34 +- .../mozart_api/models/tone_touch_x_feature.py | 34 +- .../mozart_api/models/tone_touch_y_feature.py | 34 +- python_client/mozart_api/models/treble.py | 17 +- .../mozart_api/models/treble_feature.py | 34 +- .../mozart_api/models/treble_range.py | 34 +- .../mozart_api/models/tv_info_event_data.py | 26 +- .../mozart_api/models/tv_integration_types.py | 23 +- .../mozart_api/models/tv_properties.py | 28 +- .../mozart_api/models/tv_sound_settings.py | 26 +- python_client/mozart_api/models/tv_state.py | 42 +- python_client/mozart_api/models/uri.py | 18 +- python_client/mozart_api/models/user_flow.py | 18 +- .../mozart_api/models/video_pixel_format.py | 30 +- .../mozart_api/models/video_timings.py | 18 +- .../mozart_api/models/volume_level.py | 18 +- .../mozart_api/models/volume_mute.py | 18 +- .../mozart_api/models/volume_settings.py | 34 +- .../mozart_api/models/volume_state.py | 50 +- ...b_socket_event_active_hdmi_input_signal.py | 26 +- .../web_socket_event_active_listening_mode.py | 26 +- .../web_socket_event_active_speaker_group.py | 26 +- .../models/web_socket_event_alarm_timer.py | 26 +- .../web_socket_event_alarm_triggered.py | 26 +- .../models/web_socket_event_battery.py | 26 +- .../web_socket_event_beo_remote_button.py | 26 +- ...socket_event_beolink_experiences_result.py | 25 +- .../web_socket_event_beolink_join_result.py | 25 +- .../models/web_socket_event_button.py | 26 +- .../models/web_socket_event_curtains.py | 26 +- ...b_socket_event_hdmi_video_format_signal.py | 26 +- .../models/web_socket_event_notification.py | 26 +- .../models/web_socket_event_playback_error.py | 26 +- .../web_socket_event_playback_metadata.py | 26 +- .../web_socket_event_playback_progress.py | 26 +- .../web_socket_event_playback_source.py | 26 +- .../models/web_socket_event_playback_state.py | 26 +- .../models/web_socket_event_power_state.py | 26 +- ...socket_event_powerlink_connection_state.py | 28 +- ...cket_event_puc_install_remote_id_status.py | 26 +- .../models/web_socket_event_role.py | 26 +- ..._compensation_current_measurement_event.py | 28 +- ...eb_socket_event_room_compensation_state.py | 26 +- .../web_socket_event_software_update_state.py | 26 +- .../models/web_socket_event_sound_settings.py | 26 +- .../models/web_socket_event_source_change.py | 26 +- .../web_socket_event_speaker_group_changed.py | 18 +- ...ocket_event_speaker_link_status_changed.py | 26 +- .../web_socket_event_stand_connected.py | 26 +- .../models/web_socket_event_stand_position.py | 26 +- .../models/web_socket_event_tv_info.py | 26 +- .../models/web_socket_event_volume.py | 26 +- .../models/web_socket_event_wisa_out_state.py | 25 +- .../models/websocket_notification_tag.py | 18 +- .../mozart_api/models/wisa_out_state.py | 25 +- python_client/mozart_api/mozart_cli.py | 92 +- python_client/mozart_api/mozart_client.py | 505 ++- python_client/mozart_api/rest.py | 28 +- python_client/pyproject.toml | 5 +- 233 files changed, 5981 insertions(+), 5080 deletions(-) diff --git a/README.md b/README.md index 6862bd4..6cb0c65 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Balance stereo](https://raw.githubusercontent.com/bang-olufsen/mozart-open-api/main/docs/media/balance_stereo.png)](https://www.bang-olufsen.com/en/dk/speakers/beosound-balance-stereo-set?variant=beosound-balance-gva-naturaloak-bundle) -The Mozart API is an async REST API with WebSocket notification channel for immediate state information from Mozart devices. Currently the API is distributed as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI document that can be found in the [Github releases](https://github.com/bang-olufsen/mozart-open-api/releases). +The Mozart API is an async REST API with WebSocket notification channel for immediate state information from Mozart devices. Currently the API is distributed as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI document that can be found in the [Github repository](https://github.com/bang-olufsen/mozart-open-api/blob/main/mozart-api-4.1.1.116.yaml). Supported by: - [Beoconnect Core](https://www.bang-olufsen.com/en/dk/accessories/beoconnect-core) diff --git a/docs/mozart-api.yaml b/docs/mozart-api.yaml index 383ddfc..df58b36 100644 --- a/docs/mozart-api.yaml +++ b/docs/mozart-api.yaml @@ -2866,33 +2866,75 @@ components: $ref: '#/components/schemas/VolumeMute' type: object WebSocketEventActiveHdmiInputSignal: - description: "Usage examples:\n\n\n\nUse the `get_active_hdmi_input_signal_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_active_hdmi_input_signal_notifications():\n \ - \ \"\"\"React on WebSocketEventActiveHdmiInputSignal events.\"\"\"\ - \n\n def active_hdmi_input_signal_notifications(notification: object):\n\ - \ \"\"\"ActiveHdmiInputSignal notification handler.\"\"\"\n\ - \ print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_active_hdmi_input_signal_notifications(active_hdmi_input_signal_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_active_hdmi_input_signal_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_active_hdmi_input_signal_notifications():\n\ - \ \"\"\"React on WebSocketEventActiveHdmiInputSignal events.\"\"\ - \"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventActiveHdmiInputSignal\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_active_hdmi_input_signal_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_active_hdmi_input_signal_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_active_hdmi_input_signal_notifications(): + """React on WebSocketEventActiveHdmiInputSignal events.""" + + def active_hdmi_input_signal_notifications(notification: WebSocketEventActiveHdmiInputSignal): + """ActiveHdmiInputSignal notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_active_hdmi_input_signal_notifications(active_hdmi_input_signal_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_active_hdmi_input_signal_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_active_hdmi_input_signal_notifications(): + """React on WebSocketEventActiveHdmiInputSignal events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventActiveHdmiInputSignal": + print(notification["eventData"]) + + asyncio.run(receive_active_hdmi_input_signal_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/HdmiInput' @@ -2900,32 +2942,75 @@ components: type: string type: object WebSocketEventActiveListeningMode: - description: "Usage examples:\n\n\n\nUse the `get_active_listening_mode_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_active_listening_mode_notifications():\n \"\ - \"\"React on WebSocketEventActiveListeningMode events.\"\"\"\n\n \ - \ def active_listening_mode_notifications(notification: object):\n\ - \ \"\"\"ActiveListeningMode notification handler.\"\"\"\n \ - \ print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_active_listening_mode_notifications(active_listening_mode_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_active_listening_mode_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_active_listening_mode_notifications():\n\ - \ \"\"\"React on WebSocketEventActiveListeningMode events.\"\"\"\ - \n async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventActiveListeningMode\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_active_listening_mode_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_active_listening_mode_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_active_listening_mode_notifications(): + """React on WebSocketEventActiveListeningMode events.""" + + def active_listening_mode_notifications(notification: WebSocketEventActiveListeningMode): + """ActiveListeningMode notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_active_listening_mode_notifications(active_listening_mode_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_active_listening_mode_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_active_listening_mode_notifications(): + """React on WebSocketEventActiveListeningMode events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventActiveListeningMode": + print(notification["eventData"]) + + asyncio.run(receive_active_listening_mode_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/ListeningModeProps' @@ -2933,32 +3018,75 @@ components: type: string type: object WebSocketEventActiveSpeakerGroup: - description: "Usage examples:\n\n\n\nUse the `get_active_speaker_group_notifications()` method in\ - \ the Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_active_speaker_group_notifications():\n \"\"\"\ - React on WebSocketEventActiveSpeakerGroup events.\"\"\"\n\n def\ - \ active_speaker_group_notifications(notification: object):\n \ - \ \"\"\"ActiveSpeakerGroup notification handler.\"\"\"\n \ - \ print(notification)\n\n async with MozartClient(host=\"192.168.0.1\"\ - ) as mozart_client:\n mozart_client.get_active_speaker_group_notifications(active_speaker_group_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_active_speaker_group_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_active_speaker_group_notifications():\n\ - \ \"\"\"React on WebSocketEventActiveSpeakerGroup events.\"\"\"\ - \n async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventActiveSpeakerGroup\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_active_speaker_group_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_active_speaker_group_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_active_speaker_group_notifications(): + """React on WebSocketEventActiveSpeakerGroup events.""" + + def active_speaker_group_notifications(notification: WebSocketEventActiveSpeakerGroup): + """ActiveSpeakerGroup notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_active_speaker_group_notifications(active_speaker_group_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_active_speaker_group_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_active_speaker_group_notifications(): + """React on WebSocketEventActiveSpeakerGroup events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventActiveSpeakerGroup": + print(notification["eventData"]) + + asyncio.run(receive_active_speaker_group_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/SpeakerGroupOverview' @@ -2966,31 +3094,75 @@ components: type: string type: object WebSocketEventAlarmTimer: - description: "Usage examples:\n\n\n\nUse the `get_alarm_timer_notifications()` method in the Python\ - \ package to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.mozart_client import MozartClient\n\nasync def receive_alarm_timer_notifications():\n\ - \ \"\"\"React on WebSocketEventAlarmTimer events.\"\"\"\n\n \ - \ def alarm_timer_notifications(notification: object):\n \"\ - \"\"AlarmTimer notification handler.\"\"\"\n print(notification)\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_alarm_timer_notifications(alarm_timer_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_alarm_timer_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_alarm_timer_notifications():\n\ - \ \"\"\"React on WebSocketEventAlarmTimer events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventAlarmTimer\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_alarm_timer_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_alarm_timer_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_alarm_timer_notifications(): + """React on WebSocketEventAlarmTimer events.""" + + def alarm_timer_notifications(notification: WebSocketEventAlarmTimer): + """AlarmTimer notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_alarm_timer_notifications(alarm_timer_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_alarm_timer_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_alarm_timer_notifications(): + """React on WebSocketEventAlarmTimer events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventAlarmTimer": + print(notification["eventData"]) + + asyncio.run(receive_alarm_timer_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/AlarmTimerEventData' @@ -2998,31 +3170,75 @@ components: type: string type: object WebSocketEventAlarmTriggered: - description: "Usage examples:\n\n\n\nUse the `get_alarm_triggered_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_alarm_triggered_notifications():\n \"\"\"React\ - \ on WebSocketEventAlarmTriggered events.\"\"\"\n\n def alarm_triggered_notifications(notification:\ - \ object):\n \"\"\"AlarmTriggered notification handler.\"\"\ - \"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_alarm_triggered_notifications(alarm_triggered_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_alarm_triggered_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_alarm_triggered_notifications():\n\ - \ \"\"\"React on WebSocketEventAlarmTriggered events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventAlarmTriggered\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_alarm_triggered_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_alarm_triggered_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_alarm_triggered_notifications(): + """React on WebSocketEventAlarmTriggered events.""" + + def alarm_triggered_notifications(notification: WebSocketEventAlarmTriggered): + """AlarmTriggered notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_alarm_triggered_notifications(alarm_triggered_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_alarm_triggered_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_alarm_triggered_notifications(): + """React on WebSocketEventAlarmTriggered events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventAlarmTriggered": + print(notification["eventData"]) + + asyncio.run(receive_alarm_triggered_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/AlarmTriggeredInfo' @@ -3030,31 +3246,75 @@ components: type: string type: object WebSocketEventBattery: - description: "Usage examples:\n\n\n\nUse the `get_battery_notifications()` method in the Python\ - \ package to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.mozart_client import MozartClient\n\nasync def receive_battery_notifications():\n\ - \ \"\"\"React on WebSocketEventBattery events.\"\"\"\n\n def\ - \ battery_notifications(notification: object):\n \"\"\"Battery\ - \ notification handler.\"\"\"\n print(notification)\n\n \ - \ async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_battery_notifications(battery_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_battery_notifications())\n```\n\ - \n\n\nUse the AIOHTTP library\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\n\ - from aiohttp import ClientSession\n\n\nasync def receive_battery_notifications():\n\ - \ \"\"\"React on WebSocketEventBattery events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventBattery\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_battery_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_battery_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_battery_notifications(): + """React on WebSocketEventBattery events.""" + + def battery_notifications(notification: WebSocketEventBattery): + """Battery notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_battery_notifications(battery_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_battery_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_battery_notifications(): + """React on WebSocketEventBattery events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventBattery": + print(notification["eventData"]) + + asyncio.run(receive_battery_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/BatteryState' @@ -3062,31 +3322,75 @@ components: type: string type: object WebSocketEventBeoRemoteButton: - description: "Usage examples:\n\n\n\nUse the `get_beo_remote_button_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_beo_remote_button_notifications():\n \"\"\"React\ - \ on WebSocketEventBeoRemoteButton events.\"\"\"\n\n def beo_remote_button_notifications(notification:\ - \ object):\n \"\"\"BeoRemoteButton notification handler.\"\"\ - \"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_beo_remote_button_notifications(beo_remote_button_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_beo_remote_button_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_beo_remote_button_notifications():\n\ - \ \"\"\"React on WebSocketEventBeoRemoteButton events.\"\"\"\n\ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/remoteControl\") as websocket:\n \ - \ async for notification in websocket:\n notification\ - \ = notification.json()\n\n if notification[\"eventType\"\ - ] == \"WebSocketEventBeoRemoteButton\":\n print(notification[\"\ - eventData\"])\n\n \nasyncio.run(receive_beo_remote_button_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_beo_remote_button_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_beo_remote_button_notifications(): + """React on WebSocketEventBeoRemoteButton events.""" + + def beo_remote_button_notifications(notification: WebSocketEventBeoRemoteButton): + """BeoRemoteButton notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_beo_remote_button_notifications(beo_remote_button_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_beo_remote_button_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_beo_remote_button_notifications(): + """React on WebSocketEventBeoRemoteButton events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/remoteControl") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventBeoRemoteButton": + print(notification["eventData"]) + + asyncio.run(receive_beo_remote_button_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/BeoRemoteButton' @@ -3094,33 +3398,75 @@ components: type: string type: object WebSocketEventBeolinkExperiencesResult: - description: "Usage examples:\n\n\n\nUse the `get_beolink_experiences_result_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_beolink_experiences_result_notifications():\n\ - \ \"\"\"React on WebSocketEventBeolinkExperiencesResult events.\"\ - \"\"\n\n def beolink_experiences_result_notifications(notification:\ - \ object):\n \"\"\"BeolinkExperiencesResult notification handler.\"\ - \"\"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_beolink_experiences_result_notifications(beolink_experiences_result_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_beolink_experiences_result_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_beolink_experiences_result_notifications():\n\ - \ \"\"\"React on WebSocketEventBeolinkExperiencesResult events.\"\ - \"\"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventBeolinkExperiencesResult\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_beolink_experiences_result_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_beolink_experiences_result_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_beolink_experiences_result_notifications(): + """React on WebSocketEventBeolinkExperiencesResult events.""" + + def beolink_experiences_result_notifications(notification: WebSocketEventBeolinkExperiencesResult): + """BeolinkExperiencesResult notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_beolink_experiences_result_notifications(beolink_experiences_result_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_beolink_experiences_result_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_beolink_experiences_result_notifications(): + """React on WebSocketEventBeolinkExperiencesResult events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventBeolinkExperiencesResult": + print(notification["eventData"]) + + asyncio.run(receive_beolink_experiences_result_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/BeolinkExperiencesResult' @@ -3131,32 +3477,75 @@ components: - eventData type: object WebSocketEventBeolinkJoinResult: - description: "Usage examples:\n\n\n\nUse the `get_beolink_join_result_notifications()` method in\ - \ the Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_beolink_join_result_notifications():\n \"\"\"\ - React on WebSocketEventBeolinkJoinResult events.\"\"\"\n\n def\ - \ beolink_join_result_notifications(notification: object):\n \ - \ \"\"\"BeolinkJoinResult notification handler.\"\"\"\n print(notification)\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_beolink_join_result_notifications(beolink_join_result_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_beolink_join_result_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_beolink_join_result_notifications():\n\ - \ \"\"\"React on WebSocketEventBeolinkJoinResult events.\"\"\"\n\ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventBeolinkJoinResult\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_beolink_join_result_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_beolink_join_result_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_beolink_join_result_notifications(): + """React on WebSocketEventBeolinkJoinResult events.""" + + def beolink_join_result_notifications(notification: WebSocketEventBeolinkJoinResult): + """BeolinkJoinResult notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_beolink_join_result_notifications(beolink_join_result_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_beolink_join_result_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_beolink_join_result_notifications(): + """React on WebSocketEventBeolinkJoinResult events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventBeolinkJoinResult": + print(notification["eventData"]) + + asyncio.run(receive_beolink_join_result_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/BeolinkJoinResult' @@ -3167,31 +3556,75 @@ components: - eventData type: object WebSocketEventButton: - description: "Usage examples:\n\n\n\nUse the `get_button_notifications()` method in the Python package\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\nasync def receive_button_notifications():\n\ - \ \"\"\"React on WebSocketEventButton events.\"\"\"\n\n def\ - \ button_notifications(notification: object):\n \"\"\"Button\ - \ notification handler.\"\"\"\n print(notification)\n\n \ - \ async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_button_notifications(button_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_button_notifications())\n```\n\ - \n\n\nUse the AIOHTTP library\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\n\ - from aiohttp import ClientSession\n\n\nasync def receive_button_notifications():\n\ - \ \"\"\"React on WebSocketEventButton events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventButton\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_button_notifications())\n```\n\ - \n" + description: | + Usage examples: + + + + Use the `get_button_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_button_notifications(): + """React on WebSocketEventButton events.""" + + def button_notifications(notification: WebSocketEventButton): + """Button notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_button_notifications(button_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_button_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_button_notifications(): + """React on WebSocketEventButton events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventButton": + print(notification["eventData"]) + + asyncio.run(receive_button_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/ButtonEvent' @@ -3199,31 +3632,75 @@ components: type: string type: object WebSocketEventCurtains: - description: "Usage examples:\n\n\n\nUse the `get_curtains_notifications()` method in the Python\ - \ package to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.mozart_client import MozartClient\n\nasync def receive_curtains_notifications():\n\ - \ \"\"\"React on WebSocketEventCurtains events.\"\"\"\n\n def\ - \ curtains_notifications(notification: object):\n \"\"\"Curtains\ - \ notification handler.\"\"\"\n print(notification)\n\n \ - \ async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_curtains_notifications(curtains_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_curtains_notifications())\n```\n\ - \n\n\nUse the AIOHTTP library\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\n\ - from aiohttp import ClientSession\n\n\nasync def receive_curtains_notifications():\n\ - \ \"\"\"React on WebSocketEventCurtains events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventCurtains\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_curtains_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_curtains_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_curtains_notifications(): + """React on WebSocketEventCurtains events.""" + + def curtains_notifications(notification: WebSocketEventCurtains): + """Curtains notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_curtains_notifications(curtains_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_curtains_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_curtains_notifications(): + """React on WebSocketEventCurtains events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventCurtains": + print(notification["eventData"]) + + asyncio.run(receive_curtains_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/ProductCurtainStatus' @@ -3231,33 +3708,75 @@ components: type: string type: object WebSocketEventHdmiVideoFormatSignal: - description: "Usage examples:\n\n\n\nUse the `get_hdmi_video_format_signal_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_hdmi_video_format_signal_notifications():\n \ - \ \"\"\"React on WebSocketEventHdmiVideoFormatSignal events.\"\"\"\ - \n\n def hdmi_video_format_signal_notifications(notification: object):\n\ - \ \"\"\"HdmiVideoFormatSignal notification handler.\"\"\"\n\ - \ print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_hdmi_video_format_signal_notifications(hdmi_video_format_signal_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_hdmi_video_format_signal_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_hdmi_video_format_signal_notifications():\n\ - \ \"\"\"React on WebSocketEventHdmiVideoFormatSignal events.\"\"\ - \"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventHdmiVideoFormatSignal\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_hdmi_video_format_signal_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_hdmi_video_format_signal_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_hdmi_video_format_signal_notifications(): + """React on WebSocketEventHdmiVideoFormatSignal events.""" + + def hdmi_video_format_signal_notifications(notification: WebSocketEventHdmiVideoFormatSignal): + """HdmiVideoFormatSignal notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_hdmi_video_format_signal_notifications(hdmi_video_format_signal_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_hdmi_video_format_signal_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_hdmi_video_format_signal_notifications(): + """React on WebSocketEventHdmiVideoFormatSignal events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventHdmiVideoFormatSignal": + print(notification["eventData"]) + + asyncio.run(receive_hdmi_video_format_signal_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/HdmiVideoFormat' @@ -3265,32 +3784,76 @@ components: type: string type: object WebSocketEventNotification: - description: "This telegram is used to send a tagged notification.\nUsage\ - \ examples:\n\n\n\nUse the\ - \ `get_notification_notifications()` method in the Python package\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\nasync def receive_notification_notifications():\n\ - \ \"\"\"React on WebSocketEventNotification events.\"\"\"\n\n \ - \ def notification_notifications(notification: object):\n \ - \ \"\"\"Notification notification handler.\"\"\"\n print(notification)\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_notification_notifications(notification_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_notification_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_notification_notifications():\n\ - \ \"\"\"React on WebSocketEventNotification events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventNotification\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_notification_notifications())\n\ - ```\n\n" + description: | + This telegram is used to send a tagged notification. + Usage examples: + + + + Use the `get_notification_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_notification_notifications(): + """React on WebSocketEventNotification events.""" + + def notification_notifications(notification: WebSocketEventNotification): + """Notification notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_notification_notifications(notification_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_notification_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_notification_notifications(): + """React on WebSocketEventNotification events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventNotification": + print(notification["eventData"]) + + asyncio.run(receive_notification_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/WebsocketNotificationTag' @@ -3298,31 +3861,75 @@ components: type: string type: object WebSocketEventPlaybackError: - description: "Usage examples:\n\n\n\nUse the `get_playback_error_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_playback_error_notifications():\n \"\"\"React\ - \ on WebSocketEventPlaybackError events.\"\"\"\n\n def playback_error_notifications(notification:\ - \ object):\n \"\"\"PlaybackError notification handler.\"\"\"\ - \n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_playback_error_notifications(playback_error_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_playback_error_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_playback_error_notifications():\n\ - \ \"\"\"React on WebSocketEventPlaybackError events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventPlaybackError\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_playback_error_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_playback_error_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_playback_error_notifications(): + """React on WebSocketEventPlaybackError events.""" + + def playback_error_notifications(notification: WebSocketEventPlaybackError): + """PlaybackError notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_playback_error_notifications(playback_error_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_playback_error_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_playback_error_notifications(): + """React on WebSocketEventPlaybackError events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPlaybackError": + print(notification["eventData"]) + + asyncio.run(receive_playback_error_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/PlaybackError' @@ -3330,31 +3937,75 @@ components: type: string type: object WebSocketEventPlaybackMetadata: - description: "Usage examples:\n\n\n\nUse the `get_playback_metadata_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_playback_metadata_notifications():\n \"\"\"React\ - \ on WebSocketEventPlaybackMetadata events.\"\"\"\n\n def playback_metadata_notifications(notification:\ - \ object):\n \"\"\"PlaybackMetadata notification handler.\"\ - \"\"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_playback_metadata_notifications(playback_metadata_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_playback_metadata_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_playback_metadata_notifications():\n\ - \ \"\"\"React on WebSocketEventPlaybackMetadata events.\"\"\"\n\ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventPlaybackMetadata\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_playback_metadata_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_playback_metadata_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_playback_metadata_notifications(): + """React on WebSocketEventPlaybackMetadata events.""" + + def playback_metadata_notifications(notification: WebSocketEventPlaybackMetadata): + """PlaybackMetadata notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_playback_metadata_notifications(playback_metadata_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_playback_metadata_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_playback_metadata_notifications(): + """React on WebSocketEventPlaybackMetadata events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPlaybackMetadata": + print(notification["eventData"]) + + asyncio.run(receive_playback_metadata_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/PlaybackContentMetadata' @@ -3362,31 +4013,75 @@ components: type: string type: object WebSocketEventPlaybackProgress: - description: "Usage examples:\n\n\n\nUse the `get_playback_progress_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_playback_progress_notifications():\n \"\"\"React\ - \ on WebSocketEventPlaybackProgress events.\"\"\"\n\n def playback_progress_notifications(notification:\ - \ object):\n \"\"\"PlaybackProgress notification handler.\"\ - \"\"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_playback_progress_notifications(playback_progress_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_playback_progress_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_playback_progress_notifications():\n\ - \ \"\"\"React on WebSocketEventPlaybackProgress events.\"\"\"\n\ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventPlaybackProgress\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_playback_progress_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_playback_progress_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_playback_progress_notifications(): + """React on WebSocketEventPlaybackProgress events.""" + + def playback_progress_notifications(notification: WebSocketEventPlaybackProgress): + """PlaybackProgress notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_playback_progress_notifications(playback_progress_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_playback_progress_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_playback_progress_notifications(): + """React on WebSocketEventPlaybackProgress events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPlaybackProgress": + print(notification["eventData"]) + + asyncio.run(receive_playback_progress_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/PlaybackProgress' @@ -3394,31 +4089,75 @@ components: type: string type: object WebSocketEventPlaybackSource: - description: "Usage examples:\n\n\n\nUse the `get_playback_source_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_playback_source_notifications():\n \"\"\"React\ - \ on WebSocketEventPlaybackSource events.\"\"\"\n\n def playback_source_notifications(notification:\ - \ object):\n \"\"\"PlaybackSource notification handler.\"\"\ - \"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_playback_source_notifications(playback_source_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_playback_source_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_playback_source_notifications():\n\ - \ \"\"\"React on WebSocketEventPlaybackSource events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventPlaybackSource\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_playback_source_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_playback_source_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_playback_source_notifications(): + """React on WebSocketEventPlaybackSource events.""" + + def playback_source_notifications(notification: WebSocketEventPlaybackSource): + """PlaybackSource notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_playback_source_notifications(playback_source_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_playback_source_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_playback_source_notifications(): + """React on WebSocketEventPlaybackSource events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPlaybackSource": + print(notification["eventData"]) + + asyncio.run(receive_playback_source_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/Source' @@ -3426,31 +4165,75 @@ components: type: string type: object WebSocketEventPlaybackState: - description: "Usage examples:\n\n\n\nUse the `get_playback_state_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_playback_state_notifications():\n \"\"\"React\ - \ on WebSocketEventPlaybackState events.\"\"\"\n\n def playback_state_notifications(notification:\ - \ object):\n \"\"\"PlaybackState notification handler.\"\"\"\ - \n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_playback_state_notifications(playback_state_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_playback_state_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_playback_state_notifications():\n\ - \ \"\"\"React on WebSocketEventPlaybackState events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventPlaybackState\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_playback_state_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_playback_state_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_playback_state_notifications(): + """React on WebSocketEventPlaybackState events.""" + + def playback_state_notifications(notification: WebSocketEventPlaybackState): + """PlaybackState notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_playback_state_notifications(playback_state_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_playback_state_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_playback_state_notifications(): + """React on WebSocketEventPlaybackState events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPlaybackState": + print(notification["eventData"]) + + asyncio.run(receive_playback_state_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/RenderingState' @@ -3458,31 +4241,75 @@ components: type: string type: object WebSocketEventPowerState: - description: "Usage examples:\n\n\n\nUse the `get_power_state_notifications()` method in the Python\ - \ package to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.mozart_client import MozartClient\n\nasync def receive_power_state_notifications():\n\ - \ \"\"\"React on WebSocketEventPowerState events.\"\"\"\n\n \ - \ def power_state_notifications(notification: object):\n \"\ - \"\"PowerState notification handler.\"\"\"\n print(notification)\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_power_state_notifications(power_state_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_power_state_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_power_state_notifications():\n\ - \ \"\"\"React on WebSocketEventPowerState events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventPowerState\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_power_state_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_power_state_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_power_state_notifications(): + """React on WebSocketEventPowerState events.""" + + def power_state_notifications(notification: WebSocketEventPowerState): + """PowerState notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_power_state_notifications(power_state_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_power_state_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_power_state_notifications(): + """React on WebSocketEventPowerState events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPowerState": + print(notification["eventData"]) + + asyncio.run(receive_power_state_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/PowerStateEnum' @@ -3490,33 +4317,75 @@ components: type: string type: object WebSocketEventPowerlinkConnectionState: - description: "Usage examples:\n\n\n\nUse the `get_powerlink_connection_state_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_powerlink_connection_state_notifications():\n\ - \ \"\"\"React on WebSocketEventPowerlinkConnectionState events.\"\ - \"\"\n\n def powerlink_connection_state_notifications(notification:\ - \ object):\n \"\"\"PowerlinkConnectionState notification handler.\"\ - \"\"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_powerlink_connection_state_notifications(powerlink_connection_state_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_powerlink_connection_state_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_powerlink_connection_state_notifications():\n\ - \ \"\"\"React on WebSocketEventPowerlinkConnectionState events.\"\ - \"\"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventPowerlinkConnectionState\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_powerlink_connection_state_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_powerlink_connection_state_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_powerlink_connection_state_notifications(): + """React on WebSocketEventPowerlinkConnectionState events.""" + + def powerlink_connection_state_notifications(notification: WebSocketEventPowerlinkConnectionState): + """PowerlinkConnectionState notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_powerlink_connection_state_notifications(powerlink_connection_state_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_powerlink_connection_state_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_powerlink_connection_state_notifications(): + """React on WebSocketEventPowerlinkConnectionState events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPowerlinkConnectionState": + print(notification["eventData"]) + + asyncio.run(receive_powerlink_connection_state_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/PowerlinkConnectionStateEnum' @@ -3524,33 +4393,75 @@ components: type: string type: object WebSocketEventPucInstallRemoteIdStatus: - description: "Usage examples:\n\n\n\nUse the `get_puc_install_remote_id_status_notifications()`\ - \ method in the Python package to get notifications of this type.\n\ - \n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_puc_install_remote_id_status_notifications():\n\ - \ \"\"\"React on WebSocketEventPucInstallRemoteIdStatus events.\"\ - \"\"\n\n def puc_install_remote_id_status_notifications(notification:\ - \ object):\n \"\"\"PucInstallRemoteIdStatus notification handler.\"\ - \"\"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_puc_install_remote_id_status_notifications(puc_install_remote_id_status_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_puc_install_remote_id_status_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_puc_install_remote_id_status_notifications():\n\ - \ \"\"\"React on WebSocketEventPucInstallRemoteIdStatus events.\"\ - \"\"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventPucInstallRemoteIdStatus\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_puc_install_remote_id_status_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_puc_install_remote_id_status_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_puc_install_remote_id_status_notifications(): + """React on WebSocketEventPucInstallRemoteIdStatus events.""" + + def puc_install_remote_id_status_notifications(notification: WebSocketEventPucInstallRemoteIdStatus): + """PucInstallRemoteIdStatus notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_puc_install_remote_id_status_notifications(puc_install_remote_id_status_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_puc_install_remote_id_status_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_puc_install_remote_id_status_notifications(): + """React on WebSocketEventPucInstallRemoteIdStatus events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventPucInstallRemoteIdStatus": + print(notification["eventData"]) + + asyncio.run(receive_puc_install_remote_id_status_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/InstallRecordIdState' @@ -3558,30 +4469,75 @@ components: type: string type: object WebSocketEventRole: - description: "Usage examples:\n\n\n\nUse the `get_role_notifications()` method in the Python package\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\nasync def receive_role_notifications():\n\ - \ \"\"\"React on WebSocketEventRole events.\"\"\"\n\n def role_notifications(notification:\ - \ object):\n \"\"\"Role notification handler.\"\"\"\n \ - \ print(notification)\n\n async with MozartClient(host=\"192.168.0.1\"\ - ) as mozart_client:\n mozart_client.get_role_notifications(role_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_role_notifications())\n```\n\n\ - \n\nUse the AIOHTTP library\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\n\ - from aiohttp import ClientSession\n\n\nasync def receive_role_notifications():\n\ - \ \"\"\"React on WebSocketEventRole events.\"\"\"\n async with\ - \ ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventRole\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_role_notifications())\n```\n\ - \n" + description: | + Usage examples: + + + + Use the `get_role_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_role_notifications(): + """React on WebSocketEventRole events.""" + + def role_notifications(notification: WebSocketEventRole): + """Role notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_role_notifications(role_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_role_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_role_notifications(): + """React on WebSocketEventRole events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventRole": + print(notification["eventData"]) + + asyncio.run(receive_role_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/SpeakerRoleEnum' @@ -3589,35 +4545,78 @@ components: type: string type: object WebSocketEventRoomCompensationCurrentMeasurementEvent: - description: "Sent when a room compensation measurement is started/done.\n\ - Is only sent when room compensation type is advanced.\n\nUsage examples:\n\ - \n\n\nUse the `get_room_compensation_current_measurement_event_notifications()`\ - \ method in the Python package to get notifications of this type.\n\ - \n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_room_compensation_current_measurement_event_notifications():\n\ - \ \"\"\"React on WebSocketEventRoomCompensationCurrentMeasurementEvent\ - \ events.\"\"\"\n\n def room_compensation_current_measurement_event_notifications(notification:\ - \ object):\n \"\"\"RoomCompensationCurrentMeasurementEvent\ - \ notification handler.\"\"\"\n print(notification)\n\n \ - \ async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_room_compensation_current_measurement_event_notifications(room_compensation_current_measurement_event_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_room_compensation_current_measurement_event_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_room_compensation_current_measurement_event_notifications():\n\ - \ \"\"\"React on WebSocketEventRoomCompensationCurrentMeasurementEvent\ - \ events.\"\"\"\n async with ClientSession() as session:\n \ - \ async with session.ws_connect(url=\"ws://192.168.0.1:9339/\"\ - ) as websocket:\n async for notification in websocket:\n\ - \ notification = notification.json()\n\n \ - \ if notification[\"eventType\"] == \"WebSocketEventRoomCompensationCurrentMeasurementEvent\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_room_compensation_current_measurement_event_notifications())\n\ - ```\n\n" + description: | + Sent when a room compensation measurement is started/done. + Is only sent when room compensation type is advanced. + + Usage examples: + + + + Use the `get_room_compensation_current_measurement_event_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_room_compensation_current_measurement_event_notifications(): + """React on WebSocketEventRoomCompensationCurrentMeasurementEvent events.""" + + def room_compensation_current_measurement_event_notifications(notification: WebSocketEventRoomCompensationCurrentMeasurementEvent): + """RoomCompensationCurrentMeasurementEvent notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_room_compensation_current_measurement_event_notifications(room_compensation_current_measurement_event_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_room_compensation_current_measurement_event_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_room_compensation_current_measurement_event_notifications(): + """React on WebSocketEventRoomCompensationCurrentMeasurementEvent events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventRoomCompensationCurrentMeasurementEvent": + print(notification["eventData"]) + + asyncio.run(receive_room_compensation_current_measurement_event_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/RoomCompensationCurrentMeasurement' @@ -3625,33 +4624,75 @@ components: type: string type: object WebSocketEventRoomCompensationState: - description: "Usage examples:\n\n\n\nUse the `get_room_compensation_state_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_room_compensation_state_notifications():\n \ - \ \"\"\"React on WebSocketEventRoomCompensationState events.\"\"\"\ - \n\n def room_compensation_state_notifications(notification: object):\n\ - \ \"\"\"RoomCompensationState notification handler.\"\"\"\n\ - \ print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_room_compensation_state_notifications(room_compensation_state_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_room_compensation_state_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_room_compensation_state_notifications():\n\ - \ \"\"\"React on WebSocketEventRoomCompensationState events.\"\"\ - \"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventRoomCompensationState\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_room_compensation_state_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_room_compensation_state_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_room_compensation_state_notifications(): + """React on WebSocketEventRoomCompensationState events.""" + + def room_compensation_state_notifications(notification: WebSocketEventRoomCompensationState): + """RoomCompensationState notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_room_compensation_state_notifications(room_compensation_state_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_room_compensation_state_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_room_compensation_state_notifications(): + """React on WebSocketEventRoomCompensationState events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventRoomCompensationState": + print(notification["eventData"]) + + asyncio.run(receive_room_compensation_state_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/RoomCompensationStateValue' @@ -3659,32 +4700,75 @@ components: type: string type: object WebSocketEventSoftwareUpdateState: - description: "Usage examples:\n\n\n\nUse the `get_software_update_state_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_software_update_state_notifications():\n \"\ - \"\"React on WebSocketEventSoftwareUpdateState events.\"\"\"\n\n \ - \ def software_update_state_notifications(notification: object):\n\ - \ \"\"\"SoftwareUpdateState notification handler.\"\"\"\n \ - \ print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_software_update_state_notifications(software_update_state_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_software_update_state_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_software_update_state_notifications():\n\ - \ \"\"\"React on WebSocketEventSoftwareUpdateState events.\"\"\"\ - \n async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventSoftwareUpdateState\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_software_update_state_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_software_update_state_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_software_update_state_notifications(): + """React on WebSocketEventSoftwareUpdateState events.""" + + def software_update_state_notifications(notification: WebSocketEventSoftwareUpdateState): + """SoftwareUpdateState notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_software_update_state_notifications(software_update_state_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_software_update_state_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_software_update_state_notifications(): + """React on WebSocketEventSoftwareUpdateState events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventSoftwareUpdateState": + print(notification["eventData"]) + + asyncio.run(receive_software_update_state_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/SoftwareUpdateState' @@ -3692,31 +4776,75 @@ components: type: string type: object WebSocketEventSoundSettings: - description: "Usage examples:\n\n\n\nUse the `get_sound_settings_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_sound_settings_notifications():\n \"\"\"React\ - \ on WebSocketEventSoundSettings events.\"\"\"\n\n def sound_settings_notifications(notification:\ - \ object):\n \"\"\"SoundSettings notification handler.\"\"\"\ - \n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_sound_settings_notifications(sound_settings_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_sound_settings_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_sound_settings_notifications():\n\ - \ \"\"\"React on WebSocketEventSoundSettings events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventSoundSettings\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_sound_settings_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_sound_settings_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_sound_settings_notifications(): + """React on WebSocketEventSoundSettings events.""" + + def sound_settings_notifications(notification: WebSocketEventSoundSettings): + """SoundSettings notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_sound_settings_notifications(sound_settings_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_sound_settings_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_sound_settings_notifications(): + """React on WebSocketEventSoundSettings events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventSoundSettings": + print(notification["eventData"]) + + asyncio.run(receive_sound_settings_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/SoundSettings' @@ -3724,31 +4852,75 @@ components: type: string type: object WebSocketEventSourceChange: - description: "Usage examples:\n\n\n\nUse the `get_source_change_notifications()` method in the Python\ - \ package to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.mozart_client import MozartClient\n\nasync def receive_source_change_notifications():\n\ - \ \"\"\"React on WebSocketEventSourceChange events.\"\"\"\n\n \ - \ def source_change_notifications(notification: object):\n \ - \ \"\"\"SourceChange notification handler.\"\"\"\n print(notification)\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_source_change_notifications(source_change_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_source_change_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_source_change_notifications():\n\ - \ \"\"\"React on WebSocketEventSourceChange events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventSourceChange\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_source_change_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_source_change_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_source_change_notifications(): + """React on WebSocketEventSourceChange events.""" + + def source_change_notifications(notification: WebSocketEventSourceChange): + """SourceChange notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_source_change_notifications(source_change_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_source_change_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_source_change_notifications(): + """React on WebSocketEventSourceChange events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventSourceChange": + print(notification["eventData"]) + + asyncio.run(receive_source_change_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/Source' @@ -3756,32 +4928,75 @@ components: type: string type: object WebSocketEventSpeakerGroupChanged: - description: "Usage examples:\n\n\n\nUse the `get_speaker_group_changed_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_speaker_group_changed_notifications():\n \"\ - \"\"React on WebSocketEventSpeakerGroupChanged events.\"\"\"\n\n \ - \ def speaker_group_changed_notifications(notification: object):\n\ - \ \"\"\"SpeakerGroupChanged notification handler.\"\"\"\n \ - \ print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_speaker_group_changed_notifications(speaker_group_changed_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_speaker_group_changed_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_speaker_group_changed_notifications():\n\ - \ \"\"\"React on WebSocketEventSpeakerGroupChanged events.\"\"\"\ - \n async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventSpeakerGroupChanged\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_speaker_group_changed_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_speaker_group_changed_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_speaker_group_changed_notifications(): + """React on WebSocketEventSpeakerGroupChanged events.""" + + def speaker_group_changed_notifications(notification: WebSocketEventSpeakerGroupChanged): + """SpeakerGroupChanged notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_speaker_group_changed_notifications(speaker_group_changed_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_speaker_group_changed_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_speaker_group_changed_notifications(): + """React on WebSocketEventSpeakerGroupChanged events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventSpeakerGroupChanged": + print(notification["eventData"]) + + asyncio.run(receive_speaker_group_changed_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/SpeakerGroupId' @@ -3789,33 +5004,75 @@ components: type: string type: object WebSocketEventSpeakerLinkStatusChanged: - description: "Usage examples:\n\n\n\nUse the `get_speaker_link_status_changed_notifications()` method\ - \ in the Python package to get notifications of this type.\n\n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_speaker_link_status_changed_notifications():\n\ - \ \"\"\"React on WebSocketEventSpeakerLinkStatusChanged events.\"\ - \"\"\n\n def speaker_link_status_changed_notifications(notification:\ - \ object):\n \"\"\"SpeakerLinkStatusChanged notification handler.\"\ - \"\"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_speaker_link_status_changed_notifications(speaker_link_status_changed_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_speaker_link_status_changed_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_speaker_link_status_changed_notifications():\n\ - \ \"\"\"React on WebSocketEventSpeakerLinkStatusChanged events.\"\ - \"\"\n async with ClientSession() as session:\n async with\ - \ session.ws_connect(url=\"ws://192.168.0.1:9339/\") as websocket:\n\ - \ async for notification in websocket:\n \ - \ notification = notification.json()\n\n if notification[\"\ - eventType\"] == \"WebSocketEventSpeakerLinkStatusChanged\":\n \ - \ print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_speaker_link_status_changed_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_speaker_link_status_changed_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_speaker_link_status_changed_notifications(): + """React on WebSocketEventSpeakerLinkStatusChanged events.""" + + def speaker_link_status_changed_notifications(notification: WebSocketEventSpeakerLinkStatusChanged): + """SpeakerLinkStatusChanged notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_speaker_link_status_changed_notifications(speaker_link_status_changed_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_speaker_link_status_changed_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_speaker_link_status_changed_notifications(): + """React on WebSocketEventSpeakerLinkStatusChanged events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventSpeakerLinkStatusChanged": + print(notification["eventData"]) + + asyncio.run(receive_speaker_link_status_changed_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/SpeakerLinkStatus' @@ -3823,31 +5080,75 @@ components: type: string type: object WebSocketEventStandConnected: - description: "Usage examples:\n\n\n\nUse the `get_stand_connected_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_stand_connected_notifications():\n \"\"\"React\ - \ on WebSocketEventStandConnected events.\"\"\"\n\n def stand_connected_notifications(notification:\ - \ object):\n \"\"\"StandConnected notification handler.\"\"\ - \"\n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_stand_connected_notifications(stand_connected_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_stand_connected_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_stand_connected_notifications():\n\ - \ \"\"\"React on WebSocketEventStandConnected events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventStandConnected\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_stand_connected_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_stand_connected_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_stand_connected_notifications(): + """React on WebSocketEventStandConnected events.""" + + def stand_connected_notifications(notification: WebSocketEventStandConnected): + """StandConnected notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_stand_connected_notifications(stand_connected_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_stand_connected_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_stand_connected_notifications(): + """React on WebSocketEventStandConnected events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventStandConnected": + print(notification["eventData"]) + + asyncio.run(receive_stand_connected_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/StandConnected' @@ -3855,31 +5156,75 @@ components: type: string type: object WebSocketEventStandPosition: - description: "Usage examples:\n\n\n\nUse the `get_stand_position_notifications()` method in the\ - \ Python package to get notifications of this type.\n\n\n\n```python\nimport\ - \ asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\n\ - async def receive_stand_position_notifications():\n \"\"\"React\ - \ on WebSocketEventStandPosition events.\"\"\"\n\n def stand_position_notifications(notification:\ - \ object):\n \"\"\"StandPosition notification handler.\"\"\"\ - \n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_stand_position_notifications(stand_position_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_stand_position_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_stand_position_notifications():\n\ - \ \"\"\"React on WebSocketEventStandPosition events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventStandPosition\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_stand_position_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_stand_position_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_stand_position_notifications(): + """React on WebSocketEventStandPosition events.""" + + def stand_position_notifications(notification: WebSocketEventStandPosition): + """StandPosition notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_stand_position_notifications(stand_position_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_stand_position_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_stand_position_notifications(): + """React on WebSocketEventStandPosition events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventStandPosition": + print(notification["eventData"]) + + asyncio.run(receive_stand_position_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/StandPosition' @@ -3887,31 +5232,75 @@ components: type: string type: object WebSocketEventTvInfo: - description: "Usage examples:\n\n\n\nUse the `get_tv_info_notifications()` method in the Python\ - \ package to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.mozart_client import MozartClient\n\nasync def receive_tv_info_notifications():\n\ - \ \"\"\"React on WebSocketEventTvInfo events.\"\"\"\n\n def\ - \ tv_info_notifications(notification: object):\n \"\"\"TvInfo\ - \ notification handler.\"\"\"\n print(notification)\n\n \ - \ async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_tv_info_notifications(tv_info_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_tv_info_notifications())\n```\n\ - \n\n\nUse the AIOHTTP library\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\n\ - from aiohttp import ClientSession\n\n\nasync def receive_tv_info_notifications():\n\ - \ \"\"\"React on WebSocketEventTvInfo events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventTvInfo\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_tv_info_notifications())\n\ - ```\n\n" + description: | + Usage examples: + + + + Use the `get_tv_info_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_tv_info_notifications(): + """React on WebSocketEventTvInfo events.""" + + def tv_info_notifications(notification: WebSocketEventTvInfo): + """TvInfo notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_tv_info_notifications(tv_info_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_tv_info_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_tv_info_notifications(): + """React on WebSocketEventTvInfo events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventTvInfo": + print(notification["eventData"]) + + asyncio.run(receive_tv_info_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/TvInfoEventData' @@ -3919,31 +5308,75 @@ components: type: string type: object WebSocketEventVolume: - description: "Usage examples:\n\n\n\nUse the `get_volume_notifications()` method in the Python package\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\nasync def receive_volume_notifications():\n\ - \ \"\"\"React on WebSocketEventVolume events.\"\"\"\n\n def\ - \ volume_notifications(notification: object):\n \"\"\"Volume\ - \ notification handler.\"\"\"\n print(notification)\n\n \ - \ async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ - \ mozart_client.get_volume_notifications(volume_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_volume_notifications())\n```\n\ - \n\n\nUse the AIOHTTP library\ - \ to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\n\ - from aiohttp import ClientSession\n\n\nasync def receive_volume_notifications():\n\ - \ \"\"\"React on WebSocketEventVolume events.\"\"\"\n async\ - \ with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventVolume\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_volume_notifications())\n```\n\ - \n" + description: | + Usage examples: + + + + Use the `get_volume_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_volume_notifications(): + """React on WebSocketEventVolume events.""" + + def volume_notifications(notification: WebSocketEventVolume): + """Volume notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_volume_notifications(volume_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_volume_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_volume_notifications(): + """React on WebSocketEventVolume events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventVolume": + print(notification["eventData"]) + + asyncio.run(receive_volume_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/VolumeState' @@ -3951,31 +5384,76 @@ components: type: string type: object WebSocketEventWisaOutState: - description: "Speaker Discovery State changed\nUsage examples:\n\n\n\nUse the `get_wisa_out_state_notifications()`\ - \ method in the Python package to get notifications of this type.\n\ - \n\n\n```python\n\ - import asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \nasync def receive_wisa_out_state_notifications():\n \"\"\"React\ - \ on WebSocketEventWisaOutState events.\"\"\"\n\n def wisa_out_state_notifications(notification:\ - \ object):\n \"\"\"WisaOutState notification handler.\"\"\"\ - \n print(notification)\n\n async with MozartClient(host=\"\ - 192.168.0.1\") as mozart_client:\n mozart_client.get_wisa_out_state_notifications(wisa_out_state_notifications)\n\ - \ await mozart_client.connect_notifications()\n\n #\ - \ Receive notifications\n while True:\n await asyncio.sleep(0)\n\ - \n \nasyncio.run(receive_wisa_out_state_notifications())\n\ - ```\n\n\n\nUse the AIOHTTP\ - \ library to get notifications of this type.\n\n\n\n```python\nimport asyncio\n\ - \nfrom aiohttp import ClientSession\n\n\nasync def receive_wisa_out_state_notifications():\n\ - \ \"\"\"React on WebSocketEventWisaOutState events.\"\"\"\n \ - \ async with ClientSession() as session:\n async with session.ws_connect(url=\"\ - ws://192.168.0.1:9339/\") as websocket:\n async for notification\ - \ in websocket:\n notification = notification.json()\n\ - \n if notification[\"eventType\"] == \"WebSocketEventWisaOutState\"\ - :\n print(notification[\"eventData\"])\n\n \ - \ \nasyncio.run(receive_wisa_out_state_notifications())\n\ - ```\n\n" + description: | + Speaker Discovery State changed + Usage examples: + + + + Use the `get_wisa_out_state_notifications()` method in the Python package to get notifications of this type. + + + + ```python + import asyncio + + from mozart_api.mozart_client import MozartClient + + async def receive_wisa_out_state_notifications(): + """React on WebSocketEventWisaOutState events.""" + + def wisa_out_state_notifications(notification: WebSocketEventWisaOutState): + """WisaOutState notification handler.""" + print(notification) + + async with MozartClient(host="192.168.0.1") as mozart_client: + mozart_client.get_wisa_out_state_notifications(wisa_out_state_notifications) + await mozart_client.connect_notifications() + + # Receive notifications + while True: + await asyncio.sleep(0) + + asyncio.run(receive_wisa_out_state_notifications()) + ``` + + + + Use the AIOHTTP library to get notifications of this type. + + + + ```python + import asyncio + + from aiohttp import ClientSession + + + async def receive_wisa_out_state_notifications(): + """React on WebSocketEventWisaOutState events.""" + async with ( + ClientSession() as session, + session.ws_connect(url="ws://192.168.0.1:9339/") as websocket, + ): + async for notification in websocket: + notification = notification.json() + + if notification["eventType"] == "WebSocketEventWisaOutState": + print(notification["eventData"]) + + asyncio.run(receive_wisa_out_state_notifications()) + ``` + properties: eventData: $ref: '#/components/schemas/WisaOutState' @@ -4030,7 +5508,7 @@ info: The Mozart API is an async REST API with WebSocket notification channel for\ \ immediate state information from Mozart devices. Currently the API is distributed\ \ as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI\ - \ document that can be found in the [Github releases](https://github.com/bang-olufsen/mozart-open-api/releases).\n\ + \ document that can be found in the [Github repository](https://github.com/bang-olufsen/mozart-open-api/blob/main/mozart-api-4.1.1.116.yaml).\n\ \n\nSupported by:\n- [Beoconnect Core](https://www.bang-olufsen.com/en/dk/accessories/beoconnect-core)\n\ - [Beolab 8](https://www.bang-olufsen.com/en/dk/speakers/beolab-8)\n- [Beolab\ \ 28](https://www.bang-olufsen.com/en/dk/speakers/beolab-28)\n- [Beosound\ @@ -4042,9 +5520,9 @@ info: - [Beosound Level](https://www.bang-olufsen.com/en/dk/speakers/beosound-level)\n\ - [Beosound Theatre](https://www.bang-olufsen.com/en/dk/soundbars/beosound-theatre)\n\ \n\nThis API documentation has been generated for version 4.1.1.116 of the\ - \ Mozart platform and API generation version 4.1.1.116.0.\n\n## Python API\n\ + \ Mozart platform and API generation version 4.1.1.116.1.\n\n## Python API\n\ \nThe Python package has been generated using the [OpenAPI Generator](https:/openapi-generator.tech/)\ - \ version 7.8.0. On top of the generated API, a helper file, mozart_client.py,\ + \ version 7.10.0. On top of the generated API, a helper file, mozart_client.py,\ \ has been made that makes the API more pythonic. We recommend using this.\n\ \nAnother file, mozart_cli.py, has been made for using the Mozart API in a\ \ simple CLI program. This has been set as the \"entry point\" for the Python\ @@ -4056,36 +5534,38 @@ info: \ channel (if needed)\n- Use any of the endpoints\n\n#### Example\n\n\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.models\ - \ import VolumeLevel\nfrom mozart_api.mozart_client import MozartClient\n\n\ - \ndef all_notifications(notification: object, notification_type: str):\n \ - \ \"\"\"Notification handler.\"\"\"\n print(f\"{notification_type} :\ - \ {notification}\")\n\n\nasync def volume_notifications(notification: object):\n\ - \ \"\"\"Volume notification handler.\"\"\"\n print(notification)\n\n\ - \nasync def test_api():\n \"\"\"Test Mozart API.\"\"\"\n mozart_client\ - \ = MozartClient(host=\"192.168.0.1\")\n\n mozart_client.get_all_notifications(all_notifications)\n\ - \ mozart_client.get_volume_notifications(volume_notifications)\n\n await\ - \ mozart_client.connect_notifications(remote_control=True)\n\n await mozart_client.set_current_volume_level(volume_level=VolumeLevel(level=50))\n\ + \ import VolumeLevel, VolumeState\nfrom mozart_api.mozart_client import MozartClient,\ + \ WebSocketEventType\n\n\ndef all_notifications(notification: WebSocketEventType,\ + \ notification_type: str) -> None:\n \"\"\"Notification handler.\"\"\"\n\ + \ print(f\"{notification_type} : {notification}\")\n\n\nasync def volume_notifications(notification:\ + \ VolumeState) -> None:\n \"\"\"Volume notification handler.\"\"\"\n \ + \ print(notification)\n\n\nasync def test_api() -> None:\n \"\"\"Test\ + \ Mozart API.\"\"\"\n\n mozart_client = MozartClient(host=\"192.168.0.1\"\ + )\n\n mozart_client.get_all_notifications(all_notifications)\n mozart_client.get_volume_notifications(volume_notifications)\n\ + \n await mozart_client.connect_notifications(remote_control=True)\n\n \ + \ await mozart_client.set_current_volume_level(volume_level=VolumeLevel(level=50))\n\ \ await mozart_client.activate_preset(id=2)\n await mozart_client.post_beolink_expand(\n\ - \ jid=\"1234.1234567.12345678@products.bang-olufsen.com\"\n )\n\n\ - \ listeners = await mozart_client.get_beolink_listeners()\n print(listeners)\n\ + \ jid=\"1234.1234567.12345678@products.bang-olufsen.com\",\n )\n\ + \n listeners = await mozart_client.get_beolink_listeners()\n print(listeners)\n\ \n # Close aiohttp ClientSession\n await mozart_client.close_api_client()\n\ \n # Receive notifications\n while True:\n await asyncio.sleep(0)\n\ \n\nasyncio.run(test_api())\n```\n\n\n\n\n\n```python\nimport asyncio\n\ - \nfrom mozart_api.models import VolumeLevel\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\n\ndef all_notifications(notification: object, notification_type:\ - \ str):\n \"\"\"Notification handler.\"\"\"\n print(f\"{notification_type}\ - \ : {notification}\")\n\n\nasync def volume_notifications(notification: object):\n\ - \ \"\"\"Volume notification handler.\"\"\"\n print(notification)\n\n\ - \nasync def test_api():\n \"\"\"Test Mozart API.\"\"\"\n\n async with\ - \ MozartClient(host=\"192.168.0.1\") as mozart_client:\n mozart_client.get_all_notifications(all_notifications)\n\ + \nfrom mozart_api.models import VolumeLevel, VolumeState\nfrom mozart_api.mozart_client\ + \ import MozartClient, WebSocketEventType\n\n\ndef all_notifications(notification:\ + \ WebSocketEventType, notification_type: str) -> None:\n \"\"\"Notification\ + \ handler.\"\"\"\n print(f\"{notification_type} : {notification}\")\n\n\ + \nasync def volume_notifications(notification: VolumeState) -> None:\n \ + \ \"\"\"Volume notification handler.\"\"\"\n print(notification)\n\n\n\ + async def test_api() -> None:\n \"\"\"Test Mozart API.\"\"\"\n\n async\ + \ with MozartClient(host=\"192.168.0.1\") as mozart_client:\n mozart_client.get_all_notifications(all_notifications)\n\ \ mozart_client.get_volume_notifications(volume_notifications)\n\n\ \ await mozart_client.connect_notifications(remote_control=True)\n\n\ \ await mozart_client.set_current_volume_level(volume_level=VolumeLevel(level=50))\n\ \ await mozart_client.activate_preset(id=2)\n await mozart_client.post_beolink_expand(\n\ - \ jid=\"1234.1234567.12345678@products.bang-olufsen.com\"\n \ - \ )\n\n listeners = await mozart_client.get_beolink_listeners()\n\ + \ jid=\"1234.1234567.12345678@products.bang-olufsen.com\",\n \ + \ )\n\n listeners = await mozart_client.get_beolink_listeners()\n\ \ print(listeners)\n\n # Receive notifications\n while True:\n\ \ await asyncio.sleep(0)\n\n\nasyncio.run(test_api())\n```\n\n\n\nWhere `192.168.0.1` is a Mozart device's IP-address.\n\ @@ -4107,34 +5587,35 @@ info: \ lost\n-->\n\nThe `get_on_connection_lost` method will set a callback when\ \ the WebSocket listener loses connection.\n\n\n\n```python\nimport asyncio\n\n\ - from mozart_api.mozart_client import MozartClient\n\n\nasync def test_api():\n\ - \ \"\"\"Test Mozart API.\"\"\"\n\n def on_connection_lost():\n \ - \ \"\"\"Notification handler.\"\"\"\n print(\"Connection lost\")\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n \ - \ mozart_client.get_on_connection_lost(on_connection_lost)\n await\ - \ mozart_client.connect_notifications()\n\n # Receive notifications\n\ + from mozart_api.mozart_client import MozartClient\n\n\nasync def test_api()\ + \ -> None:\n \"\"\"Test Mozart API.\"\"\"\n\n def on_connection_lost()\ + \ -> None:\n \"\"\"Notification handler.\"\"\"\n print(\"Connection\ + \ lost\")\n\n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n\ + \ mozart_client.get_on_connection_lost(on_connection_lost)\n \ + \ await mozart_client.connect_notifications()\n\n # Receive notifications\n\ \ while True:\n await asyncio.sleep(0)\n\n\nasyncio.run(test_api())\n\ ```\n\n\n\nThe `get_on_connection`\ \ method will set a callback when the WebSocket listener successfully establishes\ \ a connection.\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client import MozartClient\n\ - \n\nasync def test_api():\n \"\"\"Test Mozart API.\"\"\"\n\n def on_connection():\n\ - \ \"\"\"Notification handler.\"\"\"\n print(\"Connected\")\n\ - \n async with MozartClient(host=\"192.168.0.1\") as mozart_client:\n \ - \ mozart_client.get_on_connection(on_connection)\n await mozart_client.connect_notifications()\n\ - \n # Receive notifications\n while True:\n await\ - \ asyncio.sleep(0)\n\n\nasyncio.run(test_api())\n```\n\n\n\nThe `get_all_notifications` method will set\ - \ a callback on all WebSocket notifications received.\n\nThe notification_type\ - \ will return the name of the event with the `WebSocketEvent` prefix removed\ - \ and the rest converted to snake_case: `WebSocketEventAlarmTriggered` \u279E\ - \ `alarm_triggered`\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\n\nasync def test_api():\n \"\"\"Test Mozart API.\"\ - \"\"\n\n def all_notifications(notification: object, notification_type:\ - \ str):\n \"\"\"Notification handler.\"\"\"\n print(f\"{notification_type}\ - \ : {notification}\")\n\n async with MozartClient(host=\"192.168.0.1\"\ - ) as mozart_client:\n mozart_client.get_all_notifications(all_notifications)\n\ + \n\nasync def test_api() -> None:\n \"\"\"Test Mozart API.\"\"\"\n\n \ + \ def on_connection() -> None:\n \"\"\"Notification handler.\"\"\"\ + \n print(\"Connected\")\n\n async with MozartClient(host=\"192.168.0.1\"\ + ) as mozart_client:\n mozart_client.get_on_connection(on_connection)\n\ + \ await mozart_client.connect_notifications()\n\n # Receive\ + \ notifications\n while True:\n await asyncio.sleep(0)\n\ + \n\nasyncio.run(test_api())\n```\n\n\n\nThe `get_all_notifications` method will set a callback on all WebSocket\ + \ notifications received.\n\nThe notification_type will return the name of\ + \ the event with the `WebSocketEvent` prefix removed and the rest converted\ + \ to snake_case: `WebSocketEventAlarmTriggered` \u279E `alarm_triggered`\n\ + \n\n\n```python\n\ + import asyncio\n\nfrom mozart_api.mozart_client import MozartClient, WebSocketEventType\n\ + \n\nasync def test_api() -> None:\n \"\"\"Test Mozart API.\"\"\"\n\n \ + \ def all_notifications(notification: WebSocketEventType, notification_type:\ + \ str) -> None:\n \"\"\"Notification handler.\"\"\"\n print(f\"\ + {notification_type} : {notification}\")\n\n async with MozartClient(host=\"\ + 192.168.0.1\") as mozart_client:\n mozart_client.get_all_notifications(all_notifications)\n\ \ await mozart_client.connect_notifications()\n\n # Receive\ \ notifications\n while True:\n await asyncio.sleep(0)\n\ \n\nasyncio.run(test_api())\n```\n\n\n\n```python\nimport asyncio\n\nfrom mozart_api.mozart_client\ - \ import MozartClient\n\n\nasync def test_api():\n \"\"\"Test Mozart API.\"\ - \"\"\n\n def all_notifications_raw(notification: dict):\n \"\"\"\ - Notification handler.\"\"\"\n print(notification)\n\n async with\ - \ MozartClient(host=\"192.168.0.1\") as mozart_client:\n mozart_client.get_all_notifications_raw(all_notifications_raw)\n\ + \ import BaseWebSocketResponse, MozartClient\n\n\nasync def test_api() ->\ + \ None:\n \"\"\"Test Mozart API.\"\"\"\n\n def all_notifications_raw(notification:\ + \ BaseWebSocketResponse) -> None:\n \"\"\"Notification handler.\"\"\ + \"\n print(notification)\n\n async with MozartClient(host=\"192.168.0.1\"\ + ) as mozart_client:\n mozart_client.get_all_notifications_raw(all_notifications_raw)\n\ \ await mozart_client.connect_notifications()\n\n # Receive\ \ notifications\n while True:\n await asyncio.sleep(0)\n\ \n\nasyncio.run(test_api())\n```\n\n\n\n#### Discovering\ diff --git a/python_client/PKG-INFO b/python_client/PKG-INFO index 93ae9b7..f2fee6c 100644 --- a/python_client/PKG-INFO +++ b/python_client/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: mozart_api -Version: 4.1.1.116.0 +Version: 4.1.1.116.1 Summary: Mozart platform API Home-page: https://pypi.org/project/mozart-api/ License: MIT @@ -14,17 +14,17 @@ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Topic :: Multimedia Requires-Dist: aenum (>=3.1.11) Requires-Dist: aioconsole (>=0.4.1) -Requires-Dist: aiohttp (>=3.8.3) +Requires-Dist: aiohttp (>=3.8.3,<4) Requires-Dist: inflection (>=0.5.1) Requires-Dist: pydantic (>=1.10) Requires-Dist: python-dateutil (>=2.8.2) Requires-Dist: typing-extensions (>=4.7.1) Requires-Dist: urllib3 (>=1.25.3) -Requires-Dist: websockets (>=12.0) Requires-Dist: zeroconf (>=0.25.1) Project-URL: Bug Tracker, https://github.com/bang-olufsen/mozart-open-api/issues Project-URL: Documentation, https://bang-olufsen.github.io/mozart-open-api/ @@ -40,7 +40,7 @@ Description-Content-Type: text/markdown [![Balance stereo](https://raw.githubusercontent.com/bang-olufsen/mozart-open-api/main/docs/media/balance_stereo.png)](https://www.bang-olufsen.com/en/dk/speakers/beosound-balance-stereo-set?variant=beosound-balance-gva-naturaloak-bundle) -The Mozart API is an async REST API with WebSocket notification channel for immediate state information from Mozart devices. Currently the API is distributed as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI document that can be found in the [Github releases](https://github.com/bang-olufsen/mozart-open-api/releases). +The Mozart API is an async REST API with WebSocket notification channel for immediate state information from Mozart devices. Currently the API is distributed as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI document that can be found in the [Github repository](https://github.com/bang-olufsen/mozart-open-api/blob/main/mozart-api-4.1.1.116.yaml). Supported by: - [Beoconnect Core](https://www.bang-olufsen.com/en/dk/accessories/beoconnect-core) diff --git a/python_client/README.md b/python_client/README.md index 6862bd4..6cb0c65 100644 --- a/python_client/README.md +++ b/python_client/README.md @@ -7,7 +7,7 @@ [![Balance stereo](https://raw.githubusercontent.com/bang-olufsen/mozart-open-api/main/docs/media/balance_stereo.png)](https://www.bang-olufsen.com/en/dk/speakers/beosound-balance-stereo-set?variant=beosound-balance-gva-naturaloak-bundle) -The Mozart API is an async REST API with WebSocket notification channel for immediate state information from Mozart devices. Currently the API is distributed as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI document that can be found in the [Github releases](https://github.com/bang-olufsen/mozart-open-api/releases). +The Mozart API is an async REST API with WebSocket notification channel for immediate state information from Mozart devices. Currently the API is distributed as a [Python package](https://pypi.org/project/mozart-api) and as an OpenAPI document that can be found in the [Github repository](https://github.com/bang-olufsen/mozart-open-api/blob/main/mozart-api-4.1.1.116.yaml). Supported by: - [Beoconnect Core](https://www.bang-olufsen.com/en/dk/accessories/beoconnect-core) diff --git a/python_client/mozart_api/__init__.py b/python_client/mozart_api/__init__.py index 49084cf..69a7d62 100644 --- a/python_client/mozart_api/__init__.py +++ b/python_client/mozart_api/__init__.py @@ -3,19 +3,25 @@ # flake8: noqa """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 +__version__ = "4.1.1.116.1" -__version__ = "4.1.1.116.0" +# import manually created api client +from mozart_api.mozart_client import ( + BaseWebSocketResponse, + MozartClient, + WebSocketEventType, +) # import apis into sdk package from mozart_api.api.beolink_api import BeolinkApi diff --git a/python_client/mozart_api/api/beolink_api.py b/python_client/mozart_api/api/beolink_api.py index 586c48f..60166ac 100644 --- a/python_client/mozart_api/api/beolink_api.py +++ b/python_client/mozart_api/api/beolink_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,6 +33,9 @@ from typing import List, Optional +from mozart_api.api_client import ApiClient +from mozart_api.api_response import ApiResponse +from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 from mozart_api.models.beolink_available_listener import BeolinkAvailableListener from mozart_api.models.beolink_join_request import BeolinkJoinRequest from mozart_api.models.beolink_join_result import BeolinkJoinResult @@ -42,10 +43,6 @@ from mozart_api.models.beolink_peer import BeolinkPeer from mozart_api.models.beolink_self import BeolinkSelf -from mozart_api.api_client import ApiClient -from mozart_api.api_response import ApiResponse -from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 - class BeolinkApi: """NOTE: This class is auto generated by OpenAPI Generator @@ -80,9 +77,7 @@ async def get_beolink_available_listeners( if "_preload_content" in kwargs: message = "Error! Please call the get_beolink_available_listeners_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_beolink_available_listeners_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_beolink_available_listeners_with_http_info(**kwargs) # noqa: E501 @validate_arguments async def get_beolink_available_listeners_with_http_info( @@ -188,7 +183,7 @@ async def get_beolink_available_listeners_with_http_info( async def get_beolink_join_result( self, id: Annotated[StrictStr, Field(..., description="Join request ID")], - **kwargs + **kwargs, ) -> BeolinkJoinResult: # noqa: E501 """Get Beolink join result, test-endpoint # noqa: E501 @@ -209,15 +204,13 @@ async def get_beolink_join_result( if "_preload_content" in kwargs: message = "Error! Please call the get_beolink_join_result_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_beolink_join_result_with_http_info( - id, **kwargs - ) # noqa: E501 + return await self.get_beolink_join_result_with_http_info(id, **kwargs) # noqa: E501 @validate_arguments async def get_beolink_join_result_with_http_info( self, id: Annotated[StrictStr, Field(..., description="Join request ID")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get Beolink join result, test-endpoint # noqa: E501 @@ -320,9 +313,7 @@ async def get_beolink_join_result_with_http_info( ) @validate_arguments - async def get_beolink_listeners( - self, **kwargs - ) -> List[BeolinkListener]: # noqa: E501 + async def get_beolink_listeners(self, **kwargs) -> List[BeolinkListener]: # noqa: E501 """Get joined peers # noqa: E501 Get a list of devices that are listening to this device active experience (that have joined). # noqa: E501 @@ -343,9 +334,7 @@ async def get_beolink_listeners( return await self.get_beolink_listeners_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beolink_listeners_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beolink_listeners_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get joined peers # noqa: E501 Get a list of devices that are listening to this device active experience (that have joined). # noqa: E501 @@ -464,9 +453,7 @@ async def get_beolink_peers(self, **kwargs) -> List[BeolinkPeer]: # noqa: E501 return await self.get_beolink_peers_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beolink_peers_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beolink_peers_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get discovered peers # noqa: E501 Get information about the Beolink peers discovered by this device. # noqa: E501 @@ -585,9 +572,7 @@ async def get_beolink_self(self, **kwargs) -> BeolinkSelf: # noqa: E501 return await self.get_beolink_self_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beolink_self_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beolink_self_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get information about this device # noqa: E501 Returns Beolink information like about this device. This can be useful if you want to expand _to_ this device. # noqa: E501 @@ -691,7 +676,7 @@ async def join_beolink_peer( Optional[StrictStr], Field(description="Ask to join a specific source on peer"), ] = None, - **kwargs + **kwargs, ) -> BeolinkJoinRequest: # noqa: E501 """Join multi-room experience # noqa: E501 @@ -714,9 +699,7 @@ async def join_beolink_peer( if "_preload_content" in kwargs: message = "Error! Please call the join_beolink_peer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.join_beolink_peer_with_http_info( - jid, source, **kwargs - ) # noqa: E501 + return await self.join_beolink_peer_with_http_info(jid, source, **kwargs) # noqa: E501 @validate_arguments async def join_beolink_peer_with_http_info( @@ -726,7 +709,7 @@ async def join_beolink_peer_with_http_info( Optional[StrictStr], Field(description="Ask to join a specific source on peer"), ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Join multi-room experience # noqa: E501 @@ -835,9 +818,7 @@ async def join_beolink_peer_with_http_info( ) @validate_arguments - async def join_latest_beolink_experience( - self, **kwargs - ) -> BeolinkJoinRequest: # noqa: E501 + async def join_latest_beolink_experience(self, **kwargs) -> BeolinkJoinRequest: # noqa: E501 """Trigger touch to join # noqa: E501 @@ -854,9 +835,7 @@ async def join_latest_beolink_experience( if "_preload_content" in kwargs: message = "Error! Please call the join_latest_beolink_experience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.join_latest_beolink_experience_with_http_info( - **kwargs - ) # noqa: E501 + return await self.join_latest_beolink_experience_with_http_info(**kwargs) # noqa: E501 @validate_arguments async def join_latest_beolink_experience_with_http_info( @@ -979,9 +958,7 @@ async def post_beolink_allstandby(self, **kwargs) -> None: # noqa: E501 return await self.post_beolink_allstandby_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def post_beolink_allstandby_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def post_beolink_allstandby_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Broadcast an all standby event to turn all Beolink devices off # noqa: E501 @@ -1083,7 +1060,7 @@ async def post_beolink_expand( ..., description="Jabber id of peer to expand the active experience to" ), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Expand the current active experience # noqa: E501 @@ -1104,9 +1081,7 @@ async def post_beolink_expand( if "_preload_content" in kwargs: message = "Error! Please call the post_beolink_expand_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_beolink_expand_with_http_info( - jid, **kwargs - ) # noqa: E501 + return await self.post_beolink_expand_with_http_info(jid, **kwargs) # noqa: E501 @validate_arguments async def post_beolink_expand_with_http_info( @@ -1117,7 +1092,7 @@ async def post_beolink_expand_with_http_info( ..., description="Jabber id of peer to expand the active experience to" ), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Expand the current active experience # noqa: E501 @@ -1237,9 +1212,7 @@ async def post_beolink_leave(self, **kwargs) -> None: # noqa: E501 return await self.post_beolink_leave_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def post_beolink_leave_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def post_beolink_leave_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Leave the ongoing experience (disconnect this device from remote) # noqa: E501 @@ -1338,7 +1311,7 @@ async def post_beolink_unexpand( jid: Annotated[ StrictStr, Field(..., description="Jabber id of peer to unexpand") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Unexpand (disconnect) a device from the multiroom session # noqa: E501 @@ -1359,9 +1332,7 @@ async def post_beolink_unexpand( if "_preload_content" in kwargs: message = "Error! Please call the post_beolink_unexpand_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_beolink_unexpand_with_http_info( - jid, **kwargs - ) # noqa: E501 + return await self.post_beolink_unexpand_with_http_info(jid, **kwargs) # noqa: E501 @validate_arguments async def post_beolink_unexpand_with_http_info( @@ -1369,7 +1340,7 @@ async def post_beolink_unexpand_with_http_info( jid: Annotated[ StrictStr, Field(..., description="Jabber id of peer to unexpand") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Unexpand (disconnect) a device from the multiroom session # noqa: E501 diff --git a/python_client/mozart_api/api/bluetooth_api.py b/python_client/mozart_api/api/bluetooth_api.py index 00d0074..aa229d0 100644 --- a/python_client/mozart_api/api/bluetooth_api.py +++ b/python_client/mozart_api/api/bluetooth_api.py @@ -1,35 +1,32 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable - -from mozart_api.models.bluetooth_device_list import BluetoothDeviceList +from typing import Awaitable, Optional, Union, overload from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.bluetooth_device_list import BluetoothDeviceList class BluetoothApi: @@ -45,9 +42,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client @validate_arguments - async def get_bluetooth_devices_status( - self, **kwargs - ) -> BluetoothDeviceList: # noqa: E501 + async def get_bluetooth_devices_status(self, **kwargs) -> BluetoothDeviceList: # noqa: E501 """Get the bluetooth devices status # noqa: E501 @@ -64,9 +59,7 @@ async def get_bluetooth_devices_status( if "_preload_content" in kwargs: message = "Error! Please call the get_bluetooth_devices_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_bluetooth_devices_status_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_bluetooth_devices_status_with_http_info(**kwargs) # noqa: E501 @validate_arguments async def get_bluetooth_devices_status_with_http_info( diff --git a/python_client/mozart_api/api/content_api.py b/python_client/mozart_api/api/content_api.py index 05c07e6..7a59404 100644 --- a/python_client/mozart_api/api/content_api.py +++ b/python_client/mozart_api/api/content_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,12 +33,11 @@ from typing import Dict, Optional -from mozart_api.models.content_item import ContentItem -from mozart_api.models.content_item_with_id import ContentItemWithId - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.content_item import ContentItem +from mozart_api.models.content_item_with_id import ContentItemWithId class ContentApi: @@ -76,9 +73,7 @@ async def get_active_content(self, **kwargs) -> ContentItemWithId: # noqa: E501 return await self.get_active_content_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_active_content_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_active_content_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get currently active content # noqa: E501 @@ -183,7 +178,7 @@ async def get_content( description='Filter result that start with x. It could be input source "tv", "netradio" or content "tv://TV", "tv://netflix"' ), ] = None, - **kwargs + **kwargs, ) -> Dict[str, ContentItem]: # noqa: E501 """Get a list of available content # noqa: E501 @@ -214,7 +209,7 @@ async def get_content_with_http_info( description='Filter result that start with x. It could be input source "tv", "netradio" or content "tv://TV", "tv://netflix"' ), ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get a list of available content # noqa: E501 diff --git a/python_client/mozart_api/api/deezer_api.py b/python_client/mozart_api/api/deezer_api.py index bebf561..7a0dc6b 100644 --- a/python_client/mozart_api/api/deezer_api.py +++ b/python_client/mozart_api/api/deezer_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,11 +33,10 @@ from typing import Optional -from mozart_api.models.user_flow import UserFlow - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.user_flow import UserFlow class DeezerApi: @@ -60,7 +57,7 @@ async def start_deezer_flow( user_flow: Annotated[ Optional[UserFlow], Field(description="Select user") ] = None, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Play users flow. If no provided user id it will play the flow connected to the active account # noqa: E501 @@ -80,9 +77,7 @@ async def start_deezer_flow( if "_preload_content" in kwargs: message = "Error! Please call the start_deezer_flow_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.start_deezer_flow_with_http_info( - user_flow, **kwargs - ) # noqa: E501 + return await self.start_deezer_flow_with_http_info(user_flow, **kwargs) # noqa: E501 @validate_arguments async def start_deezer_flow_with_http_info( @@ -90,7 +85,7 @@ async def start_deezer_flow_with_http_info( user_flow: Annotated[ Optional[UserFlow], Field(description="Select user") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Play users flow. If no provided user id it will play the flow connected to the active account # noqa: E501 diff --git a/python_client/mozart_api/api/mozart_api.py b/python_client/mozart_api/api/mozart_api.py index 255adda..231c789 100644 --- a/python_client/mozart_api/api/mozart_api.py +++ b/python_client/mozart_api/api/mozart_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,6 +33,9 @@ from typing import Any, Dict, List, Optional +from mozart_api.api_client import ApiClient +from mozart_api.api_response import ApiResponse +from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 from mozart_api.models.bass import Bass from mozart_api.models.battery_state import BatteryState from mozart_api.models.beo_shape_status import BeoShapeStatus @@ -80,10 +81,6 @@ from mozart_api.models.volume_settings import VolumeSettings from mozart_api.models.volume_state import VolumeState -from mozart_api.api_client import ApiClient -from mozart_api.api_response import ApiResponse -from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 - class MozartApi: """NOTE: This class is auto generated by OpenAPI Generator @@ -119,9 +116,7 @@ async def activate_listening_mode( if "_preload_content" in kwargs: message = "Error! Please call the activate_listening_mode_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.activate_listening_mode_with_http_info( - id, **kwargs - ) # noqa: E501 + return await self.activate_listening_mode_with_http_info(id, **kwargs) # noqa: E501 @validate_arguments async def activate_listening_mode_with_http_info( @@ -225,7 +220,7 @@ async def activate_preset( StrictInt, Field(..., description="the id of the preset you want to trigger"), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Trigger a preset # noqa: E501 @@ -254,7 +249,7 @@ async def activate_preset_with_http_info( StrictInt, Field(..., description="the id of the preset you want to trigger"), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Trigger a preset # noqa: E501 @@ -358,7 +353,7 @@ async def add_to_queue( play_queue_item: Annotated[ PlayQueueItem, Field(..., description="the queue element you want to add") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Add an element to the queue # noqa: E501 @@ -378,9 +373,7 @@ async def add_to_queue( if "_preload_content" in kwargs: message = "Error! Please call the add_to_queue_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.add_to_queue_with_http_info( - play_queue_item, **kwargs - ) # noqa: E501 + return await self.add_to_queue_with_http_info(play_queue_item, **kwargs) # noqa: E501 @validate_arguments async def add_to_queue_with_http_info( @@ -388,7 +381,7 @@ async def add_to_queue_with_http_info( play_queue_item: Annotated[ PlayQueueItem, Field(..., description="the queue element you want to add") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Add an element to the queue # noqa: E501 @@ -516,9 +509,7 @@ async def get_active_content(self, **kwargs) -> ContentItemWithId: # noqa: E501 return await self.get_active_content_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_active_content_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_active_content_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get currently active content # noqa: E501 @@ -615,9 +606,7 @@ async def get_active_content_with_http_info( ) @validate_arguments - async def get_active_listening_mode( - self, **kwargs - ) -> ListeningModeRef: # noqa: E501 + async def get_active_listening_mode(self, **kwargs) -> ListeningModeRef: # noqa: E501 """Get the active listening mode # noqa: E501 @@ -634,14 +623,10 @@ async def get_active_listening_mode( if "_preload_content" in kwargs: message = "Error! Please call the get_active_listening_mode_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_active_listening_mode_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_active_listening_mode_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_active_listening_mode_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_active_listening_mode_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the active listening mode # noqa: E501 @@ -757,9 +742,7 @@ async def get_all_scenes(self, **kwargs) -> Dict[str, Scene]: # noqa: E501 return await self.get_all_scenes_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_all_scenes_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_all_scenes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get a list of configured scenes # noqa: E501 @@ -860,7 +843,7 @@ async def get_available_sources( target_remote: Annotated[ Optional[StrictBool], Field(description="filter sources for remote control") ] = None, - **kwargs + **kwargs, ) -> SourceArray: # noqa: E501 """Get all the available sources # noqa: E501 @@ -880,9 +863,7 @@ async def get_available_sources( if "_preload_content" in kwargs: message = "Error! Please call the get_available_sources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_available_sources_with_http_info( - target_remote, **kwargs - ) # noqa: E501 + return await self.get_available_sources_with_http_info(target_remote, **kwargs) # noqa: E501 @validate_arguments async def get_available_sources_with_http_info( @@ -890,7 +871,7 @@ async def get_available_sources_with_http_info( target_remote: Annotated[ Optional[StrictBool], Field(description="filter sources for remote control") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get all the available sources # noqa: E501 @@ -1013,9 +994,7 @@ async def get_battery_state(self, **kwargs) -> BatteryState: # noqa: E501 return await self.get_battery_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_battery_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_battery_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get battery state of the product # noqa: E501 @@ -1131,9 +1110,7 @@ async def get_beolink_available_listeners( if "_preload_content" in kwargs: message = "Error! Please call the get_beolink_available_listeners_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_beolink_available_listeners_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_beolink_available_listeners_with_http_info(**kwargs) # noqa: E501 @validate_arguments async def get_beolink_available_listeners_with_http_info( @@ -1239,7 +1216,7 @@ async def get_beolink_available_listeners_with_http_info( async def get_beolink_join_result( self, id: Annotated[StrictStr, Field(..., description="Join request ID")], - **kwargs + **kwargs, ) -> BeolinkJoinResult: # noqa: E501 """Get Beolink join result, test-endpoint # noqa: E501 @@ -1260,15 +1237,13 @@ async def get_beolink_join_result( if "_preload_content" in kwargs: message = "Error! Please call the get_beolink_join_result_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_beolink_join_result_with_http_info( - id, **kwargs - ) # noqa: E501 + return await self.get_beolink_join_result_with_http_info(id, **kwargs) # noqa: E501 @validate_arguments async def get_beolink_join_result_with_http_info( self, id: Annotated[StrictStr, Field(..., description="Join request ID")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get Beolink join result, test-endpoint # noqa: E501 @@ -1371,9 +1346,7 @@ async def get_beolink_join_result_with_http_info( ) @validate_arguments - async def get_beolink_listeners( - self, **kwargs - ) -> List[BeolinkListener]: # noqa: E501 + async def get_beolink_listeners(self, **kwargs) -> List[BeolinkListener]: # noqa: E501 """Get joined peers # noqa: E501 Get a list of devices that are listening to this device active experience (that have joined). # noqa: E501 @@ -1394,9 +1367,7 @@ async def get_beolink_listeners( return await self.get_beolink_listeners_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beolink_listeners_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beolink_listeners_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get joined peers # noqa: E501 Get a list of devices that are listening to this device active experience (that have joined). # noqa: E501 @@ -1515,9 +1486,7 @@ async def get_beolink_peers(self, **kwargs) -> List[BeolinkPeer]: # noqa: E501 return await self.get_beolink_peers_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beolink_peers_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beolink_peers_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get discovered peers # noqa: E501 Get information about the Beolink peers discovered by this device. # noqa: E501 @@ -1636,9 +1605,7 @@ async def get_beolink_self(self, **kwargs) -> BeolinkSelf: # noqa: E501 return await self.get_beolink_self_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beolink_self_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beolink_self_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get information about this device # noqa: E501 Returns Beolink information like about this device. This can be useful if you want to expand _to_ this device. # noqa: E501 @@ -1752,14 +1719,10 @@ async def get_beosound_shape_status(self, **kwargs) -> BeoShapeStatus: # noqa: if "_preload_content" in kwargs: message = "Error! Please call the get_beosound_shape_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_beosound_shape_status_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_beosound_shape_status_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beosound_shape_status_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beosound_shape_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get status # noqa: E501 @@ -1856,9 +1819,7 @@ async def get_beosound_shape_status_with_http_info( ) @validate_arguments - async def get_bluetooth_devices_status( - self, **kwargs - ) -> BluetoothDeviceList: # noqa: E501 + async def get_bluetooth_devices_status(self, **kwargs) -> BluetoothDeviceList: # noqa: E501 """Get the bluetooth devices status # noqa: E501 @@ -1875,9 +1836,7 @@ async def get_bluetooth_devices_status( if "_preload_content" in kwargs: message = "Error! Please call the get_bluetooth_devices_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_bluetooth_devices_status_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_bluetooth_devices_status_with_http_info(**kwargs) # noqa: E501 @validate_arguments async def get_bluetooth_devices_status_with_http_info( @@ -1979,9 +1938,7 @@ async def get_bluetooth_devices_status_with_http_info( ) @validate_arguments - async def get_bluetooth_remotes( - self, **kwargs - ) -> PairedRemoteResponse: # noqa: E501 + async def get_bluetooth_remotes(self, **kwargs) -> PairedRemoteResponse: # noqa: E501 """Get a list of paired bluetooth remotes # noqa: E501 @@ -2001,9 +1958,7 @@ async def get_bluetooth_remotes( return await self.get_bluetooth_remotes_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_bluetooth_remotes_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_bluetooth_remotes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get a list of paired bluetooth remotes # noqa: E501 @@ -2108,7 +2063,7 @@ async def get_content( description='Filter result that start with x. It could be input source "tv", "netradio" or content "tv://TV", "tv://netflix"' ), ] = None, - **kwargs + **kwargs, ) -> Dict[str, ContentItem]: # noqa: E501 """Get a list of available content # noqa: E501 @@ -2139,7 +2094,7 @@ async def get_content_with_http_info( description='Filter result that start with x. It could be input source "tv", "netradio" or content "tv://TV", "tv://netflix"' ), ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get a list of available content # noqa: E501 @@ -2261,9 +2216,7 @@ async def get_current_volume(self, **kwargs) -> VolumeState: # noqa: E501 return await self.get_current_volume_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_current_volume_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_current_volume_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current volume state # noqa: E501 @@ -2360,9 +2313,7 @@ async def get_current_volume_with_http_info( ) @validate_arguments - async def get_listening_mode_set( - self, **kwargs - ) -> List[ListeningMode]: # noqa: E501 + async def get_listening_mode_set(self, **kwargs) -> List[ListeningMode]: # noqa: E501 """Get available listening modes that match the current role (standalone, multichannel or both(all)). # noqa: E501 @@ -2382,9 +2333,7 @@ async def get_listening_mode_set( return await self.get_listening_mode_set_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_listening_mode_set_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_listening_mode_set_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get available listening modes that match the current role (standalone, multichannel or both(all)). # noqa: E501 @@ -2500,9 +2449,7 @@ async def get_playback_state(self, **kwargs) -> PlaybackState: # noqa: E501 return await self.get_playback_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_playback_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_playback_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current playback state # noqa: E501 @@ -2619,9 +2566,7 @@ async def get_power_state(self, **kwargs) -> PowerStateEnum: # noqa: E501 return await self.get_power_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_power_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_power_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get power state of the product # noqa: E501 @@ -2853,9 +2798,7 @@ async def get_product_state(self, **kwargs) -> ProductState: # noqa: E501 return await self.get_product_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_product_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_product_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the overall state from the product # noqa: E501 @@ -2952,9 +2895,7 @@ async def get_product_state_with_http_info( ) @validate_arguments - async def get_remote_home_control_uri( - self, **kwargs - ) -> HomeControlUri: # noqa: E501 + async def get_remote_home_control_uri(self, **kwargs) -> HomeControlUri: # noqa: E501 """Get HomeControl dashboard uri and (optional) Immersive Experience (IXP) start page # noqa: E501 @@ -2971,14 +2912,10 @@ async def get_remote_home_control_uri( if "_preload_content" in kwargs: message = "Error! Please call the get_remote_home_control_uri_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_remote_home_control_uri_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_remote_home_control_uri_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_remote_home_control_uri_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_remote_home_control_uri_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get HomeControl dashboard uri and (optional) Immersive Experience (IXP) start page # noqa: E501 @@ -3080,7 +3017,7 @@ async def get_remote_menu( descendants_to: Annotated[ Optional[StrictStr], Field(description="Get all descendants to this item") ] = None, - **kwargs + **kwargs, ) -> Dict[str, RemoteMenuItem]: # noqa: E501 """Get all remote menu items # noqa: E501 @@ -3100,9 +3037,7 @@ async def get_remote_menu( if "_preload_content" in kwargs: message = "Error! Please call the get_remote_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_remote_menu_with_http_info( - descendants_to, **kwargs - ) # noqa: E501 + return await self.get_remote_menu_with_http_info(descendants_to, **kwargs) # noqa: E501 @validate_arguments async def get_remote_menu_with_http_info( @@ -3110,7 +3045,7 @@ async def get_remote_menu_with_http_info( descendants_to: Annotated[ Optional[StrictStr], Field(description="Get all descendants to this item") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get all remote menu items # noqa: E501 @@ -3232,9 +3167,7 @@ async def get_settings_queue(self, **kwargs) -> PlayQueueSettings: # noqa: E501 return await self.get_settings_queue_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_settings_queue_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_settings_queue_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current queue settings # noqa: E501 @@ -3331,9 +3264,7 @@ async def get_settings_queue_with_http_info( ) @validate_arguments - async def get_softwareupdate_status( - self, **kwargs - ) -> SoftwareUpdateStatus: # noqa: E501 + async def get_softwareupdate_status(self, **kwargs) -> SoftwareUpdateStatus: # noqa: E501 """Get the current software update status # noqa: E501 @@ -3350,14 +3281,10 @@ async def get_softwareupdate_status( if "_preload_content" in kwargs: message = "Error! Please call the get_softwareupdate_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_softwareupdate_status_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_softwareupdate_status_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_softwareupdate_status_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_softwareupdate_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current software update status # noqa: E501 @@ -3454,9 +3381,7 @@ async def get_softwareupdate_status_with_http_info( ) @validate_arguments - async def get_sound_features( - self, **kwargs - ) -> Dict[str, SoundFeatureSet]: # noqa: E501 + async def get_sound_features(self, **kwargs) -> Dict[str, SoundFeatureSet]: # noqa: E501 """Get available sound features that match the current role (standalone or multichannel). # noqa: E501 @@ -3476,9 +3401,7 @@ async def get_sound_features( return await self.get_sound_features_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_sound_features_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_sound_features_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get available sound features that match the current role (standalone or multichannel). # noqa: E501 @@ -3574,9 +3497,7 @@ async def get_sound_features_with_http_info( ) @validate_arguments - async def get_speakergroup_active( - self, **kwargs - ) -> SpeakerGroupOverview: # noqa: E501 + async def get_speakergroup_active(self, **kwargs) -> SpeakerGroupOverview: # noqa: E501 """Get the active speaker group # noqa: E501 @@ -3596,9 +3517,7 @@ async def get_speakergroup_active( return await self.get_speakergroup_active_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_speakergroup_active_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_speakergroup_active_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the active speaker group # noqa: E501 @@ -3714,9 +3633,7 @@ async def get_volume_settings(self, **kwargs) -> VolumeSettings: # noqa: E501 return await self.get_volume_settings_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_volume_settings_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_volume_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current volume settings for default and maximum volume level # noqa: E501 @@ -3820,7 +3737,7 @@ async def join_beolink_peer( Optional[StrictStr], Field(description="Ask to join a specific source on peer"), ] = None, - **kwargs + **kwargs, ) -> BeolinkJoinRequest: # noqa: E501 """Join multi-room experience # noqa: E501 @@ -3843,9 +3760,7 @@ async def join_beolink_peer( if "_preload_content" in kwargs: message = "Error! Please call the join_beolink_peer_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.join_beolink_peer_with_http_info( - jid, source, **kwargs - ) # noqa: E501 + return await self.join_beolink_peer_with_http_info(jid, source, **kwargs) # noqa: E501 @validate_arguments async def join_beolink_peer_with_http_info( @@ -3855,7 +3770,7 @@ async def join_beolink_peer_with_http_info( Optional[StrictStr], Field(description="Ask to join a specific source on peer"), ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Join multi-room experience # noqa: E501 @@ -3964,9 +3879,7 @@ async def join_beolink_peer_with_http_info( ) @validate_arguments - async def join_latest_beolink_experience( - self, **kwargs - ) -> BeolinkJoinRequest: # noqa: E501 + async def join_latest_beolink_experience(self, **kwargs) -> BeolinkJoinRequest: # noqa: E501 """Trigger touch to join # noqa: E501 @@ -3983,9 +3896,7 @@ async def join_latest_beolink_experience( if "_preload_content" in kwargs: message = "Error! Please call the join_latest_beolink_experience_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.join_latest_beolink_experience_with_http_info( - **kwargs - ) # noqa: E501 + return await self.join_latest_beolink_experience_with_http_info(**kwargs) # noqa: E501 @validate_arguments async def join_latest_beolink_experience_with_http_info( @@ -4108,9 +4019,7 @@ async def post_beolink_allstandby(self, **kwargs) -> None: # noqa: E501 return await self.post_beolink_allstandby_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def post_beolink_allstandby_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def post_beolink_allstandby_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Broadcast an all standby event to turn all Beolink devices off # noqa: E501 @@ -4212,7 +4121,7 @@ async def post_beolink_expand( ..., description="Jabber id of peer to expand the active experience to" ), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Expand the current active experience # noqa: E501 @@ -4233,9 +4142,7 @@ async def post_beolink_expand( if "_preload_content" in kwargs: message = "Error! Please call the post_beolink_expand_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_beolink_expand_with_http_info( - jid, **kwargs - ) # noqa: E501 + return await self.post_beolink_expand_with_http_info(jid, **kwargs) # noqa: E501 @validate_arguments async def post_beolink_expand_with_http_info( @@ -4246,7 +4153,7 @@ async def post_beolink_expand_with_http_info( ..., description="Jabber id of peer to expand the active experience to" ), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Expand the current active experience # noqa: E501 @@ -4366,9 +4273,7 @@ async def post_beolink_leave(self, **kwargs) -> None: # noqa: E501 return await self.post_beolink_leave_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def post_beolink_leave_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def post_beolink_leave_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Leave the ongoing experience (disconnect this device from remote) # noqa: E501 @@ -4467,7 +4372,7 @@ async def post_beolink_unexpand( jid: Annotated[ StrictStr, Field(..., description="Jabber id of peer to unexpand") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Unexpand (disconnect) a device from the multiroom session # noqa: E501 @@ -4488,9 +4393,7 @@ async def post_beolink_unexpand( if "_preload_content" in kwargs: message = "Error! Please call the post_beolink_unexpand_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_beolink_unexpand_with_http_info( - jid, **kwargs - ) # noqa: E501 + return await self.post_beolink_unexpand_with_http_info(jid, **kwargs) # noqa: E501 @validate_arguments async def post_beolink_unexpand_with_http_info( @@ -4498,7 +4401,7 @@ async def post_beolink_unexpand_with_http_info( jid: Annotated[ StrictStr, Field(..., description="Jabber id of peer to unexpand") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Unexpand (disconnect) a device from the multiroom session # noqa: E501 @@ -4618,9 +4521,7 @@ async def post_clear_queue(self, **kwargs) -> None: # noqa: E501 return await self.post_clear_queue_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def post_clear_queue_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def post_clear_queue_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Clear the queue # noqa: E501 @@ -4720,7 +4621,7 @@ async def post_overlay_play( OverlayPlayRequest, Field(..., description="settings to use for the overlay"), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Play overlay # noqa: E501 @@ -4752,7 +4653,7 @@ async def post_overlay_play_with_http_info( OverlayPlayRequest, Field(..., description="settings to use for the overlay"), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Play overlay # noqa: E501 @@ -4866,7 +4767,7 @@ async def post_playback_command( command: Annotated[ StrictStr, Field(..., description="the named command to execute") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Send a specific playback command to the product # noqa: E501 @@ -4886,9 +4787,7 @@ async def post_playback_command( if "_preload_content" in kwargs: message = "Error! Please call the post_playback_command_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_playback_command_with_http_info( - command, **kwargs - ) # noqa: E501 + return await self.post_playback_command_with_http_info(command, **kwargs) # noqa: E501 @validate_arguments async def post_playback_command_with_http_info( @@ -4896,7 +4795,7 @@ async def post_playback_command_with_http_info( command: Annotated[ StrictStr, Field(..., description="the named command to execute") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Send a specific playback command to the product # noqa: E501 @@ -5114,7 +5013,7 @@ async def post_remote_home_control_ixp( home_control_ixp: Annotated[ HomeControlIxp, Field(..., description="The new IXP") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Change any active Immersive Experience (IXP) # noqa: E501 @@ -5144,7 +5043,7 @@ async def post_remote_home_control_ixp_with_http_info( home_control_ixp: Annotated[ HomeControlIxp, Field(..., description="The new IXP") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Change any active Immersive Experience (IXP) # noqa: E501 @@ -5256,7 +5155,7 @@ async def post_remote_key_trigger( self, id: Annotated[StrictStr, Field(..., description="Key identifier")], remote_ui_key_state: RemoteUIKeyState, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Remote input key press # noqa: E501 @@ -5287,7 +5186,7 @@ async def post_remote_key_trigger_with_http_info( self, id: Annotated[StrictStr, Field(..., description="Key identifier")], remote_ui_key_state: RemoteUIKeyState, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Remote input key press # noqa: E501 @@ -5402,7 +5301,7 @@ async def post_remote_key_trigger_with_http_info( async def post_remote_trigger( self, id: Annotated[StrictStr, Field(..., description="Remote menu item ID")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Trigger a remote menu item # noqa: E501 @@ -5428,7 +5327,7 @@ async def post_remote_trigger( async def post_remote_trigger_with_http_info( self, id: Annotated[StrictStr, Field(..., description="Remote menu item ID")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Trigger a remote menu item # noqa: E501 @@ -5527,9 +5426,7 @@ async def post_remote_trigger_with_http_info( ) @validate_arguments - async def post_scene_match_trigger( - self, scene_match: SceneMatch, **kwargs - ) -> None: # noqa: E501 + async def post_scene_match_trigger(self, scene_match: SceneMatch, **kwargs) -> None: # noqa: E501 """Trigger the first scene with same non null objects provided in the SceneMatch object # noqa: E501 @@ -5548,9 +5445,7 @@ async def post_scene_match_trigger( if "_preload_content" in kwargs: message = "Error! Please call the post_scene_match_trigger_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_scene_match_trigger_with_http_info( - scene_match, **kwargs - ) # noqa: E501 + return await self.post_scene_match_trigger_with_http_info(scene_match, **kwargs) # noqa: E501 @validate_arguments async def post_scene_match_trigger_with_http_info( @@ -5665,7 +5560,7 @@ async def post_scene_match_trigger_with_http_info( async def post_scene_trigger( self, id: Annotated[StrictStr, Field(..., description="ID of the scene")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Trigger a specific scene # noqa: E501 @@ -5691,7 +5586,7 @@ async def post_scene_trigger( async def post_scene_trigger_with_http_info( self, id: Annotated[StrictStr, Field(..., description="ID of the scene")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Trigger a specific scene # noqa: E501 @@ -5909,7 +5804,7 @@ async def post_uri_source( uri: Annotated[ Uri, Field(..., description="the desired uri from which to stream data") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the URI from which sound is streamed # noqa: E501 @@ -5937,7 +5832,7 @@ async def post_uri_source_with_http_info( uri: Annotated[ Uri, Field(..., description="the desired uri from which to stream data") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the URI from which sound is streamed # noqa: E501 @@ -6050,7 +5945,7 @@ async def run_provided_scene( scene_properties: Annotated[ SceneProperties, Field(..., description="The scene you want to run") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Run provided scene # noqa: E501 @@ -6070,9 +5965,7 @@ async def run_provided_scene( if "_preload_content" in kwargs: message = "Error! Please call the run_provided_scene_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.run_provided_scene_with_http_info( - scene_properties, **kwargs - ) # noqa: E501 + return await self.run_provided_scene_with_http_info(scene_properties, **kwargs) # noqa: E501 @validate_arguments async def run_provided_scene_with_http_info( @@ -6080,7 +5973,7 @@ async def run_provided_scene_with_http_info( scene_properties: Annotated[ SceneProperties, Field(..., description="The scene you want to run") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Run provided scene # noqa: E501 @@ -6188,7 +6081,7 @@ async def seek_to_position( position_ms: Annotated[ StrictInt, Field(..., description="position in milliseconds") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Seek to position in stream # noqa: E501 @@ -6208,9 +6101,7 @@ async def seek_to_position( if "_preload_content" in kwargs: message = "Error! Please call the seek_to_position_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.seek_to_position_with_http_info( - position_ms, **kwargs - ) # noqa: E501 + return await self.seek_to_position_with_http_info(position_ms, **kwargs) # noqa: E501 @validate_arguments async def seek_to_position_with_http_info( @@ -6218,7 +6109,7 @@ async def seek_to_position_with_http_info( position_ms: Annotated[ StrictInt, Field(..., description="position in milliseconds") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Seek to position in stream # noqa: E501 @@ -6323,7 +6214,7 @@ async def set_active_source( source_id: Annotated[ StrictStr, Field(..., description="the id of the source to activate") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the active source # noqa: E501 @@ -6343,9 +6234,7 @@ async def set_active_source( if "_preload_content" in kwargs: message = "Error! Please call the set_active_source_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.set_active_source_with_http_info( - source_id, **kwargs - ) # noqa: E501 + return await self.set_active_source_with_http_info(source_id, **kwargs) # noqa: E501 @validate_arguments async def set_active_source_with_http_info( @@ -6353,7 +6242,7 @@ async def set_active_source_with_http_info( source_id: Annotated[ StrictStr, Field(..., description="the id of the source to activate") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the active source # noqa: E501 @@ -6457,7 +6346,7 @@ async def set_current_volume_level( volume_level: Annotated[ VolumeLevel, Field(..., description="The volume level to apply") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the current volume level # noqa: E501 @@ -6487,7 +6376,7 @@ async def set_current_volume_level_with_http_info( volume_level: Annotated[ VolumeLevel, Field(..., description="The volume level to apply") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the current volume level # noqa: E501 @@ -6601,7 +6490,7 @@ async def set_product_friendly_name( ProductFriendlyName, Field(..., description="the friendly name for the product"), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the friendly name # noqa: E501 @@ -6632,7 +6521,7 @@ async def set_product_friendly_name_with_http_info( ProductFriendlyName, Field(..., description="the friendly name for the product"), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the friendly name # noqa: E501 @@ -6749,7 +6638,7 @@ async def set_remote_home_control_uri( description="The new uri for HomeControl dashboard and IXP start page", ), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the uri for HomeControl dashboard and Immersive Experience (IXP) start page # noqa: E501 @@ -6783,7 +6672,7 @@ async def set_remote_home_control_uri_with_http_info( description="The new uri for HomeControl dashboard and IXP start page", ), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the uri for HomeControl dashboard and Immersive Experience (IXP) start page # noqa: E501 @@ -6896,7 +6785,7 @@ async def set_settings_queue( play_queue_settings: Annotated[ PlayQueueSettings, Field(..., description="the desired settings") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set queue settings # noqa: E501 @@ -6926,7 +6815,7 @@ async def set_settings_queue_with_http_info( play_queue_settings: Annotated[ PlayQueueSettings, Field(..., description="the desired settings") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set queue settings # noqa: E501 @@ -7172,7 +7061,7 @@ async def set_sound_settings_adjustments_bass_with_http_info( async def set_sound_settings_adjustments_directivity( self, directivity: Annotated[Directivity, Field(..., description="the directivity")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Update the sound settings adjustments for directivity # noqa: E501 @@ -7200,7 +7089,7 @@ async def set_sound_settings_adjustments_directivity( async def set_sound_settings_adjustments_directivity_with_http_info( self, directivity: Annotated[Directivity, Field(..., description="the directivity")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Update the sound settings adjustments for directivity # noqa: E501 @@ -7311,7 +7200,7 @@ async def set_sound_settings_adjustments_directivity_with_http_info( async def set_sound_settings_adjustments_loudness( self, loudness: Annotated[Loudness, Field(..., description="the loudness mode")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Update the sound settings adjustments for loudness # noqa: E501 @@ -7339,7 +7228,7 @@ async def set_sound_settings_adjustments_loudness( async def set_sound_settings_adjustments_loudness_with_http_info( self, loudness: Annotated[Loudness, Field(..., description="the loudness mode")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Update the sound settings adjustments for loudness # noqa: E501 @@ -7450,7 +7339,7 @@ async def set_sound_settings_adjustments_loudness_with_http_info( async def set_sound_settings_adjustments_treble( self, treble: Annotated[Treble, Field(..., description="the treble level")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Update the sound settings adjustments for treble # noqa: E501 @@ -7478,7 +7367,7 @@ async def set_sound_settings_adjustments_treble( async def set_sound_settings_adjustments_treble_with_http_info( self, treble: Annotated[Treble, Field(..., description="the treble level")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Update the sound settings adjustments for treble # noqa: E501 @@ -7595,7 +7484,7 @@ async def set_stand_movement( Optional[StrictBool], Field(description="Use slow speed on continuous movement"), ] = None, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set stand movement with either an angle or a movement type # noqa: E501 @@ -7631,7 +7520,7 @@ async def set_stand_movement_with_http_info( Optional[StrictBool], Field(description="Use slow speed on continuous movement"), ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set stand movement with either an angle or a movement type # noqa: E501 @@ -7749,7 +7638,7 @@ async def set_volume_mute( volume_mute: Annotated[ VolumeMute, Field(..., description="The mute state to apply") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the volume mute state # noqa: E501 @@ -7769,9 +7658,7 @@ async def set_volume_mute( if "_preload_content" in kwargs: message = "Error! Please call the set_volume_mute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.set_volume_mute_with_http_info( - volume_mute, **kwargs - ) # noqa: E501 + return await self.set_volume_mute_with_http_info(volume_mute, **kwargs) # noqa: E501 @validate_arguments async def set_volume_mute_with_http_info( @@ -7779,7 +7666,7 @@ async def set_volume_mute_with_http_info( volume_mute: Annotated[ VolumeMute, Field(..., description="The mute state to apply") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the volume mute state # noqa: E501 @@ -7887,7 +7774,7 @@ async def set_volume_settings( volume_settings: Annotated[ VolumeSettings, Field(..., description="The settings to apply") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the current volume settings for default and maximum volume level # noqa: E501 @@ -7907,9 +7794,7 @@ async def set_volume_settings( if "_preload_content" in kwargs: message = "Error! Please call the set_volume_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.set_volume_settings_with_http_info( - volume_settings, **kwargs - ) # noqa: E501 + return await self.set_volume_settings_with_http_info(volume_settings, **kwargs) # noqa: E501 @validate_arguments async def set_volume_settings_with_http_info( @@ -7917,7 +7802,7 @@ async def set_volume_settings_with_http_info( volume_settings: Annotated[ VolumeSettings, Field(..., description="The settings to apply") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the current volume settings for default and maximum volume level # noqa: E501 @@ -8030,7 +7915,7 @@ async def start_deezer_flow( user_flow: Annotated[ Optional[UserFlow], Field(description="Select user") ] = None, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Play users flow. If no provided user id it will play the flow connected to the active account # noqa: E501 @@ -8050,9 +7935,7 @@ async def start_deezer_flow( if "_preload_content" in kwargs: message = "Error! Please call the start_deezer_flow_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.start_deezer_flow_with_http_info( - user_flow, **kwargs - ) # noqa: E501 + return await self.start_deezer_flow_with_http_info(user_flow, **kwargs) # noqa: E501 @validate_arguments async def start_deezer_flow_with_http_info( @@ -8060,7 +7943,7 @@ async def start_deezer_flow_with_http_info( user_flow: Annotated[ Optional[UserFlow], Field(description="Select user") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Play users flow. If no provided user id it will play the flow connected to the active account # noqa: E501 diff --git a/python_client/mozart_api/api/output_api.py b/python_client/mozart_api/api/output_api.py index 0cf9894..5cbb5ea 100644 --- a/python_client/mozart_api/api/output_api.py +++ b/python_client/mozart_api/api/output_api.py @@ -1,35 +1,32 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable - -from mozart_api.models.beo_shape_status import BeoShapeStatus +from typing import Awaitable, Optional, Union, overload from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.beo_shape_status import BeoShapeStatus class OutputApi: @@ -62,14 +59,10 @@ async def get_beosound_shape_status(self, **kwargs) -> BeoShapeStatus: # noqa: if "_preload_content" in kwargs: message = "Error! Please call the get_beosound_shape_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_beosound_shape_status_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_beosound_shape_status_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_beosound_shape_status_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_beosound_shape_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get status # noqa: E501 diff --git a/python_client/mozart_api/api/overlay_api.py b/python_client/mozart_api/api/overlay_api.py index 8a5be30..92e3a6d 100644 --- a/python_client/mozart_api/api/overlay_api.py +++ b/python_client/mozart_api/api/overlay_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -33,11 +31,10 @@ from pydantic import Field -from mozart_api.models.overlay_play_request import OverlayPlayRequest - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.overlay_play_request import OverlayPlayRequest class OverlayApi: @@ -59,7 +56,7 @@ async def post_overlay_play( OverlayPlayRequest, Field(..., description="settings to use for the overlay"), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Play overlay # noqa: E501 @@ -91,7 +88,7 @@ async def post_overlay_play_with_http_info( OverlayPlayRequest, Field(..., description="settings to use for the overlay"), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Play overlay # noqa: E501 diff --git a/python_client/mozart_api/api/playback_api.py b/python_client/mozart_api/api/playback_api.py index 3c786bd..46a5a72 100644 --- a/python_client/mozart_api/api/playback_api.py +++ b/python_client/mozart_api/api/playback_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,6 +33,9 @@ from typing import Any, Dict, Optional +from mozart_api.api_client import ApiClient +from mozart_api.api_response import ApiResponse +from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 from mozart_api.models.play_queue_item import PlayQueueItem from mozart_api.models.play_queue_settings import PlayQueueSettings from mozart_api.models.playback_state import PlaybackState @@ -42,10 +43,6 @@ from mozart_api.models.uri import Uri from mozart_api.models.user_flow import UserFlow -from mozart_api.api_client import ApiClient -from mozart_api.api_response import ApiResponse -from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 - class PlaybackApi: """NOTE: This class is auto generated by OpenAPI Generator @@ -66,7 +63,7 @@ async def activate_preset( StrictInt, Field(..., description="the id of the preset you want to trigger"), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Trigger a preset # noqa: E501 @@ -95,7 +92,7 @@ async def activate_preset_with_http_info( StrictInt, Field(..., description="the id of the preset you want to trigger"), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Trigger a preset # noqa: E501 @@ -199,7 +196,7 @@ async def add_to_queue( play_queue_item: Annotated[ PlayQueueItem, Field(..., description="the queue element you want to add") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Add an element to the queue # noqa: E501 @@ -219,9 +216,7 @@ async def add_to_queue( if "_preload_content" in kwargs: message = "Error! Please call the add_to_queue_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.add_to_queue_with_http_info( - play_queue_item, **kwargs - ) # noqa: E501 + return await self.add_to_queue_with_http_info(play_queue_item, **kwargs) # noqa: E501 @validate_arguments async def add_to_queue_with_http_info( @@ -229,7 +224,7 @@ async def add_to_queue_with_http_info( play_queue_item: Annotated[ PlayQueueItem, Field(..., description="the queue element you want to add") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Add an element to the queue # noqa: E501 @@ -342,7 +337,7 @@ async def get_available_sources( target_remote: Annotated[ Optional[StrictBool], Field(description="filter sources for remote control") ] = None, - **kwargs + **kwargs, ) -> SourceArray: # noqa: E501 """Get all the available sources # noqa: E501 @@ -362,9 +357,7 @@ async def get_available_sources( if "_preload_content" in kwargs: message = "Error! Please call the get_available_sources_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_available_sources_with_http_info( - target_remote, **kwargs - ) # noqa: E501 + return await self.get_available_sources_with_http_info(target_remote, **kwargs) # noqa: E501 @validate_arguments async def get_available_sources_with_http_info( @@ -372,7 +365,7 @@ async def get_available_sources_with_http_info( target_remote: Annotated[ Optional[StrictBool], Field(description="filter sources for remote control") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get all the available sources # noqa: E501 @@ -495,9 +488,7 @@ async def get_playback_state(self, **kwargs) -> PlaybackState: # noqa: E501 return await self.get_playback_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_playback_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_playback_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current playback state # noqa: E501 @@ -614,9 +605,7 @@ async def get_settings_queue(self, **kwargs) -> PlayQueueSettings: # noqa: E501 return await self.get_settings_queue_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_settings_queue_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_settings_queue_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current queue settings # noqa: E501 @@ -733,9 +722,7 @@ async def post_clear_queue(self, **kwargs) -> None: # noqa: E501 return await self.post_clear_queue_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def post_clear_queue_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def post_clear_queue_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Clear the queue # noqa: E501 @@ -834,7 +821,7 @@ async def post_playback_command( command: Annotated[ StrictStr, Field(..., description="the named command to execute") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Send a specific playback command to the product # noqa: E501 @@ -854,9 +841,7 @@ async def post_playback_command( if "_preload_content" in kwargs: message = "Error! Please call the post_playback_command_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_playback_command_with_http_info( - command, **kwargs - ) # noqa: E501 + return await self.post_playback_command_with_http_info(command, **kwargs) # noqa: E501 @validate_arguments async def post_playback_command_with_http_info( @@ -864,7 +849,7 @@ async def post_playback_command_with_http_info( command: Annotated[ StrictStr, Field(..., description="the named command to execute") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Send a specific playback command to the product # noqa: E501 @@ -968,7 +953,7 @@ async def post_uri_source( uri: Annotated[ Uri, Field(..., description="the desired uri from which to stream data") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the URI from which sound is streamed # noqa: E501 @@ -996,7 +981,7 @@ async def post_uri_source_with_http_info( uri: Annotated[ Uri, Field(..., description="the desired uri from which to stream data") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the URI from which sound is streamed # noqa: E501 @@ -1109,7 +1094,7 @@ async def seek_to_position( position_ms: Annotated[ StrictInt, Field(..., description="position in milliseconds") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Seek to position in stream # noqa: E501 @@ -1129,9 +1114,7 @@ async def seek_to_position( if "_preload_content" in kwargs: message = "Error! Please call the seek_to_position_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.seek_to_position_with_http_info( - position_ms, **kwargs - ) # noqa: E501 + return await self.seek_to_position_with_http_info(position_ms, **kwargs) # noqa: E501 @validate_arguments async def seek_to_position_with_http_info( @@ -1139,7 +1122,7 @@ async def seek_to_position_with_http_info( position_ms: Annotated[ StrictInt, Field(..., description="position in milliseconds") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Seek to position in stream # noqa: E501 @@ -1244,7 +1227,7 @@ async def set_active_source( source_id: Annotated[ StrictStr, Field(..., description="the id of the source to activate") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the active source # noqa: E501 @@ -1264,9 +1247,7 @@ async def set_active_source( if "_preload_content" in kwargs: message = "Error! Please call the set_active_source_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.set_active_source_with_http_info( - source_id, **kwargs - ) # noqa: E501 + return await self.set_active_source_with_http_info(source_id, **kwargs) # noqa: E501 @validate_arguments async def set_active_source_with_http_info( @@ -1274,7 +1255,7 @@ async def set_active_source_with_http_info( source_id: Annotated[ StrictStr, Field(..., description="the id of the source to activate") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the active source # noqa: E501 @@ -1378,7 +1359,7 @@ async def set_settings_queue( play_queue_settings: Annotated[ PlayQueueSettings, Field(..., description="the desired settings") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set queue settings # noqa: E501 @@ -1408,7 +1389,7 @@ async def set_settings_queue_with_http_info( play_queue_settings: Annotated[ PlayQueueSettings, Field(..., description="the desired settings") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set queue settings # noqa: E501 @@ -1521,7 +1502,7 @@ async def start_deezer_flow( user_flow: Annotated[ Optional[UserFlow], Field(description="Select user") ] = None, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Play users flow. If no provided user id it will play the flow connected to the active account # noqa: E501 @@ -1541,9 +1522,7 @@ async def start_deezer_flow( if "_preload_content" in kwargs: message = "Error! Please call the start_deezer_flow_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.start_deezer_flow_with_http_info( - user_flow, **kwargs - ) # noqa: E501 + return await self.start_deezer_flow_with_http_info(user_flow, **kwargs) # noqa: E501 @validate_arguments async def start_deezer_flow_with_http_info( @@ -1551,7 +1530,7 @@ async def start_deezer_flow_with_http_info( user_flow: Annotated[ Optional[UserFlow], Field(description="Select user") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Play users flow. If no provided user id it will play the flow connected to the active account # noqa: E501 diff --git a/python_client/mozart_api/api/power_api.py b/python_client/mozart_api/api/power_api.py index 2af7b6c..e0ab507 100644 --- a/python_client/mozart_api/api/power_api.py +++ b/python_client/mozart_api/api/power_api.py @@ -1,36 +1,33 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable - -from mozart_api.models.battery_state import BatteryState -from mozart_api.models.power_state_enum import PowerStateEnum +from typing import Awaitable, Optional, Union, overload from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.battery_state import BatteryState +from mozart_api.models.power_state_enum import PowerStateEnum class PowerApi: @@ -66,9 +63,7 @@ async def get_battery_state(self, **kwargs) -> BatteryState: # noqa: E501 return await self.get_battery_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_battery_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_battery_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get battery state of the product # noqa: E501 @@ -184,9 +179,7 @@ async def get_power_state(self, **kwargs) -> PowerStateEnum: # noqa: E501 return await self.get_power_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_power_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_power_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get power state of the product # noqa: E501 diff --git a/python_client/mozart_api/api/product_api.py b/python_client/mozart_api/api/product_api.py index af851cd..23300ef 100644 --- a/python_client/mozart_api/api/product_api.py +++ b/python_client/mozart_api/api/product_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -33,12 +31,11 @@ from pydantic import Field -from mozart_api.models.product_friendly_name import ProductFriendlyName -from mozart_api.models.product_state import ProductState - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.product_friendly_name import ProductFriendlyName +from mozart_api.models.product_state import ProductState class ProductApi: @@ -74,9 +71,7 @@ async def get_product_state(self, **kwargs) -> ProductState: # noqa: E501 return await self.get_product_state_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_product_state_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_product_state_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the overall state from the product # noqa: E501 @@ -179,7 +174,7 @@ async def set_product_friendly_name( ProductFriendlyName, Field(..., description="the friendly name for the product"), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the friendly name # noqa: E501 @@ -210,7 +205,7 @@ async def set_product_friendly_name_with_http_info( ProductFriendlyName, Field(..., description="the friendly name for the product"), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the friendly name # noqa: E501 diff --git a/python_client/mozart_api/api/remote_api.py b/python_client/mozart_api/api/remote_api.py index 6d593c2..bcac8ec 100644 --- a/python_client/mozart_api/api/remote_api.py +++ b/python_client/mozart_api/api/remote_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,12 +33,11 @@ from typing import Dict, Optional -from mozart_api.models.remote_menu_item import RemoteMenuItem -from mozart_api.models.remote_ui_key_state import RemoteUIKeyState - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.remote_menu_item import RemoteMenuItem +from mozart_api.models.remote_ui_key_state import RemoteUIKeyState class RemoteApi: @@ -61,7 +58,7 @@ async def get_remote_menu( descendants_to: Annotated[ Optional[StrictStr], Field(description="Get all descendants to this item") ] = None, - **kwargs + **kwargs, ) -> Dict[str, RemoteMenuItem]: # noqa: E501 """Get all remote menu items # noqa: E501 @@ -81,9 +78,7 @@ async def get_remote_menu( if "_preload_content" in kwargs: message = "Error! Please call the get_remote_menu_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_remote_menu_with_http_info( - descendants_to, **kwargs - ) # noqa: E501 + return await self.get_remote_menu_with_http_info(descendants_to, **kwargs) # noqa: E501 @validate_arguments async def get_remote_menu_with_http_info( @@ -91,7 +86,7 @@ async def get_remote_menu_with_http_info( descendants_to: Annotated[ Optional[StrictStr], Field(description="Get all descendants to this item") ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Get all remote menu items # noqa: E501 @@ -197,7 +192,7 @@ async def post_remote_key_trigger( self, id: Annotated[StrictStr, Field(..., description="Key identifier")], remote_ui_key_state: RemoteUIKeyState, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Remote input key press # noqa: E501 @@ -228,7 +223,7 @@ async def post_remote_key_trigger_with_http_info( self, id: Annotated[StrictStr, Field(..., description="Key identifier")], remote_ui_key_state: RemoteUIKeyState, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Remote input key press # noqa: E501 @@ -343,7 +338,7 @@ async def post_remote_key_trigger_with_http_info( async def post_remote_trigger( self, id: Annotated[StrictStr, Field(..., description="Remote menu item ID")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Trigger a remote menu item # noqa: E501 @@ -369,7 +364,7 @@ async def post_remote_trigger( async def post_remote_trigger_with_http_info( self, id: Annotated[StrictStr, Field(..., description="Remote menu item ID")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Trigger a remote menu item # noqa: E501 diff --git a/python_client/mozart_api/api/scenes_api.py b/python_client/mozart_api/api/scenes_api.py index 4a1c237..a7c14d7 100644 --- a/python_client/mozart_api/api/scenes_api.py +++ b/python_client/mozart_api/api/scenes_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,13 +33,12 @@ from typing import Dict -from mozart_api.models.scene import Scene -from mozart_api.models.scene_match import SceneMatch -from mozart_api.models.scene_properties import SceneProperties - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.scene import Scene +from mozart_api.models.scene_match import SceneMatch +from mozart_api.models.scene_properties import SceneProperties class ScenesApi: @@ -77,9 +74,7 @@ async def get_all_scenes(self, **kwargs) -> Dict[str, Scene]: # noqa: E501 return await self.get_all_scenes_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_all_scenes_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_all_scenes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get a list of configured scenes # noqa: E501 @@ -175,9 +170,7 @@ async def get_all_scenes_with_http_info( ) @validate_arguments - async def post_scene_match_trigger( - self, scene_match: SceneMatch, **kwargs - ) -> None: # noqa: E501 + async def post_scene_match_trigger(self, scene_match: SceneMatch, **kwargs) -> None: # noqa: E501 """Trigger the first scene with same non null objects provided in the SceneMatch object # noqa: E501 @@ -196,9 +189,7 @@ async def post_scene_match_trigger( if "_preload_content" in kwargs: message = "Error! Please call the post_scene_match_trigger_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.post_scene_match_trigger_with_http_info( - scene_match, **kwargs - ) # noqa: E501 + return await self.post_scene_match_trigger_with_http_info(scene_match, **kwargs) # noqa: E501 @validate_arguments async def post_scene_match_trigger_with_http_info( @@ -313,7 +304,7 @@ async def post_scene_match_trigger_with_http_info( async def post_scene_trigger( self, id: Annotated[StrictStr, Field(..., description="ID of the scene")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Trigger a specific scene # noqa: E501 @@ -339,7 +330,7 @@ async def post_scene_trigger( async def post_scene_trigger_with_http_info( self, id: Annotated[StrictStr, Field(..., description="ID of the scene")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Trigger a specific scene # noqa: E501 @@ -443,7 +434,7 @@ async def run_provided_scene( scene_properties: Annotated[ SceneProperties, Field(..., description="The scene you want to run") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Run provided scene # noqa: E501 @@ -463,9 +454,7 @@ async def run_provided_scene( if "_preload_content" in kwargs: message = "Error! Please call the run_provided_scene_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.run_provided_scene_with_http_info( - scene_properties, **kwargs - ) # noqa: E501 + return await self.run_provided_scene_with_http_info(scene_properties, **kwargs) # noqa: E501 @validate_arguments async def run_provided_scene_with_http_info( @@ -473,7 +462,7 @@ async def run_provided_scene_with_http_info( scene_properties: Annotated[ SceneProperties, Field(..., description="The scene you want to run") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Run provided scene # noqa: E501 diff --git a/python_client/mozart_api/api/settings_api.py b/python_client/mozart_api/api/settings_api.py index 13f9b15..8dddf58 100644 --- a/python_client/mozart_api/api/settings_api.py +++ b/python_client/mozart_api/api/settings_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,15 +33,14 @@ from typing import Dict +from mozart_api.api_client import ApiClient +from mozart_api.api_response import ApiResponse +from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 from mozart_api.models.home_control_ixp import HomeControlIxp from mozart_api.models.home_control_uri import HomeControlUri from mozart_api.models.paired_remote_response import PairedRemoteResponse from mozart_api.models.preset import Preset -from mozart_api.api_client import ApiClient -from mozart_api.api_response import ApiResponse -from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 - class SettingsApi: """NOTE: This class is auto generated by OpenAPI Generator @@ -58,9 +55,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client @validate_arguments - async def get_bluetooth_remotes( - self, **kwargs - ) -> PairedRemoteResponse: # noqa: E501 + async def get_bluetooth_remotes(self, **kwargs) -> PairedRemoteResponse: # noqa: E501 """Get a list of paired bluetooth remotes # noqa: E501 @@ -80,9 +75,7 @@ async def get_bluetooth_remotes( return await self.get_bluetooth_remotes_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_bluetooth_remotes_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_bluetooth_remotes_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get a list of paired bluetooth remotes # noqa: E501 @@ -295,9 +288,7 @@ async def get_presets_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E5 ) @validate_arguments - async def get_remote_home_control_uri( - self, **kwargs - ) -> HomeControlUri: # noqa: E501 + async def get_remote_home_control_uri(self, **kwargs) -> HomeControlUri: # noqa: E501 """Get HomeControl dashboard uri and (optional) Immersive Experience (IXP) start page # noqa: E501 @@ -314,14 +305,10 @@ async def get_remote_home_control_uri( if "_preload_content" in kwargs: message = "Error! Please call the get_remote_home_control_uri_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_remote_home_control_uri_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_remote_home_control_uri_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_remote_home_control_uri_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_remote_home_control_uri_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get HomeControl dashboard uri and (optional) Immersive Experience (IXP) start page # noqa: E501 @@ -423,7 +410,7 @@ async def post_remote_home_control_ixp( home_control_ixp: Annotated[ HomeControlIxp, Field(..., description="The new IXP") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Change any active Immersive Experience (IXP) # noqa: E501 @@ -453,7 +440,7 @@ async def post_remote_home_control_ixp_with_http_info( home_control_ixp: Annotated[ HomeControlIxp, Field(..., description="The new IXP") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Change any active Immersive Experience (IXP) # noqa: E501 @@ -570,7 +557,7 @@ async def set_remote_home_control_uri( description="The new uri for HomeControl dashboard and IXP start page", ), ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the uri for HomeControl dashboard and Immersive Experience (IXP) start page # noqa: E501 @@ -604,7 +591,7 @@ async def set_remote_home_control_uri_with_http_info( description="The new uri for HomeControl dashboard and IXP start page", ), ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the uri for HomeControl dashboard and Immersive Experience (IXP) start page # noqa: E501 diff --git a/python_client/mozart_api/api/software_update_api.py b/python_client/mozart_api/api/software_update_api.py index a84e93b..b97e0bf 100644 --- a/python_client/mozart_api/api/software_update_api.py +++ b/python_client/mozart_api/api/software_update_api.py @@ -1,35 +1,32 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable - -from mozart_api.models.software_update_status import SoftwareUpdateStatus +from typing import Awaitable, Optional, Union, overload from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.software_update_status import SoftwareUpdateStatus class SoftwareUpdateApi: @@ -45,9 +42,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client @validate_arguments - async def get_softwareupdate_status( - self, **kwargs - ) -> SoftwareUpdateStatus: # noqa: E501 + async def get_softwareupdate_status(self, **kwargs) -> SoftwareUpdateStatus: # noqa: E501 """Get the current software update status # noqa: E501 @@ -64,14 +59,10 @@ async def get_softwareupdate_status( if "_preload_content" in kwargs: message = "Error! Please call the get_softwareupdate_status_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_softwareupdate_status_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_softwareupdate_status_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_softwareupdate_status_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_softwareupdate_status_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current software update status # noqa: E501 diff --git a/python_client/mozart_api/api/sound_api.py b/python_client/mozart_api/api/sound_api.py index f9fd9a6..e64e4c7 100644 --- a/python_client/mozart_api/api/sound_api.py +++ b/python_client/mozart_api/api/sound_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,6 +33,9 @@ from typing import Dict, List +from mozart_api.api_client import ApiClient +from mozart_api.api_response import ApiResponse +from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 from mozart_api.models.bass import Bass from mozart_api.models.directivity import Directivity from mozart_api.models.listening_mode import ListeningMode @@ -47,10 +48,6 @@ from mozart_api.models.volume_settings import VolumeSettings from mozart_api.models.volume_state import VolumeState -from mozart_api.api_client import ApiClient -from mozart_api.api_response import ApiResponse -from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 - class SoundApi: """NOTE: This class is auto generated by OpenAPI Generator @@ -86,9 +83,7 @@ async def activate_listening_mode( if "_preload_content" in kwargs: message = "Error! Please call the activate_listening_mode_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.activate_listening_mode_with_http_info( - id, **kwargs - ) # noqa: E501 + return await self.activate_listening_mode_with_http_info(id, **kwargs) # noqa: E501 @validate_arguments async def activate_listening_mode_with_http_info( @@ -186,9 +181,7 @@ async def activate_listening_mode_with_http_info( ) @validate_arguments - async def get_active_listening_mode( - self, **kwargs - ) -> ListeningModeRef: # noqa: E501 + async def get_active_listening_mode(self, **kwargs) -> ListeningModeRef: # noqa: E501 """Get the active listening mode # noqa: E501 @@ -205,14 +198,10 @@ async def get_active_listening_mode( if "_preload_content" in kwargs: message = "Error! Please call the get_active_listening_mode_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.get_active_listening_mode_with_http_info( - **kwargs - ) # noqa: E501 + return await self.get_active_listening_mode_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_active_listening_mode_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_active_listening_mode_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the active listening mode # noqa: E501 @@ -328,9 +317,7 @@ async def get_current_volume(self, **kwargs) -> VolumeState: # noqa: E501 return await self.get_current_volume_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_current_volume_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_current_volume_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current volume state # noqa: E501 @@ -427,9 +414,7 @@ async def get_current_volume_with_http_info( ) @validate_arguments - async def get_listening_mode_set( - self, **kwargs - ) -> List[ListeningMode]: # noqa: E501 + async def get_listening_mode_set(self, **kwargs) -> List[ListeningMode]: # noqa: E501 """Get available listening modes that match the current role (standalone, multichannel or both(all)). # noqa: E501 @@ -449,9 +434,7 @@ async def get_listening_mode_set( return await self.get_listening_mode_set_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_listening_mode_set_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_listening_mode_set_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get available listening modes that match the current role (standalone, multichannel or both(all)). # noqa: E501 @@ -547,9 +530,7 @@ async def get_listening_mode_set_with_http_info( ) @validate_arguments - async def get_sound_features( - self, **kwargs - ) -> Dict[str, SoundFeatureSet]: # noqa: E501 + async def get_sound_features(self, **kwargs) -> Dict[str, SoundFeatureSet]: # noqa: E501 """Get available sound features that match the current role (standalone or multichannel). # noqa: E501 @@ -569,9 +550,7 @@ async def get_sound_features( return await self.get_sound_features_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_sound_features_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_sound_features_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get available sound features that match the current role (standalone or multichannel). # noqa: E501 @@ -687,9 +666,7 @@ async def get_volume_settings(self, **kwargs) -> VolumeSettings: # noqa: E501 return await self.get_volume_settings_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_volume_settings_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_volume_settings_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the current volume settings for default and maximum volume level # noqa: E501 @@ -791,7 +768,7 @@ async def set_current_volume_level( volume_level: Annotated[ VolumeLevel, Field(..., description="The volume level to apply") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the current volume level # noqa: E501 @@ -821,7 +798,7 @@ async def set_current_volume_level_with_http_info( volume_level: Annotated[ VolumeLevel, Field(..., description="The volume level to apply") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the current volume level # noqa: E501 @@ -1067,7 +1044,7 @@ async def set_sound_settings_adjustments_bass_with_http_info( async def set_sound_settings_adjustments_directivity( self, directivity: Annotated[Directivity, Field(..., description="the directivity")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Update the sound settings adjustments for directivity # noqa: E501 @@ -1095,7 +1072,7 @@ async def set_sound_settings_adjustments_directivity( async def set_sound_settings_adjustments_directivity_with_http_info( self, directivity: Annotated[Directivity, Field(..., description="the directivity")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Update the sound settings adjustments for directivity # noqa: E501 @@ -1206,7 +1183,7 @@ async def set_sound_settings_adjustments_directivity_with_http_info( async def set_sound_settings_adjustments_loudness( self, loudness: Annotated[Loudness, Field(..., description="the loudness mode")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Update the sound settings adjustments for loudness # noqa: E501 @@ -1234,7 +1211,7 @@ async def set_sound_settings_adjustments_loudness( async def set_sound_settings_adjustments_loudness_with_http_info( self, loudness: Annotated[Loudness, Field(..., description="the loudness mode")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Update the sound settings adjustments for loudness # noqa: E501 @@ -1345,7 +1322,7 @@ async def set_sound_settings_adjustments_loudness_with_http_info( async def set_sound_settings_adjustments_treble( self, treble: Annotated[Treble, Field(..., description="the treble level")], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Update the sound settings adjustments for treble # noqa: E501 @@ -1373,7 +1350,7 @@ async def set_sound_settings_adjustments_treble( async def set_sound_settings_adjustments_treble_with_http_info( self, treble: Annotated[Treble, Field(..., description="the treble level")], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Update the sound settings adjustments for treble # noqa: E501 @@ -1486,7 +1463,7 @@ async def set_volume_mute( volume_mute: Annotated[ VolumeMute, Field(..., description="The mute state to apply") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the volume mute state # noqa: E501 @@ -1506,9 +1483,7 @@ async def set_volume_mute( if "_preload_content" in kwargs: message = "Error! Please call the set_volume_mute_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.set_volume_mute_with_http_info( - volume_mute, **kwargs - ) # noqa: E501 + return await self.set_volume_mute_with_http_info(volume_mute, **kwargs) # noqa: E501 @validate_arguments async def set_volume_mute_with_http_info( @@ -1516,7 +1491,7 @@ async def set_volume_mute_with_http_info( volume_mute: Annotated[ VolumeMute, Field(..., description="The mute state to apply") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the volume mute state # noqa: E501 @@ -1624,7 +1599,7 @@ async def set_volume_settings( volume_settings: Annotated[ VolumeSettings, Field(..., description="The settings to apply") ], - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set the current volume settings for default and maximum volume level # noqa: E501 @@ -1644,9 +1619,7 @@ async def set_volume_settings( if "_preload_content" in kwargs: message = "Error! Please call the set_volume_settings_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 raise ValueError(message) - return await self.set_volume_settings_with_http_info( - volume_settings, **kwargs - ) # noqa: E501 + return await self.set_volume_settings_with_http_info(volume_settings, **kwargs) # noqa: E501 @validate_arguments async def set_volume_settings_with_http_info( @@ -1654,7 +1627,7 @@ async def set_volume_settings_with_http_info( volume_settings: Annotated[ VolumeSettings, Field(..., description="The settings to apply") ], - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set the current volume settings for default and maximum volume level # noqa: E501 diff --git a/python_client/mozart_api/api/speaker_group_api.py b/python_client/mozart_api/api/speaker_group_api.py index 3294f55..a83d997 100644 --- a/python_client/mozart_api/api/speaker_group_api.py +++ b/python_client/mozart_api/api/speaker_group_api.py @@ -1,35 +1,32 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError - -from typing import overload, Optional, Union, Awaitable + from pydantic import ValidationError, validate_arguments -from mozart_api.models.speaker_group_overview import SpeakerGroupOverview +from typing import Awaitable, Optional, Union, overload from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.speaker_group_overview import SpeakerGroupOverview class SpeakerGroupApi: @@ -45,9 +42,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client @validate_arguments - async def get_speakergroup_active( - self, **kwargs - ) -> SpeakerGroupOverview: # noqa: E501 + async def get_speakergroup_active(self, **kwargs) -> SpeakerGroupOverview: # noqa: E501 """Get the active speaker group # noqa: E501 @@ -67,9 +62,7 @@ async def get_speakergroup_active( return await self.get_speakergroup_active_with_http_info(**kwargs) # noqa: E501 @validate_arguments - async def get_speakergroup_active_with_http_info( - self, **kwargs - ) -> ApiResponse: # noqa: E501 + async def get_speakergroup_active_with_http_info(self, **kwargs) -> ApiResponse: # noqa: E501 """Get the active speaker group # noqa: E501 diff --git a/python_client/mozart_api/api/stand_api.py b/python_client/mozart_api/api/stand_api.py index 29ff269..7280798 100644 --- a/python_client/mozart_api/api/stand_api.py +++ b/python_client/mozart_api/api/stand_api.py @@ -1,29 +1,27 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - -import re # noqa: F401 import io +import re # noqa: F401 import warnings - try: - from pydantic.v1 import validate_arguments, ValidationError + from pydantic.v1 import ValidationError, validate_arguments except ImportError: - from pydantic import validate_arguments, ValidationError + from pydantic import ValidationError, validate_arguments -from typing import overload, Optional, Union, Awaitable +from typing import Awaitable, Optional, Union, overload from typing_extensions import Annotated @@ -35,11 +33,10 @@ from typing import Optional -from mozart_api.models.stand_movement import StandMovement - from mozart_api.api_client import ApiClient from mozart_api.api_response import ApiResponse from mozart_api.exceptions import ApiTypeError, ApiValueError # noqa: F401 +from mozart_api.models.stand_movement import StandMovement class StandApi: @@ -64,7 +61,7 @@ async def set_stand_movement( Optional[StrictBool], Field(description="Use slow speed on continuous movement"), ] = None, - **kwargs + **kwargs, ) -> None: # noqa: E501 """Set stand movement with either an angle or a movement type # noqa: E501 @@ -100,7 +97,7 @@ async def set_stand_movement_with_http_info( Optional[StrictBool], Field(description="Use slow speed on continuous movement"), ] = None, - **kwargs + **kwargs, ) -> ApiResponse: # noqa: E501 """Set stand movement with either an angle or a movement type # noqa: E501 diff --git a/python_client/mozart_api/api_client.py b/python_client/mozart_api/api_client.py index 09898e6..f3be47d 100644 --- a/python_client/mozart_api/api_client.py +++ b/python_client/mozart_api/api_client.py @@ -1,34 +1,39 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import atexit import datetime -from dateutil.parser import parse import json import mimetypes import os import re import tempfile - from urllib.parse import quote -from mozart_api.configuration import Configuration -from mozart_api.api_response import ApiResponse +from dateutil.parser import parse + +try: + from pydantic.v1 import SecretStr +except ImportError: + from pydantic import SecretStr + + import mozart_api.models from mozart_api import rest -from mozart_api.exceptions import ApiValueError, ApiException +from mozart_api.api_response import ApiResponse +from mozart_api.configuration import Configuration +from mozart_api.exceptions import ApiException, ApiValueError class ApiClient: @@ -82,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/4.1.1.116.0/python" + self.user_agent = "OpenAPI-Generator/4.1.1.116.1/python" self.client_side_validation = configuration.client_side_validation async def __aenter__(self): @@ -151,7 +156,6 @@ async def __call_api( _host=None, _request_auth=None, ): - config = self.configuration # header parameters @@ -275,6 +279,7 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. @@ -287,6 +292,8 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -304,7 +311,10 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = obj.to_dict() + if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ return { key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() @@ -533,9 +543,7 @@ def parameters_to_tuples(self, params, collection_formats): new_params = [] if collection_formats is None: collection_formats = {} - for k, v in ( - params.items() if isinstance(params, dict) else params - ): # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 if k in collection_formats: collection_format = collection_formats[k] if collection_format == "multi": @@ -564,9 +572,7 @@ def parameters_to_url_query(self, params, collection_formats): new_params = [] if collection_formats is None: collection_formats = {} - for k, v in ( - params.items() if isinstance(params, dict) else params - ): # noqa: E501 + for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 if isinstance(v, bool): v = str(v).lower() if isinstance(v, (int, float)): diff --git a/python_client/mozart_api/api_response.py b/python_client/mozart_api/api_response.py index 26b355a..a49921c 100644 --- a/python_client/mozart_api/api_response.py +++ b/python_client/mozart_api/api_response.py @@ -1,6 +1,7 @@ """API response object.""" from __future__ import annotations + from typing import Any, Dict, Optional try: diff --git a/python_client/mozart_api/configuration.py b/python_client/mozart_api/configuration.py index 857eab5..599c487 100644 --- a/python_client/mozart_api/configuration.py +++ b/python_client/mozart_api/configuration.py @@ -1,24 +1,23 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import copy +import http.client as httplib import logging import sys -import urllib3 -import http.client as httplib +import urllib3 JSON_SCHEMA_VALIDATION_KEYWORDS = { "multipleOf", @@ -381,7 +380,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 0.2.0\n" - "SDK Package Version: 4.1.1.116.0".format( + "SDK Package Version: 4.1.1.116.1".format( env=sys.platform, pyversion=sys.version ) ) diff --git a/python_client/mozart_api/exceptions.py b/python_client/mozart_api/exceptions.py index 430a9e2..1a184d2 100644 --- a/python_client/mozart_api/exceptions.py +++ b/python_client/mozart_api/exceptions.py @@ -1,15 +1,15 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 @@ -102,7 +102,6 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: if http_resp: self.status = http_resp.status @@ -128,31 +127,26 @@ def __str__(self): class BadRequestException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: super(NotFoundException, self).__init__(status, reason, http_resp) class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: super(UnauthorizedException, self).__init__(status, reason, http_resp) class ForbiddenException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: super(ForbiddenException, self).__init__(status, reason, http_resp) class ServiceException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: super(ServiceException, self).__init__(status, reason, http_resp) diff --git a/python_client/mozart_api/models/__init__.py b/python_client/mozart_api/models/__init__.py index 10118d5..fa0520b 100644 --- a/python_client/mozart_api/models/__init__.py +++ b/python_client/mozart_api/models/__init__.py @@ -2,18 +2,17 @@ # flake8: noqa """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - # import models into model package from mozart_api.models.action import Action from mozart_api.models.action_sound_profile import ActionSoundProfile diff --git a/python_client/mozart_api/models/action.py b/python_client/mozart_api/models/action.py index 312fe7b..7faed99 100644 --- a/python_client/mozart_api/models/action.py +++ b/python_client/mozart_api/models/action.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Dict, Optional, Union try: @@ -123,7 +121,12 @@ def button_name_validate_enum(cls, value): if value is None: return value - if value not in ("preset1", "preset2", "preset3", "preset4"): + if value not in ( + "preset1", + "preset2", + "preset3", + "preset4", + ): raise ValueError( "must be one of enum values ('preset1', 'preset2', 'preset3', 'preset4')" ) @@ -135,7 +138,10 @@ def tone_name_validate_enum(cls, value): if value is None: return value - if value not in ("alarm_1", "alarm_2"): + if value not in ( + "alarm_1", + "alarm_2", + ): raise ValueError("must be one of enum values ('alarm_1', 'alarm_2')") return value @@ -273,36 +279,26 @@ def from_dict(cls, obj: dict) -> Action: "gain_db": obj.get("gainDb"), "listening_mode_id": obj.get("listeningModeId"), "preset_key": obj.get("presetKey"), - "queue_item": ( - PlayQueueItem.from_dict(obj.get("queueItem")) - if obj.get("queueItem") is not None - else None - ), - "queue_settings": ( - PlayQueueSettings.from_dict(obj.get("queueSettings")) - if obj.get("queueSettings") is not None - else None - ), + "queue_item": PlayQueueItem.from_dict(obj.get("queueItem")) + if obj.get("queueItem") is not None + else None, + "queue_settings": PlayQueueSettings.from_dict(obj.get("queueSettings")) + if obj.get("queueSettings") is not None + else None, "radio_station_id": obj.get("radioStationId"), - "sound_profile": ( - dict( - (_k, ActionSoundProfile.from_dict(_v)) - for _k, _v in obj.get("soundProfile").items() - ) - if obj.get("soundProfile") is not None - else None - ), - "source": ( - SourceTypeEnum.from_dict(obj.get("source")) - if obj.get("source") is not None - else None - ), + "sound_profile": dict( + (_k, ActionSoundProfile.from_dict(_v)) + for _k, _v in obj.get("soundProfile").items() + ) + if obj.get("soundProfile") is not None + else None, + "source": SourceTypeEnum.from_dict(obj.get("source")) + if obj.get("source") is not None + else None, "speaker_group_id": obj.get("speakerGroupId"), - "stand_position": ( - StandPosition.from_dict(obj.get("standPosition")) - if obj.get("standPosition") is not None - else None - ), + "stand_position": StandPosition.from_dict(obj.get("standPosition")) + if obj.get("standPosition") is not None + else None, "stop_duration": obj.get("stopDuration"), "tone_name": obj.get("toneName"), "type": obj.get("type"), diff --git a/python_client/mozart_api/models/action_sound_profile.py b/python_client/mozart_api/models/action_sound_profile.py index acdc72b..1f0fd07 100644 --- a/python_client/mozart_api/models/action_sound_profile.py +++ b/python_client/mozart_api/models/action_sound_profile.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/alarm_timer_event_data.py b/python_client/mozart_api/models/alarm_timer_event_data.py index cb5bca2..4f609b3 100644 --- a/python_client/mozart_api/models/alarm_timer_event_data.py +++ b/python_client/mozart_api/models/alarm_timer_event_data.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -43,7 +41,11 @@ def event_validate_enum(cls, value): if value is None: return value - if value not in ("add", "update", "delete"): + if value not in ( + "add", + "update", + "delete", + ): raise ValueError("must be one of enum values ('add', 'update', 'delete')") return value @@ -53,7 +55,10 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in ("alarm", "timer"): + if value not in ( + "alarm", + "timer", + ): raise ValueError("must be one of enum values ('alarm', 'timer')") return value diff --git a/python_client/mozart_api/models/alarm_triggered_info.py b/python_client/mozart_api/models/alarm_triggered_info.py index cc838ba..0d90a68 100644 --- a/python_client/mozart_api/models/alarm_triggered_info.py +++ b/python_client/mozart_api/models/alarm_triggered_info.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/ambience.py b/python_client/mozart_api/models/ambience.py index 1fc3e42..87856c8 100644 --- a/python_client/mozart_api/models/ambience.py +++ b/python_client/mozart_api/models/ambience.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/ambience_feature.py b/python_client/mozart_api/models/ambience_feature.py index 1e17d83..a0f7ebc 100644 --- a/python_client/mozart_api/models/ambience_feature.py +++ b/python_client/mozart_api/models/ambience_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,12 @@ def from_dict(cls, obj: dict) -> AmbienceFeature: _obj = AmbienceFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Ambience.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Ambience.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Ambience.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Ambience.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/ambience_range.py b/python_client/mozart_api/models/ambience_range.py index b3a1538..cd4966f 100644 --- a/python_client/mozart_api/models/ambience_range.py +++ b/python_client/mozart_api/models/ambience_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> AmbienceRange: _obj = AmbienceRange.parse_obj( { - "default": ( - Ambience.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Ambience.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Ambience.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Ambience.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/art.py b/python_client/mozart_api/models/art.py index 646c7d3..b81fd2b 100644 --- a/python_client/mozart_api/models/art.py +++ b/python_client/mozart_api/models/art.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/balance.py b/python_client/mozart_api/models/balance.py index 900a209..f45a3cb 100644 --- a/python_client/mozart_api/models/balance.py +++ b/python_client/mozart_api/models/balance.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/balance_feature.py b/python_client/mozart_api/models/balance_feature.py index 380d8ca..ae73e68 100644 --- a/python_client/mozart_api/models/balance_feature.py +++ b/python_client/mozart_api/models/balance_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,12 @@ def from_dict(cls, obj: dict) -> BalanceFeature: _obj = BalanceFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Balance.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Balance.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Balance.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Balance.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/balance_range.py b/python_client/mozart_api/models/balance_range.py index 85fe157..aaefdb8 100644 --- a/python_client/mozart_api/models/balance_range.py +++ b/python_client/mozart_api/models/balance_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> BalanceRange: _obj = BalanceRange.parse_obj( { - "default": ( - Balance.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Balance.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Balance.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Balance.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/bass.py b/python_client/mozart_api/models/bass.py index ef639c8..c23f116 100644 --- a/python_client/mozart_api/models/bass.py +++ b/python_client/mozart_api/models/bass.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictInt diff --git a/python_client/mozart_api/models/bass_feature.py b/python_client/mozart_api/models/bass_feature.py index d3a22da..bfbed66 100644 --- a/python_client/mozart_api/models/bass_feature.py +++ b/python_client/mozart_api/models/bass_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -87,16 +85,12 @@ def from_dict(cls, obj: dict) -> BassFeature: _obj = BassFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Bass.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Bass.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Bass.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Bass.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/bass_management.py b/python_client/mozart_api/models/bass_management.py index 84a5f44..aae702b 100644 --- a/python_client/mozart_api/models/bass_management.py +++ b/python_client/mozart_api/models/bass_management.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr, validator @@ -36,7 +35,10 @@ class BassManagement(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("on", "off"): + if value not in ( + "on", + "off", + ): raise ValueError("must be one of enum values ('on', 'off')") return value diff --git a/python_client/mozart_api/models/bass_management_feature.py b/python_client/mozart_api/models/bass_management_feature.py index 5dffe0a..193a23f 100644 --- a/python_client/mozart_api/models/bass_management_feature.py +++ b/python_client/mozart_api/models/bass_management_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -44,7 +42,10 @@ class BassManagementFeature(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("on", "off"): + if value not in ( + "on", + "off", + ): raise ValueError("must be one of enum values ('on', 'off')") return value @@ -94,16 +95,12 @@ def from_dict(cls, obj: dict) -> BassManagementFeature: _obj = BassManagementFeature.parse_obj( { "value": obj.get("value"), - "default": ( - BassManagement.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [BassManagement.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": BassManagement.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [BassManagement.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/bass_management_range.py b/python_client/mozart_api/models/bass_management_range.py index 2803845..c687ace 100644 --- a/python_client/mozart_api/models/bass_management_range.py +++ b/python_client/mozart_api/models/bass_management_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> BassManagementRange: _obj = BassManagementRange.parse_obj( { - "default": ( - BassManagement.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [BassManagement.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": BassManagement.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [BassManagement.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/bass_range.py b/python_client/mozart_api/models/bass_range.py index cc7b549..b921168 100644 --- a/python_client/mozart_api/models/bass_range.py +++ b/python_client/mozart_api/models/bass_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> BassRange: _obj = BassRange.parse_obj( { - "default": ( - Bass.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Bass.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Bass.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Bass.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/battery_state.py b/python_client/mozart_api/models/battery_state.py index c7eec57..c356a6c 100644 --- a/python_client/mozart_api/models/battery_state.py +++ b/python_client/mozart_api/models/battery_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/beo_remote_button.py b/python_client/mozart_api/models/beo_remote_button.py index 9c480eb..f0231a7 100644 --- a/python_client/mozart_api/models/beo_remote_button.py +++ b/python_client/mozart_api/models/beo_remote_button.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -42,7 +40,10 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in ("KeyPress", "KeyRelease"): + if value not in ( + "KeyPress", + "KeyRelease", + ): raise ValueError("must be one of enum values ('KeyPress', 'KeyRelease')") return value diff --git a/python_client/mozart_api/models/beo_shape_status.py b/python_client/mozart_api/models/beo_shape_status.py index c2f1584..5fd98e1 100644 --- a/python_client/mozart_api/models/beo_shape_status.py +++ b/python_client/mozart_api/models/beo_shape_status.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -122,11 +120,11 @@ def from_dict(cls, obj: dict) -> BeoShapeStatus: "amplifier_tiles_online": obj.get("amplifierTilesOnline"), "design_id": obj.get("designId"), "design_name": obj.get("designName"), - "sound_profile": ( - BeoShapeStatusSoundProfile.from_dict(obj.get("soundProfile")) - if obj.get("soundProfile") is not None - else None - ), + "sound_profile": BeoShapeStatusSoundProfile.from_dict( + obj.get("soundProfile") + ) + if obj.get("soundProfile") is not None + else None, "speaker_tiles_configured": obj.get("speakerTilesConfigured"), "state": obj.get("state"), } diff --git a/python_client/mozart_api/models/beo_shape_status_sound_profile.py b/python_client/mozart_api/models/beo_shape_status_sound_profile.py index 8b4a427..18e2a7c 100644 --- a/python_client/mozart_api/models/beo_shape_status_sound_profile.py +++ b/python_client/mozart_api/models/beo_shape_status_sound_profile.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: diff --git a/python_client/mozart_api/models/beolink_available_listener.py b/python_client/mozart_api/models/beolink_available_listener.py index 9152bd7..dbd6d79 100644 --- a/python_client/mozart_api/models/beolink_available_listener.py +++ b/python_client/mozart_api/models/beolink_available_listener.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr diff --git a/python_client/mozart_api/models/beolink_experience.py b/python_client/mozart_api/models/beolink_experience.py index 72240f9..751a0ed 100644 --- a/python_client/mozart_api/models/beolink_experience.py +++ b/python_client/mozart_api/models/beolink_experience.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,7 +74,13 @@ class BeolinkExperience(BaseModel): @validator("category") def category_validate_enum(cls, value): """Validates the enum""" - if value not in ("TV", "RADIO", "MUSIC", "MEDIA", "UNKNOWN"): + if value not in ( + "TV", + "RADIO", + "MUSIC", + "MEDIA", + "UNKNOWN", + ): raise ValueError( "must be one of enum values ('TV', 'RADIO', 'MUSIC', 'MEDIA', 'UNKNOWN')" ) diff --git a/python_client/mozart_api/models/beolink_experiences_result.py b/python_client/mozart_api/models/beolink_experiences_result.py index 3dfc1ca..3c5394b 100644 --- a/python_client/mozart_api/models/beolink_experiences_result.py +++ b/python_client/mozart_api/models/beolink_experiences_result.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -47,7 +45,11 @@ class BeolinkExperiencesResult(BaseModel): @validator("status") def status_validate_enum(cls, value): """Validates the enum""" - if value not in ("ok", "busy", "timeout"): + if value not in ( + "ok", + "busy", + "timeout", + ): raise ValueError("must be one of enum values ('ok', 'busy', 'timeout')") return value @@ -93,14 +95,12 @@ def from_dict(cls, obj: dict) -> BeolinkExperiencesResult: _obj = BeolinkExperiencesResult.parse_obj( { - "experiences": ( - [ - BeolinkExperience.from_dict(_item) - for _item in obj.get("experiences") - ] - if obj.get("experiences") is not None - else None - ), + "experiences": [ + BeolinkExperience.from_dict(_item) + for _item in obj.get("experiences") + ] + if obj.get("experiences") is not None + else None, "request_id": obj.get("requestID"), "status": obj.get("status"), } diff --git a/python_client/mozart_api/models/beolink_join_request.py b/python_client/mozart_api/models/beolink_join_request.py index b62fda0..dbb0431 100644 --- a/python_client/mozart_api/models/beolink_join_request.py +++ b/python_client/mozart_api/models/beolink_join_request.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/beolink_join_result.py b/python_client/mozart_api/models/beolink_join_result.py index b46a846..c80dce5 100644 --- a/python_client/mozart_api/models/beolink_join_result.py +++ b/python_client/mozart_api/models/beolink_join_result.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -67,14 +65,23 @@ def error_validate_enum(cls, value): @validator("status") def status_validate_enum(cls, value): """Validates the enum""" - if value not in ("idle", "joined", "failed"): + if value not in ( + "idle", + "joined", + "failed", + ): raise ValueError("must be one of enum values ('idle', 'joined', 'failed')") return value @validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in ("join", "joinRequested", "expand", "expandRequested"): + if value not in ( + "join", + "joinRequested", + "expand", + "expandRequested", + ): raise ValueError( "must be one of enum values ('join', 'joinRequested', 'expand', 'expandRequested')" ) diff --git a/python_client/mozart_api/models/beolink_leader.py b/python_client/mozart_api/models/beolink_leader.py index bacc730..03afc87 100644 --- a/python_client/mozart_api/models/beolink_leader.py +++ b/python_client/mozart_api/models/beolink_leader.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr diff --git a/python_client/mozart_api/models/beolink_listener.py b/python_client/mozart_api/models/beolink_listener.py index 69915cc..8e2ed72 100644 --- a/python_client/mozart_api/models/beolink_listener.py +++ b/python_client/mozart_api/models/beolink_listener.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr diff --git a/python_client/mozart_api/models/beolink_peer.py b/python_client/mozart_api/models/beolink_peer.py index a788faf..6e4a382 100644 --- a/python_client/mozart_api/models/beolink_peer.py +++ b/python_client/mozart_api/models/beolink_peer.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr diff --git a/python_client/mozart_api/models/beolink_self.py b/python_client/mozart_api/models/beolink_self.py index 2d2e9b5..2e7e421 100644 --- a/python_client/mozart_api/models/beolink_self.py +++ b/python_client/mozart_api/models/beolink_self.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr diff --git a/python_client/mozart_api/models/bluetooth_device.py b/python_client/mozart_api/models/bluetooth_device.py index 10fe65f..9f263f8 100644 --- a/python_client/mozart_api/models/bluetooth_device.py +++ b/python_client/mozart_api/models/bluetooth_device.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/bluetooth_device_list.py b/python_client/mozart_api/models/bluetooth_device_list.py index fb1ed99..07ebf7d 100644 --- a/python_client/mozart_api/models/bluetooth_device_list.py +++ b/python_client/mozart_api/models/bluetooth_device_list.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -79,11 +77,11 @@ def from_dict(cls, obj: dict) -> BluetoothDeviceList: _obj = BluetoothDeviceList.parse_obj( { - "items": ( - [BluetoothDevice.from_dict(_item) for _item in obj.get("items")] - if obj.get("items") is not None - else None - ) + "items": [ + BluetoothDevice.from_dict(_item) for _item in obj.get("items") + ] + if obj.get("items") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/button_event.py b/python_client/mozart_api/models/button_event.py index 517f138..0a82e99 100644 --- a/python_client/mozart_api/models/button_event.py +++ b/python_client/mozart_api/models/button_event.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/compression.py b/python_client/mozart_api/models/compression.py index 4129740..0c97965 100644 --- a/python_client/mozart_api/models/compression.py +++ b/python_client/mozart_api/models/compression.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr, validator @@ -36,7 +35,11 @@ class Compression(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("off", "medium", "maximum"): + if value not in ( + "off", + "medium", + "maximum", + ): raise ValueError("must be one of enum values ('off', 'medium', 'maximum')") return value diff --git a/python_client/mozart_api/models/compression_feature.py b/python_client/mozart_api/models/compression_feature.py index 3d3a93e..7f70052 100644 --- a/python_client/mozart_api/models/compression_feature.py +++ b/python_client/mozart_api/models/compression_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -44,7 +42,11 @@ class CompressionFeature(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("off", "medium", "maximum"): + if value not in ( + "off", + "medium", + "maximum", + ): raise ValueError("must be one of enum values ('off', 'medium', 'maximum')") return value @@ -94,16 +96,12 @@ def from_dict(cls, obj: dict) -> CompressionFeature: _obj = CompressionFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Compression.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Compression.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Compression.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Compression.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/compression_range.py b/python_client/mozart_api/models/compression_range.py index 0b04c00..ac642b2 100644 --- a/python_client/mozart_api/models/compression_range.py +++ b/python_client/mozart_api/models/compression_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> CompressionRange: _obj = CompressionRange.parse_obj( { - "default": ( - Compression.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Compression.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Compression.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Compression.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/content_item.py b/python_client/mozart_api/models/content_item.py index e5d9783..edb3e46 100644 --- a/python_client/mozart_api/models/content_item.py +++ b/python_client/mozart_api/models/content_item.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -47,7 +45,13 @@ def categories_validate_enum(cls, value): return value for i in value: - if i not in ("music", "movie", "tv", "hdmi", "app"): + if i not in ( + "music", + "movie", + "tv", + "hdmi", + "app", + ): raise ValueError( "each list item must be one of ('music', 'movie', 'tv', 'hdmi', 'app')" ) @@ -99,11 +103,9 @@ def from_dict(cls, obj: dict) -> ContentItem: "categories": obj.get("categories"), "content_uri": obj.get("contentUri"), "label": obj.get("label"), - "source": ( - SourceTypeEnum.from_dict(obj.get("source")) - if obj.get("source") is not None - else None - ), + "source": SourceTypeEnum.from_dict(obj.get("source")) + if obj.get("source") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/content_item_with_id.py b/python_client/mozart_api/models/content_item_with_id.py index ec686fb..151d7d8 100644 --- a/python_client/mozart_api/models/content_item_with_id.py +++ b/python_client/mozart_api/models/content_item_with_id.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> ContentItemWithId: _obj = ContentItemWithId.parse_obj( { - "content": ( - ContentItem.from_dict(obj.get("content")) - if obj.get("content") is not None - else None - ), + "content": ContentItem.from_dict(obj.get("content")) + if obj.get("content") is not None + else None, "id": obj.get("id"), } ) diff --git a/python_client/mozart_api/models/directivity.py b/python_client/mozart_api/models/directivity.py index 683b1aa..38d55a7 100644 --- a/python_client/mozart_api/models/directivity.py +++ b/python_client/mozart_api/models/directivity.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr, validator diff --git a/python_client/mozart_api/models/directivity_feature.py b/python_client/mozart_api/models/directivity_feature.py index dcecb11..e3ed44c 100644 --- a/python_client/mozart_api/models/directivity_feature.py +++ b/python_client/mozart_api/models/directivity_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -104,16 +102,12 @@ def from_dict(cls, obj: dict) -> DirectivityFeature: _obj = DirectivityFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Directivity.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Directivity.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Directivity.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Directivity.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/directivity_range.py b/python_client/mozart_api/models/directivity_range.py index 9943403..7d4b6bf 100644 --- a/python_client/mozart_api/models/directivity_range.py +++ b/python_client/mozart_api/models/directivity_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> DirectivityRange: _obj = DirectivityRange.parse_obj( { - "default": ( - Directivity.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Directivity.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Directivity.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Directivity.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/error_model.py b/python_client/mozart_api/models/error_model.py index 2ad7730..2f91636 100644 --- a/python_client/mozart_api/models/error_model.py +++ b/python_client/mozart_api/models/error_model.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/fader.py b/python_client/mozart_api/models/fader.py index 689de36..8a2e122 100644 --- a/python_client/mozart_api/models/fader.py +++ b/python_client/mozart_api/models/fader.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/fader_feature.py b/python_client/mozart_api/models/fader_feature.py index de77ea2..2311ad6 100644 --- a/python_client/mozart_api/models/fader_feature.py +++ b/python_client/mozart_api/models/fader_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,12 @@ def from_dict(cls, obj: dict) -> FaderFeature: _obj = FaderFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Fader.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Fader.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Fader.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Fader.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/fader_range.py b/python_client/mozart_api/models/fader_range.py index 094694d..d8e33b1 100644 --- a/python_client/mozart_api/models/fader_range.py +++ b/python_client/mozart_api/models/fader_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> FaderRange: _obj = FaderRange.parse_obj( { - "default": ( - Fader.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Fader.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Fader.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Fader.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/hdmi_input.py b/python_client/mozart_api/models/hdmi_input.py index 5065df0..c35c982 100644 --- a/python_client/mozart_api/models/hdmi_input.py +++ b/python_client/mozart_api/models/hdmi_input.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/hdmi_video_format.py b/python_client/mozart_api/models/hdmi_video_format.py index 9b973aa..bd3c2da 100644 --- a/python_client/mozart_api/models/hdmi_video_format.py +++ b/python_client/mozart_api/models/hdmi_video_format.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -81,17 +79,13 @@ def from_dict(cls, obj: dict) -> HdmiVideoFormat: _obj = HdmiVideoFormat.parse_obj( { - "pixel_format": ( - VideoPixelFormat.from_dict(obj.get("pixelFormat")) - if obj.get("pixelFormat") is not None - else None - ), + "pixel_format": VideoPixelFormat.from_dict(obj.get("pixelFormat")) + if obj.get("pixelFormat") is not None + else None, "v_ic": obj.get("vIC"), - "video_timings": ( - VideoTimings.from_dict(obj.get("videoTimings")) - if obj.get("videoTimings") is not None - else None - ), + "video_timings": VideoTimings.from_dict(obj.get("videoTimings")) + if obj.get("videoTimings") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/home_control_ixp.py b/python_client/mozart_api/models/home_control_ixp.py index b19fcee..a7dc0e2 100644 --- a/python_client/mozart_api/models/home_control_ixp.py +++ b/python_client/mozart_api/models/home_control_ixp.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/home_control_uri.py b/python_client/mozart_api/models/home_control_uri.py index 6133eeb..d75091c 100644 --- a/python_client/mozart_api/models/home_control_uri.py +++ b/python_client/mozart_api/models/home_control_uri.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/install_record_id_state.py b/python_client/mozart_api/models/install_record_id_state.py index ed5e261..d6d44ff 100644 --- a/python_client/mozart_api/models/install_record_id_state.py +++ b/python_client/mozart_api/models/install_record_id_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/latency_profile.py b/python_client/mozart_api/models/latency_profile.py index 80ed399..082c1a4 100644 --- a/python_client/mozart_api/models/latency_profile.py +++ b/python_client/mozart_api/models/latency_profile.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,10 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("performance", "quality"): + if value not in ( + "performance", + "quality", + ): raise ValueError("must be one of enum values ('performance', 'quality')") return value diff --git a/python_client/mozart_api/models/lge_tv_sound_settings.py b/python_client/mozart_api/models/lge_tv_sound_settings.py index fcf0096..c31a64c 100644 --- a/python_client/mozart_api/models/lge_tv_sound_settings.py +++ b/python_client/mozart_api/models/lge_tv_sound_settings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -43,7 +41,12 @@ def digital_output_validate_enum(cls, value): if value is None: return value - if value not in ("auto", "passThrough", "pcm", "unknown"): + if value not in ( + "auto", + "passThrough", + "pcm", + "unknown", + ): raise ValueError( "must be one of enum values ('auto', 'passThrough', 'pcm', 'unknown')" ) diff --git a/python_client/mozart_api/models/listening_mode.py b/python_client/mozart_api/models/listening_mode.py index b490585..cd2dfef 100644 --- a/python_client/mozart_api/models/listening_mode.py +++ b/python_client/mozart_api/models/listening_mode.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -67,7 +65,11 @@ def origin_validate_enum(cls, value): if value is None: return value - if value not in ("user", "default", "edited"): + if value not in ( + "user", + "default", + "edited", + ): raise ValueError("must be one of enum values ('user', 'default', 'edited')") return value @@ -77,7 +79,11 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("standalone", "multichannel", "all"): + if value not in ( + "standalone", + "multichannel", + "all", + ): raise ValueError( "must be one of enum values ('standalone', 'multichannel', 'all')" ) @@ -139,23 +145,19 @@ def from_dict(cls, obj: dict) -> ListeningMode: _obj = ListeningMode.parse_obj( { "client_ctx": obj.get("clientCtx"), - "features": ( - ListeningModeFeatures.from_dict(obj.get("features")) - if obj.get("features") is not None - else None - ), + "features": ListeningModeFeatures.from_dict(obj.get("features")) + if obj.get("features") is not None + else None, "id": obj.get("id"), "name": obj.get("name"), "origin": obj.get("origin"), "role": obj.get("role"), - "triggers": ( - [ - ListeningModeTrigger.from_dict(_item) - for _item in obj.get("triggers") - ] - if obj.get("triggers") is not None - else None - ), + "triggers": [ + ListeningModeTrigger.from_dict(_item) + for _item in obj.get("triggers") + ] + if obj.get("triggers") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/listening_mode_features.py b/python_client/mozart_api/models/listening_mode_features.py index 988cc43..cd46e68 100644 --- a/python_client/mozart_api/models/listening_mode_features.py +++ b/python_client/mozart_api/models/listening_mode_features.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -165,76 +163,56 @@ def from_dict(cls, obj: dict) -> ListeningModeFeatures: _obj = ListeningModeFeatures.parse_obj( { - "ambience": ( - Ambience.from_dict(obj.get("ambience")) - if obj.get("ambience") is not None - else None - ), - "balance": ( - Balance.from_dict(obj.get("balance")) - if obj.get("balance") is not None - else None - ), - "bass_management": ( - BassManagement.from_dict(obj.get("bassManagement")) - if obj.get("bassManagement") is not None - else None - ), - "compression": ( - Compression.from_dict(obj.get("compression")) - if obj.get("compression") is not None - else None - ), - "directivity": ( - Directivity.from_dict(obj.get("directivity")) - if obj.get("directivity") is not None - else None - ), - "fader": ( - Fader.from_dict(obj.get("fader")) - if obj.get("fader") is not None - else None - ), - "room_compensation": ( - RoomCompensation.from_dict(obj.get("roomCompensation")) - if obj.get("roomCompensation") is not None - else None - ), - "spatial_envelopment": ( - SpatialEnvelopment.from_dict(obj.get("spatialEnvelopment")) - if obj.get("spatialEnvelopment") is not None - else None - ), - "spatial_height": ( - SpatialHeight.from_dict(obj.get("spatialHeight")) - if obj.get("spatialHeight") is not None - else None - ), - "spatial_processing": ( - SpatialProcessing.from_dict(obj.get("spatialProcessing")) - if obj.get("spatialProcessing") is not None - else None - ), - "spatial_surround": ( - SpatialSurround.from_dict(obj.get("spatialSurround")) - if obj.get("spatialSurround") is not None - else None - ), - "spatial_width": ( - SpatialWidth.from_dict(obj.get("spatialWidth")) - if obj.get("spatialWidth") is not None - else None - ), - "speech_enhance": ( - SpeechEnhance.from_dict(obj.get("speechEnhance")) - if obj.get("speechEnhance") is not None - else None - ), - "tone_touch": ( - ToneTouch.from_dict(obj.get("toneTouch")) - if obj.get("toneTouch") is not None - else None - ), + "ambience": Ambience.from_dict(obj.get("ambience")) + if obj.get("ambience") is not None + else None, + "balance": Balance.from_dict(obj.get("balance")) + if obj.get("balance") is not None + else None, + "bass_management": BassManagement.from_dict(obj.get("bassManagement")) + if obj.get("bassManagement") is not None + else None, + "compression": Compression.from_dict(obj.get("compression")) + if obj.get("compression") is not None + else None, + "directivity": Directivity.from_dict(obj.get("directivity")) + if obj.get("directivity") is not None + else None, + "fader": Fader.from_dict(obj.get("fader")) + if obj.get("fader") is not None + else None, + "room_compensation": RoomCompensation.from_dict( + obj.get("roomCompensation") + ) + if obj.get("roomCompensation") is not None + else None, + "spatial_envelopment": SpatialEnvelopment.from_dict( + obj.get("spatialEnvelopment") + ) + if obj.get("spatialEnvelopment") is not None + else None, + "spatial_height": SpatialHeight.from_dict(obj.get("spatialHeight")) + if obj.get("spatialHeight") is not None + else None, + "spatial_processing": SpatialProcessing.from_dict( + obj.get("spatialProcessing") + ) + if obj.get("spatialProcessing") is not None + else None, + "spatial_surround": SpatialSurround.from_dict( + obj.get("spatialSurround") + ) + if obj.get("spatialSurround") is not None + else None, + "spatial_width": SpatialWidth.from_dict(obj.get("spatialWidth")) + if obj.get("spatialWidth") is not None + else None, + "speech_enhance": SpeechEnhance.from_dict(obj.get("speechEnhance")) + if obj.get("speechEnhance") is not None + else None, + "tone_touch": ToneTouch.from_dict(obj.get("toneTouch")) + if obj.get("toneTouch") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/listening_mode_props.py b/python_client/mozart_api/models/listening_mode_props.py index 43920f7..94f1718 100644 --- a/python_client/mozart_api/models/listening_mode_props.py +++ b/python_client/mozart_api/models/listening_mode_props.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -67,7 +65,11 @@ def origin_validate_enum(cls, value): if value is None: return value - if value not in ("user", "default", "edited"): + if value not in ( + "user", + "default", + "edited", + ): raise ValueError("must be one of enum values ('user', 'default', 'edited')") return value @@ -77,7 +79,11 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in ("standalone", "multichannel", "all"): + if value not in ( + "standalone", + "multichannel", + "all", + ): raise ValueError( "must be one of enum values ('standalone', 'multichannel', 'all')" ) @@ -139,23 +145,19 @@ def from_dict(cls, obj: dict) -> ListeningModeProps: _obj = ListeningModeProps.parse_obj( { "client_ctx": obj.get("clientCtx"), - "features": ( - ListeningModeFeatures.from_dict(obj.get("features")) - if obj.get("features") is not None - else None - ), + "features": ListeningModeFeatures.from_dict(obj.get("features")) + if obj.get("features") is not None + else None, "id": obj.get("id"), "name": obj.get("name"), "origin": obj.get("origin"), "role": obj.get("role"), - "triggers": ( - [ - ListeningModeTrigger.from_dict(_item) - for _item in obj.get("triggers") - ] - if obj.get("triggers") is not None - else None - ), + "triggers": [ + ListeningModeTrigger.from_dict(_item) + for _item in obj.get("triggers") + ] + if obj.get("triggers") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/listening_mode_ref.py b/python_client/mozart_api/models/listening_mode_ref.py index 6a5b89a..3da0761 100644 --- a/python_client/mozart_api/models/listening_mode_ref.py +++ b/python_client/mozart_api/models/listening_mode_ref.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/listening_mode_trigger.py b/python_client/mozart_api/models/listening_mode_trigger.py index c9a3e0e..8cc4e6e 100644 --- a/python_client/mozart_api/models/listening_mode_trigger.py +++ b/python_client/mozart_api/models/listening_mode_trigger.py @@ -1,24 +1,23 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations -from inspect import getfullargspec + import json import pprint import re # noqa: F401 - +from inspect import getfullargspec from typing import Any, List, Optional try: @@ -26,13 +25,14 @@ except ImportError: from pydantic import BaseModel, Field, StrictStr, ValidationError, validator +from typing import TYPE_CHECKING, Any, List, Union + from mozart_api.models.power_link_trigger import PowerLinkTrigger -from typing import Union, Any, List, TYPE_CHECKING try: - from pydantic.v1 import StrictStr, Field + from pydantic.v1 import Field, StrictStr except ImportError: - from pydantic import StrictStr, Field + from pydantic import Field, StrictStr LISTENINGMODETRIGGER_ONE_OF_SCHEMAS = ["PowerLinkTrigger"] diff --git a/python_client/mozart_api/models/loudness.py b/python_client/mozart_api/models/loudness.py index d8e46b9..28d7eac 100644 --- a/python_client/mozart_api/models/loudness.py +++ b/python_client/mozart_api/models/loudness.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/microphone_state.py b/python_client/mozart_api/models/microphone_state.py index 2a2277f..9300461 100644 --- a/python_client/mozart_api/models/microphone_state.py +++ b/python_client/mozart_api/models/microphone_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,10 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("on", "off"): + if value not in ( + "on", + "off", + ): raise ValueError("must be one of enum values ('on', 'off')") return value diff --git a/python_client/mozart_api/models/microphones_state.py b/python_client/mozart_api/models/microphones_state.py index 33928c3..1801178 100644 --- a/python_client/mozart_api/models/microphones_state.py +++ b/python_client/mozart_api/models/microphones_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -83,16 +81,16 @@ def from_dict(cls, obj: dict) -> MicrophonesState: _obj = MicrophonesState.parse_obj( { - "microphone_state": ( - MicrophoneState.from_dict(obj.get("microphoneState")) - if obj.get("microphoneState") is not None - else None - ), - "microphone_switch_state": ( - MicrophoneState.from_dict(obj.get("microphoneSwitchState")) - if obj.get("microphoneSwitchState") is not None - else None - ), + "microphone_state": MicrophoneState.from_dict( + obj.get("microphoneState") + ) + if obj.get("microphoneState") is not None + else None, + "microphone_switch_state": MicrophoneState.from_dict( + obj.get("microphoneSwitchState") + ) + if obj.get("microphoneSwitchState") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/overlay_play_request.py b/python_client/mozart_api/models/overlay_play_request.py index f80d6a7..f3bf5cc 100644 --- a/python_client/mozart_api/models/overlay_play_request.py +++ b/python_client/mozart_api/models/overlay_play_request.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -104,23 +102,19 @@ def from_dict(cls, obj: dict) -> OverlayPlayRequest: _obj = OverlayPlayRequest.parse_obj( { "volume_absolute": obj.get("volumeAbsolute"), - "uri": ( - Uri.from_dict(obj.get("uri")) - if obj.get("uri") is not None - else None - ), - "text_to_speech": ( - OverlayPlayRequestTextToSpeechTextToSpeech.from_dict( - obj.get("textToSpeech") - ) - if obj.get("textToSpeech") is not None - else None - ), - "from_usb": ( - OverlayPlayRequestFromUsbFromUsb.from_dict(obj.get("fromUsb")) - if obj.get("fromUsb") is not None - else None - ), + "uri": Uri.from_dict(obj.get("uri")) + if obj.get("uri") is not None + else None, + "text_to_speech": OverlayPlayRequestTextToSpeechTextToSpeech.from_dict( + obj.get("textToSpeech") + ) + if obj.get("textToSpeech") is not None + else None, + "from_usb": OverlayPlayRequestFromUsbFromUsb.from_dict( + obj.get("fromUsb") + ) + if obj.get("fromUsb") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/overlay_play_request_common.py b/python_client/mozart_api/models/overlay_play_request_common.py index 899c7d6..03fec71 100644 --- a/python_client/mozart_api/models/overlay_play_request_common.py +++ b/python_client/mozart_api/models/overlay_play_request_common.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/overlay_play_request_from_usb.py b/python_client/mozart_api/models/overlay_play_request_from_usb.py index 88d2ac4..3f5c7e8 100644 --- a/python_client/mozart_api/models/overlay_play_request_from_usb.py +++ b/python_client/mozart_api/models/overlay_play_request_from_usb.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -79,11 +77,11 @@ def from_dict(cls, obj: dict) -> OverlayPlayRequestFromUsb: _obj = OverlayPlayRequestFromUsb.parse_obj( { - "from_usb": ( - OverlayPlayRequestFromUsbFromUsb.from_dict(obj.get("fromUsb")) - if obj.get("fromUsb") is not None - else None + "from_usb": OverlayPlayRequestFromUsbFromUsb.from_dict( + obj.get("fromUsb") ) + if obj.get("fromUsb") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/overlay_play_request_from_usb_from_usb.py b/python_client/mozart_api/models/overlay_play_request_from_usb_from_usb.py index 7b4f45e..3b82f70 100644 --- a/python_client/mozart_api/models/overlay_play_request_from_usb_from_usb.py +++ b/python_client/mozart_api/models/overlay_play_request_from_usb_from_usb.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, constr diff --git a/python_client/mozart_api/models/overlay_play_request_text_to_speech.py b/python_client/mozart_api/models/overlay_play_request_text_to_speech.py index 67c1689..8b3a95c 100644 --- a/python_client/mozart_api/models/overlay_play_request_text_to_speech.py +++ b/python_client/mozart_api/models/overlay_play_request_text_to_speech.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -79,13 +77,11 @@ def from_dict(cls, obj: dict) -> OverlayPlayRequestTextToSpeech: _obj = OverlayPlayRequestTextToSpeech.parse_obj( { - "text_to_speech": ( - OverlayPlayRequestTextToSpeechTextToSpeech.from_dict( - obj.get("textToSpeech") - ) - if obj.get("textToSpeech") is not None - else None + "text_to_speech": OverlayPlayRequestTextToSpeechTextToSpeech.from_dict( + obj.get("textToSpeech") ) + if obj.get("textToSpeech") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/overlay_play_request_text_to_speech_text_to_speech.py b/python_client/mozart_api/models/overlay_play_request_text_to_speech_text_to_speech.py index e4a0a75..d01d5fd 100644 --- a/python_client/mozart_api/models/overlay_play_request_text_to_speech_text_to_speech.py +++ b/python_client/mozart_api/models/overlay_play_request_text_to_speech_text_to_speech.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/overlay_play_request_uri.py b/python_client/mozart_api/models/overlay_play_request_uri.py index db7ff67..0a50450 100644 --- a/python_client/mozart_api/models/overlay_play_request_uri.py +++ b/python_client/mozart_api/models/overlay_play_request_uri.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -75,11 +73,9 @@ def from_dict(cls, obj: dict) -> OverlayPlayRequestUri: _obj = OverlayPlayRequestUri.parse_obj( { - "uri": ( - Uri.from_dict(obj.get("uri")) - if obj.get("uri") is not None - else None - ) + "uri": Uri.from_dict(obj.get("uri")) + if obj.get("uri") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/paired_remote.py b/python_client/mozart_api/models/paired_remote.py index 7423ad6..88d0c21 100644 --- a/python_client/mozart_api/models/paired_remote.py +++ b/python_client/mozart_api/models/paired_remote.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime from typing import List, Optional @@ -78,7 +77,10 @@ def updated_validate_enum(cls, value): return value for i in value: - if i not in ("app", "db"): + if i not in ( + "app", + "db", + ): raise ValueError("each list item must be one of ('app', 'db')") return value diff --git a/python_client/mozart_api/models/paired_remote_response.py b/python_client/mozart_api/models/paired_remote_response.py index ac00183..47569b2 100644 --- a/python_client/mozart_api/models/paired_remote_response.py +++ b/python_client/mozart_api/models/paired_remote_response.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -79,11 +77,9 @@ def from_dict(cls, obj: dict) -> PairedRemoteResponse: _obj = PairedRemoteResponse.parse_obj( { - "items": ( - [PairedRemote.from_dict(_item) for _item in obj.get("items")] - if obj.get("items") is not None - else None - ) + "items": [PairedRemote.from_dict(_item) for _item in obj.get("items")] + if obj.get("items") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/play_queue_item.py b/python_client/mozart_api/models/play_queue_item.py index ba05526..a9e700a 100644 --- a/python_client/mozart_api/models/play_queue_item.py +++ b/python_client/mozart_api/models/play_queue_item.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -69,7 +67,12 @@ def playlist_sort_by_validate_enum(cls, value): if value is None: return value - if value not in ("name", "artist", "date", "album"): + if value not in ( + "name", + "artist", + "date", + "album", + ): raise ValueError( "must be one of enum values ('name', 'artist', 'date', 'album')" ) @@ -78,7 +81,10 @@ def playlist_sort_by_validate_enum(cls, value): @validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in ("track", "playlist"): + if value not in ( + "track", + "playlist", + ): raise ValueError("must be one of enum values ('track', 'playlist')") return value @@ -137,17 +143,13 @@ def from_dict(cls, obj: dict) -> PlayQueueItem: _obj = PlayQueueItem.parse_obj( { "index": obj.get("index"), - "metadata": ( - PlaybackContentMetadata.from_dict(obj.get("metadata")) - if obj.get("metadata") is not None - else None - ), + "metadata": PlaybackContentMetadata.from_dict(obj.get("metadata")) + if obj.get("metadata") is not None + else None, "playlist_sort_by": obj.get("playlistSortBy"), - "provider": ( - PlayQueueItemType.from_dict(obj.get("provider")) - if obj.get("provider") is not None - else None - ), + "provider": PlayQueueItemType.from_dict(obj.get("provider")) + if obj.get("provider") is not None + else None, "start_now_from_position": obj.get("startNowFromPosition"), "type": obj.get("type"), "uri": obj.get("uri"), diff --git a/python_client/mozart_api/models/play_queue_item_type.py b/python_client/mozart_api/models/play_queue_item_type.py index 0c6aa9d..eb48dd6 100644 --- a/python_client/mozart_api/models/play_queue_item_type.py +++ b/python_client/mozart_api/models/play_queue_item_type.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr, validator @@ -36,7 +35,14 @@ class PlayQueueItemType(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("uri", "dlna", "radio", "deezer", "beoCloud", "tidal"): + if value not in ( + "uri", + "dlna", + "radio", + "deezer", + "beoCloud", + "tidal", + ): raise ValueError( "must be one of enum values ('uri', 'dlna', 'radio', 'deezer', 'beoCloud', 'tidal')" ) diff --git a/python_client/mozart_api/models/play_queue_settings.py b/python_client/mozart_api/models/play_queue_settings.py index d9fef20..b9562aa 100644 --- a/python_client/mozart_api/models/play_queue_settings.py +++ b/python_client/mozart_api/models/play_queue_settings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -44,7 +42,11 @@ def repeat_validate_enum(cls, value): if value is None: return value - if value not in ("all", "track", "none"): + if value not in ( + "all", + "track", + "none", + ): raise ValueError("must be one of enum values ('all', 'track', 'none')") return value diff --git a/python_client/mozart_api/models/playback_content_metadata.py b/python_client/mozart_api/models/playback_content_metadata.py index c22b742..1ce0922 100644 --- a/python_client/mozart_api/models/playback_content_metadata.py +++ b/python_client/mozart_api/models/playback_content_metadata.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -163,7 +161,10 @@ def input_channel_processing_validate_enum(cls, value): if value is None: return value - if value not in ("dolbySurround", "dolbyAtmos"): + if value not in ( + "dolbySurround", + "dolbyAtmos", + ): raise ValueError( "must be one of enum values ('dolbySurround', 'dolbyAtmos')" ) @@ -175,7 +176,11 @@ def output_channel_processing_validate_enum(cls, value): if value is None: return value - if value not in ("Direct", "Downmix", "TrueImage"): + if value not in ( + "Direct", + "Downmix", + "TrueImage", + ): raise ValueError( "must be one of enum values ('Direct', 'Downmix', 'TrueImage')" ) @@ -271,11 +276,9 @@ def from_dict(cls, obj: dict) -> PlaybackContentMetadata: _obj = PlaybackContentMetadata.parse_obj( { "album_name": obj.get("albumName"), - "art": ( - [Art.from_dict(_item) for _item in obj.get("art")] - if obj.get("art") is not None - else None - ), + "art": [Art.from_dict(_item) for _item in obj.get("art")] + if obj.get("art") is not None + else None, "artist_name": obj.get("artistName"), "bitdepth": obj.get("bitdepth"), "bitrate": obj.get("bitrate"), @@ -290,11 +293,9 @@ def from_dict(cls, obj: dict) -> PlaybackContentMetadata: "output_channel_processing": obj.get("outputChannelProcessing"), "output_channels": obj.get("outputChannels"), "queue_id": obj.get("queueId"), - "remote_leader": ( - BeolinkLeader.from_dict(obj.get("remoteLeader")) - if obj.get("remoteLeader") is not None - else None - ), + "remote_leader": BeolinkLeader.from_dict(obj.get("remoteLeader")) + if obj.get("remoteLeader") is not None + else None, "remote_source": obj.get("remoteSource"), "samplerate": obj.get("samplerate"), "source": obj.get("source"), diff --git a/python_client/mozart_api/models/playback_error.py b/python_client/mozart_api/models/playback_error.py index 2858054..b5c1300 100644 --- a/python_client/mozart_api/models/playback_error.py +++ b/python_client/mozart_api/models/playback_error.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -77,11 +75,9 @@ def from_dict(cls, obj: dict) -> PlaybackError: _obj = PlaybackError.parse_obj( { "error": obj.get("error"), - "item": ( - PlaybackContentMetadata.from_dict(obj.get("item")) - if obj.get("item") is not None - else None - ), + "item": PlaybackContentMetadata.from_dict(obj.get("item")) + if obj.get("item") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/playback_progress.py b/python_client/mozart_api/models/playback_progress.py index 220da12..53437d5 100644 --- a/python_client/mozart_api/models/playback_progress.py +++ b/python_client/mozart_api/models/playback_progress.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/playback_state.py b/python_client/mozart_api/models/playback_state.py index 0b5315a..7d8055f 100644 --- a/python_client/mozart_api/models/playback_state.py +++ b/python_client/mozart_api/models/playback_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -90,26 +88,18 @@ def from_dict(cls, obj: dict) -> PlaybackState: _obj = PlaybackState.parse_obj( { - "metadata": ( - PlaybackContentMetadata.from_dict(obj.get("metadata")) - if obj.get("metadata") is not None - else None - ), - "progress": ( - PlaybackProgress.from_dict(obj.get("progress")) - if obj.get("progress") is not None - else None - ), - "source": ( - Source.from_dict(obj.get("source")) - if obj.get("source") is not None - else None - ), - "state": ( - RenderingState.from_dict(obj.get("state")) - if obj.get("state") is not None - else None - ), + "metadata": PlaybackContentMetadata.from_dict(obj.get("metadata")) + if obj.get("metadata") is not None + else None, + "progress": PlaybackProgress.from_dict(obj.get("progress")) + if obj.get("progress") is not None + else None, + "source": Source.from_dict(obj.get("source")) + if obj.get("source") is not None + else None, + "state": RenderingState.from_dict(obj.get("state")) + if obj.get("state") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/power_link_trigger.py b/python_client/mozart_api/models/power_link_trigger.py index 4710c7a..deabb3d 100644 --- a/python_client/mozart_api/models/power_link_trigger.py +++ b/python_client/mozart_api/models/power_link_trigger.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/power_state_enum.py b/python_client/mozart_api/models/power_state_enum.py index 1612d76..bcf46a3 100644 --- a/python_client/mozart_api/models/power_state_enum.py +++ b/python_client/mozart_api/models/power_state_enum.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,13 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("networkStandby", "on", "standby", "shutdown", "storage"): + if value not in ( + "networkStandby", + "on", + "standby", + "shutdown", + "storage", + ): raise ValueError( "must be one of enum values ('networkStandby', 'on', 'standby', 'shutdown', 'storage')" ) diff --git a/python_client/mozart_api/models/powerlink_connection_state_enum.py b/python_client/mozart_api/models/powerlink_connection_state_enum.py index 342c84f..943ce5b 100644 --- a/python_client/mozart_api/models/powerlink_connection_state_enum.py +++ b/python_client/mozart_api/models/powerlink_connection_state_enum.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,11 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("disabled", "enabledPendingData", "enabledWithData"): + if value not in ( + "disabled", + "enabledPendingData", + "enabledWithData", + ): raise ValueError( "must be one of enum values ('disabled', 'enabledPendingData', 'enabledWithData')" ) diff --git a/python_client/mozart_api/models/preset.py b/python_client/mozart_api/models/preset.py index ea1ccc7..ea0f503 100644 --- a/python_client/mozart_api/models/preset.py +++ b/python_client/mozart_api/models/preset.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -112,24 +110,20 @@ def from_dict(cls, obj: dict) -> Preset: _obj = Preset.parse_obj( { - "action_list": ( - [Action.from_dict(_item) for _item in obj.get("actionList")] - if obj.get("actionList") is not None - else None - ), + "action_list": [ + Action.from_dict(_item) for _item in obj.get("actionList") + ] + if obj.get("actionList") is not None + else None, "scene_list": obj.get("sceneList"), - "content": ( - ContentItem.from_dict(obj.get("content")) - if obj.get("content") is not None - else None - ), + "content": ContentItem.from_dict(obj.get("content")) + if obj.get("content") is not None + else None, "id": obj.get("id"), "name": obj.get("name"), - "source": ( - SourceTypeEnum.from_dict(obj.get("source")) - if obj.get("source") is not None - else None - ), + "source": SourceTypeEnum.from_dict(obj.get("source")) + if obj.get("source") is not None + else None, "title": obj.get("title"), } ) diff --git a/python_client/mozart_api/models/product_curtain_status.py b/python_client/mozart_api/models/product_curtain_status.py index ba0ef21..5d10c43 100644 --- a/python_client/mozart_api/models/product_curtain_status.py +++ b/python_client/mozart_api/models/product_curtain_status.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -42,7 +40,12 @@ def position_validate_enum(cls, value): if value is None: return value - if value not in ("unknown", "closed", "narrow", "wide"): + if value not in ( + "unknown", + "closed", + "narrow", + "wide", + ): raise ValueError( "must be one of enum values ('unknown', 'closed', 'narrow', 'wide')" ) diff --git a/python_client/mozart_api/models/product_friendly_name.py b/python_client/mozart_api/models/product_friendly_name.py index 145355c..3fa868d 100644 --- a/python_client/mozart_api/models/product_friendly_name.py +++ b/python_client/mozart_api/models/product_friendly_name.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/product_state.py b/python_client/mozart_api/models/product_state.py index 1109ad5..ecf198a 100644 --- a/python_client/mozart_api/models/product_state.py +++ b/python_client/mozart_api/models/product_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -121,46 +119,32 @@ def from_dict(cls, obj: dict) -> ProductState: _obj = ProductState.parse_obj( { - "microphones": ( - MicrophonesState.from_dict(obj.get("microphones")) - if obj.get("microphones") is not None - else None - ), - "playback": ( - PlaybackState.from_dict(obj.get("playback")) - if obj.get("playback") is not None - else None - ), - "power_state": ( - PowerStateEnum.from_dict(obj.get("powerState")) - if obj.get("powerState") is not None - else None - ), - "software_update_state": ( - SoftwareUpdateState.from_dict(obj.get("softwareUpdateState")) - if obj.get("softwareUpdateState") is not None - else None - ), - "sound_settings": ( - SoundSettings.from_dict(obj.get("soundSettings")) - if obj.get("soundSettings") is not None - else None - ), - "source": ( - Source.from_dict(obj.get("source")) - if obj.get("source") is not None - else None - ), - "tv": ( - TvState.from_dict(obj.get("tv")) - if obj.get("tv") is not None - else None - ), - "volume": ( - VolumeState.from_dict(obj.get("volume")) - if obj.get("volume") is not None - else None - ), + "microphones": MicrophonesState.from_dict(obj.get("microphones")) + if obj.get("microphones") is not None + else None, + "playback": PlaybackState.from_dict(obj.get("playback")) + if obj.get("playback") is not None + else None, + "power_state": PowerStateEnum.from_dict(obj.get("powerState")) + if obj.get("powerState") is not None + else None, + "software_update_state": SoftwareUpdateState.from_dict( + obj.get("softwareUpdateState") + ) + if obj.get("softwareUpdateState") is not None + else None, + "sound_settings": SoundSettings.from_dict(obj.get("soundSettings")) + if obj.get("soundSettings") is not None + else None, + "source": Source.from_dict(obj.get("source")) + if obj.get("source") is not None + else None, + "tv": TvState.from_dict(obj.get("tv")) + if obj.get("tv") is not None + else None, + "volume": VolumeState.from_dict(obj.get("volume")) + if obj.get("volume") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/remote_menu_item.py b/python_client/mozart_api/models/remote_menu_item.py index 3225a3b..db9a98f 100644 --- a/python_client/mozart_api/models/remote_menu_item.py +++ b/python_client/mozart_api/models/remote_menu_item.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -94,7 +92,10 @@ def dynamic_list_validate_enum(cls, value): if value is None: return value - if value not in ("none", "radioFavorites"): + if value not in ( + "none", + "radioFavorites", + ): raise ValueError("must be one of enum values ('none', 'radioFavorites')") return value @@ -187,11 +188,11 @@ def from_dict(cls, obj: dict) -> RemoteMenuItem: _obj = RemoteMenuItem.parse_obj( { - "action_list": ( - [Action.from_dict(_item) for _item in obj.get("actionList")] - if obj.get("actionList") is not None - else None - ), + "action_list": [ + Action.from_dict(_item) for _item in obj.get("actionList") + ] + if obj.get("actionList") is not None + else None, "scene_list": obj.get("sceneList"), "disabled": obj.get("disabled"), "dynamic_list": obj.get("dynamicList"), @@ -200,11 +201,9 @@ def from_dict(cls, obj: dict) -> RemoteMenuItem: "next_sibling_menu_item_id": obj.get("nextSiblingMenuItemId"), "parent_menu_item_id": obj.get("parentMenuItemId"), "available": obj.get("available"), - "content": ( - ContentItem.from_dict(obj.get("content")) - if obj.get("content") is not None - else None - ), + "content": ContentItem.from_dict(obj.get("content")) + if obj.get("content") is not None + else None, "fixed": obj.get("fixed"), "id": obj.get("id"), } diff --git a/python_client/mozart_api/models/remote_menu_item_properties.py b/python_client/mozart_api/models/remote_menu_item_properties.py index 292f6ed..4940a47 100644 --- a/python_client/mozart_api/models/remote_menu_item_properties.py +++ b/python_client/mozart_api/models/remote_menu_item_properties.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -82,7 +80,10 @@ def dynamic_list_validate_enum(cls, value): if value is None: return value - if value not in ("none", "radioFavorites"): + if value not in ( + "none", + "radioFavorites", + ): raise ValueError("must be one of enum values ('none', 'radioFavorites')") return value @@ -167,11 +168,11 @@ def from_dict(cls, obj: dict) -> RemoteMenuItemProperties: _obj = RemoteMenuItemProperties.parse_obj( { - "action_list": ( - [Action.from_dict(_item) for _item in obj.get("actionList")] - if obj.get("actionList") is not None - else None - ), + "action_list": [ + Action.from_dict(_item) for _item in obj.get("actionList") + ] + if obj.get("actionList") is not None + else None, "scene_list": obj.get("sceneList"), "disabled": obj.get("disabled"), "dynamic_list": obj.get("dynamicList"), diff --git a/python_client/mozart_api/models/remote_ui_key_state.py b/python_client/mozart_api/models/remote_ui_key_state.py index e0f7701..49afed5 100644 --- a/python_client/mozart_api/models/remote_ui_key_state.py +++ b/python_client/mozart_api/models/remote_ui_key_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -44,7 +42,13 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ("ShortPress", "LongPress", "Down", "Continue", "Release"): + if value not in ( + "ShortPress", + "LongPress", + "Down", + "Continue", + "Release", + ): raise ValueError( "must be one of enum values ('ShortPress', 'LongPress', 'Down', 'Continue', 'Release')" ) diff --git a/python_client/mozart_api/models/rendering_state.py b/python_client/mozart_api/models/rendering_state.py index cf6d756..d309732 100644 --- a/python_client/mozart_api/models/rendering_state.py +++ b/python_client/mozart_api/models/rendering_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/room_compensation.py b/python_client/mozart_api/models/room_compensation.py index 13c8f94..a75ffd6 100644 --- a/python_client/mozart_api/models/room_compensation.py +++ b/python_client/mozart_api/models/room_compensation.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: diff --git a/python_client/mozart_api/models/room_compensation_current_measurement.py b/python_client/mozart_api/models/room_compensation_current_measurement.py index 3242b59..8c653b3 100644 --- a/python_client/mozart_api/models/room_compensation_current_measurement.py +++ b/python_client/mozart_api/models/room_compensation_current_measurement.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -45,7 +43,12 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ("started", "done", "lastDone", "error"): + if value not in ( + "started", + "done", + "lastDone", + "error", + ): raise ValueError( "must be one of enum values ('started', 'done', 'lastDone', 'error')" ) diff --git a/python_client/mozart_api/models/room_compensation_debug.py b/python_client/mozart_api/models/room_compensation_debug.py index 67162f2..7fd54f2 100644 --- a/python_client/mozart_api/models/room_compensation_debug.py +++ b/python_client/mozart_api/models/room_compensation_debug.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/room_compensation_enabled.py b/python_client/mozart_api/models/room_compensation_enabled.py index bb44573..5b67593 100644 --- a/python_client/mozart_api/models/room_compensation_enabled.py +++ b/python_client/mozart_api/models/room_compensation_enabled.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/room_compensation_error_details.py b/python_client/mozart_api/models/room_compensation_error_details.py index 1136421..f5a783b 100644 --- a/python_client/mozart_api/models/room_compensation_error_details.py +++ b/python_client/mozart_api/models/room_compensation_error_details.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -85,14 +83,12 @@ def from_dict(cls, obj: dict) -> RoomCompensationErrorDetails: _obj = RoomCompensationErrorDetails.parse_obj( { - "error_list": ( - [ - RoomCompensationMeasurementError.from_dict(_item) - for _item in obj.get("errorList") - ] - if obj.get("errorList") is not None - else None - ) + "error_list": [ + RoomCompensationMeasurementError.from_dict(_item) + for _item in obj.get("errorList") + ] + if obj.get("errorList") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/room_compensation_feature.py b/python_client/mozart_api/models/room_compensation_feature.py index 41e84bb..97b9b33 100644 --- a/python_client/mozart_api/models/room_compensation_feature.py +++ b/python_client/mozart_api/models/room_compensation_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: diff --git a/python_client/mozart_api/models/room_compensation_info.py b/python_client/mozart_api/models/room_compensation_info.py index 89b551f..86c89e7 100644 --- a/python_client/mozart_api/models/room_compensation_info.py +++ b/python_client/mozart_api/models/room_compensation_info.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -102,36 +100,24 @@ def from_dict(cls, obj: dict) -> RoomCompensationInfo: _obj = RoomCompensationInfo.parse_obj( { - "debug": ( - RoomCompensationDebug.from_dict(obj.get("debug")) - if obj.get("debug") is not None - else None - ), - "enabled": ( - RoomCompensationEnabled.from_dict(obj.get("enabled")) - if obj.get("enabled") is not None - else None - ), - "last_result": ( - RoomCompensationResult.from_dict(obj.get("lastResult")) - if obj.get("lastResult") is not None - else None - ), - "last_run": ( - RoomCompensationState.from_dict(obj.get("lastRun")) - if obj.get("lastRun") is not None - else None - ), - "type": ( - RoomCompensationType.from_dict(obj.get("type")) - if obj.get("type") is not None - else None - ), - "version": ( - RoomCompensationVersion.from_dict(obj.get("version")) - if obj.get("version") is not None - else None - ), + "debug": RoomCompensationDebug.from_dict(obj.get("debug")) + if obj.get("debug") is not None + else None, + "enabled": RoomCompensationEnabled.from_dict(obj.get("enabled")) + if obj.get("enabled") is not None + else None, + "last_result": RoomCompensationResult.from_dict(obj.get("lastResult")) + if obj.get("lastResult") is not None + else None, + "last_run": RoomCompensationState.from_dict(obj.get("lastRun")) + if obj.get("lastRun") is not None + else None, + "type": RoomCompensationType.from_dict(obj.get("type")) + if obj.get("type") is not None + else None, + "version": RoomCompensationVersion.from_dict(obj.get("version")) + if obj.get("version") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/room_compensation_measurement_error.py b/python_client/mozart_api/models/room_compensation_measurement_error.py index 55b1584..9d764fe 100644 --- a/python_client/mozart_api/models/room_compensation_measurement_error.py +++ b/python_client/mozart_api/models/room_compensation_measurement_error.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/room_compensation_properties.py b/python_client/mozart_api/models/room_compensation_properties.py index 1751c12..38eed99 100644 --- a/python_client/mozart_api/models/room_compensation_properties.py +++ b/python_client/mozart_api/models/room_compensation_properties.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -97,7 +95,10 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("simple", "advanced"): + if value not in ( + "simple", + "advanced", + ): raise ValueError("must be one of enum values ('simple', 'advanced')") return value @@ -107,7 +108,11 @@ def action_validate_enum(cls, value): if value is None: return value - if value not in ("runAll", "continue", "useSpeakerList"): + if value not in ( + "runAll", + "continue", + "useSpeakerList", + ): raise ValueError( "must be one of enum values ('runAll', 'continue', 'useSpeakerList')" ) @@ -185,11 +190,9 @@ def from_dict(cls, obj: dict) -> RoomCompensationProperties: "value": obj.get("value"), "action": obj.get("action"), "continue_on_error": obj.get("continueOnError"), - "latency_profile": ( - LatencyProfile.from_dict(obj.get("latencyProfile")) - if obj.get("latencyProfile") is not None - else None - ), + "latency_profile": LatencyProfile.from_dict(obj.get("latencyProfile")) + if obj.get("latencyProfile") is not None + else None, "skip_automatic_role_assignment": obj.get( "skipAutomaticRoleAssignment" ), diff --git a/python_client/mozart_api/models/room_compensation_range.py b/python_client/mozart_api/models/room_compensation_range.py index f1d37aa..6b36dfb 100644 --- a/python_client/mozart_api/models/room_compensation_range.py +++ b/python_client/mozart_api/models/room_compensation_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: diff --git a/python_client/mozart_api/models/room_compensation_response.py b/python_client/mozart_api/models/room_compensation_response.py index 43b8235..0a94c5a 100644 --- a/python_client/mozart_api/models/room_compensation_response.py +++ b/python_client/mozart_api/models/room_compensation_response.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: diff --git a/python_client/mozart_api/models/room_compensation_result.py b/python_client/mozart_api/models/room_compensation_result.py index f24033d..b53cf93 100644 --- a/python_client/mozart_api/models/room_compensation_result.py +++ b/python_client/mozart_api/models/room_compensation_result.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime from typing import List, Optional @@ -62,7 +61,11 @@ def placement_validate_enum(cls, value): if value is None: return value - if value not in ("free", "nearWall", "unknown"): + if value not in ( + "free", + "nearWall", + "unknown", + ): raise ValueError( "must be one of enum values ('free', 'nearWall', 'unknown')" ) @@ -127,36 +130,30 @@ def from_dict(cls, obj: dict) -> RoomCompensationResult: _obj = RoomCompensationResult.parse_obj( { - "compensation": ( - [ - RoomCompensationResponse.from_dict(_item) - for _item in obj.get("compensation") - ] - if obj.get("compensation") is not None - else None - ), - "measured_response": ( - [ - RoomCompensationResponse.from_dict(_item) - for _item in obj.get("measuredResponse") - ] - if obj.get("measuredResponse") is not None - else None - ), + "compensation": [ + RoomCompensationResponse.from_dict(_item) + for _item in obj.get("compensation") + ] + if obj.get("compensation") is not None + else None, + "measured_response": [ + RoomCompensationResponse.from_dict(_item) + for _item in obj.get("measuredResponse") + ] + if obj.get("measuredResponse") is not None + else None, "placement": obj.get("placement"), - "reference_response": ( - [ - RoomCompensationResponse.from_dict(_item) - for _item in obj.get("referenceResponse") - ] - if obj.get("referenceResponse") is not None - else None - ), - "speaker_group_suggestion": ( - SpeakerGroup.from_dict(obj.get("speakerGroupSuggestion")) - if obj.get("speakerGroupSuggestion") is not None - else None - ), + "reference_response": [ + RoomCompensationResponse.from_dict(_item) + for _item in obj.get("referenceResponse") + ] + if obj.get("referenceResponse") is not None + else None, + "speaker_group_suggestion": SpeakerGroup.from_dict( + obj.get("speakerGroupSuggestion") + ) + if obj.get("speakerGroupSuggestion") is not None + else None, "time_stamp": obj.get("timeStamp"), } ) diff --git a/python_client/mozart_api/models/room_compensation_state.py b/python_client/mozart_api/models/room_compensation_state.py index f87daca..1f875e4 100644 --- a/python_client/mozart_api/models/room_compensation_state.py +++ b/python_client/mozart_api/models/room_compensation_state.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime from typing import Optional @@ -67,7 +66,13 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ("notStarted", "running", "done", "error", "stopped"): + if value not in ( + "notStarted", + "running", + "done", + "error", + "stopped", + ): raise ValueError( "must be one of enum values ('notStarted', 'running', 'done', 'error', 'stopped')" ) @@ -140,17 +145,17 @@ def from_dict(cls, obj: dict) -> RoomCompensationState: { "state": obj.get("state"), "error": obj.get("error"), - "error_details": ( - RoomCompensationErrorDetails.from_dict(obj.get("errorDetails")) - if obj.get("errorDetails") is not None - else None - ), + "error_details": RoomCompensationErrorDetails.from_dict( + obj.get("errorDetails") + ) + if obj.get("errorDetails") is not None + else None, "last_run_available": obj.get("lastRunAvailable"), - "properties": ( - RoomCompensationProperties.from_dict(obj.get("properties")) - if obj.get("properties") is not None - else None - ), + "properties": RoomCompensationProperties.from_dict( + obj.get("properties") + ) + if obj.get("properties") is not None + else None, "time_stamp": obj.get("timeStamp"), } ) diff --git a/python_client/mozart_api/models/room_compensation_state_value.py b/python_client/mozart_api/models/room_compensation_state_value.py index d77456b..b530db0 100644 --- a/python_client/mozart_api/models/room_compensation_state_value.py +++ b/python_client/mozart_api/models/room_compensation_state_value.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,13 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ("notStarted", "running", "done", "error", "stopped"): + if value not in ( + "notStarted", + "running", + "done", + "error", + "stopped", + ): raise ValueError( "must be one of enum values ('notStarted', 'running', 'done', 'error', 'stopped')" ) diff --git a/python_client/mozart_api/models/room_compensation_type.py b/python_client/mozart_api/models/room_compensation_type.py index 901a888..5edc10a 100644 --- a/python_client/mozart_api/models/room_compensation_type.py +++ b/python_client/mozart_api/models/room_compensation_type.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -44,7 +42,10 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("simple", "advanced"): + if value not in ( + "simple", + "advanced", + ): raise ValueError("must be one of enum values ('simple', 'advanced')") return value diff --git a/python_client/mozart_api/models/room_compensation_version.py b/python_client/mozart_api/models/room_compensation_version.py index 8fafbb8..09c0fe3 100644 --- a/python_client/mozart_api/models/room_compensation_version.py +++ b/python_client/mozart_api/models/room_compensation_version.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/scene.py b/python_client/mozart_api/models/scene.py index df8fe32..01cf350 100644 --- a/python_client/mozart_api/models/scene.py +++ b/python_client/mozart_api/models/scene.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -60,7 +58,10 @@ def classification_validate_enum(cls, value): if value is None: return value - if value not in ("system", "userDefined"): + if value not in ( + "system", + "userDefined", + ): raise ValueError("must be one of enum values ('system', 'userDefined')") return value @@ -121,11 +122,11 @@ def from_dict(cls, obj: dict) -> Scene: _obj = Scene.parse_obj( { - "action_list": ( - [Action.from_dict(_item) for _item in obj.get("actionList")] - if obj.get("actionList") is not None - else None - ), + "action_list": [ + Action.from_dict(_item) for _item in obj.get("actionList") + ] + if obj.get("actionList") is not None + else None, "client_context": obj.get("clientContext"), "label": obj.get("label"), "tags": obj.get("tags"), diff --git a/python_client/mozart_api/models/scene_classification.py b/python_client/mozart_api/models/scene_classification.py index 9bf5eb7..964528b 100644 --- a/python_client/mozart_api/models/scene_classification.py +++ b/python_client/mozart_api/models/scene_classification.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -43,7 +41,10 @@ def classification_validate_enum(cls, value): if value is None: return value - if value not in ("system", "userDefined"): + if value not in ( + "system", + "userDefined", + ): raise ValueError("must be one of enum values ('system', 'userDefined')") return value diff --git a/python_client/mozart_api/models/scene_match.py b/python_client/mozart_api/models/scene_match.py index d8b6ba4..4beb612 100644 --- a/python_client/mozart_api/models/scene_match.py +++ b/python_client/mozart_api/models/scene_match.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: diff --git a/python_client/mozart_api/models/scene_properties.py b/python_client/mozart_api/models/scene_properties.py index 8df1d3a..eccd862 100644 --- a/python_client/mozart_api/models/scene_properties.py +++ b/python_client/mozart_api/models/scene_properties.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -103,11 +101,11 @@ def from_dict(cls, obj: dict) -> SceneProperties: _obj = SceneProperties.parse_obj( { - "action_list": ( - [Action.from_dict(_item) for _item in obj.get("actionList")] - if obj.get("actionList") is not None - else None - ), + "action_list": [ + Action.from_dict(_item) for _item in obj.get("actionList") + ] + if obj.get("actionList") is not None + else None, "client_context": obj.get("clientContext"), "label": obj.get("label"), "tags": obj.get("tags"), diff --git a/python_client/mozart_api/models/scene_trigger_base_properties.py b/python_client/mozart_api/models/scene_trigger_base_properties.py index 3abd0de..cd0c4bc 100644 --- a/python_client/mozart_api/models/scene_trigger_base_properties.py +++ b/python_client/mozart_api/models/scene_trigger_base_properties.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -86,11 +84,11 @@ def from_dict(cls, obj: dict) -> SceneTriggerBaseProperties: _obj = SceneTriggerBaseProperties.parse_obj( { - "action_list": ( - [Action.from_dict(_item) for _item in obj.get("actionList")] - if obj.get("actionList") is not None - else None - ), + "action_list": [ + Action.from_dict(_item) for _item in obj.get("actionList") + ] + if obj.get("actionList") is not None + else None, "scene_list": obj.get("sceneList"), } ) diff --git a/python_client/mozart_api/models/software_update_state.py b/python_client/mozart_api/models/software_update_state.py index df29e94..95d4809 100644 --- a/python_client/mozart_api/models/software_update_state.py +++ b/python_client/mozart_api/models/software_update_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/software_update_status.py b/python_client/mozart_api/models/software_update_status.py index 9fbe302..bbe094b 100644 --- a/python_client/mozart_api/models/software_update_status.py +++ b/python_client/mozart_api/models/software_update_status.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime from typing import Optional @@ -57,7 +56,12 @@ def update_type_validate_enum(cls, value): if value is None: return value - if value not in ("none", "normal", "critical", "forced"): + if value not in ( + "none", + "normal", + "critical", + "forced", + ): raise ValueError( "must be one of enum values ('none', 'normal', 'critical', 'forced')" ) @@ -105,11 +109,9 @@ def from_dict(cls, obj: dict) -> SoftwareUpdateStatus: "last_check": obj.get("lastCheck"), "last_update": obj.get("lastUpdate"), "software_version": obj.get("softwareVersion"), - "state": ( - SoftwareUpdateState.from_dict(obj.get("state")) - if obj.get("state") is not None - else None - ), + "state": SoftwareUpdateState.from_dict(obj.get("state")) + if obj.get("state") is not None + else None, "update_progress": obj.get("updateProgress"), "update_type": obj.get("updateType"), } diff --git a/python_client/mozart_api/models/sound_adjustments.py b/python_client/mozart_api/models/sound_adjustments.py index 10a9101..edd96e4 100644 --- a/python_client/mozart_api/models/sound_adjustments.py +++ b/python_client/mozart_api/models/sound_adjustments.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: diff --git a/python_client/mozart_api/models/sound_feature_set.py b/python_client/mozart_api/models/sound_feature_set.py index a25cca2..2abe53d 100644 --- a/python_client/mozart_api/models/sound_feature_set.py +++ b/python_client/mozart_api/models/sound_feature_set.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -189,91 +187,71 @@ def from_dict(cls, obj: dict) -> SoundFeatureSet: _obj = SoundFeatureSet.parse_obj( { - "ambience": ( - AmbienceFeature.from_dict(obj.get("ambience")) - if obj.get("ambience") is not None - else None - ), - "balance": ( - BalanceFeature.from_dict(obj.get("balance")) - if obj.get("balance") is not None - else None - ), - "bass": ( - BassFeature.from_dict(obj.get("bass")) - if obj.get("bass") is not None - else None - ), - "bass_management": ( - BassManagementFeature.from_dict(obj.get("bass-management")) - if obj.get("bass-management") is not None - else None - ), - "compression": ( - CompressionFeature.from_dict(obj.get("compression")) - if obj.get("compression") is not None - else None - ), - "directivity": ( - DirectivityFeature.from_dict(obj.get("directivity")) - if obj.get("directivity") is not None - else None - ), - "fader": ( - FaderFeature.from_dict(obj.get("fader")) - if obj.get("fader") is not None - else None - ), - "room_compensation": ( - RoomCompensationFeature.from_dict(obj.get("roomCompensation")) - if obj.get("roomCompensation") is not None - else None - ), - "spatial_envelopment": ( - SpatialEnvelopmentFeature.from_dict(obj.get("spatial-envelopment")) - if obj.get("spatial-envelopment") is not None - else None - ), - "spatial_height": ( - SpatialHeightFeature.from_dict(obj.get("spatial-height")) - if obj.get("spatial-height") is not None - else None - ), - "spatial_processing": ( - SpatialProcessingFeature.from_dict(obj.get("spatial-processing")) - if obj.get("spatial-processing") is not None - else None - ), - "spatial_surround": ( - SpatialSurroundFeature.from_dict(obj.get("spatial-surround")) - if obj.get("spatial-surround") is not None - else None - ), - "spatial_width": ( - SpatialWidthFeature.from_dict(obj.get("spatial-width")) - if obj.get("spatial-width") is not None - else None - ), - "speech_enhance": ( - SpeechEnhanceFeature.from_dict(obj.get("speech-enhance")) - if obj.get("speech-enhance") is not None - else None - ), - "tone_touch_x": ( - ToneTouchXFeature.from_dict(obj.get("toneTouchX")) - if obj.get("toneTouchX") is not None - else None - ), - "tone_touch_y": ( - ToneTouchYFeature.from_dict(obj.get("toneTouchY")) - if obj.get("toneTouchY") is not None - else None - ), - "treble": ( - TrebleFeature.from_dict(obj.get("treble")) - if obj.get("treble") is not None - else None - ), + "ambience": AmbienceFeature.from_dict(obj.get("ambience")) + if obj.get("ambience") is not None + else None, + "balance": BalanceFeature.from_dict(obj.get("balance")) + if obj.get("balance") is not None + else None, + "bass": BassFeature.from_dict(obj.get("bass")) + if obj.get("bass") is not None + else None, + "bass_management": BassManagementFeature.from_dict( + obj.get("bass-management") + ) + if obj.get("bass-management") is not None + else None, + "compression": CompressionFeature.from_dict(obj.get("compression")) + if obj.get("compression") is not None + else None, + "directivity": DirectivityFeature.from_dict(obj.get("directivity")) + if obj.get("directivity") is not None + else None, + "fader": FaderFeature.from_dict(obj.get("fader")) + if obj.get("fader") is not None + else None, + "room_compensation": RoomCompensationFeature.from_dict( + obj.get("roomCompensation") + ) + if obj.get("roomCompensation") is not None + else None, + "spatial_envelopment": SpatialEnvelopmentFeature.from_dict( + obj.get("spatial-envelopment") + ) + if obj.get("spatial-envelopment") is not None + else None, + "spatial_height": SpatialHeightFeature.from_dict( + obj.get("spatial-height") + ) + if obj.get("spatial-height") is not None + else None, + "spatial_processing": SpatialProcessingFeature.from_dict( + obj.get("spatial-processing") + ) + if obj.get("spatial-processing") is not None + else None, + "spatial_surround": SpatialSurroundFeature.from_dict( + obj.get("spatial-surround") + ) + if obj.get("spatial-surround") is not None + else None, + "spatial_width": SpatialWidthFeature.from_dict(obj.get("spatial-width")) + if obj.get("spatial-width") is not None + else None, + "speech_enhance": SpeechEnhanceFeature.from_dict( + obj.get("speech-enhance") + ) + if obj.get("speech-enhance") is not None + else None, + "tone_touch_x": ToneTouchXFeature.from_dict(obj.get("toneTouchX")) + if obj.get("toneTouchX") is not None + else None, + "tone_touch_y": ToneTouchYFeature.from_dict(obj.get("toneTouchY")) + if obj.get("toneTouchY") is not None + else None, + "treble": TrebleFeature.from_dict(obj.get("treble")) + if obj.get("treble") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/sound_settings.py b/python_client/mozart_api/models/sound_settings.py index 6c54500..6f292ff 100644 --- a/python_client/mozart_api/models/sound_settings.py +++ b/python_client/mozart_api/models/sound_settings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -87,21 +85,17 @@ def from_dict(cls, obj: dict) -> SoundSettings: _obj = SoundSettings.parse_obj( { - "adjustments": ( - SoundAdjustments.from_dict(obj.get("adjustments")) - if obj.get("adjustments") is not None - else None - ), - "room_compensation": ( - RoomCompensationInfo.from_dict(obj.get("roomCompensation")) - if obj.get("roomCompensation") is not None - else None - ), - "tone_touch": ( - SoundToneTouch.from_dict(obj.get("toneTouch")) - if obj.get("toneTouch") is not None - else None - ), + "adjustments": SoundAdjustments.from_dict(obj.get("adjustments")) + if obj.get("adjustments") is not None + else None, + "room_compensation": RoomCompensationInfo.from_dict( + obj.get("roomCompensation") + ) + if obj.get("roomCompensation") is not None + else None, + "tone_touch": SoundToneTouch.from_dict(obj.get("toneTouch")) + if obj.get("toneTouch") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/sound_tone_touch.py b/python_client/mozart_api/models/sound_tone_touch.py index e321acf..2c61bc8 100644 --- a/python_client/mozart_api/models/sound_tone_touch.py +++ b/python_client/mozart_api/models/sound_tone_touch.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: diff --git a/python_client/mozart_api/models/source.py b/python_client/mozart_api/models/source.py index e0710f2..9359fc4 100644 --- a/python_client/mozart_api/models/source.py +++ b/python_client/mozart_api/models/source.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -101,11 +99,9 @@ def from_dict(cls, obj: dict) -> Source: "is_playable": obj.get("isPlayable"), "is_seekable": obj.get("isSeekable"), "name": obj.get("name"), - "type": ( - SourceTypeEnum.from_dict(obj.get("type")) - if obj.get("type") is not None - else None - ), + "type": SourceTypeEnum.from_dict(obj.get("type")) + if obj.get("type") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/source_array.py b/python_client/mozart_api/models/source_array.py index 6459b84..b2e1771 100644 --- a/python_client/mozart_api/models/source_array.py +++ b/python_client/mozart_api/models/source_array.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -79,11 +77,9 @@ def from_dict(cls, obj: dict) -> SourceArray: _obj = SourceArray.parse_obj( { - "items": ( - [Source.from_dict(_item) for _item in obj.get("items")] - if obj.get("items") is not None - else None - ) + "items": [Source.from_dict(_item) for _item in obj.get("items")] + if obj.get("items") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/source_type_enum.py b/python_client/mozart_api/models/source_type_enum.py index 4795bbe..dc3a8b8 100644 --- a/python_client/mozart_api/models/source_type_enum.py +++ b/python_client/mozart_api/models/source_type_enum.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/spatial_envelopment.py b/python_client/mozart_api/models/spatial_envelopment.py index be12d39..dfc137a 100644 --- a/python_client/mozart_api/models/spatial_envelopment.py +++ b/python_client/mozart_api/models/spatial_envelopment.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/spatial_envelopment_feature.py b/python_client/mozart_api/models/spatial_envelopment_feature.py index 525dea7..9c281f3 100644 --- a/python_client/mozart_api/models/spatial_envelopment_feature.py +++ b/python_client/mozart_api/models/spatial_envelopment_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,14 @@ def from_dict(cls, obj: dict) -> SpatialEnvelopmentFeature: _obj = SpatialEnvelopmentFeature.parse_obj( { "value": obj.get("value"), - "default": ( - SpatialEnvelopment.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialEnvelopment.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialEnvelopment.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ + SpatialEnvelopment.from_dict(_item) for _item in obj.get("range") + ] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_envelopment_range.py b/python_client/mozart_api/models/spatial_envelopment_range.py index 790b6ba..c7268e3 100644 --- a/python_client/mozart_api/models/spatial_envelopment_range.py +++ b/python_client/mozart_api/models/spatial_envelopment_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,14 @@ def from_dict(cls, obj: dict) -> SpatialEnvelopmentRange: _obj = SpatialEnvelopmentRange.parse_obj( { - "default": ( - SpatialEnvelopment.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialEnvelopment.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialEnvelopment.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ + SpatialEnvelopment.from_dict(_item) for _item in obj.get("range") + ] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_height.py b/python_client/mozart_api/models/spatial_height.py index f71e351..be5aa16 100644 --- a/python_client/mozart_api/models/spatial_height.py +++ b/python_client/mozart_api/models/spatial_height.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/spatial_height_feature.py b/python_client/mozart_api/models/spatial_height_feature.py index fa967aa..bb00b24 100644 --- a/python_client/mozart_api/models/spatial_height_feature.py +++ b/python_client/mozart_api/models/spatial_height_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,12 @@ def from_dict(cls, obj: dict) -> SpatialHeightFeature: _obj = SpatialHeightFeature.parse_obj( { "value": obj.get("value"), - "default": ( - SpatialHeight.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialHeight.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialHeight.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [SpatialHeight.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_height_range.py b/python_client/mozart_api/models/spatial_height_range.py index 28246a0..d784f92 100644 --- a/python_client/mozart_api/models/spatial_height_range.py +++ b/python_client/mozart_api/models/spatial_height_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> SpatialHeightRange: _obj = SpatialHeightRange.parse_obj( { - "default": ( - SpatialHeight.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialHeight.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialHeight.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [SpatialHeight.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_processing.py b/python_client/mozart_api/models/spatial_processing.py index 403ea4b..e21fd38 100644 --- a/python_client/mozart_api/models/spatial_processing.py +++ b/python_client/mozart_api/models/spatial_processing.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr, validator @@ -38,7 +37,11 @@ class SpatialProcessing(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("direct", "trueimage", "downmix"): + if value not in ( + "direct", + "trueimage", + "downmix", + ): raise ValueError( "must be one of enum values ('direct', 'trueimage', 'downmix')" ) diff --git a/python_client/mozart_api/models/spatial_processing_feature.py b/python_client/mozart_api/models/spatial_processing_feature.py index 3929ae9..77291eb 100644 --- a/python_client/mozart_api/models/spatial_processing_feature.py +++ b/python_client/mozart_api/models/spatial_processing_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -46,7 +44,11 @@ class SpatialProcessingFeature(BaseModel): @validator("value") def value_validate_enum(cls, value): """Validates the enum""" - if value not in ("direct", "trueimage", "downmix"): + if value not in ( + "direct", + "trueimage", + "downmix", + ): raise ValueError( "must be one of enum values ('direct', 'trueimage', 'downmix')" ) @@ -98,16 +100,14 @@ def from_dict(cls, obj: dict) -> SpatialProcessingFeature: _obj = SpatialProcessingFeature.parse_obj( { "value": obj.get("value"), - "default": ( - SpatialProcessing.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialProcessing.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialProcessing.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ + SpatialProcessing.from_dict(_item) for _item in obj.get("range") + ] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_processing_range.py b/python_client/mozart_api/models/spatial_processing_range.py index 78930f6..cbeb229 100644 --- a/python_client/mozart_api/models/spatial_processing_range.py +++ b/python_client/mozart_api/models/spatial_processing_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,14 @@ def from_dict(cls, obj: dict) -> SpatialProcessingRange: _obj = SpatialProcessingRange.parse_obj( { - "default": ( - SpatialProcessing.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialProcessing.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialProcessing.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ + SpatialProcessing.from_dict(_item) for _item in obj.get("range") + ] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_surround.py b/python_client/mozart_api/models/spatial_surround.py index 5aebd1a..f0eb71f 100644 --- a/python_client/mozart_api/models/spatial_surround.py +++ b/python_client/mozart_api/models/spatial_surround.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/spatial_surround_feature.py b/python_client/mozart_api/models/spatial_surround_feature.py index 5df3575..6cdf22f 100644 --- a/python_client/mozart_api/models/spatial_surround_feature.py +++ b/python_client/mozart_api/models/spatial_surround_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,14 @@ def from_dict(cls, obj: dict) -> SpatialSurroundFeature: _obj = SpatialSurroundFeature.parse_obj( { "value": obj.get("value"), - "default": ( - SpatialSurround.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialSurround.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialSurround.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ + SpatialSurround.from_dict(_item) for _item in obj.get("range") + ] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_surround_range.py b/python_client/mozart_api/models/spatial_surround_range.py index 8f42c95..6a3a2a0 100644 --- a/python_client/mozart_api/models/spatial_surround_range.py +++ b/python_client/mozart_api/models/spatial_surround_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,14 @@ def from_dict(cls, obj: dict) -> SpatialSurroundRange: _obj = SpatialSurroundRange.parse_obj( { - "default": ( - SpatialSurround.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialSurround.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialSurround.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ + SpatialSurround.from_dict(_item) for _item in obj.get("range") + ] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_width.py b/python_client/mozart_api/models/spatial_width.py index b1af98a..26ab5ff 100644 --- a/python_client/mozart_api/models/spatial_width.py +++ b/python_client/mozart_api/models/spatial_width.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/spatial_width_feature.py b/python_client/mozart_api/models/spatial_width_feature.py index ea30279..2454914 100644 --- a/python_client/mozart_api/models/spatial_width_feature.py +++ b/python_client/mozart_api/models/spatial_width_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,12 @@ def from_dict(cls, obj: dict) -> SpatialWidthFeature: _obj = SpatialWidthFeature.parse_obj( { "value": obj.get("value"), - "default": ( - SpatialWidth.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialWidth.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialWidth.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [SpatialWidth.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/spatial_width_range.py b/python_client/mozart_api/models/spatial_width_range.py index 1c6f2c1..cd1e4c3 100644 --- a/python_client/mozart_api/models/spatial_width_range.py +++ b/python_client/mozart_api/models/spatial_width_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> SpatialWidthRange: _obj = SpatialWidthRange.parse_obj( { - "default": ( - SpatialWidth.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpatialWidth.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpatialWidth.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [SpatialWidth.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/speaker_group.py b/python_client/mozart_api/models/speaker_group.py index 3ba30fe..da5dc28 100644 --- a/python_client/mozart_api/models/speaker_group.py +++ b/python_client/mozart_api/models/speaker_group.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Optional try: @@ -172,16 +170,14 @@ def from_dict(cls, obj: dict) -> SpeakerGroup: "friendly_name": obj.get("friendlyName"), "id": obj.get("id"), "is_deleteable": obj.get("isDeleteable"), - "items": ( - [SpeakerGroupMember.from_dict(_item) for _item in obj.get("items")] - if obj.get("items") is not None - else None - ), - "latency_profile": ( - LatencyProfile.from_dict(obj.get("latencyProfile")) - if obj.get("latencyProfile") is not None - else None - ), + "items": [ + SpeakerGroupMember.from_dict(_item) for _item in obj.get("items") + ] + if obj.get("items") is not None + else None, + "latency_profile": LatencyProfile.from_dict(obj.get("latencyProfile")) + if obj.get("latencyProfile") is not None + else None, "room_compensation_id": obj.get("roomCompensationId"), "speaker_preset": obj.get("speakerPreset"), } diff --git a/python_client/mozart_api/models/speaker_group_member.py b/python_client/mozart_api/models/speaker_group_member.py index b76fcaf..09cf2d1 100644 --- a/python_client/mozart_api/models/speaker_group_member.py +++ b/python_client/mozart_api/models/speaker_group_member.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: @@ -141,11 +139,9 @@ def from_dict(cls, obj: dict) -> SpeakerGroupMember: "friendly_name": obj.get("friendlyName"), "gain": obj.get("gain"), "id": obj.get("id"), - "location": ( - SpeakerGroupMemberLocation.from_dict(obj.get("location")) - if obj.get("location") is not None - else None - ), + "location": SpeakerGroupMemberLocation.from_dict(obj.get("location")) + if obj.get("location") is not None + else None, "redirection_level": obj.get("redirectionLevel"), "role": obj.get("role"), "type": obj.get("type"), diff --git a/python_client/mozart_api/models/speaker_group_member_location.py b/python_client/mozart_api/models/speaker_group_member_location.py index 2218021..7c598ca 100644 --- a/python_client/mozart_api/models/speaker_group_member_location.py +++ b/python_client/mozart_api/models/speaker_group_member_location.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictInt diff --git a/python_client/mozart_api/models/speaker_group_overview.py b/python_client/mozart_api/models/speaker_group_overview.py index acdf1a5..112b2c7 100644 --- a/python_client/mozart_api/models/speaker_group_overview.py +++ b/python_client/mozart_api/models/speaker_group_overview.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr diff --git a/python_client/mozart_api/models/speaker_link_member_status.py b/python_client/mozart_api/models/speaker_link_member_status.py index 789961c..b97f350 100644 --- a/python_client/mozart_api/models/speaker_link_member_status.py +++ b/python_client/mozart_api/models/speaker_link_member_status.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - from datetime import datetime from typing import Optional @@ -62,7 +61,12 @@ class SpeakerLinkMemberStatus(BaseModel): @validator("health") def health_validate_enum(cls, value): """Validates the enum""" - if value not in ("unknown", "good", "warning", "bad"): + if value not in ( + "unknown", + "good", + "warning", + "bad", + ): raise ValueError( "must be one of enum values ('unknown', 'good', 'warning', 'bad')" ) @@ -71,7 +75,11 @@ def health_validate_enum(cls, value): @validator("network_type") def network_type_validate_enum(cls, value): """Validates the enum""" - if value not in ("none", "wired", "wireless"): + if value not in ( + "none", + "wired", + "wireless", + ): raise ValueError("must be one of enum values ('none', 'wired', 'wireless')") return value diff --git a/python_client/mozart_api/models/speaker_link_status.py b/python_client/mozart_api/models/speaker_link_status.py index 595ee38..b8e3a20 100644 --- a/python_client/mozart_api/models/speaker_link_status.py +++ b/python_client/mozart_api/models/speaker_link_status.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -41,7 +39,11 @@ class SpeakerLinkStatus(BaseModel): @validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in ("standalone", "stereo", "surround"): + if value not in ( + "standalone", + "stereo", + "surround", + ): raise ValueError( "must be one of enum values ('standalone', 'stereo', 'surround')" ) @@ -89,14 +91,12 @@ def from_dict(cls, obj: dict) -> SpeakerLinkStatus: _obj = SpeakerLinkStatus.parse_obj( { - "speakers": ( - [ - SpeakerLinkMemberStatus.from_dict(_item) - for _item in obj.get("speakers") - ] - if obj.get("speakers") is not None - else None - ), + "speakers": [ + SpeakerLinkMemberStatus.from_dict(_item) + for _item in obj.get("speakers") + ] + if obj.get("speakers") is not None + else None, "type": obj.get("type"), } ) diff --git a/python_client/mozart_api/models/speaker_role_enum.py b/python_client/mozart_api/models/speaker_role_enum.py index 87b11be..e3998f7 100644 --- a/python_client/mozart_api/models/speaker_role_enum.py +++ b/python_client/mozart_api/models/speaker_role_enum.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,10 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("standalone", "multichannel"): + if value not in ( + "standalone", + "multichannel", + ): raise ValueError( "must be one of enum values ('standalone', 'multichannel')" ) diff --git a/python_client/mozart_api/models/speech_enhance.py b/python_client/mozart_api/models/speech_enhance.py index 945cc28..a69af87 100644 --- a/python_client/mozart_api/models/speech_enhance.py +++ b/python_client/mozart_api/models/speech_enhance.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/speech_enhance_feature.py b/python_client/mozart_api/models/speech_enhance_feature.py index bf98b54..afd3482 100644 --- a/python_client/mozart_api/models/speech_enhance_feature.py +++ b/python_client/mozart_api/models/speech_enhance_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -89,16 +87,12 @@ def from_dict(cls, obj: dict) -> SpeechEnhanceFeature: _obj = SpeechEnhanceFeature.parse_obj( { "value": obj.get("value"), - "default": ( - SpeechEnhance.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpeechEnhance.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpeechEnhance.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [SpeechEnhance.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/speech_enhance_range.py b/python_client/mozart_api/models/speech_enhance_range.py index 19a11d2..7d6d2f9 100644 --- a/python_client/mozart_api/models/speech_enhance_range.py +++ b/python_client/mozart_api/models/speech_enhance_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> SpeechEnhanceRange: _obj = SpeechEnhanceRange.parse_obj( { - "default": ( - SpeechEnhance.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [SpeechEnhance.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": SpeechEnhance.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [SpeechEnhance.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/stand_connected.py b/python_client/mozart_api/models/stand_connected.py index fa03430..bcfd56e 100644 --- a/python_client/mozart_api/models/stand_connected.py +++ b/python_client/mozart_api/models/stand_connected.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/stand_movement.py b/python_client/mozart_api/models/stand_movement.py index a5ea690..9aecfcd 100644 --- a/python_client/mozart_api/models/stand_movement.py +++ b/python_client/mozart_api/models/stand_movement.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: @@ -59,7 +57,13 @@ def stand_motion_validate_enum(cls, value): if value is None: return value - if value not in ("continuousCCW", "stepCCW", "stop", "stepCW", "continuousCW"): + if value not in ( + "continuousCCW", + "stepCCW", + "stop", + "stepCW", + "continuousCW", + ): raise ValueError( "must be one of enum values ('continuousCCW', 'stepCCW', 'stop', 'stepCW', 'continuousCW')" ) diff --git a/python_client/mozart_api/models/stand_position.py b/python_client/mozart_api/models/stand_position.py index b75729f..1d19fb2 100644 --- a/python_client/mozart_api/models/stand_position.py +++ b/python_client/mozart_api/models/stand_position.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: diff --git a/python_client/mozart_api/models/tone_touch.py b/python_client/mozart_api/models/tone_touch.py index 377d9e0..e959ba2 100644 --- a/python_client/mozart_api/models/tone_touch.py +++ b/python_client/mozart_api/models/tone_touch.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -79,16 +77,12 @@ def from_dict(cls, obj: dict) -> ToneTouch: _obj = ToneTouch.parse_obj( { - "x": ( - ToneTouchType.from_dict(obj.get("x")) - if obj.get("x") is not None - else None - ), - "y": ( - ToneTouchType.from_dict(obj.get("y")) - if obj.get("y") is not None - else None - ), + "x": ToneTouchType.from_dict(obj.get("x")) + if obj.get("x") is not None + else None, + "y": ToneTouchType.from_dict(obj.get("y")) + if obj.get("y") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/tone_touch_type.py b/python_client/mozart_api/models/tone_touch_type.py index 80b6a13..81fc8db 100644 --- a/python_client/mozart_api/models/tone_touch_type.py +++ b/python_client/mozart_api/models/tone_touch_type.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Union try: diff --git a/python_client/mozart_api/models/tone_touch_type_range.py b/python_client/mozart_api/models/tone_touch_type_range.py index 9f10681..e45d51e 100644 --- a/python_client/mozart_api/models/tone_touch_type_range.py +++ b/python_client/mozart_api/models/tone_touch_type_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> ToneTouchTypeRange: _obj = ToneTouchTypeRange.parse_obj( { - "default": ( - ToneTouchType.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [ToneTouchType.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": ToneTouchType.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ToneTouchType.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/tone_touch_x_feature.py b/python_client/mozart_api/models/tone_touch_x_feature.py index f3faf31..297de89 100644 --- a/python_client/mozart_api/models/tone_touch_x_feature.py +++ b/python_client/mozart_api/models/tone_touch_x_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -87,16 +85,12 @@ def from_dict(cls, obj: dict) -> ToneTouchXFeature: _obj = ToneTouchXFeature.parse_obj( { "value": obj.get("value"), - "default": ( - ToneTouchType.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [ToneTouchType.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": ToneTouchType.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ToneTouchType.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/tone_touch_y_feature.py b/python_client/mozart_api/models/tone_touch_y_feature.py index 8beb204..8ce6fdc 100644 --- a/python_client/mozart_api/models/tone_touch_y_feature.py +++ b/python_client/mozart_api/models/tone_touch_y_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List, Union try: @@ -87,16 +85,12 @@ def from_dict(cls, obj: dict) -> ToneTouchYFeature: _obj = ToneTouchYFeature.parse_obj( { "value": obj.get("value"), - "default": ( - ToneTouchType.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [ToneTouchType.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": ToneTouchType.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [ToneTouchType.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/treble.py b/python_client/mozart_api/models/treble.py index 1b0a41d..d306dca 100644 --- a/python_client/mozart_api/models/treble.py +++ b/python_client/mozart_api/models/treble.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictInt diff --git a/python_client/mozart_api/models/treble_feature.py b/python_client/mozart_api/models/treble_feature.py index 9f16f2e..9f91d92 100644 --- a/python_client/mozart_api/models/treble_feature.py +++ b/python_client/mozart_api/models/treble_feature.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -87,16 +85,12 @@ def from_dict(cls, obj: dict) -> TrebleFeature: _obj = TrebleFeature.parse_obj( { "value": obj.get("value"), - "default": ( - Treble.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Treble.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Treble.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Treble.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/treble_range.py b/python_client/mozart_api/models/treble_range.py index 8de8db3..7cd17ce 100644 --- a/python_client/mozart_api/models/treble_range.py +++ b/python_client/mozart_api/models/treble_range.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import List try: @@ -85,16 +83,12 @@ def from_dict(cls, obj: dict) -> TrebleRange: _obj = TrebleRange.parse_obj( { - "default": ( - Treble.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "range": ( - [Treble.from_dict(_item) for _item in obj.get("range")] - if obj.get("range") is not None - else None - ), + "default": Treble.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "range": [Treble.from_dict(_item) for _item in obj.get("range")] + if obj.get("range") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/tv_info_event_data.py b/python_client/mozart_api/models/tv_info_event_data.py index b605ae0..c03a7e0 100644 --- a/python_client/mozart_api/models/tv_info_event_data.py +++ b/python_client/mozart_api/models/tv_info_event_data.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -75,11 +73,9 @@ def from_dict(cls, obj: dict) -> TvInfoEventData: _obj = TvInfoEventData.parse_obj( { - "integration": ( - TvIntegrationTypes.from_dict(obj.get("integration")) - if obj.get("integration") is not None - else None - ) + "integration": TvIntegrationTypes.from_dict(obj.get("integration")) + if obj.get("integration") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/tv_integration_types.py b/python_client/mozart_api/models/tv_integration_types.py index 3ac701b..d0ee71c 100644 --- a/python_client/mozart_api/models/tv_integration_types.py +++ b/python_client/mozart_api/models/tv_integration_types.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,10 @@ def value_validate_enum(cls, value): if value is None: return value - if value not in ("ThirdParty", "Lge"): + if value not in ( + "ThirdParty", + "Lge", + ): raise ValueError("must be one of enum values ('ThirdParty', 'Lge')") return value diff --git a/python_client/mozart_api/models/tv_properties.py b/python_client/mozart_api/models/tv_properties.py index eb0434b..70b5de0 100644 --- a/python_client/mozart_api/models/tv_properties.py +++ b/python_client/mozart_api/models/tv_properties.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -89,11 +87,11 @@ def from_dict(cls, obj: dict) -> TvProperties: _obj = TvProperties.parse_obj( { - "integration_supported": ( - TvIntegrationTypes.from_dict(obj.get("integrationSupported")) - if obj.get("integrationSupported") is not None - else None - ), + "integration_supported": TvIntegrationTypes.from_dict( + obj.get("integrationSupported") + ) + if obj.get("integrationSupported") is not None + else None, "name": obj.get("name"), "year": obj.get("year"), } diff --git a/python_client/mozart_api/models/tv_sound_settings.py b/python_client/mozart_api/models/tv_sound_settings.py index 334c0dc..f9fbe8c 100644 --- a/python_client/mozart_api/models/tv_sound_settings.py +++ b/python_client/mozart_api/models/tv_sound_settings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -75,11 +73,9 @@ def from_dict(cls, obj: dict) -> TvSoundSettings: _obj = TvSoundSettings.parse_obj( { - "lge": ( - LgeTvSoundSettings.from_dict(obj.get("lge")) - if obj.get("lge") is not None - else None - ) + "lge": LgeTvSoundSettings.from_dict(obj.get("lge")) + if obj.get("lge") is not None + else None } ) return _obj diff --git a/python_client/mozart_api/models/tv_state.py b/python_client/mozart_api/models/tv_state.py index 7936cfc..90cc445 100644 --- a/python_client/mozart_api/models/tv_state.py +++ b/python_client/mozart_api/models/tv_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -87,21 +85,15 @@ def from_dict(cls, obj: dict) -> TvState: _obj = TvState.parse_obj( { - "integration": ( - TvIntegrationTypes.from_dict(obj.get("integration")) - if obj.get("integration") is not None - else None - ), - "sound_settings": ( - TvSoundSettings.from_dict(obj.get("soundSettings")) - if obj.get("soundSettings") is not None - else None - ), - "tv_info": ( - TvProperties.from_dict(obj.get("tvInfo")) - if obj.get("tvInfo") is not None - else None - ), + "integration": TvIntegrationTypes.from_dict(obj.get("integration")) + if obj.get("integration") is not None + else None, + "sound_settings": TvSoundSettings.from_dict(obj.get("soundSettings")) + if obj.get("soundSettings") is not None + else None, + "tv_info": TvProperties.from_dict(obj.get("tvInfo")) + if obj.get("tvInfo") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/uri.py b/python_client/mozart_api/models/uri.py index e4da102..66202fa 100644 --- a/python_client/mozart_api/models/uri.py +++ b/python_client/mozart_api/models/uri.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/user_flow.py b/python_client/mozart_api/models/user_flow.py index a1a6910..8a41dc1 100644 --- a/python_client/mozart_api/models/user_flow.py +++ b/python_client/mozart_api/models/user_flow.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/video_pixel_format.py b/python_client/mozart_api/models/video_pixel_format.py index 9164959..bec11e0 100644 --- a/python_client/mozart_api/models/video_pixel_format.py +++ b/python_client/mozart_api/models/video_pixel_format.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -44,7 +42,11 @@ def bitdepth_validate_enum(cls, value): if value is None: return value - if value not in ("bit8", "bit10", "bit12"): + if value not in ( + "bit8", + "bit10", + "bit12", + ): raise ValueError("must be one of enum values ('bit8', 'bit10', 'bit12')") return value @@ -54,7 +56,11 @@ def chroma_subsample_validate_enum(cls, value): if value is None: return value - if value not in ("yCbCr444RGB", "yCbCr422", "yCbCr420"): + if value not in ( + "yCbCr444RGB", + "yCbCr422", + "yCbCr420", + ): raise ValueError( "must be one of enum values ('yCbCr444RGB', 'yCbCr422', 'yCbCr420')" ) diff --git a/python_client/mozart_api/models/video_timings.py b/python_client/mozart_api/models/video_timings.py index 632a362..70f9ff7 100644 --- a/python_client/mozart_api/models/video_timings.py +++ b/python_client/mozart_api/models/video_timings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional, Union try: diff --git a/python_client/mozart_api/models/volume_level.py b/python_client/mozart_api/models/volume_level.py index ef6d78d..57b69c2 100644 --- a/python_client/mozart_api/models/volume_level.py +++ b/python_client/mozart_api/models/volume_level.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/volume_mute.py b/python_client/mozart_api/models/volume_mute.py index 9b07226..3bf952d 100644 --- a/python_client/mozart_api/models/volume_mute.py +++ b/python_client/mozart_api/models/volume_mute.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/volume_settings.py b/python_client/mozart_api/models/volume_settings.py index 97a1455..f9c318a 100644 --- a/python_client/mozart_api/models/volume_settings.py +++ b/python_client/mozart_api/models/volume_settings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -79,16 +77,12 @@ def from_dict(cls, obj: dict) -> VolumeSettings: _obj = VolumeSettings.parse_obj( { - "default": ( - VolumeLevel.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "maximum": ( - VolumeLevel.from_dict(obj.get("maximum")) - if obj.get("maximum") is not None - else None - ), + "default": VolumeLevel.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "maximum": VolumeLevel.from_dict(obj.get("maximum")) + if obj.get("maximum") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/volume_state.py b/python_client/mozart_api/models/volume_state.py index 6a4e5f7..caa8bf1 100644 --- a/python_client/mozart_api/models/volume_state.py +++ b/python_client/mozart_api/models/volume_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -88,26 +86,18 @@ def from_dict(cls, obj: dict) -> VolumeState: _obj = VolumeState.parse_obj( { - "default": ( - VolumeLevel.from_dict(obj.get("default")) - if obj.get("default") is not None - else None - ), - "level": ( - VolumeLevel.from_dict(obj.get("level")) - if obj.get("level") is not None - else None - ), - "maximum": ( - VolumeLevel.from_dict(obj.get("maximum")) - if obj.get("maximum") is not None - else None - ), - "muted": ( - VolumeMute.from_dict(obj.get("muted")) - if obj.get("muted") is not None - else None - ), + "default": VolumeLevel.from_dict(obj.get("default")) + if obj.get("default") is not None + else None, + "level": VolumeLevel.from_dict(obj.get("level")) + if obj.get("level") is not None + else None, + "maximum": VolumeLevel.from_dict(obj.get("maximum")) + if obj.get("maximum") is not None + else None, + "muted": VolumeMute.from_dict(obj.get("muted")) + if obj.get("muted") is not None + else None, } ) return _obj diff --git a/python_client/mozart_api/models/web_socket_event_active_hdmi_input_signal.py b/python_client/mozart_api/models/web_socket_event_active_hdmi_input_signal.py index 2152a4f..d7a4ba4 100644 --- a/python_client/mozart_api/models/web_socket_event_active_hdmi_input_signal.py +++ b/python_client/mozart_api/models/web_socket_event_active_hdmi_input_signal.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventActiveHdmiInputSignal: _obj = WebSocketEventActiveHdmiInputSignal.parse_obj( { - "event_data": ( - HdmiInput.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": HdmiInput.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_active_listening_mode.py b/python_client/mozart_api/models/web_socket_event_active_listening_mode.py index 5e9ebae..d0e686e 100644 --- a/python_client/mozart_api/models/web_socket_event_active_listening_mode.py +++ b/python_client/mozart_api/models/web_socket_event_active_listening_mode.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventActiveListeningMode: _obj = WebSocketEventActiveListeningMode.parse_obj( { - "event_data": ( - ListeningModeProps.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": ListeningModeProps.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_active_speaker_group.py b/python_client/mozart_api/models/web_socket_event_active_speaker_group.py index 1abc22d..03763ea 100644 --- a/python_client/mozart_api/models/web_socket_event_active_speaker_group.py +++ b/python_client/mozart_api/models/web_socket_event_active_speaker_group.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventActiveSpeakerGroup: _obj = WebSocketEventActiveSpeakerGroup.parse_obj( { - "event_data": ( - SpeakerGroupOverview.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": SpeakerGroupOverview.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_alarm_timer.py b/python_client/mozart_api/models/web_socket_event_alarm_timer.py index df0b3d3..e9f1107 100644 --- a/python_client/mozart_api/models/web_socket_event_alarm_timer.py +++ b/python_client/mozart_api/models/web_socket_event_alarm_timer.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventAlarmTimer: _obj = WebSocketEventAlarmTimer.parse_obj( { - "event_data": ( - AlarmTimerEventData.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": AlarmTimerEventData.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_alarm_triggered.py b/python_client/mozart_api/models/web_socket_event_alarm_triggered.py index d48c0da..0c03c9d 100644 --- a/python_client/mozart_api/models/web_socket_event_alarm_triggered.py +++ b/python_client/mozart_api/models/web_socket_event_alarm_triggered.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventAlarmTriggered: _obj = WebSocketEventAlarmTriggered.parse_obj( { - "event_data": ( - AlarmTriggeredInfo.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": AlarmTriggeredInfo.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_battery.py b/python_client/mozart_api/models/web_socket_event_battery.py index 0caef99..ec8a79f 100644 --- a/python_client/mozart_api/models/web_socket_event_battery.py +++ b/python_client/mozart_api/models/web_socket_event_battery.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventBattery: _obj = WebSocketEventBattery.parse_obj( { - "event_data": ( - BatteryState.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": BatteryState.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_beo_remote_button.py b/python_client/mozart_api/models/web_socket_event_beo_remote_button.py index c8f2483..61b1b32 100644 --- a/python_client/mozart_api/models/web_socket_event_beo_remote_button.py +++ b/python_client/mozart_api/models/web_socket_event_beo_remote_button.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventBeoRemoteButton: _obj = WebSocketEventBeoRemoteButton.parse_obj( { - "event_data": ( - BeoRemoteButton.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": BeoRemoteButton.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_beolink_experiences_result.py b/python_client/mozart_api/models/web_socket_event_beolink_experiences_result.py index cc8dd65..f7d25c7 100644 --- a/python_client/mozart_api/models/web_socket_event_beolink_experiences_result.py +++ b/python_client/mozart_api/models/web_socket_event_beolink_experiences_result.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr @@ -74,11 +73,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventBeolinkExperiencesResult: _obj = WebSocketEventBeolinkExperiencesResult.parse_obj( { - "event_data": ( - BeolinkExperiencesResult.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": BeolinkExperiencesResult.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_beolink_join_result.py b/python_client/mozart_api/models/web_socket_event_beolink_join_result.py index bbe0252..6d077e1 100644 --- a/python_client/mozart_api/models/web_socket_event_beolink_join_result.py +++ b/python_client/mozart_api/models/web_socket_event_beolink_join_result.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr @@ -74,11 +73,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventBeolinkJoinResult: _obj = WebSocketEventBeolinkJoinResult.parse_obj( { - "event_data": ( - BeolinkJoinResult.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": BeolinkJoinResult.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_button.py b/python_client/mozart_api/models/web_socket_event_button.py index 09ea03d..ceda59e 100644 --- a/python_client/mozart_api/models/web_socket_event_button.py +++ b/python_client/mozart_api/models/web_socket_event_button.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventButton: _obj = WebSocketEventButton.parse_obj( { - "event_data": ( - ButtonEvent.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": ButtonEvent.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_curtains.py b/python_client/mozart_api/models/web_socket_event_curtains.py index 6195758..5d2e58b 100644 --- a/python_client/mozart_api/models/web_socket_event_curtains.py +++ b/python_client/mozart_api/models/web_socket_event_curtains.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventCurtains: _obj = WebSocketEventCurtains.parse_obj( { - "event_data": ( - ProductCurtainStatus.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": ProductCurtainStatus.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_hdmi_video_format_signal.py b/python_client/mozart_api/models/web_socket_event_hdmi_video_format_signal.py index 68a779e..430579b 100644 --- a/python_client/mozart_api/models/web_socket_event_hdmi_video_format_signal.py +++ b/python_client/mozart_api/models/web_socket_event_hdmi_video_format_signal.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventHdmiVideoFormatSignal: _obj = WebSocketEventHdmiVideoFormatSignal.parse_obj( { - "event_data": ( - HdmiVideoFormat.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": HdmiVideoFormat.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_notification.py b/python_client/mozart_api/models/web_socket_event_notification.py index fdf3f04..c9d90a3 100644 --- a/python_client/mozart_api/models/web_socket_event_notification.py +++ b/python_client/mozart_api/models/web_socket_event_notification.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -78,11 +76,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventNotification: _obj = WebSocketEventNotification.parse_obj( { - "event_data": ( - WebsocketNotificationTag.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": WebsocketNotificationTag.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_playback_error.py b/python_client/mozart_api/models/web_socket_event_playback_error.py index eb249dc..207b600 100644 --- a/python_client/mozart_api/models/web_socket_event_playback_error.py +++ b/python_client/mozart_api/models/web_socket_event_playback_error.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPlaybackError: _obj = WebSocketEventPlaybackError.parse_obj( { - "event_data": ( - PlaybackError.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": PlaybackError.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_playback_metadata.py b/python_client/mozart_api/models/web_socket_event_playback_metadata.py index 86e343f..0cf898c 100644 --- a/python_client/mozart_api/models/web_socket_event_playback_metadata.py +++ b/python_client/mozart_api/models/web_socket_event_playback_metadata.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -78,11 +76,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPlaybackMetadata: _obj = WebSocketEventPlaybackMetadata.parse_obj( { - "event_data": ( - PlaybackContentMetadata.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": PlaybackContentMetadata.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_playback_progress.py b/python_client/mozart_api/models/web_socket_event_playback_progress.py index 70007e6..486de16 100644 --- a/python_client/mozart_api/models/web_socket_event_playback_progress.py +++ b/python_client/mozart_api/models/web_socket_event_playback_progress.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPlaybackProgress: _obj = WebSocketEventPlaybackProgress.parse_obj( { - "event_data": ( - PlaybackProgress.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": PlaybackProgress.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_playback_source.py b/python_client/mozart_api/models/web_socket_event_playback_source.py index 61bfc08..e4f7e0b 100644 --- a/python_client/mozart_api/models/web_socket_event_playback_source.py +++ b/python_client/mozart_api/models/web_socket_event_playback_source.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPlaybackSource: _obj = WebSocketEventPlaybackSource.parse_obj( { - "event_data": ( - Source.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": Source.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_playback_state.py b/python_client/mozart_api/models/web_socket_event_playback_state.py index becd7ae..1add7cc 100644 --- a/python_client/mozart_api/models/web_socket_event_playback_state.py +++ b/python_client/mozart_api/models/web_socket_event_playback_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPlaybackState: _obj = WebSocketEventPlaybackState.parse_obj( { - "event_data": ( - RenderingState.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": RenderingState.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_power_state.py b/python_client/mozart_api/models/web_socket_event_power_state.py index 11c6670..0da1027 100644 --- a/python_client/mozart_api/models/web_socket_event_power_state.py +++ b/python_client/mozart_api/models/web_socket_event_power_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPowerState: _obj = WebSocketEventPowerState.parse_obj( { - "event_data": ( - PowerStateEnum.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": PowerStateEnum.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_powerlink_connection_state.py b/python_client/mozart_api/models/web_socket_event_powerlink_connection_state.py index 5c6b676..baa02af 100644 --- a/python_client/mozart_api/models/web_socket_event_powerlink_connection_state.py +++ b/python_client/mozart_api/models/web_socket_event_powerlink_connection_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -85,11 +83,11 @@ def from_dict(cls, obj: dict) -> WebSocketEventPowerlinkConnectionState: _obj = WebSocketEventPowerlinkConnectionState.parse_obj( { - "event_data": ( - PowerlinkConnectionStateEnum.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": PowerlinkConnectionStateEnum.from_dict( + obj.get("eventData") + ) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_puc_install_remote_id_status.py b/python_client/mozart_api/models/web_socket_event_puc_install_remote_id_status.py index d69ec93..4e8d513 100644 --- a/python_client/mozart_api/models/web_socket_event_puc_install_remote_id_status.py +++ b/python_client/mozart_api/models/web_socket_event_puc_install_remote_id_status.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventPucInstallRemoteIdStatus: _obj = WebSocketEventPucInstallRemoteIdStatus.parse_obj( { - "event_data": ( - InstallRecordIdState.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": InstallRecordIdState.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_role.py b/python_client/mozart_api/models/web_socket_event_role.py index badde68..f9305a3 100644 --- a/python_client/mozart_api/models/web_socket_event_role.py +++ b/python_client/mozart_api/models/web_socket_event_role.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventRole: _obj = WebSocketEventRole.parse_obj( { - "event_data": ( - SpeakerRoleEnum.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": SpeakerRoleEnum.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_room_compensation_current_measurement_event.py b/python_client/mozart_api/models/web_socket_event_room_compensation_current_measurement_event.py index 17d0ab6..1a4b959 100644 --- a/python_client/mozart_api/models/web_socket_event_room_compensation_current_measurement_event.py +++ b/python_client/mozart_api/models/web_socket_event_room_compensation_current_measurement_event.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -84,11 +82,11 @@ def from_dict( _obj = WebSocketEventRoomCompensationCurrentMeasurementEvent.parse_obj( { - "event_data": ( - RoomCompensationCurrentMeasurement.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": RoomCompensationCurrentMeasurement.from_dict( + obj.get("eventData") + ) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_room_compensation_state.py b/python_client/mozart_api/models/web_socket_event_room_compensation_state.py index fc5cd02..dd632fa 100644 --- a/python_client/mozart_api/models/web_socket_event_room_compensation_state.py +++ b/python_client/mozart_api/models/web_socket_event_room_compensation_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -78,11 +76,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventRoomCompensationState: _obj = WebSocketEventRoomCompensationState.parse_obj( { - "event_data": ( - RoomCompensationStateValue.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": RoomCompensationStateValue.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_software_update_state.py b/python_client/mozart_api/models/web_socket_event_software_update_state.py index 225b6d8..6264076 100644 --- a/python_client/mozart_api/models/web_socket_event_software_update_state.py +++ b/python_client/mozart_api/models/web_socket_event_software_update_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventSoftwareUpdateState: _obj = WebSocketEventSoftwareUpdateState.parse_obj( { - "event_data": ( - SoftwareUpdateState.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": SoftwareUpdateState.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_sound_settings.py b/python_client/mozart_api/models/web_socket_event_sound_settings.py index 8ceb30b..81ba3e3 100644 --- a/python_client/mozart_api/models/web_socket_event_sound_settings.py +++ b/python_client/mozart_api/models/web_socket_event_sound_settings.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventSoundSettings: _obj = WebSocketEventSoundSettings.parse_obj( { - "event_data": ( - SoundSettings.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": SoundSettings.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_source_change.py b/python_client/mozart_api/models/web_socket_event_source_change.py index aeef559..f82e2f5 100644 --- a/python_client/mozart_api/models/web_socket_event_source_change.py +++ b/python_client/mozart_api/models/web_socket_event_source_change.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventSourceChange: _obj = WebSocketEventSourceChange.parse_obj( { - "event_data": ( - Source.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": Source.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_speaker_group_changed.py b/python_client/mozart_api/models/web_socket_event_speaker_group_changed.py index 958df0d..c1c26bc 100644 --- a/python_client/mozart_api/models/web_socket_event_speaker_group_changed.py +++ b/python_client/mozart_api/models/web_socket_event_speaker_group_changed.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/web_socket_event_speaker_link_status_changed.py b/python_client/mozart_api/models/web_socket_event_speaker_link_status_changed.py index 3fda2a9..fb0f820 100644 --- a/python_client/mozart_api/models/web_socket_event_speaker_link_status_changed.py +++ b/python_client/mozart_api/models/web_socket_event_speaker_link_status_changed.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventSpeakerLinkStatusChanged: _obj = WebSocketEventSpeakerLinkStatusChanged.parse_obj( { - "event_data": ( - SpeakerLinkStatus.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": SpeakerLinkStatus.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_stand_connected.py b/python_client/mozart_api/models/web_socket_event_stand_connected.py index 37a6a8c..b424b3b 100644 --- a/python_client/mozart_api/models/web_socket_event_stand_connected.py +++ b/python_client/mozart_api/models/web_socket_event_stand_connected.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventStandConnected: _obj = WebSocketEventStandConnected.parse_obj( { - "event_data": ( - StandConnected.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": StandConnected.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_stand_position.py b/python_client/mozart_api/models/web_socket_event_stand_position.py index 37fab96..0e57b59 100644 --- a/python_client/mozart_api/models/web_socket_event_stand_position.py +++ b/python_client/mozart_api/models/web_socket_event_stand_position.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventStandPosition: _obj = WebSocketEventStandPosition.parse_obj( { - "event_data": ( - StandPosition.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": StandPosition.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_tv_info.py b/python_client/mozart_api/models/web_socket_event_tv_info.py index 4ccbe43..11813c6 100644 --- a/python_client/mozart_api/models/web_socket_event_tv_info.py +++ b/python_client/mozart_api/models/web_socket_event_tv_info.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventTvInfo: _obj = WebSocketEventTvInfo.parse_obj( { - "event_data": ( - TvInfoEventData.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": TvInfoEventData.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_volume.py b/python_client/mozart_api/models/web_socket_event_volume.py index ba56a9a..0efb357 100644 --- a/python_client/mozart_api/models/web_socket_event_volume.py +++ b/python_client/mozart_api/models/web_socket_event_volume.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -76,11 +74,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventVolume: _obj = WebSocketEventVolume.parse_obj( { - "event_data": ( - VolumeState.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": VolumeState.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/web_socket_event_wisa_out_state.py b/python_client/mozart_api/models/web_socket_event_wisa_out_state.py index 29f21a4..cbbf9c9 100644 --- a/python_client/mozart_api/models/web_socket_event_wisa_out_state.py +++ b/python_client/mozart_api/models/web_socket_event_wisa_out_state.py @@ -1,23 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - try: from pydantic.v1 import BaseModel, Field, StrictStr @@ -74,11 +73,9 @@ def from_dict(cls, obj: dict) -> WebSocketEventWisaOutState: _obj = WebSocketEventWisaOutState.parse_obj( { - "event_data": ( - WisaOutState.from_dict(obj.get("eventData")) - if obj.get("eventData") is not None - else None - ), + "event_data": WisaOutState.from_dict(obj.get("eventData")) + if obj.get("eventData") is not None + else None, "event_type": obj.get("eventType"), } ) diff --git a/python_client/mozart_api/models/websocket_notification_tag.py b/python_client/mozart_api/models/websocket_notification_tag.py index 1dafec9..a978488 100644 --- a/python_client/mozart_api/models/websocket_notification_tag.py +++ b/python_client/mozart_api/models/websocket_notification_tag.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: diff --git a/python_client/mozart_api/models/wisa_out_state.py b/python_client/mozart_api/models/wisa_out_state.py index 2c8a5e5..ab41fc5 100644 --- a/python_client/mozart_api/models/wisa_out_state.py +++ b/python_client/mozart_api/models/wisa_out_state.py @@ -1,24 +1,22 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - from __future__ import annotations + +import json import pprint import re # noqa: F401 -import json - - from typing import Optional try: @@ -41,7 +39,12 @@ def state_validate_enum(cls, value): if value is None: return value - if value not in ("idle", "discovering", "deleting", "updatingSpeakerFirmware"): + if value not in ( + "idle", + "discovering", + "deleting", + "updatingSpeakerFirmware", + ): raise ValueError( "must be one of enum values ('idle', 'discovering', 'deleting', 'updatingSpeakerFirmware')" ) diff --git a/python_client/mozart_api/mozart_cli.py b/python_client/mozart_api/mozart_cli.py index 6a3ba31..2b1e2b9 100644 --- a/python_client/mozart_api/mozart_cli.py +++ b/python_client/mozart_api/mozart_cli.py @@ -1,7 +1,5 @@ """Main Mozart CLI document.""" -# pylint: disable= too-few-public-methods too-many-instance-attributes - import argparse import asyncio import ipaddress @@ -11,12 +9,13 @@ from dataclasses import dataclass from typing import Final, cast -from aioconsole import ainput # type: ignore -from mozart_api import __version__ as MOZART_API_VERSION -from mozart_api.models import VolumeLevel, VolumeMute -from mozart_api.mozart_client import MozartClient +from aioconsole import ainput # type: ignore[import-untyped] from zeroconf import ServiceBrowser, ServiceListener, Zeroconf +from mozart_api import __version__ +from mozart_api.models import BeolinkJoinRequest, VolumeLevel, VolumeMute +from mozart_api.mozart_client import MozartClient, WebSocketEventType + MOZART_MDNS_TYPE: Final[str] = "_bangolufsen._tcp.local." MDNS_TIMEOUT: Final[int] = 10 DISCOVER_MODE: Final[str] = "discover" @@ -33,9 +32,7 @@ "volume", "join", "info", - "standby", "allstandby", - "timer", ] @@ -57,6 +54,7 @@ class MozartListener(ServiceListener): """Listener for Zeroconf discovery of Mozart devices.""" def __init__(self, mode: str, verbose: bool, event: threading.Event) -> None: + """Initialize listener.""" super().__init__() self.mode = mode self.verbose = verbose @@ -70,7 +68,6 @@ def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None: def add_service(self, zc: Zeroconf, type_: str, name: str) -> None: """Add discovered Mozart device.""" - info = zc.get_service_info(type_, name) # Sometimes service info is None. @@ -86,12 +83,12 @@ def add_service(self, zc: Zeroconf, type_: str, name: str) -> None: friendly_name = info.properties.get(b"fn") - # MDNS devices other than Mozart devices may not have friendly names - if friendly_name is not None: - friendly_name = cast(bytes, friendly_name).decode("utf-8") - mozart_device = MozartDevice( - friendly_name, model_name, serial_number, ip_address, sw_version + friendly_name.decode("utf-8") if friendly_name is not None else None, + model_name, + serial_number, + ip_address, + sw_version, ) mozart_devices.append(mozart_device) @@ -136,7 +133,7 @@ def discover_devices(mode: str, timeout: int, verbose: bool) -> list[MozartDevic def init_argument_parser() -> argparse.ArgumentParser: """Initialize and add arguments.""" parser = argparse.ArgumentParser( - prog="mozart-cli", + prog="mozart_api", description="CLI for sending simple commands to Mozart devices.", ) @@ -164,8 +161,9 @@ def init_argument_parser() -> argparse.ArgumentParser: parser.add_argument( "mode", - help="""Specify the serial number or IP address for command execution - or 'discover' for Zeroconf discovery of Mozart devices.""", + choices=(DISCOVER_MODE, VERSION_MODE), + help=f"""Specify the serial number or IP address for command execution + ,'{DISCOVER_MODE}' for Zeroconf discovery of Mozart devices or "{VERSION_MODE}" to get the API client version.""", ) parser.add_argument( @@ -211,7 +209,7 @@ def __init__(self) -> None: # Check if the API version should be printed if self.mode == VERSION_MODE: - print(MOZART_API_VERSION) + print(__version__) sys.exit(0) # Check if the mode defined is an ip address @@ -219,18 +217,20 @@ def __init__(self) -> None: ipaddress.ip_address(self.mode) self.host = self.mode except ValueError as exception: - # Ensure that the mode's serial number has the correct format or 'discover' mode. + # Ensure that the mode's serial number + # has the correct format or 'discover' mode. if self.mode != DISCOVER_MODE and re.fullmatch(r"\d{8}", self.mode) is None: # Check if the mode is then an ip address - raise ValueError( - f""""{self.mode}" has an invalid value. - Must either be a serial number, ip address, "discover" or "version".""" - ) from exception + msg = f""""{self.mode}" has an invalid value. + Must either be a serial number, ip address, "{DISCOVER_MODE}" or "{VERSION_MODE}".""" + raise ValueError(msg) from exception # Discover devices if host has not been defined if not self.host: self.mozart_devices = discover_devices( - self.mode, self.timeout, self.verbose + self.mode, + self.timeout, + self.verbose, ) # Get the ip address from the devices Mozart devices @@ -243,7 +243,8 @@ def __init__(self) -> None: MozartDevice(), ).ip_address - # Exit if in discover mode, no command has been defined or desired host can't be found. + # Exit if in discover mode, no command has been defined + # or desired host can't be found. if self.mode == DISCOVER_MODE or self.command == "" or self.host == "": sys.exit(0) @@ -251,8 +252,8 @@ def __init__(self) -> None: sys.exit(0) - async def _run_api(self): - """Run async API command handling""" + async def _run_api(self) -> None: + """Run async API command handling.""" # Generate MozartApi object for calling API endpoints. self.mozart_client = MozartClient(self.host) @@ -265,16 +266,17 @@ async def _run_api(self): # Handle command await self._command_handler() - # If websocket listener is enabled, then wait for keypress before exiting the CLI + # If WebSocket listener is enabled, + # then wait for keypress before exiting the CLI if self.websocket: await ainput( - "Listening to WebSocket events. Press any key to exit CLI.\n\r" + "Listening to WebSocket events. Press any key to exit CLI.\n\r", ) self.mozart_client.disconnect_notifications() await self.mozart_client.close_api_client() - async def _beolink_join(self): + async def _beolink_join(self) -> BeolinkJoinRequest | None: """Showcase async API usage of the Beolink command.""" # If no JID is specified, then join an active experience if available if len(self.command_args) == 0: @@ -290,23 +292,26 @@ async def _beolink_join(self): # The peers may be outdated and still have now unavailable devices. if len(peers) == 0: print("No available Beolink peers.") - return + return None - jid = [peer for peer in peers if serial_number in peer.jid][0].jid + jid = next(peer for peer in peers if serial_number in peer.jid).jid status = await self.mozart_client.join_beolink_peer(jid=jid) return status - def all_notifications(self, notification, notification_type): + def all_notifications( + self, + notification: WebSocketEventType, + notification_type: str, + ) -> None: """Handle all notifications.""" print(notification_type, notification) - async def _command_handler(self): + async def _command_handler(self) -> None: """Handle commands.""" - print( - f"Sending command: '{self.command}' to device with args {self.command_args}." + f"Sending command: '{self.command}' to device with args {self.command_args}.", ) status = None @@ -322,13 +327,13 @@ async def _command_handler(self): elif self.command == "unmute": await self.mozart_client.set_volume_mute( - volume_mute=VolumeMute(muted=False) + volume_mute=VolumeMute(muted=False), ) elif self.command == "volume": volume_level = int(self.command_args[0]) await self.mozart_client.set_current_volume_level( - volume_level=VolumeLevel(level=volume_level) + volume_level=VolumeLevel(level=volume_level), ) elif self.command == "join": @@ -353,7 +358,10 @@ async def _command_handler(self): if self.verbose and self.command == "join": # Wait for the join-result to be available await asyncio.sleep(1) - print("Beolink Join status:") - print( - await self.mozart_client.get_beolink_join_result(id=status.request_id) - ) + if status: + print("Beolink Join status:") + print( + await self.mozart_client.get_beolink_join_result( + id=status.request_id, + ), + ) diff --git a/python_client/mozart_api/mozart_client.py b/python_client/mozart_api/mozart_client.py index 7b69457..e3c72cf 100644 --- a/python_client/mozart_api/mozart_client.py +++ b/python_client/mozart_api/mozart_client.py @@ -1,33 +1,72 @@ """Helper classes for using auto-generated API.""" -# pylint: disable=line-too-long too-many-instance-attributes too-many-public-methods - import asyncio import contextlib import json import logging import re from collections import defaultdict +from collections.abc import Callable +from contextlib import AbstractAsyncContextManager from dataclasses import dataclass from datetime import time from ssl import SSLContext -from typing import Callable, Literal +from types import TracebackType +from typing import Literal, TypedDict -from aiohttp import ClientSession +from aiohttp import ClientSession, ClientTimeout from aiohttp.client_exceptions import ( ClientConnectorError, ClientOSError, ServerTimeoutError, ) from inflection import underscore + from mozart_api.api.mozart_api import MozartApi from mozart_api.api_client import ApiClient -from mozart_api.rest import RESTClientObject from mozart_api.configuration import Configuration from mozart_api.exceptions import ApiException -from mozart_api.models import Art, PlaybackContentMetadata - -WEBSOCKET_TIMEOUT = 5.0 +from mozart_api.models import ( + Art, + PlaybackContentMetadata, + # Generated section start + WebSocketEventActiveHdmiInputSignal, + WebSocketEventActiveListeningMode, + WebSocketEventActiveSpeakerGroup, + WebSocketEventAlarmTimer, + WebSocketEventAlarmTriggered, + WebSocketEventBattery, + WebSocketEventBeolinkExperiencesResult, + WebSocketEventBeolinkJoinResult, + WebSocketEventBeoRemoteButton, + WebSocketEventButton, + WebSocketEventCurtains, + WebSocketEventHdmiVideoFormatSignal, + WebSocketEventNotification, + WebSocketEventPlaybackError, + WebSocketEventPlaybackMetadata, + WebSocketEventPlaybackProgress, + WebSocketEventPlaybackSource, + WebSocketEventPlaybackState, + WebSocketEventPowerlinkConnectionState, + WebSocketEventPowerState, + WebSocketEventPucInstallRemoteIdStatus, + WebSocketEventRole, + WebSocketEventRoomCompensationCurrentMeasurementEvent, + WebSocketEventRoomCompensationState, + WebSocketEventSoftwareUpdateState, + WebSocketEventSoundSettings, + WebSocketEventSourceChange, + WebSocketEventSpeakerGroupChanged, + WebSocketEventSpeakerLinkStatusChanged, + WebSocketEventStandConnected, + WebSocketEventStandPosition, + WebSocketEventTvInfo, + WebSocketEventVolume, + WebSocketEventWisaOutState, + # Generated section end +) +from mozart_api.rest import RESTClientObject # Generated section start @@ -68,8 +107,47 @@ "wisa_out_state", } +WebSocketEventType = type[ + WebSocketEventActiveHdmiInputSignal + | WebSocketEventActiveListeningMode + | WebSocketEventActiveSpeakerGroup + | WebSocketEventAlarmTimer + | WebSocketEventAlarmTriggered + | WebSocketEventBattery + | WebSocketEventBeoRemoteButton + | WebSocketEventBeolinkExperiencesResult + | WebSocketEventBeolinkJoinResult + | WebSocketEventButton + | WebSocketEventCurtains + | WebSocketEventHdmiVideoFormatSignal + | WebSocketEventNotification + | WebSocketEventPlaybackError + | WebSocketEventPlaybackMetadata + | WebSocketEventPlaybackProgress + | WebSocketEventPlaybackSource + | WebSocketEventPlaybackState + | WebSocketEventPowerState + | WebSocketEventPowerlinkConnectionState + | WebSocketEventPucInstallRemoteIdStatus + | WebSocketEventRole + | WebSocketEventRoomCompensationCurrentMeasurementEvent + | WebSocketEventRoomCompensationState + | WebSocketEventSoftwareUpdateState + | WebSocketEventSoundSettings + | WebSocketEventSourceChange + | WebSocketEventSpeakerGroupChanged + | WebSocketEventSpeakerLinkStatusChanged + | WebSocketEventStandConnected + | WebSocketEventStandPosition + | WebSocketEventTvInfo + | WebSocketEventVolume + | WebSocketEventWisaOutState +] + # Generated section end +WEBSOCKET_TIMEOUT = 5.0 + logger = logging.getLogger(__name__) @@ -87,10 +165,7 @@ def check_valid_jid(jid: str) -> bool: """Check if a JID is valid.""" pattern = re.compile(r"(^\d{4})[.](\d{7})[.](\d{8})(@products\.bang-olufsen\.com)$") - if pattern.fullmatch(jid) is not None: - return True - - return False + return pattern.fullmatch(jid) is not None def check_valid_serial_number(serial_number: str) -> bool: @@ -100,10 +175,9 @@ def check_valid_serial_number(serial_number: str) -> bool: def get_highest_resolution_artwork(metadata: PlaybackContentMetadata) -> Art: """Get the highest resolution Art from provided PlaybackContentMetadata.""" - # Return an empty Art if no artwork is in metadata to ensure no stale artwork if not metadata.art: - return Art() # type: ignore + return Art() # Dict for sorting images that have size defined by a string art_size = {"small": 1, "medium": 2, "large": 3} @@ -124,12 +198,19 @@ def get_highest_resolution_artwork(metadata: PlaybackContentMetadata) -> Art: # Check if only invalid images were provided if not images: - return Art() # type: ignore + return Art() # Choose the largest image. return metadata.art[images.index(max(images))] +class BaseWebSocketResponse(TypedDict): + """Base class for serialized WebSocket notifications.""" + + eventType: str + eventDate: dict + + class MozartClient(MozartApi): """User friendly Mozart REST API and WebSocket client.""" @@ -144,11 +225,15 @@ def __init__(self, host: str, ssl_context: SSLContext | None = None) -> None: self._websocket_listeners_active = False self._websocket_tasks: set[asyncio.Task] = set() - self._on_connection_lost = None - self._on_connection = None + self._on_connection_lost: Callable | None = None + self._on_connection: Callable | None = None - self._on_all_notifications = None - self._on_all_notifications_raw = None + self._on_all_notifications: Callable[[WebSocketEventType, str], None] | None = ( + None + ) + self._on_all_notifications_raw: ( + Callable[[BaseWebSocketResponse], None] | None + ) = None self._notification_callbacks: dict[str, Callable | None] = defaultdict() self._notification_callbacks.default_factory = lambda: None @@ -164,38 +249,48 @@ def __init__(self, host: str, ssl_context: SSLContext | None = None) -> None: ApiClient( self.configuration, rest_client=RESTClientObject( - configuration=self.configuration, ssl_context=ssl_context + configuration=self.configuration, + ssl_context=ssl_context, ), - ) + ), ) async def close_api_client(self) -> None: """Close the API ClientSession.""" await self.api_client.close() - async def __aenter__(self): - """Context entry""" + async def __aenter__(self) -> AbstractAsyncContextManager: + """Context entry.""" if self.api_client.rest_client.pool_manager.closed: self.api_client = ApiClient(self.configuration) return self - async def __aexit__(self, exc_type, exc_value, traceback): + async def __aexit__( + self, + exc_type: type[BaseException] | None, + exc_value: BaseException | None, + traceback: TracebackType | None, + ) -> None: """Context exit.""" await self.close_api_client() async def _check_websocket_connection( self, ) -> Literal[True] | ClientConnectorError | ClientOSError | ServerTimeoutError: - """Check if a connection can be made to the device's WebSocket notification channel.""" + """Try to connect to the device's WebSocket notification channel.""" try: - async with ClientSession(conn_timeout=WEBSOCKET_TIMEOUT) as session: - async with session.ws_connect( + async with ( + ClientSession( + timeout=ClientTimeout(total=WEBSOCKET_TIMEOUT), + ) as session, + session.ws_connect( f"ws://{self.host}:9339/", timeout=WEBSOCKET_TIMEOUT, receive_timeout=WEBSOCKET_TIMEOUT, - ) as websocket: - if await websocket.receive(): - return True + ) as websocket, + ): + if await websocket.receive(): + return True except (ClientConnectorError, ClientOSError, ServerTimeoutError) as error: return error @@ -211,7 +306,7 @@ async def _check_api_connection( return True - async def check_device_connection(self, raise_error=False) -> bool: + async def check_device_connection(self, raise_error: bool = False) -> bool: """Check API and WebSocket connection.""" # Don't use a taskgroup as both tasks should always be checked tasks: tuple[ @@ -240,23 +335,21 @@ async def check_device_connection(self, raise_error=False) -> bool: | ServerTimeoutError | ApiException | TimeoutError - ] = [] - - # Check status - for task in tasks: - if (result := task.result()) is not True: - errors.append(result) + ] = [result for task in tasks if (result := task.result()) is not True] connection_available = bool(len(errors) == 0) # Raise any exceptions if not connection_available and raise_error: - raise ExceptionGroup(f"Can't connect to {self.host}", tuple(errors)) + msg = f"Can't connect to {self.host}" + raise ExceptionGroup(msg, tuple(errors)) return connection_available async def connect_notifications( - self, remote_control=False, reconnect=False + self, + remote_control: bool = False, + reconnect: bool = False, ) -> None: """Start the WebSocket listener task(s).""" self.websocket_reconnect = reconnect @@ -267,7 +360,7 @@ async def connect_notifications( asyncio.create_task( coro=self._websocket_listener(f"ws://{self.host}:9339/"), name=f"{self.host} - listener task", - ) + ), ) self._websocket_listener_active = True @@ -277,10 +370,10 @@ async def connect_notifications( self._websocket_tasks.add( asyncio.create_task( coro=self._websocket_listener( - f"ws://{self.host}:9339/remoteControl" + f"ws://{self.host}:9339/remoteControl", ), name=f"{self.host} - remote listener task", - ) + ), ) self._websocket_listener_remote_listener_active = True @@ -301,33 +394,40 @@ async def _websocket_listener(self, host: str) -> None: """WebSocket listener.""" while True: try: - async with ClientSession(conn_timeout=WEBSOCKET_TIMEOUT) as session: - async with session.ws_connect( - url=host, heartbeat=WEBSOCKET_TIMEOUT - ) as websocket: - self.websocket_connected = True - - if self._on_connection: - await self._trigger_callback(self._on_connection) - - while self._websocket_listeners_active: - with contextlib.suppress(asyncio.TimeoutError): - # Receive JSON in order to get the Websocket notification name for deserialization - notification = await asyncio.wait_for( - websocket.receive_json(), - timeout=WEBSOCKET_TIMEOUT, - ) - - # Ensure that any notifications received after the disconnect command has been executed are not processed - if not self._websocket_listeners_active: - break - - await self._on_message(notification) - - # Disconnect - self.websocket_connected = False - await websocket.close() - return + async with ( + ClientSession( + timeout=ClientTimeout(total=WEBSOCKET_TIMEOUT), + ) as session, + session.ws_connect( + url=host, + heartbeat=WEBSOCKET_TIMEOUT, + ) as websocket, + ): + self.websocket_connected = True + + if self._on_connection: + await self._trigger_callback(self._on_connection) + + while self._websocket_listeners_active: + with contextlib.suppress(asyncio.TimeoutError): + # Receive JSON in order to get the + # Websocket notification name for deserialization + notification = await asyncio.wait_for( + websocket.receive_json(), + timeout=WEBSOCKET_TIMEOUT, + ) + + # Ensure that any notifications received after the + # disconnect command has been executed are not processed + if not self._websocket_listeners_active: + break + + await self._on_message(notification) + + # Disconnect + self.websocket_connected = False + await websocket.close() + return except ( ClientConnectorError, @@ -343,7 +443,7 @@ async def _websocket_listener(self, host: str) -> None: await self._trigger_callback(self._on_connection_lost) if not self.websocket_reconnect: - logger.error("%s : %s - %s", host, type(error), error) + logger.exception("%s", host) self.disconnect_notifications() return @@ -355,25 +455,23 @@ class _ResponseWrapper: data: str - async def _on_message(self, notification) -> None: + async def _on_message(self, notification: BaseWebSocketResponse) -> None: """Handle WebSocket notifications.""" - # Get the object type and deserialized object. try: notification_type = notification["eventType"] deserialized_data = self.api_client.deserialize( - self._ResponseWrapper(json.dumps(notification)), notification_type + self._ResponseWrapper(json.dumps(notification)), + notification_type, ).event_data - except (ValueError, AttributeError) as error: - logger.error( - "%s unable to deserialize WebSocket notification: (%s : %s) with error: (%s : %s)", + except (ValueError, AttributeError): + logger.exception( + "%s unable to deserialize WebSocket notification: (%s : %s)", self.host, notification_type, notification, - type(error), - error, ) return @@ -398,259 +496,356 @@ async def _on_message(self, notification) -> None: if triggered_notification: await self._trigger_callback(triggered_notification, deserialized_data) - async def _trigger_callback(self, callback, *args): + async def _trigger_callback( + self, + callback: Callable, + *args: BaseWebSocketResponse | dict | str | WebSocketEventType, + ) -> None: """Trigger async or sync callback correctly.""" if asyncio.iscoroutinefunction(callback): await callback(*args) else: callback(*args) - def get_on_connection_lost(self, on_connection_lost) -> None: - """Callback for WebSocket connection lost.""" + def get_on_connection_lost(self, on_connection_lost: Callable) -> None: + """Set callback for WebSocket connection lost.""" self._on_connection_lost = on_connection_lost - def get_on_connection(self, on_connection) -> None: - """Callback for WebSocket connection.""" + def get_on_connection(self, on_connection: Callable) -> None: + """Set callback for WebSocket connection.""" self._on_connection = on_connection - def get_all_notifications(self, on_all_notifications) -> None: - """Callback for all notifications.""" + def get_all_notifications( + self, + on_all_notifications: Callable[[WebSocketEventType, str], None], + ) -> None: + """Set callback for all notifications.""" self._on_all_notifications = on_all_notifications - def get_all_notifications_raw(self, on_all_notifications_raw) -> None: - """Callback for all notifications as dict.""" + def get_all_notifications_raw( + self, + on_all_notifications_raw: Callable[[BaseWebSocketResponse], None], + ) -> None: + """Set callback for all notifications as dict.""" self._on_all_notifications_raw = on_all_notifications_raw # Generated section start def get_active_hdmi_input_signal_notifications( - self, on_active_hdmi_input_signal_notification + self, + on_active_hdmi_input_signal_notification: Callable[ + [WebSocketEventActiveHdmiInputSignal], None + ], ) -> None: - """Callback for WebSocketEventActiveHdmiInputSignal notifications.""" + """Set callback for WebSocketEventActiveHdmiInputSignal notifications.""" self._notification_callbacks["WebSocketEventActiveHdmiInputSignal"] = ( on_active_hdmi_input_signal_notification ) def get_active_listening_mode_notifications( - self, on_active_listening_mode_notification + self, + on_active_listening_mode_notification: Callable[ + [WebSocketEventActiveListeningMode], None + ], ) -> None: - """Callback for WebSocketEventActiveListeningMode notifications.""" + """Set callback for WebSocketEventActiveListeningMode notifications.""" self._notification_callbacks["WebSocketEventActiveListeningMode"] = ( on_active_listening_mode_notification ) def get_active_speaker_group_notifications( - self, on_active_speaker_group_notification + self, + on_active_speaker_group_notification: Callable[ + [WebSocketEventActiveSpeakerGroup], None + ], ) -> None: - """Callback for WebSocketEventActiveSpeakerGroup notifications.""" + """Set callback for WebSocketEventActiveSpeakerGroup notifications.""" self._notification_callbacks["WebSocketEventActiveSpeakerGroup"] = ( on_active_speaker_group_notification ) - def get_alarm_timer_notifications(self, on_alarm_timer_notification) -> None: - """Callback for WebSocketEventAlarmTimer notifications.""" + def get_alarm_timer_notifications( + self, on_alarm_timer_notification: Callable[[WebSocketEventAlarmTimer], None] + ) -> None: + """Set callback for WebSocketEventAlarmTimer notifications.""" self._notification_callbacks["WebSocketEventAlarmTimer"] = ( on_alarm_timer_notification ) def get_alarm_triggered_notifications( - self, on_alarm_triggered_notification + self, + on_alarm_triggered_notification: Callable[[WebSocketEventAlarmTriggered], None], ) -> None: - """Callback for WebSocketEventAlarmTriggered notifications.""" + """Set callback for WebSocketEventAlarmTriggered notifications.""" self._notification_callbacks["WebSocketEventAlarmTriggered"] = ( on_alarm_triggered_notification ) - def get_battery_notifications(self, on_battery_notification) -> None: - """Callback for WebSocketEventBattery notifications.""" + def get_battery_notifications( + self, on_battery_notification: Callable[[WebSocketEventBattery], None] + ) -> None: + """Set callback for WebSocketEventBattery notifications.""" self._notification_callbacks["WebSocketEventBattery"] = on_battery_notification def get_beo_remote_button_notifications( - self, on_beo_remote_button_notification + self, + on_beo_remote_button_notification: Callable[ + [WebSocketEventBeoRemoteButton], None + ], ) -> None: - """Callback for WebSocketEventBeoRemoteButton notifications.""" + """Set callback for WebSocketEventBeoRemoteButton notifications.""" self._notification_callbacks["WebSocketEventBeoRemoteButton"] = ( on_beo_remote_button_notification ) def get_beolink_experiences_result_notifications( - self, on_beolink_experiences_result_notification + self, + on_beolink_experiences_result_notification: Callable[ + [WebSocketEventBeolinkExperiencesResult], None + ], ) -> None: - """Callback for WebSocketEventBeolinkExperiencesResult notifications.""" + """Set callback for WebSocketEventBeolinkExperiencesResult notifications.""" self._notification_callbacks["WebSocketEventBeolinkExperiencesResult"] = ( on_beolink_experiences_result_notification ) def get_beolink_join_result_notifications( - self, on_beolink_join_result_notification + self, + on_beolink_join_result_notification: Callable[ + [WebSocketEventBeolinkJoinResult], None + ], ) -> None: - """Callback for WebSocketEventBeolinkJoinResult notifications.""" + """Set callback for WebSocketEventBeolinkJoinResult notifications.""" self._notification_callbacks["WebSocketEventBeolinkJoinResult"] = ( on_beolink_join_result_notification ) - def get_button_notifications(self, on_button_notification) -> None: - """Callback for WebSocketEventButton notifications.""" + def get_button_notifications( + self, on_button_notification: Callable[[WebSocketEventButton], None] + ) -> None: + """Set callback for WebSocketEventButton notifications.""" self._notification_callbacks["WebSocketEventButton"] = on_button_notification - def get_curtains_notifications(self, on_curtains_notification) -> None: - """Callback for WebSocketEventCurtains notifications.""" + def get_curtains_notifications( + self, on_curtains_notification: Callable[[WebSocketEventCurtains], None] + ) -> None: + """Set callback for WebSocketEventCurtains notifications.""" self._notification_callbacks["WebSocketEventCurtains"] = ( on_curtains_notification ) def get_hdmi_video_format_signal_notifications( - self, on_hdmi_video_format_signal_notification + self, + on_hdmi_video_format_signal_notification: Callable[ + [WebSocketEventHdmiVideoFormatSignal], None + ], ) -> None: - """Callback for WebSocketEventHdmiVideoFormatSignal notifications.""" + """Set callback for WebSocketEventHdmiVideoFormatSignal notifications.""" self._notification_callbacks["WebSocketEventHdmiVideoFormatSignal"] = ( on_hdmi_video_format_signal_notification ) - def get_notification_notifications(self, on_notification_notification) -> None: - """Callback for WebSocketEventNotification notifications.""" + def get_notification_notifications( + self, on_notification_notification: Callable[[WebSocketEventNotification], None] + ) -> None: + """Set callback for WebSocketEventNotification notifications.""" self._notification_callbacks["WebSocketEventNotification"] = ( on_notification_notification ) - def get_playback_error_notifications(self, on_playback_error_notification) -> None: - """Callback for WebSocketEventPlaybackError notifications.""" + def get_playback_error_notifications( + self, + on_playback_error_notification: Callable[[WebSocketEventPlaybackError], None], + ) -> None: + """Set callback for WebSocketEventPlaybackError notifications.""" self._notification_callbacks["WebSocketEventPlaybackError"] = ( on_playback_error_notification ) def get_playback_metadata_notifications( - self, on_playback_metadata_notification + self, + on_playback_metadata_notification: Callable[ + [WebSocketEventPlaybackMetadata], None + ], ) -> None: - """Callback for WebSocketEventPlaybackMetadata notifications.""" + """Set callback for WebSocketEventPlaybackMetadata notifications.""" self._notification_callbacks["WebSocketEventPlaybackMetadata"] = ( on_playback_metadata_notification ) def get_playback_progress_notifications( - self, on_playback_progress_notification + self, + on_playback_progress_notification: Callable[ + [WebSocketEventPlaybackProgress], None + ], ) -> None: - """Callback for WebSocketEventPlaybackProgress notifications.""" + """Set callback for WebSocketEventPlaybackProgress notifications.""" self._notification_callbacks["WebSocketEventPlaybackProgress"] = ( on_playback_progress_notification ) def get_playback_source_notifications( - self, on_playback_source_notification + self, + on_playback_source_notification: Callable[[WebSocketEventPlaybackSource], None], ) -> None: - """Callback for WebSocketEventPlaybackSource notifications.""" + """Set callback for WebSocketEventPlaybackSource notifications.""" self._notification_callbacks["WebSocketEventPlaybackSource"] = ( on_playback_source_notification ) - def get_playback_state_notifications(self, on_playback_state_notification) -> None: - """Callback for WebSocketEventPlaybackState notifications.""" + def get_playback_state_notifications( + self, + on_playback_state_notification: Callable[[WebSocketEventPlaybackState], None], + ) -> None: + """Set callback for WebSocketEventPlaybackState notifications.""" self._notification_callbacks["WebSocketEventPlaybackState"] = ( on_playback_state_notification ) - def get_power_state_notifications(self, on_power_state_notification) -> None: - """Callback for WebSocketEventPowerState notifications.""" + def get_power_state_notifications( + self, on_power_state_notification: Callable[[WebSocketEventPowerState], None] + ) -> None: + """Set callback for WebSocketEventPowerState notifications.""" self._notification_callbacks["WebSocketEventPowerState"] = ( on_power_state_notification ) def get_powerlink_connection_state_notifications( - self, on_powerlink_connection_state_notification + self, + on_powerlink_connection_state_notification: Callable[ + [WebSocketEventPowerlinkConnectionState], None + ], ) -> None: - """Callback for WebSocketEventPowerlinkConnectionState notifications.""" + """Set callback for WebSocketEventPowerlinkConnectionState notifications.""" self._notification_callbacks["WebSocketEventPowerlinkConnectionState"] = ( on_powerlink_connection_state_notification ) def get_puc_install_remote_id_status_notifications( - self, on_puc_install_remote_id_status_notification + self, + on_puc_install_remote_id_status_notification: Callable[ + [WebSocketEventPucInstallRemoteIdStatus], None + ], ) -> None: - """Callback for WebSocketEventPucInstallRemoteIdStatus notifications.""" + """Set callback for WebSocketEventPucInstallRemoteIdStatus notifications.""" self._notification_callbacks["WebSocketEventPucInstallRemoteIdStatus"] = ( on_puc_install_remote_id_status_notification ) - def get_role_notifications(self, on_role_notification) -> None: - """Callback for WebSocketEventRole notifications.""" + def get_role_notifications( + self, on_role_notification: Callable[[WebSocketEventRole], None] + ) -> None: + """Set callback for WebSocketEventRole notifications.""" self._notification_callbacks["WebSocketEventRole"] = on_role_notification def get_room_compensation_current_measurement_event_notifications( - self, on_room_compensation_current_measurement_event_notification + self, + on_room_compensation_current_measurement_event_notification: Callable[ + [WebSocketEventRoomCompensationCurrentMeasurementEvent], None + ], ) -> None: - """Callback for WebSocketEventRoomCompensationCurrentMeasurementEvent notifications.""" + """Set callback for WebSocketEventRoomCompensationCurrentMeasurementEvent notifications.""" self._notification_callbacks[ "WebSocketEventRoomCompensationCurrentMeasurementEvent" ] = on_room_compensation_current_measurement_event_notification def get_room_compensation_state_notifications( - self, on_room_compensation_state_notification + self, + on_room_compensation_state_notification: Callable[ + [WebSocketEventRoomCompensationState], None + ], ) -> None: - """Callback for WebSocketEventRoomCompensationState notifications.""" + """Set callback for WebSocketEventRoomCompensationState notifications.""" self._notification_callbacks["WebSocketEventRoomCompensationState"] = ( on_room_compensation_state_notification ) def get_software_update_state_notifications( - self, on_software_update_state_notification + self, + on_software_update_state_notification: Callable[ + [WebSocketEventSoftwareUpdateState], None + ], ) -> None: - """Callback for WebSocketEventSoftwareUpdateState notifications.""" + """Set callback for WebSocketEventSoftwareUpdateState notifications.""" self._notification_callbacks["WebSocketEventSoftwareUpdateState"] = ( on_software_update_state_notification ) - def get_sound_settings_notifications(self, on_sound_settings_notification) -> None: - """Callback for WebSocketEventSoundSettings notifications.""" + def get_sound_settings_notifications( + self, + on_sound_settings_notification: Callable[[WebSocketEventSoundSettings], None], + ) -> None: + """Set callback for WebSocketEventSoundSettings notifications.""" self._notification_callbacks["WebSocketEventSoundSettings"] = ( on_sound_settings_notification ) - def get_source_change_notifications(self, on_source_change_notification) -> None: - """Callback for WebSocketEventSourceChange notifications.""" + def get_source_change_notifications( + self, + on_source_change_notification: Callable[[WebSocketEventSourceChange], None], + ) -> None: + """Set callback for WebSocketEventSourceChange notifications.""" self._notification_callbacks["WebSocketEventSourceChange"] = ( on_source_change_notification ) def get_speaker_group_changed_notifications( - self, on_speaker_group_changed_notification + self, + on_speaker_group_changed_notification: Callable[ + [WebSocketEventSpeakerGroupChanged], None + ], ) -> None: - """Callback for WebSocketEventSpeakerGroupChanged notifications.""" + """Set callback for WebSocketEventSpeakerGroupChanged notifications.""" self._notification_callbacks["WebSocketEventSpeakerGroupChanged"] = ( on_speaker_group_changed_notification ) def get_speaker_link_status_changed_notifications( - self, on_speaker_link_status_changed_notification + self, + on_speaker_link_status_changed_notification: Callable[ + [WebSocketEventSpeakerLinkStatusChanged], None + ], ) -> None: - """Callback for WebSocketEventSpeakerLinkStatusChanged notifications.""" + """Set callback for WebSocketEventSpeakerLinkStatusChanged notifications.""" self._notification_callbacks["WebSocketEventSpeakerLinkStatusChanged"] = ( on_speaker_link_status_changed_notification ) def get_stand_connected_notifications( - self, on_stand_connected_notification + self, + on_stand_connected_notification: Callable[[WebSocketEventStandConnected], None], ) -> None: - """Callback for WebSocketEventStandConnected notifications.""" + """Set callback for WebSocketEventStandConnected notifications.""" self._notification_callbacks["WebSocketEventStandConnected"] = ( on_stand_connected_notification ) - def get_stand_position_notifications(self, on_stand_position_notification) -> None: - """Callback for WebSocketEventStandPosition notifications.""" + def get_stand_position_notifications( + self, + on_stand_position_notification: Callable[[WebSocketEventStandPosition], None], + ) -> None: + """Set callback for WebSocketEventStandPosition notifications.""" self._notification_callbacks["WebSocketEventStandPosition"] = ( on_stand_position_notification ) - def get_tv_info_notifications(self, on_tv_info_notification) -> None: - """Callback for WebSocketEventTvInfo notifications.""" + def get_tv_info_notifications( + self, on_tv_info_notification: Callable[[WebSocketEventTvInfo], None] + ) -> None: + """Set callback for WebSocketEventTvInfo notifications.""" self._notification_callbacks["WebSocketEventTvInfo"] = on_tv_info_notification - def get_volume_notifications(self, on_volume_notification) -> None: - """Callback for WebSocketEventVolume notifications.""" + def get_volume_notifications( + self, on_volume_notification: Callable[[WebSocketEventVolume], None] + ) -> None: + """Set callback for WebSocketEventVolume notifications.""" self._notification_callbacks["WebSocketEventVolume"] = on_volume_notification - def get_wisa_out_state_notifications(self, on_wisa_out_state_notification) -> None: - """Callback for WebSocketEventWisaOutState notifications.""" + def get_wisa_out_state_notifications( + self, + on_wisa_out_state_notification: Callable[[WebSocketEventWisaOutState], None], + ) -> None: + """Set callback for WebSocketEventWisaOutState notifications.""" self._notification_callbacks["WebSocketEventWisaOutState"] = ( on_wisa_out_state_notification ) diff --git a/python_client/mozart_api/rest.py b/python_client/mozart_api/rest.py index 6ea2abc..cb98063 100644 --- a/python_client/mozart_api/rest.py +++ b/python_client/mozart_api/rest.py @@ -1,26 +1,25 @@ # coding: utf-8 """ - Mozart platform API +Mozart platform API - API for interacting with the Mozart platform. +API for interacting with the Mozart platform. - The version of the OpenAPI document: 0.2.0 - Contact: support@bang-olufsen.dk - Generated by OpenAPI Generator (https://openapi-generator.tech) +The version of the OpenAPI document: 0.2.0 +Contact: support@bang-olufsen.dk +Generated by OpenAPI Generator (https://openapi-generator.tech) - Do not edit the class manually. +Do not edit the class manually. """ # noqa: E501 - import io import json import logging import re import ssl +from urllib.parse import quote_plus, urlencode import aiohttp -from urllib.parse import urlencode, quote_plus from mozart_api.exceptions import ApiException, ApiValueError @@ -28,7 +27,6 @@ class RESTResponse(io.IOBase): - def __init__(self, resp, data) -> None: self.aiohttp_response = resp self.status = resp.status @@ -45,11 +43,9 @@ def getheader(self, name, default=None): class RESTClientObject: - def __init__( self, configuration, pools_size=4, maxsize=None, ssl_context=None ) -> None: - # maxsize is number of requests to host that are allowed in parallel if maxsize is None: maxsize = configuration.connection_pool_maxsize @@ -138,9 +134,7 @@ async def request( if body is not None: body = json.dumps(body) args["data"] = body - elif ( - headers["Content-Type"] == "application/x-www-form-urlencoded" - ): # noqa: E501 + elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 args["data"] = aiohttp.FormData(post_params) elif headers["Content-Type"] == "multipart/form-data": # must del headers['Content-Type'], or the correct @@ -152,6 +146,11 @@ async def request( if isinstance(v, tuple) and len(v) == 3: data.add_field(k, value=v[1], filename=v[0], content_type=v[2]) else: + # Ensures that dict objects are serialized + if isinstance(v, dict): + v = json.dumps(v) + elif isinstance(v, int): + v = str(v) data.add_field(k, v) args["data"] = data @@ -169,7 +168,6 @@ async def request( r = await self.pool_manager.request(**args) if _preload_content: - data = await r.read() r = RESTResponse(r, data) diff --git a/python_client/pyproject.toml b/python_client/pyproject.toml index e0c33ed..10e51f1 100644 --- a/python_client/pyproject.toml +++ b/python_client/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mozart_api" -version = "4.1.1.116.0" +version = "4.1.1.116.1" description = "Mozart platform API" authors = [ "BangOlufsen ", @@ -32,14 +32,13 @@ exclude = [ [tool.poetry.dependencies] urllib3 = ">= 1.25.3" python-dateutil = ">=2.8.2" -aiohttp = ">=3.8.3" +aiohttp = "<4,>=3.8.3" pydantic = ">=1.10" aenum = ">=3.1.11" aioconsole = ">=0.4.1" inflection = ">=0.5.1" typing-extensions = ">=4.7.1" zeroconf = ">=0.25.1" -websockets = ">=12.0" python = ">=3.11" [tool.poetry.dev-dependencies]