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


class CloudapiVinsGetResultModel(_base.BaseAPIResultModel):
    account_id: int
    account_name: str
    created_by: str
    created_timestamp: int
    default_gw: str
    default_qos: _nested.QOSAPIResultNM
    deleted_by: str
    deleted_timestamp: int
    description: None | str
    grid_id: int
    guid: int
    id: int
    lock_status: _nested.LockStatus
    manager_id: int
    manager_type: str
    milestones: int
    name: str
    net_ip: str
    net_prefix: int
    pre_reservation_count: int
    redundant: bool
    rg_id: int
    rg_name: str
    secondary_vnfdev_id: int
    security_group_mode: bool
    status: _nested.VINSStatus
    updated_by: str
    updated_timestamp: int
    user_managed: bool
    vms: list[_nested.VINSVMAPIResultNM]
    vnfdev: _nested.VNFDevAPIResultNM
    vnfs: _nested.VNFSAPIResultNM
    vxlan_id: int
    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 CloudapiVinsGetProtocol(_base.BasePostAPIFunctionProtocol):
    def get(
        self,
        *,
        vins_id: int,
    ) -> CloudapiVinsGetResultModel:
        ...
