robosystems-client 0.2.11__py3-none-any.whl → 0.2.12__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 (61) hide show
  1. robosystems_client/api/auth/register_user.py +36 -8
  2. robosystems_client/api/billing/{cancel_subscription.py → cancel_org_subscription.py} +34 -9
  3. robosystems_client/api/billing/create_checkout_session.py +28 -20
  4. robosystems_client/api/billing/get_org_billing_customer.py +189 -0
  5. robosystems_client/api/billing/{get_subscription.py → get_org_subscription.py} +30 -5
  6. robosystems_client/api/billing/{get_upcoming_invoice.py → get_org_upcoming_invoice.py} +68 -22
  7. robosystems_client/api/billing/{list_invoices.py → list_org_invoices.py} +38 -9
  8. robosystems_client/api/billing/{list_subscriptions.py → list_org_subscriptions.py} +64 -22
  9. robosystems_client/api/billing/{update_payment_method.py → update_org_payment_method.py} +34 -9
  10. robosystems_client/api/org/__init__.py +1 -0
  11. robosystems_client/api/org/create_org.py +174 -0
  12. robosystems_client/api/{billing/get_billing_customer.py → org/get_org.py} +50 -28
  13. robosystems_client/api/org/list_org_graphs.py +170 -0
  14. robosystems_client/api/{user/get_user_limits.py → org/list_user_orgs.py} +21 -25
  15. robosystems_client/api/org/update_org.py +187 -0
  16. robosystems_client/api/org_members/__init__.py +1 -0
  17. robosystems_client/api/org_members/invite_org_member.py +207 -0
  18. robosystems_client/api/org_members/list_org_members.py +165 -0
  19. robosystems_client/api/org_members/remove_org_member.py +176 -0
  20. robosystems_client/api/org_members/update_org_member_role.py +200 -0
  21. robosystems_client/api/org_usage/__init__.py +1 -0
  22. robosystems_client/api/org_usage/get_org_limits.py +165 -0
  23. robosystems_client/api/org_usage/get_org_usage.py +186 -0
  24. robosystems_client/api/service_offerings/get_service_offerings.py +32 -8
  25. robosystems_client/api/usage/get_graph_usage_analytics.py +4 -4
  26. robosystems_client/models/__init__.py +44 -6
  27. robosystems_client/models/auth_response.py +35 -0
  28. robosystems_client/models/{user_usage_response_graphs.py → auth_response_org_type_0.py} +6 -6
  29. robosystems_client/models/billing_customer.py +8 -8
  30. robosystems_client/models/checkout_response.py +65 -22
  31. robosystems_client/models/create_org_request.py +79 -0
  32. robosystems_client/models/graph_subscription_tier.py +40 -48
  33. robosystems_client/models/graph_subscriptions.py +17 -5
  34. robosystems_client/models/invite_member_request.py +93 -0
  35. robosystems_client/models/list_org_graphs_response_200_item.py +44 -0
  36. robosystems_client/models/org_detail_response.py +174 -0
  37. robosystems_client/models/org_detail_response_graphs_item.py +44 -0
  38. robosystems_client/models/org_detail_response_limits_type_0.py +44 -0
  39. robosystems_client/models/org_detail_response_members_item.py +44 -0
  40. robosystems_client/models/org_limits_response.py +98 -0
  41. robosystems_client/models/org_limits_response_current_usage.py +44 -0
  42. robosystems_client/models/org_list_response.py +82 -0
  43. robosystems_client/models/org_member_list_response.py +90 -0
  44. robosystems_client/models/org_member_response.py +104 -0
  45. robosystems_client/models/org_response.py +121 -0
  46. robosystems_client/models/org_role.py +10 -0
  47. robosystems_client/models/org_type.py +10 -0
  48. robosystems_client/models/org_usage_response.py +146 -0
  49. robosystems_client/models/org_usage_response_daily_trend_item.py +44 -0
  50. robosystems_client/models/org_usage_response_graph_details_item.py +44 -0
  51. robosystems_client/models/org_usage_summary.py +158 -0
  52. robosystems_client/models/repository_subscriptions.py +15 -4
  53. robosystems_client/models/service_offerings_response.py +15 -0
  54. robosystems_client/models/update_member_role_request.py +62 -0
  55. robosystems_client/models/update_org_request.py +103 -0
  56. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/METADATA +1 -1
  57. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/RECORD +59 -27
  58. robosystems_client/models/user_limits_response.py +0 -95
  59. robosystems_client/models/user_usage_response.py +0 -90
  60. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/WHEEL +0 -0
  61. {robosystems_client-0.2.11.dist-info → robosystems_client-0.2.12.dist-info}/licenses/LICENSE +0 -0
