from yta_general_utils.programming.enum import YTAEnum as Enum


class _Field(Enum):
    """
    Enum class to represent the names of the
    fields we are able to handle in the app.

    This has been built to have all the names
    centralized in one place and to reuse in
    any app part in which it is needed.

    For internal use only. Use a more specific
    Enum class to interact with the different
    field names.
    """

    STATUS = 'status'
    """
    The status of an element, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """
    SEGMENTS = 'segments'
    """
    The segments that a project includes and have
    to be built.
    """
    TYPE = 'type'
    """
    The type of some specific element. See the 
    specific type Enum classes.
    """
    TEXT = 'text'
    """
    The text that has to be written in some 
    segment with text content.
    """
    DURATION = 'duration'
    """
    The length of time that the element being
    referenced will be displayed or occurring.
    """
    KEYWORDS = 'keywords'
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = 'url'
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = 'filename'
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    ENGINE = 'engine'
    """
    The engine that must be used to build the
    music or the voice narration.
    """
    LANGUAGE = 'language'
    """
    The language that must be used for the
    audio narration.
    """
    VOICE = 'voice'
    """
    The voice that has to be used to create the
    voice narration.
    """
    MUSIC = 'music'
    """
    The filename of a music that has to be included
    as an audio part for the content.
    """
    VOICE_NARRATION = 'voice_narration'
    """
    The voice narration object that includes the
    information of how to build the voice narration.
    """
    ENHANCEMENTS = 'enhancements'
    """
    The enhancements that have to be built for the
    content.
    """
    START = 'start'
    """
    The time moment in which the content has to start.
    """
    MODE = 'mode'
    """
    The mode in which the content has to be included.
    """
    EXTRA_PARAMS = 'extra_params'
    """
    The extra parameters we need to build some of the
    content.
    """
    # Building fields below
    TRANSCRIPTION = 'transcription'
    """
    The transcription of the audio narration if 
    existing.
    """
    SHORTCODES = 'shortcodes'
    """
    The shortcodes found in an audio narration.
    """
    AUDIO_FILENAME = 'audio_filename'
    """
    The filename of the audio that has been 
    generated by the system and has to be used
    as the audio content part.
    """
    AUDIO_CLIP = 'audio_clip'
    """
    The clip generated from the 'audio_filename'.
    """
    VIDEO_FILENAME = 'video_filename'
    """
    The filename of the video part that has 
    been generated by the system and has to be
    used as the video content part.
    """
    VIDEO_CLIP = 'video_clip'
    """
    The clip generated from the 'video_filename'.
    """
    FULL_FILENAME = 'full_filename'
    """
    The filename of the video and audio part put
    together, generated by the system, and that
    is the whole segment content with the effects
    and everything appliedo n it.
    """
    FULL_CLIP = 'full_clip'
    """
    The clip generated from the 'full_filename'.
    """
    FILENAME_PROCESSED = 'filename_processed'
    """
    The filename of a concept that has been 
    processed and built.
    """
    NARRATOR_NAME = 'narrator_name'
    """
    The name of the narrator voice that will be
    used for the provided voice narration engine.
    """
    SPEED = 'speed'
    """
    The speed that must be used when generating
    the voice narration with the given narrator
    name and engine.
    """
    EMOTION = 'emotion'
    """
    The emotion that must be used when generating
    the voice narration.
    """
    PITCH = 'pitch'
    """
    The pitch that must be used when generating
    the voice narration.
    """

class ProjectField(Enum):
    """
    Enum class to represent the names of the
    fields related to a Project.
    """

    STATUS = _Field.STATUS.value
    """
    The status of an element, that will tell us
    if it is being constructed, waiting for it,
    etc.

    See ProjectStatus Enum class.
    """
    SEGMENTS = _Field.SEGMENTS.value
    """
    The segments that a project includes and have
    to be built.
    """

