hyperfluid 0.1.0__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.
- hyperfluid/__init__.py +56 -0
- hyperfluid/_exceptions.py +93 -0
- hyperfluid/_version.py +6 -0
- hyperfluid/api/__init__.py +1441 -0
- hyperfluid/api/_auth.py +231 -0
- hyperfluid/api/_errors.py +125 -0
- hyperfluid/api/_pages.py +307 -0
- hyperfluid/api/_pagination.py +298 -0
- hyperfluid/api/_response.py +132 -0
- hyperfluid/api/_streaming.py +353 -0
- hyperfluid/api/accept_invitation.py +115 -0
- hyperfluid/api/ai_agents.py +961 -0
- hyperfluid/api/ai_agents_sessions.py +277 -0
- hyperfluid/api/airflow_connections.py +683 -0
- hyperfluid/api/airflows.py +839 -0
- hyperfluid/api/airflows_pods.py +240 -0
- hyperfluid/api/alert_rules.py +153 -0
- hyperfluid/api/alert_rules_rules.py +436 -0
- hyperfluid/api/alerting_settings.py +216 -0
- hyperfluid/api/alerting_settings_bindings.py +206 -0
- hyperfluid/api/alerting_settings_channels.py +474 -0
- hyperfluid/api/alerting_settings_thresholds.py +278 -0
- hyperfluid/api/api_keys.py +380 -0
- hyperfluid/api/app_instances.py +495 -0
- hyperfluid/api/app_templates.py +235 -0
- hyperfluid/api/atlas.py +600 -0
- hyperfluid/api/atlas_entries.py +351 -0
- hyperfluid/api/audit_logs.py +589 -0
- hyperfluid/api/audit_logs_security_decisions.py +299 -0
- hyperfluid/api/authorization.py +2794 -0
- hyperfluid/api/backup_targets.py +585 -0
- hyperfluid/api/bifrost.py +163 -0
- hyperfluid/api/buckets.py +1160 -0
- hyperfluid/api/buckets_archive_operations.py +313 -0
- hyperfluid/api/buckets_objects.py +479 -0
- hyperfluid/api/changelogs.py +112 -0
- hyperfluid/api/check_name_availability.py +126 -0
- hyperfluid/api/ci_runners.py +106 -0
- hyperfluid/api/cli.py +106 -0
- hyperfluid/api/client.py +5360 -0
- hyperfluid/api/common.py +845 -0
- hyperfluid/api/compute_docks.py +753 -0
- hyperfluid/api/console_config.py +106 -0
- hyperfluid/api/container_apps.py +877 -0
- hyperfluid/api/container_apps_crd.py +763 -0
- hyperfluid/api/container_apps_git_source.py +99 -0
- hyperfluid/api/container_apps_git_source_container_apps.py +83 -0
- hyperfluid/api/container_apps_git_source_container_apps_image_source.py +455 -0
- hyperfluid/api/container_apps_git_source_harbors.py +79 -0
- hyperfluid/api/container_apps_git_source_harbors_container_apps.py +366 -0
- hyperfluid/api/container_apps_pods.py +232 -0
- hyperfluid/api/converters.py +264 -0
- hyperfluid/api/crate_hf_console_inbound_http_handlers_data_containers_iceberg_clone_table.py +162 -0
- hyperfluid/api/crate_hf_console_inbound_http_handlers_data_docks_data_containers_handlers.py +156 -0
- hyperfluid/api/create_invitation.py +141 -0
- hyperfluid/api/create_signup_request.py +159 -0
- hyperfluid/api/dashboards.py +1069 -0
- hyperfluid/api/dashboards_versions.py +210 -0
- hyperfluid/api/data_docks.py +445 -0
- hyperfluid/api/data_docks_catalog.py +182 -0
- hyperfluid/api/decline_invitation.py +110 -0
- hyperfluid/api/dev_workstations.py +889 -0
- hyperfluid/api/dev_workstations_agent_chat.py +534 -0
- hyperfluid/api/dev_workstations_agent_chat_permission_policy.py +266 -0
- hyperfluid/api/dev_workstations_agent_chat_questions.py +264 -0
- hyperfluid/api/dev_workstations_agent_chat_sessions.py +522 -0
- hyperfluid/api/dev_workstations_agent_chat_sessions_messages.py +303 -0
- hyperfluid/api/dev_workstations_agent_chat_workspaces.py +229 -0
- hyperfluid/api/dev_workstations_ai.py +167 -0
- hyperfluid/api/dev_workstations_audit.py +219 -0
- hyperfluid/api/dev_workstations_egress_allowlists.py +471 -0
- hyperfluid/api/dev_workstations_egress_flows.py +141 -0
- hyperfluid/api/dev_workstations_files.py +241 -0
- hyperfluid/api/dev_workstations_forgejo.py +217 -0
- hyperfluid/api/dev_workstations_git_ops.py +770 -0
- hyperfluid/api/dev_workstations_metrics.py +118 -0
- hyperfluid/api/dev_workstations_preview_ports.py +118 -0
- hyperfluid/api/dev_workstations_preview_proxy.py +120 -0
- hyperfluid/api/dev_workstations_repositories.py +284 -0
- hyperfluid/api/dev_workstations_scm.py +396 -0
- hyperfluid/api/dev_workstations_skill_registries.py +657 -0
- hyperfluid/api/dev_workstations_skill_registries_skills.py +350 -0
- hyperfluid/api/dev_workstations_terminals.py +249 -0
- hyperfluid/api/domain_verifications.py +505 -0
- hyperfluid/api/faker_create_schema.py +141 -0
- hyperfluid/api/faker_create_table.py +149 -0
- hyperfluid/api/faker_create_table_structured.py +150 -0
- hyperfluid/api/faker_delete_schema.py +124 -0
- hyperfluid/api/faker_delete_schema_preview.py +130 -0
- hyperfluid/api/faker_delete_table.py +124 -0
- hyperfluid/api/faker_delete_table_preview.py +130 -0
- hyperfluid/api/faker_get_field_types.py +108 -0
- hyperfluid/api/faker_get_schemas.py +122 -0
- hyperfluid/api/faker_get_table.py +130 -0
- hyperfluid/api/faker_get_tables.py +122 -0
- hyperfluid/api/faker_update_table.py +146 -0
- hyperfluid/api/forgejo_runners.py +624 -0
- hyperfluid/api/get_data_container.py +122 -0
- hyperfluid/api/get_invitation_preview.py +116 -0
- hyperfluid/api/get_signup_page_copy.py +132 -0
- hyperfluid/api/git_hub_runners.py +1216 -0
- hyperfluid/api/handlers.py +362 -0
- hyperfluid/api/harbors.py +461 -0
- hyperfluid/api/harbors_crd.py +205 -0
- hyperfluid/api/hf_key_value_caches.py +595 -0
- hyperfluid/api/iceberg_create_iceberg_data_container.py +138 -0
- hyperfluid/api/iceberg_create_schema.py +149 -0
- hyperfluid/api/iceberg_create_table.py +184 -0
- hyperfluid/api/iceberg_delete_schema.py +120 -0
- hyperfluid/api/iceberg_delete_table.py +166 -0
- hyperfluid/api/iceberg_get_iceberg_data_container.py +122 -0
- hyperfluid/api/iceberg_get_schemas.py +122 -0
- hyperfluid/api/iceberg_get_table_columns.py +138 -0
- hyperfluid/api/iceberg_get_tables.py +122 -0
- hyperfluid/api/iceberg_health.py +241 -0
- hyperfluid/api/iceberg_health_scan_api.py +214 -0
- hyperfluid/api/iceberg_optimize.py +636 -0
- hyperfluid/api/iceberg_optimize_runs.py +284 -0
- hyperfluid/api/identity_providers.py +475 -0
- hyperfluid/api/kafka_services.py +751 -0
- hyperfluid/api/kafka_topics.py +501 -0
- hyperfluid/api/list_identity_providers.py +118 -0
- hyperfluid/api/list_invitations.py +122 -0
- hyperfluid/api/llm_credits.py +353 -0
- hyperfluid/api/llm_credits_budgets.py +300 -0
- hyperfluid/api/managed_postgre_sq_ls.py +103 -0
- hyperfluid/api/managed_postgre_sq_ls_harbors.py +81 -0
- hyperfluid/api/managed_postgre_sq_ls_harbors_managed_postgresqls.py +306 -0
- hyperfluid/api/managed_postgre_sq_ls_managed_postgresqls.py +530 -0
- hyperfluid/api/managed_postgre_sql_users.py +619 -0
- hyperfluid/api/managed_postgresql_backups.py +513 -0
- hyperfluid/api/managed_postgresql_imports.py +986 -0
- hyperfluid/api/middleware.py +40 -0
- hyperfluid/api/model_catalog.py +170 -0
- hyperfluid/api/model_serving.py +556 -0
- hyperfluid/api/monitoring.py +1080 -0
- hyperfluid/api/monitoring_bifrost.py +456 -0
- hyperfluid/api/monitoring_compute_docks.py +302 -0
- hyperfluid/api/monitoring_container_apps.py +404 -0
- hyperfluid/api/monitoring_container_apps_custom_metrics.py +251 -0
- hyperfluid/api/monitoring_data_docks.py +286 -0
- hyperfluid/api/monitoring_dev_workstations.py +373 -0
- hyperfluid/api/monitoring_harbors.py +177 -0
- hyperfluid/api/monitoring_harbors_github_runners.py +449 -0
- hyperfluid/api/monitoring_hf_key_value_caches.py +286 -0
- hyperfluid/api/monitoring_kafka_services.py +286 -0
- hyperfluid/api/monitoring_managed_postgresqls.py +292 -0
- hyperfluid/api/monitoring_model_servings.py +278 -0
- hyperfluid/api/nextflow.py +735 -0
- hyperfluid/api/nextflow_runs.py +623 -0
- hyperfluid/api/nextflow_runs_tasks.py +236 -0
- hyperfluid/api/ontology.py +480 -0
- hyperfluid/api/ontology_action_types.py +578 -0
- hyperfluid/api/ontology_link_types.py +479 -0
- hyperfluid/api/ontology_object_types.py +657 -0
- hyperfluid/api/ontology_object_types_instances.py +394 -0
- hyperfluid/api/ontology_properties.py +233 -0
- hyperfluid/api/open_data.py +279 -0
- hyperfluid/api/org_storage.py +284 -0
- hyperfluid/api/org_storage_harbors.py +237 -0
- hyperfluid/api/org_storage_harbors_zones.py +198 -0
- hyperfluid/api/org_storage_zones.py +190 -0
- hyperfluid/api/organization_features.py +120 -0
- hyperfluid/api/organizations.py +580 -0
- hyperfluid/api/orgs.py +69 -0
- hyperfluid/api/orgs_data_docks.py +203 -0
- hyperfluid/api/petite_requete.py +1945 -0
- hyperfluid/api/pipelines.py +1515 -0
- hyperfluid/api/pipelines_runs.py +371 -0
- hyperfluid/api/pipelines_stats_api.py +214 -0
- hyperfluid/api/postgresql_create_postgresql_data_container.py +142 -0
- hyperfluid/api/postgresql_get_postgresql_data_container.py +124 -0
- hyperfluid/api/quotas.py +175 -0
- hyperfluid/api/redeem_invitation.py +108 -0
- hyperfluid/api/register_invitation.py +135 -0
- hyperfluid/api/registries.py +393 -0
- hyperfluid/api/registry_projects.py +407 -0
- hyperfluid/api/registry_views.py +427 -0
- hyperfluid/api/registry_views_projects.py +69 -0
- hyperfluid/api/registry_views_projects_images.py +540 -0
- hyperfluid/api/resend_invitation.py +124 -0
- hyperfluid/api/revoke_invitation.py +122 -0
- hyperfluid/api/s3_long_lived_keys.py +221 -0
- hyperfluid/api/s3_long_lived_keys_s3_keys.py +313 -0
- hyperfluid/api/s3_sessions.py +131 -0
- hyperfluid/api/sapience_resources.py +122 -0
- hyperfluid/api/secrets.py +788 -0
- hyperfluid/api/security.py +1167 -0
- hyperfluid/api/security_policies.py +118 -0
- hyperfluid/api/security_settings.py +431 -0
- hyperfluid/api/service_accounts.py +261 -0
- hyperfluid/api/service_accounts_attributes.py +385 -0
- hyperfluid/api/service_accounts_crd.py +501 -0
- hyperfluid/api/service_links.py +387 -0
- hyperfluid/api/shared_models.py +167 -0
- hyperfluid/api/super_catalog_exposure_handlers.py +224 -0
- hyperfluid/api/super_catalog_handlers.py +308 -0
- hyperfluid/api/super_data_access_handlers.py +161 -0
- hyperfluid/api/super_internet_exposure_handlers.py +209 -0
- hyperfluid/api/super_organizations_list_users.py +122 -0
- hyperfluid/api/super_resource_groups_handlers.py +206 -0
- hyperfluid/api/super_search_handlers.py +173 -0
- hyperfluid/api/support.py +69 -0
- hyperfluid/api/support_tickets.py +522 -0
- hyperfluid/api/support_tickets_messages.py +216 -0
- hyperfluid/api/table_classifications.py +551 -0
- hyperfluid/api/terraform_registry.py +122 -0
- hyperfluid/api/token_usage.py +414 -0
- hyperfluid/api/token_usage_timeseries.py +226 -0
- hyperfluid/api/trino_connectors.py +122 -0
- hyperfluid/api/unified_catalog.py +122 -0
- hyperfluid/api/user_attributes.py +492 -0
- hyperfluid/api/verify_signup_request.py +137 -0
- hyperfluid/api/virtual_machine_users.py +452 -0
- hyperfluid/api/virtual_machines.py +664 -0
- hyperfluid/api/workload_security.py +592 -0
- hyperfluid/api/workload_security_settings.py +199 -0
- hyperfluid/api/workload_security_workloads.py +215 -0
- hyperfluid/api/workstation_templates.py +544 -0
- hyperfluid/errors.py +46 -0
- hyperfluid/models/__init__.py +3844 -0
- hyperfluid/models/abort_managed_postgresql_import_upload_request_body.py +18 -0
- hyperfluid/models/abort_multipart_upload_request.py +17 -0
- hyperfluid/models/accept_invitation_body.py +11 -0
- hyperfluid/models/access_binding.py +56 -0
- hyperfluid/models/access_check_item.py +20 -0
- hyperfluid/models/access_check_request_body.py +17 -0
- hyperfluid/models/access_check_result.py +21 -0
- hyperfluid/models/action_parameter.py +31 -0
- hyperfluid/models/action_result.py +21 -0
- hyperfluid/models/action_type.py +47 -0
- hyperfluid/models/add_group_member_request_body.py +17 -0
- hyperfluid/models/add_service_account_attribute_request.py +14 -0
- hyperfluid/models/add_user.py +13 -0
- hyperfluid/models/add_user_attribute_request.py +15 -0
- hyperfluid/models/add_workstation_repository_response.py +26 -0
- hyperfluid/models/agent_mode.py +21 -0
- hyperfluid/models/agent_request_kind.py +24 -0
- hyperfluid/models/agent_workspaces.py +21 -0
- hyperfluid/models/agent_worktree.py +17 -0
- hyperfluid/models/ai_agent_budgets_dto.py +18 -0
- hyperfluid/models/ai_agent_capabilities_response.py +17 -0
- hyperfluid/models/ai_agent_capability_response.py +45 -0
- hyperfluid/models/ai_agent_data_source_dto.py +21 -0
- hyperfluid/models/ai_agent_desired_state_dto.py +17 -0
- hyperfluid/models/ai_agent_inference_dto.py +27 -0
- hyperfluid/models/ai_agent_mail_dto.py +64 -0
- hyperfluid/models/ai_agent_mail_mode_dto.py +17 -0
- hyperfluid/models/ai_agent_mail_stats_response.py +40 -0
- hyperfluid/models/ai_agent_mail_status_dto.py +29 -0
- hyperfluid/models/ai_agent_mailbox_phase_dto.py +17 -0
- hyperfluid/models/ai_agent_memory_response.py +35 -0
- hyperfluid/models/ai_agent_response.py +81 -0
- hyperfluid/models/ai_agent_session_summary.py +30 -0
- hyperfluid/models/ai_agent_session_turn.py +19 -0
- hyperfluid/models/ai_agent_session_turns_response.py +17 -0
- hyperfluid/models/ai_agent_sessions_response.py +17 -0
- hyperfluid/models/ai_agent_status_response.py +24 -0
- hyperfluid/models/ai_classification_result_response.py +25 -0
- hyperfluid/models/ai_classify_request_body.py +20 -0
- hyperfluid/models/ai_classify_response_body.py +21 -0
- hyperfluid/models/ai_edit_request.py +35 -0
- hyperfluid/models/ai_edit_response.py +17 -0
- hyperfluid/models/airflow_connection_condition_response.py +24 -0
- hyperfluid/models/airflow_connection_response.py +145 -0
- hyperfluid/models/airflow_connection_s3_session.py +30 -0
- hyperfluid/models/airflow_crd_spec_response.py +49 -0
- hyperfluid/models/airflow_crd_status_response.py +47 -0
- hyperfluid/models/airflow_egress_request.py +30 -0
- hyperfluid/models/airflow_in_cluster_link_request.py +21 -0
- hyperfluid/models/airflow_link_kind.py +31 -0
- hyperfluid/models/airflow_node_tier.py +38 -0
- hyperfluid/models/airflow_pod_response.py +37 -0
- hyperfluid/models/airflow_response.py +53 -0
- hyperfluid/models/alert_event_dto.py +33 -0
- hyperfluid/models/alert_rule_body.py +40 -0
- hyperfluid/models/alert_rule_dto.py +53 -0
- hyperfluid/models/alertable_panel_dto.py +25 -0
- hyperfluid/models/analytics_summary.py +27 -0
- hyperfluid/models/analytics_trend_point.py +20 -0
- hyperfluid/models/analytics_trends.py +19 -0
- hyperfluid/models/antivirus_config.py +21 -0
- hyperfluid/models/api_error_body.py +23 -0
- hyperfluid/models/api_key_response.py +44 -0
- hyperfluid/models/app_instance_response.py +42 -0
- hyperfluid/models/app_protocol.py +19 -0
- hyperfluid/models/app_template_response.py +43 -0
- hyperfluid/models/app_usage_ref.py +29 -0
- hyperfluid/models/applied_proposal.py +29 -0
- hyperfluid/models/apply_ontology_proposal_request.py +26 -0
- hyperfluid/models/archive_download_response.py +15 -0
- hyperfluid/models/archive_export_request.py +24 -0
- hyperfluid/models/archive_file_type.py +14 -0
- hyperfluid/models/archive_import_request.py +26 -0
- hyperfluid/models/archive_operation_status.py +19 -0
- hyperfluid/models/archive_operation_type.py +15 -0
- hyperfluid/models/ask_ai_agent_request.py +28 -0
- hyperfluid/models/ask_ai_agent_response.py +21 -0
- hyperfluid/models/assistant_answer.py +21 -0
- hyperfluid/models/assistant_request.py +23 -0
- hyperfluid/models/atlas_article.py +21 -0
- hyperfluid/models/atlas_article_summary.py +45 -0
- hyperfluid/models/atlas_assistant_request.py +17 -0
- hyperfluid/models/atlas_assistant_response.py +24 -0
- hyperfluid/models/atlas_assistant_source.py +19 -0
- hyperfluid/models/atlas_assistant_status.py +18 -0
- hyperfluid/models/atlas_entry.py +29 -0
- hyperfluid/models/atlas_entry_kind.py +20 -0
- hyperfluid/models/atlas_localized_text.py +15 -0
- hyperfluid/models/atlas_manifest.py +24 -0
- hyperfluid/models/atlas_persona.py +21 -0
- hyperfluid/models/atlas_procedure_revision.py +25 -0
- hyperfluid/models/atlas_save_entry.py +35 -0
- hyperfluid/models/atlas_search_request.py +24 -0
- hyperfluid/models/atlas_search_response.py +24 -0
- hyperfluid/models/atlas_search_result.py +27 -0
- hyperfluid/models/atlas_status.py +19 -0
- hyperfluid/models/atlas_verification.py +17 -0
- hyperfluid/models/atlas_visibility.py +15 -0
- hyperfluid/models/atlas_workspace.py +23 -0
- hyperfluid/models/audit_actor.py +20 -0
- hyperfluid/models/audit_actor_kind.py +23 -0
- hyperfluid/models/audit_entry_kind.py +15 -0
- hyperfluid/models/audit_log_event.py +111 -0
- hyperfluid/models/audit_log_event_authz_break_glass_used_variant.py +20 -0
- hyperfluid/models/audit_log_event_authz_organization_policy_revoked_variant.py +23 -0
- hyperfluid/models/audit_log_event_console_authz_decision_variant.py +19 -0
- hyperfluid/models/audit_log_event_container_app_image_synced_variant.py +21 -0
- hyperfluid/models/audit_log_event_data_dock_opa_evaluation_variant.py +19 -0
- hyperfluid/models/audit_log_event_managed_postgresql_import_created_variant.py +24 -0
- hyperfluid/models/audit_log_event_object_storage_owner_key_revealed_variant.py +27 -0
- hyperfluid/models/audit_log_event_object_storage_usage_collected_variant.py +23 -0
- hyperfluid/models/audit_log_event_platform_admin_action_variant.py +21 -0
- hyperfluid/models/audit_log_event_runtime_security_alert_variant.py +25 -0
- hyperfluid/models/audit_log_event_s3_gateway_decision_variant.py +19 -0
- hyperfluid/models/audit_log_event_s3_gateway_gate_denied_variant.py +21 -0
- hyperfluid/models/audit_log_event_s3_gateway_session_issued_variant.py +19 -0
- hyperfluid/models/audit_log_event_security_decision_variant.py +19 -0
- hyperfluid/models/audit_log_event_trino_query_completed_variant.py +21 -0
- hyperfluid/models/audit_log_event_type.py +52 -0
- hyperfluid/models/audit_log_event_virtual_machine_console_session_variant.py +23 -0
- hyperfluid/models/audit_log_event_workstation_agent_request_variant.py +25 -0
- hyperfluid/models/audit_log_event_workstation_preview_session_variant.py +22 -0
- hyperfluid/models/audit_log_event_workstation_terminal_command_variant.py +20 -0
- hyperfluid/models/audit_log_freshness.py +17 -0
- hyperfluid/models/audit_log_page_audit_entry.py +28 -0
- hyperfluid/models/audit_log_page_audit_entry_data_item.py +124 -0
- hyperfluid/models/audit_log_page_list_audit_log_item.py +30 -0
- hyperfluid/models/audit_log_page_list_audit_log_item_data_item.py +43 -0
- hyperfluid/models/authorize_preview_response.py +27 -0
- hyperfluid/models/authz_break_glass_used_log.py +21 -0
- hyperfluid/models/authz_organization_policy_revoked_log.py +28 -0
- hyperfluid/models/auto_suspend_input.py +15 -0
- hyperfluid/models/autoscaling_spec.py +52 -0
- hyperfluid/models/available_image.py +42 -0
- hyperfluid/models/backend_driver.py +15 -0
- hyperfluid/models/backup_origin.py +19 -0
- hyperfluid/models/backup_policy.py +15 -0
- hyperfluid/models/backup_target_crd_spec_response.py +23 -0
- hyperfluid/models/backup_target_instance.py +15 -0
- hyperfluid/models/backup_target_response.py +49 -0
- hyperfluid/models/backup_target_source_request.py +28 -0
- hyperfluid/models/backup_target_source_request_external_variant.py +27 -0
- hyperfluid/models/backup_target_source_request_internal_variant.py +23 -0
- hyperfluid/models/bifrost_event_dto.py +41 -0
- hyperfluid/models/bifrost_event_status.py +15 -0
- hyperfluid/models/bifrost_events_response.py +27 -0
- hyperfluid/models/bifrost_feature_status_response.py +23 -0
- hyperfluid/models/bifrost_info_response.py +21 -0
- hyperfluid/models/bifrost_overview_response.py +44 -0
- hyperfluid/models/bifrost_protocol.py +21 -0
- hyperfluid/models/bifrost_timeseries_point_dto.py +17 -0
- hyperfluid/models/bifrost_timeseries_response.py +27 -0
- hyperfluid/models/bifrost_top_response.py +27 -0
- hyperfluid/models/bifrost_top_row_dto.py +20 -0
- hyperfluid/models/branch_list.py +17 -0
- hyperfluid/models/bucket_archive_operation.py +63 -0
- hyperfluid/models/bucket_credentials.py +17 -0
- hyperfluid/models/bucket_field.py +28 -0
- hyperfluid/models/bucket_object.py +21 -0
- hyperfluid/models/bucket_object_listing.py +26 -0
- hyperfluid/models/bucket_ref_spec_response.py +25 -0
- hyperfluid/models/budget_author.py +15 -0
- hyperfluid/models/capacity_usage_item_response.py +33 -0
- hyperfluid/models/catalog_exposure_response.py +25 -0
- hyperfluid/models/catalog_exposure_table_entry.py +20 -0
- hyperfluid/models/catalog_failure_kind.py +23 -0
- hyperfluid/models/catalog_introspection_failure.py +25 -0
- hyperfluid/models/catalog_item.py +31 -0
- hyperfluid/models/catalog_model.py +67 -0
- hyperfluid/models/catalog_repository_response.py +25 -0
- hyperfluid/models/catalog_response.py +17 -0
- hyperfluid/models/ceph_zone_response.py +20 -0
- hyperfluid/models/changelog_entry_response.py +32 -0
- hyperfluid/models/channel_body.py +28 -0
- hyperfluid/models/channel_kind.py +18 -0
- hyperfluid/models/chart_encodings.py +25 -0
- hyperfluid/models/chart_options.py +39 -0
- hyperfluid/models/chart_type.py +25 -0
- hyperfluid/models/check_image_source_response.py +15 -0
- hyperfluid/models/check_name_availability_response_data.py +13 -0
- hyperfluid/models/check_organization_name_availability_response_data.py +13 -0
- hyperfluid/models/checkout_request.py +18 -0
- hyperfluid/models/classification_config.py +49 -0
- hyperfluid/models/classification_stats_response.py +37 -0
- hyperfluid/models/cli_version_response.py +13 -0
- hyperfluid/models/clone_iceberg_table_request_body.py +19 -0
- hyperfluid/models/commit_request.py +13 -0
- hyperfluid/models/commit_response.py +13 -0
- hyperfluid/models/comparator.py +15 -0
- hyperfluid/models/complete_managed_postgresql_import_upload_request_body.py +24 -0
- hyperfluid/models/complete_multipart_upload_request.py +24 -0
- hyperfluid/models/completed_part_info.py +17 -0
- hyperfluid/models/compute_dock_crd_partition.py +27 -0
- hyperfluid/models/compute_dock_crd_spec_response.py +41 -0
- hyperfluid/models/compute_dock_partition_status.py +27 -0
- hyperfluid/models/compute_dock_response.py +47 -0
- hyperfluid/models/compute_engine_input.py +15 -0
- hyperfluid/models/condition.py +36 -0
- hyperfluid/models/condition_principal_attribute_equals_variant.py +21 -0
- hyperfluid/models/condition_request_attribute_equals_variant.py +20 -0
- hyperfluid/models/condition_view.py +29 -0
- hyperfluid/models/configuration_model.py +15 -0
- hyperfluid/models/connector_descriptor_response.py +30 -0
- hyperfluid/models/console_authz_decision_log.py +52 -0
- hyperfluid/models/console_config_feature_flag.py +48 -0
- hyperfluid/models/console_session_phase.py +15 -0
- hyperfluid/models/container_app_crd_spec_response.py +168 -0
- hyperfluid/models/container_app_image_synced_log.py +35 -0
- hyperfluid/models/container_app_metrics.py +22 -0
- hyperfluid/models/container_app_platform_url_response.py +24 -0
- hyperfluid/models/container_app_pod_info.py +60 -0
- hyperfluid/models/container_app_port_input.py +31 -0
- hyperfluid/models/container_app_port_response.py +29 -0
- hyperfluid/models/container_app_response.py +72 -0
- hyperfluid/models/container_app_usage_dto.py +44 -0
- hyperfluid/models/container_app_volume_usage_dto.py +38 -0
- hyperfluid/models/container_app_volumes_response.py +21 -0
- hyperfluid/models/container_apps_usage_response.py +26 -0
- hyperfluid/models/container_row.py +44 -0
- hyperfluid/models/context_provider_response.py +37 -0
- hyperfluid/models/contextual_restriction_response.py +36 -0
- hyperfluid/models/copilot_generate_request.py +39 -0
- hyperfluid/models/copilot_generate_response.py +23 -0
- hyperfluid/models/copilot_repair_context.py +20 -0
- hyperfluid/models/copilot_turn.py +18 -0
- hyperfluid/models/copilot_widget_proposal.py +25 -0
- hyperfluid/models/copy_destination_config.py +40 -0
- hyperfluid/models/copy_destination_config_data_container_variant.py +21 -0
- hyperfluid/models/copy_destination_config_harbor_bucket_variant.py +24 -0
- hyperfluid/models/copy_s3_source_config.py +36 -0
- hyperfluid/models/copy_s3_source_config_data_container_variant.py +21 -0
- hyperfluid/models/copy_s3_source_config_harbor_bucket_variant.py +24 -0
- hyperfluid/models/copy_source_config.py +23 -0
- hyperfluid/models/count_ref_request.py +29 -0
- hyperfluid/models/count_secrets_response.py +13 -0
- hyperfluid/models/crd_owner.py +32 -0
- hyperfluid/models/crd_owner_gitops_variant.py +23 -0
- hyperfluid/models/crd_owner_pipeline_variant.py +18 -0
- hyperfluid/models/crd_owner_ui_variant.py +14 -0
- hyperfluid/models/crd_owner_unknown_variant.py +15 -0
- hyperfluid/models/crd_status_snapshot.py +39 -0
- hyperfluid/models/create_action_type_request.py +29 -0
- hyperfluid/models/create_ai_agent_request.py +89 -0
- hyperfluid/models/create_airflow_connection_request.py +56 -0
- hyperfluid/models/create_airflow_crd_request_body.py +60 -0
- hyperfluid/models/create_api_key_request.py +24 -0
- hyperfluid/models/create_api_key_response.py +27 -0
- hyperfluid/models/create_app_instance_crd_request_body.py +26 -0
- hyperfluid/models/create_backup_target_crd_request_body.py +36 -0
- hyperfluid/models/create_compute_dock_crd_request_body.py +68 -0
- hyperfluid/models/create_connector_ingest_request.py +38 -0
- hyperfluid/models/create_container_app_crd_request_body.py +128 -0
- hyperfluid/models/create_context_enricher_pipeline_request.py +27 -0
- hyperfluid/models/create_context_provider_body.py +24 -0
- hyperfluid/models/create_contextual_restriction_body.py +24 -0
- hyperfluid/models/create_copy_pipeline_request.py +23 -0
- hyperfluid/models/create_dashboard_request.py +31 -0
- hyperfluid/models/create_data_dock_catalog_request.py +63 -0
- hyperfluid/models/create_data_dock_catalog_response.py +19 -0
- hyperfluid/models/create_data_dock_request_body.py +24 -0
- hyperfluid/models/create_dev_workstation_request.py +116 -0
- hyperfluid/models/create_domain_verification_request_body.py +15 -0
- hyperfluid/models/create_faker_schema_request.py +15 -0
- hyperfluid/models/create_faker_table_request.py +15 -0
- hyperfluid/models/create_faker_table_structured_request.py +19 -0
- hyperfluid/models/create_file_router_pipeline_request.py +26 -0
- hyperfluid/models/create_file_sorter_request.py +32 -0
- hyperfluid/models/create_forgejo_runner_request.py +48 -0
- hyperfluid/models/create_g_drive_pipeline_request.py +33 -0
- hyperfluid/models/create_github_connection_request.py +27 -0
- hyperfluid/models/create_github_runner_request.py +63 -0
- hyperfluid/models/create_grant_request_body.py +34 -0
- hyperfluid/models/create_group_request_body.py +16 -0
- hyperfluid/models/create_harbor_crd_request_body.py +15 -0
- hyperfluid/models/create_hf_bucket_request.py +30 -0
- hyperfluid/models/create_hf_key_value_cache_crd_request_body.py +38 -0
- hyperfluid/models/create_iceberg_data_container_request_body.py +21 -0
- hyperfluid/models/create_iceberg_table_metadata_request.py +42 -0
- hyperfluid/models/create_identity_provider_request.py +31 -0
- hyperfluid/models/create_inbound_email_pipeline_request.py +36 -0
- hyperfluid/models/create_invitation_request.py +16 -0
- hyperfluid/models/create_kafka_hf_service_request.py +33 -0
- hyperfluid/models/create_kafka_hf_topic_request.py +20 -0
- hyperfluid/models/create_link_type_request.py +28 -0
- hyperfluid/models/create_managed_postgresql_backup_crd_request_body.py +17 -0
- hyperfluid/models/create_managed_postgresql_crd_request_body.py +62 -0
- hyperfluid/models/create_managed_postgresql_import_crd_request_body.py +33 -0
- hyperfluid/models/create_managed_postgresql_user_crd_request_body.py +29 -0
- hyperfluid/models/create_medallion_schema_request.py +19 -0
- hyperfluid/models/create_model_serving_request.py +35 -0
- hyperfluid/models/create_nextflow_crd_request_body.py +53 -0
- hyperfluid/models/create_object_type_request.py +34 -0
- hyperfluid/models/create_open_data_pipeline_request.py +23 -0
- hyperfluid/models/create_or_update_egress_allowlist_request.py +24 -0
- hyperfluid/models/create_organization_policy_request_body.py +29 -0
- hyperfluid/models/create_organization_request_body.py +17 -0
- hyperfluid/models/create_page_splitter_pipeline_request.py +22 -0
- hyperfluid/models/create_pipeline_request_v2.py +71 -0
- hyperfluid/models/create_pipeline_request_v2_context_enricher_variant.py +25 -0
- hyperfluid/models/create_pipeline_request_v2_copy_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_file_router_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_file_sorter_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_inbound_email_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_open_data_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_page_splitter_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_share_point_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2_trino_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2g_drive_variant.py +21 -0
- hyperfluid/models/create_pipeline_request_v2s3_copy_variant.py +21 -0
- hyperfluid/models/create_postgresql_data_container_request_body.py +23 -0
- hyperfluid/models/create_property_definition_request.py +25 -0
- hyperfluid/models/create_ref_request.py +24 -0
- hyperfluid/models/create_registry_project_request_body.py +16 -0
- hyperfluid/models/create_s3_copy_pipeline_request.py +23 -0
- hyperfluid/models/create_saved_query_request.py +36 -0
- hyperfluid/models/create_secret_request_body.py +35 -0
- hyperfluid/models/create_service_account_crd_request_body.py +38 -0
- hyperfluid/models/create_service_link_request_body.py +24 -0
- hyperfluid/models/create_session_request.py +20 -0
- hyperfluid/models/create_session_response.py +24 -0
- hyperfluid/models/create_share_point_pipeline_request.py +41 -0
- hyperfluid/models/create_signup_request_body.py +31 -0
- hyperfluid/models/create_signup_request_response.py +14 -0
- hyperfluid/models/create_skill_registry_request.py +34 -0
- hyperfluid/models/create_skill_request.py +21 -0
- hyperfluid/models/create_support_message_request.py +14 -0
- hyperfluid/models/create_support_ticket_request.py +37 -0
- hyperfluid/models/create_table_classification_body.py +25 -0
- hyperfluid/models/create_trino_pipeline_request.py +36 -0
- hyperfluid/models/create_user.py +22 -0
- hyperfluid/models/create_virtual_machine_crd_request_body.py +42 -0
- hyperfluid/models/create_virtual_machine_user_crd_request_body.py +24 -0
- hyperfluid/models/create_workstation_template_request.py +60 -0
- hyperfluid/models/credential_location.py +17 -0
- hyperfluid/models/credit_balance.py +24 -0
- hyperfluid/models/credit_budgets_response.py +17 -0
- hyperfluid/models/credit_ledger_line.py +39 -0
- hyperfluid/models/credit_ledger_response.py +19 -0
- hyperfluid/models/credit_spend_by_model.py +17 -0
- hyperfluid/models/credit_spend_by_model_response.py +17 -0
- hyperfluid/models/custom_domain_availability_response.py +39 -0
- hyperfluid/models/custom_domain_dns_record.py +20 -0
- hyperfluid/models/custom_domain_holder.py +25 -0
- hyperfluid/models/custom_domain_input.py +23 -0
- hyperfluid/models/custom_domain_response.py +37 -0
- hyperfluid/models/custom_domain_target_response.py +17 -0
- hyperfluid/models/custom_domain_tls_mode_input.py +15 -0
- hyperfluid/models/custom_flavor_bounds_dto.py +23 -0
- hyperfluid/models/custom_metric_names_response.py +18 -0
- hyperfluid/models/custom_metric_series_dto.py +24 -0
- hyperfluid/models/custom_metrics_query_request.py +21 -0
- hyperfluid/models/custom_metrics_query_response.py +31 -0
- hyperfluid/models/custom_resource_input.py +27 -0
- hyperfluid/models/dashboard.py +51 -0
- hyperfluid/models/dashboard_status.py +16 -0
- hyperfluid/models/dashboard_summary.py +42 -0
- hyperfluid/models/dashboard_variable.py +29 -0
- hyperfluid/models/dashboard_version_summary.py +23 -0
- hyperfluid/models/dashboard_widget.py +52 -0
- hyperfluid/models/data_access_baseline.py +17 -0
- hyperfluid/models/data_container_overview.py +20 -0
- hyperfluid/models/data_dock.py +72 -0
- hyperfluid/models/data_dock_catalog_info.py +30 -0
- hyperfluid/models/data_dock_catalog_kind.py +36 -0
- hyperfluid/models/data_dock_external_response_data.py +40 -0
- hyperfluid/models/data_dock_internet_exposure_response.py +33 -0
- hyperfluid/models/data_dock_kind.py +18 -0
- hyperfluid/models/data_dock_kind_external_response.py +20 -0
- hyperfluid/models/data_dock_kind_external_response_trino_internal_variant.py +19 -0
- hyperfluid/models/data_dock_kind_request.py +20 -0
- hyperfluid/models/data_dock_kind_request_trino_internal_variant.py +19 -0
- hyperfluid/models/data_dock_kind_trino_internal_variant.py +19 -0
- hyperfluid/models/data_dock_resource_groups_response.py +26 -0
- hyperfluid/models/data_dock_search_request.py +43 -0
- hyperfluid/models/data_dock_search_response.py +21 -0
- hyperfluid/models/data_dock_search_result_item.py +21 -0
- hyperfluid/models/data_dock_security_settings_response.py +45 -0
- hyperfluid/models/data_dock_status.py +21 -0
- hyperfluid/models/data_dock_type.py +16 -0
- hyperfluid/models/data_verb.py +32 -0
- hyperfluid/models/data_verb_decision.py +22 -0
- hyperfluid/models/declared_link.py +26 -0
- hyperfluid/models/declared_network.py +29 -0
- hyperfluid/models/deduping_strategy.py +21 -0
- hyperfluid/models/delete_directory_response.py +14 -0
- hyperfluid/models/delete_prefix_result.py +28 -0
- hyperfluid/models/delete_preview_downstream.py +23 -0
- hyperfluid/models/delete_preview_response.py +42 -0
- hyperfluid/models/delete_warning.py +19 -0
- hyperfluid/models/destination_config.py +22 -0
- hyperfluid/models/detach_image_source_request.py +25 -0
- hyperfluid/models/dev_workstation_audit_status.py +30 -0
- hyperfluid/models/dev_workstation_egress_flows_response.py +21 -0
- hyperfluid/models/dev_workstation_egress_response.py +26 -0
- hyperfluid/models/dev_workstation_metrics.py +33 -0
- hyperfluid/models/dev_workstation_network_response.py +19 -0
- hyperfluid/models/dev_workstation_response.py +58 -0
- hyperfluid/models/dev_workstation_setup_report_response.py +36 -0
- hyperfluid/models/dev_workstation_status_response.py +23 -0
- hyperfluid/models/dev_workstation_transcript_entry.py +25 -0
- hyperfluid/models/discard_request.py +14 -0
- hyperfluid/models/domain_verification_response.py +61 -0
- hyperfluid/models/domain_verification_state_dto.py +15 -0
- hyperfluid/models/downgrade_offer.py +17 -0
- hyperfluid/models/download_service_account_response.py +50 -0
- hyperfluid/models/duplicate_dashboard_request.py +14 -0
- hyperfluid/models/dynamic_label.py +23 -0
- hyperfluid/models/dynamic_label_placeholder.py +24 -0
- hyperfluid/models/effect.py +16 -0
- hyperfluid/models/effective_data_access_response.py +28 -0
- hyperfluid/models/effective_security_settings_response.py +43 -0
- hyperfluid/models/egress_allowlist_response.py +26 -0
- hyperfluid/models/egress_destination_kind_dto.py +16 -0
- hyperfluid/models/egress_flow_summary_dto.py +32 -0
- hyperfluid/models/egress_verdict_dto.py +15 -0
- hyperfluid/models/email_auth_policy.py +19 -0
- hyperfluid/models/enable_sql_engine_request.py +53 -0
- hyperfluid/models/enable_sql_engine_response.py +29 -0
- hyperfluid/models/engine.py +16 -0
- hyperfluid/models/env_var_input.py +15 -0
- hyperfluid/models/env_var_spec_response.py +15 -0
- hyperfluid/models/environment_map_node.py +29 -0
- hyperfluid/models/environment_map_response.py +21 -0
- hyperfluid/models/execute_action_request.py +21 -0
- hyperfluid/models/execute_request.py +27 -0
- hyperfluid/models/exposed_table_ref.py +15 -0
- hyperfluid/models/exposure_mode.py +19 -0
- hyperfluid/models/faker_field_type.py +21 -0
- hyperfluid/models/faker_schema_overview.py +23 -0
- hyperfluid/models/faker_table_field_options.py +13 -0
- hyperfluid/models/faker_table_fields.py +23 -0
- hyperfluid/models/faker_table_overview.py +31 -0
- hyperfluid/models/faker_table_template.py +19 -0
- hyperfluid/models/file_content.py +31 -0
- hyperfluid/models/file_import_result.py +33 -0
- hyperfluid/models/file_mount_input.py +26 -0
- hyperfluid/models/file_mount_response.py +24 -0
- hyperfluid/models/file_mount_source_input.py +29 -0
- hyperfluid/models/file_mount_source_input_inline_variant.py +17 -0
- hyperfluid/models/file_mount_source_input_secret_manager_variant.py +17 -0
- hyperfluid/models/file_mount_source_response.py +32 -0
- hyperfluid/models/file_mount_source_response_inline_variant.py +18 -0
- hyperfluid/models/file_mount_source_response_secret_manager_variant.py +17 -0
- hyperfluid/models/file_preview.py +25 -0
- hyperfluid/models/file_sorter_destination_config.py +18 -0
- hyperfluid/models/file_sorter_routing_config.py +17 -0
- hyperfluid/models/file_sorter_source_config.py +40 -0
- hyperfluid/models/file_sorter_source_config_data_container_variant.py +21 -0
- hyperfluid/models/file_sorter_source_config_harbor_bucket_variant.py +24 -0
- hyperfluid/models/finding.py +27 -0
- hyperfluid/models/fixable_counts.py +17 -0
- hyperfluid/models/flow_direction.py +15 -0
- hyperfluid/models/flow_verdict.py +15 -0
- hyperfluid/models/forgejo_repo_entry.py +24 -0
- hyperfluid/models/forgejo_runner_response.py +57 -0
- hyperfluid/models/forgejo_runner_status_response.py +39 -0
- hyperfluid/models/g_drive_extraction_config.py +30 -0
- hyperfluid/models/g_drive_extraction_type.py +15 -0
- hyperfluid/models/g_drive_source_config.py +33 -0
- hyperfluid/models/gc_status_response.py +26 -0
- hyperfluid/models/generate_ontology_request.py +36 -0
- hyperfluid/models/get_console_config_response.py +73 -0
- hyperfluid/models/get_faker_field_types_response.py +20 -0
- hyperfluid/models/get_faker_schema_response.py +17 -0
- hyperfluid/models/get_faker_table_response.py +17 -0
- hyperfluid/models/get_faker_tables_response.py +17 -0
- hyperfluid/models/get_run_response.py +17 -0
- hyperfluid/models/git_diff.py +23 -0
- hyperfluid/models/git_file_status.py +17 -0
- hyperfluid/models/git_image_source.py +54 -0
- hyperfluid/models/git_provider.py +16 -0
- hyperfluid/models/git_ref.py +27 -0
- hyperfluid/models/git_ref_branch_variant.py +16 -0
- hyperfluid/models/git_ref_tag_variant.py +16 -0
- hyperfluid/models/git_repo_status.py +35 -0
- hyperfluid/models/github_connection_credential_dto.py +36 -0
- hyperfluid/models/github_connection_credential_dto_github_app_variant.py +31 -0
- hyperfluid/models/github_connection_credential_dto_pat_variant.py +19 -0
- hyperfluid/models/github_connection_response.py +23 -0
- hyperfluid/models/github_connection_target.py +40 -0
- hyperfluid/models/github_connection_target_kind.py +15 -0
- hyperfluid/models/github_runner_egress_mode_dto.py +16 -0
- hyperfluid/models/github_runner_pool_egress_flows_response.py +36 -0
- hyperfluid/models/github_runner_response.py +69 -0
- hyperfluid/models/github_runner_scope.py +22 -0
- hyperfluid/models/github_runner_scope_org_variant.py +18 -0
- hyperfluid/models/github_runner_scope_repo_variant.py +21 -0
- hyperfluid/models/github_runner_status_response.py +43 -0
- hyperfluid/models/gpu_availability_response.py +39 -0
- hyperfluid/models/gpu_consumer_view.py +34 -0
- hyperfluid/models/gpu_fleet_summary.py +31 -0
- hyperfluid/models/gpu_node_view.py +55 -0
- hyperfluid/models/gpu_resources_response.py +21 -0
- hyperfluid/models/grant.py +47 -0
- hyperfluid/models/group.py +28 -0
- hyperfluid/models/group_member.py +23 -0
- hyperfluid/models/harbor.py +30 -0
- hyperfluid/models/harbor_network_isolation_response.py +17 -0
- hyperfluid/models/harbor_posture.py +34 -0
- hyperfluid/models/harbor_ref.py +19 -0
- hyperfluid/models/harbor_storage_binding_view.py +54 -0
- hyperfluid/models/health_thresholds.py +23 -0
- hyperfluid/models/hf_bucket_detail.py +110 -0
- hyperfluid/models/hf_bucket_view.py +70 -0
- hyperfluid/models/hf_collumn.py +19 -0
- hyperfluid/models/hf_data_type.py +23 -0
- hyperfluid/models/hf_key_value_cache_crd_spec_response.py +23 -0
- hyperfluid/models/hf_key_value_cache_response.py +47 -0
- hyperfluid/models/hf_table.py +26 -0
- hyperfluid/models/histogram_bucket_dto.py +20 -0
- hyperfluid/models/iceberg_column_definition.py +19 -0
- hyperfluid/models/iceberg_connector_data_container.py +20 -0
- hyperfluid/models/iceberg_health_report.py +24 -0
- hyperfluid/models/iceberg_health_scan.py +35 -0
- hyperfluid/models/iceberg_health_summary.py +47 -0
- hyperfluid/models/iceberg_optimize_config.py +62 -0
- hyperfluid/models/iceberg_optimize_run.py +63 -0
- hyperfluid/models/iceberg_optimize_runs_page.py +29 -0
- hyperfluid/models/iceberg_optimize_summary.py +51 -0
- hyperfluid/models/iceberg_schema_metadata.py +46 -0
- hyperfluid/models/iceberg_table_health.py +91 -0
- hyperfluid/models/iceberg_table_metadata.py +27 -0
- hyperfluid/models/iceberg_table_response_data.py +47 -0
- hyperfluid/models/identity_provider.py +30 -0
- hyperfluid/models/identity_provider_kind.py +16 -0
- hyperfluid/models/image_posture.py +37 -0
- hyperfluid/models/image_ref.py +16 -0
- hyperfluid/models/image_scan.py +52 -0
- hyperfluid/models/image_scan_detail.py +55 -0
- hyperfluid/models/image_source.py +18 -0
- hyperfluid/models/image_source_error.py +19 -0
- hyperfluid/models/image_source_status.py +72 -0
- hyperfluid/models/image_source_syncs_page.py +21 -0
- hyperfluid/models/imap_transport_config.py +46 -0
- hyperfluid/models/import_api_extra_filter.py +17 -0
- hyperfluid/models/import_column_type.py +21 -0
- hyperfluid/models/import_file_format.py +18 -0
- hyperfluid/models/imported_column.py +23 -0
- hyperfluid/models/inbound_email_destination_config.py +35 -0
- hyperfluid/models/inbound_email_destination_config_data_container_variant.py +21 -0
- hyperfluid/models/inbound_email_destination_config_harbor_bucket_variant.py +24 -0
- hyperfluid/models/inbound_email_extraction_config.py +23 -0
- hyperfluid/models/inbound_email_security_config.py +36 -0
- hyperfluid/models/inbound_email_source_config.py +23 -0
- hyperfluid/models/inbound_email_source_config_imap_variant.py +21 -0
- hyperfluid/models/init_container_input.py +38 -0
- hyperfluid/models/init_container_response.py +26 -0
- hyperfluid/models/install_media.py +15 -0
- hyperfluid/models/instance_page.py +28 -0
- hyperfluid/models/instance_usage_dto.py +20 -0
- hyperfluid/models/intended_use.py +15 -0
- hyperfluid/models/internet_exposure_state.py +29 -0
- hyperfluid/models/invitation_identity_provider.py +17 -0
- hyperfluid/models/invitation_preview.py +28 -0
- hyperfluid/models/issue_s3_key_request.py +22 -0
- hyperfluid/models/issue_scoped_s3_key_request.py +31 -0
- hyperfluid/models/issued_s3_key.py +28 -0
- hyperfluid/models/issued_scoped_s3_key.py +37 -0
- hyperfluid/models/kafka_consumer_group.py +19 -0
- hyperfluid/models/kafka_hf_service_response.py +63 -0
- hyperfluid/models/kafka_hf_topic_response.py +39 -0
- hyperfluid/models/kafka_metadata.py +22 -0
- hyperfluid/models/kafka_topic_info.py +21 -0
- hyperfluid/models/kpi_threshold.py +17 -0
- hyperfluid/models/label.py +58 -0
- hyperfluid/models/label_type_dynamic_variant.py +21 -0
- hyperfluid/models/label_type_static_variant.py +14 -0
- hyperfluid/models/launch_nextflow_run_request_body.py +40 -0
- hyperfluid/models/link_forgejo_credential_request.py +16 -0
- hyperfluid/models/link_forgejo_credential_response.py +20 -0
- hyperfluid/models/link_type.py +40 -0
- hyperfluid/models/list_audit_log_item.py +43 -0
- hyperfluid/models/list_changelogs_response.py +18 -0
- hyperfluid/models/list_connectors_response.py +17 -0
- hyperfluid/models/list_context_providers_response.py +17 -0
- hyperfluid/models/list_contextual_restrictions_response.py +17 -0
- hyperfluid/models/list_quota_profiles_response.py +17 -0
- hyperfluid/models/list_runs_response.py +17 -0
- hyperfluid/models/list_secrets_response.py +26 -0
- hyperfluid/models/list_security_decisions_response.py +17 -0
- hyperfluid/models/list_service_accounts_response_data.py +17 -0
- hyperfluid/models/list_table_classifications_response.py +17 -0
- hyperfluid/models/list_user_attributes_response.py +14 -0
- hyperfluid/models/live_audit_log.py +24 -0
- hyperfluid/models/log_entry_dto.py +25 -0
- hyperfluid/models/log_level.py +23 -0
- hyperfluid/models/log_source_dto.py +19 -0
- hyperfluid/models/log_stream.py +16 -0
- hyperfluid/models/managed_mail_config_response.py +22 -0
- hyperfluid/models/managed_postgresql_backup_crd_response.py +31 -0
- hyperfluid/models/managed_postgresql_backup_response.py +59 -0
- hyperfluid/models/managed_postgresql_backups_page.py +23 -0
- hyperfluid/models/managed_postgresql_crd_spec_response.py +41 -0
- hyperfluid/models/managed_postgresql_import_compression.py +15 -0
- hyperfluid/models/managed_postgresql_import_condition.py +19 -0
- hyperfluid/models/managed_postgresql_import_crd_response.py +50 -0
- hyperfluid/models/managed_postgresql_import_created_log.py +43 -0
- hyperfluid/models/managed_postgresql_import_format.py +17 -0
- hyperfluid/models/managed_postgresql_import_phase.py +22 -0
- hyperfluid/models/managed_postgresql_import_response.py +73 -0
- hyperfluid/models/managed_postgresql_import_upload.py +28 -0
- hyperfluid/models/managed_postgresql_import_upload_multipart_variant.py +24 -0
- hyperfluid/models/managed_postgresql_import_upload_simple_variant.py +16 -0
- hyperfluid/models/managed_postgresql_imports_page.py +23 -0
- hyperfluid/models/managed_postgresql_response.py +95 -0
- hyperfluid/models/managed_postgresql_user_crd_spec_response.py +17 -0
- hyperfluid/models/managed_postgresql_user_response.py +40 -0
- hyperfluid/models/map_badge.py +38 -0
- hyperfluid/models/matching_tag.py +15 -0
- hyperfluid/models/medallion_tier.py +16 -0
- hyperfluid/models/message_attachment.py +25 -0
- hyperfluid/models/message_author_kind.py +19 -0
- hyperfluid/models/message_part.py +36 -0
- hyperfluid/models/message_part_file_variant.py +35 -0
- hyperfluid/models/message_part_patch_variant.py +19 -0
- hyperfluid/models/message_part_reasoning_variant.py +19 -0
- hyperfluid/models/message_part_text_variant.py +20 -0
- hyperfluid/models/message_part_tool_variant.py +38 -0
- hyperfluid/models/message_role.py +17 -0
- hyperfluid/models/metadata_storage_config.py +21 -0
- hyperfluid/models/metric_panel_dto.py +27 -0
- hyperfluid/models/metric_point_dto.py +15 -0
- hyperfluid/models/metric_series_dto.py +19 -0
- hyperfluid/models/metrics_range.py +23 -0
- hyperfluid/models/model_catalog_response.py +21 -0
- hyperfluid/models/model_config.py +31 -0
- hyperfluid/models/model_option.py +50 -0
- hyperfluid/models/model_protocol.py +30 -0
- hyperfluid/models/model_resources.py +20 -0
- hyperfluid/models/model_runtime.py +16 -0
- hyperfluid/models/model_serving_phase.py +21 -0
- hyperfluid/models/model_serving_response.py +60 -0
- hyperfluid/models/model_type.py +16 -0
- hyperfluid/models/model_usage.py +19 -0
- hyperfluid/models/model_usage_time_point.py +24 -0
- hyperfluid/models/multipart_part_url.py +15 -0
- hyperfluid/models/network_isolation_view.py +17 -0
- hyperfluid/models/nextflow_crd_response.py +40 -0
- hyperfluid/models/nextflow_crd_status_response.py +33 -0
- hyperfluid/models/nextflow_defaults_response.py +50 -0
- hyperfluid/models/nextflow_egress_request.py +20 -0
- hyperfluid/models/nextflow_head_request.py +15 -0
- hyperfluid/models/nextflow_pod_role.py +20 -0
- hyperfluid/models/nextflow_response.py +54 -0
- hyperfluid/models/nextflow_run_counts_response.py +17 -0
- hyperfluid/models/nextflow_run_detail_response.py +67 -0
- hyperfluid/models/nextflow_run_response.py +49 -0
- hyperfluid/models/nextflow_run_task_response.py +43 -0
- hyperfluid/models/nextflow_scm_platform.py +20 -0
- hyperfluid/models/nextflow_scm_request.py +26 -0
- hyperfluid/models/nextflow_storage_request.py +20 -0
- hyperfluid/models/nextflow_task_quota_request.py +18 -0
- hyperfluid/models/node_tier.py +22 -0
- hyperfluid/models/normalized_message.py +55 -0
- hyperfluid/models/notification_channel_dto.py +36 -0
- hyperfluid/models/object_delete_failure.py +18 -0
- hyperfluid/models/object_instance.py +24 -0
- hyperfluid/models/object_storage_owner_key_revealed_log.py +28 -0
- hyperfluid/models/object_storage_usage_collected_log.py +34 -0
- hyperfluid/models/object_type.py +51 -0
- hyperfluid/models/object_type_with_properties.py +21 -0
- hyperfluid/models/observed_flow.py +30 -0
- hyperfluid/models/observed_flows.py +25 -0
- hyperfluid/models/oci_registry_auth.py +17 -0
- hyperfluid/models/oci_registry_config_value.py +17 -0
- hyperfluid/models/ocr_provider_config.py +22 -0
- hyperfluid/models/ocr_provider_config_local_variant.py +29 -0
- hyperfluid/models/ocr_provider_config_mistral_variant.py +14 -0
- hyperfluid/models/ontology_proposal.py +24 -0
- hyperfluid/models/opa_decision_log.py +50 -0
- hyperfluid/models/open_data_catalog_response.py +17 -0
- hyperfluid/models/open_data_column_response.py +17 -0
- hyperfluid/models/open_data_dataset_response.py +35 -0
- hyperfluid/models/open_data_source_config.py +14 -0
- hyperfluid/models/org.py +36 -0
- hyperfluid/models/org_feature.py +49 -0
- hyperfluid/models/org_feature_state.py +19 -0
- hyperfluid/models/org_features_response.py +17 -0
- hyperfluid/models/org_posture.py +40 -0
- hyperfluid/models/org_ref.py +16 -0
- hyperfluid/models/org_rescan_request_body.py +29 -0
- hyperfluid/models/org_security_policies_response.py +17 -0
- hyperfluid/models/org_security_policy_state.py +20 -0
- hyperfluid/models/org_security_settings_response.py +27 -0
- hyperfluid/models/org_storage_view.py +52 -0
- hyperfluid/models/org_user_attributes_response.py +18 -0
- hyperfluid/models/org_workload_scan_settings_response.py +17 -0
- hyperfluid/models/organization_invitation.py +37 -0
- hyperfluid/models/organization_overview_response.py +48 -0
- hyperfluid/models/organization_policy.py +42 -0
- hyperfluid/models/organization_quota_response.py +23 -0
- hyperfluid/models/organization_workload_view.py +40 -0
- hyperfluid/models/panel_kind.py +15 -0
- hyperfluid/models/partition_input.py +35 -0
- hyperfluid/models/patch_airflow_connection_request.py +36 -0
- hyperfluid/models/patch_airflow_crd_request_body.py +44 -0
- hyperfluid/models/patch_app_instance_request_body.py +18 -0
- hyperfluid/models/patch_backup_target_crd_request_body.py +26 -0
- hyperfluid/models/patch_compute_dock_crd_request_body.py +43 -0
- hyperfluid/models/patch_compute_dock_crd_response.py +21 -0
- hyperfluid/models/patch_container_app_crd_request_body.py +153 -0
- hyperfluid/models/patch_container_app_request_body.py +25 -0
- hyperfluid/models/patch_harbor_storage_binding_request.py +15 -0
- hyperfluid/models/patch_hf_bucket_request.py +23 -0
- hyperfluid/models/patch_hf_key_value_cache_crd_request_body.py +32 -0
- hyperfluid/models/patch_managed_postgresql_crd_request_body.py +44 -0
- hyperfluid/models/patch_managed_postgresql_user_crd_request_body.py +23 -0
- hyperfluid/models/patch_model_serving_request.py +22 -0
- hyperfluid/models/patch_nextflow_crd_request_body.py +73 -0
- hyperfluid/models/patch_org_storage_request.py +24 -0
- hyperfluid/models/patch_virtual_machine_crd_request_body.py +24 -0
- hyperfluid/models/pending_permission.py +32 -0
- hyperfluid/models/pending_question.py +36 -0
- hyperfluid/models/permission_action.py +18 -0
- hyperfluid/models/permission_catalog_entry.py +23 -0
- hyperfluid/models/permission_key.py +398 -0
- hyperfluid/models/permission_level.py +15 -0
- hyperfluid/models/permission_policy_view.py +27 -0
- hyperfluid/models/permission_reply.py +19 -0
- hyperfluid/models/permission_reply_request.py +20 -0
- hyperfluid/models/persistence_access.py +16 -0
- hyperfluid/models/persistence_input.py +36 -0
- hyperfluid/models/persistence_response.py +25 -0
- hyperfluid/models/pipeline_detail_field.py +26 -0
- hyperfluid/models/pipeline_detail_group.py +34 -0
- hyperfluid/models/pipeline_detail_response.py +42 -0
- hyperfluid/models/pipeline_field_reference.py +44 -0
- hyperfluid/models/pipeline_field_reference_bucket_variant.py +16 -0
- hyperfluid/models/pipeline_field_reference_credential_variant.py +28 -0
- hyperfluid/models/pipeline_field_reference_shared_model_variant.py +16 -0
- hyperfluid/models/pipeline_field_reference_table_variant.py +21 -0
- hyperfluid/models/pipeline_metadata.py +49 -0
- hyperfluid/models/pipeline_response_data.py +36 -0
- hyperfluid/models/pipeline_run.py +62 -0
- hyperfluid/models/pipeline_run_status.py +19 -0
- hyperfluid/models/pipeline_stats.py +21 -0
- hyperfluid/models/pipeline_status_filter.py +17 -0
- hyperfluid/models/pipeline_type.py +40 -0
- hyperfluid/models/pipeline_type_count.py +17 -0
- hyperfluid/models/pipelines_page.py +30 -0
- hyperfluid/models/pipelines_stats.py +36 -0
- hyperfluid/models/pitr_request.py +38 -0
- hyperfluid/models/platform.py +17 -0
- hyperfluid/models/platform_admin_action_log.py +23 -0
- hyperfluid/models/policy_preset.py +23 -0
- hyperfluid/models/port_protocol.py +16 -0
- hyperfluid/models/post_message_request.py +32 -0
- hyperfluid/models/postgresql_connector_detail.py +33 -0
- hyperfluid/models/pr_checks.py +17 -0
- hyperfluid/models/pr_request.py +15 -0
- hyperfluid/models/pr_response.py +27 -0
- hyperfluid/models/pr_summary.py +35 -0
- hyperfluid/models/prepare_archive_import_request.py +23 -0
- hyperfluid/models/prepare_archive_import_response.py +26 -0
- hyperfluid/models/prepare_archive_import_response_multipart_variant.py +29 -0
- hyperfluid/models/prepare_archive_import_response_simple_variant.py +18 -0
- hyperfluid/models/prepare_managed_postgresql_import_upload_request_body.py +22 -0
- hyperfluid/models/prepare_managed_postgresql_import_upload_response.py +29 -0
- hyperfluid/models/preview_image_source_request.py +21 -0
- hyperfluid/models/preview_image_source_response.py +36 -0
- hyperfluid/models/preview_port.py +23 -0
- hyperfluid/models/preview_ports_response.py +22 -0
- hyperfluid/models/preview_posture.py +21 -0
- hyperfluid/models/principal_usage.py +29 -0
- hyperfluid/models/principal_usage_time_point.py +30 -0
- hyperfluid/models/property_definition.py +39 -0
- hyperfluid/models/proposed_link_type.py +32 -0
- hyperfluid/models/proposed_object_type.py +30 -0
- hyperfluid/models/proposed_property.py +28 -0
- hyperfluid/models/public_signup_page_copy.py +23 -0
- hyperfluid/models/query_history_entry.py +91 -0
- hyperfluid/models/query_history_page.py +24 -0
- hyperfluid/models/query_result.py +30 -0
- hyperfluid/models/query_result_column.py +15 -0
- hyperfluid/models/query_run.py +30 -0
- hyperfluid/models/query_run_error.py +16 -0
- hyperfluid/models/query_run_status.py +16 -0
- hyperfluid/models/question_info.py +31 -0
- hyperfluid/models/question_option.py +17 -0
- hyperfluid/models/question_reply_request.py +16 -0
- hyperfluid/models/quota_capacity_dimension.py +24 -0
- hyperfluid/models/quota_profile_response.py +61 -0
- hyperfluid/models/quota_resource_type.py +34 -0
- hyperfluid/models/quota_status.py +16 -0
- hyperfluid/models/quota_usage_item_response.py +27 -0
- hyperfluid/models/ref.py +49 -0
- hyperfluid/models/ref_status.py +17 -0
- hyperfluid/models/refresh_credentials_summary.py +23 -0
- hyperfluid/models/refresh_data_docks_response.py +17 -0
- hyperfluid/models/refusal_reason.py +32 -0
- hyperfluid/models/register_invitation_request.py +17 -0
- hyperfluid/models/registry_project_response.py +25 -0
- hyperfluid/models/registry_project_usage_response.py +25 -0
- hyperfluid/models/registry_response.py +51 -0
- hyperfluid/models/registry_usage_response.py +47 -0
- hyperfluid/models/rename_terminal_request.py +15 -0
- hyperfluid/models/requested_size.py +17 -0
- hyperfluid/models/requester_kind.py +21 -0
- hyperfluid/models/rescan_response.py +13 -0
- hyperfluid/models/rescan_scope.py +17 -0
- hyperfluid/models/resolve_failure_reason.py +34 -0
- hyperfluid/models/resolved_grant.py +32 -0
- hyperfluid/models/resolved_image.py +25 -0
- hyperfluid/models/resource_denial_count.py +15 -0
- hyperfluid/models/resource_family.py +18 -0
- hyperfluid/models/resource_kind.py +42 -0
- hyperfluid/models/resource_logs_response.py +49 -0
- hyperfluid/models/resource_metrics_response.py +29 -0
- hyperfluid/models/resource_mode.py +32 -0
- hyperfluid/models/resource_origin.py +19 -0
- hyperfluid/models/resource_overview_response.py +24 -0
- hyperfluid/models/resource_requirements_spec.py +24 -0
- hyperfluid/models/resource_source.py +19 -0
- hyperfluid/models/resource_spec.py +17 -0
- hyperfluid/models/resource_tier.py +46 -0
- hyperfluid/models/resource_tier_catalog_entry.py +38 -0
- hyperfluid/models/resource_tier_catalog_response.py +17 -0
- hyperfluid/models/restart_row.py +40 -0
- hyperfluid/models/restore_from_backup.py +43 -0
- hyperfluid/models/restriction_evaluation_result.py +25 -0
- hyperfluid/models/results_page.py +18 -0
- hyperfluid/models/revoked_s3_key.py +24 -0
- hyperfluid/models/rightsizing_direction.py +16 -0
- hyperfluid/models/rightsizing_suggestion_response.py +51 -0
- hyperfluid/models/role.py +29 -0
- hyperfluid/models/runner_flavor_catalog_entry.py +20 -0
- hyperfluid/models/runner_flavor_catalog_response.py +23 -0
- hyperfluid/models/runner_flavor_dto.py +48 -0
- hyperfluid/models/runner_flavor_dto_c2_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_c3_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_c4_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_c8_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_custom_variant.py +27 -0
- hyperfluid/models/runner_flavor_dto_l_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_m_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_s_variant.py +14 -0
- hyperfluid/models/runner_flavor_dto_xl_variant.py +14 -0
- hyperfluid/models/runner_flavor_name.py +23 -0
- hyperfluid/models/runner_resources_dto.py +23 -0
- hyperfluid/models/runtime_alert_priority.py +31 -0
- hyperfluid/models/runtime_security_alert_log.py +64 -0
- hyperfluid/models/s3_gateway_decision_log.py +53 -0
- hyperfluid/models/s3_gateway_gate_denied_log.py +40 -0
- hyperfluid/models/s3_gateway_session_issued_log.py +32 -0
- hyperfluid/models/s3_key_list_entry.py +61 -0
- hyperfluid/models/s3_session_credentials.py +30 -0
- hyperfluid/models/saved_queries_page.py +30 -0
- hyperfluid/models/saved_query.py +41 -0
- hyperfluid/models/saved_query_sort.py +22 -0
- hyperfluid/models/scan_pipeline_health.py +41 -0
- hyperfluid/models/scan_state.py +22 -0
- hyperfluid/models/scan_status.py +18 -0
- hyperfluid/models/scan_summary.py +28 -0
- hyperfluid/models/scan_trigger.py +18 -0
- hyperfluid/models/schedule_state.py +87 -0
- hyperfluid/models/scheduled_run_status.py +20 -0
- hyperfluid/models/scm_branch.py +15 -0
- hyperfluid/models/scm_repository.py +39 -0
- hyperfluid/models/scoped_bucket_request.py +17 -0
- hyperfluid/models/search_mode.py +27 -0
- hyperfluid/models/secret_manager_ref.py +20 -0
- hyperfluid/models/secret_manager_type.py +14 -0
- hyperfluid/models/secret_metadata_response.py +42 -0
- hyperfluid/models/secret_ref.py +23 -0
- hyperfluid/models/secret_ref_input.py +15 -0
- hyperfluid/models/secret_ref_spec_response.py +15 -0
- hyperfluid/models/secret_scope.py +15 -0
- hyperfluid/models/secret_type.py +19 -0
- hyperfluid/models/secret_value.py +27 -0
- hyperfluid/models/secret_value_json_variant.py +16 -0
- hyperfluid/models/secret_value_oci_registry_config_variant.py +19 -0
- hyperfluid/models/secret_value_plaintext_variant.py +16 -0
- hyperfluid/models/secret_value_response.py +19 -0
- hyperfluid/models/security_decision.py +15 -0
- hyperfluid/models/security_decision_log.py +60 -0
- hyperfluid/models/security_decision_log_response.py +41 -0
- hyperfluid/models/security_policy.py +20 -0
- hyperfluid/models/security_policy_value.py +30 -0
- hyperfluid/models/security_policy_value_bool_variant.py +16 -0
- hyperfluid/models/security_policy_value_choice_variant.py +16 -0
- hyperfluid/models/security_policy_value_string_list_variant.py +16 -0
- hyperfluid/models/security_resource_type.py +19 -0
- hyperfluid/models/security_summary_response.py +26 -0
- hyperfluid/models/sender_pattern.py +14 -0
- hyperfluid/models/sensitivity_level.py +19 -0
- hyperfluid/models/service_account.py +58 -0
- hyperfluid/models/service_account_attributes_response.py +13 -0
- hyperfluid/models/service_account_crd_config.py +37 -0
- hyperfluid/models/service_link_kind.py +35 -0
- hyperfluid/models/service_link_port.py +16 -0
- hyperfluid/models/service_link_response.py +34 -0
- hyperfluid/models/service_ref.py +20 -0
- hyperfluid/models/session_summary.py +36 -0
- hyperfluid/models/session_workspace.py +19 -0
- hyperfluid/models/session_workspace_request.py +25 -0
- hyperfluid/models/set_api_key_rate_limits_request.py +18 -0
- hyperfluid/models/set_bindings_body.py +15 -0
- hyperfluid/models/set_key_budget_body.py +27 -0
- hyperfluid/models/set_org_settings_body.py +13 -0
- hyperfluid/models/set_organization_logs_retention_request_body.py +15 -0
- hyperfluid/models/set_role_permissions_request_body.py +17 -0
- hyperfluid/models/set_service_account_attributes_request.py +15 -0
- hyperfluid/models/set_thresholds_body.py +15 -0
- hyperfluid/models/set_user_attributes_request.py +20 -0
- hyperfluid/models/setup_outcome.py +19 -0
- hyperfluid/models/sha256_hash_deduping_strategy.py +17 -0
- hyperfluid/models/share_point_source_config.py +58 -0
- hyperfluid/models/shared_model_response.py +99 -0
- hyperfluid/models/sheet_preview.py +39 -0
- hyperfluid/models/sign_compute_dock_ssh_key_request.py +15 -0
- hyperfluid/models/sign_compute_dock_ssh_key_response.py +22 -0
- hyperfluid/models/signal_bindings_dto.py +16 -0
- hyperfluid/models/signal_thresholds_dto.py +25 -0
- hyperfluid/models/skill_registry_catalog_entry.py +42 -0
- hyperfluid/models/skill_registry_ref_dto.py +23 -0
- hyperfluid/models/skill_registry_response.py +54 -0
- hyperfluid/models/skill_registry_scope_dto.py +17 -0
- hyperfluid/models/skill_response.py +31 -0
- hyperfluid/models/skipped_preview_port.py +19 -0
- hyperfluid/models/sort_dir.py +15 -0
- hyperfluid/models/source_sync_event.py +47 -0
- hyperfluid/models/source_sync_kind.py +32 -0
- hyperfluid/models/spend_budget.py +35 -0
- hyperfluid/models/spend_window.py +24 -0
- hyperfluid/models/sql_copilot_repair_context.py +20 -0
- hyperfluid/models/sql_copilot_request.py +29 -0
- hyperfluid/models/sql_copilot_response.py +29 -0
- hyperfluid/models/start_health_scan_response.py +17 -0
- hyperfluid/models/storage_zone_view.py +70 -0
- hyperfluid/models/support_ticket_event_response.py +38 -0
- hyperfluid/models/support_ticket_message_response.py +34 -0
- hyperfluid/models/support_ticket_response.py +57 -0
- hyperfluid/models/sync_image_source_request.py +15 -0
- hyperfluid/models/sync_image_source_response.py +21 -0
- hyperfluid/models/sync_policy.py +16 -0
- hyperfluid/models/table_classification_response.py +43 -0
- hyperfluid/models/table_column_response.py +15 -0
- hyperfluid/models/table_data_product_response.py +42 -0
- hyperfluid/models/table_health_finding.py +32 -0
- hyperfluid/models/table_health_finding_kind.py +18 -0
- hyperfluid/models/table_health_severity.py +24 -0
- hyperfluid/models/tag_report.py +28 -0
- hyperfluid/models/tag_response.py +52 -0
- hyperfluid/models/tags_response.py +20 -0
- hyperfluid/models/template_faker_field.py +19 -0
- hyperfluid/models/test_git_credential_request.py +24 -0
- hyperfluid/models/test_git_credential_response.py +25 -0
- hyperfluid/models/test_image_pull_failure.py +32 -0
- hyperfluid/models/test_image_pull_failure_reason.py +20 -0
- hyperfluid/models/test_image_pull_request_body.py +20 -0
- hyperfluid/models/test_image_pull_response.py +31 -0
- hyperfluid/models/test_imap_connection_request.py +45 -0
- hyperfluid/models/test_imap_connection_response.py +15 -0
- hyperfluid/models/test_oci_login_failure.py +23 -0
- hyperfluid/models/test_oci_login_failure_reason.py +16 -0
- hyperfluid/models/test_oci_login_request_body.py +18 -0
- hyperfluid/models/test_oci_login_response.py +24 -0
- hyperfluid/models/test_oci_login_verdict.py +17 -0
- hyperfluid/models/ticket_category.py +22 -0
- hyperfluid/models/ticket_priority.py +18 -0
- hyperfluid/models/ticket_status.py +25 -0
- hyperfluid/models/timeseries_metric.py +16 -0
- hyperfluid/models/tiny_query_limits_response.py +17 -0
- hyperfluid/models/tool_permission.py +20 -0
- hyperfluid/models/top_dimension.py +25 -0
- hyperfluid/models/transfer_dashboard_request.py +15 -0
- hyperfluid/models/trino_catalog.py +19 -0
- hyperfluid/models/trino_connector_descriptor_response.py +47 -0
- hyperfluid/models/trino_internal_config.py +37 -0
- hyperfluid/models/trino_internal_config_response.py +37 -0
- hyperfluid/models/trino_metadata.py +28 -0
- hyperfluid/models/trino_query_completed_log.py +85 -0
- hyperfluid/models/trino_resource_group.py +41 -0
- hyperfluid/models/trino_resource_group_selector.py +38 -0
- hyperfluid/models/trino_resource_groups.py +24 -0
- hyperfluid/models/trino_schema.py +19 -0
- hyperfluid/models/unified_catalog_response.py +35 -0
- hyperfluid/models/unit.py +32 -0
- hyperfluid/models/update_action_type_request.py +30 -0
- hyperfluid/models/update_ai_agent_request.py +59 -0
- hyperfluid/models/update_catalog_exposure_request_body.py +22 -0
- hyperfluid/models/update_context_provider_body.py +20 -0
- hyperfluid/models/update_contextual_restriction_body.py +24 -0
- hyperfluid/models/update_dashboard_request.py +40 -0
- hyperfluid/models/update_data_dock_internet_exposure_request_body.py +19 -0
- hyperfluid/models/update_data_dock_request.py +21 -0
- hyperfluid/models/update_data_dock_request_kind.py +20 -0
- hyperfluid/models/update_data_dock_request_kind_trino_internal_variant.py +19 -0
- hyperfluid/models/update_data_dock_resource_groups_request_body.py +17 -0
- hyperfluid/models/update_data_dock_security_settings_body.py +38 -0
- hyperfluid/models/update_dev_workstation_network_request.py +25 -0
- hyperfluid/models/update_dev_workstation_request.py +27 -0
- hyperfluid/models/update_faker_table_request.py +17 -0
- hyperfluid/models/update_forgejo_runner_request.py +36 -0
- hyperfluid/models/update_g_drive_pipeline_request.py +33 -0
- hyperfluid/models/update_g_drive_source_config.py +32 -0
- hyperfluid/models/update_github_connection_request.py +32 -0
- hyperfluid/models/update_github_runner_request.py +76 -0
- hyperfluid/models/update_group_request_body.py +15 -0
- hyperfluid/models/update_identity_provider_request.py +23 -0
- hyperfluid/models/update_kafka_hf_service_request.py +31 -0
- hyperfluid/models/update_kafka_hf_topic_request.py +22 -0
- hyperfluid/models/update_link_type_request.py +27 -0
- hyperfluid/models/update_object_type_request.py +38 -0
- hyperfluid/models/update_org_security_settings_body.py +19 -0
- hyperfluid/models/update_permission_policy_request.py +23 -0
- hyperfluid/models/update_pipeline_config_request.py +37 -0
- hyperfluid/models/update_pipeline_config_request_g_drive_variant.py +22 -0
- hyperfluid/models/update_pipeline_config_request_share_point_variant.py +22 -0
- hyperfluid/models/update_pipeline_request.py +24 -0
- hyperfluid/models/update_property_definition_request.py +26 -0
- hyperfluid/models/update_ref_request.py +40 -0
- hyperfluid/models/update_saved_query_request.py +47 -0
- hyperfluid/models/update_secret_request_body.py +19 -0
- hyperfluid/models/update_service_account_crd_request_body.py +24 -0
- hyperfluid/models/update_share_point_pipeline_request.py +49 -0
- hyperfluid/models/update_share_point_source_config.py +39 -0
- hyperfluid/models/update_skill_registry_request.py +23 -0
- hyperfluid/models/update_skill_request.py +20 -0
- hyperfluid/models/update_table_classification_body.py +19 -0
- hyperfluid/models/update_ticket_status_request.py +19 -0
- hyperfluid/models/update_workstation_skill_registries_request.py +20 -0
- hyperfluid/models/update_workstation_template_request.py +41 -0
- hyperfluid/models/upload_managed_postgresql_import_response.py +25 -0
- hyperfluid/models/upsert_optimize_config_request.py +40 -0
- hyperfluid/models/usage_source.py +20 -0
- hyperfluid/models/usage_summary.py +19 -0
- hyperfluid/models/user.py +23 -0
- hyperfluid/models/user_attributes_entry.py +18 -0
- hyperfluid/models/user_context_response.py +19 -0
- hyperfluid/models/user_denial_count.py +15 -0
- hyperfluid/models/user_with_roles.py +22 -0
- hyperfluid/models/value.py +6 -0
- hyperfluid/models/value_format.py +17 -0
- hyperfluid/models/verify_signup_request_body.py +13 -0
- hyperfluid/models/version_entry.py +21 -0
- hyperfluid/models/versions_response.py +17 -0
- hyperfluid/models/vetted_base_response.py +14 -0
- hyperfluid/models/virtual_machine_console_session_log.py +40 -0
- hyperfluid/models/virtual_machine_image_catalog.py +18 -0
- hyperfluid/models/virtual_machine_image_catalog_image.py +23 -0
- hyperfluid/models/virtual_machine_image_catalog_source.py +23 -0
- hyperfluid/models/virtual_machine_response.py +68 -0
- hyperfluid/models/virtual_machine_user_response.py +40 -0
- hyperfluid/models/virtual_machine_users_page.py +25 -0
- hyperfluid/models/virtual_machines_page.py +25 -0
- hyperfluid/models/vm_image_kind.py +15 -0
- hyperfluid/models/vulnerability_counts.py +22 -0
- hyperfluid/models/warning_severity.py +18 -0
- hyperfluid/models/widget_chart.py +23 -0
- hyperfluid/models/widget_health.py +21 -0
- hyperfluid/models/widget_layout.py +19 -0
- hyperfluid/models/worker_auto_scaling.py +21 -0
- hyperfluid/models/worker_auto_scaling_response.py +21 -0
- hyperfluid/models/workload_detail.py +29 -0
- hyperfluid/models/workload_kind.py +57 -0
- hyperfluid/models/workload_ref.py +29 -0
- hyperfluid/models/workload_row.py +65 -0
- hyperfluid/models/workload_scan_trigger.py +24 -0
- hyperfluid/models/workspace_mode.py +19 -0
- hyperfluid/models/workstation_agent_request_log.py +51 -0
- hyperfluid/models/workstation_file.py +19 -0
- hyperfluid/models/workstation_preview_session_log.py +33 -0
- hyperfluid/models/workstation_repository_input.py +24 -0
- hyperfluid/models/workstation_repository_response.py +28 -0
- hyperfluid/models/workstation_skill_registries_response.py +17 -0
- hyperfluid/models/workstation_template_response.py +56 -0
- hyperfluid/models/workstation_template_scope_dto.py +16 -0
- hyperfluid/models/workstation_terminal_command_log.py +55 -0
- hyperfluid/models/workstation_tool_dto.py +17 -0
- hyperfluid/models/write_file_request.py +23 -0
- hyperfluid/models/write_file_response.py +15 -0
- hyperfluid/py.typed +0 -0
- hyperfluid/serialization.py +911 -0
- hyperfluid/unions.py +102 -0
- hyperfluid-0.1.0.dist-info/METADATA +165 -0
- hyperfluid-0.1.0.dist-info/RECORD +1300 -0
- hyperfluid-0.1.0.dist-info/WHEEL +4 -0
- hyperfluid-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,911 @@
|
|
|
1
|
+
# this file is @generated by Perseid; edit the shared runtime template.
|
|
2
|
+
"""(De)serialization support for the generated Hyperfluid models.
|
|
3
|
+
|
|
4
|
+
The generated models are plain :mod:`dataclasses`. All JSON conversion lives
|
|
5
|
+
here, driven by their type annotations, so the generated code stays declarative
|
|
6
|
+
and dependency free.
|
|
7
|
+
|
|
8
|
+
* An optional field left to ``None`` is omitted from the payload. An optional
|
|
9
|
+
field that the API accepts as ``null`` defaults to :data:`UNSET` instead:
|
|
10
|
+
``UNSET`` is omitted, while ``None`` is sent as ``null`` (to clear a value).
|
|
11
|
+
A required field is always sent.
|
|
12
|
+
* JSON properties, enum values and union variants added to the API after
|
|
13
|
+
this SDK was generated are kept as received, and sent back unchanged.
|
|
14
|
+
Models whose schema types its ``additionalProperties`` decode the
|
|
15
|
+
properties they do not declare into that type, in ``extra_fields``.
|
|
16
|
+
* ``Decimal`` values travel as JSON strings, ``datetime`` values as RFC 3339
|
|
17
|
+
strings. Only finite decimals are valid: ``NaN`` and ``Infinity`` are
|
|
18
|
+
rejected in both directions.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import dataclasses
|
|
24
|
+
import datetime as _datetime
|
|
25
|
+
import enum
|
|
26
|
+
import importlib
|
|
27
|
+
import json
|
|
28
|
+
import re
|
|
29
|
+
import sys
|
|
30
|
+
import types
|
|
31
|
+
import typing as t
|
|
32
|
+
import uuid as _uuid
|
|
33
|
+
from decimal import Decimal
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"FROM_CONTENT",
|
|
37
|
+
"UNSET",
|
|
38
|
+
"HyperfluidError",
|
|
39
|
+
"BaseModel",
|
|
40
|
+
"Discriminator",
|
|
41
|
+
"IntEnum",
|
|
42
|
+
"JSONValue",
|
|
43
|
+
"ModelParseError",
|
|
44
|
+
"StrEnum",
|
|
45
|
+
"TaggedUnionModel",
|
|
46
|
+
"UnknownVariant",
|
|
47
|
+
"Unset",
|
|
48
|
+
"format_decimal",
|
|
49
|
+
"from_json_value",
|
|
50
|
+
"parse_datetime",
|
|
51
|
+
"parse_decimal",
|
|
52
|
+
"to_json_value",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
_M = t.TypeVar("_M", bound="BaseModel")
|
|
56
|
+
|
|
57
|
+
JSONValue: t.TypeAlias = (
|
|
58
|
+
"dict[str, JSONValue] | list[JSONValue] | str | int | float | bool | None"
|
|
59
|
+
)
|
|
60
|
+
"""A decoded JSON value."""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# `HyperfluidError` is defined here rather than in `errors.py` because the
|
|
64
|
+
# generated models import this module and `errors.py` imports the models. It is
|
|
65
|
+
# re-exported from `hyperfluid.errors` and `hyperfluid`, which is where to import it.
|
|
66
|
+
class HyperfluidError(Exception):
|
|
67
|
+
"""Base class for every error raised by this SDK."""
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class ModelParseError(HyperfluidError, ValueError):
|
|
71
|
+
"""Raised when a payload cannot be mapped onto a model.
|
|
72
|
+
|
|
73
|
+
It is also a :class:`ValueError`. A client call never lets it escape on its
|
|
74
|
+
own: a response body that fails to parse raises
|
|
75
|
+
:class:`hyperfluid.errors.APIResponseValidationError`, chained to this error.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class Unset(enum.Enum):
|
|
80
|
+
"""The type of :data:`UNSET`."""
|
|
81
|
+
|
|
82
|
+
UNSET = "UNSET"
|
|
83
|
+
|
|
84
|
+
def __bool__(self) -> t.Literal[False]:
|
|
85
|
+
return False
|
|
86
|
+
|
|
87
|
+
def __repr__(self) -> str:
|
|
88
|
+
return "UNSET"
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
FROM_CONTENT: t.Any = None
|
|
92
|
+
"""Default of a tagged union's discriminator: the tag of its content's model."""
|
|
93
|
+
|
|
94
|
+
UNSET: t.Final = Unset.UNSET
|
|
95
|
+
"""Default of the optional fields that also accept ``null``: the field is left
|
|
96
|
+
out of the payload, whereas ``None`` sends ``null``."""
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class StrEnum(str, enum.Enum):
|
|
100
|
+
"""A string enum that keeps values this SDK version does not know.
|
|
101
|
+
|
|
102
|
+
``Color("ultraviolet")`` returns a member whose ``value`` is
|
|
103
|
+
``"ultraviolet"`` and whose ``is_known`` is false, instead of raising.
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
def __str__(self) -> str:
|
|
107
|
+
return str(self.value)
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
def _missing_(cls, value: object) -> t.Any:
|
|
111
|
+
if not isinstance(value, str):
|
|
112
|
+
return None
|
|
113
|
+
member = str.__new__(cls, value)
|
|
114
|
+
member._name_ = value
|
|
115
|
+
member._value_ = value
|
|
116
|
+
return member
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def is_known(self) -> bool:
|
|
120
|
+
"""Whether the value is one of those declared by the API spec."""
|
|
121
|
+
return self._value_ in type(self)._value2member_map_
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class IntEnum(int, enum.Enum):
|
|
125
|
+
"""An integer enum that keeps values this SDK version does not know."""
|
|
126
|
+
|
|
127
|
+
def __str__(self) -> str:
|
|
128
|
+
return str(self.value)
|
|
129
|
+
|
|
130
|
+
@classmethod
|
|
131
|
+
def _missing_(cls, value: object) -> t.Any:
|
|
132
|
+
if isinstance(value, bool) or not isinstance(value, int):
|
|
133
|
+
return None
|
|
134
|
+
member = int.__new__(cls, value)
|
|
135
|
+
member._name_ = str(value)
|
|
136
|
+
member._value_ = value
|
|
137
|
+
return member
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
def is_known(self) -> bool:
|
|
141
|
+
"""Whether the value is one of those declared by the API spec."""
|
|
142
|
+
return self._value_ in type(self)._value2member_map_
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
@dataclasses.dataclass(frozen=True)
|
|
146
|
+
class UnknownVariant:
|
|
147
|
+
"""A union variant this SDK version does not know, kept as received."""
|
|
148
|
+
|
|
149
|
+
tag: str
|
|
150
|
+
"""The discriminator value."""
|
|
151
|
+
data: t.Mapping[str, t.Any]
|
|
152
|
+
"""The raw JSON object, which serializes back unchanged."""
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
class Discriminator:
|
|
156
|
+
"""Annotation metadata of a union of models told apart by one property.
|
|
157
|
+
|
|
158
|
+
``Annotated[Circle | Square | UnknownVariant, Discriminator("type", ...)]``
|
|
159
|
+
decodes into the model its ``type`` names, and writes that name back when
|
|
160
|
+
the model is serialized.
|
|
161
|
+
"""
|
|
162
|
+
|
|
163
|
+
def __init__(self, property: str, mapping: t.Mapping[str, type[BaseModel]]) -> None:
|
|
164
|
+
self.property = property
|
|
165
|
+
self.mapping = dict(mapping)
|
|
166
|
+
self.tags = {model: tag for tag, model in self.mapping.items()}
|
|
167
|
+
|
|
168
|
+
def parse(self, value: t.Any, ctx: str) -> t.Any:
|
|
169
|
+
if not isinstance(value, t.Mapping):
|
|
170
|
+
raise ModelParseError(
|
|
171
|
+
f"{ctx}: expected an object, got {type(value).__name__}"
|
|
172
|
+
)
|
|
173
|
+
tag = value.get(self.property)
|
|
174
|
+
if not isinstance(tag, str):
|
|
175
|
+
raise ModelParseError(f"{ctx}: missing discriminator {self.property!r}")
|
|
176
|
+
model = self.mapping.get(tag)
|
|
177
|
+
if model is None:
|
|
178
|
+
return UnknownVariant(tag, dict(value))
|
|
179
|
+
variant = model.from_dict(value)
|
|
180
|
+
# The tag is written back on serialization, from the variant's type.
|
|
181
|
+
variant.__dict__.get("_extra", {}).pop(self.property, None)
|
|
182
|
+
return variant
|
|
183
|
+
|
|
184
|
+
def serialize(self, value: t.Any) -> t.Any:
|
|
185
|
+
data = to_json_value(value)
|
|
186
|
+
tag = self.tags.get(type(value))
|
|
187
|
+
if tag is not None and isinstance(data, dict):
|
|
188
|
+
data[self.property] = tag
|
|
189
|
+
return data
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
# --------------------------------------------------------------------------
|
|
193
|
+
# Serialization
|
|
194
|
+
# --------------------------------------------------------------------------
|
|
195
|
+
|
|
196
|
+
_NoneType = type(None)
|
|
197
|
+
_UNION_TYPES: tuple[t.Any, ...] = (t.Union, types.UnionType)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
def to_json_value(value: t.Any, annotation: t.Any = t.Any) -> t.Any:
|
|
201
|
+
"""Convert ``value`` into something ``json.dumps`` understands.
|
|
202
|
+
|
|
203
|
+
``annotation`` is the declared type of ``value``; it only matters for
|
|
204
|
+
unions of models whose variants do not carry their own discriminator.
|
|
205
|
+
"""
|
|
206
|
+
origin = t.get_origin(annotation)
|
|
207
|
+
if origin is t.Annotated:
|
|
208
|
+
base, *metadata = t.get_args(annotation)
|
|
209
|
+
for meta in metadata:
|
|
210
|
+
if isinstance(meta, Discriminator) and value is not None:
|
|
211
|
+
return meta.serialize(value)
|
|
212
|
+
return to_json_value(value, base)
|
|
213
|
+
if origin in _UNION_TYPES:
|
|
214
|
+
members = [a for a in t.get_args(annotation) if a not in (_NoneType, Unset)]
|
|
215
|
+
if len(members) == 1:
|
|
216
|
+
return to_json_value(value, members[0])
|
|
217
|
+
return to_json_value(value, _union_member(members, value) or t.Any)
|
|
218
|
+
if isinstance(value, enum.Enum):
|
|
219
|
+
return to_json_value(value.value)
|
|
220
|
+
if value is None or isinstance(value, (str, int, float, bool)):
|
|
221
|
+
return value
|
|
222
|
+
if isinstance(value, BaseModel):
|
|
223
|
+
return value.to_dict()
|
|
224
|
+
if isinstance(value, UnknownVariant):
|
|
225
|
+
return dict(value.data)
|
|
226
|
+
if isinstance(value, Decimal):
|
|
227
|
+
return format_decimal(value)
|
|
228
|
+
if isinstance(value, _datetime.datetime):
|
|
229
|
+
return format_datetime(value)
|
|
230
|
+
if isinstance(value, _datetime.date):
|
|
231
|
+
return value.isoformat()
|
|
232
|
+
if isinstance(value, _uuid.UUID):
|
|
233
|
+
return str(value)
|
|
234
|
+
args = t.get_args(annotation)
|
|
235
|
+
if isinstance(value, (list, tuple, set, frozenset)):
|
|
236
|
+
inner = args[0] if origin in (list, set, frozenset) and args else t.Any
|
|
237
|
+
return [to_json_value(v, inner) for v in value]
|
|
238
|
+
if isinstance(value, t.Mapping):
|
|
239
|
+
inner = args[1] if origin is dict and len(args) == 2 else t.Any
|
|
240
|
+
return {str(k): to_json_value(v, inner) for k, v in value.items()}
|
|
241
|
+
return value
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def format_decimal(value: Decimal) -> str:
|
|
245
|
+
"""Render a decimal as its JSON string form.
|
|
246
|
+
|
|
247
|
+
Raises :class:`ValueError` for ``NaN`` and infinities, which the API does
|
|
248
|
+
not accept and no other Hyperfluid SDK can represent.
|
|
249
|
+
"""
|
|
250
|
+
if not value.is_finite():
|
|
251
|
+
raise ValueError(f"cannot serialize non-finite decimal {value!r}")
|
|
252
|
+
return str(value)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def parse_decimal(value: t.Any) -> Decimal:
|
|
256
|
+
"""Parse a ``format: decimal`` JSON value into a finite :class:`Decimal`.
|
|
257
|
+
|
|
258
|
+
The API sends decimals as JSON strings (``"12.50"``, ``"1e3"``). JSON
|
|
259
|
+
numbers are rejected, since they may already have lost precision, and so
|
|
260
|
+
are ``NaN``/``Infinity``, which are not decimals the API can produce.
|
|
261
|
+
"""
|
|
262
|
+
if not isinstance(value, str):
|
|
263
|
+
raise ModelParseError(f"expected a decimal string, got {value!r}")
|
|
264
|
+
try:
|
|
265
|
+
parsed = Decimal(value)
|
|
266
|
+
except ArithmeticError as exc: # `decimal.InvalidOperation`
|
|
267
|
+
raise ModelParseError(f"invalid decimal {value!r}") from exc
|
|
268
|
+
if not parsed.is_finite():
|
|
269
|
+
raise ModelParseError(f"non-finite decimal {value!r}")
|
|
270
|
+
return parsed
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def format_datetime(value: _datetime.datetime) -> str:
|
|
274
|
+
"""Render a datetime as an RFC 3339 string (naive values are treated as UTC)."""
|
|
275
|
+
if value.tzinfo is None:
|
|
276
|
+
value = value.replace(tzinfo=_datetime.timezone.utc)
|
|
277
|
+
return value.isoformat()
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
_FRACTION_RE = re.compile(r"(?<=[Tt ]\d\d:\d\d:\d\d)\.(\d+)")
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def _normalize_fraction(match: re.Match[str]) -> str:
|
|
284
|
+
return "." + match.group(1)[:6].ljust(6, "0")
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def parse_datetime(value: t.Any) -> _datetime.datetime:
|
|
288
|
+
"""Parse an ISO 8601 / RFC 3339 string into an aware :class:`datetime.datetime`.
|
|
289
|
+
|
|
290
|
+
A string without a UTC offset (``2026-09-19T10:00:00.123456``) is read as
|
|
291
|
+
UTC; one with an explicit offset (``Z``, ``+02:00``) keeps it. Fractional
|
|
292
|
+
seconds may have 1 to 9 digits: they are truncated to microseconds, the
|
|
293
|
+
precision of :class:`datetime.datetime`.
|
|
294
|
+
"""
|
|
295
|
+
if isinstance(value, _datetime.datetime):
|
|
296
|
+
parsed = value
|
|
297
|
+
elif isinstance(value, str):
|
|
298
|
+
text = value
|
|
299
|
+
# `fromisoformat` only learned about the `Z` suffix in Python 3.11.
|
|
300
|
+
if text.endswith(("Z", "z")):
|
|
301
|
+
text = text[:-1] + "+00:00"
|
|
302
|
+
# Before Python 3.11, `fromisoformat` only accepts exactly 3 or 6
|
|
303
|
+
# fractional digits, while servers send anywhere from 1 to 9.
|
|
304
|
+
text = _FRACTION_RE.sub(_normalize_fraction, text, count=1)
|
|
305
|
+
try:
|
|
306
|
+
parsed = _datetime.datetime.fromisoformat(text)
|
|
307
|
+
except ValueError as exc:
|
|
308
|
+
raise ModelParseError(f"invalid date-time string {value!r}") from exc
|
|
309
|
+
else:
|
|
310
|
+
raise ModelParseError(
|
|
311
|
+
f"expected a date-time string, got {type(value).__name__}"
|
|
312
|
+
)
|
|
313
|
+
if parsed.tzinfo is None:
|
|
314
|
+
parsed = parsed.replace(tzinfo=_datetime.timezone.utc)
|
|
315
|
+
return parsed
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
# --------------------------------------------------------------------------
|
|
319
|
+
# Deserialization
|
|
320
|
+
# --------------------------------------------------------------------------
|
|
321
|
+
|
|
322
|
+
_hints_cache: dict[type, dict[str, t.Any]] = {}
|
|
323
|
+
_known_keys_cache: dict[type, frozenset[str] | None] = {}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def _type_hints(cls: type) -> dict[str, t.Any]:
|
|
327
|
+
"""Resolve the annotations of a model.
|
|
328
|
+
|
|
329
|
+
Models import each other only for type checkers, which keeps recursive
|
|
330
|
+
schemas importable, so their names are looked up in the models package.
|
|
331
|
+
"""
|
|
332
|
+
hints = _hints_cache.get(cls)
|
|
333
|
+
if hints is None:
|
|
334
|
+
hints = t.get_type_hints(cls, localns=_namespace(cls), include_extras=True)
|
|
335
|
+
_hints_cache[cls] = hints
|
|
336
|
+
return hints
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
class _Namespace(dict[str, t.Any]):
|
|
340
|
+
"""The names of a model's module, then the models, each imported when first looked up."""
|
|
341
|
+
|
|
342
|
+
def __missing__(self, name: str) -> t.Any:
|
|
343
|
+
if __package__:
|
|
344
|
+
models = importlib.import_module(".models", __package__)
|
|
345
|
+
if name in models._MODULES:
|
|
346
|
+
value = getattr(models, name)
|
|
347
|
+
self[name] = value
|
|
348
|
+
return value
|
|
349
|
+
raise KeyError(name)
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
_namespaces: dict[str, _Namespace] = {}
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
def _namespace(cls: type) -> _Namespace:
|
|
356
|
+
namespace = _namespaces.get(cls.__module__)
|
|
357
|
+
if namespace is None:
|
|
358
|
+
namespace = _Namespace(vars(sys.modules[cls.__module__]))
|
|
359
|
+
_namespaces[cls.__module__] = namespace
|
|
360
|
+
return namespace
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
def from_json_value(annotation: t.Any, value: t.Any) -> t.Any:
|
|
364
|
+
"""Build a value of type ``annotation`` from decoded JSON."""
|
|
365
|
+
return _from_json_value(annotation, value, getattr(annotation, "__name__", "value"))
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
def _from_json_value(annotation: t.Any, value: t.Any, ctx: str) -> t.Any:
|
|
369
|
+
if annotation is t.Any or annotation is None or annotation is _NoneType:
|
|
370
|
+
return value
|
|
371
|
+
|
|
372
|
+
origin = t.get_origin(annotation)
|
|
373
|
+
args = t.get_args(annotation)
|
|
374
|
+
|
|
375
|
+
if origin is t.Annotated:
|
|
376
|
+
for meta in args[1:]:
|
|
377
|
+
if isinstance(meta, Discriminator):
|
|
378
|
+
return meta.parse(value, ctx)
|
|
379
|
+
return _from_json_value(args[0], value, ctx)
|
|
380
|
+
|
|
381
|
+
if origin in _UNION_TYPES:
|
|
382
|
+
if value is None and _NoneType in args:
|
|
383
|
+
return None
|
|
384
|
+
members = [a for a in args if a not in (_NoneType, Unset)]
|
|
385
|
+
if len(members) == 1:
|
|
386
|
+
return _from_json_value(members[0], value, ctx)
|
|
387
|
+
candidates = _union_candidates(members, _value_kind(value))
|
|
388
|
+
if not candidates:
|
|
389
|
+
raise ModelParseError(
|
|
390
|
+
f"{ctx}: {value!r} matches no member of {annotation!r}"
|
|
391
|
+
)
|
|
392
|
+
# Members sharing a JSON type (`str | list[str] | list[int]`, `datetime | str`) are tried
|
|
393
|
+
# in order: the first that decodes the value wins.
|
|
394
|
+
failure: ModelParseError | None = None
|
|
395
|
+
for member in candidates:
|
|
396
|
+
if t.get_origin(member) is t.Literal and value not in t.get_args(member):
|
|
397
|
+
continue
|
|
398
|
+
try:
|
|
399
|
+
return _from_json_value(member, value, ctx)
|
|
400
|
+
except ModelParseError as exc:
|
|
401
|
+
failure = exc
|
|
402
|
+
raise failure or ModelParseError(
|
|
403
|
+
f"{ctx}: {value!r} matches no member of {annotation!r}"
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
if origin in (list, set, frozenset, tuple):
|
|
407
|
+
inner = args[0] if args else t.Any
|
|
408
|
+
if not isinstance(value, list):
|
|
409
|
+
raise ModelParseError(f"{ctx}: expected a list, got {type(value).__name__}")
|
|
410
|
+
items = [_from_json_value(inner, v, f"{ctx}[{i}]") for i, v in enumerate(value)]
|
|
411
|
+
return set(items) if origin in (set, frozenset) else items
|
|
412
|
+
|
|
413
|
+
if origin is dict:
|
|
414
|
+
inner = args[1] if len(args) == 2 else t.Any
|
|
415
|
+
if not isinstance(value, dict):
|
|
416
|
+
raise ModelParseError(
|
|
417
|
+
f"{ctx}: expected an object, got {type(value).__name__}"
|
|
418
|
+
)
|
|
419
|
+
return {
|
|
420
|
+
str(k): _from_json_value(inner, v, f"{ctx}.{k}") for k, v in value.items()
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if origin is t.Literal:
|
|
424
|
+
return value
|
|
425
|
+
|
|
426
|
+
if isinstance(annotation, type):
|
|
427
|
+
if issubclass(annotation, BaseModel):
|
|
428
|
+
if not isinstance(value, dict):
|
|
429
|
+
raise ModelParseError(
|
|
430
|
+
f"{ctx}: expected an object, got {type(value).__name__}"
|
|
431
|
+
)
|
|
432
|
+
return annotation.from_dict(value)
|
|
433
|
+
if issubclass(annotation, enum.Enum):
|
|
434
|
+
try:
|
|
435
|
+
return annotation(value)
|
|
436
|
+
except ValueError as exc:
|
|
437
|
+
raise ModelParseError(f"{ctx}: invalid value {value!r}") from exc
|
|
438
|
+
if annotation is _datetime.datetime:
|
|
439
|
+
return parse_datetime(value)
|
|
440
|
+
if annotation is _datetime.date:
|
|
441
|
+
if isinstance(value, _datetime.date):
|
|
442
|
+
return value
|
|
443
|
+
try:
|
|
444
|
+
return _datetime.date.fromisoformat(str(value))
|
|
445
|
+
except ValueError as exc:
|
|
446
|
+
raise ModelParseError(f"{ctx}: invalid date {value!r}") from exc
|
|
447
|
+
if annotation is _uuid.UUID:
|
|
448
|
+
if isinstance(value, _uuid.UUID):
|
|
449
|
+
return value
|
|
450
|
+
try:
|
|
451
|
+
return _uuid.UUID(str(value))
|
|
452
|
+
except ValueError as exc:
|
|
453
|
+
raise ModelParseError(f"{ctx}: invalid UUID {value!r}") from exc
|
|
454
|
+
if annotation is Decimal:
|
|
455
|
+
try:
|
|
456
|
+
return parse_decimal(value)
|
|
457
|
+
except ModelParseError as exc:
|
|
458
|
+
raise ModelParseError(f"{ctx}: {exc}") from exc
|
|
459
|
+
if annotation is bool:
|
|
460
|
+
if not isinstance(value, bool):
|
|
461
|
+
raise ModelParseError(f"{ctx}: expected a boolean, got {value!r}")
|
|
462
|
+
return value
|
|
463
|
+
if annotation is float:
|
|
464
|
+
if isinstance(value, bool) or not isinstance(value, (int, float)):
|
|
465
|
+
raise ModelParseError(f"{ctx}: expected a number, got {value!r}")
|
|
466
|
+
return float(value)
|
|
467
|
+
if annotation is int:
|
|
468
|
+
if isinstance(value, bool) or not isinstance(value, int):
|
|
469
|
+
raise ModelParseError(f"{ctx}: expected an integer, got {value!r}")
|
|
470
|
+
return value
|
|
471
|
+
if annotation is str:
|
|
472
|
+
if not isinstance(value, str):
|
|
473
|
+
raise ModelParseError(f"{ctx}: expected a string, got {value!r}")
|
|
474
|
+
return value
|
|
475
|
+
|
|
476
|
+
return value
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
_STRING_TYPES = (str, _datetime.datetime, _datetime.date, _uuid.UUID, Decimal)
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
def _json_kind(annotation: t.Any) -> str | None:
|
|
483
|
+
"""The JSON type of the values of ``annotation``, ``None`` when it takes any."""
|
|
484
|
+
origin = t.get_origin(annotation)
|
|
485
|
+
if origin is t.Annotated:
|
|
486
|
+
base, *metadata = t.get_args(annotation)
|
|
487
|
+
if any(isinstance(meta, Discriminator) for meta in metadata):
|
|
488
|
+
return "object"
|
|
489
|
+
return _json_kind(base)
|
|
490
|
+
if origin is t.Literal:
|
|
491
|
+
return _value_kind(t.get_args(annotation)[0])
|
|
492
|
+
if origin in (list, set, frozenset, tuple):
|
|
493
|
+
return "array"
|
|
494
|
+
if origin is dict:
|
|
495
|
+
return "object"
|
|
496
|
+
if isinstance(annotation, type):
|
|
497
|
+
if issubclass(annotation, bool):
|
|
498
|
+
return "boolean"
|
|
499
|
+
if issubclass(annotation, (int, float)):
|
|
500
|
+
return "number"
|
|
501
|
+
if issubclass(annotation, _STRING_TYPES):
|
|
502
|
+
return "string"
|
|
503
|
+
if issubclass(annotation, BaseModel):
|
|
504
|
+
return "object"
|
|
505
|
+
return None
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
def _value_kind(value: t.Any) -> str | None:
|
|
509
|
+
if isinstance(value, bool):
|
|
510
|
+
return "boolean"
|
|
511
|
+
if isinstance(value, (int, float)):
|
|
512
|
+
return "number"
|
|
513
|
+
if isinstance(value, _STRING_TYPES):
|
|
514
|
+
return "string"
|
|
515
|
+
if isinstance(value, (list, tuple, set, frozenset)):
|
|
516
|
+
return "array"
|
|
517
|
+
if isinstance(value, (t.Mapping, BaseModel, UnknownVariant)):
|
|
518
|
+
return "object"
|
|
519
|
+
return None
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
def _union_candidates(members: list[t.Any], kind: str | None) -> list[t.Any]:
|
|
523
|
+
"""The members of an untagged union whose JSON type is ``kind``, in declaration order.
|
|
524
|
+
|
|
525
|
+
The members that take any JSON value come last, as a fallback.
|
|
526
|
+
"""
|
|
527
|
+
exact: list[t.Any] = []
|
|
528
|
+
fallback: list[t.Any] = []
|
|
529
|
+
for member in members:
|
|
530
|
+
member_kind = _json_kind(member)
|
|
531
|
+
if member_kind == kind:
|
|
532
|
+
exact.append(member)
|
|
533
|
+
elif member_kind is None:
|
|
534
|
+
fallback.append(member)
|
|
535
|
+
return exact + fallback
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
def _fits(annotation: t.Any, value: t.Any) -> bool:
|
|
539
|
+
"""Whether ``value``, a value held by the caller, is of ``annotation``, looking at the
|
|
540
|
+
first item of a list: how members sharing a JSON type are told apart."""
|
|
541
|
+
origin = t.get_origin(annotation)
|
|
542
|
+
args = t.get_args(annotation)
|
|
543
|
+
if annotation is t.Any:
|
|
544
|
+
return True
|
|
545
|
+
if origin is t.Annotated:
|
|
546
|
+
return _fits(args[0], value)
|
|
547
|
+
if origin in _UNION_TYPES:
|
|
548
|
+
return any(_fits(a, value) for a in args)
|
|
549
|
+
if origin is t.Literal:
|
|
550
|
+
return value in args
|
|
551
|
+
if origin in (list, set, frozenset, tuple):
|
|
552
|
+
if not isinstance(value, (list, tuple, set, frozenset)):
|
|
553
|
+
return False
|
|
554
|
+
first = next(iter(value), None)
|
|
555
|
+
return first is None or not args or _fits(args[0], first)
|
|
556
|
+
if origin is dict:
|
|
557
|
+
return isinstance(value, (t.Mapping, BaseModel))
|
|
558
|
+
if isinstance(annotation, type):
|
|
559
|
+
if annotation is float:
|
|
560
|
+
return isinstance(value, (int, float)) and not isinstance(value, bool)
|
|
561
|
+
if annotation is int:
|
|
562
|
+
return isinstance(value, int) and not isinstance(value, bool)
|
|
563
|
+
return isinstance(value, annotation)
|
|
564
|
+
return True
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
def _union_member(members: list[t.Any], value: t.Any) -> t.Any:
|
|
568
|
+
"""The member of an untagged union that ``value``, held by the caller, is an instance of."""
|
|
569
|
+
candidates = _union_candidates(members, _value_kind(value))
|
|
570
|
+
for member in candidates:
|
|
571
|
+
if _fits(member, value):
|
|
572
|
+
return member
|
|
573
|
+
return candidates[0] if candidates else None
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
# --------------------------------------------------------------------------
|
|
577
|
+
# Base classes
|
|
578
|
+
# --------------------------------------------------------------------------
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
def _has_default(field: dataclasses.Field[t.Any]) -> bool:
|
|
582
|
+
return (
|
|
583
|
+
field.default is not dataclasses.MISSING
|
|
584
|
+
or field.default_factory is not dataclasses.MISSING
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
@dataclasses.dataclass
|
|
589
|
+
class BaseModel:
|
|
590
|
+
"""Base class of every generated model."""
|
|
591
|
+
|
|
592
|
+
#: Maps python attribute names onto their JSON key, when they differ.
|
|
593
|
+
_JSON_KEYS: t.ClassVar[t.Mapping[str, str]] = {}
|
|
594
|
+
#: Attribute names whose (model) value is merged into the parent object.
|
|
595
|
+
_FLATTENED: t.ClassVar[tuple[str, ...]] = ()
|
|
596
|
+
# A model whose schema types its `additionalProperties` declares the annotation of
|
|
597
|
+
# `extra_fields` as `_EXTRA_FIELDS: t.ClassVar[dict[str, Value]]`, without a value.
|
|
598
|
+
|
|
599
|
+
@classmethod
|
|
600
|
+
def _json_key(cls, name: str) -> str:
|
|
601
|
+
return cls._JSON_KEYS.get(name, name)
|
|
602
|
+
|
|
603
|
+
@classmethod
|
|
604
|
+
def _extra_type(cls) -> t.Any:
|
|
605
|
+
"""The annotation of :attr:`extra_fields`, ``t.Any`` when the schema does not type it."""
|
|
606
|
+
hint = _type_hints(cls).get("_EXTRA_FIELDS", t.Any)
|
|
607
|
+
if t.get_origin(hint) is t.ClassVar:
|
|
608
|
+
args = t.get_args(hint)
|
|
609
|
+
hint = args[0] if args else t.Any
|
|
610
|
+
return hint
|
|
611
|
+
|
|
612
|
+
@property
|
|
613
|
+
def extra_fields(self) -> dict[str, t.Any]:
|
|
614
|
+
"""JSON properties this SDK version does not know, as received.
|
|
615
|
+
|
|
616
|
+
They are sent back with the model; add entries to send properties the
|
|
617
|
+
SDK does not declare yet.
|
|
618
|
+
"""
|
|
619
|
+
extra: dict[str, t.Any] | None = self.__dict__.get("_extra")
|
|
620
|
+
if extra is None:
|
|
621
|
+
extra = self.__dict__["_extra"] = {}
|
|
622
|
+
return extra
|
|
623
|
+
|
|
624
|
+
if not t.TYPE_CHECKING:
|
|
625
|
+
|
|
626
|
+
def __getattr__(self, name: str) -> t.Any:
|
|
627
|
+
extra = self.__dict__.get("_extra")
|
|
628
|
+
if extra is not None and name in extra and not name.startswith("__"):
|
|
629
|
+
return extra[name]
|
|
630
|
+
raise AttributeError(
|
|
631
|
+
f"{type(self).__name__!r} object has no attribute {name!r}"
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
@classmethod
|
|
635
|
+
def _known_keys(cls) -> frozenset[str] | None:
|
|
636
|
+
"""The JSON keys of the fields and of flattened models, ``None`` when unbounded."""
|
|
637
|
+
if cls not in _known_keys_cache:
|
|
638
|
+
_known_keys_cache[cls] = cls._field_keys()
|
|
639
|
+
return _known_keys_cache[cls]
|
|
640
|
+
|
|
641
|
+
@classmethod
|
|
642
|
+
def _field_keys(cls) -> frozenset[str] | None:
|
|
643
|
+
keys: set[str] = set()
|
|
644
|
+
hints = _type_hints(cls)
|
|
645
|
+
for field in dataclasses.fields(cls):
|
|
646
|
+
if field.name not in cls._FLATTENED:
|
|
647
|
+
keys.add(cls._json_key(field.name))
|
|
648
|
+
continue
|
|
649
|
+
model = _model_of(hints.get(field.name))
|
|
650
|
+
inner = None if model is None else model._known_keys()
|
|
651
|
+
if inner is None:
|
|
652
|
+
return None
|
|
653
|
+
keys |= inner
|
|
654
|
+
return frozenset(keys)
|
|
655
|
+
|
|
656
|
+
def _keep_extra(
|
|
657
|
+
self,
|
|
658
|
+
data: t.Mapping[str, t.Any],
|
|
659
|
+
known: frozenset[str] | None,
|
|
660
|
+
decoded: bool = False,
|
|
661
|
+
) -> None:
|
|
662
|
+
"""Keeps the keys of ``data`` outside ``known``, decoded unless ``decoded`` already."""
|
|
663
|
+
extra = {k: v for k, v in data.items() if known is not None and k not in known}
|
|
664
|
+
annotation = type(self)._extra_type()
|
|
665
|
+
if extra and not decoded and annotation is not t.Any:
|
|
666
|
+
ctx = f"{type(self).__name__}.extra_fields"
|
|
667
|
+
extra = dict(_from_json_value(annotation, extra, ctx))
|
|
668
|
+
if extra or "_extra" in self.__dict__:
|
|
669
|
+
self.__dict__["_extra"] = extra
|
|
670
|
+
|
|
671
|
+
def _keep_nulls(self, data: t.Mapping[str, t.Any]) -> None:
|
|
672
|
+
"""Remembers the optional fields received as ``null``, which ``None`` otherwise leaves out."""
|
|
673
|
+
nulls = {
|
|
674
|
+
field.name
|
|
675
|
+
for field in dataclasses.fields(self)
|
|
676
|
+
if field.default is None
|
|
677
|
+
and field.name not in self._FLATTENED
|
|
678
|
+
and data.get(self._json_key(field.name), UNSET) is None
|
|
679
|
+
}
|
|
680
|
+
if nulls:
|
|
681
|
+
self.__dict__["_nulls"] = nulls
|
|
682
|
+
|
|
683
|
+
def _with_extra(self, out: dict[str, t.Any]) -> dict[str, t.Any]:
|
|
684
|
+
extra: dict[str, t.Any] = self.__dict__.get("_extra") or {}
|
|
685
|
+
if extra:
|
|
686
|
+
# Entries may hold models, enums or datetimes, set by the caller or typed by
|
|
687
|
+
# `additionalProperties`.
|
|
688
|
+
extra = to_json_value(extra, type(self)._extra_type())
|
|
689
|
+
for key, value in extra.items():
|
|
690
|
+
out.setdefault(key, value)
|
|
691
|
+
return out
|
|
692
|
+
|
|
693
|
+
def _field_value(self, name: str) -> t.Any:
|
|
694
|
+
"""The value of the field ``name``, which a page reads from its body when it shadows it."""
|
|
695
|
+
return getattr(self, name)
|
|
696
|
+
|
|
697
|
+
def _fields_to_dict(self, skip: t.Container[str] = ()) -> dict[str, t.Any]:
|
|
698
|
+
out: dict[str, t.Any] = {}
|
|
699
|
+
hints = _type_hints(type(self))
|
|
700
|
+
nulls: t.Container[str] = self.__dict__.get("_nulls", ())
|
|
701
|
+
for field in dataclasses.fields(self):
|
|
702
|
+
if field.name in skip:
|
|
703
|
+
continue
|
|
704
|
+
value = self._field_value(field.name)
|
|
705
|
+
# `None` leaves out an optional field defaulting to `None` rather than UNSET,
|
|
706
|
+
# unless it was received as `null`.
|
|
707
|
+
if value is UNSET or (
|
|
708
|
+
value is None and field.default is None and field.name not in nulls
|
|
709
|
+
):
|
|
710
|
+
continue
|
|
711
|
+
data = to_json_value(value, hints.get(field.name, t.Any))
|
|
712
|
+
if field.name in self._FLATTENED:
|
|
713
|
+
if not isinstance(data, dict):
|
|
714
|
+
raise TypeError(
|
|
715
|
+
f"{type(self).__name__}.{field.name} must serialize to an object"
|
|
716
|
+
)
|
|
717
|
+
out.update(data)
|
|
718
|
+
else:
|
|
719
|
+
out[self._json_key(field.name)] = data
|
|
720
|
+
return out
|
|
721
|
+
|
|
722
|
+
@classmethod
|
|
723
|
+
def _fields_from_dict(
|
|
724
|
+
cls, data: t.Mapping[str, t.Any], skip: t.Container[str] = ()
|
|
725
|
+
) -> dict[str, t.Any]:
|
|
726
|
+
hints = _type_hints(cls)
|
|
727
|
+
kwargs: dict[str, t.Any] = {}
|
|
728
|
+
for field in dataclasses.fields(cls):
|
|
729
|
+
if field.name in skip:
|
|
730
|
+
continue
|
|
731
|
+
annotation = hints.get(field.name, t.Any)
|
|
732
|
+
ctx = f"{cls.__name__}.{field.name}"
|
|
733
|
+
if field.name in cls._FLATTENED:
|
|
734
|
+
kwargs[field.name] = _from_json_value(annotation, data, ctx)
|
|
735
|
+
if isinstance(kwargs[field.name], BaseModel):
|
|
736
|
+
kwargs[field.name]._keep_extra({}, None)
|
|
737
|
+
continue
|
|
738
|
+
key = cls._json_key(field.name)
|
|
739
|
+
if key in data:
|
|
740
|
+
kwargs[field.name] = _from_json_value(annotation, data[key], ctx)
|
|
741
|
+
elif not _has_default(field):
|
|
742
|
+
if not _accepts_none(annotation):
|
|
743
|
+
raise ModelParseError(
|
|
744
|
+
f"{cls.__name__}: missing required field {key!r}"
|
|
745
|
+
)
|
|
746
|
+
kwargs[field.name] = None
|
|
747
|
+
return kwargs
|
|
748
|
+
|
|
749
|
+
def to_dict(self) -> dict[str, t.Any]:
|
|
750
|
+
"""Serialize into a JSON-compatible dict, with :attr:`extra_fields`."""
|
|
751
|
+
return self._with_extra(self._fields_to_dict())
|
|
752
|
+
|
|
753
|
+
def to_json(self) -> str:
|
|
754
|
+
"""Serialize into a JSON string."""
|
|
755
|
+
return json.dumps(self.to_dict())
|
|
756
|
+
|
|
757
|
+
@classmethod
|
|
758
|
+
def from_dict(cls: type[_M], data: t.Mapping[str, t.Any]) -> _M:
|
|
759
|
+
"""Build a model from a decoded JSON object, unknown keys in :attr:`extra_fields`."""
|
|
760
|
+
if not isinstance(data, t.Mapping):
|
|
761
|
+
raise ModelParseError(
|
|
762
|
+
f"{cls.__name__}: expected an object, got {type(data).__name__}"
|
|
763
|
+
)
|
|
764
|
+
model = cls(**cls._fields_from_dict(data))
|
|
765
|
+
model._keep_extra(data, cls._known_keys())
|
|
766
|
+
model._keep_nulls(data)
|
|
767
|
+
return model
|
|
768
|
+
|
|
769
|
+
@classmethod
|
|
770
|
+
def from_json(cls: type[_M], data: str | bytes) -> _M:
|
|
771
|
+
"""Build a model from a JSON string."""
|
|
772
|
+
return cls.from_dict(json.loads(data))
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
def _model_of(annotation: t.Any) -> type[BaseModel] | None:
|
|
776
|
+
"""The model class of an annotation such as ``Address`` or ``Address | None``."""
|
|
777
|
+
if t.get_origin(annotation) in _UNION_TYPES:
|
|
778
|
+
members = [a for a in t.get_args(annotation) if a not in (_NoneType, Unset)]
|
|
779
|
+
annotation = members[0] if len(members) == 1 else None
|
|
780
|
+
if isinstance(annotation, type) and issubclass(annotation, BaseModel):
|
|
781
|
+
return annotation
|
|
782
|
+
return None
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
def _accepts_none(annotation: t.Any) -> bool:
|
|
786
|
+
if t.get_origin(annotation) is t.Annotated:
|
|
787
|
+
annotation = t.get_args(annotation)[0]
|
|
788
|
+
return annotation is t.Any or (
|
|
789
|
+
t.get_origin(annotation) in _UNION_TYPES and _NoneType in t.get_args(annotation)
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
@dataclasses.dataclass
|
|
794
|
+
class TaggedUnionModel(BaseModel):
|
|
795
|
+
"""Base class for discriminated unions (``oneOf`` with a discriminator).
|
|
796
|
+
|
|
797
|
+
Subclasses declare the discriminator (a ``Literal`` of the variant names),
|
|
798
|
+
the content (a union of the variant models, plus :class:`UnknownVariant`
|
|
799
|
+
for variants added to the API later) and any property shared by all
|
|
800
|
+
variants.
|
|
801
|
+
"""
|
|
802
|
+
|
|
803
|
+
#: JSON key holding the variant name.
|
|
804
|
+
_DISCRIMINATOR: t.ClassVar[str] = ""
|
|
805
|
+
#: Attribute holding the discriminator value.
|
|
806
|
+
_DISCRIMINATOR_ATTR: t.ClassVar[str] = ""
|
|
807
|
+
#: Attribute holding the variant payload.
|
|
808
|
+
_CONTENT_ATTR: t.ClassVar[str] = ""
|
|
809
|
+
#: JSON key holding the variant payload; ``None`` when internally tagged
|
|
810
|
+
#: (i.e. the payload's fields sit next to the discriminator).
|
|
811
|
+
_CONTENT_KEY: t.ClassVar[str | None] = None
|
|
812
|
+
#: Variant name -> model name in the models package (``None`` for
|
|
813
|
+
#: variants without a payload).
|
|
814
|
+
_VARIANTS: t.ClassVar[t.Mapping[str, str | None]] = {}
|
|
815
|
+
|
|
816
|
+
@classmethod
|
|
817
|
+
def _variant(cls, tag: str) -> type[BaseModel] | None:
|
|
818
|
+
variant = cls._VARIANTS[tag]
|
|
819
|
+
if variant is None:
|
|
820
|
+
return None
|
|
821
|
+
model: type[BaseModel] = _namespace(cls)[variant]
|
|
822
|
+
return model
|
|
823
|
+
|
|
824
|
+
def __post_init__(self) -> None:
|
|
825
|
+
if getattr(self, self._DISCRIMINATOR_ATTR) is None:
|
|
826
|
+
setattr(
|
|
827
|
+
self,
|
|
828
|
+
self._DISCRIMINATOR_ATTR,
|
|
829
|
+
self._tag_of(getattr(self, self._CONTENT_ATTR)),
|
|
830
|
+
)
|
|
831
|
+
|
|
832
|
+
@classmethod
|
|
833
|
+
def _tag_of(cls, content: t.Any) -> str:
|
|
834
|
+
if isinstance(content, UnknownVariant):
|
|
835
|
+
return content.tag
|
|
836
|
+
tags = [tag for tag in cls._VARIANTS if cls._variant(tag) is type(content)]
|
|
837
|
+
if len(tags) != 1:
|
|
838
|
+
raise TypeError(
|
|
839
|
+
f"{cls.__name__}: pass {cls._DISCRIMINATOR_ATTR}=, it cannot be told"
|
|
840
|
+
f" from a {type(content).__name__} content"
|
|
841
|
+
)
|
|
842
|
+
return tags[0]
|
|
843
|
+
|
|
844
|
+
def to_dict(self) -> dict[str, t.Any]:
|
|
845
|
+
tag = getattr(self, self._DISCRIMINATOR_ATTR)
|
|
846
|
+
content = getattr(self, self._CONTENT_ATTR)
|
|
847
|
+
if tag not in self._VARIANTS and not isinstance(content, UnknownVariant):
|
|
848
|
+
raise ValueError(f"{type(self).__name__}: unknown variant {tag!r}")
|
|
849
|
+
out = self._fields_to_dict(skip=(self._DISCRIMINATOR_ATTR, self._CONTENT_ATTR))
|
|
850
|
+
serialized = to_json_value(content)
|
|
851
|
+
if self._CONTENT_KEY is not None and content is not None:
|
|
852
|
+
out[self._CONTENT_KEY] = serialized
|
|
853
|
+
elif isinstance(serialized, dict):
|
|
854
|
+
out.update(serialized)
|
|
855
|
+
elif content is not None:
|
|
856
|
+
raise TypeError(
|
|
857
|
+
f"{type(self).__name__}: variant {tag!r} must serialize to an object"
|
|
858
|
+
)
|
|
859
|
+
out[self._DISCRIMINATOR] = tag
|
|
860
|
+
return self._with_extra(out)
|
|
861
|
+
|
|
862
|
+
@classmethod
|
|
863
|
+
def _field_keys(cls) -> frozenset[str] | None:
|
|
864
|
+
keys = super()._field_keys()
|
|
865
|
+
if keys is None:
|
|
866
|
+
return None
|
|
867
|
+
content = set() if cls._CONTENT_KEY is None else {cls._CONTENT_KEY}
|
|
868
|
+
return keys - {cls._json_key(cls._CONTENT_ATTR)} | {
|
|
869
|
+
cls._DISCRIMINATOR,
|
|
870
|
+
*content,
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
@classmethod
|
|
874
|
+
def from_dict(cls: type[_M], data: t.Mapping[str, t.Any]) -> _M:
|
|
875
|
+
if not isinstance(data, t.Mapping):
|
|
876
|
+
raise ModelParseError(
|
|
877
|
+
f"{cls.__name__}: expected an object, got {type(data).__name__}"
|
|
878
|
+
)
|
|
879
|
+
union = t.cast("type[TaggedUnionModel]", cls)
|
|
880
|
+
tag = data.get(union._DISCRIMINATOR)
|
|
881
|
+
if not isinstance(tag, str):
|
|
882
|
+
raise ModelParseError(
|
|
883
|
+
f"{cls.__name__}: missing discriminator {union._DISCRIMINATOR!r}"
|
|
884
|
+
)
|
|
885
|
+
payload: t.Any = (
|
|
886
|
+
data if union._CONTENT_KEY is None else data.get(union._CONTENT_KEY, {})
|
|
887
|
+
)
|
|
888
|
+
if not isinstance(payload, t.Mapping):
|
|
889
|
+
raise ModelParseError(
|
|
890
|
+
f"{cls.__name__}: variant {tag!r} payload must be an object"
|
|
891
|
+
)
|
|
892
|
+
content: t.Any
|
|
893
|
+
if tag not in union._VARIANTS:
|
|
894
|
+
content = UnknownVariant(tag, dict(payload))
|
|
895
|
+
else:
|
|
896
|
+
variant = union._variant(tag)
|
|
897
|
+
content = None if variant is None else variant.from_dict(payload)
|
|
898
|
+
skip = (union._DISCRIMINATOR_ATTR, union._CONTENT_ATTR)
|
|
899
|
+
kwargs = union._fields_from_dict(data, skip=skip)
|
|
900
|
+
kwargs[union._DISCRIMINATOR_ATTR] = tag
|
|
901
|
+
kwargs[union._CONTENT_ATTR] = content
|
|
902
|
+
model = cls(**kwargs)
|
|
903
|
+
model._keep_nulls(data)
|
|
904
|
+
known = union._known_keys()
|
|
905
|
+
if union._CONTENT_KEY is not None:
|
|
906
|
+
model._keep_extra(data, known)
|
|
907
|
+
elif isinstance(content, BaseModel) and known is not None:
|
|
908
|
+
content._keep_extra(
|
|
909
|
+
content.__dict__.get("_extra") or {}, known, decoded=True
|
|
910
|
+
)
|
|
911
|
+
return model
|