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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .training_category_object_response_body import TrainingCategoryObjectResponseBody
from .training_course_label_object_response_body import TrainingCourseLabelObjectResponseBody
from .training_course_response_object_response_body_status import TrainingCourseResponseObjectResponseBodyStatus


class TrainingCourseResponseObjectResponseBody(UniversalBaseModel):
    """
    Training Course response object.
    """

    category: TrainingCategoryObjectResponseBody
    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description of the course.
    """

    estimated_time_to_complete_minutes: typing_extensions.Annotated[
        int,
        FieldMetadata(alias="estimatedTimeToCompleteMinutes"),
        pydantic.Field(
            alias="estimatedTimeToCompleteMinutes", description="Estimated time it takes to complete the course."
        ),
    ]
    id: str = pydantic.Field()
    """
    ID of the training course.
    """

    labels: typing.Optional[typing.List[TrainingCourseLabelObjectResponseBody]] = pydantic.Field(default=None)
    """
    List of course labels.
    """

    revision_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="revisionId"),
        pydantic.Field(alias="revisionId", description="ID of the course's specific version."),
    ]
    status: TrainingCourseResponseObjectResponseBodyStatus = pydantic.Field()
    """
    Status of the training course. Always returned.
    Note: Only courses in a ‘published’ state are assignable to learners. Archiving a course deletes only ‘inProgress’ assignments associated with that course, and deleting a course deletes all assignments associated with that course.  Valid values: `published`, `deleted`, `archived`, `unknown`
    """

    title: str = pydantic.Field()
    """
    Title of the course.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
