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


class CloudapiFlipgroupGetResultModel(_base.BaseAPIResultModel):
    account_id: int
    account_name: str
    client_ids: list[int]
    client_names: list[str]
    client_type: _nested.FlipGroupClientType
    conn_id: int
    conn_type: str
    created_by: str
    created_timestamp: int
    default_gw: str
    deleted_by: str
    deleted_timestamp: int
    description: str
    grid_id: int
    guid: int
    id: int
    ip_addr: str
    milestones: int
    name: str
    net_cidr: str
    net_id: int
    net_type: _nested.FlipGroupNetType
    status: _nested.FlipGroupStatus
    updated_by: str
    updated_timestamp: 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 CloudapiFlipgroupGetProtocol(_base.BasePostAPIFunctionProtocol):
    def get(
        self,
        *,
        flip_group_id: int,
    ) -> CloudapiFlipgroupGetResultModel:
        ...
