# Copyright (c) 2022 CloudZero - ALL RIGHTS RESERVED - PROPRIETARY AND CONFIDENTIAL
# Unauthorized copying of this file and/or project, via any medium is strictly prohibited.
# Direct all questions to legal@cloudzero.com
from datetime import datetime
from typing import NamedTuple, List, Optional

from czc.type_util import deserializable

from .types import BillingIngestStatus


@deserializable()
class BillingIngestStatusEvent(NamedTuple):
    organization_id: str
    connection_id: str
    status: BillingIngestStatus
    start_time: Optional[datetime] = None
    end_time: Optional[datetime] = None
    message: Optional[str] = None
    details: Optional[str] = None
    billing_periods: Optional[List[str]] = None