@@ -1,5 +1,5 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union
2
+ from typing import Any, TypeVar, Union, cast
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
@@ -14,57 +14,100 @@ class CheckoutResponse:
14
14
  """Response from checkout session creation.
15
15
 
16
16
  Attributes:
17
- checkout_url (str): URL to redirect user to for payment
18
- session_id (str): Checkout session ID for status polling
19
- subscription_id (str): Internal subscription ID
17
+ checkout_url (Union[None, Unset, str]): URL to redirect user to for payment
18
+ session_id (Union[None, Unset, str]): Checkout session ID for status polling
19
+ subscription_id (Union[None, Unset, str]): Internal subscription ID
20
20
  requires_checkout (Union[Unset, bool]): Whether checkout is required Default: True.
21
+ billing_disabled (Union[Unset, bool]): Whether billing is disabled on this instance Default: False.
21
22
  """
22
23
 
23
- checkout_url: str
24
- session_id: str
25
- subscription_id: str
24
+ checkout_url: Union[None, Unset, str] = UNSET
25
+ session_id: Union[None, Unset, str] = UNSET
26
+ subscription_id: Union[None, Unset, str] = UNSET
26
27
  requires_checkout: Union[Unset, bool] = True
28
+ billing_disabled: Union[Unset, bool] = False
27
29
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
30
 
29
31
  def to_dict(self) -> dict[str, Any]:
30
- checkout_url = self.checkout_url
31
-
32
- session_id = self.session_id
33
-
34
- subscription_id = self.subscription_id
32
+ checkout_url: Union[None, Unset, str]
33
+ if isinstance(self.checkout_url, Unset):
34
+ checkout_url = UNSET
35
+ else:
36
+ checkout_url = self.checkout_url
37
+
38
+ session_id: Union[None, Unset, str]
39
+ if isinstance(self.session_id, Unset):
40
+ session_id = UNSET
41
+ else:
42
+ session_id = self.session_id
43
+
44
+ subscription_id: Union[None, Unset, str]
45
+ if isinstance(self.subscription_id, Unset):
46
+ subscription_id = UNSET
47
+ else:
48
+ subscription_id = self.subscription_id
35
49
 
36
50
  requires_checkout = self.requires_checkout
37
51
 
52
+ billing_disabled = self.billing_disabled
53
+
38
54
  field_dict: dict[str, Any] = {}
39
55
  field_dict.update(self.additional_properties)
40
- field_dict.update(
41
- {
42
- "checkout_url": checkout_url,
43
- "session_id": session_id,
44
- "subscription_id": subscription_id,
45
- }
46
- )
56
+ field_dict.update({})
57
+ if checkout_url is not UNSET:
58
+ field_dict["checkout_url"] = checkout_url
59
+ if session_id is not UNSET:
60
+ field_dict["session_id"] = session_id
61
+ if subscription_id is not UNSET:
62
+ field_dict["subscription_id"] = subscription_id
47
63
  if requires_checkout is not UNSET:
48
64
  field_dict["requires_checkout"] = requires_checkout
