robosystems-client 0.1.9__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/__init__.py +14 -0
- robosystems_client/api/__init__.py +1 -0
- robosystems_client/api/agent/__init__.py +1 -0
- robosystems_client/api/agent/query_financial_agent.py +423 -0
- robosystems_client/api/auth/__init__.py +1 -0
- robosystems_client/api/auth/check_password_strength.py +172 -0
- robosystems_client/api/auth/complete_sso_auth.py +177 -0
- robosystems_client/api/auth/generate_sso_token.py +174 -0
- robosystems_client/api/auth/get_captcha_config.py +87 -0
- robosystems_client/api/auth/get_current_auth_user.py +220 -0
- robosystems_client/api/auth/get_password_policy.py +134 -0
- robosystems_client/api/auth/login_user.py +181 -0
- robosystems_client/api/auth/logout_user.py +169 -0
- robosystems_client/api/auth/refresh_session.py +174 -0
- robosystems_client/api/auth/register_user.py +189 -0
- robosystems_client/api/auth/sso_login.py +177 -0
- robosystems_client/api/auth/sso_token_exchange.py +181 -0
- robosystems_client/api/backup/__init__.py +1 -0
- robosystems_client/api/backup/create_backup.py +401 -0
- robosystems_client/api/backup/export_backup.py +225 -0
- robosystems_client/api/backup/get_backup_download_url.py +258 -0
- robosystems_client/api/backup/get_backup_stats.py +182 -0
- robosystems_client/api/backup/kuzu_backup_health.py +202 -0
- robosystems_client/api/backup/list_backups.py +217 -0
- robosystems_client/api/backup/restore_backup.py +401 -0
- robosystems_client/api/billing/__init__.py +1 -0
- robosystems_client/api/billing/get_available_subscription_plans_v1_graph_id_billing_available_plans_get.py +198 -0
- robosystems_client/api/billing/get_credit_billing_info_v1_graph_id_billing_credits_get.py +210 -0
- robosystems_client/api/billing/get_current_graph_bill.py +285 -0
- robosystems_client/api/billing/get_graph_billing_history.py +329 -0
- robosystems_client/api/billing/get_graph_monthly_bill.py +315 -0
- robosystems_client/api/billing/get_graph_pricing_info_v1_graph_id_billing_pricing_get.py +198 -0
- robosystems_client/api/billing/get_graph_subscription_v1_graph_id_billing_subscription_get.py +198 -0
- robosystems_client/api/billing/get_graph_usage_details.py +350 -0
- robosystems_client/api/billing/upgrade_graph_subscription_v1_graph_id_billing_subscription_upgrade_post.py +216 -0
- robosystems_client/api/connections/__init__.py +1 -0
- robosystems_client/api/connections/create_connection.py +327 -0
- robosystems_client/api/connections/create_link_token.py +281 -0
- robosystems_client/api/connections/delete_connection.py +278 -0
- robosystems_client/api/connections/exchange_link_token.py +301 -0
- robosystems_client/api/connections/get_connection.py +262 -0
- robosystems_client/api/connections/get_connection_options.py +285 -0
- robosystems_client/api/connections/init_o_auth.py +230 -0
- robosystems_client/api/connections/list_connections.py +314 -0
- robosystems_client/api/connections/oauth_callback.py +318 -0
- robosystems_client/api/connections/sync_connection.py +362 -0
- robosystems_client/api/create/__init__.py +1 -0
- robosystems_client/api/create/create_graph.py +375 -0
- robosystems_client/api/create/get_available_extensions.py +134 -0
- robosystems_client/api/credits_/__init__.py +1 -0
- robosystems_client/api/credits_/check_credit_balance.py +299 -0
- robosystems_client/api/credits_/check_storage_limits.py +249 -0
- robosystems_client/api/credits_/get_credit_summary.py +245 -0
- robosystems_client/api/credits_/get_storage_usage.py +279 -0
- robosystems_client/api/credits_/list_credit_transactions.py +392 -0
- robosystems_client/api/graph_analytics/__init__.py +1 -0
- robosystems_client/api/graph_analytics/get_graph_metrics.py +285 -0
- robosystems_client/api/graph_analytics/get_graph_usage_stats.py +329 -0
- robosystems_client/api/graph_status/__init__.py +1 -0
- robosystems_client/api/graph_status/get_database_health.py +273 -0
- robosystems_client/api/graph_status/get_database_info.py +277 -0
- robosystems_client/api/mcp/__init__.py +1 -0
- robosystems_client/api/mcp/call_mcp_tool.py +432 -0
- robosystems_client/api/mcp/list_mcp_tools.py +265 -0
- robosystems_client/api/operations/__init__.py +1 -0
- robosystems_client/api/operations/cancel_operation.py +246 -0
- robosystems_client/api/operations/get_operation_status.py +273 -0
- robosystems_client/api/operations/stream_operation_events.py +415 -0
- robosystems_client/api/query/__init__.py +1 -0
- robosystems_client/api/query/execute_cypher_query.py +482 -0
- robosystems_client/api/schema/__init__.py +1 -0
- robosystems_client/api/schema/export_graph_schema.py +239 -0
- robosystems_client/api/schema/get_graph_schema_info.py +277 -0
- robosystems_client/api/schema/list_schema_extensions.py +216 -0
- robosystems_client/api/schema/validate_schema.py +326 -0
- robosystems_client/api/service_offerings/__init__.py +1 -0
- robosystems_client/api/service_offerings/get_service_offerings.py +197 -0
- robosystems_client/api/status/__init__.py +1 -0
- robosystems_client/api/status/get_mcp_health.py +136 -0
- robosystems_client/api/status/get_service_status.py +134 -0
- robosystems_client/api/user/__init__.py +1 -0
- robosystems_client/api/user/create_user_api_key.py +205 -0
- robosystems_client/api/user/get_all_credit_summaries.py +256 -0
- robosystems_client/api/user/get_current_user.py +187 -0
- robosystems_client/api/user/get_user_graphs.py +187 -0
- robosystems_client/api/user/list_user_api_keys.py +187 -0
- robosystems_client/api/user/revoke_user_api_key.py +209 -0
- robosystems_client/api/user/select_user_graph.py +213 -0
- robosystems_client/api/user/update_user.py +205 -0
- robosystems_client/api/user/update_user_api_key.py +218 -0
- robosystems_client/api/user/update_user_password.py +218 -0
- robosystems_client/api/user_analytics/__init__.py +1 -0
- robosystems_client/api/user_analytics/get_detailed_user_analytics.py +222 -0
- robosystems_client/api/user_analytics/get_user_usage_overview.py +187 -0
- robosystems_client/api/user_limits/__init__.py +1 -0
- robosystems_client/api/user_limits/get_user_limits.py +190 -0
- robosystems_client/api/user_limits/get_user_usage.py +187 -0
- robosystems_client/api/user_subscriptions/__init__.py +1 -0
- robosystems_client/api/user_subscriptions/cancel_shared_repository_subscription.py +209 -0
- robosystems_client/api/user_subscriptions/get_repository_credits.py +206 -0
- robosystems_client/api/user_subscriptions/get_shared_repository_credits.py +193 -0
- robosystems_client/api/user_subscriptions/get_user_shared_subscriptions.py +213 -0
- robosystems_client/api/user_subscriptions/subscribe_to_shared_repository.py +214 -0
- robosystems_client/api/user_subscriptions/upgrade_shared_repository_subscription.py +228 -0
- robosystems_client/client.py +278 -0
- robosystems_client/errors.py +16 -0
- robosystems_client/extensions/README.md +611 -0
- robosystems_client/extensions/__init__.py +108 -0
- robosystems_client/extensions/auth_integration.py +210 -0
- robosystems_client/extensions/extensions.py +170 -0
- robosystems_client/extensions/operation_client.py +368 -0
- robosystems_client/extensions/query_client.py +375 -0
- robosystems_client/extensions/sse_client.py +520 -0
- robosystems_client/extensions/tests/__init__.py +1 -0
- robosystems_client/extensions/tests/test_integration.py +490 -0
- robosystems_client/extensions/tests/test_unit.py +560 -0
- robosystems_client/extensions/utils.py +526 -0
- robosystems_client/models/__init__.py +379 -0
- robosystems_client/models/account_info.py +79 -0
- robosystems_client/models/add_on_credit_info.py +119 -0
- robosystems_client/models/agent_message.py +68 -0
- robosystems_client/models/agent_request.py +132 -0
- robosystems_client/models/agent_request_context_type_0.py +44 -0
- robosystems_client/models/agent_response.py +132 -0
- robosystems_client/models/agent_response_metadata_type_0.py +44 -0
- robosystems_client/models/api_key_info.py +134 -0
- robosystems_client/models/api_keys_response.py +74 -0
- robosystems_client/models/auth_response.py +82 -0
- robosystems_client/models/auth_response_user.py +44 -0
- robosystems_client/models/available_extension.py +78 -0
- robosystems_client/models/available_extensions_response.py +73 -0
- robosystems_client/models/backup_create_request.py +117 -0
- robosystems_client/models/backup_export_request.py +72 -0
- robosystems_client/models/backup_list_response.py +90 -0
- robosystems_client/models/backup_response.py +200 -0
- robosystems_client/models/backup_restore_request.py +81 -0
- robosystems_client/models/backup_stats_response.py +156 -0
- robosystems_client/models/backup_stats_response_backup_formats.py +44 -0
- robosystems_client/models/cancel_operation_response_canceloperation.py +44 -0
- robosystems_client/models/cancellation_response.py +76 -0
- robosystems_client/models/check_credit_balance_response_checkcreditbalance.py +44 -0
- robosystems_client/models/connection_options_response.py +82 -0
- robosystems_client/models/connection_provider_info.py +203 -0
- robosystems_client/models/connection_provider_info_auth_type.py +11 -0
- robosystems_client/models/connection_provider_info_provider.py +10 -0
- robosystems_client/models/connection_response.py +149 -0
- robosystems_client/models/connection_response_metadata.py +44 -0
- robosystems_client/models/connection_response_provider.py +10 -0
- robosystems_client/models/create_api_key_request.py +82 -0
- robosystems_client/models/create_api_key_response.py +74 -0
- robosystems_client/models/create_connection_request.py +179 -0
- robosystems_client/models/create_connection_request_provider.py +10 -0
- robosystems_client/models/create_graph_request.py +183 -0
- robosystems_client/models/credit_check_request.py +82 -0
- robosystems_client/models/credit_summary.py +128 -0
- robosystems_client/models/credit_summary_response.py +140 -0
- robosystems_client/models/credits_summary_response.py +122 -0
- robosystems_client/models/credits_summary_response_credits_by_addon_item.py +44 -0
- robosystems_client/models/custom_schema_definition.py +194 -0
- robosystems_client/models/custom_schema_definition_metadata.py +49 -0
- robosystems_client/models/custom_schema_definition_nodes_item.py +44 -0
- robosystems_client/models/custom_schema_definition_relationships_item.py +44 -0
- robosystems_client/models/cypher_query_request.py +128 -0
- robosystems_client/models/cypher_query_request_parameters_type_0.py +44 -0
- robosystems_client/models/database_health_response.py +181 -0
- robosystems_client/models/database_info_response.py +191 -0
- robosystems_client/models/detailed_transactions_response.py +124 -0
- robosystems_client/models/detailed_transactions_response_date_range.py +44 -0
- robosystems_client/models/detailed_transactions_response_summary.py +59 -0
- robosystems_client/models/enhanced_credit_transaction_response.py +192 -0
- robosystems_client/models/enhanced_credit_transaction_response_metadata.py +44 -0
- robosystems_client/models/error_response.py +145 -0
- robosystems_client/models/exchange_token_request.py +116 -0
- robosystems_client/models/exchange_token_request_metadata_type_0.py +44 -0
- robosystems_client/models/get_all_credit_summaries_response_getallcreditsummaries.py +44 -0
- robosystems_client/models/get_backup_download_url_response_getbackupdownloadurl.py +44 -0
- robosystems_client/models/get_current_auth_user_response_getcurrentauthuser.py +44 -0
- robosystems_client/models/get_current_graph_bill_response_getcurrentgraphbill.py +44 -0
- robosystems_client/models/get_graph_billing_history_response_getgraphbillinghistory.py +44 -0
- robosystems_client/models/get_graph_monthly_bill_response_getgraphmonthlybill.py +44 -0
- robosystems_client/models/get_graph_schema_info_response_getgraphschemainfo.py +44 -0
- robosystems_client/models/get_graph_usage_details_response_getgraphusagedetails.py +44 -0
- robosystems_client/models/get_mcp_health_response_getmcphealth.py +44 -0
- robosystems_client/models/get_operation_status_response_getoperationstatus.py +44 -0
- robosystems_client/models/get_storage_usage_response_getstorageusage.py +44 -0
- robosystems_client/models/graph_info.py +92 -0
- robosystems_client/models/graph_metadata.py +105 -0
- robosystems_client/models/graph_metrics_response.py +188 -0
- robosystems_client/models/graph_metrics_response_estimated_size.py +44 -0
- robosystems_client/models/graph_metrics_response_health_status.py +44 -0
- robosystems_client/models/graph_metrics_response_node_counts.py +44 -0
- robosystems_client/models/graph_metrics_response_relationship_counts.py +44 -0
- robosystems_client/models/graph_usage_response.py +116 -0
- robosystems_client/models/graph_usage_response_query_statistics.py +44 -0
- robosystems_client/models/graph_usage_response_recent_activity.py +44 -0
- robosystems_client/models/graph_usage_response_storage_usage.py +44 -0
- robosystems_client/models/health_status.py +110 -0
- robosystems_client/models/health_status_details_type_0.py +44 -0
- robosystems_client/models/http_validation_error.py +75 -0
- robosystems_client/models/initial_entity_data.py +212 -0
- robosystems_client/models/kuzu_backup_health_response_kuzubackuphealth.py +44 -0
- robosystems_client/models/link_token_request.py +174 -0
- robosystems_client/models/link_token_request_options_type_0.py +44 -0
- robosystems_client/models/link_token_request_provider_type_0.py +10 -0
- robosystems_client/models/list_connections_provider_type_0.py +10 -0
- robosystems_client/models/list_schema_extensions_response_listschemaextensions.py +44 -0
- robosystems_client/models/login_request.py +68 -0
- robosystems_client/models/logout_user_response_logoutuser.py +44 -0
- robosystems_client/models/mcp_tool_call.py +84 -0
- robosystems_client/models/mcp_tool_call_arguments.py +44 -0
- robosystems_client/models/mcp_tools_response.py +74 -0
- robosystems_client/models/mcp_tools_response_tools_item.py +44 -0
- robosystems_client/models/o_auth_callback_request.py +130 -0
- robosystems_client/models/o_auth_init_request.py +128 -0
- robosystems_client/models/o_auth_init_request_additional_params_type_0.py +44 -0
- robosystems_client/models/o_auth_init_response.py +78 -0
- robosystems_client/models/password_check_request.py +82 -0
- robosystems_client/models/password_check_response.py +112 -0
- robosystems_client/models/password_check_response_character_types.py +44 -0
- robosystems_client/models/password_policy_response.py +66 -0
- robosystems_client/models/password_policy_response_policy.py +44 -0
- robosystems_client/models/plaid_connection_config.py +209 -0
- robosystems_client/models/plaid_connection_config_accounts_type_0_item.py +44 -0
- robosystems_client/models/plaid_connection_config_institution_type_0.py +44 -0
- robosystems_client/models/quick_books_connection_config.py +92 -0
- robosystems_client/models/register_request.py +98 -0
- robosystems_client/models/repository_credits_response.py +101 -0
- robosystems_client/models/repository_plan.py +10 -0
- robosystems_client/models/repository_type.py +10 -0
- robosystems_client/models/response_mode.py +11 -0
- robosystems_client/models/schema_export_response.py +163 -0
- robosystems_client/models/schema_export_response_data_stats_type_0.py +44 -0
- robosystems_client/models/schema_export_response_schema_definition_type_0.py +44 -0
- robosystems_client/models/schema_validation_request.py +142 -0
- robosystems_client/models/schema_validation_request_schema_definition_type_0.py +44 -0
- robosystems_client/models/schema_validation_response.py +227 -0
- robosystems_client/models/schema_validation_response_compatibility_type_0.py +44 -0
- robosystems_client/models/schema_validation_response_stats_type_0.py +44 -0
- robosystems_client/models/sec_connection_config.py +82 -0
- robosystems_client/models/sso_complete_request.py +60 -0
- robosystems_client/models/sso_exchange_request.py +90 -0
- robosystems_client/models/sso_exchange_response.py +78 -0
- robosystems_client/models/sso_login_request.py +60 -0
- robosystems_client/models/sso_token_response.py +78 -0
- robosystems_client/models/storage_limit_response.py +149 -0
- robosystems_client/models/subscription_info.py +180 -0
- robosystems_client/models/subscription_info_metadata.py +44 -0
- robosystems_client/models/subscription_request.py +89 -0
- robosystems_client/models/subscription_response.py +82 -0
- robosystems_client/models/success_response.py +112 -0
- robosystems_client/models/success_response_data_type_0.py +44 -0
- robosystems_client/models/sync_connection_request.py +106 -0
- robosystems_client/models/sync_connection_request_sync_options_type_0.py +44 -0
- robosystems_client/models/sync_connection_response_syncconnection.py +44 -0
- robosystems_client/models/tier_upgrade_request.py +62 -0
- robosystems_client/models/transaction_summary_response.py +126 -0
- robosystems_client/models/update_api_key_request.py +92 -0
- robosystems_client/models/update_password_request.py +76 -0
- robosystems_client/models/update_user_request.py +92 -0
- robosystems_client/models/upgrade_subscription_request.py +82 -0
- robosystems_client/models/user_analytics_response.py +132 -0
- robosystems_client/models/user_analytics_response_api_usage.py +44 -0
- robosystems_client/models/user_analytics_response_graph_usage.py +44 -0
- robosystems_client/models/user_analytics_response_limits.py +44 -0
- robosystems_client/models/user_analytics_response_recent_activity_item.py +44 -0
- robosystems_client/models/user_analytics_response_user_info.py +44 -0
- robosystems_client/models/user_graph_summary.py +134 -0
- robosystems_client/models/user_graphs_response.py +96 -0
- robosystems_client/models/user_limits_response.py +95 -0
- robosystems_client/models/user_response.py +132 -0
- robosystems_client/models/user_subscriptions_response.py +90 -0
- robosystems_client/models/user_usage_response.py +90 -0
- robosystems_client/models/user_usage_response_graphs.py +44 -0
- robosystems_client/models/user_usage_summary_response.py +130 -0
- robosystems_client/models/user_usage_summary_response_usage_vs_limits.py +44 -0
- robosystems_client/models/validation_error.py +88 -0
- robosystems_client/py.typed +1 -0
- robosystems_client/sdk-config.yaml +5 -0
- robosystems_client/types.py +54 -0
- robosystems_client-0.1.9.dist-info/METADATA +302 -0
- robosystems_client-0.1.9.dist-info/RECORD +282 -0
- robosystems_client-0.1.9.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,180 @@
|
|
|
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
|
+
is_trial (bool): Whether this is a trial subscription
|
|
27
|
+
activated_at (str): Activation date (ISO format)
|
|
28
|
+
monthly_price_cents (int): Monthly price in cents
|
|
29
|
+
features (list[str]): List of features
|
|
30
|
+
metadata (SubscriptionInfoMetadata): Additional metadata
|
|
31
|
+
trial_ends_at (Union[None, Unset, str]): Trial expiration date (ISO format)
|
|
32
|
+
expires_at (Union[None, Unset, str]): Expiration date (ISO format)
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
id: str
|
|
36
|
+
user_id: str
|
|
37
|
+
addon_type: str
|
|
38
|
+
addon_tier: str
|
|
39
|
+
is_active: bool
|
|
40
|
+
is_trial: bool
|
|
41
|
+
activated_at: str
|
|
42
|
+
monthly_price_cents: int
|
|
43
|
+
features: list[str]
|
|
44
|
+
metadata: "SubscriptionInfoMetadata"
|
|
45
|
+
trial_ends_at: Union[None, Unset, str] = UNSET
|
|
46
|
+
expires_at: Union[None, Unset, str] = UNSET
|
|
47
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
48
|
+
|
|
49
|
+
def to_dict(self) -> dict[str, Any]:
|
|
50
|
+
id = self.id
|
|
51
|
+
|
|
52
|
+
user_id = self.user_id
|
|
53
|
+
|
|
54
|
+
addon_type = self.addon_type
|
|
55
|
+
|
|
56
|
+
addon_tier = self.addon_tier
|
|
57
|
+
|
|
58
|
+
is_active = self.is_active
|
|
59
|
+
|
|
60
|
+
is_trial = self.is_trial
|
|
61
|
+
|
|
62
|
+
activated_at = self.activated_at
|
|
63
|
+
|
|
64
|
+
monthly_price_cents = self.monthly_price_cents
|
|
65
|
+
|
|
66
|
+
features = self.features
|
|
67
|
+
|
|
68
|
+
metadata = self.metadata.to_dict()
|
|
69
|
+
|
|
70
|
+
trial_ends_at: Union[None, Unset, str]
|
|
71
|
+
if isinstance(self.trial_ends_at, Unset):
|
|
72
|
+
trial_ends_at = UNSET
|
|
73
|
+
else:
|
|
74
|
+
trial_ends_at = self.trial_ends_at
|
|
75
|
+
|
|
76
|
+
expires_at: Union[None, Unset, str]
|
|
77
|
+
if isinstance(self.expires_at, Unset):
|
|
78
|
+
expires_at = UNSET
|
|
79
|
+
else:
|
|
80
|
+
expires_at = self.expires_at
|
|
81
|
+
|
|
82
|
+
field_dict: dict[str, Any] = {}
|
|
83
|
+
field_dict.update(self.additional_properties)
|
|
84
|
+
field_dict.update(
|
|
85
|
+
{
|
|
86
|
+
"id": id,
|
|
87
|
+
"user_id": user_id,
|
|
88
|
+
"addon_type": addon_type,
|
|
89
|
+
"addon_tier": addon_tier,
|
|
90
|
+
"is_active": is_active,
|
|
91
|
+
"is_trial": is_trial,
|
|
92
|
+
"activated_at": activated_at,
|
|
93
|
+
"monthly_price_cents": monthly_price_cents,
|
|
94
|
+
"features": features,
|
|
95
|
+
"metadata": metadata,
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
if trial_ends_at is not UNSET:
|
|
99
|
+
field_dict["trial_ends_at"] = trial_ends_at
|
|
100
|
+
if expires_at is not UNSET:
|
|
101
|
+
field_dict["expires_at"] = expires_at
|
|
102
|
+
|
|
103
|
+
return field_dict
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
107
|
+
from ..models.subscription_info_metadata import SubscriptionInfoMetadata
|
|
108
|
+
|
|
109
|
+
d = dict(src_dict)
|
|
110
|
+
id = d.pop("id")
|
|
111
|
+
|
|
112
|
+
user_id = d.pop("user_id")
|
|
113
|
+
|
|
114
|
+
addon_type = d.pop("addon_type")
|
|
115
|
+
|
|
116
|
+
addon_tier = d.pop("addon_tier")
|
|
117
|
+
|
|
118
|
+
is_active = d.pop("is_active")
|
|
119
|
+
|
|
120
|
+
is_trial = d.pop("is_trial")
|
|
121
|
+
|
|
122
|
+
activated_at = d.pop("activated_at")
|
|
123
|
+
|
|
124
|
+
monthly_price_cents = d.pop("monthly_price_cents")
|
|
125
|
+
|
|
126
|
+
features = cast(list[str], d.pop("features"))
|
|
127
|
+
|
|
128
|
+
metadata = SubscriptionInfoMetadata.from_dict(d.pop("metadata"))
|
|
129
|
+
|
|
130
|
+
def _parse_trial_ends_at(data: object) -> Union[None, Unset, str]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
return cast(Union[None, Unset, str], data)
|
|
136
|
+
|
|
137
|
+
trial_ends_at = _parse_trial_ends_at(d.pop("trial_ends_at", UNSET))
|
|
138
|
+
|
|
139
|
+
def _parse_expires_at(data: object) -> Union[None, Unset, str]:
|
|
140
|
+
if data is None:
|
|
141
|
+
return data
|
|
142
|
+
if isinstance(data, Unset):
|
|
143
|
+
return data
|
|
144
|
+
return cast(Union[None, Unset, str], data)
|
|
145
|
+
|
|
146
|
+
expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
|
|
147
|
+
|
|
148
|
+
subscription_info = cls(
|
|
149
|
+
id=id,
|
|
150
|
+
user_id=user_id,
|
|
151
|
+
addon_type=addon_type,
|
|
152
|
+
addon_tier=addon_tier,
|
|
153
|
+
is_active=is_active,
|
|
154
|
+
is_trial=is_trial,
|
|
155
|
+
activated_at=activated_at,
|
|
156
|
+
monthly_price_cents=monthly_price_cents,
|
|
157
|
+
features=features,
|
|
158
|
+
metadata=metadata,
|
|
159
|
+
trial_ends_at=trial_ends_at,
|
|
160
|
+
expires_at=expires_at,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
subscription_info.additional_properties = d
|
|
164
|
+
return subscription_info
|
|
165
|
+
|
|
166
|
+
@property
|
|
167
|
+
def additional_keys(self) -> list[str]:
|
|
168
|
+
return list(self.additional_properties.keys())
|
|
169
|
+
|
|
170
|
+
def __getitem__(self, key: str) -> Any:
|
|
171
|
+
return self.additional_properties[key]
|
|
172
|
+
|
|
173
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
174
|
+
self.additional_properties[key] = value
|
|
175
|
+
|
|
176
|
+
def __delitem__(self, key: str) -> None:
|
|
177
|
+
del self.additional_properties[key]
|
|
178
|
+
|
|
179
|
+
def __contains__(self, key: str) -> bool:
|
|
180
|
+
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="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
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
is_trial (Union[Unset, bool]): Start with trial period Default: False.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
repository_type: RepositoryType
|
|
25
|
+
repository_plan: Union[Unset, RepositoryPlan] = UNSET
|
|
26
|
+
is_trial: Union[Unset, bool] = False
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
repository_type = self.repository_type.value
|
|
31
|
+
|
|
32
|
+
repository_plan: Union[Unset, str] = UNSET
|
|
33
|
+
if not isinstance(self.repository_plan, Unset):
|
|
34
|
+
repository_plan = self.repository_plan.value
|
|
35
|
+
|
|
36
|
+
is_trial = self.is_trial
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"repository_type": repository_type,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
if repository_plan is not UNSET:
|
|
46
|
+
field_dict["repository_plan"] = repository_plan
|
|
47
|
+
if is_trial is not UNSET:
|
|
48
|
+
field_dict["is_trial"] = is_trial
|
|
49
|
+
|
|
50
|
+
return field_dict
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
repository_type = RepositoryType(d.pop("repository_type"))
|
|
56
|
+
|
|
57
|
+
_repository_plan = d.pop("repository_plan", UNSET)
|
|
58
|
+
repository_plan: Union[Unset, RepositoryPlan]
|
|
59
|
+
if isinstance(_repository_plan, Unset):
|
|
60
|
+
repository_plan = UNSET
|
|
61
|
+
else:
|
|
62
|
+
repository_plan = RepositoryPlan(_repository_plan)
|
|
63
|
+
|
|
64
|
+
is_trial = d.pop("is_trial", UNSET)
|
|
65
|
+
|
|
66
|
+
subscription_request = cls(
|
|
67
|
+
repository_type=repository_type,
|
|
68
|
+
repository_plan=repository_plan,
|
|
69
|
+
is_trial=is_trial,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
subscription_request.additional_properties = d
|
|
73
|
+
return subscription_request
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def additional_keys(self) -> list[str]:
|
|
77
|
+
return list(self.additional_properties.keys())
|
|
78
|
+
|
|
79
|
+
def __getitem__(self, key: str) -> Any:
|
|
80
|
+
return self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
83
|
+
self.additional_properties[key] = value
|
|
84
|
+
|
|
85
|
+
def __delitem__(self, key: str) -> None:
|
|
86
|
+
del self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __contains__(self, key: str) -> bool:
|
|
89
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
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.subscription_info import SubscriptionInfo
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="SubscriptionResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class SubscriptionResponse:
|
|
16
|
+
"""Response for subscription creation.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
message (str): Success message
|
|
20
|
+
subscription (SubscriptionInfo): User subscription information.
|
|
21
|
+
trial_period (int): Trial period in days
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
message: str
|
|
25
|
+
subscription: "SubscriptionInfo"
|
|
26
|
+
trial_period: int
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
message = self.message
|
|
31
|
+
|
|
32
|
+
subscription = self.subscription.to_dict()
|
|
33
|
+
|
|
34
|
+
trial_period = self.trial_period
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"message": message,
|
|
41
|
+
"subscription": subscription,
|
|
42
|
+
"trial_period": trial_period,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
from ..models.subscription_info import SubscriptionInfo
|
|
51
|
+
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
message = d.pop("message")
|
|
54
|
+
|
|
55
|
+
subscription = SubscriptionInfo.from_dict(d.pop("subscription"))
|
|
56
|
+
|
|
57
|
+
trial_period = d.pop("trial_period")
|
|
58
|
+
|
|
59
|
+
subscription_response = cls(
|
|
60
|
+
message=message,
|
|
61
|
+
subscription=subscription,
|
|
62
|
+
trial_period=trial_period,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
subscription_response.additional_properties = d
|
|
66
|
+
return subscription_response
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> list[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,112 @@
|
|
|
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.success_response_data_type_0 import SuccessResponseDataType0
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="SuccessResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class SuccessResponse:
|
|
18
|
+
"""Standard success response for operations without specific return data.
|
|
19
|
+
|
|
20
|
+
Example:
|
|
21
|
+
{'data': {'deleted_count': 1}, 'message': 'Resource deleted successfully', 'success': True}
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
message (str): Human-readable success message Example: Operation completed successfully.
|
|
25
|
+
success (Union[Unset, bool]): Indicates the operation completed successfully Default: True.
|
|
26
|
+
data (Union['SuccessResponseDataType0', None, Unset]): Optional additional data related to the operation
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
message: str
|
|
30
|
+
success: Union[Unset, bool] = True
|
|
31
|
+
data: Union["SuccessResponseDataType0", None, Unset] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
from ..models.success_response_data_type_0 import SuccessResponseDataType0
|
|
36
|
+
|
|
37
|
+
message = self.message
|
|
38
|
+
|
|
39
|
+
success = self.success
|
|
40
|
+
|
|
41
|
+
data: Union[None, Unset, dict[str, Any]]
|
|
42
|
+
if isinstance(self.data, Unset):
|
|
43
|
+
data = UNSET
|
|
44
|
+
elif isinstance(self.data, SuccessResponseDataType0):
|
|
45
|
+
data = self.data.to_dict()
|
|
46
|
+
else:
|
|
47
|
+
data = self.data
|
|
48
|
+
|
|
49
|
+
field_dict: dict[str, Any] = {}
|
|
50
|
+
field_dict.update(self.additional_properties)
|
|
51
|
+
field_dict.update(
|
|
52
|
+
{
|
|
53
|
+
"message": message,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
if success is not UNSET:
|
|
57
|
+
field_dict["success"] = success
|
|
58
|
+
if data is not UNSET:
|
|
59
|
+
field_dict["data"] = data
|
|
60
|
+
|
|
61
|
+
return field_dict
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
65
|
+
from ..models.success_response_data_type_0 import SuccessResponseDataType0
|
|
66
|
+
|
|
67
|
+
d = dict(src_dict)
|
|
68
|
+
message = d.pop("message")
|
|
69
|
+
|
|
70
|
+
success = d.pop("success", UNSET)
|
|
71
|
+
|
|
72
|
+
def _parse_data(data: object) -> Union["SuccessResponseDataType0", None, Unset]:
|
|
73
|
+
if data is None:
|
|
74
|
+
return data
|
|
75
|
+
if isinstance(data, Unset):
|
|
76
|
+
return data
|
|
77
|
+
try:
|
|
78
|
+
if not isinstance(data, dict):
|
|
79
|
+
raise TypeError()
|
|
80
|
+
data_type_0 = SuccessResponseDataType0.from_dict(data)
|
|
81
|
+
|
|
82
|
+
return data_type_0
|
|
83
|
+
except: # noqa: E722
|
|
84
|
+
pass
|
|
85
|
+
return cast(Union["SuccessResponseDataType0", None, Unset], data)
|
|
86
|
+
|
|
87
|
+
data = _parse_data(d.pop("data", UNSET))
|
|
88
|
+
|
|
89
|
+
success_response = cls(
|
|
90
|
+
message=message,
|
|
91
|
+
success=success,
|
|
92
|
+
data=data,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
success_response.additional_properties = d
|
|
96
|
+
return success_response
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def additional_keys(self) -> list[str]:
|
|
100
|
+
return list(self.additional_properties.keys())
|
|
101
|
+
|
|
102
|
+
def __getitem__(self, key: str) -> Any:
|
|
103
|
+
return self.additional_properties[key]
|
|
104
|
+
|
|
105
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
106
|
+
self.additional_properties[key] = value
|
|
107
|
+
|
|
108
|
+
def __delitem__(self, key: str) -> None:
|
|
109
|
+
del self.additional_properties[key]
|
|
110
|
+
|
|
111
|
+
def __contains__(self, key: str) -> bool:
|
|
112
|
+
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="SuccessResponseDataType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class SuccessResponseDataType0:
|
|
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
|
+
success_response_data_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
success_response_data_type_0.additional_properties = d
|
|
28
|
+
return success_response_data_type_0
|
|
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
|
|
@@ -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
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.sync_connection_request_sync_options_type_0 import (
|
|
11
|
+
SyncConnectionRequestSyncOptionsType0,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="SyncConnectionRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class SyncConnectionRequest:
|
|
20
|
+
"""Request to sync a connection.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
full_sync (Union[Unset, bool]): Perform full sync vs incremental Default: False.
|
|
24
|
+
sync_options (Union['SyncConnectionRequestSyncOptionsType0', None, Unset]): Provider-specific sync options
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
full_sync: Union[Unset, bool] = False
|
|
28
|
+
sync_options: Union["SyncConnectionRequestSyncOptionsType0", None, Unset] = UNSET
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
from ..models.sync_connection_request_sync_options_type_0 import (
|
|
33
|
+
SyncConnectionRequestSyncOptionsType0,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
full_sync = self.full_sync
|
|
37
|
+
|
|
38
|
+
sync_options: Union[None, Unset, dict[str, Any]]
|
|
39
|
+
if isinstance(self.sync_options, Unset):
|
|
40
|
+
sync_options = UNSET
|
|
41
|
+
elif isinstance(self.sync_options, SyncConnectionRequestSyncOptionsType0):
|
|
42
|
+
sync_options = self.sync_options.to_dict()
|
|
43
|
+
else:
|
|
44
|
+
sync_options = self.sync_options
|
|
45
|
+
|
|
46
|
+
field_dict: dict[str, Any] = {}
|
|
47
|
+
field_dict.update(self.additional_properties)
|
|
48
|
+
field_dict.update({})
|
|
49
|
+
if full_sync is not UNSET:
|
|
50
|
+
field_dict["full_sync"] = full_sync
|
|
51
|
+
if sync_options is not UNSET:
|
|
52
|
+
field_dict["sync_options"] = sync_options
|
|
53
|
+
|
|
54
|
+
return field_dict
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
58
|
+
from ..models.sync_connection_request_sync_options_type_0 import (
|
|
59
|
+
SyncConnectionRequestSyncOptionsType0,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
d = dict(src_dict)
|
|
63
|
+
full_sync = d.pop("full_sync", UNSET)
|
|
64
|
+
|
|
65
|
+
def _parse_sync_options(
|
|
66
|
+
data: object,
|
|
67
|
+
) -> Union["SyncConnectionRequestSyncOptionsType0", None, Unset]:
|
|
68
|
+
if data is None:
|
|
69
|
+
return data
|
|
70
|
+
if isinstance(data, Unset):
|
|
71
|
+
return data
|
|
72
|
+
try:
|
|
73
|
+
if not isinstance(data, dict):
|
|
74
|
+
raise TypeError()
|
|
75
|
+
sync_options_type_0 = SyncConnectionRequestSyncOptionsType0.from_dict(data)
|
|
76
|
+
|
|
77
|
+
return sync_options_type_0
|
|
78
|
+
except: # noqa: E722
|
|
79
|
+
pass
|
|
80
|
+
return cast(Union["SyncConnectionRequestSyncOptionsType0", None, Unset], data)
|
|
81
|
+
|
|
82
|
+
sync_options = _parse_sync_options(d.pop("sync_options", UNSET))
|
|
83
|
+
|
|
84
|
+
sync_connection_request = cls(
|
|
85
|
+
full_sync=full_sync,
|
|
86
|
+
sync_options=sync_options,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
sync_connection_request.additional_properties = d
|
|
90
|
+
return sync_connection_request
|
|
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,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="SyncConnectionRequestSyncOptionsType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class SyncConnectionRequestSyncOptionsType0:
|
|
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
|
+
sync_connection_request_sync_options_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
sync_connection_request_sync_options_type_0.additional_properties = d
|
|
28
|
+
return sync_connection_request_sync_options_type_0
|
|
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
|