api-sdk-py 1.11.66__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.
- api_sdk_py/__init__.py +312 -0
- api_sdk_py/api/__init__.py +18 -0
- api_sdk_py/api/canvases_api.py +1605 -0
- api_sdk_py/api/compositions_api.py +11616 -0
- api_sdk_py/api/credits_api.py +628 -0
- api_sdk_py/api/entitlements_api.py +676 -0
- api_sdk_py/api/invoices_api.py +357 -0
- api_sdk_py/api/managed_users_api.py +5087 -0
- api_sdk_py/api/operations_api.py +305 -0
- api_sdk_py/api/partner_api.py +41365 -0
- api_sdk_py/api/partners_api.py +11156 -0
- api_sdk_py/api/public_embed_api.py +1938 -0
- api_sdk_py/api/tokens_api.py +283 -0
- api_sdk_py/api/uploads_api.py +1507 -0
- api_sdk_py/api/users_api.py +3649 -0
- api_sdk_py/api/widgets_api.py +1300 -0
- api_sdk_py/api_client.py +797 -0
- api_sdk_py/api_response.py +21 -0
- api_sdk_py/configuration.py +526 -0
- api_sdk_py/exceptions.py +199 -0
- api_sdk_py/models/__init__.py +282 -0
- api_sdk_py/models/account_credit_balance.py +96 -0
- api_sdk_py/models/account_credit_balance_response.py +99 -0
- api_sdk_py/models/account_credit_transaction.py +120 -0
- api_sdk_py/models/adapter_connection.py +112 -0
- api_sdk_py/models/adapter_connection_removal.py +87 -0
- api_sdk_py/models/add_ai_answers_knowledge_document201_response.py +99 -0
- api_sdk_py/models/add_ai_answers_knowledge_document_request.py +90 -0
- api_sdk_py/models/add_domain_request.py +87 -0
- api_sdk_py/models/ai_answers_knowledge.py +101 -0
- api_sdk_py/models/ai_answers_knowledge_document.py +113 -0
- api_sdk_py/models/ai_answers_knowledge_removal.py +87 -0
- api_sdk_py/models/ai_answers_knowledge_totals.py +93 -0
- api_sdk_py/models/api_key_scope.py +44 -0
- api_sdk_py/models/canvas.py +112 -0
- api_sdk_py/models/canvas_response.py +99 -0
- api_sdk_py/models/check_composition_access_response.py +99 -0
- api_sdk_py/models/check_composition_access_response_data.py +89 -0
- api_sdk_py/models/composition.py +133 -0
- api_sdk_py/models/composition_data_source.py +90 -0
- api_sdk_py/models/composition_data_source_response.py +99 -0
- api_sdk_py/models/composition_entries_description.py +99 -0
- api_sdk_py/models/composition_entries_description_response.py +99 -0
- api_sdk_py/models/composition_entries_reading.py +126 -0
- api_sdk_py/models/composition_entries_reading_response.py +99 -0
- api_sdk_py/models/composition_entry_aggregate_tally.py +122 -0
- api_sdk_py/models/composition_entry_aggregates_block.py +99 -0
- api_sdk_py/models/composition_entry_column.py +89 -0
- api_sdk_py/models/composition_entry_delete_success.py +93 -0
- api_sdk_py/models/composition_entry_delete_success_data.py +87 -0
- api_sdk_py/models/composition_entry_item.py +111 -0
- api_sdk_py/models/composition_entry_items_meta.py +106 -0
- api_sdk_py/models/composition_entry_items_page_success.py +103 -0
- api_sdk_py/models/composition_entry_table.py +105 -0
- api_sdk_py/models/composition_entry_tally.py +95 -0
- api_sdk_py/models/composition_response.py +99 -0
- api_sdk_py/models/composition_version.py +96 -0
- api_sdk_py/models/content_check_finding.py +93 -0
- api_sdk_py/models/content_item_write_result.py +101 -0
- api_sdk_py/models/content_item_write_result_validation_result.py +91 -0
- api_sdk_py/models/copy_partner_preset_request.py +88 -0
- api_sdk_py/models/create_canvas_request.py +118 -0
- api_sdk_py/models/create_composition_content_item201_response.py +99 -0
- api_sdk_py/models/create_composition_content_item_request.py +101 -0
- api_sdk_py/models/create_composition_database_record201_response.py +95 -0
- api_sdk_py/models/create_composition_from_preset_request.py +100 -0
- api_sdk_py/models/create_composition_from_widget201_response.py +99 -0
- api_sdk_py/models/create_composition_from_widget_request.py +102 -0
- api_sdk_py/models/create_user_api_key_request.py +106 -0
- api_sdk_py/models/create_widget201_response.py +99 -0
- api_sdk_py/models/create_widget201_response_data.py +207 -0
- api_sdk_py/models/created_user_api_key.py +117 -0
- api_sdk_py/models/created_user_api_key_response.py +99 -0
- api_sdk_py/models/delete_composition_content_item_response.py +99 -0
- api_sdk_py/models/delete_composition_content_item_response_data.py +89 -0
- api_sdk_py/models/delete_composition_data_source_response.py +99 -0
- api_sdk_py/models/delete_composition_data_source_response_data.py +87 -0
- api_sdk_py/models/delete_managed_user200_response.py +99 -0
- api_sdk_py/models/delete_personal_workspace_domain_response.py +99 -0
- api_sdk_py/models/delete_personal_workspace_domain_response_data.py +87 -0
- api_sdk_py/models/delete_user_api_key_response.py +99 -0
- api_sdk_py/models/delete_user_api_key_response_data.py +87 -0
- api_sdk_py/models/design_defaults.py +92 -0
- api_sdk_py/models/duplicate_composition202_response.py +99 -0
- api_sdk_py/models/duplicate_composition202_response_data.py +87 -0
- api_sdk_py/models/duplicate_composition_request.py +89 -0
- api_sdk_py/models/editor_session.py +122 -0
- api_sdk_py/models/editor_session_response.py +99 -0
- api_sdk_py/models/entitlement.py +118 -0
- api_sdk_py/models/error_detail.py +104 -0
- api_sdk_py/models/error_response.py +108 -0
- api_sdk_py/models/export_composition_entry_items200_response.py +103 -0
- api_sdk_py/models/export_composition_entry_items200_response_meta.py +89 -0
- api_sdk_py/models/get_ai_answers_knowledge200_response.py +99 -0
- api_sdk_py/models/get_all_canvases_response.py +99 -0
- api_sdk_py/models/get_all_canvases_response_data.py +101 -0
- api_sdk_py/models/get_all_compositions200_response.py +103 -0
- api_sdk_py/models/get_all_managed_users200_response.py +103 -0
- api_sdk_py/models/get_composition_content_response.py +95 -0
- api_sdk_py/models/get_composition_content_schema_response.py +99 -0
- api_sdk_py/models/get_composition_content_schema_response_data.py +97 -0
- api_sdk_py/models/get_composition_data_source_response.py +104 -0
- api_sdk_py/models/get_composition_database_records200_response.py +95 -0
- api_sdk_py/models/get_composition_design_response.py +95 -0
- api_sdk_py/models/get_composition_design_schema_response.py +99 -0
- api_sdk_py/models/get_composition_design_schema_response_data.py +97 -0
- api_sdk_py/models/get_composition_embed_schema_response.py +99 -0
- api_sdk_py/models/get_composition_embed_schema_response_data.py +107 -0
- api_sdk_py/models/get_composition_embed_settings_response.py +95 -0
- api_sdk_py/models/get_composition_preview_response.py +99 -0
- api_sdk_py/models/get_composition_preview_response_data.py +93 -0
- api_sdk_py/models/get_composition_versions200_response.py +103 -0
- api_sdk_py/models/get_compositions_batch_request.py +88 -0
- api_sdk_py/models/get_compositions_batch_response.py +99 -0
- api_sdk_py/models/get_compositions_batch_response_data.py +105 -0
- api_sdk_py/models/get_invoices_by_partner_id200_response.py +103 -0
- api_sdk_py/models/get_managed_user_entitlements_response.py +99 -0
- api_sdk_py/models/get_managed_user_entitlements_response_data.py +97 -0
- api_sdk_py/models/get_managed_user_limits200_response.py +99 -0
- api_sdk_py/models/get_managed_user_storage_usage200_response.py +99 -0
- api_sdk_py/models/get_managed_user_storage_usage200_response_data.py +95 -0
- api_sdk_py/models/get_managed_user_storage_usage200_response_data_by_purpose.py +106 -0
- api_sdk_py/models/get_managed_users_by_manager_id_response.py +99 -0
- api_sdk_py/models/get_managed_users_by_manager_id_response_data.py +101 -0
- api_sdk_py/models/get_partner_billing_overview200_response.py +99 -0
- api_sdk_py/models/get_partner_credit_transactions200_response.py +103 -0
- api_sdk_py/models/get_partner_design_defaults200_response.py +99 -0
- api_sdk_py/models/get_partner_entitlements_response.py +99 -0
- api_sdk_py/models/get_partner_entitlements_response_data.py +97 -0
- api_sdk_py/models/get_personal_workspace_domains200_response.py +103 -0
- api_sdk_py/models/get_public_composition_embed200_response.py +133 -0
- api_sdk_py/models/get_public_composition_embed200_response_data_source.py +89 -0
- api_sdk_py/models/get_public_composition_embed200_response_direct.py +96 -0
- api_sdk_py/models/get_user_adapter_connections200_response.py +103 -0
- api_sdk_py/models/get_user_api_key_usage_logs_response.py +99 -0
- api_sdk_py/models/get_user_api_key_usage_logs_response_data.py +95 -0
- api_sdk_py/models/get_user_api_keys200_response.py +103 -0
- api_sdk_py/models/get_widgets200_response.py +103 -0
- api_sdk_py/models/get_widgets_batch_request.py +87 -0
- api_sdk_py/models/get_widgets_batch_response.py +99 -0
- api_sdk_py/models/get_widgets_batch_response_data.py +105 -0
- api_sdk_py/models/get_widgets_batch_response_data_errors_inner.py +89 -0
- api_sdk_py/models/list_partner_presets200_response.py +103 -0
- api_sdk_py/models/managed_user.py +105 -0
- api_sdk_py/models/managed_user_entries_meta.py +100 -0
- api_sdk_py/models/managed_user_entries_page_success.py +103 -0
- api_sdk_py/models/managed_user_entry_item.py +115 -0
- api_sdk_py/models/managed_user_limits.py +104 -0
- api_sdk_py/models/managed_user_operation_usage.py +95 -0
- api_sdk_py/models/managed_user_removal.py +89 -0
- api_sdk_py/models/managed_user_response.py +99 -0
- api_sdk_py/models/managed_user_usage.py +110 -0
- api_sdk_py/models/managed_user_usage_response.py +99 -0
- api_sdk_py/models/managed_user_usage_totals.py +93 -0
- api_sdk_py/models/my_partner.py +136 -0
- api_sdk_py/models/my_partners.py +112 -0
- api_sdk_py/models/my_partners_response.py +99 -0
- api_sdk_py/models/new_composition.py +108 -0
- api_sdk_py/models/new_editor_session.py +107 -0
- api_sdk_py/models/new_managed_user.py +91 -0
- api_sdk_py/models/new_widget.py +118 -0
- api_sdk_py/models/operations_id_get_response.py +99 -0
- api_sdk_py/models/operations_id_get_response_data.py +113 -0
- api_sdk_py/models/partner_analytics_by_managed_user.py +109 -0
- api_sdk_py/models/partner_analytics_by_managed_user_response.py +99 -0
- api_sdk_py/models/partner_analytics_of_day.py +94 -0
- api_sdk_py/models/partner_analytics_of_managed_user.py +126 -0
- api_sdk_py/models/partner_analytics_of_widget.py +102 -0
- api_sdk_py/models/partner_analytics_summary.py +110 -0
- api_sdk_py/models/partner_analytics_summary_response.py +99 -0
- api_sdk_py/models/partner_analytics_timeline.py +110 -0
- api_sdk_py/models/partner_analytics_timeline_response.py +99 -0
- api_sdk_py/models/partner_analytics_top_widgets.py +110 -0
- api_sdk_py/models/partner_analytics_top_widgets_response.py +99 -0
- api_sdk_py/models/partner_billing_overview.py +114 -0
- api_sdk_py/models/partner_billing_overview_billing_integration.py +100 -0
- api_sdk_py/models/partner_billing_overview_operational_credits.py +101 -0
- api_sdk_py/models/partner_billing_overview_partner.py +100 -0
- api_sdk_py/models/partner_contract.py +158 -0
- api_sdk_py/models/partner_contract_response.py +99 -0
- api_sdk_py/models/partner_customization.py +140 -0
- api_sdk_py/models/partner_data_database.py +112 -0
- api_sdk_py/models/partner_data_database_removal.py +87 -0
- api_sdk_py/models/partner_data_database_removal_response.py +99 -0
- api_sdk_py/models/partner_data_database_response.py +99 -0
- api_sdk_py/models/partner_entry_context_secret.py +93 -0
- api_sdk_py/models/partner_entry_context_secret_response.py +99 -0
- api_sdk_py/models/partner_entry_context_signing.py +108 -0
- api_sdk_py/models/partner_entry_context_signing_response.py +99 -0
- api_sdk_py/models/partner_extra_credits_invoice.py +130 -0
- api_sdk_py/models/partner_extra_credits_invoice_response.py +99 -0
- api_sdk_py/models/partner_invoice.py +234 -0
- api_sdk_py/models/partner_notification.py +108 -0
- api_sdk_py/models/partner_notification_default_recipients.py +89 -0
- api_sdk_py/models/partner_notification_delivery.py +170 -0
- api_sdk_py/models/partner_notification_delivery_log.py +95 -0
- api_sdk_py/models/partner_notification_delivery_log_response.py +99 -0
- api_sdk_py/models/partner_notification_delivery_response.py +99 -0
- api_sdk_py/models/partner_notification_event.py +112 -0
- api_sdk_py/models/partner_notification_event_type.py +51 -0
- api_sdk_py/models/partner_notification_page.py +103 -0
- api_sdk_py/models/partner_notification_page_response.py +99 -0
- api_sdk_py/models/partner_notification_settings.py +139 -0
- api_sdk_py/models/partner_notification_settings_change.py +98 -0
- api_sdk_py/models/partner_notification_settings_change_response.py +99 -0
- api_sdk_py/models/partner_notification_settings_response.py +99 -0
- api_sdk_py/models/partner_notification_test_event_request.py +88 -0
- api_sdk_py/models/partner_notification_test_event_result.py +98 -0
- api_sdk_py/models/partner_notification_test_event_result_response.py +99 -0
- api_sdk_py/models/partner_preset.py +119 -0
- api_sdk_py/models/partner_preset_copy.py +97 -0
- api_sdk_py/models/partner_preset_copy_response.py +99 -0
- api_sdk_py/models/partner_preset_removal.py +87 -0
- api_sdk_py/models/partner_preset_removal_response.py +99 -0
- api_sdk_py/models/partner_preset_response.py +99 -0
- api_sdk_py/models/partner_report_page.py +91 -0
- api_sdk_py/models/partner_report_period.py +90 -0
- api_sdk_py/models/partner_storage_destination.py +120 -0
- api_sdk_py/models/partner_storage_destination_response.py +99 -0
- api_sdk_py/models/partner_storage_removal.py +87 -0
- api_sdk_py/models/partner_storage_removal_response.py +99 -0
- api_sdk_py/models/partner_storage_usage.py +109 -0
- api_sdk_py/models/partner_storage_usage_of_managed_user.py +129 -0
- api_sdk_py/models/partner_storage_usage_response.py +99 -0
- api_sdk_py/models/partner_storage_usage_totals.py +93 -0
- api_sdk_py/models/personal_workspace_domain.py +96 -0
- api_sdk_py/models/personal_workspace_domain_result.py +93 -0
- api_sdk_py/models/personal_workspace_domain_result_response.py +99 -0
- api_sdk_py/models/post_public_composition_embed_status200_response.py +99 -0
- api_sdk_py/models/post_public_composition_embed_status200_response_data.py +97 -0
- api_sdk_py/models/post_public_composition_embed_status_request.py +88 -0
- api_sdk_py/models/public_adapter_call_error.py +93 -0
- api_sdk_py/models/public_adapter_call_request.py +113 -0
- api_sdk_py/models/public_adapter_call_result.py +93 -0
- api_sdk_py/models/public_adapter_call_result_data.py +87 -0
- api_sdk_py/models/public_adapter_file_result.py +93 -0
- api_sdk_py/models/public_adapter_file_result_data.py +91 -0
- api_sdk_py/models/public_adapter_file_result_data_file.py +108 -0
- api_sdk_py/models/public_composition_entry_created.py +93 -0
- api_sdk_py/models/public_composition_entry_created_data.py +92 -0
- api_sdk_py/models/public_composition_entry_request.py +101 -0
- api_sdk_py/models/public_embed_failure.py +105 -0
- api_sdk_py/models/public_embed_failure_details.py +112 -0
- api_sdk_py/models/public_embed_failure_error.py +98 -0
- api_sdk_py/models/purpose_storage_bucket.py +89 -0
- api_sdk_py/models/remove_ai_answers_knowledge_document200_response.py +99 -0
- api_sdk_py/models/remove_user_adapter_connection200_response.py +99 -0
- api_sdk_py/models/request_extra_credits.py +88 -0
- api_sdk_py/models/response_meta.py +121 -0
- api_sdk_py/models/revoke_managed_user_editor_sessions_response.py +99 -0
- api_sdk_py/models/revoke_managed_user_editor_sessions_response_data.py +87 -0
- api_sdk_py/models/set_adapter_connection_request.py +88 -0
- api_sdk_py/models/set_composition_data_source_request.py +90 -0
- api_sdk_py/models/set_dynamic_content_request.py +95 -0
- api_sdk_py/models/set_dynamic_content_response.py +99 -0
- api_sdk_py/models/set_dynamic_content_response_data.py +99 -0
- api_sdk_py/models/set_dynamic_content_response_data_validation_result.py +91 -0
- api_sdk_py/models/set_managed_user_limits_request.py +93 -0
- api_sdk_py/models/set_partner_data_database_request.py +87 -0
- api_sdk_py/models/set_partner_design_defaults_request.py +92 -0
- api_sdk_py/models/set_partner_preset_request.py +104 -0
- api_sdk_py/models/set_partner_storage_destination_request.py +101 -0
- api_sdk_py/models/set_user_adapter_connection200_response.py +99 -0
- api_sdk_py/models/success_response.py +95 -0
- api_sdk_py/models/update_canvas_request.py +96 -0
- api_sdk_py/models/update_composition.py +101 -0
- api_sdk_py/models/update_composition_status_request.py +94 -0
- api_sdk_py/models/update_domain_request.py +87 -0
- api_sdk_py/models/update_managed_user.py +91 -0
- api_sdk_py/models/update_partner_entry_context_signing_request.py +87 -0
- api_sdk_py/models/update_partner_notification_settings_request.py +110 -0
- api_sdk_py/models/update_user_api_key_request.py +90 -0
- api_sdk_py/models/upload.py +167 -0
- api_sdk_py/models/upload_limits.py +97 -0
- api_sdk_py/models/upload_limits_response.py +99 -0
- api_sdk_py/models/upload_response.py +99 -0
- api_sdk_py/models/uploads_get200_response.py +103 -0
- api_sdk_py/models/uploads_id_delete200_response.py +99 -0
- api_sdk_py/models/uploads_id_delete200_response_data.py +87 -0
- api_sdk_py/models/user_api_key.py +122 -0
- api_sdk_py/models/user_api_key_response.py +99 -0
- api_sdk_py/models/user_api_key_usage_log.py +107 -0
- api_sdk_py/models/validate_composition_content_response.py +99 -0
- api_sdk_py/models/validate_composition_content_response_data.py +108 -0
- api_sdk_py/models/validate_token200_response.py +99 -0
- api_sdk_py/models/validate_token200_response_data.py +106 -0
- api_sdk_py/models/widget.py +205 -0
- api_sdk_py/py.typed +0 -0
- api_sdk_py/rest.py +257 -0
- api_sdk_py-1.11.66.dist-info/METADATA +28 -0
- api_sdk_py-1.11.66.dist-info/RECORD +294 -0
- api_sdk_py-1.11.66.dist-info/WHEEL +5 -0
- api_sdk_py-1.11.66.dist-info/licenses/LICENSE +122 -0
- api_sdk_py-1.11.66.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
API documentation for the Widgetic API Gateway
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import date, datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PartnerCustomization(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Partner contract customization for a partner
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the customization")
|
|
31
|
+
partner_id: Optional[StrictStr] = Field(default=None, description="ID of the partner this customization belongs to", alias="partnerId")
|
|
32
|
+
custom_price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Custom monthly price override", alias="customPrice")
|
|
33
|
+
custom_credits: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Credits the partner receives each billing period (`billingCycle`). What a period costs is derived from it, see `periodTotalUsd`", alias="customCredits")
|
|
34
|
+
credit_price_usd: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="What the partner pays for one credit, in dollars (up to four decimals). Null means the list price", alias="creditPriceUsd")
|
|
35
|
+
effective_credit_price_usd: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="What one credit costs the partner, in dollars. `creditPriceUsd` when the contract names one, the list price otherwise", alias="effectiveCreditPriceUsd")
|
|
36
|
+
period_total_usd: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="What one billing period costs, in dollars before tax. `customCredits` times `effectiveCreditPriceUsd`; null while the contract names no credits", alias="periodTotalUsd")
|
|
37
|
+
additional_features: Optional[List[StrictStr]] = Field(default=None, description="Additional features beyond base partner plan", alias="additionalFeatures")
|
|
38
|
+
billing_cycle: Optional[StrictStr] = Field(default=None, description="Billing cycle for the customization", alias="billingCycle")
|
|
39
|
+
minimum_commitment_months: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Minimum commitment period in months", alias="minimumCommitmentMonths")
|
|
40
|
+
support_sla: Optional[StrictStr] = Field(default=None, description="Support SLA percentage", alias="supportSla")
|
|
41
|
+
contract_start_date: Optional[date] = Field(default=None, description="Contract start date", alias="contractStartDate")
|
|
42
|
+
contract_end_date: Optional[date] = Field(default=None, description="Contract end date", alias="contractEndDate")
|
|
43
|
+
notes: Optional[StrictStr] = Field(default=None, description="Admin notes about the customization")
|
|
44
|
+
is_active_contract: Optional[StrictBool] = Field(default=None, description="Whether the contract is currently active", alias="isActiveContract")
|
|
45
|
+
created_at: Optional[datetime] = Field(default=None, description="Creation timestamp", alias="createdAt")
|
|
46
|
+
updated_at: Optional[datetime] = Field(default=None, description="Last update timestamp", alias="updatedAt")
|
|
47
|
+
__properties: ClassVar[List[str]] = ["id", "partnerId", "customPrice", "customCredits", "creditPriceUsd", "effectiveCreditPriceUsd", "periodTotalUsd", "additionalFeatures", "billingCycle", "minimumCommitmentMonths", "supportSla", "contractStartDate", "contractEndDate", "notes", "isActiveContract", "createdAt", "updatedAt"]
|
|
48
|
+
|
|
49
|
+
@field_validator('billing_cycle')
|
|
50
|
+
def billing_cycle_validate_enum(cls, value):
|
|
51
|
+
"""Validates the enum"""
|
|
52
|
+
if value is None:
|
|
53
|
+
return value
|
|
54
|
+
|
|
55
|
+
if value not in set(['monthly', 'quarterly', 'annual']):
|
|
56
|
+
raise ValueError("must be one of enum values ('monthly', 'quarterly', 'annual')")
|
|
57
|
+
return value
|
|
58
|
+
|
|
59
|
+
model_config = ConfigDict(
|
|
60
|
+
populate_by_name=True,
|
|
61
|
+
validate_assignment=True,
|
|
62
|
+
protected_namespaces=(),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def to_str(self) -> str:
|
|
67
|
+
"""Returns the string representation of the model using alias"""
|
|
68
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
69
|
+
|
|
70
|
+
def to_json(self) -> str:
|
|
71
|
+
"""Returns the JSON representation of the model using alias"""
|
|
72
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
73
|
+
return json.dumps(self.to_dict())
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of PartnerCustomization from a JSON string"""
|
|
78
|
+
return cls.from_dict(json.loads(json_str))
|
|
79
|
+
|
|
80
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
81
|
+
"""Return the dictionary representation of the model using alias.
|
|
82
|
+
|
|
83
|
+
This has the following differences from calling pydantic's
|
|
84
|
+
`self.model_dump(by_alias=True)`:
|
|
85
|
+
|
|
86
|
+
* `None` is only added to the output dict for nullable fields that
|
|
87
|
+
were set at model initialization. Other fields with value `None`
|
|
88
|
+
are ignored.
|
|
89
|
+
"""
|
|
90
|
+
excluded_fields: Set[str] = set([
|
|
91
|
+
])
|
|
92
|
+
|
|
93
|
+
_dict = self.model_dump(
|
|
94
|
+
by_alias=True,
|
|
95
|
+
exclude=excluded_fields,
|
|
96
|
+
exclude_none=True,
|
|
97
|
+
)
|
|
98
|
+
# set to None if credit_price_usd (nullable) is None
|
|
99
|
+
# and model_fields_set contains the field
|
|
100
|
+
if self.credit_price_usd is None and "credit_price_usd" in self.model_fields_set:
|
|
101
|
+
_dict['creditPriceUsd'] = None
|
|
102
|
+
|
|
103
|
+
# set to None if period_total_usd (nullable) is None
|
|
104
|
+
# and model_fields_set contains the field
|
|
105
|
+
if self.period_total_usd is None and "period_total_usd" in self.model_fields_set:
|
|
106
|
+
_dict['periodTotalUsd'] = None
|
|
107
|
+
|
|
108
|
+
return _dict
|
|
109
|
+
|
|
110
|
+
@classmethod
|
|
111
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
112
|
+
"""Create an instance of PartnerCustomization from a dict"""
|
|
113
|
+
if obj is None:
|
|
114
|
+
return None
|
|
115
|
+
|
|
116
|
+
if not isinstance(obj, dict):
|
|
117
|
+
return cls.model_validate(obj)
|
|
118
|
+
|
|
119
|
+
_obj = cls.model_validate({
|
|
120
|
+
"id": obj.get("id"),
|
|
121
|
+
"partnerId": obj.get("partnerId"),
|
|
122
|
+
"customPrice": obj.get("customPrice"),
|
|
123
|
+
"customCredits": obj.get("customCredits"),
|
|
124
|
+
"creditPriceUsd": obj.get("creditPriceUsd"),
|
|
125
|
+
"effectiveCreditPriceUsd": obj.get("effectiveCreditPriceUsd"),
|
|
126
|
+
"periodTotalUsd": obj.get("periodTotalUsd"),
|
|
127
|
+
"additionalFeatures": obj.get("additionalFeatures"),
|
|
128
|
+
"billingCycle": obj.get("billingCycle"),
|
|
129
|
+
"minimumCommitmentMonths": obj.get("minimumCommitmentMonths"),
|
|
130
|
+
"supportSla": obj.get("supportSla"),
|
|
131
|
+
"contractStartDate": obj.get("contractStartDate"),
|
|
132
|
+
"contractEndDate": obj.get("contractEndDate"),
|
|
133
|
+
"notes": obj.get("notes"),
|
|
134
|
+
"isActiveContract": obj.get("isActiveContract"),
|
|
135
|
+
"createdAt": obj.get("createdAt"),
|
|
136
|
+
"updatedAt": obj.get("updatedAt")
|
|
137
|
+
})
|
|
138
|
+
return _obj
|
|
139
|
+
|
|
140
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
API documentation for the Widgetic API Gateway
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PartnerDataDatabase(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
The Neon database your compositions keep what visitors leave in them (votes, ratings, answers, form submissions). The connection string and its password are never part of this: they are given once, when the database is set.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
partner_id: StrictStr = Field(alias="partnerId")
|
|
31
|
+
host: StrictStr = Field(description="The Neon host of the database, as it appears in its connection string (`ep-....neon.tech`).")
|
|
32
|
+
database_name: StrictStr = Field(description="The name of the database in your Neon project.", alias="databaseName")
|
|
33
|
+
role_name: StrictStr = Field(description="The role Widgetic connects as.", alias="roleName")
|
|
34
|
+
verified_at: datetime = Field(description="When the database last passed the check.", alias="verifiedAt")
|
|
35
|
+
last_verification_error: Optional[StrictStr] = Field(description="Why the latest re-check failed, in a sentence you can act on. Null when the last check passed.", alias="lastVerificationError")
|
|
36
|
+
last_verification_failed_at: Optional[datetime] = Field(description="When the latest re-check failed. Null when the last check passed.", alias="lastVerificationFailedAt")
|
|
37
|
+
updated_at: datetime = Field(alias="updatedAt")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["partnerId", "host", "databaseName", "roleName", "verifiedAt", "lastVerificationError", "lastVerificationFailedAt", "updatedAt"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of PartnerDataDatabase from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
# set to None if last_verification_error (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.last_verification_error is None and "last_verification_error" in self.model_fields_set:
|
|
82
|
+
_dict['lastVerificationError'] = None
|
|
83
|
+
|
|
84
|
+
# set to None if last_verification_failed_at (nullable) is None
|
|
85
|
+
# and model_fields_set contains the field
|
|
86
|
+
if self.last_verification_failed_at is None and "last_verification_failed_at" in self.model_fields_set:
|
|
87
|
+
_dict['lastVerificationFailedAt'] = None
|
|
88
|
+
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of PartnerDataDatabase from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"partnerId": obj.get("partnerId"),
|
|
102
|
+
"host": obj.get("host"),
|
|
103
|
+
"databaseName": obj.get("databaseName"),
|
|
104
|
+
"roleName": obj.get("roleName"),
|
|
105
|
+
"verifiedAt": obj.get("verifiedAt"),
|
|
106
|
+
"lastVerificationError": obj.get("lastVerificationError"),
|
|
107
|
+
"lastVerificationFailedAt": obj.get("lastVerificationFailedAt"),
|
|
108
|
+
"updatedAt": obj.get("updatedAt")
|
|
109
|
+
})
|
|
110
|
+
return _obj
|
|
111
|
+
|
|
112
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
API documentation for the Widgetic API Gateway
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class PartnerDataDatabaseRemoval(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
PartnerDataDatabaseRemoval
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
removed: StrictBool = Field(description="False when the partner had no database of its own to remove")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["removed"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of PartnerDataDatabaseRemoval from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of PartnerDataDatabaseRemoval from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"removed": obj.get("removed")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
API documentation for the Widgetic API Gateway
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from api_sdk_py.models.partner_data_database_removal import PartnerDataDatabaseRemoval
|
|
23
|
+
from api_sdk_py.models.response_meta import ResponseMeta
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PartnerDataDatabaseRemovalResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PartnerDataDatabaseRemovalResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
success: StrictBool = Field(description="Always `true` on a success.")
|
|
32
|
+
data: PartnerDataDatabaseRemoval
|
|
33
|
+
meta: Optional[ResponseMeta] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["success", "data", "meta"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of PartnerDataDatabaseRemovalResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
76
|
+
if self.data:
|
|
77
|
+
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of meta
|
|
79
|
+
if self.meta:
|
|
80
|
+
_dict['meta'] = self.meta.to_dict()
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of PartnerDataDatabaseRemovalResponse from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"success": obj.get("success"),
|
|
94
|
+
"data": PartnerDataDatabaseRemoval.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
95
|
+
"meta": ResponseMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
API documentation for the Widgetic API Gateway
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from api_sdk_py.models.partner_data_database import PartnerDataDatabase
|
|
23
|
+
from api_sdk_py.models.response_meta import ResponseMeta
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PartnerDataDatabaseResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
PartnerDataDatabaseResponse
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
success: StrictBool = Field(description="Always `true` on a success.")
|
|
32
|
+
data: PartnerDataDatabase
|
|
33
|
+
meta: Optional[ResponseMeta] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["success", "data", "meta"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of PartnerDataDatabaseResponse from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
76
|
+
if self.data:
|
|
77
|
+
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of meta
|
|
79
|
+
if self.meta:
|
|
80
|
+
_dict['meta'] = self.meta.to_dict()
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of PartnerDataDatabaseResponse from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"success": obj.get("success"),
|
|
94
|
+
"data": PartnerDataDatabase.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
95
|
+
"meta": ResponseMeta.from_dict(obj["meta"]) if obj.get("meta") is not None else None
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Widgetic API Gateway
|
|
5
|
+
|
|
6
|
+
API documentation for the Widgetic API Gateway
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from api_sdk_py.models.partner_entry_context_signing import PartnerEntryContextSigning
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PartnerEntryContextSecret(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A new signing secret, and how your signing stands now.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
signing: PartnerEntryContextSigning
|
|
31
|
+
secret: StrictStr = Field(description="The secret: `ctxsec_` followed by the base64 of 32 random bytes. It is shown here, once, and cannot be read again.")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["signing", "secret"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of PartnerEntryContextSecret from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of signing
|
|
74
|
+
if self.signing:
|
|
75
|
+
_dict['signing'] = self.signing.to_dict()
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of PartnerEntryContextSecret from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"signing": PartnerEntryContextSigning.from_dict(obj["signing"]) if obj.get("signing") is not None else None,
|
|
89
|
+
"secret": obj.get("secret")
|
|
90
|
+
})
|
|
91
|
+
return _obj
|
|
92
|
+
|
|
93
|
+
|