65
+ if billing_disabled is not UNSET:
66
+ field_dict["billing_disabled"] = billing_disabled
49
67
 
50
68
  return field_dict
51
69
 
52
70
  @classmethod
53
71
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
54
72
  d = dict(src_dict)
55
- checkout_url = d.pop("checkout_url")
56
73
 
57
- session_id = d.pop("session_id")
74
+ def _parse_checkout_url(data: object) -> Union[None, Unset, str]:
75
+ if data is None:
76
+ return data
77
+ if isinstance(data, Unset):
78
+ return data
79
+ return cast(Union[None, Unset, str], data)
80
+
81
+ checkout_url = _parse_checkout_url(d.pop("checkout_url", UNSET))
58
82
 
59
- subscription_id = d.pop("subscription_id")
83
+ def _parse_session_id(data: object) -> Union[None, Unset, str]:
84
+ if data is None:
85
+ return data
86
+ if isinstance(data, Unset):
87
+ return data
88
+ return cast(Union[None, Unset, str], data)
89
+
90
+ session_id = _parse_session_id(d.pop("session_id", UNSET))
91
+
92
+ def _parse_subscription_id(data: object) -> Union[None, Unset, str]:
93
+ if data is None:
94
+ return data
95
+ if isinstance(data, Unset):
96
+ return data
97
+ return cast(Union[None, Unset, str], data)
98
+
99
+ subscription_id = _parse_subscription_id(d.pop("subscription_id", UNSET))
60
100
 
61
101
  requires_checkout = d.pop("requires_checkout", UNSET)
62
102
 
103
+ billing_disabled = d.pop("billing_disabled", UNSET)
104
+
63
105
  checkout_response = cls(
64
106
  checkout_url=checkout_url,
65
107
  session_id=session_id,
66
108
  subscription_id=subscription_id,
67
109
  requires_checkout=requires_checkout,
110
+ billing_disabled=billing_disabled,
68
111
  )
69
112
 
70
113
  checkout_response.additional_properties = d
@@ -0,0 +1,79 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..models.org_type import OrgType
8
+ from ..types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="CreateOrgRequest")
11
+
12
+
13
+ @_attrs_define
14
+ class CreateOrgRequest:
15
+ """Request to create an organization.
16
+
17
+ Attributes:
18
+ name (str):
19
+ org_type (Union[Unset, OrgType]):
20
+ """
21
+
22
+ name: str
23
+ org_type: Union[Unset, OrgType] = UNSET
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ name = self.name
28
+
29
+ org_type: Union[Unset, str] = UNSET
30
+ if not isinstance(self.org_type, Unset):
31
+ org_type = self.org_type.value
32
+
33
+ field_dict: dict[str, Any] = {}
34
+ field_dict.update(self.additional_properties)
35
+ field_dict.update(
36
+ {
37
+ "name": name,
38
+ }
39
+ )
40
+ if org_type is not UNSET:
41
+ field_dict["org_type"] = org_type
42
+
43
+ return field_dict
44
+
45
+ @classmethod
46
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
47
+ d = dict(src_dict)
48
+ name = d.pop("name")
49
+
50
+ _org_type = d.pop("org_type", UNSET)
51
+ org_type: Union[Unset, OrgType]
52
+ if isinstance(_org_type, Unset):
53
+ org_type = UNSET
54
+ else:
55
+ org_type = OrgType(_org_type)
56
+
57
+ create_org_request = cls(
58
+ name=name,
59
+ org_type=org_type,
60
+ )
61
+
62
+ create_org_request.additional_properties = d
63
+ return create_org_request
64
+
65
+ @property
66
+ def additional_keys(self) -> list[str]:
67
+ return list(self.additional_properties.keys())
68
+
69
+ def __getitem__(self, key: str) -> Any:
70
+ return self.additional_properties[key]
71
+
72
+ def __setitem__(self, key: str, value: Any) -> None:
73
+ self.additional_properties[key] = value
74
+
75
+ def __delitem__(self, key: str) -> None:
76
+ del self.additional_properties[key]
77
+
78
+ def __contains__(self, key: str) -> bool:
79
+ return key in self.additional_properties
@@ -11,42 +11,45 @@ T = TypeVar("T", bound="GraphSubscriptionTier")
11
11
 
