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,183 @@
|
|
|
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 import CustomSchemaDefinition
|
|
11
|
+
from ..models.graph_metadata import GraphMetadata
|
|
12
|
+
from ..models.initial_entity_data import InitialEntityData
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="CreateGraphRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class CreateGraphRequest:
|
|
20
|
+
"""Request model for creating a new graph.
|
|
21
|
+
|
|
22
|
+
Example:
|
|
23
|
+
{'initial_entity': {'cik': '0001234567', 'name': 'Acme Corp', 'uri': 'https://acme.com'}, 'instance_tier':
|
|
24
|
+
'standard', 'metadata': {'description': 'Main production graph', 'graph_name': 'Production System',
|
|
25
|
+
'schema_extensions': ['roboledger']}, 'tags': ['production', 'finance']}
|
|
26
|
+
|
|
27
|
+
Attributes:
|
|
28
|
+
metadata (GraphMetadata): Metadata for graph creation.
|
|
29
|
+
instance_tier (Union[Unset, str]): Instance tier: standard, enterprise, or premium Default: 'standard'.
|
|
30
|
+
custom_schema (Union['CustomSchemaDefinition', None, Unset]): Custom schema definition to apply
|
|
31
|
+
initial_entity (Union['InitialEntityData', None, Unset]): Optional initial entity to create in the graph. If
|
|
32
|
+
provided, creates a entity-focused graph.
|
|
33
|
+
tags (Union[None, Unset, list[str]]): Optional tags for organization
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
metadata: "GraphMetadata"
|
|
37
|
+
instance_tier: Union[Unset, str] = "standard"
|
|
38
|
+
custom_schema: Union["CustomSchemaDefinition", None, Unset] = UNSET
|
|
39
|
+
initial_entity: Union["InitialEntityData", None, Unset] = UNSET
|
|
40
|
+
tags: Union[None, 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
|
+
from ..models.custom_schema_definition import CustomSchemaDefinition
|
|
45
|
+
from ..models.initial_entity_data import InitialEntityData
|
|
46
|
+
|
|
47
|
+
metadata = self.metadata.to_dict()
|
|
48
|
+
|
|
49
|
+
instance_tier = self.instance_tier
|
|
50
|
+
|
|
51
|
+
custom_schema: Union[None, Unset, dict[str, Any]]
|
|
52
|
+
if isinstance(self.custom_schema, Unset):
|
|
53
|
+
custom_schema = UNSET
|
|
54
|
+
elif isinstance(self.custom_schema, CustomSchemaDefinition):
|
|
55
|
+
custom_schema = self.custom_schema.to_dict()
|
|
56
|
+
else:
|
|
57
|
+
custom_schema = self.custom_schema
|
|
58
|
+
|
|
59
|
+
initial_entity: Union[None, Unset, dict[str, Any]]
|
|
60
|
+
if isinstance(self.initial_entity, Unset):
|
|
61
|
+
initial_entity = UNSET
|
|
62
|
+
elif isinstance(self.initial_entity, InitialEntityData):
|
|
63
|
+
initial_entity = self.initial_entity.to_dict()
|
|
64
|
+
else:
|
|
65
|
+
initial_entity = self.initial_entity
|
|
66
|
+
|
|
67
|
+
tags: Union[None, Unset, list[str]]
|
|
68
|
+
if isinstance(self.tags, Unset):
|
|
69
|
+
tags = UNSET
|
|
70
|
+
elif isinstance(self.tags, list):
|
|
71
|
+
tags = self.tags
|
|
72
|
+
|
|
73
|
+
else:
|
|
74
|
+
tags = self.tags
|
|
75
|
+
|
|
76
|
+
field_dict: dict[str, Any] = {}
|
|
77
|
+
field_dict.update(self.additional_properties)
|
|
78
|
+
field_dict.update(
|
|
79
|
+
{
|
|
80
|
+
"metadata": metadata,
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
if instance_tier is not UNSET:
|
|
84
|
+
field_dict["instance_tier"] = instance_tier
|
|
85
|
+
if custom_schema is not UNSET:
|
|
86
|
+
field_dict["custom_schema"] = custom_schema
|
|
87
|
+
if initial_entity is not UNSET:
|
|
88
|
+
field_dict["initial_entity"] = initial_entity
|
|
89
|
+
if tags is not UNSET:
|
|
90
|
+
field_dict["tags"] = tags
|
|
91
|
+
|
|
92
|
+
return field_dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
96
|
+
from ..models.custom_schema_definition import CustomSchemaDefinition
|
|
97
|
+
from ..models.graph_metadata import GraphMetadata
|
|
98
|
+
from ..models.initial_entity_data import InitialEntityData
|
|
99
|
+
|
|
100
|
+
d = dict(src_dict)
|
|
101
|
+
metadata = GraphMetadata.from_dict(d.pop("metadata"))
|
|
102
|
+
|
|
103
|
+
instance_tier = d.pop("instance_tier", UNSET)
|
|
104
|
+
|
|
105
|
+
def _parse_custom_schema(
|
|
106
|
+
data: object,
|
|
107
|
+
) -> Union["CustomSchemaDefinition", None, Unset]:
|
|
108
|
+
if data is None:
|
|
109
|
+
return data
|
|
110
|
+
if isinstance(data, Unset):
|
|
111
|
+
return data
|
|
112
|
+
try:
|
|
113
|
+
if not isinstance(data, dict):
|
|
114
|
+
raise TypeError()
|
|
115
|
+
custom_schema_type_0 = CustomSchemaDefinition.from_dict(data)
|
|
116
|
+
|
|
117
|
+
return custom_schema_type_0
|
|
118
|
+
except: # noqa: E722
|
|
119
|
+
pass
|
|
120
|
+
return cast(Union["CustomSchemaDefinition", None, Unset], data)
|
|
121
|
+
|
|
122
|
+
custom_schema = _parse_custom_schema(d.pop("custom_schema", UNSET))
|
|
123
|
+
|
|
124
|
+
def _parse_initial_entity(data: object) -> Union["InitialEntityData", None, Unset]:
|
|
125
|
+
if data is None:
|
|
126
|
+
return data
|
|
127
|
+
if isinstance(data, Unset):
|
|
128
|
+
return data
|
|
129
|
+
try:
|
|
130
|
+
if not isinstance(data, dict):
|
|
131
|
+
raise TypeError()
|
|
132
|
+
initial_entity_type_0 = InitialEntityData.from_dict(data)
|
|
133
|
+
|
|
134
|
+
return initial_entity_type_0
|
|
135
|
+
except: # noqa: E722
|
|
136
|
+
pass
|
|
137
|
+
return cast(Union["InitialEntityData", None, Unset], data)
|
|
138
|
+
|
|
139
|
+
initial_entity = _parse_initial_entity(d.pop("initial_entity", UNSET))
|
|
140
|
+
|
|
141
|
+
def _parse_tags(data: object) -> Union[None, Unset, list[str]]:
|
|
142
|
+
if data is None:
|
|
143
|
+
return data
|
|
144
|
+
if isinstance(data, Unset):
|
|
145
|
+
return data
|
|
146
|
+
try:
|
|
147
|
+
if not isinstance(data, list):
|
|
148
|
+
raise TypeError()
|
|
149
|
+
tags_type_0 = cast(list[str], data)
|
|
150
|
+
|
|
151
|
+
return tags_type_0
|
|
152
|
+
except: # noqa: E722
|
|
153
|
+
pass
|
|
154
|
+
return cast(Union[None, Unset, list[str]], data)
|
|
155
|
+
|
|
156
|
+
tags = _parse_tags(d.pop("tags", UNSET))
|
|
157
|
+
|
|
158
|
+
create_graph_request = cls(
|
|
159
|
+
metadata=metadata,
|
|
160
|
+
instance_tier=instance_tier,
|
|
161
|
+
custom_schema=custom_schema,
|
|
162
|
+
initial_entity=initial_entity,
|
|
163
|
+
tags=tags,
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
create_graph_request.additional_properties = d
|
|
167
|
+
return create_graph_request
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def additional_keys(self) -> list[str]:
|
|
171
|
+
return list(self.additional_properties.keys())
|
|
172
|
+
|
|
173
|
+
def __getitem__(self, key: str) -> Any:
|
|
174
|
+
return self.additional_properties[key]
|
|
175
|
+
|
|
176
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
177
|
+
self.additional_properties[key] = value
|
|
178
|
+
|
|
179
|
+
def __delitem__(self, key: str) -> None:
|
|
180
|
+
del self.additional_properties[key]
|
|
181
|
+
|
|
182
|
+
def __contains__(self, key: str) -> bool:
|
|
183
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
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="CreditCheckRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreditCheckRequest:
|
|
14
|
+
"""Request to check credit balance.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
operation_type (str): Type of operation to check
|
|
18
|
+
base_cost (Union[None, Unset, float]): Custom base cost (uses default if not provided)
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
operation_type: str
|
|
22
|
+
base_cost: Union[None, Unset, float] = UNSET
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
operation_type = self.operation_type
|
|
27
|
+
|
|
28
|
+
base_cost: Union[None, Unset, float]
|
|
29
|
+
if isinstance(self.base_cost, Unset):
|
|
30
|
+
base_cost = UNSET
|
|
31
|
+
else:
|
|
32
|
+
base_cost = self.base_cost
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"operation_type": operation_type,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
if base_cost is not UNSET:
|
|
42
|
+
field_dict["base_cost"] = base_cost
|
|
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
|
+
operation_type = d.pop("operation_type")
|
|
50
|
+
|
|
51
|
+
def _parse_base_cost(data: object) -> Union[None, Unset, float]:
|
|
52
|
+
if data is None:
|
|
53
|
+
return data
|
|
54
|
+
if isinstance(data, Unset):
|
|
55
|
+
return data
|
|
56
|
+
return cast(Union[None, Unset, float], data)
|
|
57
|
+
|
|
58
|
+
base_cost = _parse_base_cost(d.pop("base_cost", UNSET))
|
|
59
|
+
|
|
60
|
+
credit_check_request = cls(
|
|
61
|
+
operation_type=operation_type,
|
|
62
|
+
base_cost=base_cost,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
credit_check_request.additional_properties = d
|
|
66
|
+
return credit_check_request
|
|
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,128 @@
|
|
|
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="CreditSummary")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreditSummary:
|
|
14
|
+
"""Credit balance summary.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
current_balance (float): Current credit balance
|
|
18
|
+
monthly_allocation (float): Monthly credit allocation
|
|
19
|
+
consumed_this_month (float): Credits consumed this month
|
|
20
|
+
usage_percentage (float): Usage percentage of monthly allocation
|
|
21
|
+
rollover_credits (float): Credits rolled over from previous month
|
|
22
|
+
allows_rollover (bool): Whether rollover is allowed
|
|
23
|
+
is_active (bool): Whether credit pool is active
|
|
24
|
+
last_allocation_date (Union[Unset, str]): Last allocation date (ISO format)
|
|
25
|
+
next_allocation_date (Union[Unset, str]): Next allocation date (ISO format)
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
current_balance: float
|
|
29
|
+
monthly_allocation: float
|
|
30
|
+
consumed_this_month: float
|
|
31
|
+
usage_percentage: float
|
|
32
|
+
rollover_credits: float
|
|
33
|
+
allows_rollover: bool
|
|
34
|
+
is_active: bool
|
|
35
|
+
last_allocation_date: Union[Unset, str] = UNSET
|
|
36
|
+
next_allocation_date: Union[Unset, str] = UNSET
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
current_balance = self.current_balance
|
|
41
|
+
|
|
42
|
+
monthly_allocation = self.monthly_allocation
|
|
43
|
+
|
|
44
|
+
consumed_this_month = self.consumed_this_month
|
|
45
|
+
|
|
46
|
+
usage_percentage = self.usage_percentage
|
|
47
|
+
|
|
48
|
+
rollover_credits = self.rollover_credits
|
|
49
|
+
|
|
50
|
+
allows_rollover = self.allows_rollover
|
|
51
|
+
|
|
52
|
+
is_active = self.is_active
|
|
53
|
+
|
|
54
|
+
last_allocation_date = self.last_allocation_date
|
|
55
|
+
|
|
56
|
+
next_allocation_date = self.next_allocation_date
|
|
57
|
+
|
|
58
|
+
field_dict: dict[str, Any] = {}
|
|
59
|
+
field_dict.update(self.additional_properties)
|
|
60
|
+
field_dict.update(
|
|
61
|
+
{
|
|
62
|
+
"current_balance": current_balance,
|
|
63
|
+
"monthly_allocation": monthly_allocation,
|
|
64
|
+
"consumed_this_month": consumed_this_month,
|
|
65
|
+
"usage_percentage": usage_percentage,
|
|
66
|
+
"rollover_credits": rollover_credits,
|
|
67
|
+
"allows_rollover": allows_rollover,
|
|
68
|
+
"is_active": is_active,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
if last_allocation_date is not UNSET:
|
|
72
|
+
field_dict["last_allocation_date"] = last_allocation_date
|
|
73
|
+
if next_allocation_date is not UNSET:
|
|
74
|
+
field_dict["next_allocation_date"] = next_allocation_date
|
|
75
|
+
|
|
76
|
+
return field_dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
80
|
+
d = dict(src_dict)
|
|
81
|
+
current_balance = d.pop("current_balance")
|
|
82
|
+
|
|
83
|
+
monthly_allocation = d.pop("monthly_allocation")
|
|
84
|
+
|
|
85
|
+
consumed_this_month = d.pop("consumed_this_month")
|
|
86
|
+
|
|
87
|
+
usage_percentage = d.pop("usage_percentage")
|
|
88
|
+
|
|
89
|
+
rollover_credits = d.pop("rollover_credits")
|
|
90
|
+
|
|
91
|
+
allows_rollover = d.pop("allows_rollover")
|
|
92
|
+
|
|
93
|
+
is_active = d.pop("is_active")
|
|
94
|
+
|
|
95
|
+
last_allocation_date = d.pop("last_allocation_date", UNSET)
|
|
96
|
+
|
|
97
|
+
next_allocation_date = d.pop("next_allocation_date", UNSET)
|
|
98
|
+
|
|
99
|
+
credit_summary = cls(
|
|
100
|
+
current_balance=current_balance,
|
|
101
|
+
monthly_allocation=monthly_allocation,
|
|
102
|
+
consumed_this_month=consumed_this_month,
|
|
103
|
+
usage_percentage=usage_percentage,
|
|
104
|
+
rollover_credits=rollover_credits,
|
|
105
|
+
allows_rollover=allows_rollover,
|
|
106
|
+
is_active=is_active,
|
|
107
|
+
last_allocation_date=last_allocation_date,
|
|
108
|
+
next_allocation_date=next_allocation_date,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
credit_summary.additional_properties = d
|
|
112
|
+
return credit_summary
|
|
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,140 @@
|
|
|
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="CreditSummaryResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class CreditSummaryResponse:
|
|
14
|
+
"""Credit summary response model.
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
graph_id (str):
|
|
18
|
+
graph_tier (str):
|
|
19
|
+
credit_multiplier (float):
|
|
20
|
+
current_balance (float):
|
|
21
|
+
monthly_allocation (float):
|
|
22
|
+
consumed_this_month (float):
|
|
23
|
+
transaction_count (int):
|
|
24
|
+
usage_percentage (float):
|
|
25
|
+
last_allocation_date (Union[None, Unset, str]):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
graph_id: str
|
|
29
|
+
graph_tier: str
|
|
30
|
+
credit_multiplier: float
|
|
31
|
+
current_balance: float
|
|
32
|
+
monthly_allocation: float
|
|
33
|
+
consumed_this_month: float
|
|
34
|
+
transaction_count: int
|
|
35
|
+
usage_percentage: float
|
|
36
|
+
last_allocation_date: Union[None, Unset, str] = UNSET
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
graph_id = self.graph_id
|
|
41
|
+
|
|
42
|
+
graph_tier = self.graph_tier
|
|
43
|
+
|
|
44
|
+
credit_multiplier = self.credit_multiplier
|
|
45
|
+
|
|
46
|
+
current_balance = self.current_balance
|
|
47
|
+
|
|
48
|
+
monthly_allocation = self.monthly_allocation
|
|
49
|
+
|
|
50
|
+
consumed_this_month = self.consumed_this_month
|
|
51
|
+
|
|
52
|
+
transaction_count = self.transaction_count
|
|
53
|
+
|
|
54
|
+
usage_percentage = self.usage_percentage
|
|
55
|
+
|
|
56
|
+
last_allocation_date: Union[None, Unset, str]
|
|
57
|
+
if isinstance(self.last_allocation_date, Unset):
|
|
58
|
+
last_allocation_date = UNSET
|
|
59
|
+
else:
|
|
60
|
+
last_allocation_date = self.last_allocation_date
|
|
61
|
+
|
|
62
|
+
field_dict: dict[str, Any] = {}
|
|
63
|
+
field_dict.update(self.additional_properties)
|
|
64
|
+
field_dict.update(
|
|
65
|
+
{
|
|
66
|
+
"graph_id": graph_id,
|
|
67
|
+
"graph_tier": graph_tier,
|
|
68
|
+
"credit_multiplier": credit_multiplier,
|
|
69
|
+
"current_balance": current_balance,
|
|
70
|
+
"monthly_allocation": monthly_allocation,
|
|
71
|
+
"consumed_this_month": consumed_this_month,
|
|
72
|
+
"transaction_count": transaction_count,
|
|
73
|
+
"usage_percentage": usage_percentage,
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
if last_allocation_date is not UNSET:
|
|
77
|
+
field_dict["last_allocation_date"] = last_allocation_date
|
|
78
|
+
|
|
79
|
+
return field_dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
83
|
+
d = dict(src_dict)
|
|
84
|
+
graph_id = d.pop("graph_id")
|
|
85
|
+
|
|
86
|
+
graph_tier = d.pop("graph_tier")
|
|
87
|
+
|
|
88
|
+
credit_multiplier = d.pop("credit_multiplier")
|
|
89
|
+
|
|
90
|
+
current_balance = d.pop("current_balance")
|
|
91
|
+
|
|
92
|
+
monthly_allocation = d.pop("monthly_allocation")
|
|
93
|
+
|
|
94
|
+
consumed_this_month = d.pop("consumed_this_month")
|
|
95
|
+
|
|
96
|
+
transaction_count = d.pop("transaction_count")
|
|
97
|
+
|
|
98
|
+
usage_percentage = d.pop("usage_percentage")
|
|
99
|
+
|
|
100
|
+
def _parse_last_allocation_date(data: object) -> Union[None, Unset, str]:
|
|
101
|
+
if data is None:
|
|
102
|
+
return data
|
|
103
|
+
if isinstance(data, Unset):
|
|
104
|
+
return data
|
|
105
|
+
return cast(Union[None, Unset, str], data)
|
|
106
|
+
|
|
107
|
+
last_allocation_date = _parse_last_allocation_date(
|
|
108
|
+
d.pop("last_allocation_date", UNSET)
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
credit_summary_response = cls(
|
|
112
|
+
graph_id=graph_id,
|
|
113
|
+
graph_tier=graph_tier,
|
|
114
|
+
credit_multiplier=credit_multiplier,
|
|
115
|
+
current_balance=current_balance,
|
|
116
|
+
monthly_allocation=monthly_allocation,
|
|
117
|
+
consumed_this_month=consumed_this_month,
|
|
118
|
+
transaction_count=transaction_count,
|
|
119
|
+
usage_percentage=usage_percentage,
|
|
120
|
+
last_allocation_date=last_allocation_date,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
credit_summary_response.additional_properties = d
|
|
124
|
+
return credit_summary_response
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def additional_keys(self) -> list[str]:
|
|
128
|
+
return list(self.additional_properties.keys())
|
|
129
|
+
|
|
130
|
+
def __getitem__(self, key: str) -> Any:
|
|
131
|
+
return self.additional_properties[key]
|
|
132
|
+
|
|
133
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
134
|
+
self.additional_properties[key] = value
|
|
135
|
+
|
|
136
|
+
def __delitem__(self, key: str) -> None:
|
|
137
|
+
del self.additional_properties[key]
|
|
138
|
+
|
|
139
|
+
def __contains__(self, key: str) -> bool:
|
|
140
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, 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
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.add_on_credit_info import AddOnCreditInfo
|
|
11
|
+
from ..models.credits_summary_response_credits_by_addon_item import (
|
|
12
|
+
CreditsSummaryResponseCreditsByAddonItem,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="CreditsSummaryResponse")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class CreditsSummaryResponse:
|
|
21
|
+
"""Response for credits summary.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
add_ons (list['AddOnCreditInfo']): Credits breakdown by add-on
|
|
25
|
+
total_credits (float): Total credits remaining across all subscriptions
|
|
26
|
+
addon_count (int): Number of active add-ons
|
|
27
|
+
credits_by_addon (Union[Unset, list['CreditsSummaryResponseCreditsByAddonItem']]): Legacy field - Credits
|
|
28
|
+
breakdown by add-on
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
add_ons: list["AddOnCreditInfo"]
|
|
32
|
+
total_credits: float
|
|
33
|
+
addon_count: int
|
|
34
|
+
credits_by_addon: Union[Unset, list["CreditsSummaryResponseCreditsByAddonItem"]] = (
|
|
35
|
+
UNSET
|
|
36
|
+
)
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
add_ons = []
|
|
41
|
+
for add_ons_item_data in self.add_ons:
|
|
42
|
+
add_ons_item = add_ons_item_data.to_dict()
|
|
43
|
+
add_ons.append(add_ons_item)
|
|
44
|
+
|
|
45
|
+
total_credits = self.total_credits
|
|
46
|
+
|
|
47
|
+
addon_count = self.addon_count
|
|
48
|
+
|
|
49
|
+
credits_by_addon: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
50
|
+
if not isinstance(self.credits_by_addon, Unset):
|
|
51
|
+
credits_by_addon = []
|
|
52
|
+
for credits_by_addon_item_data in self.credits_by_addon:
|
|
53
|
+
credits_by_addon_item = credits_by_addon_item_data.to_dict()
|
|
54
|
+
credits_by_addon.append(credits_by_addon_item)
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update(
|
|
59
|
+
{
|
|
60
|
+
"add_ons": add_ons,
|
|
61
|
+
"total_credits": total_credits,
|
|
62
|
+
"addon_count": addon_count,
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
if credits_by_addon is not UNSET:
|
|
66
|
+
field_dict["credits_by_addon"] = credits_by_addon
|
|
67
|
+
|
|
68
|
+
return field_dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
72
|
+
from ..models.add_on_credit_info import AddOnCreditInfo
|
|
73
|
+
from ..models.credits_summary_response_credits_by_addon_item import (
|
|
74
|
+
CreditsSummaryResponseCreditsByAddonItem,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
add_ons = []
|
|
79
|
+
_add_ons = d.pop("add_ons")
|
|
80
|
+
for add_ons_item_data in _add_ons:
|
|
81
|
+
add_ons_item = AddOnCreditInfo.from_dict(add_ons_item_data)
|
|
82
|
+
|
|
83
|
+
add_ons.append(add_ons_item)
|
|
84
|
+
|
|
85
|
+
total_credits = d.pop("total_credits")
|
|
86
|
+
|
|
87
|
+
addon_count = d.pop("addon_count")
|
|
88
|
+
|
|
89
|
+
credits_by_addon = []
|
|
90
|
+
_credits_by_addon = d.pop("credits_by_addon", UNSET)
|
|
91
|
+
for credits_by_addon_item_data in _credits_by_addon or []:
|
|
92
|
+
credits_by_addon_item = CreditsSummaryResponseCreditsByAddonItem.from_dict(
|
|
93
|
+
credits_by_addon_item_data
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
credits_by_addon.append(credits_by_addon_item)
|
|
97
|
+
|
|
98
|
+
credits_summary_response = cls(
|
|
99
|
+
add_ons=add_ons,
|
|
100
|
+
total_credits=total_credits,
|
|
101
|
+
addon_count=addon_count,
|
|
102
|
+
credits_by_addon=credits_by_addon,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
credits_summary_response.additional_properties = d
|
|
106
|
+
return credits_summary_response
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def additional_keys(self) -> list[str]:
|
|
110
|
+
return list(self.additional_properties.keys())
|
|
111
|
+
|
|
112
|
+
def __getitem__(self, key: str) -> Any:
|
|
113
|
+
return self.additional_properties[key]
|
|
114
|
+
|
|
115
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
116
|
+
self.additional_properties[key] = value
|
|
117
|
+
|
|
118
|
+
def __delitem__(self, key: str) -> None:
|
|
119
|
+
del self.additional_properties[key]
|
|
120
|
+
|
|
121
|
+
def __contains__(self, key: str) -> bool:
|
|
122
|
+
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="CreditsSummaryResponseCreditsByAddonItem")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class CreditsSummaryResponseCreditsByAddonItem:
|
|
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
|
+
credits_summary_response_credits_by_addon_item = cls()
|
|
26
|
+
|
|
27
|
+
credits_summary_response_credits_by_addon_item.additional_properties = d
|
|
28
|
+
return credits_summary_response_credits_by_addon_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
|