import dynamix_sdk.base as _base
import dynamix_sdk.api._nested as _nested


class CloudapiK8sGetResultModel(_base.BaseAPIResultModel):
    account_id: int
    account_name: str
    acl: _nested.K8sACLAPIResultNM
    lb_ha_ips: _nested.LBHAIPsAPIResultNM
    bservice_id: int
    k8ci_id: int
    created_by: str
    created_timestamp: int
    deleted_by: str
    deleted_timestamp: int
    description: str
    extnet_only: bool
    lb_ha_mode: bool
    id: int
    k8ci_name: str
    node_groups: _nested.K8sNodeGroupsAPIResultNM
    lb_id: int
    name: str
    network_plugin: _nested.K8sNetworkPlugin
    rg_id: int
    rg_name: str
    status: _nested.K8sStatus
    tech_status: _nested.K8sTechStatus
    updated_by: str
    updated_timestamp: int
    with_lb: bool
    zone_id: int

    @_base.computed_field
    def created_datetime(self) -> _base.datetime | None:
        return self._get_datetime_from_timestamp(self.created_timestamp)

    @_base.computed_field
    def deleted_datetime(self) -> _base.datetime | None:
        return self._get_datetime_from_timestamp(self.deleted_timestamp)

    @_base.computed_field
    def updated_datetime(self) -> _base.datetime | None:
        return self._get_datetime_from_timestamp(self.updated_timestamp)


class CloudapiK8sGetProtocol(_base.BasePostAPIFunctionProtocol):
    def get(
        self,
        *,
        k8s_id: int,
    ) -> CloudapiK8sGetResultModel:
        ...