12
12
  @_attrs_define
13
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
14
+ """Information about a graph infrastructure tier.
15
+
16
+ Each tier represents a per-graph subscription option with specific
17
+ infrastructure, performance, and pricing characteristics.
18
+
19
+ Attributes:
20
+ name (str): Infrastructure tier identifier (e.g., kuzu-standard)
21
+ display_name (str): Display name for UI
22
+ description (str): Tier description
23
+ monthly_price_per_graph (float): Monthly price in USD per graph
24
+ monthly_credits_per_graph (int): Monthly AI credits per graph
25
+ storage_included_gb (int): Storage included in GB
26
+ storage_overage_per_gb (float): Overage cost per GB per month
27
+ infrastructure (str): Infrastructure description
28
+ features (list[str]): List of features
29
+ backup_retention_days (int): Backup retention in days
30
+ priority_support (bool): Whether priority support is included
31
+ api_rate_multiplier (float): API rate multiplier
32
+ backend (str): Database backend (kuzu or neo4j)
33
+ max_queries_per_hour (Union[None, Unset, int]): Maximum queries per hour
34
+ max_subgraphs (Union[Unset, int]): Maximum subgraphs supported Default: 0.
35
+ instance_type (Union[None, Unset, str]): Instance type
33
36
  """
34
37
 
35
38
  name: str
36
39
  display_name: str
37
40
  description: str
38
- monthly_price: float
39
- monthly_credits: int
41
+ monthly_price_per_graph: float
42
+ monthly_credits_per_graph: int
40
43
  storage_included_gb: int
41
44
  storage_overage_per_gb: float
42
- allowed_graph_tiers: list[str]
45
+ infrastructure: str
43
46
  features: list[str]
44
47
  backup_retention_days: int
45
48
  priority_support: bool
46
49
  api_rate_multiplier: float
47
50
  backend: str
48
51
  max_queries_per_hour: Union[None, Unset, int] = UNSET
49
- max_subgraphs: Union[None, Unset, int] = UNSET
52
+ max_subgraphs: Union[Unset, int] = 0
50
53
  instance_type: Union[None, Unset, str] = UNSET
51
54
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
52
55
 
@@ -57,15 +60,15 @@ class GraphSubscriptionTier:
57
60
 
58
61
  description = self.description
59
62
 
60
- monthly_price = self.monthly_price
63
+ monthly_price_per_graph = self.monthly_price_per_graph
61
64
 
62
- monthly_credits = self.monthly_credits
65
+ monthly_credits_per_graph = self.monthly_credits_per_graph
63
66
 
64
67
  storage_included_gb = self.storage_included_gb
65
68
 
66
69
  storage_overage_per_gb = self.storage_overage_per_gb
67
70
 
68
- allowed_graph_tiers = self.allowed_graph_tiers
71
+ infrastructure = self.infrastructure
69
72
 
70
73
  features = self.features
71
74
 
@@ -83,11 +86,7 @@ class GraphSubscriptionTier:
83
86
  else:
84
87
  max_queries_per_hour = self.max_queries_per_hour
85
88
 
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
89
+ max_subgraphs = self.max_subgraphs
91
90
 
92
91
  instance_type: Union[None, Unset, str]
93
92
  if isinstance(self.instance_type, Unset):
@@ -102,11 +101,11 @@ class GraphSubscriptionTier:
102
101
  "name": name,
103
102
  "display_name": display_name,
104
103
  "description": description,
