# generated by datamodel-codegen:
#   filename:  crap_panopto.json
#   timestamp: 2024-04-28T03:41:49+00:00

from __future__ import annotations

from typing import List, Optional

from pydantic import BaseModel, Field


class PodcastStream(BaseModel):
    absolute_end: float = Field(..., alias="AbsoluteEnd")
    absolute_start: float = Field(..., alias="AbsoluteStart")
    broadcast_type: int = Field(..., alias="BroadcastType")
    edit_media_file_type: None = Field(..., alias="EditMediaFileType")
    edit_media_file_type_legacy: None = Field(..., alias="EditMediaFileTypeLegacy")
    edit_media_file_type_name: None = Field(..., alias="EditMediaFileTypeName")
    interrupted: bool = Field(..., alias="Interrupted")
    name: None = Field(..., alias="Name")
    public_id: str = Field(..., alias="PublicID")
    relative_end: float = Field(..., alias="RelativeEnd")
    relative_segments: None = Field(..., alias="RelativeSegments")
    relative_start: int = Field(..., alias="RelativeStart")
    source_media_file_type: int = Field(..., alias="SourceMediaFileType")
    stream_file_id: str = Field(..., alias="StreamFileId")
    stream_http_url: None = Field(..., alias="StreamHttpUrl")
    stream_type: int = Field(..., alias="StreamType")
    stream_type_name: str = Field(..., alias="StreamTypeName")
    stream_url: str = Field(..., alias="StreamUrl")
    tag: str = Field(..., alias="Tag")
    vr_type: int = Field(..., alias="VRType")
    variants: None = Field(..., alias="Variants")
    viewer_media_file_type: int = Field(..., alias="ViewerMediaFileType")
    viewer_media_file_type_name: str = Field(..., alias="ViewerMediaFileTypeName")


class Variant(BaseModel):
    bandwidth: int = Field(..., alias="Bandwidth")
    url: str = Field(..., alias="Url")


class Stream(BaseModel):
    absolute_end: float = Field(..., alias="AbsoluteEnd")
    absolute_start: float = Field(..., alias="AbsoluteStart")
    broadcast_type: int = Field(..., alias="BroadcastType")
    edit_media_file_type: int = Field(..., alias="EditMediaFileType")
    edit_media_file_type_legacy: None = Field(..., alias="EditMediaFileTypeLegacy")
    edit_media_file_type_name: str = Field(..., alias="EditMediaFileTypeName")
    interrupted: bool = Field(..., alias="Interrupted")
    name: None = Field(..., alias="Name")
    public_id: str = Field(..., alias="PublicID")
    relative_end: float = Field(..., alias="RelativeEnd")
    relative_segments: None = Field(..., alias="RelativeSegments")
    relative_start: int = Field(..., alias="RelativeStart")
    source_media_file_type: int = Field(..., alias="SourceMediaFileType")
    stream_file_id: str = Field(..., alias="StreamFileId")
    stream_http_url: None = Field(..., alias="StreamHttpUrl")
    stream_type: int = Field(..., alias="StreamType")
    stream_type_name: str = Field(..., alias="StreamTypeName")
    stream_url: str = Field(..., alias="StreamUrl")
    tag: str = Field(..., alias="Tag")
    vr_type: int = Field(..., alias="VRType")
    variants: List[Variant] = Field(..., alias="Variants")
    viewer_media_file_type: int = Field(..., alias="ViewerMediaFileType")
    viewer_media_file_type_name: str = Field(..., alias="ViewerMediaFileTypeName")


class Delivery(BaseModel):
    broadcast_ended: bool = Field(..., alias="BroadcastEnded")
    broadcast_interrupted: bool = Field(..., alias="BroadcastInterrupted")
    duration: float = Field(..., alias="Duration")
    has_captions: bool = Field(..., alias="HasCaptions")
    is_active_broadcast: bool = Field(..., alias="IsActiveBroadcast")
    owner_display_name: str = Field(..., alias="OwnerDisplayName")
    owner_id: str = Field(..., alias="OwnerId")
    session_abstract: Optional[str] = Field(..., alias="SessionAbstract")
    session_group_long_name: str = Field(..., alias="SessionGroupLongName")
    session_name: str = Field(..., alias="SessionName")
    session_start_time: float = Field(..., alias="SessionStartTime")
    streams: List[Stream] = Field(..., alias="Streams")
    podcast_streams: List[PodcastStream] = Field(..., alias="PodcastStreams")


