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,194 @@
|
|
|
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.custom_schema_definition_metadata import CustomSchemaDefinitionMetadata
|
|
11
|
+
from ..models.custom_schema_definition_nodes_item import (
|
|
12
|
+
CustomSchemaDefinitionNodesItem,
|
|
13
|
+
)
|
|
14
|
+
from ..models.custom_schema_definition_relationships_item import (
|
|
15
|
+
CustomSchemaDefinitionRelationshipsItem,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="CustomSchemaDefinition")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class CustomSchemaDefinition:
|
|
24
|
+
"""Custom schema definition for user-defined graphs.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
name (str): Schema name Example: inventory_management.
|
|
28
|
+
version (Union[Unset, str]): Schema version Default: '1.0.0'. Example: 1.0.0.
|
|
29
|
+
description (Union[None, Unset, str]): Schema description Example: Inventory management system schema.
|
|
30
|
+
extends (Union[None, Unset, str]): Base schema to extend (e.g., 'base') Example: base.
|
|
31
|
+
nodes (Union[Unset, list['CustomSchemaDefinitionNodesItem']]): List of node definitions with properties Example:
|
|
32
|
+
[{'name': 'Product', 'properties': [{'name': 'sku', 'type': 'STRING', 'is_primary_key': True}, {'name': 'name',
|
|
33
|
+
'type': 'STRING', 'is_required': True}, {'name': 'price', 'type': 'DOUBLE'}, {'name': 'quantity', 'type':
|
|
34
|
+
'INT64'}]}, {'name': 'Warehouse', 'properties': [{'name': 'id', 'type': 'STRING', 'is_primary_key': True},
|
|
35
|
+
{'name': 'location', 'type': 'STRING'}]}].
|
|
36
|
+
relationships (Union[Unset, list['CustomSchemaDefinitionRelationshipsItem']]): List of relationship definitions
|
|
37
|
+
Example: [{'from_node': 'Product', 'name': 'STORED_IN', 'properties': [{'name': 'since', 'type': 'DATE'}],
|
|
38
|
+
'to_node': 'Warehouse'}].
|
|
39
|
+
metadata (Union[Unset, CustomSchemaDefinitionMetadata]): Additional schema metadata Example: {'created_by':
|
|
40
|
+
'inventory_team', 'industry': 'retail'}.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
name: str
|
|
44
|
+
version: Union[Unset, str] = "1.0.0"
|
|
45
|
+
description: Union[None, Unset, str] = UNSET
|
|
46
|
+
extends: Union[None, Unset, str] = UNSET
|
|
47
|
+
nodes: Union[Unset, list["CustomSchemaDefinitionNodesItem"]] = UNSET
|
|
48
|
+
relationships: Union[Unset, list["CustomSchemaDefinitionRelationshipsItem"]] = UNSET
|
|
49
|
+
metadata: Union[Unset, "CustomSchemaDefinitionMetadata"] = UNSET
|
|
50
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> dict[str, Any]:
|
|
53
|
+
name = self.name
|
|
54
|
+
|
|
55
|
+
version = self.version
|
|
56
|
+
|
|
57
|
+
description: Union[None, Unset, str]
|
|
58
|
+
if isinstance(self.description, Unset):
|
|
59
|
+
description = UNSET
|
|
60
|
+
else:
|
|
61
|
+
description = self.description
|
|
62
|
+
|
|
63
|
+
extends: Union[None, Unset, str]
|
|
64
|
+
if isinstance(self.extends, Unset):
|
|
65
|
+
extends = UNSET
|
|
66
|
+
else:
|
|
67
|
+
extends = self.extends
|
|
68
|
+
|
|
69
|
+
nodes: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
70
|
+
if not isinstance(self.nodes, Unset):
|
|
71
|
+
nodes = []
|
|
72
|
+
for nodes_item_data in self.nodes:
|
|
73
|
+
nodes_item = nodes_item_data.to_dict()
|
|
74
|
+
nodes.append(nodes_item)
|
|
75
|
+
|
|
76
|
+
relationships: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
77
|
+
if not isinstance(self.relationships, Unset):
|
|
78
|
+
relationships = []
|
|
79
|
+
for relationships_item_data in self.relationships:
|
|
80
|
+
relationships_item = relationships_item_data.to_dict()
|
|
81
|
+
relationships.append(relationships_item)
|
|
82
|
+
|
|
83
|
+
metadata: Union[Unset, dict[str, Any]] = UNSET
|
|
84
|
+
if not isinstance(self.metadata, Unset):
|
|
85
|
+
metadata = self.metadata.to_dict()
|
|
86
|
+
|
|
87
|
+
field_dict: dict[str, Any] = {}
|
|
88
|
+
field_dict.update(self.additional_properties)
|
|
89
|
+
field_dict.update(
|
|
90
|
+
{
|
|
91
|
+
"name": name,
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
if version is not UNSET:
|
|
95
|
+
field_dict["version"] = version
|
|
96
|
+
if description is not UNSET:
|
|
97
|
+
field_dict["description"] = description
|
|
98
|
+
if extends is not UNSET:
|
|
99
|
+
field_dict["extends"] = extends
|
|
100
|
+
if nodes is not UNSET:
|
|
101
|
+
field_dict["nodes"] = nodes
|
|
102
|
+
if relationships is not UNSET:
|
|
103
|
+
field_dict["relationships"] = relationships
|
|
104
|
+
if metadata is not UNSET:
|
|
105
|
+
field_dict["metadata"] = metadata
|
|
106
|
+
|
|
107
|
+
return field_dict
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
111
|
+
from ..models.custom_schema_definition_metadata import (
|
|
112
|
+
CustomSchemaDefinitionMetadata,
|
|
113
|
+
)
|
|
114
|
+
from ..models.custom_schema_definition_nodes_item import (
|
|
115
|
+
CustomSchemaDefinitionNodesItem,
|
|
116
|
+
)
|
|
117
|
+
from ..models.custom_schema_definition_relationships_item import (
|
|
118
|
+
CustomSchemaDefinitionRelationshipsItem,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
d = dict(src_dict)
|
|
122
|
+
name = d.pop("name")
|
|
123
|
+
|
|
124
|
+
version = d.pop("version", UNSET)
|
|
125
|
+
|
|
126
|
+
def _parse_description(data: object) -> Union[None, Unset, str]:
|
|
127
|
+
if data is None:
|
|
128
|
+
return data
|
|
129
|
+
if isinstance(data, Unset):
|
|
130
|
+
return data
|
|
131
|
+
return cast(Union[None, Unset, str], data)
|
|
132
|
+
|
|
133
|
+
description = _parse_description(d.pop("description", UNSET))
|
|
134
|
+
|
|
135
|
+
def _parse_extends(data: object) -> Union[None, Unset, str]:
|
|
136
|
+
if data is None:
|
|
137
|
+
return data
|
|
138
|
+
if isinstance(data, Unset):
|
|
139
|
+
return data
|
|
140
|
+
return cast(Union[None, Unset, str], data)
|
|
141
|
+
|
|
142
|
+
extends = _parse_extends(d.pop("extends", UNSET))
|
|
143
|
+
|
|
144
|
+
nodes = []
|
|
145
|
+
_nodes = d.pop("nodes", UNSET)
|
|
146
|
+
for nodes_item_data in _nodes or []:
|
|
147
|
+
nodes_item = CustomSchemaDefinitionNodesItem.from_dict(nodes_item_data)
|
|
148
|
+
|
|
149
|
+
nodes.append(nodes_item)
|
|
150
|
+
|
|
151
|
+
relationships = []
|
|
152
|
+
_relationships = d.pop("relationships", UNSET)
|
|
153
|
+
for relationships_item_data in _relationships or []:
|
|
154
|
+
relationships_item = CustomSchemaDefinitionRelationshipsItem.from_dict(
|
|
155
|
+
relationships_item_data
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
relationships.append(relationships_item)
|
|
159
|
+
|
|
160
|
+
_metadata = d.pop("metadata", UNSET)
|
|
161
|
+
metadata: Union[Unset, CustomSchemaDefinitionMetadata]
|
|
162
|
+
if isinstance(_metadata, Unset):
|
|
163
|
+
metadata = UNSET
|
|
164
|
+
else:
|
|
165
|
+
metadata = CustomSchemaDefinitionMetadata.from_dict(_metadata)
|
|
166
|
+
|
|
167
|
+
custom_schema_definition = cls(
|
|
168
|
+
name=name,
|
|
169
|
+
version=version,
|
|
170
|
+
description=description,
|
|
171
|
+
extends=extends,
|
|
172
|
+
nodes=nodes,
|
|
173
|
+
relationships=relationships,
|
|
174
|
+
metadata=metadata,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
custom_schema_definition.additional_properties = d
|
|
178
|
+
return custom_schema_definition
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def additional_keys(self) -> list[str]:
|
|
182
|
+
return list(self.additional_properties.keys())
|
|
183
|
+
|
|
184
|
+
def __getitem__(self, key: str) -> Any:
|
|
185
|
+
return self.additional_properties[key]
|
|
186
|
+
|
|
187
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
188
|
+
self.additional_properties[key] = value
|
|
189
|
+
|
|
190
|
+
def __delitem__(self, key: str) -> None:
|
|
191
|
+
del self.additional_properties[key]
|
|
192
|
+
|
|
193
|
+
def __contains__(self, key: str) -> bool:
|
|
194
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,49 @@
|
|
|
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="CustomSchemaDefinitionMetadata")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class CustomSchemaDefinitionMetadata:
|
|
12
|
+
"""Additional schema metadata
|
|
13
|
+
|
|
14
|
+
Example:
|
|
15
|
+
{'created_by': 'inventory_team', 'industry': 'retail'}
|
|
16
|
+
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> dict[str, Any]:
|
|
22
|
+
field_dict: dict[str, Any] = {}
|
|
23
|
+
field_dict.update(self.additional_properties)
|
|
24
|
+
|
|
25
|
+
return field_dict
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
29
|
+
d = dict(src_dict)
|
|
30
|
+
custom_schema_definition_metadata = cls()
|
|
31
|
+
|
|
32
|
+
custom_schema_definition_metadata.additional_properties = d
|
|
33
|
+
return custom_schema_definition_metadata
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def additional_keys(self) -> list[str]:
|
|
37
|
+
return list(self.additional_properties.keys())
|
|
38
|
+
|
|
39
|
+
def __getitem__(self, key: str) -> Any:
|
|
40
|
+
return self.additional_properties[key]
|
|
41
|
+
|
|
42
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
43
|
+
self.additional_properties[key] = value
|
|
44
|
+
|
|
45
|
+
def __delitem__(self, key: str) -> None:
|
|
46
|
+
del self.additional_properties[key]
|
|
47
|
+
|
|
48
|
+
def __contains__(self, key: str) -> bool:
|
|
49
|
+
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="CustomSchemaDefinitionNodesItem")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class CustomSchemaDefinitionNodesItem:
|
|
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
|
+
custom_schema_definition_nodes_item = cls()
|
|
26
|
+
|
|
27
|
+
custom_schema_definition_nodes_item.additional_properties = d
|
|
28
|
+
return custom_schema_definition_nodes_item
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -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="CustomSchemaDefinitionRelationshipsItem")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class CustomSchemaDefinitionRelationshipsItem:
|
|
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
|
+
custom_schema_definition_relationships_item = cls()
|
|
26
|
+
|
|
27
|
+
custom_schema_definition_relationships_item.additional_properties = d
|
|
28
|
+
return custom_schema_definition_relationships_item
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,128 @@
|
|
|
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.cypher_query_request_parameters_type_0 import (
|
|
11
|
+
CypherQueryRequestParametersType0,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="CypherQueryRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class CypherQueryRequest:
|
|
20
|
+
"""Request model for Cypher query execution.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
query (str): The Cypher query to execute
|
|
24
|
+
parameters (Union['CypherQueryRequestParametersType0', None, Unset]): Optional parameters for the Cypher query
|
|
25
|
+
timeout (Union[None, Unset, int]): Query timeout in seconds (1-300) Default: 60.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
query: str
|
|
29
|
+
parameters: Union["CypherQueryRequestParametersType0", None, Unset] = UNSET
|
|
30
|
+
timeout: Union[None, Unset, int] = 60
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
from ..models.cypher_query_request_parameters_type_0 import (
|
|
35
|
+
CypherQueryRequestParametersType0,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
query = self.query
|
|
39
|
+
|
|
40
|
+
parameters: Union[None, Unset, dict[str, Any]]
|
|
41
|
+
if isinstance(self.parameters, Unset):
|
|
42
|
+
parameters = UNSET
|
|
43
|
+
elif isinstance(self.parameters, CypherQueryRequestParametersType0):
|
|
44
|
+
parameters = self.parameters.to_dict()
|
|
45
|
+
else:
|
|
46
|
+
parameters = self.parameters
|
|
47
|
+
|
|
48
|
+
timeout: Union[None, Unset, int]
|
|
49
|
+
if isinstance(self.timeout, Unset):
|
|
50
|
+
timeout = UNSET
|
|
51
|
+
else:
|
|
52
|
+
timeout = self.timeout
|
|
53
|
+
|
|
54
|
+
field_dict: dict[str, Any] = {}
|
|
55
|
+
field_dict.update(self.additional_properties)
|
|
56
|
+
field_dict.update(
|
|
57
|
+
{
|
|
58
|
+
"query": query,
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
if parameters is not UNSET:
|
|
62
|
+
field_dict["parameters"] = parameters
|
|
63
|
+
if timeout is not UNSET:
|
|
64
|
+
field_dict["timeout"] = timeout
|
|
65
|
+
|
|
66
|
+
return field_dict
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
70
|
+
from ..models.cypher_query_request_parameters_type_0 import (
|
|
71
|
+
CypherQueryRequestParametersType0,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
d = dict(src_dict)
|
|
75
|
+
query = d.pop("query")
|
|
76
|
+
|
|
77
|
+
def _parse_parameters(
|
|
78
|
+
data: object,
|
|
79
|
+
) -> Union["CypherQueryRequestParametersType0", None, Unset]:
|
|
80
|
+
if data is None:
|
|
81
|
+
return data
|
|
82
|
+
if isinstance(data, Unset):
|
|
83
|
+
return data
|
|
84
|
+
try:
|
|
85
|
+
if not isinstance(data, dict):
|
|
86
|
+
raise TypeError()
|
|
87
|
+
parameters_type_0 = CypherQueryRequestParametersType0.from_dict(data)
|
|
88
|
+
|
|
89
|
+
return parameters_type_0
|
|
90
|
+
except: # noqa: E722
|
|
91
|
+
pass
|
|
92
|
+
return cast(Union["CypherQueryRequestParametersType0", None, Unset], data)
|
|
93
|
+
|
|
94
|
+
parameters = _parse_parameters(d.pop("parameters", UNSET))
|
|
95
|
+
|
|
96
|
+
def _parse_timeout(data: object) -> Union[None, Unset, int]:
|
|
97
|
+
if data is None:
|
|
98
|
+
return data
|
|
99
|
+
if isinstance(data, Unset):
|
|
100
|
+
return data
|
|
101
|
+
return cast(Union[None, Unset, int], data)
|
|
102
|
+
|
|
103
|
+
timeout = _parse_timeout(d.pop("timeout", UNSET))
|
|
104
|
+
|
|
105
|
+
cypher_query_request = cls(
|
|
106
|
+
query=query,
|
|
107
|
+
parameters=parameters,
|
|
108
|
+
timeout=timeout,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
cypher_query_request.additional_properties = d
|
|
112
|
+
return cypher_query_request
|
|
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
|
|
@@ -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="CypherQueryRequestParametersType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class CypherQueryRequestParametersType0:
|
|
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
|
+
cypher_query_request_parameters_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
cypher_query_request_parameters_type_0.additional_properties = d
|
|
28
|
+
return cypher_query_request_parameters_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,181 @@
|
|
|
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="DatabaseHealthResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class DatabaseHealthResponse:
|
|
14
|
+
"""Response model for database health check.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
graph_id (str): Graph database identifier Example: entity_12345.
|
|
18
|
+
status (str): Overall health status Example: healthy.
|
|
19
|
+
connection_status (str): Database connection status Example: connected.
|
|
20
|
+
uptime_seconds (float): Database uptime in seconds Example: 3600.5.
|
|
21
|
+
query_count_24h (int): Number of queries executed in last 24 hours Example: 150.
|
|
22
|
+
avg_query_time_ms (float): Average query execution time in milliseconds Example: 45.2.
|
|
23
|
+
error_rate_24h (float): Error rate in last 24 hours (percentage) Example: 0.5.
|
|
24
|
+
last_query_time (Union[None, Unset, str]): Timestamp of last query execution Example: 2024-01-15T10:30:00Z.
|
|
25
|
+
memory_usage_mb (Union[None, Unset, float]): Memory usage in MB Example: 512.3.
|
|
26
|
+
storage_usage_mb (Union[None, Unset, float]): Storage usage in MB Example: 1024.7.
|
|
27
|
+
alerts (Union[Unset, list[str]]): Active alerts or warnings Example: ['High memory usage detected'].
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
graph_id: str
|
|
31
|
+
status: str
|
|
32
|
+
connection_status: str
|
|
33
|
+
uptime_seconds: float
|
|
34
|
+
query_count_24h: int
|
|
35
|
+
avg_query_time_ms: float
|
|
36
|
+
error_rate_24h: float
|
|
37
|
+
last_query_time: Union[None, Unset, str] = UNSET
|
|
38
|
+
memory_usage_mb: Union[None, Unset, float] = UNSET
|
|
39
|
+
storage_usage_mb: Union[None, Unset, float] = UNSET
|
|
40
|
+
alerts: Union[Unset, list[str]] = UNSET
|
|
41
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
|
+
|
|
43
|
+
def to_dict(self) -> dict[str, Any]:
|
|
44
|
+
graph_id = self.graph_id
|
|
45
|
+
|
|
46
|
+
status = self.status
|
|
47
|
+
|
|
48
|
+
connection_status = self.connection_status
|
|
49
|
+
|
|
50
|
+
uptime_seconds = self.uptime_seconds
|
|
51
|
+
|
|
52
|
+
query_count_24h = self.query_count_24h
|
|
53
|
+
|
|
54
|
+
avg_query_time_ms = self.avg_query_time_ms
|
|
55
|
+
|
|
56
|
+
error_rate_24h = self.error_rate_24h
|
|
57
|
+
|
|
58
|
+
last_query_time: Union[None, Unset, str]
|
|
59
|
+
if isinstance(self.last_query_time, Unset):
|
|
60
|
+
last_query_time = UNSET
|
|
61
|
+
else:
|
|
62
|
+
last_query_time = self.last_query_time
|
|
63
|
+
|
|
64
|
+
memory_usage_mb: Union[None, Unset, float]
|
|
65
|
+
if isinstance(self.memory_usage_mb, Unset):
|
|
66
|
+
memory_usage_mb = UNSET
|
|
67
|
+
else:
|
|
68
|
+
memory_usage_mb = self.memory_usage_mb
|
|
69
|
+
|
|
70
|
+
storage_usage_mb: Union[None, Unset, float]
|
|
71
|
+
if isinstance(self.storage_usage_mb, Unset):
|
|
72
|
+
storage_usage_mb = UNSET
|
|
73
|
+
else:
|
|
74
|
+
storage_usage_mb = self.storage_usage_mb
|
|
75
|
+
|
|
76
|
+
alerts: Union[Unset, list[str]] = UNSET
|
|
77
|
+
if not isinstance(self.alerts, Unset):
|
|
78
|
+
alerts = self.alerts
|
|
79
|
+
|
|
80
|
+
field_dict: dict[str, Any] = {}
|
|
81
|
+
field_dict.update(self.additional_properties)
|
|
82
|
+
field_dict.update(
|
|
83
|
+
{
|
|
84
|
+
"graph_id": graph_id,
|
|
85
|
+
"status": status,
|
|
86
|
+
"connection_status": connection_status,
|
|
87
|
+
"uptime_seconds": uptime_seconds,
|
|
88
|
+
"query_count_24h": query_count_24h,
|
|
89
|
+
"avg_query_time_ms": avg_query_time_ms,
|
|
90
|
+
"error_rate_24h": error_rate_24h,
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
if last_query_time is not UNSET:
|
|
94
|
+
field_dict["last_query_time"] = last_query_time
|
|
95
|
+
if memory_usage_mb is not UNSET:
|
|
96
|
+
field_dict["memory_usage_mb"] = memory_usage_mb
|
|
97
|
+
if storage_usage_mb is not UNSET:
|
|
98
|
+
field_dict["storage_usage_mb"] = storage_usage_mb
|
|
99
|
+
if alerts is not UNSET:
|
|
100
|
+
field_dict["alerts"] = alerts
|
|
101
|
+
|
|
102
|
+
return field_dict
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
106
|
+
d = dict(src_dict)
|
|
107
|
+
graph_id = d.pop("graph_id")
|
|
108
|
+
|
|
109
|
+
status = d.pop("status")
|
|
110
|
+
|
|
111
|
+
connection_status = d.pop("connection_status")
|
|
112
|
+
|
|
113
|
+
uptime_seconds = d.pop("uptime_seconds")
|
|
114
|
+
|
|
115
|
+
query_count_24h = d.pop("query_count_24h")
|
|
116
|
+
|
|
117
|
+
avg_query_time_ms = d.pop("avg_query_time_ms")
|
|
118
|
+
|
|
119
|
+
error_rate_24h = d.pop("error_rate_24h")
|
|
120
|
+
|
|
121
|
+
def _parse_last_query_time(data: object) -> Union[None, Unset, str]:
|
|
122
|
+
if data is None:
|
|
123
|
+
return data
|
|
124
|
+
if isinstance(data, Unset):
|
|
125
|
+
return data
|
|
126
|
+
return cast(Union[None, Unset, str], data)
|
|
127
|
+
|
|
128
|
+
last_query_time = _parse_last_query_time(d.pop("last_query_time", UNSET))
|
|
129
|
+
|
|
130
|
+
def _parse_memory_usage_mb(data: object) -> Union[None, Unset, float]:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
return cast(Union[None, Unset, float], data)
|
|
136
|
+
|
|
137
|
+
memory_usage_mb = _parse_memory_usage_mb(d.pop("memory_usage_mb", UNSET))
|
|
138
|
+
|
|
139
|
+
def _parse_storage_usage_mb(data: object) -> Union[None, Unset, float]:
|
|
140
|
+
if data is None:
|
|
141
|
+
return data
|
|
142
|
+
if isinstance(data, Unset):
|
|
143
|
+
return data
|
|
144
|
+
return cast(Union[None, Unset, float], data)
|
|
145
|
+
|
|
146
|
+
storage_usage_mb = _parse_storage_usage_mb(d.pop("storage_usage_mb", UNSET))
|
|
147
|
+
|
|
148
|
+
alerts = cast(list[str], d.pop("alerts", UNSET))
|
|
149
|
+
|
|
150
|
+
database_health_response = cls(
|
|
151
|
+
graph_id=graph_id,
|
|
152
|
+
status=status,
|
|
153
|
+
connection_status=connection_status,
|
|
154
|
+
uptime_seconds=uptime_seconds,
|
|
155
|
+
query_count_24h=query_count_24h,
|
|
156
|
+
avg_query_time_ms=avg_query_time_ms,
|
|
157
|
+
error_rate_24h=error_rate_24h,
|
|
158
|
+
last_query_time=last_query_time,
|
|
159
|
+
memory_usage_mb=memory_usage_mb,
|
|
160
|
+
storage_usage_mb=storage_usage_mb,
|
|
161
|
+
alerts=alerts,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
database_health_response.additional_properties = d
|
|
165
|
+
return database_health_response
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def additional_keys(self) -> list[str]:
|
|
169
|
+
return list(self.additional_properties.keys())
|
|
170
|
+
|
|
171
|
+
def __getitem__(self, key: str) -> Any:
|
|
172
|
+
return self.additional_properties[key]
|
|
173
|
+
|
|
174
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
175
|
+
self.additional_properties[key] = value
|
|
176
|
+
|
|
177
|
+
def __delitem__(self, key: str) -> None:
|
|
178
|
+
del self.additional_properties[key]
|
|
179
|
+
|
|
180
|
+
def __contains__(self, key: str) -> bool:
|
|
181
|
+
return key in self.additional_properties
|