mithril-client 0.1.0a1__cp314-cp314-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mithril/__init__.py +7 -0
- mithril/_mcli.cpython-314-darwin.so +0 -0
- mithril/_mcli.pyi +7 -0
- mithril/_mcli_entry.py +75 -0
- mithril/api/__init__.py +7 -0
- mithril/api/bindings/.gitattributes +2 -0
- mithril/api/bindings/__init__.py +10 -0
- mithril/api/bindings/api/__init__.py +1 -0
- mithril/api/bindings/api/api_keys/__init__.py +1 -0
- mithril/api/bindings/api/api_keys/create_api_key_v2_api_keys_post.py +179 -0
- mithril/api/bindings/api/api_keys/get_api_keys_v2_api_keys_get.py +141 -0
- mithril/api/bindings/api/api_keys/revoke_api_key_v2_api_keys_key_fid_delete.py +173 -0
- mithril/api/bindings/api/image_versions/__init__.py +1 -0
- mithril/api/bindings/api/image_versions/get_image_versions_v2_image_versions_get.py +141 -0
- mithril/api/bindings/api/image_versions/get_mcc_image_versions_v2_mcc_image_versions_get.py +179 -0
- mithril/api/bindings/api/instance_types/__init__.py +1 -0
- mithril/api/bindings/api/instance_types/get_instance_types_v2_instance_types_get.py +137 -0
- mithril/api/bindings/api/instances/__init__.py +1 -0
- mithril/api/bindings/api/instances/get_instance_status_v2_instances_instance_id_status_get.py +165 -0
- mithril/api/bindings/api/instances/get_instances_v2_instances_get.py +409 -0
- mithril/api/bindings/api/kubernetes_clusters/__init__.py +1 -0
- mithril/api/bindings/api/kubernetes_clusters/create_kubernetes_cluster_v2_kubernetes_clusters_post.py +171 -0
- mithril/api/bindings/api/kubernetes_clusters/delete_kubernetes_cluster_v2_kubernetes_clusters_cluster_fid_delete.py +163 -0
- mithril/api/bindings/api/kubernetes_clusters/get_kubernetes_cluster_v2_kubernetes_clusters_cluster_fid_get.py +165 -0
- mithril/api/bindings/api/kubernetes_clusters/get_kubernetes_clusters_v2_kubernetes_clusters_get.py +175 -0
- mithril/api/bindings/api/lifecycle_scripts/__init__.py +1 -0
- mithril/api/bindings/api/lifecycle_scripts/create_lifecycle_script_v2_lifecycle_scripts_post.py +171 -0
- mithril/api/bindings/api/lifecycle_scripts/delete_lifecycle_script_v2_lifecycle_scripts_ls_fid_delete.py +155 -0
- mithril/api/bindings/api/lifecycle_scripts/get_lifecycle_script_content_v2_lifecycle_scripts_ls_fid_content_get.py +155 -0
- mithril/api/bindings/api/lifecycle_scripts/list_lifecycle_scripts_v2_lifecycle_scripts_get.py +247 -0
- mithril/api/bindings/api/lifecycle_scripts/update_lifecycle_script_v2_lifecycle_scripts_ls_fid_patch.py +179 -0
- mithril/api/bindings/api/pricing/__init__.py +1 -0
- mithril/api/bindings/api/pricing/get_current_prices_v2_v2_pricing_current_get.py +217 -0
- mithril/api/bindings/api/pricing/get_historical_prices_v2_v2_pricing_history_get.py +222 -0
- mithril/api/bindings/api/profile/__init__.py +1 -0
- mithril/api/bindings/api/profile/get_me_v2_me_get.py +132 -0
- mithril/api/bindings/api/profile/get_my_teammates_v2_me_teammates_get.py +153 -0
- mithril/api/bindings/api/projects/__init__.py +1 -0
- mithril/api/bindings/api/projects/get_projects_v2_projects_get.py +137 -0
- mithril/api/bindings/api/quotas/__init__.py +1 -0
- mithril/api/bindings/api/quotas/get_quotas_v2_quotas_get.py +175 -0
- mithril/api/bindings/api/reservations/__init__.py +1 -0
- mithril/api/bindings/api/reservations/create_reservation_v2_reservation_post.py +171 -0
- mithril/api/bindings/api/reservations/extend_reservation_v2_reservation_reservation_fid_extend_post.py +187 -0
- mithril/api/bindings/api/reservations/get_availability_v2_reservation_availability_get.py +664 -0
- mithril/api/bindings/api/reservations/get_extension_availability_v2_reservation_reservation_fid_extension_availability_get.py +165 -0
- mithril/api/bindings/api/reservations/get_reservations_v2_reservation_get.py +309 -0
- mithril/api/bindings/api/reservations/update_reservation_v2_reservation_reservation_fid_patch.py +187 -0
- mithril/api/bindings/api/spot/__init__.py +1 -0
- mithril/api/bindings/api/spot/cancel_bid_v2_spot_bids_bid_fid_delete.py +161 -0
- mithril/api/bindings/api/spot/create_bid_v2_spot_bids_post.py +171 -0
- mithril/api/bindings/api/spot/get_auctions_v2_spot_availability_get.py +137 -0
- mithril/api/bindings/api/spot/get_bid_history_v2_spot_bids_bid_fid_history_get.py +193 -0
- mithril/api/bindings/api/spot/get_bid_status_v2_spot_bids_bid_fid_status_get.py +189 -0
- mithril/api/bindings/api/spot/get_bid_v2_spot_bids_bid_fid_get.py +163 -0
- mithril/api/bindings/api/spot/get_bids_v2_spot_bids_get.py +330 -0
- mithril/api/bindings/api/spot/update_bid_v2_spot_bids_bid_fid_patch.py +185 -0
- mithril/api/bindings/api/ssh_keys/__init__.py +1 -0
- mithril/api/bindings/api/ssh_keys/create_ssh_key_v2_ssh_keys_post.py +175 -0
- mithril/api/bindings/api/ssh_keys/delete_ssh_key_v2_ssh_keys_ssh_key_fid_delete.py +167 -0
- mithril/api/bindings/api/ssh_keys/get_ssh_keys_v2_ssh_keys_get.py +175 -0
- mithril/api/bindings/api/ssh_keys/update_ssh_key_v2_ssh_keys_ssh_key_fid_patch.py +187 -0
- mithril/api/bindings/api/volumes/__init__.py +1 -0
- mithril/api/bindings/api/volumes/create_volume_v2_volumes_post.py +211 -0
- mithril/api/bindings/api/volumes/delete_volume_v2_volumes_volume_fid_delete.py +199 -0
- mithril/api/bindings/api/volumes/get_volumes_v2_volumes_get.py +239 -0
- mithril/api/bindings/api/volumes/update_volume_v2_volumes_volume_fid_patch.py +243 -0
- mithril/api/bindings/client.py +284 -0
- mithril/api/bindings/errors.py +18 -0
- mithril/api/bindings/models/__init__.py +169 -0
- mithril/api/bindings/models/api_key_model.py +114 -0
- mithril/api/bindings/models/auction_model.py +146 -0
- mithril/api/bindings/models/availability_slot_model.py +76 -0
- mithril/api/bindings/models/bid_history_event_model.py +157 -0
- mithril/api/bindings/models/bid_history_event_model_event_type.py +19 -0
- mithril/api/bindings/models/bid_history_response.py +84 -0
- mithril/api/bindings/models/bid_model.py +191 -0
- mithril/api/bindings/models/bid_model_status.py +14 -0
- mithril/api/bindings/models/bid_status_response.py +72 -0
- mithril/api/bindings/models/bid_status_response_status.py +15 -0
- mithril/api/bindings/models/check_availability_response.py +60 -0
- mithril/api/bindings/models/create_api_key_request.py +68 -0
- mithril/api/bindings/models/create_api_key_response.py +122 -0
- mithril/api/bindings/models/create_bid_request.py +116 -0
- mithril/api/bindings/models/create_kubernetes_cluster_request.py +136 -0
- mithril/api/bindings/models/create_kubernetes_cluster_request_k8s_version.py +11 -0
- mithril/api/bindings/models/create_lifecycle_script_request.py +115 -0
- mithril/api/bindings/models/create_reservation_request.py +124 -0
- mithril/api/bindings/models/create_ssh_key_request.py +99 -0
- mithril/api/bindings/models/create_volume_request.py +98 -0
- mithril/api/bindings/models/create_volume_request_disk_interface.py +11 -0
- mithril/api/bindings/models/created_ssh_key_model.py +122 -0
- mithril/api/bindings/models/current_prices_response.py +202 -0
- mithril/api/bindings/models/extend_reservation_request.py +60 -0
- mithril/api/bindings/models/extension_availability_response.py +68 -0
- mithril/api/bindings/models/get_availability_v2_reservation_availability_get_mode.py +12 -0
- mithril/api/bindings/models/get_bids_response.py +96 -0
- mithril/api/bindings/models/get_bids_v2_spot_bids_get_sort_by.py +11 -0
- mithril/api/bindings/models/get_bids_v2_spot_bids_get_status.py +14 -0
- mithril/api/bindings/models/get_instances_response.py +96 -0
- mithril/api/bindings/models/get_instances_v2_instances_get_order_type_in_type_0_item.py +11 -0
- mithril/api/bindings/models/get_instances_v2_instances_get_sort_by.py +12 -0
- mithril/api/bindings/models/get_instances_v2_instances_get_status_in_type_0_item.py +24 -0
- mithril/api/bindings/models/get_latest_end_time_response.py +68 -0
- mithril/api/bindings/models/get_reservations_response.py +96 -0
- mithril/api/bindings/models/get_reservations_v2_reservation_get_sort_by.py +11 -0
- mithril/api/bindings/models/get_reservations_v2_reservation_get_status.py +14 -0
- mithril/api/bindings/models/historical_price_point_model.py +94 -0
- mithril/api/bindings/models/historical_prices_response_model.py +76 -0
- mithril/api/bindings/models/http_validation_error.py +78 -0
- mithril/api/bindings/models/image_version_model.py +224 -0
- mithril/api/bindings/models/instance_model.py +211 -0
- mithril/api/bindings/models/instance_model_status.py +24 -0
- mithril/api/bindings/models/instance_status_response.py +141 -0
- mithril/api/bindings/models/instance_status_response_status.py +24 -0
- mithril/api/bindings/models/instance_type_model.py +170 -0
- mithril/api/bindings/models/kubernetes_cluster_model.py +207 -0
- mithril/api/bindings/models/kubernetes_cluster_model_status.py +12 -0
- mithril/api/bindings/models/launch_specification_model.py +152 -0
- mithril/api/bindings/models/lifecycle_script_model.py +134 -0
- mithril/api/bindings/models/lifecycle_script_scope.py +12 -0
- mithril/api/bindings/models/list_lifecycle_scripts_response.py +96 -0
- mithril/api/bindings/models/list_lifecycle_scripts_v2_lifecycle_scripts_get_sort_by.py +11 -0
- mithril/api/bindings/models/me_response.py +126 -0
- mithril/api/bindings/models/new_ssh_key_model.py +100 -0
- mithril/api/bindings/models/persistent_disk_change.py +92 -0
- mithril/api/bindings/models/project_model.py +76 -0
- mithril/api/bindings/models/public_lifecycle_script_scope.py +11 -0
- mithril/api/bindings/models/quota_model.py +132 -0
- mithril/api/bindings/models/reservation_model.py +215 -0
- mithril/api/bindings/models/reservation_model_status.py +14 -0
- mithril/api/bindings/models/size.py +70 -0
- mithril/api/bindings/models/size_unit.py +18 -0
- mithril/api/bindings/models/sort_direction.py +11 -0
- mithril/api/bindings/models/teammate_response.py +158 -0
- mithril/api/bindings/models/update_bid_request.py +143 -0
- mithril/api/bindings/models/update_lifecycle_script_request.py +109 -0
- mithril/api/bindings/models/update_reservation_request.py +103 -0
- mithril/api/bindings/models/update_ssh_key_request.py +60 -0
- mithril/api/bindings/models/update_volume_request.py +65 -0
- mithril/api/bindings/models/validation_error.py +89 -0
- mithril/api/bindings/models/volume_model.py +140 -0
- mithril/api/bindings/models/volume_model_attachments.py +46 -0
- mithril/api/bindings/models/volume_model_interface.py +11 -0
- mithril/api/bindings/types.py +56 -0
- mithril/api/client.py +138 -0
- mithril/cli/__init__.py +7 -0
- mithril/cli/commands/__init__.py +15 -0
- mithril/cli/commands/help.py +88 -0
- mithril/cli/commands/launch.py +353 -0
- mithril/cli/main.py +68 -0
- mithril/cli/utils/__init__.py +1 -0
- mithril/cli/utils/skypilot_passthrough.py +38 -0
- mithril/cli/utils/streaming.py +235 -0
- mithril/cli/utils/volumes.py +110 -0
- mithril/config.py +47 -0
- mithril/py.typed +0 -0
- mithril/sky/__init__.py +141 -0
- mithril/sky/client.py +176 -0
- mithril_client-0.1.0a1.dist-info/METADATA +56 -0
- mithril_client-0.1.0a1.dist-info/RECORD +163 -0
- mithril_client-0.1.0a1.dist-info/WHEEL +4 -0
- mithril_client-0.1.0a1.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, Self, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="CurrentPricesResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class CurrentPricesResponse:
|
|
16
|
+
"""Attributes:
|
|
17
|
+
spot_price_cents (int | None | Unset):
|
|
18
|
+
reserved_price_cents (int | None | Unset):
|
|
19
|
+
minimum_price_cents (int | None | Unset):
|
|
20
|
+
lowest_allocated_bid_cents (int | None | Unset):
|
|
21
|
+
dynamic_win_price_cents (int | None | Unset):
|
|
22
|
+
available_capacity (int | None | Unset):
|
|
23
|
+
total_capacity (int | None | Unset):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
spot_price_cents: int | None | Unset = UNSET
|
|
27
|
+
reserved_price_cents: int | None | Unset = UNSET
|
|
28
|
+
minimum_price_cents: int | None | Unset = UNSET
|
|
29
|
+
lowest_allocated_bid_cents: int | None | Unset = UNSET
|
|
30
|
+
dynamic_win_price_cents: int | None | Unset = UNSET
|
|
31
|
+
available_capacity: int | None | Unset = UNSET
|
|
32
|
+
total_capacity: int | None | Unset = UNSET
|
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
spot_price_cents: int | None | Unset
|
|
37
|
+
if isinstance(self.spot_price_cents, Unset):
|
|
38
|
+
spot_price_cents = UNSET
|
|
39
|
+
else:
|
|
40
|
+
spot_price_cents = self.spot_price_cents
|
|
41
|
+
|
|
42
|
+
reserved_price_cents: int | None | Unset
|
|
43
|
+
if isinstance(self.reserved_price_cents, Unset):
|
|
44
|
+
reserved_price_cents = UNSET
|
|
45
|
+
else:
|
|
46
|
+
reserved_price_cents = self.reserved_price_cents
|
|
47
|
+
|
|
48
|
+
minimum_price_cents: int | None | Unset
|
|
49
|
+
if isinstance(self.minimum_price_cents, Unset):
|
|
50
|
+
minimum_price_cents = UNSET
|
|
51
|
+
else:
|
|
52
|
+
minimum_price_cents = self.minimum_price_cents
|
|
53
|
+
|
|
54
|
+
lowest_allocated_bid_cents: int | None | Unset
|
|
55
|
+
if isinstance(self.lowest_allocated_bid_cents, Unset):
|
|
56
|
+
lowest_allocated_bid_cents = UNSET
|
|
57
|
+
else:
|
|
58
|
+
lowest_allocated_bid_cents = self.lowest_allocated_bid_cents
|
|
59
|
+
|
|
60
|
+
dynamic_win_price_cents: int | None | Unset
|
|
61
|
+
if isinstance(self.dynamic_win_price_cents, Unset):
|
|
62
|
+
dynamic_win_price_cents = UNSET
|
|
63
|
+
else:
|
|
64
|
+
dynamic_win_price_cents = self.dynamic_win_price_cents
|
|
65
|
+
|
|
66
|
+
available_capacity: int | None | Unset
|
|
67
|
+
if isinstance(self.available_capacity, Unset):
|
|
68
|
+
available_capacity = UNSET
|
|
69
|
+
else:
|
|
70
|
+
available_capacity = self.available_capacity
|
|
71
|
+
|
|
72
|
+
total_capacity: int | None | Unset
|
|
73
|
+
if isinstance(self.total_capacity, Unset):
|
|
74
|
+
total_capacity = UNSET
|
|
75
|
+
else:
|
|
76
|
+
total_capacity = self.total_capacity
|
|
77
|
+
|
|
78
|
+
field_dict: dict[str, Any] = {}
|
|
79
|
+
field_dict.update(self.additional_properties)
|
|
80
|
+
field_dict.update({})
|
|
81
|
+
if spot_price_cents is not UNSET:
|
|
82
|
+
field_dict["spot_price_cents"] = spot_price_cents
|
|
83
|
+
if reserved_price_cents is not UNSET:
|
|
84
|
+
field_dict["reserved_price_cents"] = reserved_price_cents
|
|
85
|
+
if minimum_price_cents is not UNSET:
|
|
86
|
+
field_dict["minimum_price_cents"] = minimum_price_cents
|
|
87
|
+
if lowest_allocated_bid_cents is not UNSET:
|
|
88
|
+
field_dict["lowest_allocated_bid_cents"] = lowest_allocated_bid_cents
|
|
89
|
+
if dynamic_win_price_cents is not UNSET:
|
|
90
|
+
field_dict["dynamic_win_price_cents"] = dynamic_win_price_cents
|
|
91
|
+
if available_capacity is not UNSET:
|
|
92
|
+
field_dict["available_capacity"] = available_capacity
|
|
93
|
+
if total_capacity is not UNSET:
|
|
94
|
+
field_dict["total_capacity"] = total_capacity
|
|
95
|
+
|
|
96
|
+
return field_dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
|
|
100
|
+
d = dict(src_dict)
|
|
101
|
+
|
|
102
|
+
def _parse_spot_price_cents(data: object) -> int | None | Unset:
|
|
103
|
+
if data is None:
|
|
104
|
+
return data
|
|
105
|
+
if isinstance(data, Unset):
|
|
106
|
+
return data
|
|
107
|
+
return cast(int | None | Unset, data)
|
|
108
|
+
|
|
109
|
+
spot_price_cents = _parse_spot_price_cents(d.pop("spot_price_cents", UNSET))
|
|
110
|
+
|
|
111
|
+
def _parse_reserved_price_cents(data: object) -> int | None | Unset:
|
|
112
|
+
if data is None:
|
|
113
|
+
return data
|
|
114
|
+
if isinstance(data, Unset):
|
|
115
|
+
return data
|
|
116
|
+
return cast(int | None | Unset, data)
|
|
117
|
+
|
|
118
|
+
reserved_price_cents = _parse_reserved_price_cents(
|
|
119
|
+
d.pop("reserved_price_cents", UNSET)
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
def _parse_minimum_price_cents(data: object) -> int | None | Unset:
|
|
123
|
+
if data is None:
|
|
124
|
+
return data
|
|
125
|
+
if isinstance(data, Unset):
|
|
126
|
+
return data
|
|
127
|
+
return cast(int | None | Unset, data)
|
|
128
|
+
|
|
129
|
+
minimum_price_cents = _parse_minimum_price_cents(
|
|
130
|
+
d.pop("minimum_price_cents", UNSET)
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
def _parse_lowest_allocated_bid_cents(data: object) -> int | None | Unset:
|
|
134
|
+
if data is None:
|
|
135
|
+
return data
|
|
136
|
+
if isinstance(data, Unset):
|
|
137
|
+
return data
|
|
138
|
+
return cast(int | None | Unset, data)
|
|
139
|
+
|
|
140
|
+
lowest_allocated_bid_cents = _parse_lowest_allocated_bid_cents(
|
|
141
|
+
d.pop("lowest_allocated_bid_cents", UNSET)
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
def _parse_dynamic_win_price_cents(data: object) -> int | None | Unset:
|
|
145
|
+
if data is None:
|
|
146
|
+
return data
|
|
147
|
+
if isinstance(data, Unset):
|
|
148
|
+
return data
|
|
149
|
+
return cast(int | None | Unset, data)
|
|
150
|
+
|
|
151
|
+
dynamic_win_price_cents = _parse_dynamic_win_price_cents(
|
|
152
|
+
d.pop("dynamic_win_price_cents", UNSET)
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
def _parse_available_capacity(data: object) -> int | None | Unset:
|
|
156
|
+
if data is None:
|
|
157
|
+
return data
|
|
158
|
+
if isinstance(data, Unset):
|
|
159
|
+
return data
|
|
160
|
+
return cast(int | None | Unset, data)
|
|
161
|
+
|
|
162
|
+
available_capacity = _parse_available_capacity(
|
|
163
|
+
d.pop("available_capacity", UNSET)
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
def _parse_total_capacity(data: object) -> int | None | Unset:
|
|
167
|
+
if data is None:
|
|
168
|
+
return data
|
|
169
|
+
if isinstance(data, Unset):
|
|
170
|
+
return data
|
|
171
|
+
return cast(int | None | Unset, data)
|
|
172
|
+
|
|
173
|
+
total_capacity = _parse_total_capacity(d.pop("total_capacity", UNSET))
|
|
174
|
+
|
|
175
|
+
current_prices_response = cls(
|
|
176
|
+
spot_price_cents=spot_price_cents,
|
|
177
|
+
reserved_price_cents=reserved_price_cents,
|
|
178
|
+
minimum_price_cents=minimum_price_cents,
|
|
179
|
+
lowest_allocated_bid_cents=lowest_allocated_bid_cents,
|
|
180
|
+
dynamic_win_price_cents=dynamic_win_price_cents,
|
|
181
|
+
available_capacity=available_capacity,
|
|
182
|
+
total_capacity=total_capacity,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
current_prices_response.additional_properties = d
|
|
186
|
+
return current_prices_response
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def additional_keys(self) -> list[str]:
|
|
190
|
+
return list(self.additional_properties.keys())
|
|
191
|
+
|
|
192
|
+
def __getitem__(self, key: str) -> Any:
|
|
193
|
+
return self.additional_properties[key]
|
|
194
|
+
|
|
195
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
196
|
+
self.additional_properties[key] = value
|
|
197
|
+
|
|
198
|
+
def __delitem__(self, key: str) -> None:
|
|
199
|
+
del self.additional_properties[key]
|
|
200
|
+
|
|
201
|
+
def __contains__(self, key: str) -> bool:
|
|
202
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, Self, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ExtendReservationRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ExtendReservationRequest:
|
|
14
|
+
"""Attributes:
|
|
15
|
+
end_time (str):
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
end_time: str
|
|
19
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> dict[str, Any]:
|
|
22
|
+
end_time = self.end_time
|
|
23
|
+
|
|
24
|
+
field_dict: dict[str, Any] = {}
|
|
25
|
+
field_dict.update(self.additional_properties)
|
|
26
|
+
field_dict.update(
|
|
27
|
+
{
|
|
28
|
+
"end_time": end_time,
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
return field_dict
|
|
33
|
+
|
|
34
|
+
@classmethod
|
|
35
|
+
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
|
|
36
|
+
d = dict(src_dict)
|
|
37
|
+
end_time = d.pop("end_time")
|
|
38
|
+
|
|
39
|
+
extend_reservation_request = cls(
|
|
40
|
+
end_time=end_time,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
extend_reservation_request.additional_properties = d
|
|
44
|
+
return extend_reservation_request
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def additional_keys(self) -> list[str]:
|
|
48
|
+
return list(self.additional_properties.keys())
|
|
49
|
+
|
|
50
|
+
def __getitem__(self, key: str) -> Any:
|
|
51
|
+
return self.additional_properties[key]
|
|
52
|
+
|
|
53
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
54
|
+
self.additional_properties[key] = value
|
|
55
|
+
|
|
56
|
+
def __delitem__(self, key: str) -> None:
|
|
57
|
+
del self.additional_properties[key]
|
|
58
|
+
|
|
59
|
+
def __contains__(self, key: str) -> bool:
|
|
60
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, Self, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="ExtensionAvailabilityResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class ExtensionAvailabilityResponse:
|
|
14
|
+
"""Attributes:
|
|
15
|
+
latest_extension_time (str):
|
|
16
|
+
available (bool):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
latest_extension_time: str
|
|
20
|
+
available: bool
|
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
latest_extension_time = self.latest_extension_time
|
|
25
|
+
|
|
26
|
+
available = self.available
|
|
27
|
+
|
|
28
|
+
field_dict: dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
field_dict.update(
|
|
31
|
+
{
|
|
32
|
+
"latest_extension_time": latest_extension_time,
|
|
33
|
+
"available": available,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
latest_extension_time = d.pop("latest_extension_time")
|
|
43
|
+
|
|
44
|
+
available = d.pop("available")
|
|
45
|
+
|
|
46
|
+
extension_availability_response = cls(
|
|
47
|
+
latest_extension_time=latest_extension_time,
|
|
48
|
+
available=available,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
extension_availability_response.additional_properties = d
|
|
52
|
+
return extension_availability_response
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def additional_keys(self) -> list[str]:
|
|
56
|
+
return list(self.additional_properties.keys())
|
|
57
|
+
|
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
|
59
|
+
return self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
62
|
+
self.additional_properties[key] = value
|
|
63
|
+
|
|
64
|
+
def __delitem__(self, key: str) -> None:
|
|
65
|
+
del self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __contains__(self, key: str) -> bool:
|
|
68
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class GetAvailabilityV2ReservationAvailabilityGetMode(str, Enum):
|
|
7
|
+
CHECK = "check"
|
|
8
|
+
LATEST_END_TIME = "latest_end_time"
|
|
9
|
+
SLOTS = "slots"
|
|
10
|
+
|
|
11
|
+
def __str__(self) -> str:
|
|
12
|
+
return str(self.value)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, Self, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.bid_model import BidModel
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="GetBidsResponse")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class GetBidsResponse:
|
|
20
|
+
"""Attributes:
|
|
21
|
+
data (list[BidModel]):
|
|
22
|
+
next_cursor (None | str | Unset):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
data: list[BidModel]
|
|
26
|
+
next_cursor: None | str | Unset = UNSET
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
data = []
|
|
31
|
+
for data_item_data in self.data:
|
|
32
|
+
data_item = data_item_data.to_dict()
|
|
33
|
+
data.append(data_item)
|
|
34
|
+
|
|
35
|
+
next_cursor: None | str | Unset
|
|
36
|
+
if isinstance(self.next_cursor, Unset):
|
|
37
|
+
next_cursor = UNSET
|
|
38
|
+
else:
|
|
39
|
+
next_cursor = self.next_cursor
|
|
40
|
+
|
|
41
|
+
field_dict: dict[str, Any] = {}
|
|
42
|
+
field_dict.update(self.additional_properties)
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"data": data,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if next_cursor is not UNSET:
|
|
49
|
+
field_dict["next_cursor"] = next_cursor
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
|
|
55
|
+
from ..models.bid_model import BidModel
|
|
56
|
+
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
data = []
|
|
59
|
+
_data = d.pop("data")
|
|
60
|
+
for data_item_data in _data:
|
|
61
|
+
data_item = BidModel.from_dict(data_item_data)
|
|
62
|
+
|
|
63
|
+
data.append(data_item)
|
|
64
|
+
|
|
65
|
+
def _parse_next_cursor(data: object) -> None | str | Unset:
|
|
66
|
+
if data is None:
|
|
67
|
+
return data
|
|
68
|
+
if isinstance(data, Unset):
|
|
69
|
+
return data
|
|
70
|
+
return cast(None | str | Unset, data)
|
|
71
|
+
|
|
72
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor", UNSET))
|
|
73
|
+
|
|
74
|
+
get_bids_response = cls(
|
|
75
|
+
data=data,
|
|
76
|
+
next_cursor=next_cursor,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
get_bids_response.additional_properties = d
|
|
80
|
+
return get_bids_response
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def additional_keys(self) -> list[str]:
|
|
84
|
+
return list(self.additional_properties.keys())
|
|
85
|
+
|
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
|
87
|
+
return self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
90
|
+
self.additional_properties[key] = value
|
|
91
|
+
|
|
92
|
+
def __delitem__(self, key: str) -> None:
|
|
93
|
+
del self.additional_properties[key]
|
|
94
|
+
|
|
95
|
+
def __contains__(self, key: str) -> bool:
|
|
96
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class GetBidsV2SpotBidsGetStatus(str, Enum):
|
|
7
|
+
ALLOCATED = "Allocated"
|
|
8
|
+
OPEN = "Open"
|
|
9
|
+
PAUSED = "Paused"
|
|
10
|
+
PREEMPTING = "Preempting"
|
|
11
|
+
TERMINATED = "Terminated"
|
|
12
|
+
|
|
13
|
+
def __str__(self) -> str:
|
|
14
|
+
return str(self.value)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, Self, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.instance_model import InstanceModel
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="GetInstancesResponse")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class GetInstancesResponse:
|
|
20
|
+
"""Attributes:
|
|
21
|
+
data (list[InstanceModel]):
|
|
22
|
+
next_cursor (None | str | Unset):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
data: list[InstanceModel]
|
|
26
|
+
next_cursor: None | str | Unset = UNSET
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
data = []
|
|
31
|
+
for data_item_data in self.data:
|
|
32
|
+
data_item = data_item_data.to_dict()
|
|
33
|
+
data.append(data_item)
|
|
34
|
+
|
|
35
|
+
next_cursor: None | str | Unset
|
|
36
|
+
if isinstance(self.next_cursor, Unset):
|
|
37
|
+
next_cursor = UNSET
|
|
38
|
+
else:
|
|
39
|
+
next_cursor = self.next_cursor
|
|
40
|
+
|
|
41
|
+
field_dict: dict[str, Any] = {}
|
|
42
|
+
field_dict.update(self.additional_properties)
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"data": data,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if next_cursor is not UNSET:
|
|
49
|
+
field_dict["next_cursor"] = next_cursor
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
|
|
55
|
+
from ..models.instance_model import InstanceModel
|
|
56
|
+
|
|
57
|
+
d = dict(src_dict)
|
|
58
|
+
data = []
|
|
59
|
+
_data = d.pop("data")
|
|
60
|
+
for data_item_data in _data:
|
|
61
|
+
data_item = InstanceModel.from_dict(data_item_data)
|
|
62
|
+
|
|
63
|
+
data.append(data_item)
|
|
64
|
+
|
|
65
|
+
def _parse_next_cursor(data: object) -> None | str | Unset:
|
|
66
|
+
if data is None:
|
|
67
|
+
return data
|
|
68
|
+
if isinstance(data, Unset):
|
|
69
|
+
return data
|
|
70
|
+
return cast(None | str | Unset, data)
|
|
71
|
+
|
|
72
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor", UNSET))
|
|
73
|
+
|
|
74
|
+
get_instances_response = cls(
|
|
75
|
+
data=data,
|
|
76
|
+
next_cursor=next_cursor,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
get_instances_response.additional_properties = d
|
|
80
|
+
return get_instances_response
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def additional_keys(self) -> list[str]:
|
|
84
|
+
return list(self.additional_properties.keys())
|
|
85
|
+
|
|
86
|
+
def __getitem__(self, key: str) -> Any:
|
|
87
|
+
return self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
90
|
+
self.additional_properties[key] = value
|
|
91
|
+
|
|
92
|
+
def __delitem__(self, key: str) -> None:
|
|
93
|
+
del self.additional_properties[key]
|
|
94
|
+
|
|
95
|
+
def __contains__(self, key: str) -> bool:
|
|
96
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class GetInstancesV2InstancesGetSortBy(str, Enum):
|
|
7
|
+
CREATED_AT = "created_at"
|
|
8
|
+
INSTANCE_STATUS = "instance_status"
|
|
9
|
+
INSTANCE_TYPE_FID = "instance_type_fid"
|
|
10
|
+
|
|
11
|
+
def __str__(self) -> str:
|
|
12
|
+
return str(self.value)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from enum import Enum
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class GetInstancesV2InstancesGetStatusInType0Item(str, Enum):
|
|
7
|
+
STATUS_CONFIRMED = "STATUS_CONFIRMED"
|
|
8
|
+
STATUS_ERROR = "STATUS_ERROR"
|
|
9
|
+
STATUS_INITIALIZING = "STATUS_INITIALIZING"
|
|
10
|
+
STATUS_NEW = "STATUS_NEW"
|
|
11
|
+
STATUS_PAUSED = "STATUS_PAUSED"
|
|
12
|
+
STATUS_PREEMPTED = "STATUS_PREEMPTED"
|
|
13
|
+
STATUS_PREEMPTING = "STATUS_PREEMPTING"
|
|
14
|
+
STATUS_RELOCATING = "STATUS_RELOCATING"
|
|
15
|
+
STATUS_REPLACED = "STATUS_REPLACED"
|
|
16
|
+
STATUS_RUNNING = "STATUS_RUNNING"
|
|
17
|
+
STATUS_SCHEDULED = "STATUS_SCHEDULED"
|
|
18
|
+
STATUS_STARTING = "STATUS_STARTING"
|
|
19
|
+
STATUS_STOPPED = "STATUS_STOPPED"
|
|
20
|
+
STATUS_STOPPING = "STATUS_STOPPING"
|
|
21
|
+
STATUS_TERMINATED = "STATUS_TERMINATED"
|
|
22
|
+
|
|
23
|
+
def __str__(self) -> str:
|
|
24
|
+
return str(self.value)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, Self, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="GetLatestEndTimeResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class GetLatestEndTimeResponse:
|
|
14
|
+
"""Attributes:
|
|
15
|
+
latest_end_time (str):
|
|
16
|
+
available (bool):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
latest_end_time: str
|
|
20
|
+
available: bool
|
|
21
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
latest_end_time = self.latest_end_time
|
|
25
|
+
|
|
26
|
+
available = self.available
|
|
27
|
+
|
|
28
|
+
field_dict: dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
field_dict.update(
|
|
31
|
+
{
|
|
32
|
+
"latest_end_time": latest_end_time,
|
|
33
|
+
"available": available,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return field_dict
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_dict(cls, src_dict: Mapping[str, Any]) -> Self:
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
latest_end_time = d.pop("latest_end_time")
|
|
43
|
+
|
|
44
|
+
available = d.pop("available")
|
|
45
|
+
|
|
46
|
+
get_latest_end_time_response = cls(
|
|
47
|
+
latest_end_time=latest_end_time,
|
|
48
|
+
available=available,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
get_latest_end_time_response.additional_properties = d
|
|
52
|
+
return get_latest_end_time_response
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def additional_keys(self) -> list[str]:
|
|
56
|
+
return list(self.additional_properties.keys())
|
|
57
|
+
|
|
58
|
+
def __getitem__(self, key: str) -> Any:
|
|
59
|
+
return self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
62
|
+
self.additional_properties[key] = value
|
|
63
|
+
|
|
64
|
+
def __delitem__(self, key: str) -> None:
|
|
65
|
+
del self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __contains__(self, key: str) -> bool:
|
|
68
|
+
return key in self.additional_properties
|