# coding: utf-8

"""
    Mozart platform API

    API for interacting with the Mozart platform.  # noqa: E501

    The version of the OpenAPI document: 0.2.0
    Contact: support@bang-olufsen.dk
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest
import datetime

import mozart_api
from mozart_api.models.product_state import ProductState  # noqa: E501
from mozart_api.rest import ApiException


class TestProductState(unittest.TestCase):
    """ProductState unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test ProductState
        include_option is a boolean, when False only required
        params are included, when True both required and
        optional params are included"""
        # model = mozart_api.models.product_state.ProductState()  # noqa: E501
        if include_optional:
            return ProductState(
                microphones=mozart_api.models.microphones_state.MicrophonesState(
                    microphone_state=mozart_api.models.microphone_state.MicrophoneState(
                        value="on",
                    ),
                    microphone_switch_state=mozart_api.models.microphone_state.MicrophoneState(
                        value="on",
                    ),
                ),
                playback=mozart_api.models.playback_state.PlaybackState(
                    metadata=mozart_api.models.playback_content_metadata.PlaybackContentMetadata(
                        album_name="0",
                        art=[
                            mozart_api.models.art.Art(
                                has_local_image=True,
                                key="0",
                                size="0",
                                type="0",
                                url="0",
                            )
                        ],
                        artist_name="0",
                        bitdepth=56,
                        bitrate=56,
                        container_name="0",
                        encoding="pcm",
                        genre="0",
                        id=56,
                        input_channel_processing="dolbySurround",
                        input_channels="0",
                        organization="0",
                        output_channel_processing="Direct",
                        output_channels="0",
                        queue_id="0",
                        remote_leader=mozart_api.models.beolink_leader.BeolinkLeader(
                            friendly_name="0",
                            jid="2714.1200304.26451293@products.bang-olufsen.com",
                        ),
                        remote_source="0",
                        samplerate=56,
                        source="0",
                        source_internal_id="0",
                        title="0",
                        total_duration=56,
                        total_duration_seconds=56,
                        track=56,
                        track_count=56,
                        uri="0",
                    ),
                    progress=mozart_api.models.playback_progress.PlaybackProgress(
                        id="0",
                        total_duration=56,
                    ),
                    source=mozart_api.models.source.Source(
                        id="0",
                        is_enabled=True,
                        is_playable=True,
                        name="0",
                        type=mozart_api.models.source_type_enum.SourceTypeEnum(
                            value="beolink",
                        ),
                    ),
                    state=mozart_api.models.rendering_state.RenderingState(
                        value="idle",
                    ),
                ),
                power_state=mozart_api.models.power_state_enum.PowerStateEnum(
                    value="networkStandby",
                ),
                software_update_state=mozart_api.models.software_update_state.SoftwareUpdateState(
                    seconds_remaining=56,
                    value="idle",
                ),
                sound_settings=mozart_api.models.sound_settings.SoundSettings(
                    adjustments=mozart_api.models.sound_adjustments.SoundAdjustments(
                        ambience=1.337,
                        bass=56,
                        directivity="0",
                        eco_mode=True,
                        fadein=True,
                        loudness=True,
                        treble=56,
                    ),
                    room_compensation=mozart_api.models.room_compensation_info.RoomCompensationInfo(
                        debug=mozart_api.models.room_compensation_debug.RoomCompensationDebug(
                            value=True,
                        ),
                        enabled=mozart_api.models.room_compensation_enabled.RoomCompensationEnabled(
                            value=True,
                        ),
                        last_result=mozart_api.models.room_compensation_result.RoomCompensationResult(
                            compensation=[
                                mozart_api.models.room_compensation_response.RoomCompensationResponse(
                                    frequency=56,
                                    gain=1.337,
                                )
                            ],
                            measured_response=[
                                mozart_api.models.room_compensation_response.RoomCompensationResponse(
                                    frequency=56,
                                    gain=1.337,
                                )
                            ],
                            placement="free",
                            reference_response=[
                                mozart_api.models.room_compensation_response.RoomCompensationResponse(
                                    frequency=56,
                                    gain=1.337,
                                )
                            ],
                            speaker_group_suggestion=mozart_api.models.speaker_group.SpeakerGroup(
                                crossover_frequency=20,
                                enable_phase_compensation=True,
                                friendly_name="0",
                                id="0",
                                is_deleteable=True,
                                items=[
                                    mozart_api.models.speaker_group_member.SpeakerGroupMember(
                                        distance=0,
                                        friendly_name="0",
                                        gain=-24,
                                        id="0",
                                        location=mozart_api.models.speaker_group_member_location.SpeakerGroupMember_location(
                                            x=56,
                                            y=56,
                                            z=56,
                                        ),
                                        redirection_level=-100,
                                        role="0",
                                        type="0",
                                    )
                                ],
                                room_compensation_id="0",
                                speaker_preset=0,
                            ),
                            time_stamp=datetime.datetime.strptime(
                                "2013-10-20 19:20:30.00", "%Y-%m-%d %H:%M:%S.%f"
                            ),
                        ),
                        last_run=null,
                        type=mozart_api.models.room_compensation_type.RoomCompensationType(
                            value="simple",
                        ),
                        version=mozart_api.models.room_compensation_version.RoomCompensationVersion(
                            algorithm=0,
                            coefficients=0,
                        ),
                    ),
                    tone_touch=mozart_api.models.sound_tone_touch.SoundToneTouch(
                        x=1.337,
                        y=1.337,
                        z=1.337,
                    ),
                ),
                source=mozart_api.models.source.Source(
                    id="0",
                    is_enabled=True,
                    is_playable=True,
                    name="0",
                    type=mozart_api.models.source_type_enum.SourceTypeEnum(
                        value="beolink",
                    ),
                ),
                tv=mozart_api.models.tv_state.TvState(
                    integration=mozart_api.models.tv_integration_types.TvIntegrationTypes(
                        value="ThirdParty",
                    ),
                    tv_info=mozart_api.models.tv_properties.TvProperties(
                        integration_supported=mozart_api.models.tv_integration_types.TvIntegrationTypes(
                            value="ThirdParty",
                        ),
                        name="0",
                        year=56,
                    ),
                ),
                volume=mozart_api.models.volume_state.VolumeState(
                    default=mozart_api.models.volume_level.VolumeLevel(
                        level=56,
                    ),
                    level=mozart_api.models.volume_level.VolumeLevel(),
                    maximum=mozart_api.models.volume_level.VolumeLevel(),
                    muted=mozart_api.models.volume_mute.VolumeMute(),
                ),
            )
        else:
            return ProductState()

    def testProductState(self):
        """Test ProductState"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


if __name__ == "__main__":
    unittest.main()