class SegmentField(Enum):
    """
    Enum class to represent the names of the
    fields related to a Segment (which belongs
    to a Project).
    """

    TYPE = _Field.TYPE.value
    """
    The type of a segment, that determins what
    kind of content will be used to fulfill that
    segment.
    """
    TEXT = _Field.TEXT.value
    """
    The text that has to be written in some 
    segment with text content.
    """
    DURATION = _Field.DURATION.value
    """
    The length of time that the segment being
    referenced will be displayed or occurring.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = _Field.URL.value
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = _Field.FILENAME.value
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    MUSIC = _Field.MUSIC.value
    """
    The information (as a dict) of the music that
    must be used for this Segment (it can be None,
    which means no music requested).
    """
    VOICE_NARRATION = _Field.VOICE_NARRATION.value
    """
    The information (as a dict) of the voice
    narration that must be used for this Segment
    (it can be None, which means no voice narration
    requested).
    """
    ENHANCEMENTS = _Field.ENHANCEMENTS.value
    """
    The enhancements that have to be built for the
    content.
    """
    EXTRA_PARAMS = _Field.EXTRA_PARAMS.value
    """
    The extra parameters we need to build some of the
    content.
    """

class EnhancementField(Enum):
    """
    Enum class to represent the names of the
    fields related to an Enhancement (which
    belongs to a Project Segment).
    """

    TYPE = _Field.TYPE.value
    """
    The type of an Enhancement, that determins
    what kind of content will be used to fulfill
    that segment.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = _Field.URL.value
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = _Field.FILENAME.value
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    TEXT = _Field.TEXT.value
    """
    The text that has to be written in some 
    segment with text content.
    """
    DURATION = _Field.DURATION.value
    """
    The length of time that the segment being
    referenced will be displayed or occurring.
    """
    MUSIC = _Field.MUSIC.value
    """
    The information (as a dict) of the music that
    must be used for this Segment (it can be None,
    which means no music requested).
    """
    VOICE_NARRATION = _Field.VOICE_NARRATION.value
    """
    The information (as a dict) of the voice
    narration that must be used for this Segment
    (it can be None, which means no voice narration
    requested).
    """
    START = _Field.START.value
    """
    The time moment in which the content has to start.
    """
    MODE = _Field.MODE.value
    """
    The mode in which the content has to be included.
    """
    EXTRA_PARAMS = _Field.EXTRA_PARAMS.value
    """
    The extra parameters we need to build some of the
    content.
    """

