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.
- robosystems_client/api/graphs/get_available_graph_tiers.py +13 -11
- robosystems_client/api/service_offerings/get_service_offerings.py +13 -11
- robosystems_client/extensions/query_client.py +81 -20
- robosystems_client/models/__init__.py +44 -0
- robosystems_client/models/available_graph_tiers_response.py +74 -0
- robosystems_client/models/graph_subscription_tier.py +220 -0
- robosystems_client/models/graph_subscriptions.py +100 -0
- robosystems_client/models/graph_tier_backup.py +76 -0
- robosystems_client/models/graph_tier_copy_operations.py +92 -0
- robosystems_client/models/graph_tier_info.py +192 -0
- robosystems_client/models/graph_tier_instance.py +76 -0
- robosystems_client/models/graph_tier_limits.py +106 -0
- robosystems_client/models/offering_repository_plan.py +148 -0
- robosystems_client/models/offering_repository_plan_rate_limits_type_0.py +61 -0
- robosystems_client/models/operation_costs.py +100 -0
- robosystems_client/models/operation_costs_ai_operations.py +44 -0
- robosystems_client/models/operation_costs_token_pricing.py +59 -0
- robosystems_client/models/repository_info.py +114 -0
- robosystems_client/models/repository_subscriptions.py +90 -0
- robosystems_client/models/service_offering_summary.py +84 -0
- robosystems_client/models/service_offerings_response.py +98 -0
- robosystems_client/models/storage_info.py +76 -0
- robosystems_client/models/storage_info_included_per_tier.py +44 -0
- robosystems_client/models/storage_info_overage_pricing.py +44 -0
- robosystems_client/models/token_pricing.py +68 -0
- {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/METADATA +1 -1
- {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/RECORD +29 -8
- {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/WHEEL +0 -0
- {robosystems_client-0.2.6.dist-info → robosystems_client-0.2.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -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="GraphTierInstance")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class GraphTierInstance:
|
|
12
|
+
"""Instance specifications for a tier.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
type_ (str): Instance type identifier
|
|
16
|
+
memory_mb (int): Memory in megabytes
|
|
17
|
+
databases_per_instance (int): Databases per instance
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
type_: str
|
|
21
|
+
memory_mb: int
|
|
22
|
+
databases_per_instance: int
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
type_ = self.type_
|
|
27
|
+
|
|
28
|
+
memory_mb = self.memory_mb
|
|
29
|
+
|
|
30
|
+
databases_per_instance = self.databases_per_instance
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"type": type_,
|
|
37
|
+
"memory_mb": memory_mb,
|
|
38
|
+
"databases_per_instance": databases_per_instance,
|
|
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
|
+
type_ = d.pop("type")
|
|
48
|
+
|
|
49
|
+
memory_mb = d.pop("memory_mb")
|
|
50
|
+
|
|
51
|
+
databases_per_instance = d.pop("databases_per_instance")
|
|
52
|
+
|
|
53
|
+
graph_tier_instance = cls(
|
|
54
|
+
type_=type_,
|
|
55
|
+
memory_mb=memory_mb,
|
|
56
|
+
databases_per_instance=databases_per_instance,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
graph_tier_instance.additional_properties = d
|
|
60
|
+
return graph_tier_instance
|
|
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,106 @@
|
|
|
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
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.graph_tier_backup import GraphTierBackup
|
|
9
|
+
from ..models.graph_tier_copy_operations import GraphTierCopyOperations
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="GraphTierLimits")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class GraphTierLimits:
|
|
17
|
+
"""Resource limits for a tier.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
storage_gb (int): Storage limit in GB
|
|
21
|
+
monthly_credits (int): Monthly credit allocation
|
|
22
|
+
max_subgraphs (Union[None, int]): Maximum subgraphs (null for unlimited)
|
|
23
|
+
copy_operations (GraphTierCopyOperations): Copy operation limits for a tier.
|
|
24
|
+
backup (GraphTierBackup): Backup configuration for a tier.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
storage_gb: int
|
|
28
|
+
monthly_credits: int
|
|
29
|
+
max_subgraphs: Union[None, int]
|
|
30
|
+
copy_operations: "GraphTierCopyOperations"
|
|
31
|
+
backup: "GraphTierBackup"
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
storage_gb = self.storage_gb
|
|
36
|
+
|
|
37
|
+
monthly_credits = self.monthly_credits
|
|
38
|
+
|
|
39
|
+
max_subgraphs: Union[None, int]
|
|
40
|
+
max_subgraphs = self.max_subgraphs
|
|
41
|
+
|
|
42
|
+
copy_operations = self.copy_operations.to_dict()
|
|
43
|
+
|
|
44
|
+
backup = self.backup.to_dict()
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update(
|
|
49
|
+
{
|
|
50
|
+
"storage_gb": storage_gb,
|
|
51
|
+
"monthly_credits": monthly_credits,
|
|
52
|
+
"max_subgraphs": max_subgraphs,
|
|
53
|
+
"copy_operations": copy_operations,
|
|
54
|
+
"backup": backup,
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
from ..models.graph_tier_backup import GraphTierBackup
|
|
63
|
+
from ..models.graph_tier_copy_operations import GraphTierCopyOperations
|
|
64
|
+
|
|
65
|
+
d = dict(src_dict)
|
|
66
|
+
storage_gb = d.pop("storage_gb")
|
|
67
|
+
|
|
68
|
+
monthly_credits = d.pop("monthly_credits")
|
|
69
|
+
|
|
70
|
+
def _parse_max_subgraphs(data: object) -> Union[None, int]:
|
|
71
|
+
if data is None:
|
|
72
|
+
return data
|
|
73
|
+
return cast(Union[None, int], data)
|
|
74
|
+
|
|
75
|
+
max_subgraphs = _parse_max_subgraphs(d.pop("max_subgraphs"))
|
|
76
|
+
|
|
77
|
+
copy_operations = GraphTierCopyOperations.from_dict(d.pop("copy_operations"))
|
|
78
|
+
|
|
79
|
+
backup = GraphTierBackup.from_dict(d.pop("backup"))
|
|
80
|
+
|
|
81
|
+
graph_tier_limits = cls(
|
|
82
|
+
storage_gb=storage_gb,
|
|
83
|
+
monthly_credits=monthly_credits,
|
|
84
|
+
max_subgraphs=max_subgraphs,
|
|
85
|
+
copy_operations=copy_operations,
|
|
86
|
+
backup=backup,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
graph_tier_limits.additional_properties = d
|
|
90
|
+
return graph_tier_limits
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def additional_keys(self) -> list[str]:
|
|
94
|
+
return list(self.additional_properties.keys())
|
|
95
|
+
|
|
96
|
+
def __getitem__(self, key: str) -> Any:
|
|
97
|
+
return self.additional_properties[key]
|
|
98
|
+
|
|
99
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
100
|
+
self.additional_properties[key] = value
|
|
101
|
+
|
|
102
|
+
def __delitem__(self, key: str) -> None:
|
|
103
|
+
del self.additional_properties[key]
|
|
104
|
+
|
|
105
|
+
def __contains__(self, key: str) -> bool:
|
|
106
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,148 @@
|
|
|
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.offering_repository_plan_rate_limits_type_0 import (
|
|
11
|
+
OfferingRepositoryPlanRateLimitsType0,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="OfferingRepositoryPlan")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class OfferingRepositoryPlan:
|
|
20
|
+
"""Information about a repository plan.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
plan (str): Plan identifier
|
|
24
|
+
name (str): Plan name
|
|
25
|
+
monthly_price (float): Monthly price in USD
|
|
26
|
+
monthly_credits (int): Monthly credit allocation
|
|
27
|
+
access_level (str): Access level
|
|
28
|
+
features (list[str]): List of features
|
|
29
|
+
rate_limits (Union['OfferingRepositoryPlanRateLimitsType0', None, Unset]): Rate limits for this plan
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
plan: str
|
|
33
|
+
name: str
|
|
34
|
+
monthly_price: float
|
|
35
|
+
monthly_credits: int
|
|
36
|
+
access_level: str
|
|
37
|
+
features: list[str]
|
|
38
|
+
rate_limits: Union["OfferingRepositoryPlanRateLimitsType0", None, Unset] = UNSET
|
|
39
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
40
|
+
|
|
41
|
+
def to_dict(self) -> dict[str, Any]:
|
|
42
|
+
from ..models.offering_repository_plan_rate_limits_type_0 import (
|
|
43
|
+
OfferingRepositoryPlanRateLimitsType0,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
plan = self.plan
|
|
47
|
+
|
|
48
|
+
name = self.name
|
|
49
|
+
|
|
50
|
+
monthly_price = self.monthly_price
|
|
51
|
+
|
|
52
|
+
monthly_credits = self.monthly_credits
|
|
53
|
+
|
|
54
|
+
access_level = self.access_level
|
|
55
|
+
|
|
56
|
+
features = self.features
|
|
57
|
+
|
|
58
|
+
rate_limits: Union[None, Unset, dict[str, Any]]
|
|
59
|
+
if isinstance(self.rate_limits, Unset):
|
|
60
|
+
rate_limits = UNSET
|
|
61
|
+
elif isinstance(self.rate_limits, OfferingRepositoryPlanRateLimitsType0):
|
|
62
|
+
rate_limits = self.rate_limits.to_dict()
|
|
63
|
+
else:
|
|
64
|
+
rate_limits = self.rate_limits
|
|
65
|
+
|
|
66
|
+
field_dict: dict[str, Any] = {}
|
|
67
|
+
field_dict.update(self.additional_properties)
|
|
68
|
+
field_dict.update(
|
|
69
|
+
{
|
|
70
|
+
"plan": plan,
|
|
71
|
+
"name": name,
|
|
72
|
+
"monthly_price": monthly_price,
|
|
73
|
+
"monthly_credits": monthly_credits,
|
|
74
|
+
"access_level": access_level,
|
|
75
|
+
"features": features,
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
if rate_limits is not UNSET:
|
|
79
|
+
field_dict["rate_limits"] = rate_limits
|
|
80
|
+
|
|
81
|
+
return field_dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
85
|
+
from ..models.offering_repository_plan_rate_limits_type_0 import (
|
|
86
|
+
OfferingRepositoryPlanRateLimitsType0,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
d = dict(src_dict)
|
|
90
|
+
plan = d.pop("plan")
|
|
91
|
+
|
|
92
|
+
name = d.pop("name")
|
|
93
|
+
|
|
94
|
+
monthly_price = d.pop("monthly_price")
|
|
95
|
+
|
|
96
|
+
monthly_credits = d.pop("monthly_credits")
|
|
97
|
+
|
|
98
|
+
access_level = d.pop("access_level")
|
|
99
|
+
|
|
100
|
+
features = cast(list[str], d.pop("features"))
|
|
101
|
+
|
|
102
|
+
def _parse_rate_limits(
|
|
103
|
+
data: object,
|
|
104
|
+
) -> Union["OfferingRepositoryPlanRateLimitsType0", None, Unset]:
|
|
105
|
+
if data is None:
|
|
106
|
+
return data
|
|
107
|
+
if isinstance(data, Unset):
|
|
108
|
+
return data
|
|
109
|
+
try:
|
|
110
|
+
if not isinstance(data, dict):
|
|
111
|
+
raise TypeError()
|
|
112
|
+
rate_limits_type_0 = OfferingRepositoryPlanRateLimitsType0.from_dict(data)
|
|
113
|
+
|
|
114
|
+
return rate_limits_type_0
|
|
115
|
+
except: # noqa: E722
|
|
116
|
+
pass
|
|
117
|
+
return cast(Union["OfferingRepositoryPlanRateLimitsType0", None, Unset], data)
|
|
118
|
+
|
|
119
|
+
rate_limits = _parse_rate_limits(d.pop("rate_limits", UNSET))
|
|
120
|
+
|
|
121
|
+
offering_repository_plan = cls(
|
|
122
|
+
plan=plan,
|
|
123
|
+
name=name,
|
|
124
|
+
monthly_price=monthly_price,
|
|
125
|
+
monthly_credits=monthly_credits,
|
|
126
|
+
access_level=access_level,
|
|
127
|
+
features=features,
|
|
128
|
+
rate_limits=rate_limits,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
offering_repository_plan.additional_properties = d
|
|
132
|
+
return offering_repository_plan
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def additional_keys(self) -> list[str]:
|
|
136
|
+
return list(self.additional_properties.keys())
|
|
137
|
+
|
|
138
|
+
def __getitem__(self, key: str) -> Any:
|
|
139
|
+
return self.additional_properties[key]
|
|
140
|
+
|
|
141
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
142
|
+
self.additional_properties[key] = value
|
|
143
|
+
|
|
144
|
+
def __delitem__(self, key: str) -> None:
|
|
145
|
+
del self.additional_properties[key]
|
|
146
|
+
|
|
147
|
+
def __contains__(self, key: str) -> bool:
|
|
148
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
T = TypeVar("T", bound="OfferingRepositoryPlanRateLimitsType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class OfferingRepositoryPlanRateLimitsType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, Union[None, int]] = _attrs_field(
|
|
15
|
+
init=False, factory=dict
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def to_dict(self) -> dict[str, Any]:
|
|
19
|
+
field_dict: dict[str, Any] = {}
|
|
20
|
+
for prop_name, prop in self.additional_properties.items():
|
|
21
|
+
field_dict[prop_name] = prop
|
|
22
|
+
|
|
23
|
+
return field_dict
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
|
+
d = dict(src_dict)
|
|
28
|
+
offering_repository_plan_rate_limits_type_0 = cls()
|
|
29
|
+
|
|
30
|
+
additional_properties = {}
|
|
31
|
+
for prop_name, prop_dict in d.items():
|
|
32
|
+
|
|
33
|
+
def _parse_additional_property(data: object) -> Union[None, int]:
|
|
34
|
+
if data is None:
|
|
35
|
+
return data
|
|
36
|
+
return cast(Union[None, int], data)
|
|
37
|
+
|
|
38
|
+
additional_property = _parse_additional_property(prop_dict)
|
|
39
|
+
|
|
40
|
+
additional_properties[prop_name] = additional_property
|
|
41
|
+
|
|
42
|
+
offering_repository_plan_rate_limits_type_0.additional_properties = (
|
|
43
|
+
additional_properties
|
|
44
|
+
)
|
|
45
|
+
return offering_repository_plan_rate_limits_type_0
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Union[None, int]:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Union[None, int]) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
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.operation_costs_ai_operations import OperationCostsAiOperations
|
|
9
|
+
from ..models.operation_costs_token_pricing import OperationCostsTokenPricing
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="OperationCosts")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class OperationCosts:
|
|
17
|
+
"""Operation cost information.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
description (str): Description of operation costs
|
|
21
|
+
ai_operations (OperationCostsAiOperations): Base costs for AI operations
|
|
22
|
+
token_pricing (OperationCostsTokenPricing): Token pricing by model
|
|
23
|
+
included_operations (list[str]): Operations that don't consume credits
|
|
24
|
+
notes (list[str]): Important notes about costs
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
description: str
|
|
28
|
+
ai_operations: "OperationCostsAiOperations"
|
|
29
|
+
token_pricing: "OperationCostsTokenPricing"
|
|
30
|
+
included_operations: list[str]
|
|
31
|
+
notes: list[str]
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
description = self.description
|
|
36
|
+
|
|
37
|
+
ai_operations = self.ai_operations.to_dict()
|
|
38
|
+
|
|
39
|
+
token_pricing = self.token_pricing.to_dict()
|
|
40
|
+
|
|
41
|
+
included_operations = self.included_operations
|
|
42
|
+
|
|
43
|
+
notes = self.notes
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"description": description,
|
|
50
|
+
"ai_operations": ai_operations,
|
|
51
|
+
"token_pricing": token_pricing,
|
|
52
|
+
"included_operations": included_operations,
|
|
53
|
+
"notes": notes,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
return field_dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
61
|
+
from ..models.operation_costs_ai_operations import OperationCostsAiOperations
|
|
62
|
+
from ..models.operation_costs_token_pricing import OperationCostsTokenPricing
|
|
63
|
+
|
|
64
|
+
d = dict(src_dict)
|
|
65
|
+
description = d.pop("description")
|
|
66
|
+
|
|
67
|
+
ai_operations = OperationCostsAiOperations.from_dict(d.pop("ai_operations"))
|
|
68
|
+
|
|
69
|
+
token_pricing = OperationCostsTokenPricing.from_dict(d.pop("token_pricing"))
|
|
70
|
+
|
|
71
|
+
included_operations = cast(list[str], d.pop("included_operations"))
|
|
72
|
+
|
|
73
|
+
notes = cast(list[str], d.pop("notes"))
|
|
74
|
+
|
|
75
|
+
operation_costs = cls(
|
|
76
|
+
description=description,
|
|
77
|
+
ai_operations=ai_operations,
|
|
78
|
+
token_pricing=token_pricing,
|
|
79
|
+
included_operations=included_operations,
|
|
80
|
+
notes=notes,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
operation_costs.additional_properties = d
|
|
84
|
+
return operation_costs
|
|
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,44 @@
|
|
|
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="OperationCostsAiOperations")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class OperationCostsAiOperations:
|
|
12
|
+
"""Base costs for AI operations"""
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
operation_costs_ai_operations = cls()
|
|
26
|
+
|
|
27
|
+
operation_costs_ai_operations.additional_properties = d
|
|
28
|
+
return operation_costs_ai_operations
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> float:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: float) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
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.token_pricing import TokenPricing
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="OperationCostsTokenPricing")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class OperationCostsTokenPricing:
|
|
16
|
+
"""Token pricing by model"""
|
|
17
|
+
|
|
18
|
+
additional_properties: dict[str, "TokenPricing"] = _attrs_field(
|
|
19
|
+
init=False, factory=dict
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
for prop_name, prop in self.additional_properties.items():
|
|
25
|
+
field_dict[prop_name] = prop.to_dict()
|
|
26
|
+
|
|
27
|
+
return field_dict
|
|
28
|
+
|
|
29
|
+
@classmethod
|
|
30
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
31
|
+
from ..models.token_pricing import TokenPricing
|
|
32
|
+
|
|
33
|
+
d = dict(src_dict)
|
|
34
|
+
operation_costs_token_pricing = cls()
|
|
35
|
+
|
|
36
|
+
additional_properties = {}
|
|
37
|
+
for prop_name, prop_dict in d.items():
|
|
38
|
+
additional_property = TokenPricing.from_dict(prop_dict)
|
|
39
|
+
|
|
40
|
+
additional_properties[prop_name] = additional_property
|
|
41
|
+
|
|
42
|
+
operation_costs_token_pricing.additional_properties = additional_properties
|
|
43
|
+
return operation_costs_token_pricing
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def additional_keys(self) -> list[str]:
|
|
47
|
+
return list(self.additional_properties.keys())
|
|
48
|
+
|
|
49
|
+
def __getitem__(self, key: str) -> "TokenPricing":
|
|
50
|
+
return self.additional_properties[key]
|
|
51
|
+
|
|
52
|
+
def __setitem__(self, key: str, value: "TokenPricing") -> None:
|
|
53
|
+
self.additional_properties[key] = value
|
|
54
|
+
|
|
55
|
+
def __delitem__(self, key: str) -> None:
|
|
56
|
+
del self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __contains__(self, key: str) -> bool:
|
|
59
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
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.offering_repository_plan import OfferingRepositoryPlan
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="RepositoryInfo")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class RepositoryInfo:
|
|
16
|
+
"""Information about a shared repository.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
type_ (str): Repository type identifier
|
|
20
|
+
name (str): Repository name
|
|
21
|
+
description (str): Repository description
|
|
22
|
+
enabled (bool): Whether repository is enabled
|
|
23
|
+
coming_soon (bool): Whether repository is coming soon
|
|
24
|
+
plans (list['OfferingRepositoryPlan']): Available plans
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
type_: str
|
|
28
|
+
name: str
|
|
29
|
+
description: str
|
|
30
|
+
enabled: bool
|
|
31
|
+
coming_soon: bool
|
|
32
|
+
plans: list["OfferingRepositoryPlan"]
|
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
type_ = self.type_
|
|
37
|
+
|
|
38
|
+
name = self.name
|
|
39
|
+
|
|
40
|
+
description = self.description
|
|
41
|
+
|
|
42
|
+
enabled = self.enabled
|
|
43
|
+
|
|
44
|
+
coming_soon = self.coming_soon
|
|
45
|
+
|
|
46
|
+
plans = []
|
|
47
|
+
for plans_item_data in self.plans:
|
|
48
|
+
plans_item = plans_item_data.to_dict()
|
|
49
|
+
plans.append(plans_item)
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update(
|
|
54
|
+
{
|
|
55
|
+
"type": type_,
|
|
56
|
+
"name": name,
|
|
57
|
+
"description": description,
|
|
58
|
+
"enabled": enabled,
|
|
59
|
+
"coming_soon": coming_soon,
|
|
60
|
+
"plans": plans,
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
|
+
from ..models.offering_repository_plan import OfferingRepositoryPlan
|
|
69
|
+
|
|
70
|
+
d = dict(src_dict)
|
|
71
|
+
type_ = d.pop("type")
|
|
72
|
+
|
|
73
|
+
name = d.pop("name")
|
|
74
|
+
|
|
75
|
+
description = d.pop("description")
|
|
76
|
+
|
|
77
|
+
enabled = d.pop("enabled")
|
|
78
|
+
|
|
79
|
+
coming_soon = d.pop("coming_soon")
|
|
80
|
+
|
|
81
|
+
plans = []
|
|
82
|
+
_plans = d.pop("plans")
|
|
83
|
+
for plans_item_data in _plans:
|
|
84
|
+
plans_item = OfferingRepositoryPlan.from_dict(plans_item_data)
|
|
85
|
+
|
|
86
|
+
plans.append(plans_item)
|
|
87
|
+
|
|
88
|
+
repository_info = cls(
|
|
89
|
+
type_=type_,
|
|
90
|
+
name=name,
|
|
91
|
+
description=description,
|
|
92
|
+
enabled=enabled,
|
|
93
|
+
coming_soon=coming_soon,
|
|
94
|
+
plans=plans,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
repository_info.additional_properties = d
|
|
98
|
+
return repository_info
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def additional_keys(self) -> list[str]:
|
|
102
|
+
return list(self.additional_properties.keys())
|
|
103
|
+
|
|
104
|
+
def __getitem__(self, key: str) -> Any:
|
|
105
|
+
return self.additional_properties[key]
|
|
106
|
+
|
|
107
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
108
|
+
self.additional_properties[key] = value
|
|
109
|
+
|
|
110
|
+
def __delitem__(self, key: str) -> None:
|
|
111
|
+
del self.additional_properties[key]
|
|
112
|
+
|
|
113
|
+
def __contains__(self, key: str) -> bool:
|
|
114
|
+
return key in self.additional_properties
|