robosystems-client 0.2.9__py3-none-any.whl → 0.2.11__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.
Files changed (86) hide show
  1. robosystems_client/api/{user_subscriptions/upgrade_shared_repository_subscription.py → billing/cancel_subscription.py} +32 -60
  2. robosystems_client/api/billing/create_checkout_session.py +230 -0
  3. robosystems_client/api/{user_analytics/get_user_usage_overview.py → billing/get_billing_customer.py} +29 -21
  4. robosystems_client/api/billing/get_checkout_status.py +221 -0
  5. robosystems_client/api/{user_subscriptions/get_repository_credits.py → billing/get_subscription.py} +35 -43
  6. robosystems_client/api/{user_subscriptions/get_shared_repository_credits.py → billing/get_upcoming_invoice.py} +42 -28
  7. robosystems_client/api/{user_subscriptions/get_user_shared_subscriptions.py → billing/list_invoices.py} +44 -44
  8. robosystems_client/api/{user_limits/get_all_shared_repository_limits.py → billing/list_subscriptions.py} +38 -27
  9. robosystems_client/api/{user_subscriptions/subscribe_to_shared_repository.py → billing/update_payment_method.py} +42 -46
  10. robosystems_client/api/{user_subscriptions/cancel_shared_repository_subscription.py → subscriptions/cancel_subscription.py} +41 -25
  11. robosystems_client/api/subscriptions/create_repository_subscription.py +217 -0
  12. robosystems_client/api/subscriptions/get_graph_subscription.py +197 -0
  13. robosystems_client/api/subscriptions/upgrade_subscription.py +203 -0
  14. robosystems_client/api/usage/get_graph_usage_analytics.py +377 -0
  15. robosystems_client/api/{user_limits/get_user_usage.py → user/get_user_limits.py} +13 -9
  16. robosystems_client/models/__init__.py +42 -82
  17. robosystems_client/models/billing_customer.py +128 -0
  18. robosystems_client/models/checkout_response.py +87 -0
  19. robosystems_client/models/checkout_status_response.py +130 -0
  20. robosystems_client/models/create_checkout_request.py +88 -0
  21. robosystems_client/models/{graph_usage_response_query_statistics.py → create_checkout_request_resource_config.py} +6 -6
  22. robosystems_client/models/{credits_summary_response_credits_by_addon_type_0_item.py → create_repository_subscription_request.py} +22 -6
  23. robosystems_client/models/credit_summary.py +55 -89
  24. robosystems_client/models/{graph_usage_response_storage_usage.py → credit_summary_operation_breakdown.py} +6 -6
  25. robosystems_client/models/graph_subscription_response.py +200 -0
  26. robosystems_client/models/graph_usage_response.py +136 -39
  27. robosystems_client/models/{user_analytics_response_limits.py → graph_usage_response_recent_events_item.py} +6 -6
  28. robosystems_client/models/invoice.py +244 -0
  29. robosystems_client/models/invoice_line_item.py +118 -0
  30. robosystems_client/models/invoices_response.py +90 -0
  31. robosystems_client/models/payment_method.py +158 -0
  32. robosystems_client/models/performance_insights.py +120 -0
  33. robosystems_client/models/{graph_usage_response_recent_activity.py → performance_insights_operation_stats.py} +6 -6
  34. robosystems_client/models/{user_analytics_response_api_usage.py → performance_insights_slow_queries_item.py} +6 -6
  35. robosystems_client/models/storage_summary.py +100 -0
  36. robosystems_client/models/upcoming_invoice.py +128 -0
  37. robosystems_client/models/{get_graph_usage_details_response_getgraphusagedetails.py → update_payment_method_request.py} +22 -6
  38. robosystems_client/models/{subscription_response.py → update_payment_method_response.py} +14 -14
  39. robosystems_client/models/{tier_upgrade_request.py → upgrade_subscription_request.py} +12 -14
  40. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/METADATA +1 -1
  41. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/RECORD +53 -68
  42. robosystems_client/api/graph_analytics/get_graph_usage_stats.py +0 -289
  43. robosystems_client/api/graph_billing/get_current_graph_bill.py +0 -253
  44. robosystems_client/api/graph_billing/get_graph_billing_history.py +0 -298
  45. robosystems_client/api/graph_billing/get_graph_monthly_bill.py +0 -284
  46. robosystems_client/api/graph_billing/get_graph_usage_details.py +0 -320
  47. robosystems_client/api/user/get_all_credit_summaries.py +0 -169
  48. robosystems_client/api/user_analytics/get_detailed_user_analytics.py +0 -188
  49. robosystems_client/api/user_limits/__init__.py +0 -1
  50. robosystems_client/api/user_limits/get_shared_repository_limits.py +0 -213
  51. robosystems_client/api/user_limits/get_user_limits.py +0 -139
  52. robosystems_client/api/user_subscriptions/__init__.py +0 -1
  53. robosystems_client/models/add_on_credit_info.py +0 -119
  54. robosystems_client/models/credits_summary_response.py +0 -148
  55. robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +0 -44
  56. robosystems_client/models/get_all_shared_repository_limits_response_getallsharedrepositorylimits.py +0 -46
  57. robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +0 -44
  58. robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +0 -44
  59. robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +0 -44
  60. robosystems_client/models/get_shared_repository_limits_response_getsharedrepositorylimits.py +0 -44
  61. robosystems_client/models/repository_credits_response.py +0 -128
  62. robosystems_client/models/repository_plan.py +0 -10
  63. robosystems_client/models/repository_type.py +0 -10
  64. robosystems_client/models/subscription_info.py +0 -152
  65. robosystems_client/models/subscription_info_metadata.py +0 -44
  66. robosystems_client/models/subscription_request.py +0 -80
  67. robosystems_client/models/user_analytics_response.py +0 -132
  68. robosystems_client/models/user_analytics_response_graph_usage.py +0 -44
  69. robosystems_client/models/user_analytics_response_recent_activity_item.py +0 -44
  70. robosystems_client/models/user_analytics_response_user_info.py +0 -44
  71. robosystems_client/models/user_graph_summary.py +0 -134
  72. robosystems_client/models/user_subscriptions_response.py +0 -90
  73. robosystems_client/models/user_usage_summary_response.py +0 -130
  74. robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +0 -44
  75. /robosystems_client/api/{graph_analytics → billing}/__init__.py +0 -0
  76. /robosystems_client/api/{graph_billing → credits_}/__init__.py +0 -0
  77. /robosystems_client/api/{graph_credits → credits_}/check_credit_balance.py +0 -0
  78. /robosystems_client/api/{graph_credits → credits_}/check_storage_limits.py +0 -0
  79. /robosystems_client/api/{graph_credits → credits_}/get_credit_summary.py +0 -0
  80. /robosystems_client/api/{graph_credits → credits_}/get_storage_usage.py +0 -0
  81. /robosystems_client/api/{graph_credits → credits_}/list_credit_transactions.py +0 -0
  82. /robosystems_client/api/{graph_credits → subscriptions}/__init__.py +0 -0
  83. /robosystems_client/api/{user_analytics → usage}/__init__.py +0 -0
  84. /robosystems_client/api/{graph_analytics → usage}/get_graph_metrics.py +0 -0
  85. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/WHEEL +0 -0
  86. {robosystems_client-0.2.9.dist-info → robosystems_client-0.2.11.dist-info}/licenses/LICENSE +0 -0