105
- "monthly_price": monthly_price,
106
- "monthly_credits": monthly_credits,
104
+ "monthly_price_per_graph": monthly_price_per_graph,
105
+ "monthly_credits_per_graph": monthly_credits_per_graph,
107
106
  "storage_included_gb": storage_included_gb,
108
107
  "storage_overage_per_gb": storage_overage_per_gb,
109
- "allowed_graph_tiers": allowed_graph_tiers,
108
+ "infrastructure": infrastructure,
110
109
  "features": features,
111
110
  "backup_retention_days": backup_retention_days,
112
111
  "priority_support": priority_support,
@@ -132,15 +131,15 @@ class GraphSubscriptionTier:
132
131
 
133
132
  description = d.pop("description")
134
133
 
135
- monthly_price = d.pop("monthly_price")
134
+ monthly_price_per_graph = d.pop("monthly_price_per_graph")
136
135
 
137
- monthly_credits = d.pop("monthly_credits")
136
+ monthly_credits_per_graph = d.pop("monthly_credits_per_graph")
138
137
 
139
138
  storage_included_gb = d.pop("storage_included_gb")
140
139
 
141
140
  storage_overage_per_gb = d.pop("storage_overage_per_gb")
142
141
 
143
- allowed_graph_tiers = cast(list[str], d.pop("allowed_graph_tiers"))
142
+ infrastructure = d.pop("infrastructure")
144
143
 
145
144
  features = cast(list[str], d.pop("features"))
146
145
 
@@ -163,14 +162,7 @@ class GraphSubscriptionTier:
163
162
  d.pop("max_queries_per_hour", UNSET)
164
163
  )
165
164
 
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))
165
+ max_subgraphs = d.pop("max_subgraphs", UNSET)
174
166
 
175
167
  def _parse_instance_type(data: object) -> Union[None, Unset, str]:
176
168
  if data is None:
@@ -185,11 +177,11 @@ class GraphSubscriptionTier:
185
177
  name=name,
186
178
  display_name=display_name,
187
179
  description=description,
188
- monthly_price=monthly_price,
189
- monthly_credits=monthly_credits,
180
+ monthly_price_per_graph=monthly_price_per_graph,
181
+ monthly_credits_per_graph=monthly_credits_per_graph,
190
182
  storage_included_gb=storage_included_gb,
191
183
  storage_overage_per_gb=storage_overage_per_gb,
192
- allowed_graph_tiers=allowed_graph_tiers,
184
+ infrastructure=infrastructure,
193
185
  features=features,
194
186
  backup_retention_days=backup_retention_days,
195
187
  priority_support=priority_support,
@@ -16,14 +16,20 @@ T = TypeVar("T", bound="GraphSubscriptions")
16
16
  class GraphSubscriptions:
17
17
  """Graph subscription offerings.
18
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
19
+ Graph subscriptions are per-graph, not per-organization. Each graph
20
+ created by an organization has its own subscription with its own
21
+ infrastructure tier, pricing, and credit allocation.
22
+
23
+ Attributes:
24
+ description (str): Description of graph subscriptions
25
+ pricing_model (str): Pricing model type (per_graph or per_organization)
26
+ tiers (list['GraphSubscriptionTier']): Available infrastructure tiers
27
+ storage (StorageInfo): Storage pricing information.
28
+ notes (list[str]): Important notes
24
29
  """
25
30
 
26
31
  description: str
32
+ pricing_model: str
27
33
  tiers: list["GraphSubscriptionTier"]
28
34
  storage: "StorageInfo"
29
35
  notes: list[str]
@@ -32,6 +38,8 @@ class GraphSubscriptions:
32
38
  def to_dict(self) -> dict[str, Any]:
33
39
  description = self.description
34
40
 
41
+ pricing_model = self.pricing_model
42
+
35
43
  tiers = []
36
44
  for tiers_item_data in self.tiers:
37
45
  tiers_item = tiers_item_data.to_dict()
