2025-06-06 08:20:45 +03:00
|
|
|
import dynamix_sdk.base as _base
|
|
|
|
|
import dynamix_sdk.api._nested as _nested
|
|
|
|
|
|
|
|
|
|
|
2026-09-18 16:06:25 +07:00
|
|
|
class CloudapiAccountGetResultModel(_base.BaseModel):
|
2025-07-21 20:27:59 +07:00
|
|
|
acc_lvl_vins_ids: list[int]
|
|
|
|
|
acl: list[_nested.AccessAPIResultNM]
|
2025-06-06 08:20:45 +03:00
|
|
|
company_url: str
|
2025-07-21 20:27:59 +07:00
|
|
|
company: str
|
2025-06-06 08:20:45 +03:00
|
|
|
cpu_allocation_parameter: str
|
|
|
|
|
cpu_allocation_ratio: int
|
|
|
|
|
created_by: str
|
2025-07-21 20:27:59 +07:00
|
|
|
created_timestamp: int
|
2025-06-06 08:20:45 +03:00
|
|
|
dc_location: str
|
|
|
|
|
deactivation_timestamp: int
|
2025-07-21 20:27:59 +07:00
|
|
|
default_zone_id: int
|
2025-06-06 08:20:45 +03:00
|
|
|
deleted_by: str
|
2025-07-21 20:27:59 +07:00
|
|
|
deleted_timestamp: int
|
|
|
|
|
description: str
|
2025-06-06 08:20:45 +03:00
|
|
|
display_name: str
|
|
|
|
|
guid: int
|
2025-07-21 20:27:59 +07:00
|
|
|
id: int
|
|
|
|
|
name: str
|
2025-06-06 08:20:45 +03:00
|
|
|
quotas: _nested.TenantQuotasAPIResultNM
|
|
|
|
|
resource_types: list[_nested.AccountResourceType]
|
|
|
|
|
send_access_emails: bool
|
2025-07-21 20:27:59 +07:00
|
|
|
status: _nested.AccountStatus
|
2025-11-25 18:09:46 +03:00
|
|
|
storage_policy_ids: list[int]
|
2026-02-11 12:20:55 +03:00
|
|
|
sep_pools: list[str]
|
2026-06-01 20:54:15 +07:00
|
|
|
updated_by: str
|
2025-07-21 20:27:59 +07:00
|
|
|
updated_timestamp: int
|
2025-06-06 08:20:45 +03:00
|
|
|
version: int
|
|
|
|
|
vins_count: int
|
|
|
|
|
vm_counts: _nested.VMCountsAPIResultNM
|
2025-07-21 20:27:59 +07:00
|
|
|
vm_features: list[_nested.VMFeature]
|
|
|
|
|
zones: list[_nested.ZoneAPIResultNM]
|
|
|
|
|
|
2026-02-11 12:20:55 +03:00
|
|
|
@_base.computed_field
|
|
|
|
|
def created_datetime(self) -> _base.datetime | None:
|
2025-07-21 20:27:59 +07:00
|
|
|
return self._get_datetime_from_timestamp(self.created_timestamp)
|
2025-06-06 08:20:45 +03:00
|
|
|
|
2026-02-11 12:20:55 +03:00
|
|
|
@_base.computed_field
|
|
|
|
|
def deactivation_datetime(self) -> _base.datetime | None:
|
2025-06-06 08:20:45 +03:00
|
|
|
return self._get_datetime_from_timestamp(self.deactivation_timestamp)
|
|
|
|
|
|
2026-02-11 12:20:55 +03:00
|
|
|
@_base.computed_field
|
|
|
|
|
def deleted_datetime(self) -> _base.datetime | None:
|
2025-07-21 20:27:59 +07:00
|
|
|
return self._get_datetime_from_timestamp(self.deleted_timestamp)
|
|
|
|
|
|
2026-02-11 12:20:55 +03:00
|
|
|
@_base.computed_field
|
|
|
|
|
def updated_datetime(self) -> _base.datetime | None:
|
2025-07-21 20:27:59 +07:00
|
|
|
return self._get_datetime_from_timestamp(self.updated_timestamp)
|
|
|
|
|
|
2025-06-06 08:20:45 +03:00
|
|
|
|
2026-09-18 16:06:25 +07:00
|
|
|
class CloudapiAccountGetImpl(_base.APIFunctionImpl):
|
|
|
|
|
http_method = _base.HTTPMethod.POST
|
|
|
|
|
|
|
|
|
|
def __call__(
|
2025-06-06 08:20:45 +03:00
|
|
|
self,
|
|
|
|
|
*,
|
|
|
|
|
account_id: int,
|
|
|
|
|
) -> CloudapiAccountGetResultModel:
|
2026-09-18 16:06:25 +07:00
|
|
|
raise NotImplementedError
|