class ShortcodeField(Enum):
    """
    Enum class to represent the names of the
    fields related to a Shortcode (which
    was detected within a Segment or Enhancement
    text).
    """

    TYPE = _Field.TYPE.value
    """
    The type of a Shortcode, that determins
    what kind of content will be used to fulfill
    that segment.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = _Field.URL.value
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = _Field.FILENAME.value
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    TEXT = _Field.TEXT.value
    """
    The text that has to be written in some 
    segment with text content.
    """
    DURATION = _Field.DURATION.value
    """
    The length of time that the segment being
    referenced will be displayed or occurring.
    """
    MUSIC = _Field.MUSIC.value
    """
    The information (as a dict) of the music that
    must be used for this Segment (it can be None,
    which means no music requested).
    """
    VOICE_NARRATION = _Field.VOICE_NARRATION.value
    """
    The information (as a dict) of the voice
    narration that must be used for this Segment
    (it can be None, which means no voice narration
    requested).
    """
    START = _Field.START.value
    """
    The time moment in which the content has to start.
    """
    MODE = _Field.MODE.value
    """
    The mode in which the content has to be included.
    """
    EXTRA_PARAMS = _Field.EXTRA_PARAMS.value
    """
    The extra parameters we need to build some of the
    content.
    """

class ProjectBuildingField(Enum):
    """
    The fields of a Project that are used when its
    content is being built and doesn't come from
    the original json source.
    """

    STATUS = _Field.STATUS.value
    """
    The status of the Project, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """

class SegmentBuildingField(Enum):
    """
    The fields that are used when building the
    Segment and are not provided by the user in
    the initial json data.
    """

    STATUS = _Field.STATUS.value
    """
    The status of the Segment, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """
    TRANSCRIPTION = _Field.TRANSCRIPTION.value
    """
    The transcription of the audio narration of
    the segment if existing.
    """
    SHORTCODES = _Field.SHORTCODES.value
    """
    The shortcodes that have been found in the
    audio narration.
    """
    AUDIO_FILENAME = _Field.AUDIO_FILENAME.value
    """
    The filename of the audio that has been 
    generated by the system and has to be used
    as the audio content part.
    """
    AUDIO_CLIP = _Field.AUDIO_CLIP.value
    """
    The clip generated from the 'audio_filename'.
    """
    VIDEO_FILENAME = _Field.VIDEO_FILENAME.value
    """
    The filename of the video part that has 
    been generated by the system and has to be
    used as the video content part.
    """
    VIDEO_CLIP = _Field.VIDEO_CLIP.value
    """
    The clip generated from the 'video_filename'.
    """
    FULL_FILENAME = _Field.FULL_FILENAME.value
    """
    The filename of the video and audio part put
    together, generated by the system, and that
    is the whole segment content with the effects
    and everything appliedo n it.
    """
    FULL_CLIP = _Field.FULL_CLIP.value
    """
    The clip generated from the 'full_filename'.
    """

class MusicField(Enum):
    """
    The fields that are used for the Segment or
    Enhancement music and are not provided by
    the user in the initial json data.
    """
    
    FILENAME = _Field.FILENAME.value
    """
    The filename of the music that must be used
    in the segment or enhancement.
    """
    URL = _Field.URL.value
    """
    The url in which the music is stored so it
    can be downloaded and applied in the segment
    or enhancement.
    """
    ENGINE = _Field.ENGINE.value
    """
    The engine that must be used to obtain the 
    music that has been requested for the segment
    or enhancement.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The keywords that must be used to obtain the
    music according to the engine provided.
    """

class MusicBuildingField(Enum):
    """
    The fields that are used for the Segment or
    Enhancement music and are not provided by
    the user in the initial json data.
    """

    FILENAME_PROCESSED = _Field.FILENAME_PROCESSED.value
    """
    The filename of the definitive music that
    has been processed and/or built and is able
    to be used for the Component.
    """

class VoiceNarrationField(Enum):
    """
    The fields that are used for the Segment or
    Enhancement voice narration and are not
    provided by the user in the initial json
    data.
    """

    FILENAME = _Field.FILENAME.value
    """
    The filename that holds a voice narration
    that must be used directly.
    """
    TEXT = _Field.TEXT.value
    """
    The text that must be used to be narrated
    by the voice narration.
    """
    ENGINE = _Field.ENGINE.value
    """
    The engine that must be used within the
    voice narration building process.
    """
    LANGUAGE = _Field.LANGUAGE.value
    """
    The language that must be used for the
    audio narration.
    """
    NARRATOR_NAME = _Field.NARRATOR_NAME.value
    """
    The voice of the narrator, for the given
    voice narration engine, that must be used.
    """
    SPEED = _Field.SPEED.value
    """
    The speed that must be used when generating
    the voice narration.
    """
    EMOTION = _Field.EMOTION.value
    """
    The emotion that must be used when
    generating the voice narration.
    """
    PITCH = _Field.PITCH.value
    """
    The pitch that must be used when generating
    the voice narration.
    """

class VoiceNarrationBuildingField(Enum):
    """
    The fields that are used for the Segment or
    Enhancement voice narration and are not
    provided by the user in the initial json data.
    """

    FILENAME_PROCESSED = _Field.FILENAME_PROCESSED.value
    """
    The filename of the definitive voice
    narration that has been processed and/or
    built and is able to be used for the Component.
    """

class EnhancementBuildingField(Enum):
    """
    The fields that are used when building the 
    Enhancement and are not provided by the user
    in the initial json data.
    """

    STATUS = _Field.STATUS.value
    """
    The status of the Segment, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """
    TRANSCRIPTION = _Field.TRANSCRIPTION.value
    """
    The transcription of the audio narration of
    the segment if existing.
    """
    SHORTCODES = _Field.SHORTCODES.value
    """
    The shortcodes that have been found in the
    audio narration.
    """
    AUDIO_FILENAME = _Field.AUDIO_FILENAME.value
    """
    The filename of the audio that has been 
    generated by the system and has to be used
    as the audio content part.
    """
    AUDIO_CLIP = _Field.AUDIO_CLIP.value
    """
    The clip generated from the 'audio_filename'.
    """
    VIDEO_FILENAME = _Field.VIDEO_FILENAME.value
    """
    The filename of the video part that has 
    been generated by the system and has to be
    used as the video content part.
    """
    VIDEO_CLIP = _Field.VIDEO_CLIP.value
    """
    The clip generated from the 'video_filename'.
    """
    FULL_FILENAME = _Field.FULL_FILENAME.value
    """
    The filename of the video and audio part put
    together, generated by the system, and that
    is the whole segment content with the effects
    and everything appliedo n it.
    """
    FULL_CLIP = _Field.FULL_CLIP.value
    """
    The clip generated from the 'full_filename'.
    """