from slurpit.models.basemodel import BaseModel

class Platform(BaseModel):
    """
    This class represent platform status.

    Args:
        status (str): The status of the platform, indicating its current operational state.
    """
    def __init__(self, status: str, **extra):
        if extra:
            self.notify_unrecognized_fields(extra)

        self.status = status  # Store the platform's status

class PlatformLicense(BaseModel):
    """
    This class represents the Platform License details.

    Args:
        status (str): License status
        air_gap_support (int): Does the system require an active internet connection
        amount_of_devices (int): Amount of devices that are licensed
        enterprise (int): Are enterprise features enabled
        license_end_date (str): The date the license ends
        company_name (str): The name of the company the license is issued to
        topology (int): Is topology enabled
    """

    def __init__(
        self,
        status: str,
        amount_of_devices: int,
        enterprise: int,
        license_end_date: str,
        company_name: str = "",
        topology: int = 0,
        air_gap_support: int = 0,
        **extra
    ):
        if extra:
            self.notify_unrecognized_fields(extra)

        self.status = status
        self.air_gap_support = int(air_gap_support)
        self.amount_of_devices = int(amount_of_devices)
        self.enterprise = int(enterprise)
        self.license_end_date = license_end_date
        self.company_name = company_name
        self.topology = int(topology)