class DeliveryInfo(BaseModel):
    completion_percentage: int = Field(..., alias="CompletionPercentage")
    delivery: Delivery = Field(..., alias="Delivery")
    last_viewing_position: int = Field(..., alias="LastViewingPosition")
    session_id: str = Field(..., alias="SessionId")
    session_role: int = Field(..., alias="SessionRole")


class Session(BaseModel):
    field__type: str = Field(..., alias="__type")
    abstract: Optional[str] = Field(..., alias="Abstract")
    analytics_all_time_view_count: int = Field(..., alias="AnalyticsAllTimeViewCount")
    availability_message: str = Field(..., alias="AvailabilityMessage")
    average_rating: int = Field(..., alias="AverageRating")
    bookmarks: List = Field(..., alias="Bookmarks")
    context: List = Field(..., alias="Context")
    contexts_have_time: bool = Field(..., alias="ContextsHaveTime")
    database_session_status: int = Field(..., alias="DatabaseSessionStatus")
    deleted_time: str = Field(..., alias="DeletedTime")
    delivery_id: str = Field(..., alias="DeliveryID")
    delivery_name: str = Field(..., alias="DeliveryName")
    duration: float = Field(..., alias="Duration")
    embed_url: str = Field(..., alias="EmbedUrl")
    folder_id: str = Field(..., alias="FolderID")
    folder_name: str = Field(..., alias="FolderName")
    has_captions: bool = Field(..., alias="HasCaptions")
    has_streams: bool = Field(..., alias="HasStreams")
    has_write_access: bool = Field(..., alias="HasWriteAccess")
    ios_video_url: str = Field(..., alias="IosVideoUrl")
    is_archived: bool = Field(..., alias="IsArchived")
    is_broadcast: bool = Field(..., alias="IsBroadcast")
    is_creator: bool = Field(..., alias="IsCreator")
    is_editable: bool = Field(..., alias="IsEditable")
    is_permanently_deletable: bool = Field(..., alias="IsPermanentlyDeletable")
    is_restorable: bool = Field(..., alias="IsRestorable")
    most_recent_view_position: float = Field(..., alias="MostRecentViewPosition")
    most_recent_viewing: Optional[str] = Field(..., alias="MostRecentViewing")
    notes_url: str = Field(..., alias="NotesUrl")
    owner_full_name: Optional[str] = Field(..., alias="OwnerFullName")
    owner_user_id: Optional[str] = Field(..., alias="OwnerUserId")
    permissions: List[bool] = Field(..., alias="Permissions")
    playable_object_type: int = Field(..., alias="PlayableObjectType")
    podcast_details: Optional[int] = Field(..., alias="PodcastDetails")
    presenter_first_names: List = Field(..., alias="PresenterFirstNames")
    presenter_last_names: List = Field(..., alias="PresenterLastNames")
    presenter_user_names: List = Field(..., alias="PresenterUserNames")
    progress: int = Field(..., alias="Progress")
    remote_recorder_id: Optional[str] = Field(..., alias="RemoteRecorderID")
    remote_recorder_name: Optional[str] = Field(..., alias="RemoteRecorderName")
    session_group_requires_approval: bool = Field(
        ..., alias="SessionGroupRequiresApproval"
    )
    session_id: str = Field(..., alias="SessionID")
    session_name: str = Field(..., alias="SessionName")
    show_settings: bool = Field(..., alias="ShowSettings")
    start_time: str = Field(..., alias="StartTime")
    status: int = Field(..., alias="Status")
    tablet_video_url: str = Field(..., alias="TabletVideoUrl")
    tags: List = Field(..., alias="Tags")
    thumb_url: str = Field(..., alias="ThumbUrl")
    user_can_enumerate_folder: bool = Field(..., alias="UserCanEnumerateFolder")
    viewer_url: str = Field(..., alias="ViewerUrl")
    editor_url: str = Field(..., alias="EditorUrl")
    order_sort: int = Field(..., alias="OrderSort")