@@ -46,6 +54,7 @@ class GraphSubscriptions:
46
54
  field_dict.update(
47
55
  {
48
56
  "description": description,
57
+ "pricing_model": pricing_model,
49
58
  "tiers": tiers,
50
59
  "storage": storage,
51
60
  "notes": notes,
@@ -62,6 +71,8 @@ class GraphSubscriptions:
62
71
  d = dict(src_dict)
63
72
  description = d.pop("description")
64
73
 
74
+ pricing_model = d.pop("pricing_model")
75
+
65
76
  tiers = []
66
77
  _tiers = d.pop("tiers")
67
78
  for tiers_item_data in _tiers:
@@ -75,6 +86,7 @@ class GraphSubscriptions:
75
86
 
76
87
  graph_subscriptions = cls(
77
88
  description=description,
89
+ pricing_model=pricing_model,
78
90
  tiers=tiers,
79
91
  storage=storage,
80
92
  notes=notes,
@@ -0,0 +1,93 @@
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 ..models.org_role import OrgRole
8
+ from ..types import UNSET, Unset
9
+
10
+ T = TypeVar("T", bound="InviteMemberRequest")
11
+
12
+
13
+ @_attrs_define
14
+ class InviteMemberRequest:
15
+ """Request to invite a member to an organization.
16
+
17
+ Attributes:
18
+ email (str):
19
+ role (Union[None, OrgRole, Unset]): Default: OrgRole.MEMBER.
20
+ """
21
+
22
+ email: str
23
+ role: Union[None, OrgRole, Unset] = OrgRole.MEMBER
24
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
25
+
26
+ def to_dict(self) -> dict[str, Any]:
27
+ email = self.email
28
+
29
+ role: Union[None, Unset, str]
30
+ if isinstance(self.role, Unset):
31
+ role = UNSET
32
+ elif isinstance(self.role, OrgRole):
33
+ role = self.role.value
34
+ else:
35
+ role = self.role
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update(
40
+ {
41
+ "email": email,
42
+ }
43
+ )
44
+ if role is not UNSET:
45
+ field_dict["role"] = role
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
51
+ d = dict(src_dict)
52
+ email = d.pop("email")
53
+
54
+ def _parse_role(data: object) -> Union[None, OrgRole, Unset]:
55
+ if data is None:
56
+ return data
57
+ if isinstance(data, Unset):
58
+ return data
59
+ try:
60
+ if not isinstance(data, str):
61
+ raise TypeError()
62
+ role_type_0 = OrgRole(data)
63
+
64
+ return role_type_0
65
+ except: # noqa: E722
66
+ pass
67
+ return cast(Union[None, OrgRole, Unset], data)
68
+
69
+ role = _parse_role(d.pop("role", UNSET))
70
+
71
+ invite_member_request = cls(
72
+ email=email,
73
+ role=role,
74
+ )
75
+
76
+ invite_member_request.additional_properties = d
77
+ return invite_member_request
78
+
79
+ @property
80
+ def additional_keys(self) -> list[str]:
81
+ return list(self.additional_properties.keys())
82
+
83
+ def __getitem__(self, key: str) -> Any:
84
+ return self.additional_properties[key]
85
+
86
+ def __setitem__(self, key: str, value: Any) -> None:
87
+ self.additional_properties[key] = value
88
+
89
+ def __delitem__(self, key: str) -> None:
90
+ del self.additional_properties[key]
91
+
92
+ def __contains__(self, key: str) -> bool:
93
+ 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="ListOrgGraphsResponse200Item")
8
+
9
+
10
+ @_attrs_define
11
+ class ListOrgGraphsResponse200Item:
12
+ """ """
13
+
14
+ additional_properties: dict[str, Any] = _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
+ list_org_graphs_response_200_item = cls()
26
+
27
+ list_org_graphs_response_200_item.additional_properties = d
28
+ return list_org_graphs_response_200_item
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> Any:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: Any) -> 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