ourskyai-node-platform-api 1.3.9821__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.
- ourskyai_node_platform_api/__init__.py +301 -0
- ourskyai_node_platform_api/api/__init__.py +5 -0
- ourskyai_node_platform_api/api/default_api.py +22197 -0
- ourskyai_node_platform_api/api_client.py +758 -0
- ourskyai_node_platform_api/api_response.py +25 -0
- ourskyai_node_platform_api/configuration.py +456 -0
- ourskyai_node_platform_api/exceptions.py +166 -0
- ourskyai_node_platform_api/models/__init__.py +284 -0
- ourskyai_node_platform_api/models/all_sky_camera_diagnosis_report.py +73 -0
- ourskyai_node_platform_api/models/astro_camera_diagnosis_report.py +79 -0
- ourskyai_node_platform_api/models/auto_stretch_image_completed.py +71 -0
- ourskyai_node_platform_api/models/auto_stretch_image_started.py +71 -0
- ourskyai_node_platform_api/models/autofocus_failed.py +71 -0
- ourskyai_node_platform_api/models/autofocus_finished.py +80 -0
- ourskyai_node_platform_api/models/autofocus_method.py +41 -0
- ourskyai_node_platform_api/models/autofocus_point_added.py +75 -0
- ourskyai_node_platform_api/models/autofocus_started.py +79 -0
- ourskyai_node_platform_api/models/bff_v1_all_sky_images.py +90 -0
- ourskyai_node_platform_api/models/camera_image_captured.py +75 -0
- ourskyai_node_platform_api/models/camera_status_updated.py +76 -0
- ourskyai_node_platform_api/models/camera_temperature_set.py +71 -0
- ourskyai_node_platform_api/models/capture_image_started.py +79 -0
- ourskyai_node_platform_api/models/connection_status.py +41 -0
- ourskyai_node_platform_api/models/create_mount_model_completed.py +71 -0
- ourskyai_node_platform_api/models/create_mount_model_failed.py +71 -0
- ourskyai_node_platform_api/models/create_mount_model_started.py +71 -0
- ourskyai_node_platform_api/models/custom_image_processing_container.py +81 -0
- ourskyai_node_platform_api/models/custom_image_processing_container_list.py +81 -0
- ourskyai_node_platform_api/models/debug_logged.py +73 -0
- ourskyai_node_platform_api/models/elevation_mask_diagnostic_completed.py +71 -0
- ourskyai_node_platform_api/models/elevation_mask_diagnostic_failed.py +71 -0
- ourskyai_node_platform_api/models/elevation_mask_diagnostic_started.py +71 -0
- ourskyai_node_platform_api/models/elevation_mask_point_added.py +75 -0
- ourskyai_node_platform_api/models/empty_success.py +71 -0
- ourskyai_node_platform_api/models/enclosure_shutter_label.py +40 -0
- ourskyai_node_platform_api/models/enclosure_shutter_state.py +46 -0
- ourskyai_node_platform_api/models/enclosure_shutter_statuses_updated.py +75 -0
- ourskyai_node_platform_api/models/enclosure_state.py +50 -0
- ourskyai_node_platform_api/models/event_type.py +94 -0
- ourskyai_node_platform_api/models/fits_header.py +73 -0
- ourskyai_node_platform_api/models/focus_operation.py +43 -0
- ourskyai_node_platform_api/models/focuser_diagnosis_report.py +73 -0
- ourskyai_node_platform_api/models/focuser_position.py +81 -0
- ourskyai_node_platform_api/models/focuser_status_updated.py +72 -0
- ourskyai_node_platform_api/models/go_to_altitude_azimuth_completed.py +73 -0
- ourskyai_node_platform_api/models/go_to_altitude_azimuth_failed.py +73 -0
- ourskyai_node_platform_api/models/go_to_altitude_azimuth_started.py +73 -0
- ourskyai_node_platform_api/models/go_to_home_completed.py +71 -0
- ourskyai_node_platform_api/models/go_to_home_failed.py +71 -0
- ourskyai_node_platform_api/models/go_to_home_started.py +71 -0
- ourskyai_node_platform_api/models/go_to_mechanical_coordinates_completed.py +73 -0
- ourskyai_node_platform_api/models/go_to_mechanical_coordinates_failed.py +73 -0
- ourskyai_node_platform_api/models/go_to_mechanical_coordinates_started.py +73 -0
- ourskyai_node_platform_api/models/go_to_ra_dec_completed.py +73 -0
- ourskyai_node_platform_api/models/go_to_ra_dec_failed.py +73 -0
- ourskyai_node_platform_api/models/go_to_ra_dec_started.py +73 -0
- ourskyai_node_platform_api/models/gps_data_updated.py +83 -0
- ourskyai_node_platform_api/models/hardware_daemon_logged.py +71 -0
- ourskyai_node_platform_api/models/ice_message.py +87 -0
- ourskyai_node_platform_api/models/image_file_format.py +42 -0
- ourskyai_node_platform_api/models/image_set_type.py +43 -0
- ourskyai_node_platform_api/models/location.py +75 -0
- ourskyai_node_platform_api/models/message_type.py +46 -0
- ourskyai_node_platform_api/models/message_type_wrapper.py +72 -0
- ourskyai_node_platform_api/models/metric_type.py +42 -0
- ourskyai_node_platform_api/models/motor_faulted.py +76 -0
- ourskyai_node_platform_api/models/motor_faults_cleared.py +72 -0
- ourskyai_node_platform_api/models/mount_diagnosis_report.py +77 -0
- ourskyai_node_platform_api/models/mount_model_point_added.py +77 -0
- ourskyai_node_platform_api/models/mount_model_point_failed.py +73 -0
- ourskyai_node_platform_api/models/mount_status_updated.py +72 -0
- ourskyai_node_platform_api/models/operation_status_updated.py +75 -0
- ourskyai_node_platform_api/models/optical_tube_status.py +71 -0
- ourskyai_node_platform_api/models/optical_tube_status_updated.py +72 -0
- ourskyai_node_platform_api/models/peer.py +78 -0
- ourskyai_node_platform_api/models/peer_role.py +40 -0
- ourskyai_node_platform_api/models/plate_solve_completed.py +75 -0
- ourskyai_node_platform_api/models/plate_solve_failed.py +71 -0
- ourskyai_node_platform_api/models/plate_solve_started.py +71 -0
- ourskyai_node_platform_api/models/platform_connection_diagnosis_report.py +71 -0
- ourskyai_node_platform_api/models/point2_d.py +73 -0
- ourskyai_node_platform_api/models/relay_channel.py +45 -0
- ourskyai_node_platform_api/models/relay_function.py +46 -0
- ourskyai_node_platform_api/models/relays_diagnosis_report.py +75 -0
- ourskyai_node_platform_api/models/relays_status.py +71 -0
- ourskyai_node_platform_api/models/relays_updated.py +82 -0
- ourskyai_node_platform_api/models/roof_diagnosis_report.py +75 -0
- ourskyai_node_platform_api/models/roof_state.py +50 -0
- ourskyai_node_platform_api/models/roof_status.py +71 -0
- ourskyai_node_platform_api/models/roof_updated.py +78 -0
- ourskyai_node_platform_api/models/rotator_position.py +73 -0
- ourskyai_node_platform_api/models/rotator_status_updated.py +72 -0
- ourskyai_node_platform_api/models/rotator_target_type.py +40 -0
- ourskyai_node_platform_api/models/safety_status_updated.py +75 -0
- ourskyai_node_platform_api/models/sdp_message.py +73 -0
- ourskyai_node_platform_api/models/slew_demo_enabled.py +71 -0
- ourskyai_node_platform_api/models/star_measurement_failed.py +71 -0
- ourskyai_node_platform_api/models/star_measurement_started.py +71 -0
- ourskyai_node_platform_api/models/stars_measured.py +75 -0
- ourskyai_node_platform_api/models/startup_wizard_step.py +76 -0
- ourskyai_node_platform_api/models/system_event_type.py +96 -0
- ourskyai_node_platform_api/models/task_cancelled.py +78 -0
- ourskyai_node_platform_api/models/task_completed.py +76 -0
- ourskyai_node_platform_api/models/task_scheduled.py +76 -0
- ourskyai_node_platform_api/models/task_started.py +76 -0
- ourskyai_node_platform_api/models/update_custom_image_processing_container_request.py +73 -0
- ourskyai_node_platform_api/models/v1_all_sky_classification.py +74 -0
- ourskyai_node_platform_api/models/v1_all_sky_classification_label.py +43 -0
- ourskyai_node_platform_api/models/v1_all_sky_image.py +81 -0
- ourskyai_node_platform_api/models/v1_all_sky_images.py +79 -0
- ourskyai_node_platform_api/models/v1_all_sky_keogram.py +81 -0
- ourskyai_node_platform_api/models/v1_all_sky_keograms.py +79 -0
- ourskyai_node_platform_api/models/v1_all_sky_prediction_label.py +43 -0
- ourskyai_node_platform_api/models/v1_all_sky_timelapse.py +81 -0
- ourskyai_node_platform_api/models/v1_all_sky_timelapses.py +79 -0
- ourskyai_node_platform_api/models/v1_apex_charts_timeline.py +79 -0
- ourskyai_node_platform_api/models/v1_apex_charts_timeline_element.py +75 -0
- ourskyai_node_platform_api/models/v1_astro_target.py +83 -0
- ourskyai_node_platform_api/models/v1_camera_roll_image.py +86 -0
- ourskyai_node_platform_api/models/v1_camera_status.py +85 -0
- ourskyai_node_platform_api/models/v1_camera_statuses.py +79 -0
- ourskyai_node_platform_api/models/v1_cancel_all_tasks_request.py +71 -0
- ourskyai_node_platform_api/models/v1_cancel_task_request.py +73 -0
- ourskyai_node_platform_api/models/v1_capture_image_request.py +89 -0
- ourskyai_node_platform_api/models/v1_capture_images_continuously_request.py +89 -0
- ourskyai_node_platform_api/models/v1_connected_camera.py +73 -0
- ourskyai_node_platform_api/models/v1_create_mount_model_request.py +77 -0
- ourskyai_node_platform_api/models/v1_cycle_relays_request.py +74 -0
- ourskyai_node_platform_api/models/v1_delete_image_request.py +71 -0
- ourskyai_node_platform_api/models/v1_diagnose_system_request.py +85 -0
- ourskyai_node_platform_api/models/v1_disable_live_video_request.py +71 -0
- ourskyai_node_platform_api/models/v1_elevation_mask.py +81 -0
- ourskyai_node_platform_api/models/v1_elevation_mask_point.py +75 -0
- ourskyai_node_platform_api/models/v1_enable_live_video_request.py +81 -0
- ourskyai_node_platform_api/models/v1_enclosure_rotator_status.py +75 -0
- ourskyai_node_platform_api/models/v1_enclosure_shutter_status.py +79 -0
- ourskyai_node_platform_api/models/v1_enclosure_shutter_statuses.py +79 -0
- ourskyai_node_platform_api/models/v1_enclosure_status.py +78 -0
- ourskyai_node_platform_api/models/v1_enclosure_window_status.py +75 -0
- ourskyai_node_platform_api/models/v1_end_session_request.py +73 -0
- ourskyai_node_platform_api/models/v1_event.py +80 -0
- ourskyai_node_platform_api/models/v1_event_data.py +911 -0
- ourskyai_node_platform_api/models/v1_filter.py +74 -0
- ourskyai_node_platform_api/models/v1_filter_type.py +65 -0
- ourskyai_node_platform_api/models/v1_filter_wheel_status.py +85 -0
- ourskyai_node_platform_api/models/v1_focuser_limit.py +73 -0
- ourskyai_node_platform_api/models/v1_focuser_status.py +79 -0
- ourskyai_node_platform_api/models/v1_follow_tle_request.py +73 -0
- ourskyai_node_platform_api/models/v1_get_component_status_response.py +145 -0
- ourskyai_node_platform_api/models/v1_get_health_check_response.py +83 -0
- ourskyai_node_platform_api/models/v1_get_storage_status_response.py +75 -0
- ourskyai_node_platform_api/models/v1_gnss_pps_status.py +88 -0
- ourskyai_node_platform_api/models/v1_gnss_pps_status_details.py +77 -0
- ourskyai_node_platform_api/models/v1_go_to_filter_wheel_position_request.py +71 -0
- ourskyai_node_platform_api/models/v1_go_to_focuser_position_request.py +74 -0
- ourskyai_node_platform_api/models/v1_go_to_m3_port_request.py +71 -0
- ourskyai_node_platform_api/models/v1_go_to_mount_coordinates_request.py +77 -0
- ourskyai_node_platform_api/models/v1_go_to_rotator_position_request.py +74 -0
- ourskyai_node_platform_api/models/v1_image.py +103 -0
- ourskyai_node_platform_api/models/v1_images.py +79 -0
- ourskyai_node_platform_api/models/v1_jog_enclosure_rotator_request.py +71 -0
- ourskyai_node_platform_api/models/v1_jog_enclosure_shutter_request.py +74 -0
- ourskyai_node_platform_api/models/v1_jog_enclosure_shutters_request.py +79 -0
- ourskyai_node_platform_api/models/v1_jog_enclosure_window_request.py +71 -0
- ourskyai_node_platform_api/models/v1_jog_mount_request.py +73 -0
- ourskyai_node_platform_api/models/v1_last_sample.py +75 -0
- ourskyai_node_platform_api/models/v1_latest_image.py +89 -0
- ourskyai_node_platform_api/models/v1_list_producers_request.py +71 -0
- ourskyai_node_platform_api/models/v1_list_producers_response.py +81 -0
- ourskyai_node_platform_api/models/v1_m3_status.py +73 -0
- ourskyai_node_platform_api/models/v1_metric.py +82 -0
- ourskyai_node_platform_api/models/v1_motor.py +46 -0
- ourskyai_node_platform_api/models/v1_motor_status.py +87 -0
- ourskyai_node_platform_api/models/v1_mount_model.py +81 -0
- ourskyai_node_platform_api/models/v1_mount_model_point.py +77 -0
- ourskyai_node_platform_api/models/v1_mount_status.py +93 -0
- ourskyai_node_platform_api/models/v1_mount_system_settings.py +73 -0
- ourskyai_node_platform_api/models/v1_move_focuser_position_request.py +74 -0
- ourskyai_node_platform_api/models/v1_move_focuser_response.py +77 -0
- ourskyai_node_platform_api/models/v1_move_focuser_steps_request.py +74 -0
- ourskyai_node_platform_api/models/v1_node_history.py +73 -0
- ourskyai_node_platform_api/models/v1_node_overview.py +122 -0
- ourskyai_node_platform_api/models/v1_node_status.py +43 -0
- ourskyai_node_platform_api/models/v1_ntp_status.py +88 -0
- ourskyai_node_platform_api/models/v1_ntp_status_details.py +73 -0
- ourskyai_node_platform_api/models/v1_open_enclosure_shutters_request.py +71 -0
- ourskyai_node_platform_api/models/v1_open_roof_request.py +71 -0
- ourskyai_node_platform_api/models/v1_optical_tube_cover_status.py +73 -0
- ourskyai_node_platform_api/models/v1_optical_tube_fan_role.py +46 -0
- ourskyai_node_platform_api/models/v1_optical_tube_fan_status.py +76 -0
- ourskyai_node_platform_api/models/v1_optical_tube_fan_statuses.py +79 -0
- ourskyai_node_platform_api/models/v1_optical_tube_heater_role.py +41 -0
- ourskyai_node_platform_api/models/v1_optical_tube_heater_status.py +76 -0
- ourskyai_node_platform_api/models/v1_optical_tube_heater_statuses.py +79 -0
- ourskyai_node_platform_api/models/v1_optical_tube_status.py +87 -0
- ourskyai_node_platform_api/models/v1_peer_status_changed_request.py +81 -0
- ourskyai_node_platform_api/models/v1_ptp_data_set.py +75 -0
- ourskyai_node_platform_api/models/v1_ptp_port_properties.py +77 -0
- ourskyai_node_platform_api/models/v1_ptp_status.py +88 -0
- ourskyai_node_platform_api/models/v1_ptp_status_details.py +102 -0
- ourskyai_node_platform_api/models/v1_ptp_time_status.py +85 -0
- ourskyai_node_platform_api/models/v1_record_video_request.py +71 -0
- ourskyai_node_platform_api/models/v1_relay.py +74 -0
- ourskyai_node_platform_api/models/v1_reset_mount_system_settings_to_default_request.py +73 -0
- ourskyai_node_platform_api/models/v1_reset_system_settings_to_default_request.py +75 -0
- ourskyai_node_platform_api/models/v1_roof_status.py +78 -0
- ourskyai_node_platform_api/models/v1_rotator_status.py +81 -0
- ourskyai_node_platform_api/models/v1_run_autofocus_request.py +82 -0
- ourskyai_node_platform_api/models/v1_run_blind_autofocus_request.py +73 -0
- ourskyai_node_platform_api/models/v1_safety_status.py +83 -0
- ourskyai_node_platform_api/models/v1_save_image_request.py +71 -0
- ourskyai_node_platform_api/models/v1_set_mount_park_position_request.py +73 -0
- ourskyai_node_platform_api/models/v1_set_optical_tube_heater_power_request.py +74 -0
- ourskyai_node_platform_api/models/v1_set_peer_status_request.py +88 -0
- ourskyai_node_platform_api/models/v1_set_relay_state_request.py +74 -0
- ourskyai_node_platform_api/models/v1_signal_message_request.py +90 -0
- ourskyai_node_platform_api/models/v1_signalling_request.py +225 -0
- ourskyai_node_platform_api/models/v1_source_statistics.py +103 -0
- ourskyai_node_platform_api/models/v1_start_session_request.py +90 -0
- ourskyai_node_platform_api/models/v1_stop_capturing_images_continuously_request.py +71 -0
- ourskyai_node_platform_api/models/v1_stop_recording_video_request.py +71 -0
- ourskyai_node_platform_api/models/v1_suntimes.py +87 -0
- ourskyai_node_platform_api/models/v1_system_diagnosis_report.py +117 -0
- ourskyai_node_platform_api/models/v1_system_event.py +80 -0
- ourskyai_node_platform_api/models/v1_system_event_data.py +939 -0
- ourskyai_node_platform_api/models/v1_system_events.py +79 -0
- ourskyai_node_platform_api/models/v1_system_health_check.py +86 -0
- ourskyai_node_platform_api/models/v1_system_location.py +83 -0
- ourskyai_node_platform_api/models/v1_system_location_gps_details.py +77 -0
- ourskyai_node_platform_api/models/v1_system_metric.py +88 -0
- ourskyai_node_platform_api/models/v1_system_metric_names.py +71 -0
- ourskyai_node_platform_api/models/v1_system_metric_tag.py +73 -0
- ourskyai_node_platform_api/models/v1_system_metric_type.py +40 -0
- ourskyai_node_platform_api/models/v1_system_metrics.py +79 -0
- ourskyai_node_platform_api/models/v1_system_network_interface.py +83 -0
- ourskyai_node_platform_api/models/v1_system_network_interface_info.py +75 -0
- ourskyai_node_platform_api/models/v1_system_network_interfaces.py +79 -0
- ourskyai_node_platform_api/models/v1_system_operation_mode.py +41 -0
- ourskyai_node_platform_api/models/v1_system_operation_status.py +75 -0
- ourskyai_node_platform_api/models/v1_system_settings.py +75 -0
- ourskyai_node_platform_api/models/v1_system_status.py +135 -0
- ourskyai_node_platform_api/models/v1_system_storage_status.py +75 -0
- ourskyai_node_platform_api/models/v1_system_time.py +94 -0
- ourskyai_node_platform_api/models/v1_system_variant.py +43 -0
- ourskyai_node_platform_api/models/v1_task.py +78 -0
- ourskyai_node_platform_api/models/v1_task_type.py +47 -0
- ourskyai_node_platform_api/models/v1_time_source.py +42 -0
- ourskyai_node_platform_api/models/v1_time_windowed_asset.py +86 -0
- ourskyai_node_platform_api/models/v1_time_windowed_asset_type.py +40 -0
- ourskyai_node_platform_api/models/v1_turn_off_optical_tube_fans_request.py +72 -0
- ourskyai_node_platform_api/models/v1_turn_on_optical_tube_fans_request.py +72 -0
- ourskyai_node_platform_api/models/v1_ui_operation_mode.py +40 -0
- ourskyai_node_platform_api/models/v1_update_filter_request.py +74 -0
- ourskyai_node_platform_api/models/v1_video.py +105 -0
- ourskyai_node_platform_api/models/v1_videos.py +79 -0
- ourskyai_node_platform_api/models/v1_weather_forecast.py +85 -0
- ourskyai_node_platform_api/models/v1_weather_forecast_city.py +73 -0
- ourskyai_node_platform_api/models/v1_weather_forecast_item.py +103 -0
- ourskyai_node_platform_api/models/v1_weather_forecast_temperature.py +77 -0
- ourskyai_node_platform_api/models/v1_weather_forecast_weather.py +77 -0
- ourskyai_node_platform_api/models/v1_weather_metric.py +85 -0
- ourskyai_node_platform_api/models/v1_weather_metrics.py +79 -0
- ourskyai_node_platform_api/models/v1_weather_station_status.py +71 -0
- ourskyai_node_platform_api/models/v2_capture_image_request.py +89 -0
- ourskyai_node_platform_api/models/v2_cycle_relays_request.py +74 -0
- ourskyai_node_platform_api/models/v2_enclosure_status.py +87 -0
- ourskyai_node_platform_api/models/v2_mount_status.py +94 -0
- ourskyai_node_platform_api/models/v2_relay_status.py +76 -0
- ourskyai_node_platform_api/models/v2_relay_statuses.py +79 -0
- ourskyai_node_platform_api/models/v2_turn_off_relay_request.py +72 -0
- ourskyai_node_platform_api/models/v2_turn_on_relay_request.py +72 -0
- ourskyai_node_platform_api/models/video_codec.py +39 -0
- ourskyai_node_platform_api/models/video_container_format.py +39 -0
- ourskyai_node_platform_api/models/wavefront_sensor_data_updated.py +110 -0
- ourskyai_node_platform_api/models/weather_station_diagnosis_report.py +73 -0
- ourskyai_node_platform_api/models/weather_station_status_updated.py +72 -0
- ourskyai_node_platform_api/py.typed +0 -0
- ourskyai_node_platform_api/rest.py +303 -0
- ourskyai_node_platform_api-1.3.9821.dist-info/METADATA +23 -0
- ourskyai_node_platform_api-1.3.9821.dist-info/RECORD +282 -0
- ourskyai_node_platform_api-1.3.9821.dist-info/WHEEL +5 -0
- ourskyai_node_platform_api-1.3.9821.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,939 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
OurSky
|
|
5
|
+
|
|
6
|
+
Node Platform API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.3.9821
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
from inspect import getfullargspec
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
20
|
+
|
|
21
|
+
from typing import Any, List, Optional
|
|
22
|
+
from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
|
|
23
|
+
from ourskyai_node_platform_api.models.auto_stretch_image_completed import AutoStretchImageCompleted
|
|
24
|
+
from ourskyai_node_platform_api.models.auto_stretch_image_started import AutoStretchImageStarted
|
|
25
|
+
from ourskyai_node_platform_api.models.autofocus_failed import AutofocusFailed
|
|
26
|
+
from ourskyai_node_platform_api.models.autofocus_finished import AutofocusFinished
|
|
27
|
+
from ourskyai_node_platform_api.models.autofocus_point_added import AutofocusPointAdded
|
|
28
|
+
from ourskyai_node_platform_api.models.autofocus_started import AutofocusStarted
|
|
29
|
+
from ourskyai_node_platform_api.models.camera_image_captured import CameraImageCaptured
|
|
30
|
+
from ourskyai_node_platform_api.models.camera_status_updated import CameraStatusUpdated
|
|
31
|
+
from ourskyai_node_platform_api.models.camera_temperature_set import CameraTemperatureSet
|
|
32
|
+
from ourskyai_node_platform_api.models.capture_image_started import CaptureImageStarted
|
|
33
|
+
from ourskyai_node_platform_api.models.create_mount_model_completed import CreateMountModelCompleted
|
|
34
|
+
from ourskyai_node_platform_api.models.create_mount_model_failed import CreateMountModelFailed
|
|
35
|
+
from ourskyai_node_platform_api.models.create_mount_model_started import CreateMountModelStarted
|
|
36
|
+
from ourskyai_node_platform_api.models.debug_logged import DebugLogged
|
|
37
|
+
from ourskyai_node_platform_api.models.elevation_mask_diagnostic_completed import ElevationMaskDiagnosticCompleted
|
|
38
|
+
from ourskyai_node_platform_api.models.elevation_mask_diagnostic_failed import ElevationMaskDiagnosticFailed
|
|
39
|
+
from ourskyai_node_platform_api.models.elevation_mask_diagnostic_started import ElevationMaskDiagnosticStarted
|
|
40
|
+
from ourskyai_node_platform_api.models.elevation_mask_point_added import ElevationMaskPointAdded
|
|
41
|
+
from ourskyai_node_platform_api.models.enclosure_shutter_statuses_updated import EnclosureShutterStatusesUpdated
|
|
42
|
+
from ourskyai_node_platform_api.models.focuser_status_updated import FocuserStatusUpdated
|
|
43
|
+
from ourskyai_node_platform_api.models.go_to_altitude_azimuth_completed import GoToAltitudeAzimuthCompleted
|
|
44
|
+
from ourskyai_node_platform_api.models.go_to_altitude_azimuth_failed import GoToAltitudeAzimuthFailed
|
|
45
|
+
from ourskyai_node_platform_api.models.go_to_altitude_azimuth_started import GoToAltitudeAzimuthStarted
|
|
46
|
+
from ourskyai_node_platform_api.models.go_to_home_completed import GoToHomeCompleted
|
|
47
|
+
from ourskyai_node_platform_api.models.go_to_home_failed import GoToHomeFailed
|
|
48
|
+
from ourskyai_node_platform_api.models.go_to_home_started import GoToHomeStarted
|
|
49
|
+
from ourskyai_node_platform_api.models.go_to_mechanical_coordinates_completed import GoToMechanicalCoordinatesCompleted
|
|
50
|
+
from ourskyai_node_platform_api.models.go_to_mechanical_coordinates_failed import GoToMechanicalCoordinatesFailed
|
|
51
|
+
from ourskyai_node_platform_api.models.go_to_mechanical_coordinates_started import GoToMechanicalCoordinatesStarted
|
|
52
|
+
from ourskyai_node_platform_api.models.go_to_ra_dec_completed import GoToRaDecCompleted
|
|
53
|
+
from ourskyai_node_platform_api.models.go_to_ra_dec_failed import GoToRaDecFailed
|
|
54
|
+
from ourskyai_node_platform_api.models.go_to_ra_dec_started import GoToRaDecStarted
|
|
55
|
+
from ourskyai_node_platform_api.models.gps_data_updated import GpsDataUpdated
|
|
56
|
+
from ourskyai_node_platform_api.models.hardware_daemon_logged import HardwareDaemonLogged
|
|
57
|
+
from ourskyai_node_platform_api.models.motor_faulted import MotorFaulted
|
|
58
|
+
from ourskyai_node_platform_api.models.motor_faults_cleared import MotorFaultsCleared
|
|
59
|
+
from ourskyai_node_platform_api.models.mount_model_point_added import MountModelPointAdded
|
|
60
|
+
from ourskyai_node_platform_api.models.mount_model_point_failed import MountModelPointFailed
|
|
61
|
+
from ourskyai_node_platform_api.models.mount_status_updated import MountStatusUpdated
|
|
62
|
+
from ourskyai_node_platform_api.models.operation_status_updated import OperationStatusUpdated
|
|
63
|
+
from ourskyai_node_platform_api.models.optical_tube_status_updated import OpticalTubeStatusUpdated
|
|
64
|
+
from ourskyai_node_platform_api.models.plate_solve_completed import PlateSolveCompleted
|
|
65
|
+
from ourskyai_node_platform_api.models.plate_solve_failed import PlateSolveFailed
|
|
66
|
+
from ourskyai_node_platform_api.models.plate_solve_started import PlateSolveStarted
|
|
67
|
+
from ourskyai_node_platform_api.models.relays_updated import RelaysUpdated
|
|
68
|
+
from ourskyai_node_platform_api.models.roof_updated import RoofUpdated
|
|
69
|
+
from ourskyai_node_platform_api.models.rotator_status_updated import RotatorStatusUpdated
|
|
70
|
+
from ourskyai_node_platform_api.models.safety_status_updated import SafetyStatusUpdated
|
|
71
|
+
from ourskyai_node_platform_api.models.slew_demo_enabled import SlewDemoEnabled
|
|
72
|
+
from ourskyai_node_platform_api.models.star_measurement_failed import StarMeasurementFailed
|
|
73
|
+
from ourskyai_node_platform_api.models.star_measurement_started import StarMeasurementStarted
|
|
74
|
+
from ourskyai_node_platform_api.models.stars_measured import StarsMeasured
|
|
75
|
+
from ourskyai_node_platform_api.models.startup_wizard_step import StartupWizardStep
|
|
76
|
+
from ourskyai_node_platform_api.models.task_cancelled import TaskCancelled
|
|
77
|
+
from ourskyai_node_platform_api.models.task_completed import TaskCompleted
|
|
78
|
+
from ourskyai_node_platform_api.models.task_scheduled import TaskScheduled
|
|
79
|
+
from ourskyai_node_platform_api.models.task_started import TaskStarted
|
|
80
|
+
from ourskyai_node_platform_api.models.wavefront_sensor_data_updated import WavefrontSensorDataUpdated
|
|
81
|
+
from ourskyai_node_platform_api.models.weather_station_status_updated import WeatherStationStatusUpdated
|
|
82
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
83
|
+
from pydantic import StrictStr, Field
|
|
84
|
+
|
|
85
|
+
V1SYSTEMEVENTDATA_ONE_OF_SCHEMAS = ["AutoStretchImageCompleted", "AutoStretchImageStarted", "AutofocusFailed", "AutofocusFinished", "AutofocusPointAdded", "AutofocusStarted", "CameraImageCaptured", "CameraStatusUpdated", "CameraTemperatureSet", "CaptureImageStarted", "CreateMountModelCompleted", "CreateMountModelFailed", "CreateMountModelStarted", "DebugLogged", "ElevationMaskDiagnosticCompleted", "ElevationMaskDiagnosticFailed", "ElevationMaskDiagnosticStarted", "ElevationMaskPointAdded", "EnclosureShutterStatusesUpdated", "FocuserStatusUpdated", "GoToAltitudeAzimuthCompleted", "GoToAltitudeAzimuthFailed", "GoToAltitudeAzimuthStarted", "GoToHomeCompleted", "GoToHomeFailed", "GoToHomeStarted", "GoToMechanicalCoordinatesCompleted", "GoToMechanicalCoordinatesFailed", "GoToMechanicalCoordinatesStarted", "GoToRaDecCompleted", "GoToRaDecFailed", "GoToRaDecStarted", "GpsDataUpdated", "HardwareDaemonLogged", "MotorFaulted", "MotorFaultsCleared", "MountModelPointAdded", "MountModelPointFailed", "MountStatusUpdated", "OperationStatusUpdated", "OpticalTubeStatusUpdated", "PlateSolveCompleted", "PlateSolveFailed", "PlateSolveStarted", "RelaysUpdated", "RoofUpdated", "RotatorStatusUpdated", "SafetyStatusUpdated", "SlewDemoEnabled", "StarMeasurementFailed", "StarMeasurementStarted", "StarsMeasured", "StartupWizardStep", "TaskCancelled", "TaskCompleted", "TaskScheduled", "TaskStarted", "WavefrontSensorDataUpdated", "WeatherStationStatusUpdated"]
|
|
86
|
+
|
|
87
|
+
class V1SystemEventData(BaseModel):
|
|
88
|
+
"""
|
|
89
|
+
Event-specific data payload. The structure varies based on the event type and contains relevant details about what occurred.
|
|
90
|
+
"""
|
|
91
|
+
# data type: CameraImageCaptured
|
|
92
|
+
oneof_schema_1_validator: Optional[CameraImageCaptured] = None
|
|
93
|
+
# data type: CameraTemperatureSet
|
|
94
|
+
oneof_schema_2_validator: Optional[CameraTemperatureSet] = None
|
|
95
|
+
# data type: HardwareDaemonLogged
|
|
96
|
+
oneof_schema_3_validator: Optional[HardwareDaemonLogged] = None
|
|
97
|
+
# data type: CameraStatusUpdated
|
|
98
|
+
oneof_schema_4_validator: Optional[CameraStatusUpdated] = None
|
|
99
|
+
# data type: MountStatusUpdated
|
|
100
|
+
oneof_schema_5_validator: Optional[MountStatusUpdated] = None
|
|
101
|
+
# data type: OpticalTubeStatusUpdated
|
|
102
|
+
oneof_schema_6_validator: Optional[OpticalTubeStatusUpdated] = None
|
|
103
|
+
# data type: WeatherStationStatusUpdated
|
|
104
|
+
oneof_schema_7_validator: Optional[WeatherStationStatusUpdated] = None
|
|
105
|
+
# data type: FocuserStatusUpdated
|
|
106
|
+
oneof_schema_8_validator: Optional[FocuserStatusUpdated] = None
|
|
107
|
+
# data type: PlateSolveCompleted
|
|
108
|
+
oneof_schema_9_validator: Optional[PlateSolveCompleted] = None
|
|
109
|
+
# data type: CaptureImageStarted
|
|
110
|
+
oneof_schema_10_validator: Optional[CaptureImageStarted] = None
|
|
111
|
+
# data type: AutoStretchImageStarted
|
|
112
|
+
oneof_schema_11_validator: Optional[AutoStretchImageStarted] = None
|
|
113
|
+
# data type: AutoStretchImageCompleted
|
|
114
|
+
oneof_schema_12_validator: Optional[AutoStretchImageCompleted] = None
|
|
115
|
+
# data type: GoToRaDecStarted
|
|
116
|
+
oneof_schema_13_validator: Optional[GoToRaDecStarted] = None
|
|
117
|
+
# data type: GoToRaDecCompleted
|
|
118
|
+
oneof_schema_14_validator: Optional[GoToRaDecCompleted] = None
|
|
119
|
+
# data type: GoToRaDecFailed
|
|
120
|
+
oneof_schema_15_validator: Optional[GoToRaDecFailed] = None
|
|
121
|
+
# data type: GoToAltitudeAzimuthStarted
|
|
122
|
+
oneof_schema_16_validator: Optional[GoToAltitudeAzimuthStarted] = None
|
|
123
|
+
# data type: GoToAltitudeAzimuthCompleted
|
|
124
|
+
oneof_schema_17_validator: Optional[GoToAltitudeAzimuthCompleted] = None
|
|
125
|
+
# data type: GoToAltitudeAzimuthFailed
|
|
126
|
+
oneof_schema_18_validator: Optional[GoToAltitudeAzimuthFailed] = None
|
|
127
|
+
# data type: GoToMechanicalCoordinatesStarted
|
|
128
|
+
oneof_schema_19_validator: Optional[GoToMechanicalCoordinatesStarted] = None
|
|
129
|
+
# data type: GoToMechanicalCoordinatesCompleted
|
|
130
|
+
oneof_schema_20_validator: Optional[GoToMechanicalCoordinatesCompleted] = None
|
|
131
|
+
# data type: GoToMechanicalCoordinatesFailed
|
|
132
|
+
oneof_schema_21_validator: Optional[GoToMechanicalCoordinatesFailed] = None
|
|
133
|
+
# data type: GoToHomeStarted
|
|
134
|
+
oneof_schema_22_validator: Optional[GoToHomeStarted] = None
|
|
135
|
+
# data type: GoToHomeCompleted
|
|
136
|
+
oneof_schema_23_validator: Optional[GoToHomeCompleted] = None
|
|
137
|
+
# data type: GoToHomeFailed
|
|
138
|
+
oneof_schema_24_validator: Optional[GoToHomeFailed] = None
|
|
139
|
+
# data type: SlewDemoEnabled
|
|
140
|
+
oneof_schema_25_validator: Optional[SlewDemoEnabled] = None
|
|
141
|
+
# data type: PlateSolveStarted
|
|
142
|
+
oneof_schema_26_validator: Optional[PlateSolveStarted] = None
|
|
143
|
+
# data type: PlateSolveFailed
|
|
144
|
+
oneof_schema_27_validator: Optional[PlateSolveFailed] = None
|
|
145
|
+
# data type: CreateMountModelStarted
|
|
146
|
+
oneof_schema_28_validator: Optional[CreateMountModelStarted] = None
|
|
147
|
+
# data type: CreateMountModelCompleted
|
|
148
|
+
oneof_schema_29_validator: Optional[CreateMountModelCompleted] = None
|
|
149
|
+
# data type: CreateMountModelFailed
|
|
150
|
+
oneof_schema_30_validator: Optional[CreateMountModelFailed] = None
|
|
151
|
+
# data type: MountModelPointAdded
|
|
152
|
+
oneof_schema_31_validator: Optional[MountModelPointAdded] = None
|
|
153
|
+
# data type: MountModelPointFailed
|
|
154
|
+
oneof_schema_32_validator: Optional[MountModelPointFailed] = None
|
|
155
|
+
# data type: ElevationMaskDiagnosticStarted
|
|
156
|
+
oneof_schema_33_validator: Optional[ElevationMaskDiagnosticStarted] = None
|
|
157
|
+
# data type: ElevationMaskDiagnosticCompleted
|
|
158
|
+
oneof_schema_34_validator: Optional[ElevationMaskDiagnosticCompleted] = None
|
|
159
|
+
# data type: ElevationMaskDiagnosticFailed
|
|
160
|
+
oneof_schema_35_validator: Optional[ElevationMaskDiagnosticFailed] = None
|
|
161
|
+
# data type: ElevationMaskPointAdded
|
|
162
|
+
oneof_schema_36_validator: Optional[ElevationMaskPointAdded] = None
|
|
163
|
+
# data type: StarMeasurementStarted
|
|
164
|
+
oneof_schema_37_validator: Optional[StarMeasurementStarted] = None
|
|
165
|
+
# data type: StarMeasurementFailed
|
|
166
|
+
oneof_schema_38_validator: Optional[StarMeasurementFailed] = None
|
|
167
|
+
# data type: StarsMeasured
|
|
168
|
+
oneof_schema_39_validator: Optional[StarsMeasured] = None
|
|
169
|
+
# data type: DebugLogged
|
|
170
|
+
oneof_schema_40_validator: Optional[DebugLogged] = None
|
|
171
|
+
# data type: AutofocusStarted
|
|
172
|
+
oneof_schema_41_validator: Optional[AutofocusStarted] = None
|
|
173
|
+
# data type: AutofocusFailed
|
|
174
|
+
oneof_schema_42_validator: Optional[AutofocusFailed] = None
|
|
175
|
+
# data type: AutofocusFinished
|
|
176
|
+
oneof_schema_43_validator: Optional[AutofocusFinished] = None
|
|
177
|
+
# data type: AutofocusPointAdded
|
|
178
|
+
oneof_schema_44_validator: Optional[AutofocusPointAdded] = None
|
|
179
|
+
# data type: GpsDataUpdated
|
|
180
|
+
oneof_schema_45_validator: Optional[GpsDataUpdated] = None
|
|
181
|
+
# data type: TaskScheduled
|
|
182
|
+
oneof_schema_46_validator: Optional[TaskScheduled] = None
|
|
183
|
+
# data type: TaskStarted
|
|
184
|
+
oneof_schema_47_validator: Optional[TaskStarted] = None
|
|
185
|
+
# data type: TaskCompleted
|
|
186
|
+
oneof_schema_48_validator: Optional[TaskCompleted] = None
|
|
187
|
+
# data type: TaskCancelled
|
|
188
|
+
oneof_schema_49_validator: Optional[TaskCancelled] = None
|
|
189
|
+
# data type: StartupWizardStep
|
|
190
|
+
oneof_schema_50_validator: Optional[StartupWizardStep] = None
|
|
191
|
+
# data type: RelaysUpdated
|
|
192
|
+
oneof_schema_51_validator: Optional[RelaysUpdated] = None
|
|
193
|
+
# data type: RoofUpdated
|
|
194
|
+
oneof_schema_52_validator: Optional[RoofUpdated] = None
|
|
195
|
+
# data type: SafetyStatusUpdated
|
|
196
|
+
oneof_schema_53_validator: Optional[SafetyStatusUpdated] = None
|
|
197
|
+
# data type: OperationStatusUpdated
|
|
198
|
+
oneof_schema_54_validator: Optional[OperationStatusUpdated] = None
|
|
199
|
+
# data type: RotatorStatusUpdated
|
|
200
|
+
oneof_schema_55_validator: Optional[RotatorStatusUpdated] = None
|
|
201
|
+
# data type: WavefrontSensorDataUpdated
|
|
202
|
+
oneof_schema_56_validator: Optional[WavefrontSensorDataUpdated] = None
|
|
203
|
+
# data type: EnclosureShutterStatusesUpdated
|
|
204
|
+
oneof_schema_57_validator: Optional[EnclosureShutterStatusesUpdated] = None
|
|
205
|
+
# data type: MotorFaulted
|
|
206
|
+
oneof_schema_58_validator: Optional[MotorFaulted] = None
|
|
207
|
+
# data type: MotorFaultsCleared
|
|
208
|
+
oneof_schema_59_validator: Optional[MotorFaultsCleared] = None
|
|
209
|
+
if TYPE_CHECKING:
|
|
210
|
+
actual_instance: Union[AutoStretchImageCompleted, AutoStretchImageStarted, AutofocusFailed, AutofocusFinished, AutofocusPointAdded, AutofocusStarted, CameraImageCaptured, CameraStatusUpdated, CameraTemperatureSet, CaptureImageStarted, CreateMountModelCompleted, CreateMountModelFailed, CreateMountModelStarted, DebugLogged, ElevationMaskDiagnosticCompleted, ElevationMaskDiagnosticFailed, ElevationMaskDiagnosticStarted, ElevationMaskPointAdded, EnclosureShutterStatusesUpdated, FocuserStatusUpdated, GoToAltitudeAzimuthCompleted, GoToAltitudeAzimuthFailed, GoToAltitudeAzimuthStarted, GoToHomeCompleted, GoToHomeFailed, GoToHomeStarted, GoToMechanicalCoordinatesCompleted, GoToMechanicalCoordinatesFailed, GoToMechanicalCoordinatesStarted, GoToRaDecCompleted, GoToRaDecFailed, GoToRaDecStarted, GpsDataUpdated, HardwareDaemonLogged, MotorFaulted, MotorFaultsCleared, MountModelPointAdded, MountModelPointFailed, MountStatusUpdated, OperationStatusUpdated, OpticalTubeStatusUpdated, PlateSolveCompleted, PlateSolveFailed, PlateSolveStarted, RelaysUpdated, RoofUpdated, RotatorStatusUpdated, SafetyStatusUpdated, SlewDemoEnabled, StarMeasurementFailed, StarMeasurementStarted, StarsMeasured, StartupWizardStep, TaskCancelled, TaskCompleted, TaskScheduled, TaskStarted, WavefrontSensorDataUpdated, WeatherStationStatusUpdated]
|
|
211
|
+
else:
|
|
212
|
+
actual_instance: Any
|
|
213
|
+
one_of_schemas: List[str] = Field(V1SYSTEMEVENTDATA_ONE_OF_SCHEMAS, const=True)
|
|
214
|
+
|
|
215
|
+
class Config:
|
|
216
|
+
validate_assignment = True
|
|
217
|
+
|
|
218
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
219
|
+
if args:
|
|
220
|
+
if len(args) > 1:
|
|
221
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
222
|
+
if kwargs:
|
|
223
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
224
|
+
super().__init__(actual_instance=args[0])
|
|
225
|
+
else:
|
|
226
|
+
super().__init__(**kwargs)
|
|
227
|
+
|
|
228
|
+
@validator('actual_instance')
|
|
229
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
230
|
+
instance = V1SystemEventData.construct()
|
|
231
|
+
error_messages = []
|
|
232
|
+
match = 0
|
|
233
|
+
# validate data type: CameraImageCaptured
|
|
234
|
+
if not isinstance(v, CameraImageCaptured):
|
|
235
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CameraImageCaptured`")
|
|
236
|
+
else:
|
|
237
|
+
match += 1
|
|
238
|
+
# validate data type: CameraTemperatureSet
|
|
239
|
+
if not isinstance(v, CameraTemperatureSet):
|
|
240
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CameraTemperatureSet`")
|
|
241
|
+
else:
|
|
242
|
+
match += 1
|
|
243
|
+
# validate data type: HardwareDaemonLogged
|
|
244
|
+
if not isinstance(v, HardwareDaemonLogged):
|
|
245
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `HardwareDaemonLogged`")
|
|
246
|
+
else:
|
|
247
|
+
match += 1
|
|
248
|
+
# validate data type: CameraStatusUpdated
|
|
249
|
+
if not isinstance(v, CameraStatusUpdated):
|
|
250
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CameraStatusUpdated`")
|
|
251
|
+
else:
|
|
252
|
+
match += 1
|
|
253
|
+
# validate data type: MountStatusUpdated
|
|
254
|
+
if not isinstance(v, MountStatusUpdated):
|
|
255
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MountStatusUpdated`")
|
|
256
|
+
else:
|
|
257
|
+
match += 1
|
|
258
|
+
# validate data type: OpticalTubeStatusUpdated
|
|
259
|
+
if not isinstance(v, OpticalTubeStatusUpdated):
|
|
260
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpticalTubeStatusUpdated`")
|
|
261
|
+
else:
|
|
262
|
+
match += 1
|
|
263
|
+
# validate data type: WeatherStationStatusUpdated
|
|
264
|
+
if not isinstance(v, WeatherStationStatusUpdated):
|
|
265
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WeatherStationStatusUpdated`")
|
|
266
|
+
else:
|
|
267
|
+
match += 1
|
|
268
|
+
# validate data type: FocuserStatusUpdated
|
|
269
|
+
if not isinstance(v, FocuserStatusUpdated):
|
|
270
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `FocuserStatusUpdated`")
|
|
271
|
+
else:
|
|
272
|
+
match += 1
|
|
273
|
+
# validate data type: PlateSolveCompleted
|
|
274
|
+
if not isinstance(v, PlateSolveCompleted):
|
|
275
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `PlateSolveCompleted`")
|
|
276
|
+
else:
|
|
277
|
+
match += 1
|
|
278
|
+
# validate data type: CaptureImageStarted
|
|
279
|
+
if not isinstance(v, CaptureImageStarted):
|
|
280
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CaptureImageStarted`")
|
|
281
|
+
else:
|
|
282
|
+
match += 1
|
|
283
|
+
# validate data type: AutoStretchImageStarted
|
|
284
|
+
if not isinstance(v, AutoStretchImageStarted):
|
|
285
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AutoStretchImageStarted`")
|
|
286
|
+
else:
|
|
287
|
+
match += 1
|
|
288
|
+
# validate data type: AutoStretchImageCompleted
|
|
289
|
+
if not isinstance(v, AutoStretchImageCompleted):
|
|
290
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AutoStretchImageCompleted`")
|
|
291
|
+
else:
|
|
292
|
+
match += 1
|
|
293
|
+
# validate data type: GoToRaDecStarted
|
|
294
|
+
if not isinstance(v, GoToRaDecStarted):
|
|
295
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToRaDecStarted`")
|
|
296
|
+
else:
|
|
297
|
+
match += 1
|
|
298
|
+
# validate data type: GoToRaDecCompleted
|
|
299
|
+
if not isinstance(v, GoToRaDecCompleted):
|
|
300
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToRaDecCompleted`")
|
|
301
|
+
else:
|
|
302
|
+
match += 1
|
|
303
|
+
# validate data type: GoToRaDecFailed
|
|
304
|
+
if not isinstance(v, GoToRaDecFailed):
|
|
305
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToRaDecFailed`")
|
|
306
|
+
else:
|
|
307
|
+
match += 1
|
|
308
|
+
# validate data type: GoToAltitudeAzimuthStarted
|
|
309
|
+
if not isinstance(v, GoToAltitudeAzimuthStarted):
|
|
310
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToAltitudeAzimuthStarted`")
|
|
311
|
+
else:
|
|
312
|
+
match += 1
|
|
313
|
+
# validate data type: GoToAltitudeAzimuthCompleted
|
|
314
|
+
if not isinstance(v, GoToAltitudeAzimuthCompleted):
|
|
315
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToAltitudeAzimuthCompleted`")
|
|
316
|
+
else:
|
|
317
|
+
match += 1
|
|
318
|
+
# validate data type: GoToAltitudeAzimuthFailed
|
|
319
|
+
if not isinstance(v, GoToAltitudeAzimuthFailed):
|
|
320
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToAltitudeAzimuthFailed`")
|
|
321
|
+
else:
|
|
322
|
+
match += 1
|
|
323
|
+
# validate data type: GoToMechanicalCoordinatesStarted
|
|
324
|
+
if not isinstance(v, GoToMechanicalCoordinatesStarted):
|
|
325
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToMechanicalCoordinatesStarted`")
|
|
326
|
+
else:
|
|
327
|
+
match += 1
|
|
328
|
+
# validate data type: GoToMechanicalCoordinatesCompleted
|
|
329
|
+
if not isinstance(v, GoToMechanicalCoordinatesCompleted):
|
|
330
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToMechanicalCoordinatesCompleted`")
|
|
331
|
+
else:
|
|
332
|
+
match += 1
|
|
333
|
+
# validate data type: GoToMechanicalCoordinatesFailed
|
|
334
|
+
if not isinstance(v, GoToMechanicalCoordinatesFailed):
|
|
335
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToMechanicalCoordinatesFailed`")
|
|
336
|
+
else:
|
|
337
|
+
match += 1
|
|
338
|
+
# validate data type: GoToHomeStarted
|
|
339
|
+
if not isinstance(v, GoToHomeStarted):
|
|
340
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToHomeStarted`")
|
|
341
|
+
else:
|
|
342
|
+
match += 1
|
|
343
|
+
# validate data type: GoToHomeCompleted
|
|
344
|
+
if not isinstance(v, GoToHomeCompleted):
|
|
345
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToHomeCompleted`")
|
|
346
|
+
else:
|
|
347
|
+
match += 1
|
|
348
|
+
# validate data type: GoToHomeFailed
|
|
349
|
+
if not isinstance(v, GoToHomeFailed):
|
|
350
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GoToHomeFailed`")
|
|
351
|
+
else:
|
|
352
|
+
match += 1
|
|
353
|
+
# validate data type: SlewDemoEnabled
|
|
354
|
+
if not isinstance(v, SlewDemoEnabled):
|
|
355
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SlewDemoEnabled`")
|
|
356
|
+
else:
|
|
357
|
+
match += 1
|
|
358
|
+
# validate data type: PlateSolveStarted
|
|
359
|
+
if not isinstance(v, PlateSolveStarted):
|
|
360
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `PlateSolveStarted`")
|
|
361
|
+
else:
|
|
362
|
+
match += 1
|
|
363
|
+
# validate data type: PlateSolveFailed
|
|
364
|
+
if not isinstance(v, PlateSolveFailed):
|
|
365
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `PlateSolveFailed`")
|
|
366
|
+
else:
|
|
367
|
+
match += 1
|
|
368
|
+
# validate data type: CreateMountModelStarted
|
|
369
|
+
if not isinstance(v, CreateMountModelStarted):
|
|
370
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMountModelStarted`")
|
|
371
|
+
else:
|
|
372
|
+
match += 1
|
|
373
|
+
# validate data type: CreateMountModelCompleted
|
|
374
|
+
if not isinstance(v, CreateMountModelCompleted):
|
|
375
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMountModelCompleted`")
|
|
376
|
+
else:
|
|
377
|
+
match += 1
|
|
378
|
+
# validate data type: CreateMountModelFailed
|
|
379
|
+
if not isinstance(v, CreateMountModelFailed):
|
|
380
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CreateMountModelFailed`")
|
|
381
|
+
else:
|
|
382
|
+
match += 1
|
|
383
|
+
# validate data type: MountModelPointAdded
|
|
384
|
+
if not isinstance(v, MountModelPointAdded):
|
|
385
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MountModelPointAdded`")
|
|
386
|
+
else:
|
|
387
|
+
match += 1
|
|
388
|
+
# validate data type: MountModelPointFailed
|
|
389
|
+
if not isinstance(v, MountModelPointFailed):
|
|
390
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MountModelPointFailed`")
|
|
391
|
+
else:
|
|
392
|
+
match += 1
|
|
393
|
+
# validate data type: ElevationMaskDiagnosticStarted
|
|
394
|
+
if not isinstance(v, ElevationMaskDiagnosticStarted):
|
|
395
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ElevationMaskDiagnosticStarted`")
|
|
396
|
+
else:
|
|
397
|
+
match += 1
|
|
398
|
+
# validate data type: ElevationMaskDiagnosticCompleted
|
|
399
|
+
if not isinstance(v, ElevationMaskDiagnosticCompleted):
|
|
400
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ElevationMaskDiagnosticCompleted`")
|
|
401
|
+
else:
|
|
402
|
+
match += 1
|
|
403
|
+
# validate data type: ElevationMaskDiagnosticFailed
|
|
404
|
+
if not isinstance(v, ElevationMaskDiagnosticFailed):
|
|
405
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ElevationMaskDiagnosticFailed`")
|
|
406
|
+
else:
|
|
407
|
+
match += 1
|
|
408
|
+
# validate data type: ElevationMaskPointAdded
|
|
409
|
+
if not isinstance(v, ElevationMaskPointAdded):
|
|
410
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ElevationMaskPointAdded`")
|
|
411
|
+
else:
|
|
412
|
+
match += 1
|
|
413
|
+
# validate data type: StarMeasurementStarted
|
|
414
|
+
if not isinstance(v, StarMeasurementStarted):
|
|
415
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `StarMeasurementStarted`")
|
|
416
|
+
else:
|
|
417
|
+
match += 1
|
|
418
|
+
# validate data type: StarMeasurementFailed
|
|
419
|
+
if not isinstance(v, StarMeasurementFailed):
|
|
420
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `StarMeasurementFailed`")
|
|
421
|
+
else:
|
|
422
|
+
match += 1
|
|
423
|
+
# validate data type: StarsMeasured
|
|
424
|
+
if not isinstance(v, StarsMeasured):
|
|
425
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `StarsMeasured`")
|
|
426
|
+
else:
|
|
427
|
+
match += 1
|
|
428
|
+
# validate data type: DebugLogged
|
|
429
|
+
if not isinstance(v, DebugLogged):
|
|
430
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DebugLogged`")
|
|
431
|
+
else:
|
|
432
|
+
match += 1
|
|
433
|
+
# validate data type: AutofocusStarted
|
|
434
|
+
if not isinstance(v, AutofocusStarted):
|
|
435
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AutofocusStarted`")
|
|
436
|
+
else:
|
|
437
|
+
match += 1
|
|
438
|
+
# validate data type: AutofocusFailed
|
|
439
|
+
if not isinstance(v, AutofocusFailed):
|
|
440
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AutofocusFailed`")
|
|
441
|
+
else:
|
|
442
|
+
match += 1
|
|
443
|
+
# validate data type: AutofocusFinished
|
|
444
|
+
if not isinstance(v, AutofocusFinished):
|
|
445
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AutofocusFinished`")
|
|
446
|
+
else:
|
|
447
|
+
match += 1
|
|
448
|
+
# validate data type: AutofocusPointAdded
|
|
449
|
+
if not isinstance(v, AutofocusPointAdded):
|
|
450
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AutofocusPointAdded`")
|
|
451
|
+
else:
|
|
452
|
+
match += 1
|
|
453
|
+
# validate data type: GpsDataUpdated
|
|
454
|
+
if not isinstance(v, GpsDataUpdated):
|
|
455
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `GpsDataUpdated`")
|
|
456
|
+
else:
|
|
457
|
+
match += 1
|
|
458
|
+
# validate data type: TaskScheduled
|
|
459
|
+
if not isinstance(v, TaskScheduled):
|
|
460
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TaskScheduled`")
|
|
461
|
+
else:
|
|
462
|
+
match += 1
|
|
463
|
+
# validate data type: TaskStarted
|
|
464
|
+
if not isinstance(v, TaskStarted):
|
|
465
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TaskStarted`")
|
|
466
|
+
else:
|
|
467
|
+
match += 1
|
|
468
|
+
# validate data type: TaskCompleted
|
|
469
|
+
if not isinstance(v, TaskCompleted):
|
|
470
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TaskCompleted`")
|
|
471
|
+
else:
|
|
472
|
+
match += 1
|
|
473
|
+
# validate data type: TaskCancelled
|
|
474
|
+
if not isinstance(v, TaskCancelled):
|
|
475
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TaskCancelled`")
|
|
476
|
+
else:
|
|
477
|
+
match += 1
|
|
478
|
+
# validate data type: StartupWizardStep
|
|
479
|
+
if not isinstance(v, StartupWizardStep):
|
|
480
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `StartupWizardStep`")
|
|
481
|
+
else:
|
|
482
|
+
match += 1
|
|
483
|
+
# validate data type: RelaysUpdated
|
|
484
|
+
if not isinstance(v, RelaysUpdated):
|
|
485
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `RelaysUpdated`")
|
|
486
|
+
else:
|
|
487
|
+
match += 1
|
|
488
|
+
# validate data type: RoofUpdated
|
|
489
|
+
if not isinstance(v, RoofUpdated):
|
|
490
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `RoofUpdated`")
|
|
491
|
+
else:
|
|
492
|
+
match += 1
|
|
493
|
+
# validate data type: SafetyStatusUpdated
|
|
494
|
+
if not isinstance(v, SafetyStatusUpdated):
|
|
495
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SafetyStatusUpdated`")
|
|
496
|
+
else:
|
|
497
|
+
match += 1
|
|
498
|
+
# validate data type: OperationStatusUpdated
|
|
499
|
+
if not isinstance(v, OperationStatusUpdated):
|
|
500
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OperationStatusUpdated`")
|
|
501
|
+
else:
|
|
502
|
+
match += 1
|
|
503
|
+
# validate data type: RotatorStatusUpdated
|
|
504
|
+
if not isinstance(v, RotatorStatusUpdated):
|
|
505
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `RotatorStatusUpdated`")
|
|
506
|
+
else:
|
|
507
|
+
match += 1
|
|
508
|
+
# validate data type: WavefrontSensorDataUpdated
|
|
509
|
+
if not isinstance(v, WavefrontSensorDataUpdated):
|
|
510
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `WavefrontSensorDataUpdated`")
|
|
511
|
+
else:
|
|
512
|
+
match += 1
|
|
513
|
+
# validate data type: EnclosureShutterStatusesUpdated
|
|
514
|
+
if not isinstance(v, EnclosureShutterStatusesUpdated):
|
|
515
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `EnclosureShutterStatusesUpdated`")
|
|
516
|
+
else:
|
|
517
|
+
match += 1
|
|
518
|
+
# validate data type: MotorFaulted
|
|
519
|
+
if not isinstance(v, MotorFaulted):
|
|
520
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MotorFaulted`")
|
|
521
|
+
else:
|
|
522
|
+
match += 1
|
|
523
|
+
# validate data type: MotorFaultsCleared
|
|
524
|
+
if not isinstance(v, MotorFaultsCleared):
|
|
525
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `MotorFaultsCleared`")
|
|
526
|
+
else:
|
|
527
|
+
match += 1
|
|
528
|
+
if match > 1:
|
|
529
|
+
# more than 1 match
|
|
530
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in V1SystemEventData with oneOf schemas: AutoStretchImageCompleted, AutoStretchImageStarted, AutofocusFailed, AutofocusFinished, AutofocusPointAdded, AutofocusStarted, CameraImageCaptured, CameraStatusUpdated, CameraTemperatureSet, CaptureImageStarted, CreateMountModelCompleted, CreateMountModelFailed, CreateMountModelStarted, DebugLogged, ElevationMaskDiagnosticCompleted, ElevationMaskDiagnosticFailed, ElevationMaskDiagnosticStarted, ElevationMaskPointAdded, EnclosureShutterStatusesUpdated, FocuserStatusUpdated, GoToAltitudeAzimuthCompleted, GoToAltitudeAzimuthFailed, GoToAltitudeAzimuthStarted, GoToHomeCompleted, GoToHomeFailed, GoToHomeStarted, GoToMechanicalCoordinatesCompleted, GoToMechanicalCoordinatesFailed, GoToMechanicalCoordinatesStarted, GoToRaDecCompleted, GoToRaDecFailed, GoToRaDecStarted, GpsDataUpdated, HardwareDaemonLogged, MotorFaulted, MotorFaultsCleared, MountModelPointAdded, MountModelPointFailed, MountStatusUpdated, OperationStatusUpdated, OpticalTubeStatusUpdated, PlateSolveCompleted, PlateSolveFailed, PlateSolveStarted, RelaysUpdated, RoofUpdated, RotatorStatusUpdated, SafetyStatusUpdated, SlewDemoEnabled, StarMeasurementFailed, StarMeasurementStarted, StarsMeasured, StartupWizardStep, TaskCancelled, TaskCompleted, TaskScheduled, TaskStarted, WavefrontSensorDataUpdated, WeatherStationStatusUpdated. Details: " + ", ".join(error_messages))
|
|
531
|
+
elif match == 0:
|
|
532
|
+
# no match
|
|
533
|
+
raise ValueError("No match found when setting `actual_instance` in V1SystemEventData with oneOf schemas: AutoStretchImageCompleted, AutoStretchImageStarted, AutofocusFailed, AutofocusFinished, AutofocusPointAdded, AutofocusStarted, CameraImageCaptured, CameraStatusUpdated, CameraTemperatureSet, CaptureImageStarted, CreateMountModelCompleted, CreateMountModelFailed, CreateMountModelStarted, DebugLogged, ElevationMaskDiagnosticCompleted, ElevationMaskDiagnosticFailed, ElevationMaskDiagnosticStarted, ElevationMaskPointAdded, EnclosureShutterStatusesUpdated, FocuserStatusUpdated, GoToAltitudeAzimuthCompleted, GoToAltitudeAzimuthFailed, GoToAltitudeAzimuthStarted, GoToHomeCompleted, GoToHomeFailed, GoToHomeStarted, GoToMechanicalCoordinatesCompleted, GoToMechanicalCoordinatesFailed, GoToMechanicalCoordinatesStarted, GoToRaDecCompleted, GoToRaDecFailed, GoToRaDecStarted, GpsDataUpdated, HardwareDaemonLogged, MotorFaulted, MotorFaultsCleared, MountModelPointAdded, MountModelPointFailed, MountStatusUpdated, OperationStatusUpdated, OpticalTubeStatusUpdated, PlateSolveCompleted, PlateSolveFailed, PlateSolveStarted, RelaysUpdated, RoofUpdated, RotatorStatusUpdated, SafetyStatusUpdated, SlewDemoEnabled, StarMeasurementFailed, StarMeasurementStarted, StarsMeasured, StartupWizardStep, TaskCancelled, TaskCompleted, TaskScheduled, TaskStarted, WavefrontSensorDataUpdated, WeatherStationStatusUpdated. Details: " + ", ".join(error_messages))
|
|
534
|
+
else:
|
|
535
|
+
return v
|
|
536
|
+
|
|
537
|
+
@classmethod
|
|
538
|
+
def from_dict(cls, obj: dict) -> V1SystemEventData:
|
|
539
|
+
return cls.from_json(json.dumps(obj))
|
|
540
|
+
|
|
541
|
+
@classmethod
|
|
542
|
+
def from_json(cls, json_str: str) -> V1SystemEventData:
|
|
543
|
+
"""Returns the object represented by the json string"""
|
|
544
|
+
instance = V1SystemEventData.construct()
|
|
545
|
+
error_messages = []
|
|
546
|
+
match = 0
|
|
547
|
+
|
|
548
|
+
# deserialize data into CameraImageCaptured
|
|
549
|
+
try:
|
|
550
|
+
instance.actual_instance = CameraImageCaptured.from_json(json_str)
|
|
551
|
+
match += 1
|
|
552
|
+
except (ValidationError, ValueError) as e:
|
|
553
|
+
error_messages.append(str(e))
|
|
554
|
+
# deserialize data into CameraTemperatureSet
|
|
555
|
+
try:
|
|
556
|
+
instance.actual_instance = CameraTemperatureSet.from_json(json_str)
|
|
557
|
+
match += 1
|
|
558
|
+
except (ValidationError, ValueError) as e:
|
|
559
|
+
error_messages.append(str(e))
|
|
560
|
+
# deserialize data into HardwareDaemonLogged
|
|
561
|
+
try:
|
|
562
|
+
instance.actual_instance = HardwareDaemonLogged.from_json(json_str)
|
|
563
|
+
match += 1
|
|
564
|
+
except (ValidationError, ValueError) as e:
|
|
565
|
+
error_messages.append(str(e))
|
|
566
|
+
# deserialize data into CameraStatusUpdated
|
|
567
|
+
try:
|
|
568
|
+
instance.actual_instance = CameraStatusUpdated.from_json(json_str)
|
|
569
|
+
match += 1
|
|
570
|
+
except (ValidationError, ValueError) as e:
|
|
571
|
+
error_messages.append(str(e))
|
|
572
|
+
# deserialize data into MountStatusUpdated
|
|
573
|
+
try:
|
|
574
|
+
instance.actual_instance = MountStatusUpdated.from_json(json_str)
|
|
575
|
+
match += 1
|
|
576
|
+
except (ValidationError, ValueError) as e:
|
|
577
|
+
error_messages.append(str(e))
|
|
578
|
+
# deserialize data into OpticalTubeStatusUpdated
|
|
579
|
+
try:
|
|
580
|
+
instance.actual_instance = OpticalTubeStatusUpdated.from_json(json_str)
|
|
581
|
+
match += 1
|
|
582
|
+
except (ValidationError, ValueError) as e:
|
|
583
|
+
error_messages.append(str(e))
|
|
584
|
+
# deserialize data into WeatherStationStatusUpdated
|
|
585
|
+
try:
|
|
586
|
+
instance.actual_instance = WeatherStationStatusUpdated.from_json(json_str)
|
|
587
|
+
match += 1
|
|
588
|
+
except (ValidationError, ValueError) as e:
|
|
589
|
+
error_messages.append(str(e))
|
|
590
|
+
# deserialize data into FocuserStatusUpdated
|
|
591
|
+
try:
|
|
592
|
+
instance.actual_instance = FocuserStatusUpdated.from_json(json_str)
|
|
593
|
+
match += 1
|
|
594
|
+
except (ValidationError, ValueError) as e:
|
|
595
|
+
error_messages.append(str(e))
|
|
596
|
+
# deserialize data into PlateSolveCompleted
|
|
597
|
+
try:
|
|
598
|
+
instance.actual_instance = PlateSolveCompleted.from_json(json_str)
|
|
599
|
+
match += 1
|
|
600
|
+
except (ValidationError, ValueError) as e:
|
|
601
|
+
error_messages.append(str(e))
|
|
602
|
+
# deserialize data into CaptureImageStarted
|
|
603
|
+
try:
|
|
604
|
+
instance.actual_instance = CaptureImageStarted.from_json(json_str)
|
|
605
|
+
match += 1
|
|
606
|
+
except (ValidationError, ValueError) as e:
|
|
607
|
+
error_messages.append(str(e))
|
|
608
|
+
# deserialize data into AutoStretchImageStarted
|
|
609
|
+
try:
|
|
610
|
+
instance.actual_instance = AutoStretchImageStarted.from_json(json_str)
|
|
611
|
+
match += 1
|
|
612
|
+
except (ValidationError, ValueError) as e:
|
|
613
|
+
error_messages.append(str(e))
|
|
614
|
+
# deserialize data into AutoStretchImageCompleted
|
|
615
|
+
try:
|
|
616
|
+
instance.actual_instance = AutoStretchImageCompleted.from_json(json_str)
|
|
617
|
+
match += 1
|
|
618
|
+
except (ValidationError, ValueError) as e:
|
|
619
|
+
error_messages.append(str(e))
|
|
620
|
+
# deserialize data into GoToRaDecStarted
|
|
621
|
+
try:
|
|
622
|
+
instance.actual_instance = GoToRaDecStarted.from_json(json_str)
|
|
623
|
+
match += 1
|
|
624
|
+
except (ValidationError, ValueError) as e:
|
|
625
|
+
error_messages.append(str(e))
|
|
626
|
+
# deserialize data into GoToRaDecCompleted
|
|
627
|
+
try:
|
|
628
|
+
instance.actual_instance = GoToRaDecCompleted.from_json(json_str)
|
|
629
|
+
match += 1
|
|
630
|
+
except (ValidationError, ValueError) as e:
|
|
631
|
+
error_messages.append(str(e))
|
|
632
|
+
# deserialize data into GoToRaDecFailed
|
|
633
|
+
try:
|
|
634
|
+
instance.actual_instance = GoToRaDecFailed.from_json(json_str)
|
|
635
|
+
match += 1
|
|
636
|
+
except (ValidationError, ValueError) as e:
|
|
637
|
+
error_messages.append(str(e))
|
|
638
|
+
# deserialize data into GoToAltitudeAzimuthStarted
|
|
639
|
+
try:
|
|
640
|
+
instance.actual_instance = GoToAltitudeAzimuthStarted.from_json(json_str)
|
|
641
|
+
match += 1
|
|
642
|
+
except (ValidationError, ValueError) as e:
|
|
643
|
+
error_messages.append(str(e))
|
|
644
|
+
# deserialize data into GoToAltitudeAzimuthCompleted
|
|
645
|
+
try:
|
|
646
|
+
instance.actual_instance = GoToAltitudeAzimuthCompleted.from_json(json_str)
|
|
647
|
+
match += 1
|
|
648
|
+
except (ValidationError, ValueError) as e:
|
|
649
|
+
error_messages.append(str(e))
|
|
650
|
+
# deserialize data into GoToAltitudeAzimuthFailed
|
|
651
|
+
try:
|
|
652
|
+
instance.actual_instance = GoToAltitudeAzimuthFailed.from_json(json_str)
|
|
653
|
+
match += 1
|
|
654
|
+
except (ValidationError, ValueError) as e:
|
|
655
|
+
error_messages.append(str(e))
|
|
656
|
+
# deserialize data into GoToMechanicalCoordinatesStarted
|
|
657
|
+
try:
|
|
658
|
+
instance.actual_instance = GoToMechanicalCoordinatesStarted.from_json(json_str)
|
|
659
|
+
match += 1
|
|
660
|
+
except (ValidationError, ValueError) as e:
|
|
661
|
+
error_messages.append(str(e))
|
|
662
|
+
# deserialize data into GoToMechanicalCoordinatesCompleted
|
|
663
|
+
try:
|
|
664
|
+
instance.actual_instance = GoToMechanicalCoordinatesCompleted.from_json(json_str)
|
|
665
|
+
match += 1
|
|
666
|
+
except (ValidationError, ValueError) as e:
|
|
667
|
+
error_messages.append(str(e))
|
|
668
|
+
# deserialize data into GoToMechanicalCoordinatesFailed
|
|
669
|
+
try:
|
|
670
|
+
instance.actual_instance = GoToMechanicalCoordinatesFailed.from_json(json_str)
|
|
671
|
+
match += 1
|
|
672
|
+
except (ValidationError, ValueError) as e:
|
|
673
|
+
error_messages.append(str(e))
|
|
674
|
+
# deserialize data into GoToHomeStarted
|
|
675
|
+
try:
|
|
676
|
+
instance.actual_instance = GoToHomeStarted.from_json(json_str)
|
|
677
|
+
match += 1
|
|
678
|
+
except (ValidationError, ValueError) as e:
|
|
679
|
+
error_messages.append(str(e))
|
|
680
|
+
# deserialize data into GoToHomeCompleted
|
|
681
|
+
try:
|
|
682
|
+
instance.actual_instance = GoToHomeCompleted.from_json(json_str)
|
|
683
|
+
match += 1
|
|
684
|
+
except (ValidationError, ValueError) as e:
|
|
685
|
+
error_messages.append(str(e))
|
|
686
|
+
# deserialize data into GoToHomeFailed
|
|
687
|
+
try:
|
|
688
|
+
instance.actual_instance = GoToHomeFailed.from_json(json_str)
|
|
689
|
+
match += 1
|
|
690
|
+
except (ValidationError, ValueError) as e:
|
|
691
|
+
error_messages.append(str(e))
|
|
692
|
+
# deserialize data into SlewDemoEnabled
|
|
693
|
+
try:
|
|
694
|
+
instance.actual_instance = SlewDemoEnabled.from_json(json_str)
|
|
695
|
+
match += 1
|
|
696
|
+
except (ValidationError, ValueError) as e:
|
|
697
|
+
error_messages.append(str(e))
|
|
698
|
+
# deserialize data into PlateSolveStarted
|
|
699
|
+
try:
|
|
700
|
+
instance.actual_instance = PlateSolveStarted.from_json(json_str)
|
|
701
|
+
match += 1
|
|
702
|
+
except (ValidationError, ValueError) as e:
|
|
703
|
+
error_messages.append(str(e))
|
|
704
|
+
# deserialize data into PlateSolveFailed
|
|
705
|
+
try:
|
|
706
|
+
instance.actual_instance = PlateSolveFailed.from_json(json_str)
|
|
707
|
+
match += 1
|
|
708
|
+
except (ValidationError, ValueError) as e:
|
|
709
|
+
error_messages.append(str(e))
|
|
710
|
+
# deserialize data into CreateMountModelStarted
|
|
711
|
+
try:
|
|
712
|
+
instance.actual_instance = CreateMountModelStarted.from_json(json_str)
|
|
713
|
+
match += 1
|
|
714
|
+
except (ValidationError, ValueError) as e:
|
|
715
|
+
error_messages.append(str(e))
|
|
716
|
+
# deserialize data into CreateMountModelCompleted
|
|
717
|
+
try:
|
|
718
|
+
instance.actual_instance = CreateMountModelCompleted.from_json(json_str)
|
|
719
|
+
match += 1
|
|
720
|
+
except (ValidationError, ValueError) as e:
|
|
721
|
+
error_messages.append(str(e))
|
|
722
|
+
# deserialize data into CreateMountModelFailed
|
|
723
|
+
try:
|
|
724
|
+
instance.actual_instance = CreateMountModelFailed.from_json(json_str)
|
|
725
|
+
match += 1
|
|
726
|
+
except (ValidationError, ValueError) as e:
|
|
727
|
+
error_messages.append(str(e))
|
|
728
|
+
# deserialize data into MountModelPointAdded
|
|
729
|
+
try:
|
|
730
|
+
instance.actual_instance = MountModelPointAdded.from_json(json_str)
|
|
731
|
+
match += 1
|
|
732
|
+
except (ValidationError, ValueError) as e:
|
|
733
|
+
error_messages.append(str(e))
|
|
734
|
+
# deserialize data into MountModelPointFailed
|
|
735
|
+
try:
|
|
736
|
+
instance.actual_instance = MountModelPointFailed.from_json(json_str)
|
|
737
|
+
match += 1
|
|
738
|
+
except (ValidationError, ValueError) as e:
|
|
739
|
+
error_messages.append(str(e))
|
|
740
|
+
# deserialize data into ElevationMaskDiagnosticStarted
|
|
741
|
+
try:
|
|
742
|
+
instance.actual_instance = ElevationMaskDiagnosticStarted.from_json(json_str)
|
|
743
|
+
match += 1
|
|
744
|
+
except (ValidationError, ValueError) as e:
|
|
745
|
+
error_messages.append(str(e))
|
|
746
|
+
# deserialize data into ElevationMaskDiagnosticCompleted
|
|
747
|
+
try:
|
|
748
|
+
instance.actual_instance = ElevationMaskDiagnosticCompleted.from_json(json_str)
|
|
749
|
+
match += 1
|
|
750
|
+
except (ValidationError, ValueError) as e:
|
|
751
|
+
error_messages.append(str(e))
|
|
752
|
+
# deserialize data into ElevationMaskDiagnosticFailed
|
|
753
|
+
try:
|
|
754
|
+
instance.actual_instance = ElevationMaskDiagnosticFailed.from_json(json_str)
|
|
755
|
+
match += 1
|
|
756
|
+
except (ValidationError, ValueError) as e:
|
|
757
|
+
error_messages.append(str(e))
|
|
758
|
+
# deserialize data into ElevationMaskPointAdded
|
|
759
|
+
try:
|
|
760
|
+
instance.actual_instance = ElevationMaskPointAdded.from_json(json_str)
|
|
761
|
+
match += 1
|
|
762
|
+
except (ValidationError, ValueError) as e:
|
|
763
|
+
error_messages.append(str(e))
|
|
764
|
+
# deserialize data into StarMeasurementStarted
|
|
765
|
+
try:
|
|
766
|
+
instance.actual_instance = StarMeasurementStarted.from_json(json_str)
|
|
767
|
+
match += 1
|
|
768
|
+
except (ValidationError, ValueError) as e:
|
|
769
|
+
error_messages.append(str(e))
|
|
770
|
+
# deserialize data into StarMeasurementFailed
|
|
771
|
+
try:
|
|
772
|
+
instance.actual_instance = StarMeasurementFailed.from_json(json_str)
|
|
773
|
+
match += 1
|
|
774
|
+
except (ValidationError, ValueError) as e:
|
|
775
|
+
error_messages.append(str(e))
|
|
776
|
+
# deserialize data into StarsMeasured
|
|
777
|
+
try:
|
|
778
|
+
instance.actual_instance = StarsMeasured.from_json(json_str)
|
|
779
|
+
match += 1
|
|
780
|
+
except (ValidationError, ValueError) as e:
|
|
781
|
+
error_messages.append(str(e))
|
|
782
|
+
# deserialize data into DebugLogged
|
|
783
|
+
try:
|
|
784
|
+
instance.actual_instance = DebugLogged.from_json(json_str)
|
|
785
|
+
match += 1
|
|
786
|
+
except (ValidationError, ValueError) as e:
|
|
787
|
+
error_messages.append(str(e))
|
|
788
|
+
# deserialize data into AutofocusStarted
|
|
789
|
+
try:
|
|
790
|
+
instance.actual_instance = AutofocusStarted.from_json(json_str)
|
|
791
|
+
match += 1
|
|
792
|
+
except (ValidationError, ValueError) as e:
|
|
793
|
+
error_messages.append(str(e))
|
|
794
|
+
# deserialize data into AutofocusFailed
|
|
795
|
+
try:
|
|
796
|
+
instance.actual_instance = AutofocusFailed.from_json(json_str)
|
|
797
|
+
match += 1
|
|
798
|
+
except (ValidationError, ValueError) as e:
|
|
799
|
+
error_messages.append(str(e))
|
|
800
|
+
# deserialize data into AutofocusFinished
|
|
801
|
+
try:
|
|
802
|
+
instance.actual_instance = AutofocusFinished.from_json(json_str)
|
|
803
|
+
match += 1
|
|
804
|
+
except (ValidationError, ValueError) as e:
|
|
805
|
+
error_messages.append(str(e))
|
|
806
|
+
# deserialize data into AutofocusPointAdded
|
|
807
|
+
try:
|
|
808
|
+
instance.actual_instance = AutofocusPointAdded.from_json(json_str)
|
|
809
|
+
match += 1
|
|
810
|
+
except (ValidationError, ValueError) as e:
|
|
811
|
+
error_messages.append(str(e))
|
|
812
|
+
# deserialize data into GpsDataUpdated
|
|
813
|
+
try:
|
|
814
|
+
instance.actual_instance = GpsDataUpdated.from_json(json_str)
|
|
815
|
+
match += 1
|
|
816
|
+
except (ValidationError, ValueError) as e:
|
|
817
|
+
error_messages.append(str(e))
|
|
818
|
+
# deserialize data into TaskScheduled
|
|
819
|
+
try:
|
|
820
|
+
instance.actual_instance = TaskScheduled.from_json(json_str)
|
|
821
|
+
match += 1
|
|
822
|
+
except (ValidationError, ValueError) as e:
|
|
823
|
+
error_messages.append(str(e))
|
|
824
|
+
# deserialize data into TaskStarted
|
|
825
|
+
try:
|
|
826
|
+
instance.actual_instance = TaskStarted.from_json(json_str)
|
|
827
|
+
match += 1
|
|
828
|
+
except (ValidationError, ValueError) as e:
|
|
829
|
+
error_messages.append(str(e))
|
|
830
|
+
# deserialize data into TaskCompleted
|
|
831
|
+
try:
|
|
832
|
+
instance.actual_instance = TaskCompleted.from_json(json_str)
|
|
833
|
+
match += 1
|
|
834
|
+
except (ValidationError, ValueError) as e:
|
|
835
|
+
error_messages.append(str(e))
|
|
836
|
+
# deserialize data into TaskCancelled
|
|
837
|
+
try:
|
|
838
|
+
instance.actual_instance = TaskCancelled.from_json(json_str)
|
|
839
|
+
match += 1
|
|
840
|
+
except (ValidationError, ValueError) as e:
|
|
841
|
+
error_messages.append(str(e))
|
|
842
|
+
# deserialize data into StartupWizardStep
|
|
843
|
+
try:
|
|
844
|
+
instance.actual_instance = StartupWizardStep.from_json(json_str)
|
|
845
|
+
match += 1
|
|
846
|
+
except (ValidationError, ValueError) as e:
|
|
847
|
+
error_messages.append(str(e))
|
|
848
|
+
# deserialize data into RelaysUpdated
|
|
849
|
+
try:
|
|
850
|
+
instance.actual_instance = RelaysUpdated.from_json(json_str)
|
|
851
|
+
match += 1
|
|
852
|
+
except (ValidationError, ValueError) as e:
|
|
853
|
+
error_messages.append(str(e))
|
|
854
|
+
# deserialize data into RoofUpdated
|
|
855
|
+
try:
|
|
856
|
+
instance.actual_instance = RoofUpdated.from_json(json_str)
|
|
857
|
+
match += 1
|
|
858
|
+
except (ValidationError, ValueError) as e:
|
|
859
|
+
error_messages.append(str(e))
|
|
860
|
+
# deserialize data into SafetyStatusUpdated
|
|
861
|
+
try:
|
|
862
|
+
instance.actual_instance = SafetyStatusUpdated.from_json(json_str)
|
|
863
|
+
match += 1
|
|
864
|
+
except (ValidationError, ValueError) as e:
|
|
865
|
+
error_messages.append(str(e))
|
|
866
|
+
# deserialize data into OperationStatusUpdated
|
|
867
|
+
try:
|
|
868
|
+
instance.actual_instance = OperationStatusUpdated.from_json(json_str)
|
|
869
|
+
match += 1
|
|
870
|
+
except (ValidationError, ValueError) as e:
|
|
871
|
+
error_messages.append(str(e))
|
|
872
|
+
# deserialize data into RotatorStatusUpdated
|
|
873
|
+
try:
|
|
874
|
+
instance.actual_instance = RotatorStatusUpdated.from_json(json_str)
|
|
875
|
+
match += 1
|
|
876
|
+
except (ValidationError, ValueError) as e:
|
|
877
|
+
error_messages.append(str(e))
|
|
878
|
+
# deserialize data into WavefrontSensorDataUpdated
|
|
879
|
+
try:
|
|
880
|
+
instance.actual_instance = WavefrontSensorDataUpdated.from_json(json_str)
|
|
881
|
+
match += 1
|
|
882
|
+
except (ValidationError, ValueError) as e:
|
|
883
|
+
error_messages.append(str(e))
|
|
884
|
+
# deserialize data into EnclosureShutterStatusesUpdated
|
|
885
|
+
try:
|
|
886
|
+
instance.actual_instance = EnclosureShutterStatusesUpdated.from_json(json_str)
|
|
887
|
+
match += 1
|
|
888
|
+
except (ValidationError, ValueError) as e:
|
|
889
|
+
error_messages.append(str(e))
|
|
890
|
+
# deserialize data into MotorFaulted
|
|
891
|
+
try:
|
|
892
|
+
instance.actual_instance = MotorFaulted.from_json(json_str)
|
|
893
|
+
match += 1
|
|
894
|
+
except (ValidationError, ValueError) as e:
|
|
895
|
+
error_messages.append(str(e))
|
|
896
|
+
# deserialize data into MotorFaultsCleared
|
|
897
|
+
try:
|
|
898
|
+
instance.actual_instance = MotorFaultsCleared.from_json(json_str)
|
|
899
|
+
match += 1
|
|
900
|
+
except (ValidationError, ValueError) as e:
|
|
901
|
+
error_messages.append(str(e))
|
|
902
|
+
|
|
903
|
+
if match > 1:
|
|
904
|
+
# more than 1 match
|
|
905
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into V1SystemEventData with oneOf schemas: AutoStretchImageCompleted, AutoStretchImageStarted, AutofocusFailed, AutofocusFinished, AutofocusPointAdded, AutofocusStarted, CameraImageCaptured, CameraStatusUpdated, CameraTemperatureSet, CaptureImageStarted, CreateMountModelCompleted, CreateMountModelFailed, CreateMountModelStarted, DebugLogged, ElevationMaskDiagnosticCompleted, ElevationMaskDiagnosticFailed, ElevationMaskDiagnosticStarted, ElevationMaskPointAdded, EnclosureShutterStatusesUpdated, FocuserStatusUpdated, GoToAltitudeAzimuthCompleted, GoToAltitudeAzimuthFailed, GoToAltitudeAzimuthStarted, GoToHomeCompleted, GoToHomeFailed, GoToHomeStarted, GoToMechanicalCoordinatesCompleted, GoToMechanicalCoordinatesFailed, GoToMechanicalCoordinatesStarted, GoToRaDecCompleted, GoToRaDecFailed, GoToRaDecStarted, GpsDataUpdated, HardwareDaemonLogged, MotorFaulted, MotorFaultsCleared, MountModelPointAdded, MountModelPointFailed, MountStatusUpdated, OperationStatusUpdated, OpticalTubeStatusUpdated, PlateSolveCompleted, PlateSolveFailed, PlateSolveStarted, RelaysUpdated, RoofUpdated, RotatorStatusUpdated, SafetyStatusUpdated, SlewDemoEnabled, StarMeasurementFailed, StarMeasurementStarted, StarsMeasured, StartupWizardStep, TaskCancelled, TaskCompleted, TaskScheduled, TaskStarted, WavefrontSensorDataUpdated, WeatherStationStatusUpdated. Details: " + ", ".join(error_messages))
|
|
906
|
+
elif match == 0:
|
|
907
|
+
# no match
|
|
908
|
+
raise ValueError("No match found when deserializing the JSON string into V1SystemEventData with oneOf schemas: AutoStretchImageCompleted, AutoStretchImageStarted, AutofocusFailed, AutofocusFinished, AutofocusPointAdded, AutofocusStarted, CameraImageCaptured, CameraStatusUpdated, CameraTemperatureSet, CaptureImageStarted, CreateMountModelCompleted, CreateMountModelFailed, CreateMountModelStarted, DebugLogged, ElevationMaskDiagnosticCompleted, ElevationMaskDiagnosticFailed, ElevationMaskDiagnosticStarted, ElevationMaskPointAdded, EnclosureShutterStatusesUpdated, FocuserStatusUpdated, GoToAltitudeAzimuthCompleted, GoToAltitudeAzimuthFailed, GoToAltitudeAzimuthStarted, GoToHomeCompleted, GoToHomeFailed, GoToHomeStarted, GoToMechanicalCoordinatesCompleted, GoToMechanicalCoordinatesFailed, GoToMechanicalCoordinatesStarted, GoToRaDecCompleted, GoToRaDecFailed, GoToRaDecStarted, GpsDataUpdated, HardwareDaemonLogged, MotorFaulted, MotorFaultsCleared, MountModelPointAdded, MountModelPointFailed, MountStatusUpdated, OperationStatusUpdated, OpticalTubeStatusUpdated, PlateSolveCompleted, PlateSolveFailed, PlateSolveStarted, RelaysUpdated, RoofUpdated, RotatorStatusUpdated, SafetyStatusUpdated, SlewDemoEnabled, StarMeasurementFailed, StarMeasurementStarted, StarsMeasured, StartupWizardStep, TaskCancelled, TaskCompleted, TaskScheduled, TaskStarted, WavefrontSensorDataUpdated, WeatherStationStatusUpdated. Details: " + ", ".join(error_messages))
|
|
909
|
+
else:
|
|
910
|
+
return instance
|
|
911
|
+
|
|
912
|
+
def to_json(self) -> str:
|
|
913
|
+
"""Returns the JSON representation of the actual instance"""
|
|
914
|
+
if self.actual_instance is None:
|
|
915
|
+
return "null"
|
|
916
|
+
|
|
917
|
+
to_json = getattr(self.actual_instance, "to_json", None)
|
|
918
|
+
if callable(to_json):
|
|
919
|
+
return self.actual_instance.to_json()
|
|
920
|
+
else:
|
|
921
|
+
return json.dumps(self.actual_instance)
|
|
922
|
+
|
|
923
|
+
def to_dict(self) -> dict:
|
|
924
|
+
"""Returns the dict representation of the actual instance"""
|
|
925
|
+
if self.actual_instance is None:
|
|
926
|
+
return None
|
|
927
|
+
|
|
928
|
+
to_dict = getattr(self.actual_instance, "to_dict", None)
|
|
929
|
+
if callable(to_dict):
|
|
930
|
+
return self.actual_instance.to_dict()
|
|
931
|
+
else:
|
|
932
|
+
# primitive type
|
|
933
|
+
return self.actual_instance
|
|
934
|
+
|
|
935
|
+
def to_str(self) -> str:
|
|
936
|
+
"""Returns the string representation of the actual instance"""
|
|
937
|
+
return pprint.pformat(self.dict())
|
|
938
|
+
|
|
939
|
+
|