# This file was auto-generated by Fern from our API Definition.

# isort: skip_file

import typing
from importlib import import_module

if typing.TYPE_CHECKING:
    from .body_compose_music_v_1_music_post_composition_plan import BodyComposeMusicV1MusicPostCompositionPlan
    from .body_compose_music_v_1_music_post_model_id import BodyComposeMusicV1MusicPostModelId
    from .body_compose_music_with_a_detailed_response_v_1_music_detailed_post_composition_plan import (
        BodyComposeMusicWithADetailedResponseV1MusicDetailedPostCompositionPlan,
    )
    from .body_compose_music_with_a_detailed_response_v_1_music_detailed_post_model_id import (
        BodyComposeMusicWithADetailedResponseV1MusicDetailedPostModelId,
    )
    from .body_stream_composed_music_v_1_music_stream_post_composition_plan import (
        BodyStreamComposedMusicV1MusicStreamPostCompositionPlan,
    )
    from .body_stream_composed_music_v_1_music_stream_post_model_id import (
        BodyStreamComposedMusicV1MusicStreamPostModelId,
    )
    from .body_stream_composed_music_with_a_detailed_response_v_1_music_detailed_stream_post_composition_plan import (
        BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostCompositionPlan,
    )
    from .body_stream_composed_music_with_a_detailed_response_v_1_music_detailed_stream_post_model_id import (
        BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostModelId,
    )
    from .music_compose_detailed_request_output_format import MusicComposeDetailedRequestOutputFormat
    from .music_compose_detailed_stream_request_output_format import MusicComposeDetailedStreamRequestOutputFormat
    from .music_compose_request_output_format import MusicComposeRequestOutputFormat
    from .music_separate_stems_request_stem_variation_id import MusicSeparateStemsRequestStemVariationId
    from .music_stream_request_output_format import MusicStreamRequestOutputFormat
    from .music_video_to_music_request_model_id import MusicVideoToMusicRequestModelId
_dynamic_imports: typing.Dict[str, str] = {
    "BodyComposeMusicV1MusicPostCompositionPlan": ".body_compose_music_v_1_music_post_composition_plan",
    "BodyComposeMusicV1MusicPostModelId": ".body_compose_music_v_1_music_post_model_id",
    "BodyComposeMusicWithADetailedResponseV1MusicDetailedPostCompositionPlan": ".body_compose_music_with_a_detailed_response_v_1_music_detailed_post_composition_plan",
    "BodyComposeMusicWithADetailedResponseV1MusicDetailedPostModelId": ".body_compose_music_with_a_detailed_response_v_1_music_detailed_post_model_id",
    "BodyStreamComposedMusicV1MusicStreamPostCompositionPlan": ".body_stream_composed_music_v_1_music_stream_post_composition_plan",
    "BodyStreamComposedMusicV1MusicStreamPostModelId": ".body_stream_composed_music_v_1_music_stream_post_model_id",
    "BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostCompositionPlan": ".body_stream_composed_music_with_a_detailed_response_v_1_music_detailed_stream_post_composition_plan",
    "BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostModelId": ".body_stream_composed_music_with_a_detailed_response_v_1_music_detailed_stream_post_model_id",
    "MusicComposeDetailedRequestOutputFormat": ".music_compose_detailed_request_output_format",
    "MusicComposeDetailedStreamRequestOutputFormat": ".music_compose_detailed_stream_request_output_format",
    "MusicComposeRequestOutputFormat": ".music_compose_request_output_format",
    "MusicSeparateStemsRequestStemVariationId": ".music_separate_stems_request_stem_variation_id",
    "MusicStreamRequestOutputFormat": ".music_stream_request_output_format",
    "MusicVideoToMusicRequestModelId": ".music_video_to_music_request_model_id",
}


def __getattr__(attr_name: str) -> typing.Any:
    module_name = _dynamic_imports.get(attr_name)
    if module_name is None:
        raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
    try:
        module = import_module(module_name, __package__)
        if module_name == f".{attr_name}":
            return module
        else:
            return getattr(module, attr_name)
    except ImportError as e:
        raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
    except AttributeError as e:
        raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
    lazy_attrs = list(_dynamic_imports.keys())
    return sorted(lazy_attrs)


__all__ = [
    "BodyComposeMusicV1MusicPostCompositionPlan",
    "BodyComposeMusicV1MusicPostModelId",
    "BodyComposeMusicWithADetailedResponseV1MusicDetailedPostCompositionPlan",
    "BodyComposeMusicWithADetailedResponseV1MusicDetailedPostModelId",
    "BodyStreamComposedMusicV1MusicStreamPostCompositionPlan",
    "BodyStreamComposedMusicV1MusicStreamPostModelId",
    "BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostCompositionPlan",
    "BodyStreamComposedMusicWithADetailedResponseV1MusicDetailedStreamPostModelId",
    "MusicComposeDetailedRequestOutputFormat",
    "MusicComposeDetailedStreamRequestOutputFormat",
    "MusicComposeRequestOutputFormat",
    "MusicSeparateStemsRequestStemVariationId",
    "MusicStreamRequestOutputFormat",
    "MusicVideoToMusicRequestModelId",
]
