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,78 @@
|
|
|
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 ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="AvailableExtension")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class AvailableExtension:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
name (str):
|
|
17
|
+
description (str):
|
|
18
|
+
enabled (Union[Unset, bool]): Default: False.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
name: str
|
|
22
|
+
description: str
|
|
23
|
+
enabled: Union[Unset, bool] = False
|
|
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
|
+
description = self.description
|
|
30
|
+
|
|
31
|
+
enabled = self.enabled
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"name": name,
|
|
38
|
+
"description": description,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
if enabled is not UNSET:
|
|
42
|
+
field_dict["enabled"] = enabled
|
|
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
|
+
name = d.pop("name")
|
|
50
|
+
|
|
51
|
+
description = d.pop("description")
|
|
52
|
+
|
|
53
|
+
enabled = d.pop("enabled", UNSET)
|
|
54
|
+
|
|
55
|
+
available_extension = cls(
|
|
56
|
+
name=name,
|
|
57
|
+
description=description,
|
|
58
|
+
enabled=enabled,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
available_extension.additional_properties = d
|
|
62
|
+
return available_extension
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def additional_keys(self) -> list[str]:
|
|
66
|
+
return list(self.additional_properties.keys())
|
|
67
|
+
|
|
68
|
+
def __getitem__(self, key: str) -> Any:
|
|
69
|
+
return self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
72
|
+
self.additional_properties[key] = value
|
|
73
|
+
|
|
74
|
+
def __delitem__(self, key: str) -> None:
|
|
75
|
+
del self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: str) -> bool:
|
|
78
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,73 @@
|
|
|
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.available_extension import AvailableExtension
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="AvailableExtensionsResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class AvailableExtensionsResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
extensions (list['AvailableExtension']):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
extensions: list["AvailableExtension"]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
extensions = []
|
|
26
|
+
for extensions_item_data in self.extensions:
|
|
27
|
+
extensions_item = extensions_item_data.to_dict()
|
|
28
|
+
extensions.append(extensions_item)
|
|
29
|
+
|
|
30
|
+
field_dict: dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"extensions": extensions,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
from ..models.available_extension import AvailableExtension
|
|
43
|
+
|
|
44
|
+
d = dict(src_dict)
|
|
45
|
+
extensions = []
|
|
46
|
+
_extensions = d.pop("extensions")
|
|
47
|
+
for extensions_item_data in _extensions:
|
|
48
|
+
extensions_item = AvailableExtension.from_dict(extensions_item_data)
|
|
49
|
+
|
|
50
|
+
extensions.append(extensions_item)
|
|
51
|
+
|
|
52
|
+
available_extensions_response = cls(
|
|
53
|
+
extensions=extensions,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
available_extensions_response.additional_properties = d
|
|
57
|
+
return available_extensions_response
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def additional_keys(self) -> list[str]:
|
|
61
|
+
return list(self.additional_properties.keys())
|
|
62
|
+
|
|
63
|
+
def __getitem__(self, key: str) -> Any:
|
|
64
|
+
return self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
67
|
+
self.additional_properties[key] = value
|
|
68
|
+
|
|
69
|
+
def __delitem__(self, key: str) -> None:
|
|
70
|
+
del self.additional_properties[key]
|
|
71
|
+
|
|
72
|
+
def __contains__(self, key: str) -> bool:
|
|
73
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="BackupCreateRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class BackupCreateRequest:
|
|
14
|
+
"""Request model for creating a backup.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
backup_format (Union[Unset, str]): Backup format - only 'full_dump' is supported (complete .kuzu database file)
|
|
18
|
+
Default: 'full_dump'.
|
|
19
|
+
backup_type (Union[Unset, str]): Backup type - only 'full' is supported Default: 'full'.
|
|
20
|
+
retention_days (Union[Unset, int]): Retention period in days Default: 90.
|
|
21
|
+
compression (Union[Unset, bool]): Enable compression (always enabled for optimal storage) Default: True.
|
|
22
|
+
encryption (Union[Unset, bool]): Enable encryption (encrypted backups cannot be downloaded) Default: False.
|
|
23
|
+
schedule (Union[None, Unset, str]): Optional cron schedule for automated backups
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
backup_format: Union[Unset, str] = "full_dump"
|
|
27
|
+
backup_type: Union[Unset, str] = "full"
|
|
28
|
+
retention_days: Union[Unset, int] = 90
|
|
29
|
+
compression: Union[Unset, bool] = True
|
|
30
|
+
encryption: Union[Unset, bool] = False
|
|
31
|
+
schedule: Union[None, Unset, str] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
backup_format = self.backup_format
|
|
36
|
+
|
|
37
|
+
backup_type = self.backup_type
|
|
38
|
+
|
|
39
|
+
retention_days = self.retention_days
|
|
40
|
+
|
|
41
|
+
compression = self.compression
|
|
42
|
+
|
|
43
|
+
encryption = self.encryption
|
|
44
|
+
|
|
45
|
+
schedule: Union[None, Unset, str]
|
|
46
|
+
if isinstance(self.schedule, Unset):
|
|
47
|
+
schedule = UNSET
|
|
48
|
+
else:
|
|
49
|
+
schedule = self.schedule
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update({})
|
|
54
|
+
if backup_format is not UNSET:
|
|
55
|
+
field_dict["backup_format"] = backup_format
|
|
56
|
+
if backup_type is not UNSET:
|
|
57
|
+
field_dict["backup_type"] = backup_type
|
|
58
|
+
if retention_days is not UNSET:
|
|
59
|
+
field_dict["retention_days"] = retention_days
|
|
60
|
+
if compression is not UNSET:
|
|
61
|
+
field_dict["compression"] = compression
|
|
62
|
+
if encryption is not UNSET:
|
|
63
|
+
field_dict["encryption"] = encryption
|
|
64
|
+
if schedule is not UNSET:
|
|
65
|
+
field_dict["schedule"] = schedule
|
|
66
|
+
|
|
67
|
+
return field_dict
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
backup_format = d.pop("backup_format", UNSET)
|
|
73
|
+
|
|
74
|
+
backup_type = d.pop("backup_type", UNSET)
|
|
75
|
+
|
|
76
|
+
retention_days = d.pop("retention_days", UNSET)
|
|
77
|
+
|
|
78
|
+
compression = d.pop("compression", UNSET)
|
|
79
|
+
|
|
80
|
+
encryption = d.pop("encryption", UNSET)
|
|
81
|
+
|
|
82
|
+
def _parse_schedule(data: object) -> Union[None, Unset, str]:
|
|
83
|
+
if data is None:
|
|
84
|
+
return data
|
|
85
|
+
if isinstance(data, Unset):
|
|
86
|
+
return data
|
|
87
|
+
return cast(Union[None, Unset, str], data)
|
|
88
|
+
|
|
89
|
+
schedule = _parse_schedule(d.pop("schedule", UNSET))
|
|
90
|
+
|
|
91
|
+
backup_create_request = cls(
|
|
92
|
+
backup_format=backup_format,
|
|
93
|
+
backup_type=backup_type,
|
|
94
|
+
retention_days=retention_days,
|
|
95
|
+
compression=compression,
|
|
96
|
+
encryption=encryption,
|
|
97
|
+
schedule=schedule,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
backup_create_request.additional_properties = d
|
|
101
|
+
return backup_create_request
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def additional_keys(self) -> list[str]:
|
|
105
|
+
return list(self.additional_properties.keys())
|
|
106
|
+
|
|
107
|
+
def __getitem__(self, key: str) -> Any:
|
|
108
|
+
return self.additional_properties[key]
|
|
109
|
+
|
|
110
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
111
|
+
self.additional_properties[key] = value
|
|
112
|
+
|
|
113
|
+
def __delitem__(self, key: str) -> None:
|
|
114
|
+
del self.additional_properties[key]
|
|
115
|
+
|
|
116
|
+
def __contains__(self, key: str) -> bool:
|
|
117
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,72 @@
|
|
|
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 ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="BackupExportRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class BackupExportRequest:
|
|
14
|
+
"""Request model for exporting a backup.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
backup_id (str): ID of backup to export
|
|
18
|
+
export_format (Union[Unset, str]): Export format - only 'original' is supported (compressed .kuzu file) Default:
|
|
19
|
+
'original'.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
backup_id: str
|
|
23
|
+
export_format: Union[Unset, str] = "original"
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
backup_id = self.backup_id
|
|
28
|
+
|
|
29
|
+
export_format = self.export_format
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update(
|
|
34
|
+
{
|
|
35
|
+
"backup_id": backup_id,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
if export_format is not UNSET:
|
|
39
|
+
field_dict["export_format"] = export_format
|
|
40
|
+
|
|
41
|
+
return field_dict
|
|
42
|
+
|
|
43
|
+
@classmethod
|
|
44
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
45
|
+
d = dict(src_dict)
|
|
46
|
+
backup_id = d.pop("backup_id")
|
|
47
|
+
|
|
48
|
+
export_format = d.pop("export_format", UNSET)
|
|
49
|
+
|
|
50
|
+
backup_export_request = cls(
|
|
51
|
+
backup_id=backup_id,
|
|
52
|
+
export_format=export_format,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
backup_export_request.additional_properties = d
|
|
56
|
+
return backup_export_request
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def additional_keys(self) -> list[str]:
|
|
60
|
+
return list(self.additional_properties.keys())
|
|
61
|
+
|
|
62
|
+
def __getitem__(self, key: str) -> Any:
|
|
63
|
+
return self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
66
|
+
self.additional_properties[key] = value
|
|
67
|
+
|
|
68
|
+
def __delitem__(self, key: str) -> None:
|
|
69
|
+
del self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __contains__(self, key: str) -> bool:
|
|
72
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
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.backup_response import BackupResponse
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BackupListResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BackupListResponse:
|
|
16
|
+
"""Response model for backup list.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
backups (list['BackupResponse']):
|
|
20
|
+
total_count (int):
|
|
21
|
+
graph_id (str):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
backups: list["BackupResponse"]
|
|
25
|
+
total_count: int
|
|
26
|
+
graph_id: str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
backups = []
|
|
31
|
+
for backups_item_data in self.backups:
|
|
32
|
+
backups_item = backups_item_data.to_dict()
|
|
33
|
+
backups.append(backups_item)
|
|
34
|
+
|
|
35
|
+
total_count = self.total_count
|
|
36
|
+
|
|
37
|
+
graph_id = self.graph_id
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"backups": backups,
|
|
44
|
+
"total_count": total_count,
|
|
45
|
+
"graph_id": graph_id,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
from ..models.backup_response import BackupResponse
|
|
54
|
+
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
backups = []
|
|
57
|
+
_backups = d.pop("backups")
|
|
58
|
+
for backups_item_data in _backups:
|
|
59
|
+
backups_item = BackupResponse.from_dict(backups_item_data)
|
|
60
|
+
|
|
61
|
+
backups.append(backups_item)
|
|
62
|
+
|
|
63
|
+
total_count = d.pop("total_count")
|
|
64
|
+
|
|
65
|
+
graph_id = d.pop("graph_id")
|
|
66
|
+
|
|
67
|
+
backup_list_response = cls(
|
|
68
|
+
backups=backups,
|
|
69
|
+
total_count=total_count,
|
|
70
|
+
graph_id=graph_id,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
backup_list_response.additional_properties = d
|
|
74
|
+
return backup_list_response
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="BackupResponse")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class BackupResponse:
|
|
12
|
+
"""Response model for backup information.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
backup_id (str):
|
|
16
|
+
graph_id (str):
|
|
17
|
+
backup_format (str):
|
|
18
|
+
backup_type (str):
|
|
19
|
+
status (str):
|
|
20
|
+
original_size_bytes (int):
|
|
21
|
+
compressed_size_bytes (int):
|
|
22
|
+
compression_ratio (float):
|
|
23
|
+
node_count (int):
|
|
24
|
+
relationship_count (int):
|
|
25
|
+
backup_duration_seconds (float):
|
|
26
|
+
encryption_enabled (bool):
|
|
27
|
+
compression_enabled (bool):
|
|
28
|
+
allow_export (bool):
|
|
29
|
+
created_at (str):
|
|
30
|
+
completed_at (Union[None, str]):
|
|
31
|
+
expires_at (Union[None, str]):
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
backup_id: str
|
|
35
|
+
graph_id: str
|
|
36
|
+
backup_format: str
|
|
37
|
+
backup_type: str
|
|
38
|
+
status: str
|
|
39
|
+
original_size_bytes: int
|
|
40
|
+
compressed_size_bytes: int
|
|
41
|
+
compression_ratio: float
|
|
42
|
+
node_count: int
|
|
43
|
+
relationship_count: int
|
|
44
|
+
backup_duration_seconds: float
|
|
45
|
+
encryption_enabled: bool
|
|
46
|
+
compression_enabled: bool
|
|
47
|
+
allow_export: bool
|
|
48
|
+
created_at: str
|
|
49
|
+
completed_at: Union[None, str]
|
|
50
|
+
expires_at: Union[None, str]
|
|
51
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict[str, Any]:
|
|
54
|
+
backup_id = self.backup_id
|
|
55
|
+
|
|
56
|
+
graph_id = self.graph_id
|
|
57
|
+
|
|
58
|
+
backup_format = self.backup_format
|
|
59
|
+
|
|
60
|
+
backup_type = self.backup_type
|
|
61
|
+
|
|
62
|
+
status = self.status
|
|
63
|
+
|
|
64
|
+
original_size_bytes = self.original_size_bytes
|
|
65
|
+
|
|
66
|
+
compressed_size_bytes = self.compressed_size_bytes
|
|
67
|
+
|
|
68
|
+
compression_ratio = self.compression_ratio
|
|
69
|
+
|
|
70
|
+
node_count = self.node_count
|
|
71
|
+
|
|
72
|
+
relationship_count = self.relationship_count
|
|
73
|
+
|
|
74
|
+
backup_duration_seconds = self.backup_duration_seconds
|
|
75
|
+
|
|
76
|
+
encryption_enabled = self.encryption_enabled
|
|
77
|
+
|
|
78
|
+
compression_enabled = self.compression_enabled
|
|
79
|
+
|
|
80
|
+
allow_export = self.allow_export
|
|
81
|
+
|
|
82
|
+
created_at = self.created_at
|
|
83
|
+
|
|
84
|
+
completed_at: Union[None, str]
|
|
85
|
+
completed_at = self.completed_at
|
|
86
|
+
|
|
87
|
+
expires_at: Union[None, str]
|
|
88
|
+
expires_at = self.expires_at
|
|
89
|
+
|
|
90
|
+
field_dict: dict[str, Any] = {}
|
|
91
|
+
field_dict.update(self.additional_properties)
|
|
92
|
+
field_dict.update(
|
|
93
|
+
{
|
|
94
|
+
"backup_id": backup_id,
|
|
95
|
+
"graph_id": graph_id,
|
|
96
|
+
"backup_format": backup_format,
|
|
97
|
+
"backup_type": backup_type,
|
|
98
|
+
"status": status,
|
|
99
|
+
"original_size_bytes": original_size_bytes,
|
|
100
|
+
"compressed_size_bytes": compressed_size_bytes,
|
|
101
|
+
"compression_ratio": compression_ratio,
|
|
102
|
+
"node_count": node_count,
|
|
103
|
+
"relationship_count": relationship_count,
|
|
104
|
+
"backup_duration_seconds": backup_duration_seconds,
|
|
105
|
+
"encryption_enabled": encryption_enabled,
|
|
106
|
+
"compression_enabled": compression_enabled,
|
|
107
|
+
"allow_export": allow_export,
|
|
108
|
+
"created_at": created_at,
|
|
109
|
+
"completed_at": completed_at,
|
|
110
|
+
"expires_at": expires_at,
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
return field_dict
|
|
115
|
+
|
|
116
|
+
@classmethod
|
|
117
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
118
|
+
d = dict(src_dict)
|
|
119
|
+
backup_id = d.pop("backup_id")
|
|
120
|
+
|
|
121
|
+
graph_id = d.pop("graph_id")
|
|
122
|
+
|
|
123
|
+
backup_format = d.pop("backup_format")
|
|
124
|
+
|
|
125
|
+
backup_type = d.pop("backup_type")
|
|
126
|
+
|
|
127
|
+
status = d.pop("status")
|
|
128
|
+
|
|
129
|
+
original_size_bytes = d.pop("original_size_bytes")
|
|
130
|
+
|
|
131
|
+
compressed_size_bytes = d.pop("compressed_size_bytes")
|
|
132
|
+
|
|
133
|
+
compression_ratio = d.pop("compression_ratio")
|
|
134
|
+
|
|
135
|
+
node_count = d.pop("node_count")
|
|
136
|
+
|
|
137
|
+
relationship_count = d.pop("relationship_count")
|
|
138
|
+
|
|
139
|
+
backup_duration_seconds = d.pop("backup_duration_seconds")
|
|
140
|
+
|
|
141
|
+
encryption_enabled = d.pop("encryption_enabled")
|
|
142
|
+
|
|
143
|
+
compression_enabled = d.pop("compression_enabled")
|
|
144
|
+
|
|
145
|
+
allow_export = d.pop("allow_export")
|
|
146
|
+
|
|
147
|
+
created_at = d.pop("created_at")
|
|
148
|
+
|
|
149
|
+
def _parse_completed_at(data: object) -> Union[None, str]:
|
|
150
|
+
if data is None:
|
|
151
|
+
return data
|
|
152
|
+
return cast(Union[None, str], data)
|
|
153
|
+
|
|
154
|
+
completed_at = _parse_completed_at(d.pop("completed_at"))
|
|
155
|
+
|
|
156
|
+
def _parse_expires_at(data: object) -> Union[None, str]:
|
|
157
|
+
if data is None:
|
|
158
|
+
return data
|
|
159
|
+
return cast(Union[None, str], data)
|
|
160
|
+
|
|
161
|
+
expires_at = _parse_expires_at(d.pop("expires_at"))
|
|
162
|
+
|
|
163
|
+
backup_response = cls(
|
|
164
|
+
backup_id=backup_id,
|
|
165
|
+
graph_id=graph_id,
|
|
166
|
+
backup_format=backup_format,
|
|
167
|
+
backup_type=backup_type,
|
|
168
|
+
status=status,
|
|
169
|
+
original_size_bytes=original_size_bytes,
|
|
170
|
+
compressed_size_bytes=compressed_size_bytes,
|
|
171
|
+
compression_ratio=compression_ratio,
|
|
172
|
+
node_count=node_count,
|
|
173
|
+
relationship_count=relationship_count,
|
|
174
|
+
backup_duration_seconds=backup_duration_seconds,
|
|
175
|
+
encryption_enabled=encryption_enabled,
|
|
176
|
+
compression_enabled=compression_enabled,
|
|
177
|
+
allow_export=allow_export,
|
|
178
|
+
created_at=created_at,
|
|
179
|
+
completed_at=completed_at,
|
|
180
|
+
expires_at=expires_at,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
backup_response.additional_properties = d
|
|
184
|
+
return backup_response
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def additional_keys(self) -> list[str]:
|
|
188
|
+
return list(self.additional_properties.keys())
|
|
189
|
+
|
|
190
|
+
def __getitem__(self, key: str) -> Any:
|
|
191
|
+
return self.additional_properties[key]
|
|
192
|
+
|
|
193
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
194
|
+
self.additional_properties[key] = value
|
|
195
|
+
|
|
196
|
+
def __delitem__(self, key: str) -> None:
|
|
197
|
+
del self.additional_properties[key]
|
|
198
|
+
|
|
199
|
+
def __contains__(self, key: str) -> bool:
|
|
200
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
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 ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="BackupRestoreRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class BackupRestoreRequest:
|
|
14
|
+
"""Request model for restoring from a backup.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
backup_id (str): ID of backup to restore from
|
|
18
|
+
create_system_backup (Union[Unset, bool]): Create a system backup of existing database before restore Default:
|
|
19
|
+
True.
|
|
20
|
+
verify_after_restore (Union[Unset, bool]): Verify database integrity after restore Default: True.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
backup_id: str
|
|
24
|
+
create_system_backup: Union[Unset, bool] = True
|
|
25
|
+
verify_after_restore: Union[Unset, bool] = True
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
backup_id = self.backup_id
|
|
30
|
+
|
|
31
|
+
create_system_backup = self.create_system_backup
|
|
32
|
+
|
|
33
|
+
verify_after_restore = self.verify_after_restore
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"backup_id": backup_id,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
if create_system_backup is not UNSET:
|
|
43
|
+
field_dict["create_system_backup"] = create_system_backup
|
|
44
|
+
if verify_after_restore is not UNSET:
|
|
45
|
+
field_dict["verify_after_restore"] = verify_after_restore
|
|
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
|
+
backup_id = d.pop("backup_id")
|
|
53
|
+
|
|
54
|
+
create_system_backup = d.pop("create_system_backup", UNSET)
|
|
55
|
+
|
|
56
|
+
verify_after_restore = d.pop("verify_after_restore", UNSET)
|
|
57
|
+
|
|
58
|
+
backup_restore_request = cls(
|
|
59
|
+
backup_id=backup_id,
|
|
60
|
+
create_system_backup=create_system_backup,
|
|
61
|
+
verify_after_restore=verify_after_restore,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
backup_restore_request.additional_properties = d
|
|
65
|
+
return backup_restore_request
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|