class SessionList(BaseModel):
    field__type: str = Field(..., alias="__type")
    results: List[Session] = Field(..., alias="Results")
    total_number: int = Field(..., alias="TotalNumber")
    archived_count: Optional[int] = Field(..., alias="ArchivedCount")
    can_add_subfolder: bool = Field(..., alias="CanAddSubfolder")
    contains_archived_deliveries: bool = Field(..., alias="ContainsArchivedDeliveries")
    folder_type: int = Field(..., alias="FolderType")


class Parent(BaseModel):
    is_editable: bool = Field(..., alias="IsEditable")
    is_department: bool = Field(..., alias="IsDepartment")
    is_dropbox: bool = Field(..., alias="IsDropbox")
    folder_type: int = Field(..., alias="FolderType")
    deliveries_have_specified_order: bool = Field(
        ..., alias="DeliveriesHaveSpecifiedOrder"
    )
    podcast_enabled: bool = Field(..., alias="PodcastEnabled")
    user_can_create_folders: bool = Field(..., alias="UserCanCreateFolders")
    user_can_create_sessions: bool = Field(..., alias="UserCanCreateSessions")
    user_can_manage_department_settings: bool = Field(
        ..., alias="UserCanManageDepartmentSettings"
    )
    user_can_move_folder: bool = Field(..., alias="UserCanMoveFolder")
    user_can_move_session_destination: bool = Field(
        ..., alias="UserCanMoveSessionDestination"
    )
    is_enumerable: bool = Field(..., alias="IsEnumerable")
    has_accessible_children: bool = Field(..., alias="HasAccessibleChildren")
    repository_key: str = Field(..., alias="RepositoryKey")
    id: str = Field(..., alias="Id")
    name: Optional[str] = Field(..., alias="Name")
    type_name: str = Field(..., alias="TypeName")


class FolderInfo(BaseModel):
    is_editable: bool = Field(..., alias="IsEditable")
    is_department: bool = Field(..., alias="IsDepartment")
    is_dropbox: bool = Field(..., alias="IsDropbox")
    folder_type: int = Field(..., alias="FolderType")
    deliveries_have_specified_order: bool = Field(
        ..., alias="DeliveriesHaveSpecifiedOrder"
    )
    podcast_enabled: bool = Field(..., alias="PodcastEnabled")
    parent: Optional[Parent] = Field(..., alias="Parent")
    user_can_create_folders: bool = Field(..., alias="UserCanCreateFolders")
    user_can_create_sessions: bool = Field(..., alias="UserCanCreateSessions")
    user_can_manage_department_settings: bool = Field(
        ..., alias="UserCanManageDepartmentSettings"
    )
    user_can_move_folder: bool = Field(..., alias="UserCanMoveFolder")
    user_can_move_session_destination: bool = Field(
        ..., alias="UserCanMoveSessionDestination"
    )
    is_enumerable: bool = Field(..., alias="IsEnumerable")
    has_accessible_children: bool = Field(..., alias="HasAccessibleChildren")
    session_count: int = Field(..., alias="SessionCount")
    repository_key: str = Field(..., alias="RepositoryKey")
    id: str = Field(..., alias="Id")
    name: str = Field(..., alias="Name")
    type_name: str = Field(..., alias="TypeName")


class AlternativeParent(BaseModel):
    id: str = Field(..., alias="Id")
    name: str = Field(..., alias="Name")
    type_name: str = Field(..., alias="TypeName")


class AlternativeSession(BaseModel):
    parent: AlternativeParent = Field(..., alias="Parent")
    viewer_uri: str = Field(..., alias="ViewerUri")
    embed_viewer_tag: str = Field(..., alias="EmbedViewerTag")
    is_webcast: bool = Field(..., alias="IsWebcast")
    description: Optional[str] = Field(None, alias="Description")
    status: int = Field(..., alias="Status")
    start_time: str = Field(..., alias="StartTime")
    duration: float = Field(..., alias="Duration")
    thumb_url: str = Field(..., alias="ThumbUrl")
    most_recent_view_time: Optional[str] = Field(None, alias="MostRecentViewTime")
    is_reference_copy: bool = Field(..., alias="IsReferenceCopy")
    repository_key: str = Field(..., alias="RepositoryKey")
    id: str = Field(..., alias="Id")
    name: str = Field(..., alias="Name")
    type_name: str = Field(..., alias="TypeName")