@@ -1,44 +0,0 @@
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="GetCurrentGraphBillResponseGetcurrentgraphbill")
8
-
9
-
10
- @_attrs_define
11
- class GetCurrentGraphBillResponseGetcurrentgraphbill:
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
- get_current_graph_bill_response_getcurrentgraphbill = cls()
26
-
27
- get_current_graph_bill_response_getcurrentgraphbill.additional_properties = d
28
- return get_current_graph_bill_response_getcurrentgraphbill
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
@@ -1,44 +0,0 @@
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="GetGraphBillingHistoryResponseGetgraphbillinghistory")
8
-
9
-
10
- @_attrs_define
11
- class GetGraphBillingHistoryResponseGetgraphbillinghistory:
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
- get_graph_billing_history_response_getgraphbillinghistory = cls()
26
-
27
- get_graph_billing_history_response_getgraphbillinghistory.additional_properties = d
28
- return get_graph_billing_history_response_getgraphbillinghistory
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
@@ -1,44 +0,0 @@
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="GetGraphMonthlyBillResponseGetgraphmonthlybill")
8
-
9
-
10
- @_attrs_define
11
- class GetGraphMonthlyBillResponseGetgraphmonthlybill:
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
- get_graph_monthly_bill_response_getgraphmonthlybill = cls()
26
-
27
- get_graph_monthly_bill_response_getgraphmonthlybill.additional_properties = d
28
- return get_graph_monthly_bill_response_getgraphmonthlybill
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
@@ -1,44 +0,0 @@
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="GetSharedRepositoryLimitsResponseGetsharedrepositorylimits")
8
-
9
-
10
- @_attrs_define
11
- class GetSharedRepositoryLimitsResponseGetsharedrepositorylimits:
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
- get_shared_repository_limits_response_getsharedrepositorylimits = cls()
26
-
27
- get_shared_repository_limits_response_getsharedrepositorylimits.additional_properties = d
28
- return get_shared_repository_limits_response_getsharedrepositorylimits
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
@@ -1,128 +0,0 @@
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.credit_summary import CreditSummary
11
-
12
-
13
- T = TypeVar("T", bound="RepositoryCreditsResponse")
14
-
15
-
16
- @_attrs_define
17
- class RepositoryCreditsResponse:
18
- """Response for repository-specific credits.
19
-
20
- Attributes:
21
- repository (str): Repository identifier
22
- has_access (bool): Whether user has access
23
- message (Union[None, Unset, str]): Access message
24
- credits_ (Union['CreditSummary', None, Unset]): Credit summary if access available
25
- """
26
-
27
- repository: str
28
- has_access: bool
29
- message: Union[None, Unset, str] = UNSET
30
- credits_: Union["CreditSummary", None, Unset] = UNSET
31
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
-
33
- def to_dict(self) -> dict[str, Any]:
34
- from ..models.credit_summary import CreditSummary
35
-
36
- repository = self.repository
37
-
38
- has_access = self.has_access
39
-
40
- message: Union[None, Unset, str]
41
- if isinstance(self.message, Unset):
42
- message = UNSET
43
- else:
44
- message = self.message
45
-
46
- credits_: Union[None, Unset, dict[str, Any]]
47
- if isinstance(self.credits_, Unset):
48
- credits_ = UNSET
49
- elif isinstance(self.credits_, CreditSummary):
50
- credits_ = self.credits_.to_dict()
51
- else:
52
- credits_ = self.credits_
53
-
54
- field_dict: dict[str, Any] = {}
55
- field_dict.update(self.additional_properties)
56
- field_dict.update(
57
- {
58
- "repository": repository,
59
- "has_access": has_access,
60
- }
61
- )
62
- if message is not UNSET:
63
- field_dict["message"] = message
64
- if credits_ is not UNSET:
65
- field_dict["credits"] = credits_
66
-
67
- return field_dict
68
-
69
- @classmethod
70
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
71
- from ..models.credit_summary import CreditSummary
72
-
73
- d = dict(src_dict)
74
- repository = d.pop("repository")
75
-
76
- has_access = d.pop("has_access")
77
-
78
- def _parse_message(data: object) -> Union[None, Unset, str]:
79
- if data is None:
80
- return data
81
- if isinstance(data, Unset):
82
- return data
83
- return cast(Union[None, Unset, str], data)
84
-
85
- message = _parse_message(d.pop("message", UNSET))
86
-
87
- def _parse_credits_(data: object) -> Union["CreditSummary", None, Unset]:
88
- if data is None:
89
- return data
90
- if isinstance(data, Unset):
91
- return data
92
- try:
93
- if not isinstance(data, dict):
94
- raise TypeError()
95
- credits_type_0 = CreditSummary.from_dict(data)
96
-
97
- return credits_type_0
98
- except: # noqa: E722
99
- pass
100
- return cast(Union["CreditSummary", None, Unset], data)
101
-
102
- credits_ = _parse_credits_(d.pop("credits", UNSET))
103
-
104
- repository_credits_response = cls(
105
- repository=repository,
106
- has_access=has_access,
107
- message=message,
108
- credits_=credits_,
109
- )
110
-
111
- repository_credits_response.additional_properties = d
112
- return repository_credits_response
113
-
114
- @property
115
- def additional_keys(self) -> list[str]:
116
- return list(self.additional_properties.keys())
117
-
118
- def __getitem__(self, key: str) -> Any:
119
- return self.additional_properties[key]
120
-
121
- def __setitem__(self, key: str, value: Any) -> None:
122
- self.additional_properties[key] = value
123
-
124
- def __delitem__(self, key: str) -> None:
125
- del self.additional_properties[key]
126
-
127
- def __contains__(self, key: str) -> bool:
128
- return key in self.additional_properties
@@ -1,10 +0,0 @@
1
- from enum import Enum
2
-
3
-
4
- class RepositoryPlan(str, Enum):
5
- ADVANCED = "advanced"
6
- STARTER = "starter"
7
- UNLIMITED = "unlimited"
8
-
9
- def __str__(self) -> str:
10
- return str(self.value)
@@ -1,10 +0,0 @@
1
- from enum import Enum
2
-
3
-
4
- class RepositoryType(str, Enum):
5
- ECONOMIC = "economic"
6
- INDUSTRY = "industry"
7
- SEC = "sec"
8
-
9
- def __str__(self) -> str:
10
- return str(self.value)
@@ -1,152 +0,0 @@
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.subscription_info_metadata import SubscriptionInfoMetadata
11
-
12
-
13
- T = TypeVar("T", bound="SubscriptionInfo")
14
-
15
-
16
- @_attrs_define
17
- class SubscriptionInfo:
18
- """User subscription information.
19
-
20
- Attributes:
21
- id (str): Subscription ID
22
- user_id (str): User ID
23
- addon_type (str): Add-on type
24
- addon_tier (str): Subscription tier
25
- is_active (bool): Whether subscription is active
26
- activated_at (str): Activation date (ISO format)
27
- monthly_price_cents (int): Monthly price in cents
28
- features (list[str]): List of features
29
- metadata (SubscriptionInfoMetadata): Additional metadata
30
- expires_at (Union[None, Unset, str]): Expiration date (ISO format)
31
- """
32
-
33
- id: str
34
- user_id: str
35
- addon_type: str
36
- addon_tier: str
37
- is_active: bool
38
- activated_at: str
39
- monthly_price_cents: int
40
- features: list[str]
41
- metadata: "SubscriptionInfoMetadata"
42
- expires_at: Union[None, Unset, str] = UNSET
43
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
44
-
45
- def to_dict(self) -> dict[str, Any]:
46
- id = self.id
47
-
48
- user_id = self.user_id
49
-
50
- addon_type = self.addon_type
51
-
52
- addon_tier = self.addon_tier
53
-
54
- is_active = self.is_active
55
-
56
- activated_at = self.activated_at
57
-
58
- monthly_price_cents = self.monthly_price_cents
59
-
60
- features = self.features
61
-
62
- metadata = self.metadata.to_dict()
63
-
64
- expires_at: Union[None, Unset, str]
65
- if isinstance(self.expires_at, Unset):
66
- expires_at = UNSET
67
- else:
68
- expires_at = self.expires_at
69
-
70
- field_dict: dict[str, Any] = {}
71
- field_dict.update(self.additional_properties)
72
- field_dict.update(
73
- {
74
- "id": id,
75
- "user_id": user_id,
76
- "addon_type": addon_type,
77
- "addon_tier": addon_tier,
78
- "is_active": is_active,
79
- "activated_at": activated_at,
80
- "monthly_price_cents": monthly_price_cents,
81
- "features": features,
82
- "metadata": metadata,
83
- }
84
- )
85
- if expires_at is not UNSET:
86
- field_dict["expires_at"] = expires_at
87
-
88
- return field_dict
89
-
90
- @classmethod
91
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
92
- from ..models.subscription_info_metadata import SubscriptionInfoMetadata
93
-
94
- d = dict(src_dict)
95
- id = d.pop("id")
96
-
97
- user_id = d.pop("user_id")
98
-
99
- addon_type = d.pop("addon_type")
100
-
101
- addon_tier = d.pop("addon_tier")
102
-
103
- is_active = d.pop("is_active")
104
-
105
- activated_at = d.pop("activated_at")
106
-
107
- monthly_price_cents = d.pop("monthly_price_cents")
108
-
109
- features = cast(list[str], d.pop("features"))
110
-
111
- metadata = SubscriptionInfoMetadata.from_dict(d.pop("metadata"))
112
-
113
- def _parse_expires_at(data: object) -> Union[None, Unset, str]:
114
- if data is None:
115
- return data
116
- if isinstance(data, Unset):
117
- return data
118
- return cast(Union[None, Unset, str], data)
119
-
120
- expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
121
-
122
- subscription_info = cls(
123
- id=id,
124
- user_id=user_id,
125
- addon_type=addon_type,
126
- addon_tier=addon_tier,
127
- is_active=is_active,
128
- activated_at=activated_at,
129
- monthly_price_cents=monthly_price_cents,
130
- features=features,
131
- metadata=metadata,
132
- expires_at=expires_at,
133
- )
134
-
135
- subscription_info.additional_properties = d
136
- return subscription_info
137
-
138
- @property
139
- def additional_keys(self) -> list[str]:
140
- return list(self.additional_properties.keys())
141
-
142
- def __getitem__(self, key: str) -> Any:
143
- return self.additional_properties[key]
144
-
145
- def __setitem__(self, key: str, value: Any) -> None:
146
- self.additional_properties[key] = value
147
-
148
- def __delitem__(self, key: str) -> None:
149
- del self.additional_properties[key]
150
-
151
- def __contains__(self, key: str) -> bool:
152
- return key in self.additional_properties
@@ -1,44 +0,0 @@
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="SubscriptionInfoMetadata")
8
-
9
-
10
- @_attrs_define
11
- class SubscriptionInfoMetadata:
12
- """Additional metadata"""
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
- subscription_info_metadata = cls()
26
-
27
- subscription_info_metadata.additional_properties = d
28
- return subscription_info_metadata
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
@@ -1,80 +0,0 @@
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.repository_plan import RepositoryPlan
8
- from ..models.repository_type import RepositoryType
9
- from ..types import UNSET, Unset
10
-
11
- T = TypeVar("T", bound="SubscriptionRequest")
12
-
13
-
14
- @_attrs_define
15
- class SubscriptionRequest:
16
- """Request to create a new subscription.
17
-
18
- Attributes:
19
- repository_type (RepositoryType): Types of shared repositories.
20
- repository_plan (Union[Unset, RepositoryPlan]): Repository access plans for shared data.
21
- """
22
-
23
- repository_type: RepositoryType
24
- repository_plan: Union[Unset, RepositoryPlan] = UNSET
25
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
-
27
- def to_dict(self) -> dict[str, Any]:
28
- repository_type = self.repository_type.value
29
-
30
- repository_plan: Union[Unset, str] = UNSET
31
- if not isinstance(self.repository_plan, Unset):
32
- repository_plan = self.repository_plan.value
33
-
34
- field_dict: dict[str, Any] = {}
35
- field_dict.update(self.additional_properties)
36
- field_dict.update(
37
- {
38
- "repository_type": repository_type,
39
- }
40
- )
41
- if repository_plan is not UNSET:
42
- field_dict["repository_plan"] = repository_plan
43
-
44
- return field_dict
45
-
46
- @classmethod
47
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
48
- d = dict(src_dict)
49
- repository_type = RepositoryType(d.pop("repository_type"))
50
-
51
- _repository_plan = d.pop("repository_plan", UNSET)
52
- repository_plan: Union[Unset, RepositoryPlan]
53
- if isinstance(_repository_plan, Unset):
54
- repository_plan = UNSET
55
- else:
56
- repository_plan = RepositoryPlan(_repository_plan)
57
-
58
- subscription_request = cls(
59
- repository_type=repository_type,
60
- repository_plan=repository_plan,
61
- )
62
-
63
- subscription_request.additional_properties = d
64
- return subscription_request
65
-
66
- @property
67
- def additional_keys(self) -> list[str]:
68
- return list(self.additional_properties.keys())
69
-
70
- def __getitem__(self, key: str) -> Any:
71
- return self.additional_properties[key]
72
-
73
- def __setitem__(self, key: str, value: Any) -> None:
74
- self.additional_properties[key] = value
75
-
76
- def __delitem__(self, key: str) -> None:
77
- del self.additional_properties[key]
78
-
79
- def __contains__(self, key: str) -> bool:
80
- return key in self.additional_properties