"""Models of the platform's own endpoints: ``whoami``, ``version`` and ``status``."""fromtypingimportOptionalfrompydanticimportFieldfromsmarter.core.typingimportSmarterJsonObjectTypefrom.accountimportAccount,Userfrom.baseimportSmarterCamelModel,SmarterModel
[docs]classWhoAmI(SmarterModel):"""The owner of the api key: the user, their account, and the platform's environment."""user:Useraccount:Accountenvironment:Optional[str]=Field(None,description="The platform's environment, e.g. local or prod.")
[docs]classApiVersion(SmarterModel):"""The platform's version, and the versions of its main Python packages."""version:str=Field(...,description="The Smarter platform's semantic version.")python:dict[str,Optional[str]]=Field(default_factory=dict,description="Python package versions, by package.")
[docs]classCliVersion(SmarterModel):"""The version of the smarter cli that the platform recommends."""version:Optional[str]=None
[docs]classPlatformVersion(SmarterModel):"""The response of ``version``."""api:ApiVersioncli:Optional[CliVersion]=None
[docs]classPlatformStatus(SmarterCamelModel):""" The response of ``status``: the state of the platform's infrastructure and compute. The sections' contents depend on how the platform is hosted, so they are JSON objects. """infrastructures:SmarterJsonObjectType=Field(default_factory=dict)compute:SmarterJsonObjectType=Field(default_factory=dict)