robosystems-client 0.2.6__py3-none-any.whl → 0.2.8__py3-none-any.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.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (29) hide show
  1. robosystems_client/api/graphs/get_available_graph_tiers.py +13 -11
  2. robosystems_client/api/service_offerings/get_service_offerings.py +13 -11
  3. robosystems_client/extensions/query_client.py +81 -20
  4. robosystems_client/models/__init__.py +44 -0
  5. robosystems_client/models/available_graph_tiers_response.py +74 -0
  6. robosystems_client/models/graph_subscription_tier.py +220 -0
  7. robosystems_client/models/graph_subscriptions.py +100 -0
  8. robosystems_client/models/graph_tier_backup.py +76 -0
  9. robosystems_client/models/graph_tier_copy_operations.py +92 -0
  10. robosystems_client/models/graph_tier_info.py +192 -0
  11. robosystems_client/models/graph_tier_instance.py +76 -0
  12. robosystems_client/models/graph_tier_limits.py +106 -0
  13. robosystems_client/models/offering_repository_plan.py +148 -0
  14. robosystems_client/models/offering_repository_plan_rate_limits_type_0.py +61 -0
  15. robosystems_client/models/operation_costs.py +100 -0
  16. robosystems_client/models/operation_costs_ai_operations.py +44 -0
  17. robosystems_client/models/operation_costs_token_pricing.py +59 -0
  18. robosystems_client/models/repository_info.py +114 -0
  19. robosystems_client/models/repository_subscriptions.py +90 -0
  20. robosystems_client/models/service_offering_summary.py +84 -0
  21. robosystems_client/models/service_offerings_response.py +98 -0
  22. robosystems_client/models/storage_info.py +76 -0
  23. robosystems_client/models/storage_info_included_per_tier.py +44 -0
  24. robosystems_client/models/storage_info_overage_pricing.py +44 -0
  25. robosystems_client/models/token_pricing.py +68 -0
  26. {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/METADATA +1 -1
  27. {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/RECORD +29 -8
  28. {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/WHEEL +0 -0
  29. {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,220 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="GraphSubscriptionTier")
10
+
11
+
12
+ @_attrs_define
13
+ class GraphSubscriptionTier:
14
+ """Information about a graph subscription tier.
15
+
16
+ Attributes:
17
+ name (str): Tier name
18
+ display_name (str): Display name for UI
19
+ description (str): Tier description
20
+ monthly_price (float): Monthly price in USD
21
+ monthly_credits (int): Monthly AI credits
22
+ storage_included_gb (int): Storage included in GB
23
+ storage_overage_per_gb (float): Overage cost per GB per month
24
+ allowed_graph_tiers (list[str]): Allowed graph tier identifiers
25
+ features (list[str]): List of features
26
+ backup_retention_days (int): Backup retention in days
27
+ priority_support (bool): Whether priority support is included
28
+ api_rate_multiplier (float): API rate multiplier
29
+ backend (str): Database backend (kuzu or neo4j)
30
+ max_queries_per_hour (Union[None, Unset, int]): Maximum queries per hour
31
+ max_subgraphs (Union[None, Unset, int]): Maximum subgraphs
32
+ instance_type (Union[None, Unset, str]): Instance type
33
+ """
34
+
35
+ name: str
36
+ display_name: str
37
+ description: str
38
+ monthly_price: float
39
+ monthly_credits: int
40
+ storage_included_gb: int
41
+ storage_overage_per_gb: float
42
+ allowed_graph_tiers: list[str]
43
+ features: list[str]
44
+ backup_retention_days: int
45
+ priority_support: bool
46
+ api_rate_multiplier: float
47
+ backend: str
48
+ max_queries_per_hour: Union[None, Unset, int] = UNSET
49
+ max_subgraphs: Union[None, Unset, int] = UNSET
50
+ instance_type: Union[None, Unset, str] = UNSET
51
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
52
+
53
+ def to_dict(self) -> dict[str, Any]:
54
+ name = self.name
55
+
56
+ display_name = self.display_name
57
+
58
+ description = self.description
59
+
60
+ monthly_price = self.monthly_price
61
+
62
+ monthly_credits = self.monthly_credits
63
+
64
+ storage_included_gb = self.storage_included_gb
65
+
66
+ storage_overage_per_gb = self.storage_overage_per_gb
67
+
68
+ allowed_graph_tiers = self.allowed_graph_tiers
69
+
70
+ features = self.features
71
+
72
+ backup_retention_days = self.backup_retention_days
73
+
74
+ priority_support = self.priority_support
75
+
76
+ api_rate_multiplier = self.api_rate_multiplier
77
+
78
+ backend = self.backend
79
+
80
+ max_queries_per_hour: Union[None, Unset, int]
81
+ if isinstance(self.max_queries_per_hour, Unset):
82
+ max_queries_per_hour = UNSET
83
+ else:
84
+ max_queries_per_hour = self.max_queries_per_hour
85
+
86
+ max_subgraphs: Union[None, Unset, int]
87
+ if isinstance(self.max_subgraphs, Unset):
88
+ max_subgraphs = UNSET
89
+ else:
90
+ max_subgraphs = self.max_subgraphs
91
+
92
+ instance_type: Union[None, Unset, str]
93
+ if isinstance(self.instance_type, Unset):
94
+ instance_type = UNSET
95
+ else:
96
+ instance_type = self.instance_type
97
+
98
+ field_dict: dict[str, Any] = {}
99
+ field_dict.update(self.additional_properties)
100
+ field_dict.update(
101
+ {
102
+ "name": name,
103
+ "display_name": display_name,
104
+ "description": description,
105
+ "monthly_price": monthly_price,
106
+ "monthly_credits": monthly_credits,
107
+ "storage_included_gb": storage_included_gb,
108
+ "storage_overage_per_gb": storage_overage_per_gb,
109
+ "allowed_graph_tiers": allowed_graph_tiers,
110
+ "features": features,
111
+ "backup_retention_days": backup_retention_days,
112
+ "priority_support": priority_support,
113
+ "api_rate_multiplier": api_rate_multiplier,
114
+ "backend": backend,
115
+ }
116
+ )
117
+ if max_queries_per_hour is not UNSET:
118
+ field_dict["max_queries_per_hour"] = max_queries_per_hour
119
+ if max_subgraphs is not UNSET:
120
+ field_dict["max_subgraphs"] = max_subgraphs
121
+ if instance_type is not UNSET:
122
+ field_dict["instance_type"] = instance_type
123
+
124
+ return field_dict
125
+
126
+ @classmethod
127
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
128
+ d = dict(src_dict)
129
+ name = d.pop("name")
130
+
131
+ display_name = d.pop("display_name")
132
+
133
+ description = d.pop("description")
134
+
135
+ monthly_price = d.pop("monthly_price")
136
+
137
+ monthly_credits = d.pop("monthly_credits")
138
+
139
+ storage_included_gb = d.pop("storage_included_gb")
140
+
141
+ storage_overage_per_gb = d.pop("storage_overage_per_gb")
142
+
143
+ allowed_graph_tiers = cast(list[str], d.pop("allowed_graph_tiers"))
144
+
145
+ features = cast(list[str], d.pop("features"))
146
+
147
+ backup_retention_days = d.pop("backup_retention_days")
148
+
149
+ priority_support = d.pop("priority_support")
150
+
151
+ api_rate_multiplier = d.pop("api_rate_multiplier")
152
+
153
+ backend = d.pop("backend")
154
+
155
+ def _parse_max_queries_per_hour(data: object) -> Union[None, Unset, int]:
156
+ if data is None:
157
+ return data
158
+ if isinstance(data, Unset):
159
+ return data
160
+ return cast(Union[None, Unset, int], data)
161
+
162
+ max_queries_per_hour = _parse_max_queries_per_hour(
163
+ d.pop("max_queries_per_hour", UNSET)
164
+ )
165
+
166
+ def _parse_max_subgraphs(data: object) -> Union[None, Unset, int]:
167
+ if data is None:
168
+ return data
169
+ if isinstance(data, Unset):
170
+ return data
171
+ return cast(Union[None, Unset, int], data)
172
+
173
+ max_subgraphs = _parse_max_subgraphs(d.pop("max_subgraphs", UNSET))
174
+
175
+ def _parse_instance_type(data: object) -> Union[None, Unset, str]:
176
+ if data is None:
177
+ return data
178
+ if isinstance(data, Unset):
179
+ return data
180
+ return cast(Union[None, Unset, str], data)
181
+
182
+ instance_type = _parse_instance_type(d.pop("instance_type", UNSET))
183
+
184
+ graph_subscription_tier = cls(
185
+ name=name,
186
+ display_name=display_name,
187
+ description=description,
188
+ monthly_price=monthly_price,
189
+ monthly_credits=monthly_credits,
190
+ storage_included_gb=storage_included_gb,
191
+ storage_overage_per_gb=storage_overage_per_gb,
192
+ allowed_graph_tiers=allowed_graph_tiers,
193
+ features=features,
194
+ backup_retention_days=backup_retention_days,
195
+ priority_support=priority_support,
196
+ api_rate_multiplier=api_rate_multiplier,
197
+ backend=backend,
198
+ max_queries_per_hour=max_queries_per_hour,
199
+ max_subgraphs=max_subgraphs,
200
+ instance_type=instance_type,
201
+ )
202
+
203
+ graph_subscription_tier.additional_properties = d
204
+ return graph_subscription_tier
205
+
206
+ @property
207
+ def additional_keys(self) -> list[str]:
208
+ return list(self.additional_properties.keys())
209
+
210
+ def __getitem__(self, key: str) -> Any:
211
+ return self.additional_properties[key]
212
+
213
+ def __setitem__(self, key: str, value: Any) -> None:
214
+ self.additional_properties[key] = value
215
+
216
+ def __delitem__(self, key: str) -> None:
217
+ del self.additional_properties[key]
218
+
219
+ def __contains__(self, key: str) -> bool:
220
+ return key in self.additional_properties
@@ -0,0 +1,100 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.graph_subscription_tier import GraphSubscriptionTier
9
+ from ..models.storage_info import StorageInfo
10
+
11
+
12
+ T = TypeVar("T", bound="GraphSubscriptions")
13
+
14
+
15
+ @_attrs_define
16
+ class GraphSubscriptions:
17
+ """Graph subscription offerings.
18
+
19
+ Attributes:
20
+ description (str): Description of graph subscriptions
21
+ tiers (list['GraphSubscriptionTier']): Available tiers
22
+ storage (StorageInfo): Storage pricing information.
23
+ notes (list[str]): Important notes
24
+ """
25
+
26
+ description: str
27
+ tiers: list["GraphSubscriptionTier"]
28
+ storage: "StorageInfo"
29
+ notes: list[str]
30
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> dict[str, Any]:
33
+ description = self.description
34
+
35
+ tiers = []
36
+ for tiers_item_data in self.tiers:
37
+ tiers_item = tiers_item_data.to_dict()
38
+ tiers.append(tiers_item)
39
+
40
+ storage = self.storage.to_dict()
41
+
42
+ notes = self.notes
43
+
44
+ field_dict: dict[str, Any] = {}
45
+ field_dict.update(self.additional_properties)
46
+ field_dict.update(
47
+ {
48
+ "description": description,
49
+ "tiers": tiers,
50
+ "storage": storage,
51
+ "notes": notes,
52
+ }
53
+ )
54
+
55
+ return field_dict
56
+
57
+ @classmethod
58
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
59
+ from ..models.graph_subscription_tier import GraphSubscriptionTier
60
+ from ..models.storage_info import StorageInfo
61
+
62
+ d = dict(src_dict)
63
+ description = d.pop("description")
64
+
65
+ tiers = []
66
+ _tiers = d.pop("tiers")
67
+ for tiers_item_data in _tiers:
68
+ tiers_item = GraphSubscriptionTier.from_dict(tiers_item_data)
69
+
70
+ tiers.append(tiers_item)
71
+
72
+ storage = StorageInfo.from_dict(d.pop("storage"))
73
+
74
+ notes = cast(list[str], d.pop("notes"))
75
+
76
+ graph_subscriptions = cls(
77
+ description=description,
78
+ tiers=tiers,
79
+ storage=storage,
80
+ notes=notes,
81
+ )
82
+
83
+ graph_subscriptions.additional_properties = d
84
+ return graph_subscriptions
85
+
86
+ @property
87
+ def additional_keys(self) -> list[str]:
88
+ return list(self.additional_properties.keys())
89
+
90
+ def __getitem__(self, key: str) -> Any:
91
+ return self.additional_properties[key]
92
+
93
+ def __setitem__(self, key: str, value: Any) -> None:
94
+ self.additional_properties[key] = value
95
+
96
+ def __delitem__(self, key: str) -> None:
97
+ del self.additional_properties[key]
98
+
99
+ def __contains__(self, key: str) -> bool:
100
+ return key in self.additional_properties
@@ -0,0 +1,76 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="GraphTierBackup")
8
+
9
+
10
+ @_attrs_define
11
+ class GraphTierBackup:
12
+ """Backup configuration for a tier.
13
+
14
+ Attributes:
15
+ max_backup_size_gb (int): Maximum backup size in GB
16
+ backup_retention_days (int): Backup retention period in days
17
+ max_backups_per_day (int): Maximum backups per day
18
+ """
19
+
20
+ max_backup_size_gb: int
21
+ backup_retention_days: int
22
+ max_backups_per_day: int
23
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> dict[str, Any]:
26
+ max_backup_size_gb = self.max_backup_size_gb
27
+
28
+ backup_retention_days = self.backup_retention_days
29
+
30
+ max_backups_per_day = self.max_backups_per_day
31
+
32
+ field_dict: dict[str, Any] = {}
33
+ field_dict.update(self.additional_properties)
34
+ field_dict.update(
35
+ {
36
+ "max_backup_size_gb": max_backup_size_gb,
37
+ "backup_retention_days": backup_retention_days,
38
+ "max_backups_per_day": max_backups_per_day,
39
+ }
40
+ )
41
+
42
+ return field_dict
43
+
44
+ @classmethod
45
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
46
+ d = dict(src_dict)
47
+ max_backup_size_gb = d.pop("max_backup_size_gb")
48
+
49
+ backup_retention_days = d.pop("backup_retention_days")
50
+
51
+ max_backups_per_day = d.pop("max_backups_per_day")
52
+
53
+ graph_tier_backup = cls(
54
+ max_backup_size_gb=max_backup_size_gb,
55
+ backup_retention_days=backup_retention_days,
56
+ max_backups_per_day=max_backups_per_day,
57
+ )
58
+
59
+ graph_tier_backup.additional_properties = d
60
+ return graph_tier_backup
61
+
62
+ @property
63
+ def additional_keys(self) -> list[str]:
64
+ return list(self.additional_properties.keys())
65
+
66
+ def __getitem__(self, key: str) -> Any:
67
+ return self.additional_properties[key]
68
+
69
+ def __setitem__(self, key: str, value: Any) -> None:
70
+ self.additional_properties[key] = value
71
+
72
+ def __delitem__(self, key: str) -> None:
73
+ del self.additional_properties[key]
74
+
75
+ def __contains__(self, key: str) -> bool:
76
+ return key in self.additional_properties
@@ -0,0 +1,92 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="GraphTierCopyOperations")
8
+
9
+
10
+ @_attrs_define
11
+ class GraphTierCopyOperations:
12
+ """Copy operation limits for a tier.
13
+
14
+ Attributes:
15
+ max_file_size_gb (float): Maximum file size in GB
16
+ timeout_seconds (int): Operation timeout in seconds
17
+ concurrent_operations (int): Maximum concurrent operations
18
+ max_files_per_operation (int): Maximum files per operation
19
+ daily_copy_operations (int): Daily operation limit
20
+ """
21
+
22
+ max_file_size_gb: float
23
+ timeout_seconds: int
24
+ concurrent_operations: int
25
+ max_files_per_operation: int
26
+ daily_copy_operations: int
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ max_file_size_gb = self.max_file_size_gb
31
+
32
+ timeout_seconds = self.timeout_seconds
33
+
34
+ concurrent_operations = self.concurrent_operations
35
+
36
+ max_files_per_operation = self.max_files_per_operation
37
+
38
+ daily_copy_operations = self.daily_copy_operations
39
+
40
+ field_dict: dict[str, Any] = {}
41
+ field_dict.update(self.additional_properties)
42
+ field_dict.update(
43
+ {
44
+ "max_file_size_gb": max_file_size_gb,
45
+ "timeout_seconds": timeout_seconds,
46
+ "concurrent_operations": concurrent_operations,
47
+ "max_files_per_operation": max_files_per_operation,
48
+ "daily_copy_operations": daily_copy_operations,
49
+ }
50
+ )
51
+
52
+ return field_dict
53
+
54
+ @classmethod
55
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
56
+ d = dict(src_dict)
57
+ max_file_size_gb = d.pop("max_file_size_gb")
58
+
59
+ timeout_seconds = d.pop("timeout_seconds")
60
+
61
+ concurrent_operations = d.pop("concurrent_operations")
62
+
63
+ max_files_per_operation = d.pop("max_files_per_operation")
64
+
65
+ daily_copy_operations = d.pop("daily_copy_operations")
66
+
67
+ graph_tier_copy_operations = cls(
68
+ max_file_size_gb=max_file_size_gb,
69
+ timeout_seconds=timeout_seconds,
70
+ concurrent_operations=concurrent_operations,
71
+ max_files_per_operation=max_files_per_operation,
72
+ daily_copy_operations=daily_copy_operations,
73
+ )
74
+
75
+ graph_tier_copy_operations.additional_properties = d
76
+ return graph_tier_copy_operations
77
+
78
+ @property
79
+ def additional_keys(self) -> list[str]:
80
+ return list(self.additional_properties.keys())
81
+
82
+ def __getitem__(self, key: str) -> Any:
83
+ return self.additional_properties[key]
84
+
85
+ def __setitem__(self, key: str, value: Any) -> None:
86
+ self.additional_properties[key] = value
87
+
88
+ def __delitem__(self, key: str) -> None:
89
+ del self.additional_properties[key]
90
+
91
+ def __contains__(self, key: str) -> bool:
92
+ return key in self.additional_properties
@@ -0,0 +1,192 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.graph_tier_instance import GraphTierInstance
11
+ from ..models.graph_tier_limits import GraphTierLimits
12
+
13
+
14
+ T = TypeVar("T", bound="GraphTierInfo")
15
+
16
+
17
+ @_attrs_define
18
+ class GraphTierInfo:
19
+ """Complete information about a graph database tier.
20
+
21
+ Attributes:
22
+ tier (str): Tier identifier
23
+ name (str): Tier name
24
+ display_name (str): Display name for UI
25
+ description (str): Tier description
26
+ backend (str): Database backend (kuzu or neo4j)
27
+ enabled (bool): Whether tier is available
28
+ max_subgraphs (Union[None, int]): Maximum subgraphs allowed
29
+ storage_limit_gb (int): Storage limit in GB
30
+ monthly_credits (int): Monthly AI credits
31
+ api_rate_multiplier (float): API rate limit multiplier
32
+ features (list[str]): List of tier features
33
+ instance (GraphTierInstance): Instance specifications for a tier.
34
+ limits (GraphTierLimits): Resource limits for a tier.
35
+ monthly_price (Union[None, Unset, float]): Monthly price in USD
36
+ """
37
+
38
+ tier: str
39
+ name: str
40
+ display_name: str
41
+ description: str
42
+ backend: str
43
+ enabled: bool
44
+ max_subgraphs: Union[None, int]
45
+ storage_limit_gb: int
46
+ monthly_credits: int
47
+ api_rate_multiplier: float
48
+ features: list[str]
49
+ instance: "GraphTierInstance"
50
+ limits: "GraphTierLimits"
51
+ monthly_price: Union[None, Unset, float] = UNSET
52
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
53
+
54
+ def to_dict(self) -> dict[str, Any]:
55
+ tier = self.tier
56
+
57
+ name = self.name
58
+
59
+ display_name = self.display_name
60
+
61
+ description = self.description
62
+
63
+ backend = self.backend
64
+
65
+ enabled = self.enabled
66
+
67
+ max_subgraphs: Union[None, int]
68
+ max_subgraphs = self.max_subgraphs
69
+
70
+ storage_limit_gb = self.storage_limit_gb
71
+
72
+ monthly_credits = self.monthly_credits
73
+
74
+ api_rate_multiplier = self.api_rate_multiplier
75
+
76
+ features = self.features
77
+
78
+ instance = self.instance.to_dict()
79
+
80
+ limits = self.limits.to_dict()
81
+
82
+ monthly_price: Union[None, Unset, float]
83
+ if isinstance(self.monthly_price, Unset):
84
+ monthly_price = UNSET
85
+ else:
86
+ monthly_price = self.monthly_price
87
+
88
+ field_dict: dict[str, Any] = {}
89
+ field_dict.update(self.additional_properties)
90
+ field_dict.update(
91
+ {
92
+ "tier": tier,
93
+ "name": name,
94
+ "display_name": display_name,
95
+ "description": description,
96
+ "backend": backend,
97
+ "enabled": enabled,
98
+ "max_subgraphs": max_subgraphs,
99
+ "storage_limit_gb": storage_limit_gb,
100
+ "monthly_credits": monthly_credits,
101
+ "api_rate_multiplier": api_rate_multiplier,
102
+ "features": features,
103
+ "instance": instance,
104
+ "limits": limits,
105
+ }
106
+ )
107
+ if monthly_price is not UNSET:
108
+ field_dict["monthly_price"] = monthly_price
109
+
110
+ return field_dict
111
+
112
+ @classmethod
113
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
114
+ from ..models.graph_tier_instance import GraphTierInstance
115
+ from ..models.graph_tier_limits import GraphTierLimits
116
+
117
+ d = dict(src_dict)
118
+ tier = d.pop("tier")
119
+
120
+ name = d.pop("name")
121
+
122
+ display_name = d.pop("display_name")
123
+
124
+ description = d.pop("description")
125
+
126
+ backend = d.pop("backend")
127
+
128
+ enabled = d.pop("enabled")
129
+
130
+ def _parse_max_subgraphs(data: object) -> Union[None, int]:
131
+ if data is None:
132
+ return data
133
+ return cast(Union[None, int], data)
134
+
135
+ max_subgraphs = _parse_max_subgraphs(d.pop("max_subgraphs"))
136
+
137
+ storage_limit_gb = d.pop("storage_limit_gb")
138
+
139
+ monthly_credits = d.pop("monthly_credits")
140
+
141
+ api_rate_multiplier = d.pop("api_rate_multiplier")
142
+
143
+ features = cast(list[str], d.pop("features"))
144
+
145
+ instance = GraphTierInstance.from_dict(d.pop("instance"))
146
+
147
+ limits = GraphTierLimits.from_dict(d.pop("limits"))
148
+
149
+ def _parse_monthly_price(data: object) -> Union[None, Unset, float]:
150
+ if data is None:
151
+ return data
152
+ if isinstance(data, Unset):
153
+ return data
154
+ return cast(Union[None, Unset, float], data)
155
+
156
+ monthly_price = _parse_monthly_price(d.pop("monthly_price", UNSET))
157
+
158
+ graph_tier_info = cls(
159
+ tier=tier,
160
+ name=name,
161
+ display_name=display_name,
162
+ description=description,
163
+ backend=backend,
164
+ enabled=enabled,
165
+ max_subgraphs=max_subgraphs,
166
+ storage_limit_gb=storage_limit_gb,
167
+ monthly_credits=monthly_credits,
168
+ api_rate_multiplier=api_rate_multiplier,
169
+ features=features,
170
+ instance=instance,
171
+ limits=limits,
172
+ monthly_price=monthly_price,
173
+ )
174
+
175
+ graph_tier_info.additional_properties = d
176
+ return graph_tier_info
177
+
178
+ @property
179
+ def additional_keys(self) -> list[str]:
180
+ return list(self.additional_properties.keys())
181
+
182
+ def __getitem__(self, key: str) -> Any:
183
+ return self.additional_properties[key]
184
+
185
+ def __setitem__(self, key: str, value: Any) -> None:
186
+ self.additional_properties[key] = value
187
+
188
+ def __delitem__(self, key: str) -> None:
189
+ del self.additional_properties[key]
190
+
191
+ def __contains__(self, key: str) -> bool:
192
+ return key in self.additional_properties