From 31e1044def4dbff592c4a40aa06f127ea997151b Mon Sep 17 00:00:00 2001 From: Manishi Barosee Date: Tue, 17 Nov 2026 10:24:27 +0000 Subject: [PATCH 1/6] LIMS-2498: add dependencies --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 28276d7..055b80d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,9 @@ dependencies = [ "SQLAlchemy~=2.0.16", "pydantic>=2.8.2,<2.15.0", "fastapi>=0.104.1,<0.163.0", - "pydantic-settings>=2.1,<2.16" + "pydantic-settings>=2.1,<2.16", + "httpx2>=2.13.1,<3", + "attrs>=22.2.0", ] dynamic = ["version"] license.file = "LICENSE" From c9b0132a4b432772ae03e91cd16796cbd53c1b60 Mon Sep 17 00:00:00 2001 From: Manishi Barosee Date: Tue, 17 Nov 2026 10:25:16 +0000 Subject: [PATCH 2/6] LIMS-2498: add generated client files --- src/lims_utils/expeye_client/README.md | 123 ++ src/lims_utils/expeye_client/__init__.py | 8 + src/lims_utils/expeye_client/api/__init__.py | 1 + .../expeye_client/api/admin_vars/__init__.py | 1 + ...admin_var_admin_vars_admin_var_name_get.py | 169 ++ ...min_var_admin_vars_admin_var_name_patch.py | 190 +++ .../expeye_client/api/atlas/__init__.py | 1 + ...e_atlas_data_groups_group_id_atlas_post.py | 190 +++ ...et_atlas_data_groups_group_id_atlas_get.py | 169 ++ ...squares_atlas_atlas_id_grid_squares_get.py | 239 +++ ...quares_atlas_atlas_id_grid_squares_post.py | 198 +++ .../update_atlas_atlas_atlas_id_patch.py | 190 +++ .../expeye_client/api/contacts/__init__.py | 1 + ...lab_contact_contacts_lab_contact_id_get.py | 169 ++ .../api/container_inspections/__init__.py | 1 + ...pections_container_inspection_id_delete.py | 167 ++ ...ntainer_inspection_id_sample_images_get.py | 209 +++ ...spections_container_inspection_id_patch.py | 190 +++ .../api/container_registry/__init__.py | 1 + ...registry_entries_container_registry_get.py | 213 +++ ...ry_container_registry_barcode_or_id_get.py | 190 +++ ...r_registry_barcode_or_id_containers_get.py | 224 +++ ..._container_registry_barcode_or_id_patch.py | 210 +++ .../expeye_client/api/containers/__init__.py | 1 + ...containers_container_id_containers_post.py | 190 +++ ...ry_containers_container_id_history_post.py | 210 +++ ...ontainers_container_id_inspections_post.py | 190 +++ ...iners_container_id_container_queue_post.py | 190 +++ ...le_containers_container_id_samples_post.py | 221 +++ ...ers_container_id_container_queue_delete.py | 167 ++ ...container_containers_container_id_patch.py | 190 +++ ...t_container_containers_container_id_get.py | 169 ++ ...ory_containers_container_id_history_get.py | 254 +++ ...containers_container_id_inspections_get.py | 209 +++ ...ainers_container_id_container_queue_get.py | 209 +++ ...ners_container_id_diffraction_plans_get.py | 209 +++ ...les_containers_container_id_samples_get.py | 253 +++ ...uck_containers_container_id_assign_post.py | 190 +++ ...ontainer_queue_container_queue_id_patch.py | 204 +++ ...rs_container_id_diffraction_plans_patch.py | 190 +++ .../expeye_client/api/crystals/__init__.py | 1 + .../get_crystal_crystals_crystal_id_get.py | 169 ++ ...pdate_crystal_crystals_crystal_id_patch.py | 190 +++ .../expeye_client/api/ctf/__init__.py | 1 + .../api/ctf/delete_ctf_ctf_ctf_id_delete.py | 167 ++ ..._collections_data_collection_id_ctf_get.py | 174 ++ .../api/ctf/update_ctf_ctf_ctf_id_patch.py | 190 +++ .../api/data_collection_groups/__init__.py | 1 + ...a_groups_group_id_data_collections_post.py | 190 +++ ...ta_groups_group_id_data_collections_get.py | 229 +++ ..._dcg_data_groups_group_id_tomograms_get.py | 268 +++ ...ection_group_data_groups_group_id_patch.py | 190 +++ .../api/data_collections/__init__.py | 1 + ...tions_data_collection_id_apertures_post.py | 190 +++ ...ons_data_collection_id_attachments_post.py | 190 +++ ...ctions_data_collection_id_comments_post.py | 190 +++ ...llections_data_collection_id_grids_post.py | 190 +++ ...ctions_data_collection_id_position_post.py | 190 +++ ...tion_id_attachments_attachment_id_patch.py | 204 +++ ...ection_id_attachments_attachment_id_get.py | 183 ++ ...ions_data_collection_id_attachments_get.py | 252 +++ ...ections_data_collection_id_comments_get.py | 169 ++ ...data_collections_data_collection_id_get.py | 169 ++ ...ollections_data_collection_id_grids_get.py | 224 +++ ...lection_id_image_quality_indicators_get.py | 169 ++ ...ections_data_collection_id_position_get.py | 169 ++ ..._data_collection_id_processing_jobs_get.py | 479 ++++++ ...collection_id_comments_comment_id_patch.py | 204 +++ ...ta_collections_data_collection_id_patch.py | 210 +++ ...tions_data_collection_id_position_patch.py | 190 +++ .../api/dewar_registry/__init__.py | 1 + ...ewar_registry_entry_dewar_registry_post.py | 174 ++ ...war_registry_entries_dewar_registry_get.py | 213 +++ ..._entry_dewar_registry_facility_code_get.py | 169 ++ ...ntry_dewar_registry_facility_code_patch.py | 190 +++ .../expeye_client/api/dewars/__init__.py | 1 + ...ntainer_dewars_dewar_id_containers_post.py | 190 +++ ...tory_entry_dewars_dewar_id_history_post.py | 190 +++ .../edit_dewar_dewars_dewar_id_patch.py | 214 +++ .../dewars/get_dewar_dewars_dewar_id_get.py | 169 ++ ...war_history_dewars_dewar_id_history_get.py | 209 +++ ...s_dewars_dewar_id_diffraction_plans_get.py | 209 +++ ...dewars_dewar_id_diffraction_plans_patch.py | 190 +++ .../api/diffraction_plans/__init__.py | 1 + ...raction_plans_diffraction_plan_id_patch.py | 190 +++ .../api/energy_scans/__init__.py | 1 + ...gy_scan_energy_scans_energy_scan_id_get.py | 169 ++ ..._scan_energy_scans_energy_scan_id_patch.py | 190 +++ .../api/fluorescence_spectrums/__init__.py | 1 + ..._spectrums_fluorescence_spectrum_id_get.py | 169 ++ ...pectrums_fluorescence_spectrum_id_patch.py | 190 +++ .../api/grid_squares/__init__.py | 1 + ...d_squares_grid_square_id_foil_holes_get.py | 209 +++ ..._square_grid_squares_grid_square_id_get.py | 169 ++ ...quares_grid_square_id_milling_steps_get.py | 209 +++ ...id_squares_grid_square_id_tomograms_get.py | 209 +++ ..._squares_grid_square_id_foil_holes_post.py | 198 +++ ...uares_grid_square_id_milling_steps_post.py | 198 +++ ...squares_grid_square_id_foil_holes_patch.py | 193 +++ .../expeye_client/api/grids/__init__.py | 1 + .../update_grid_grids_grid_info_id_patch.py | 190 +++ .../expeye_client/api/ligands/__init__.py | 1 + ...gands_ligand_id_pdb_entries_pdb_id_post.py | 183 ++ ...igands_ligand_id_samples_sample_id_post.py | 183 ++ .../edit_ligand_ligands_ligand_id_patch.py | 190 +++ .../get_ligand_ligands_ligand_id_get.py | 169 ++ ..._pdbs_ligands_ligand_id_pdb_entries_get.py | 249 +++ .../expeye_client/api/meta/__init__.py | 1 + .../api/meta/get_version_version_get.py | 85 + .../expeye_client/api/motion/__init__.py | 1 + ...orrection_motion_correction_id_ctf_post.py | 190 +++ ..._correction_motion_correction_id_delete.py | 167 ++ ...ata_collection_id_motion_correction_get.py | 209 +++ ...n_correction_motion_correction_id_patch.py | 198 +++ .../api/mx_lims_shipments/__init__.py | 1 + ...o_proc_attachment_mxlims_shipments_post.py | 172 ++ .../expeye_client/api/pdb_entries/__init__.py | 1 + ...b_entries_pdb_id_ligands_ligand_id_post.py | 183 ++ ..._ligands_pdb_entries_pdb_id_ligands_get.py | 229 +++ .../expeye_client/api/persons/__init__.py | 1 + .../api/persons/create_person_persons_post.py | 174 ++ .../delete_person_persons_person_id_delete.py | 167 ++ .../get_person_persons_person_id_get.py | 170 ++ .../api/persons/get_persons_persons_get.py | 223 +++ ...roups_persons_person_id_user_groups_get.py | 210 +++ .../update_person_persons_person_id_patch.py | 191 +++ .../api/processing_jobs/__init__.py | 1 + ...cessing_job_id_processing_programs_post.py | 190 +++ ...ocessing_job_id_processing_programs_get.py | 209 +++ ...g_jobs_processing_job_id_parameters_get.py | 169 ++ ...g_jobs_processing_job_id_parameters_put.py | 190 +++ .../api/processing_programs/__init__.py | 1 + ...s_auto_proc_program_id_attachments_post.py | 190 +++ ...nts_auto_proc_program_attachment_id_get.py | 183 ++ ...ms_auto_proc_program_id_attachments_get.py | 309 ++++ ...o_proc_program_id_motion_correction_get.py | 209 +++ ...s_auto_proc_program_attachment_id_patch.py | 190 +++ ...ing_programs_auto_proc_program_id_patch.py | 190 +++ .../expeye_client/api/proposals/__init__.py | 1 + ...posal_reference_container_registry_post.py | 190 +++ ...e_container_registry_barcode_or_id_post.py | 224 +++ ...posals_proposal_reference_crystals_post.py | 222 +++ ..._proposal_reference_dewar_registry_post.py | 190 +++ ...erence_dewar_registry_barcode_or_id_put.py | 224 +++ ...roposal_reference_shipments_upload_post.py | 190 +++ ...oposals_proposal_reference_ligands_post.py | 190 +++ .../create_proposal_proposals_post.py | 174 ++ ...posals_proposal_reference_proteins_post.py | 190 +++ ...posals_proposal_reference_sessions_post.py | 190 +++ ...osals_proposal_reference_shipments_post.py | 190 +++ ...container_registry_barcode_or_id_delete.py | 202 +++ ...nce_dewar_registry_barcode_or_id_delete.py | 202 +++ ...sal_proposals_proposal_reference_delete.py | 167 ++ ...oposal_reference_container_registry_get.py | 229 +++ ...ce_container_registry_barcode_or_id_get.py | 204 +++ ...s_proposal_reference_dewar_registry_get.py | 229 +++ ...erence_dewar_registry_facility_code_get.py | 183 ++ ...ls_proposal_reference_sample_events_get.py | 274 +++ ...als_proposal_reference_lab_contacts_get.py | 209 +++ ..._proposal_reference_processing_jobs_get.py | 502 ++++++ ...a_proposals_proposal_reference_data_get.py | 169 ++ ...oposal_proposals_proposal_reference_get.py | 169 ++ ...roposals_proposal_reference_samples_get.py | 253 +++ ...posals_proposal_reference_shipments_get.py | 209 +++ .../proposals/get_proposals_proposals_get.py | 268 +++ ...oposals_proposal_reference_proteins_get.py | 209 +++ ...oposals_proposal_reference_sessions_get.py | 292 ++++ ..._proposals_proposal_reference_staff_get.py | 209 +++ ..._container_registry_barcode_or_id_patch.py | 224 +++ ...osal_proposals_proposal_reference_patch.py | 190 +++ .../expeye_client/api/proteins/__init__.py | 1 + ...ystal_proteins_protein_id_crystals_post.py | 190 +++ .../edit_protein_proteins_protein_id_patch.py | 190 +++ ...ystals_proteins_protein_id_crystals_get.py | 209 +++ .../get_protein_proteins_protein_id_get.py | 169 ++ .../api/robot_actions/__init__.py | 1 + ...tions_robot_action_id_laser_points_post.py | 190 +++ ...obot_actions_robot_action_id_laser_post.py | 190 +++ ...robot_actions_robot_action_id_laser_get.py | 169 ++ ...ction_robot_actions_robot_action_id_get.py | 169 ++ ..._robot_action_id_laser_parameters_patch.py | 190 +++ ...ion_robot_actions_robot_action_id_patch.py | 190 +++ .../api/sample_images/__init__.py | 1 + ...ge_sample_images_sample_image_id_delete.py | 167 ++ ...image_sample_images_sample_image_id_get.py | 169 ++ ...age_sample_images_sample_image_id_patch.py | 190 +++ .../expeye_client/api/samples/__init__.py | 1 + ...samples_sample_id_diffraction_plan_post.py | 190 +++ ...ple_image_samples_sample_id_images_post.py | 190 +++ ...amples_sample_id_ligands_ligand_id_post.py | 183 ++ ...sition_samples_sample_id_positions_post.py | 190 +++ .../api/samples/create_sample_samples_post.py | 199 +++ ...s_sample_id_positions_position_id_patch.py | 204 +++ ...tions_samples_sample_id_positions_patch.py | 215 +++ .../edit_sample_samples_sample_id_patch.py | 190 +++ ..._samples_sample_id_diffraction_plan_get.py | 169 ++ ...cans_samples_sample_id_energy_scans_get.py | 209 +++ ...ple_images_samples_sample_id_images_get.py | 209 +++ ...e_ligands_samples_sample_id_ligands_get.py | 229 +++ ...sitions_samples_sample_id_positions_get.py | 229 +++ .../get_sample_samples_sample_id_get.py | 169 ++ ...amples_sample_id_diffraction_plan_patch.py | 190 +++ .../expeye_client/api/sessions/__init__.py | 1 + ..._sessions_visit_number_data_groups_post.py | 204 +++ ...sessions_visit_number_energy_scans_post.py | 204 +++ ...isit_number_fluorescence_spectrums_post.py | 204 +++ ...ence_sessions_visit_number_persons_post.py | 207 +++ ...essions_visit_number_robot_actions_post.py | 204 +++ ...essions_visit_number_session_types_post.py | 204 +++ ...essions_session_uuid_session_types_post.py | 191 +++ ..._reference_sessions_visit_number_delete.py | 181 ++ .../sessions/get_beamlines_beamlines_get.py | 131 ++ ...e_sessions_visit_number_data_groups_get.py | 243 +++ ..._sessions_visit_number_energy_scans_get.py | 223 +++ ...visit_number_fluorescence_spectrums_get.py | 243 +++ ...ference_sessions_visit_number_blobs_get.py | 243 +++ ...ber_processing_programs_attachments_get.py | 286 ++++ ...sessions_visit_number_robot_actions_get.py | 243 +++ ...erence_sessions_visit_number_events_get.py | 309 ++++ ..._sessions_visit_number_group_events_get.py | 307 ++++ ...sal_reference_sessions_visit_number_get.py | 183 ++ .../api/sessions/get_sessions_sessions_get.py | 390 +++++ ...nce_sessions_visit_number_persons_patch.py | 207 +++ ...ssions_visit_number_blobs_blob_id_patch.py | 218 +++ ...r_processing_programs_attachments_patch.py | 272 +++ ...l_reference_sessions_visit_number_patch.py | 204 +++ .../expeye_client/api/shipments/__init__.py | 1 + ...dewar_shipments_shipment_id_dewars_post.py | 190 +++ ...hipment_from_file_shipments_upload_post.py | 233 +++ ...it_shipment_shipments_shipment_id_patch.py | 190 +++ ...dewars_shipments_shipment_id_dewars_get.py | 209 +++ ...ments_shipment_id_diffraction_plans_get.py | 209 +++ ...mples_shipments_shipment_id_samples_get.py | 253 +++ .../get_shipment_shipments_shipment_id_get.py | 169 ++ ...nts_shipment_id_diffraction_plans_patch.py | 190 +++ .../expeye_client/api/tomograms/__init__.py | 1 + .../get_tomogram_tomograms_tomogram_id_get.py | 169 ++ .../expeye_client/api/user_groups/__init__.py | 1 + ...ch_params_user_groups_search_params_get.py | 193 +++ ...r_groups_usergroup_id_search_params_get.py | 209 +++ ..._usergroup_user_groups_usergroup_id_get.py | 169 ++ .../get_usergroups_user_groups_get.py | 193 +++ ...p_user_groups_usergroup_id_persons_post.py | 197 +++ ...oups_usergroup_id_persons_person_delete.py | 206 +++ src/lims_utils/expeye_client/client.py | 268 +++ src/lims_utils/expeye_client/errors.py | 16 + .../expeye_client/models/__init__.py | 615 +++++++ .../expeye_client/models/admin_var_in.py | 73 + .../expeye_client/models/admin_var_out.py | 103 ++ .../expeye_client/models/aperture_in.py | 73 + .../expeye_client/models/aperture_out.py | 83 + .../expeye_client/models/atlas_in.py | 183 ++ .../expeye_client/models/atlas_optional.py | 209 +++ .../expeye_client/models/atlas_out.py | 199 +++ .../expeye_client/models/atlas_type.py | 9 + .../models/auto_proc_integration_out.py | 418 +++++ .../models/auto_proc_program_attachment_in.py | 195 +++ .../auto_proc_program_attachment_optional.py | 195 +++ .../auto_proc_program_attachment_out.py | 213 +++ .../models/auto_proc_program_in.py | 295 ++++ .../models/auto_proc_program_optional.py | 295 ++++ .../models/auto_proc_program_out.py | 322 ++++ .../models/auto_proc_program_scaling_out.py | 328 ++++ ...ling_out_scaling_statistics_type_type_0.py | 10 + .../auto_proc_program_with_auto_proc_out.py | 372 +++++ .../auto_proc_scaling_statistics_out.py | 454 +++++ ...ng_statistics_out_scalingstatisticstype.py | 10 + .../models/auto_proc_with_scaling_out.py | 301 ++++ ...hipment_from_file_shipments_upload_post.py | 88 + .../expeye_client/models/centring_method.py | 11 + .../expeye_client/models/collection_mode.py | 9 + .../models/container_history_in.py | 153 ++ .../models/container_history_out.py | 172 ++ .../expeye_client/models/container_in.py | 353 ++++ .../models/container_inspection_in.py | 274 +++ .../models/container_inspection_optional.py | 273 +++ .../models/container_inspection_out.py | 290 ++++ .../expeye_client/models/container_load.py | 83 + .../models/container_optional.py | 353 ++++ .../expeye_client/models/container_out.py | 403 +++++ .../models/container_queue_in.py | 104 ++ .../models/container_queue_out.py | 174 ++ .../models/container_with_children_in.py | 377 +++++ .../models/container_with_children_out.py | 430 +++++ .../expeye_client/models/crystal_in.py | 470 ++++++ .../expeye_client/models/crystal_optional.py | 470 ++++++ .../expeye_client/models/crystal_out.py | 472 ++++++ .../models/crystal_with_protein.py | 481 ++++++ .../expeye_client/models/ctf_base.py | 374 +++++ src/lims_utils/expeye_client/models/ctf_in.py | 374 +++++ .../expeye_client/models/ctf_optional.py | 394 +++++ .../expeye_client/models/ctf_out.py | 424 +++++ .../models/data_collection_comment_in.py | 94 ++ .../data_collection_comment_optional.py | 114 ++ .../models/data_collection_comment_out.py | 198 +++ .../data_collection_file_attachment_in.py | 101 ++ ...ata_collection_file_attachment_optional.py | 104 ++ .../data_collection_file_attachment_out.py | 125 ++ .../models/data_collection_group_in.py | 387 +++++ ...lection_group_in_experiment_type_type_0.py | 38 + .../models/data_collection_group_optional.py | 429 +++++ ...n_group_optional_experiment_type_type_0.py | 38 + .../models/data_collection_group_out.py | 445 +++++ ...ection_group_out_experiment_type_type_0.py | 38 + .../models/data_collection_in.py | 1426 ++++++++++++++++ .../models/data_collection_optional.py | 1446 ++++++++++++++++ .../models/data_collection_out.py | 1468 +++++++++++++++++ .../expeye_client/models/dewar_in.py | 386 +++++ .../models/dewar_in_extra_type_0_type_0.py | 45 + .../expeye_client/models/dewar_optional.py | 386 +++++ .../dewar_optional_extra_type_0_type_0.py | 45 + .../expeye_client/models/dewar_out.py | 404 +++++ .../models/dewar_out_extra_type_0_type_0.py | 45 + .../models/dewar_transport_history_in.py | 114 ++ .../models/dewar_transport_history_out.py | 130 ++ .../models/dewar_with_children_in.py | 406 +++++ ...ar_with_children_in_extra_type_0_type_0.py | 45 + .../models/dewar_with_children_out.py | 427 +++++ ...r_with_children_out_extra_type_0_type_0.py | 45 + .../diffraction_plan_experiment_type.py | 28 + .../models/diffraction_plan_in.py | 1334 +++++++++++++++ ...n_plan_in_scan_parameters_type_0_type_0.py | 45 + .../models/diffraction_plan_optional.py | 1342 +++++++++++++++ ..._optional_scan_parameters_type_0_type_0.py | 45 + .../models/diffraction_plan_out.py | 1355 +++++++++++++++ ..._plan_out_scan_parameters_type_0_type_0.py | 45 + .../expeye_client/models/energy_scan_in.py | 574 +++++++ .../models/energy_scan_optional.py | 554 +++++++ .../expeye_client/models/energy_scan_out.py | 572 +++++++ .../models/file_attachment_type.py | 14 + .../expeye_client/models/file_type.py | 12 + .../models/fluorescence_spectrum_in.py | 474 ++++++ .../models/fluorescence_spectrum_optional.py | 494 ++++++ .../models/fluorescence_spectrum_out.py | 492 ++++++ .../expeye_client/models/foil_hole_in.py | 204 +++ .../models/foil_hole_optional_with_id.py | 224 +++ .../expeye_client/models/foil_hole_out.py | 324 ++++ .../models/full_movie_optional.py | 125 ++ .../expeye_client/models/full_movie_out.py | 97 ++ ...s_group_id_tomograms_get_sort_by_type_0.py | 9 + .../expeye_client/models/grid_info_in.py | 435 +++++ .../models/grid_info_in_orientation_type_0.py | 9 + .../models/grid_info_optional.py | 455 +++++ .../grid_info_optional_orientation_type_0.py | 9 + .../expeye_client/models/grid_info_out.py | 445 +++++ .../grid_info_out_orientation_type_0.py | 9 + .../expeye_client/models/grid_square_in.py | 168 ++ .../expeye_client/models/grid_square_mode.py | 12 + .../expeye_client/models/grid_square_out.py | 230 +++ .../models/http_validation_error.py | 79 + .../models/image_quality_indicator_out.py | 163 ++ .../expeye_client/models/lab_contact_out.py | 69 + .../expeye_client/models/laser_action_in.py | 85 + .../expeye_client/models/laser_action_out.py | 85 + .../models/laser_parameters_in.py | 173 ++ .../models/laser_parameters_out.py | 183 ++ .../expeye_client/models/laser_point_in.py | 107 ++ .../models/laser_point_list_in.py | 75 + .../expeye_client/models/laser_point_out.py | 115 ++ .../models/ldap_search_params.py | 101 ++ .../expeye_client/models/ligand_in.py | 173 ++ .../expeye_client/models/ligand_optional.py | 173 ++ .../expeye_client/models/ligand_out.py | 203 +++ .../expeye_client/models/milling_step_in.py | 496 ++++++ .../milling_step_in_beam_type_type_0.py | 9 + .../models/milling_step_in_status_type_0.py | 10 + .../expeye_client/models/milling_step_out.py | 546 ++++++ .../milling_step_out_beam_type_type_0.py | 9 + .../models/milling_step_out_status_type_0.py | 10 + .../models/motion_correction_optional.py | 354 ++++ .../models/motion_correction_out.py | 404 +++++ .../expeye_client/models/movie_optional.py | 231 +++ .../expeye_client/models/movie_out.py | 241 +++ .../expeye_client/models/mx_lims_contact.py | 69 + .../expeye_client/models/mx_lims_dewar.py | 130 ++ .../models/mx_lims_dewar_containerref.py | 45 + .../models/mx_lims_dewar_identifiers.py | 45 + .../models/mx_lims_dewar_urls.py | 45 + .../models/mx_lims_full_shipment.py | 127 ++ .../models/mx_lims_full_shipment_dewar.py | 58 + .../mx_lims_full_shipment_macromolecule.py | 58 + ..._lims_full_shipment_macromoleculesample.py | 58 + .../models/mx_lims_full_shipment_pin.py | 58 + .../models/mx_lims_full_shipment_puck.py | 58 + .../models/mx_lims_full_shipment_shipment.py | 58 + .../models/mx_lims_full_shipment_version.py | 9 + .../models/mx_lims_macromolecule.py | 120 ++ .../mx_lims_macromolecule_identifiers.py | 45 + .../models/mx_lims_macromolecule_sample.py | 130 ++ ...x_lims_macromolecule_sample_identifiers.py | 45 + ...ms_macromolecule_sample_parentsampleref.py | 45 + .../mx_lims_macromolecule_sample_urls.py | 45 + .../models/mx_lims_macromolecule_urls.py | 45 + .../expeye_client/models/mx_lims_pin.py | 161 ++ .../models/mx_lims_pin_containerref.py | 45 + .../models/mx_lims_pin_identifiers.py | 45 + .../models/mx_lims_pin_sampleref.py | 45 + .../expeye_client/models/mx_lims_pin_urls.py | 45 + .../expeye_client/models/mx_lims_puck.py | 138 ++ .../models/mx_lims_puck_containerref.py | 45 + .../models/mx_lims_puck_identifiers.py | 45 + .../expeye_client/models/mx_lims_puck_urls.py | 45 + .../expeye_client/models/mx_lims_shipment.py | 138 ++ .../models/mx_lims_shipment_identifiers.py | 45 + .../models/mx_lims_shipment_urls.py | 45 + .../models/mxmr_run_blob_optional.py | 364 ++++ .../mxmr_run_blob_optional_map_type_type_0.py | 9 + .../expeye_client/models/mxmr_run_blob_out.py | 382 +++++ .../mxmr_run_blob_out_map_type_type_0.py | 9 + .../paged_auto_proc_program_attachment_out.py | 99 ++ .../models/paged_auto_proc_program_out.py | 99 ++ .../models/paged_container_history_out.py | 99 ++ .../models/paged_container_inspection_out.py | 99 ++ .../models/paged_container_out.py | 99 ++ .../models/paged_container_queue_out.py | 99 ++ .../expeye_client/models/paged_crystal_out.py | 99 ++ .../paged_data_collection_comment_out.py | 99 ++ ...ged_data_collection_file_attachment_out.py | 99 ++ .../models/paged_data_collection_group_out.py | 99 ++ .../models/paged_data_collection_out.py | 99 ++ .../expeye_client/models/paged_dewar_out.py | 99 ++ .../paged_dewar_transport_history_out.py | 99 ++ .../models/paged_diffraction_plan_out.py | 99 ++ .../models/paged_energy_scan_out.py | 99 ++ .../models/paged_fluorescence_spectrum_out.py | 99 ++ .../models/paged_foil_hole_out.py | 99 ++ .../models/paged_full_movie_out.py | 99 ++ .../models/paged_grid_info_out.py | 99 ++ .../models/paged_grid_square_out.py | 99 ++ .../paged_image_quality_indicator_out.py | 99 ++ .../expeye_client/models/paged_ligand_out.py | 99 ++ .../models/paged_milling_step_out.py | 99 ++ .../models/paged_mxmr_run_blob_out.py | 99 ++ .../expeye_client/models/paged_pdb_out.py | 99 ++ .../expeye_client/models/paged_person_out.py | 99 ++ ...ocessing_job_with_auto_proc_program_out.py | 99 ++ .../models/paged_proposal_out.py | 99 ++ .../expeye_client/models/paged_protein_out.py | 99 ++ .../models/paged_registered_container_out.py | 99 ++ .../models/paged_registered_dewar_out.py | 99 ++ .../models/paged_robot_action_out.py | 99 ++ .../models/paged_sample_image_out.py | 99 ++ .../expeye_client/models/paged_sample_out.py | 99 ++ .../models/paged_sample_position_out.py | 99 ++ .../paged_session_event_with_children_out.py | 99 ++ .../expeye_client/models/paged_session_out.py | 99 ++ .../models/paged_shipment_out.py | 99 ++ .../models/paged_tomogram_out.py | 99 ++ ...ent_out_session_event_with_children_out.py | 124 ++ .../models/paged_user_group_has_person_out.py | 99 ++ .../paged_user_group_ldap_search_params.py | 99 ++ .../models/paged_user_group_out.py | 99 ++ .../expeye_client/models/pdb_ligand_out.py | 69 + .../expeye_client/models/pdb_out.py | 143 ++ .../models/person_id_with_role.py | 103 ++ .../models/person_id_with_role_role_type_0.py | 18 + .../expeye_client/models/person_in.py | 284 ++++ .../models/person_list_numeric.py | 71 + .../expeye_client/models/person_list_str.py | 71 + .../expeye_client/models/person_list_uuid.py | 80 + .../expeye_client/models/person_optional.py | 284 ++++ .../expeye_client/models/person_out.py | 303 ++++ .../expeye_client/models/person_with_role.py | 109 ++ .../models/person_with_role_role_type_0.py | 18 + .../expeye_client/models/position_in.py | 153 ++ .../expeye_client/models/position_optional.py | 153 ++ .../expeye_client/models/position_out.py | 189 +++ .../models/processing_job_parameters_in.py | 67 + .../processing_job_parameters_in_items.py | 45 + .../models/processing_job_parameters_out.py | 67 + .../processing_job_parameters_out_items.py | 45 + ...ocessing_job_with_auto_proc_program_out.py | 198 +++ .../expeye_client/models/processing_status.py | 13 + .../expeye_client/models/proposal_in.py | 180 ++ .../expeye_client/models/proposal_optional.py | 235 +++ .../expeye_client/models/proposal_out.py | 296 ++++ .../models/proposal_with_children_out.py | 323 ++++ .../expeye_client/models/protein_in.py | 295 ++++ .../expeye_client/models/protein_optional.py | 295 ++++ .../expeye_client/models/protein_out.py | 315 ++++ .../models/protein_with_crystals_in.py | 88 + .../models/protein_with_crystals_out.py | 342 ++++ .../models/reduction_parameters.py | 10 + .../registered_container_has_proposal_in.py | 104 ++ .../registered_container_has_proposal_out.py | 130 ++ .../models/registered_container_in.py | 83 + .../models/registered_container_optional.py | 93 ++ .../models/registered_container_out.py | 91 + .../registered_dewar_has_proposal_in.py | 124 ++ .../registered_dewar_has_proposal_out.py | 124 ++ .../models/registered_dewar_in.py | 134 ++ .../models/registered_dewar_optional.py | 124 ++ .../models/registered_dewar_out.py | 169 ++ ...group_id_persons_person_delete_personas.py | 10 + .../expeye_client/models/robot_action_in.py | 316 ++++ .../robot_action_in_action_type_type_0.py | 15 + .../models/robot_action_in_status_type_0.py | 13 + .../models/robot_action_optional.py | 316 ++++ ...obot_action_optional_action_type_type_0.py | 15 + .../robot_action_optional_status_type_0.py | 13 + .../expeye_client/models/robot_action_out.py | 334 ++++ .../robot_action_out_action_type_type_0.py | 15 + .../models/robot_action_out_status_type_0.py | 13 + .../models/rotation_axis_enum.py | 10 + .../expeye_client/models/safety_levels.py | 10 + .../expeye_client/models/sample_image_in.py | 222 +++ .../models/sample_image_optional.py | 222 +++ .../expeye_client/models/sample_image_out.py | 238 +++ .../expeye_client/models/sample_in.py | 378 +++++ ...le_in_with_crystal_and_diffraction_plan.py | 445 +++++ .../expeye_client/models/sample_ligand_out.py | 69 + .../expeye_client/models/sample_optional.py | 353 ++++ .../expeye_client/models/sample_out.py | 504 ++++++ .../models/sample_position_in.py | 168 ++ .../models/sample_position_optional.py | 168 ++ .../models/sample_position_out.py | 186 +++ .../models/sample_with_crystal_in.py | 351 ++++ .../expeye_client/models/session_event_out.py | 120 ++ .../models/session_event_with_children_out.py | 172 ++ .../expeye_client/models/session_in.py | 437 +++++ .../expeye_client/models/session_optional.py | 426 +++++ .../expeye_client/models/session_out.py | 453 +++++ .../expeye_client/models/session_type_in.py | 61 + .../expeye_client/models/session_type_out.py | 77 + .../expeye_client/models/shipment_in.py | 244 +++ .../models/shipment_in_extra_type_0_type_0.py | 45 + .../expeye_client/models/shipment_optional.py | 244 +++ .../shipment_optional_extra_type_0_type_0.py | 45 + .../expeye_client/models/shipment_out.py | 274 +++ .../shipment_out_extra_type_0_type_0.py | 45 + .../models/shipment_safety_levels.py | 10 + .../models/shipment_with_children_in.py | 264 +++ ...nt_with_children_in_extra_type_0_type_0.py | 45 + .../models/shipment_with_children_out.py | 297 ++++ ...t_with_children_out_extra_type_0_type_0.py | 45 + .../expeye_client/models/shipping_data_out.py | 129 ++ .../expeye_client/models/state_enum.py | 10 + .../expeye_client/models/strategy_option.py | 124 ++ .../models/strategy_option_screen_type_0.py | 10 + ...tring_serialised_strategy_option_type_0.py | 45 + .../models/tilt_image_alignment_optional.py | 234 +++ .../models/tilt_image_alignment_out.py | 232 +++ .../expeye_client/models/tomogram_out.py | 432 +++++ .../models/user_group_has_person_out.py | 69 + .../models/user_group_ldap_search_params.py | 91 + .../expeye_client/models/user_group_out.py | 69 + .../expeye_client/models/validation_error.py | 123 ++ .../models/validation_error_context.py | 45 + src/lims_utils/expeye_client/py.typed | 1 + src/lims_utils/expeye_client/types.py | 54 + 550 files changed, 100210 insertions(+) create mode 100644 src/lims_utils/expeye_client/README.md create mode 100644 src/lims_utils/expeye_client/__init__.py create mode 100644 src/lims_utils/expeye_client/api/__init__.py create mode 100644 src/lims_utils/expeye_client/api/admin_vars/__init__.py create mode 100644 src/lims_utils/expeye_client/api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py create mode 100644 src/lims_utils/expeye_client/api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py create mode 100644 src/lims_utils/expeye_client/api/atlas/__init__.py create mode 100644 src/lims_utils/expeye_client/api/atlas/create_atlas_data_groups_group_id_atlas_post.py create mode 100644 src/lims_utils/expeye_client/api/atlas/get_atlas_data_groups_group_id_atlas_get.py create mode 100644 src/lims_utils/expeye_client/api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py create mode 100644 src/lims_utils/expeye_client/api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py create mode 100644 src/lims_utils/expeye_client/api/atlas/update_atlas_atlas_atlas_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/contacts/__init__.py create mode 100644 src/lims_utils/expeye_client/api/contacts/get_lab_contact_contacts_lab_contact_id_get.py create mode 100644 src/lims_utils/expeye_client/api/container_inspections/__init__.py create mode 100644 src/lims_utils/expeye_client/api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py create mode 100644 src/lims_utils/expeye_client/api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/container_registry/__init__.py create mode 100644 src/lims_utils/expeye_client/api/container_registry/get_container_registry_entries_container_registry_get.py create mode 100644 src/lims_utils/expeye_client/api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py create mode 100644 src/lims_utils/expeye_client/api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py create mode 100644 src/lims_utils/expeye_client/api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/containers/__init__.py create mode 100644 src/lims_utils/expeye_client/api/containers/create_container_containers_container_id_containers_post.py create mode 100644 src/lims_utils/expeye_client/api/containers/create_container_history_containers_container_id_history_post.py create mode 100644 src/lims_utils/expeye_client/api/containers/create_container_inspection_containers_container_id_inspections_post.py create mode 100644 src/lims_utils/expeye_client/api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py create mode 100644 src/lims_utils/expeye_client/api/containers/create_sample_containers_container_id_samples_post.py create mode 100644 src/lims_utils/expeye_client/api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py create mode 100644 src/lims_utils/expeye_client/api/containers/edit_container_containers_container_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/containers/get_container_containers_container_id_get.py create mode 100644 src/lims_utils/expeye_client/api/containers/get_container_history_containers_container_id_history_get.py create mode 100644 src/lims_utils/expeye_client/api/containers/get_container_inspections_containers_container_id_inspections_get.py create mode 100644 src/lims_utils/expeye_client/api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py create mode 100644 src/lims_utils/expeye_client/api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py create mode 100644 src/lims_utils/expeye_client/api/containers/get_samples_containers_container_id_samples_get.py create mode 100644 src/lims_utils/expeye_client/api/containers/load_or_unload_puck_containers_container_id_assign_post.py create mode 100644 src/lims_utils/expeye_client/api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py create mode 100644 src/lims_utils/expeye_client/api/crystals/__init__.py create mode 100644 src/lims_utils/expeye_client/api/crystals/get_crystal_crystals_crystal_id_get.py create mode 100644 src/lims_utils/expeye_client/api/crystals/update_crystal_crystals_crystal_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/ctf/__init__.py create mode 100644 src/lims_utils/expeye_client/api/ctf/delete_ctf_ctf_ctf_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py create mode 100644 src/lims_utils/expeye_client/api/ctf/update_ctf_ctf_ctf_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/data_collection_groups/__init__.py create mode 100644 src/lims_utils/expeye_client/api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py create mode 100644 src/lims_utils/expeye_client/api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/__init__.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/create_position_data_collections_data_collection_id_position_post.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_data_collection_data_collections_data_collection_id_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_position_data_collections_data_collection_id_position_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/data_collections/update_position_data_collections_data_collection_id_position_patch.py create mode 100644 src/lims_utils/expeye_client/api/dewar_registry/__init__.py create mode 100644 src/lims_utils/expeye_client/api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py create mode 100644 src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py create mode 100644 src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py create mode 100644 src/lims_utils/expeye_client/api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py create mode 100644 src/lims_utils/expeye_client/api/dewars/__init__.py create mode 100644 src/lims_utils/expeye_client/api/dewars/create_container_dewars_dewar_id_containers_post.py create mode 100644 src/lims_utils/expeye_client/api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py create mode 100644 src/lims_utils/expeye_client/api/dewars/edit_dewar_dewars_dewar_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/dewars/get_dewar_dewars_dewar_id_get.py create mode 100644 src/lims_utils/expeye_client/api/dewars/get_dewar_history_dewars_dewar_id_history_get.py create mode 100644 src/lims_utils/expeye_client/api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py create mode 100644 src/lims_utils/expeye_client/api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py create mode 100644 src/lims_utils/expeye_client/api/diffraction_plans/__init__.py create mode 100644 src/lims_utils/expeye_client/api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/energy_scans/__init__.py create mode 100644 src/lims_utils/expeye_client/api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py create mode 100644 src/lims_utils/expeye_client/api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/fluorescence_spectrums/__init__.py create mode 100644 src/lims_utils/expeye_client/api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py create mode 100644 src/lims_utils/expeye_client/api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/__init__.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py create mode 100644 src/lims_utils/expeye_client/api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py create mode 100644 src/lims_utils/expeye_client/api/grids/__init__.py create mode 100644 src/lims_utils/expeye_client/api/grids/update_grid_grids_grid_info_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/ligands/__init__.py create mode 100644 src/lims_utils/expeye_client/api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py create mode 100644 src/lims_utils/expeye_client/api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py create mode 100644 src/lims_utils/expeye_client/api/ligands/edit_ligand_ligands_ligand_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/ligands/get_ligand_ligands_ligand_id_get.py create mode 100644 src/lims_utils/expeye_client/api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py create mode 100644 src/lims_utils/expeye_client/api/meta/__init__.py create mode 100644 src/lims_utils/expeye_client/api/meta/get_version_version_get.py create mode 100644 src/lims_utils/expeye_client/api/motion/__init__.py create mode 100644 src/lims_utils/expeye_client/api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py create mode 100644 src/lims_utils/expeye_client/api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py create mode 100644 src/lims_utils/expeye_client/api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/mx_lims_shipments/__init__.py create mode 100644 src/lims_utils/expeye_client/api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py create mode 100644 src/lims_utils/expeye_client/api/pdb_entries/__init__.py create mode 100644 src/lims_utils/expeye_client/api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py create mode 100644 src/lims_utils/expeye_client/api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py create mode 100644 src/lims_utils/expeye_client/api/persons/__init__.py create mode 100644 src/lims_utils/expeye_client/api/persons/create_person_persons_post.py create mode 100644 src/lims_utils/expeye_client/api/persons/delete_person_persons_person_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/persons/get_person_persons_person_id_get.py create mode 100644 src/lims_utils/expeye_client/api/persons/get_persons_persons_get.py create mode 100644 src/lims_utils/expeye_client/api/persons/get_usergroups_persons_person_id_user_groups_get.py create mode 100644 src/lims_utils/expeye_client/api/persons/update_person_persons_person_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/processing_jobs/__init__.py create mode 100644 src/lims_utils/expeye_client/api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py create mode 100644 src/lims_utils/expeye_client/api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py create mode 100644 src/lims_utils/expeye_client/api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py create mode 100644 src/lims_utils/expeye_client/api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/__init__.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/proposals/__init__.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_proposal_proposals_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_protein_proposals_proposal_reference_proteins_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_session_proposals_proposal_reference_sessions_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py create mode 100644 src/lims_utils/expeye_client/api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/proposals/delete_proposal_proposals_proposal_reference_delete.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_events_proposals_proposal_reference_sample_events_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_proposal_proposals_proposal_reference_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_proposals_proposals_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py create mode 100644 src/lims_utils/expeye_client/api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/proposals/update_proposal_proposals_proposal_reference_patch.py create mode 100644 src/lims_utils/expeye_client/api/proteins/__init__.py create mode 100644 src/lims_utils/expeye_client/api/proteins/create_crystal_proteins_protein_id_crystals_post.py create mode 100644 src/lims_utils/expeye_client/api/proteins/edit_protein_proteins_protein_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/proteins/get_crystals_proteins_protein_id_crystals_get.py create mode 100644 src/lims_utils/expeye_client/api/proteins/get_protein_proteins_protein_id_get.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/__init__.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py create mode 100644 src/lims_utils/expeye_client/api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/sample_images/__init__.py create mode 100644 src/lims_utils/expeye_client/api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py create mode 100644 src/lims_utils/expeye_client/api/sample_images/get_sample_image_sample_images_sample_image_id_get.py create mode 100644 src/lims_utils/expeye_client/api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/samples/__init__.py create mode 100644 src/lims_utils/expeye_client/api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py create mode 100644 src/lims_utils/expeye_client/api/samples/create_sample_image_samples_sample_id_images_post.py create mode 100644 src/lims_utils/expeye_client/api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py create mode 100644 src/lims_utils/expeye_client/api/samples/create_sample_position_samples_sample_id_positions_post.py create mode 100644 src/lims_utils/expeye_client/api/samples/create_sample_samples_post.py create mode 100644 src/lims_utils/expeye_client/api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/samples/edit_sample_positions_samples_sample_id_positions_patch.py create mode 100644 src/lims_utils/expeye_client/api/samples/edit_sample_samples_sample_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py create mode 100644 src/lims_utils/expeye_client/api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py create mode 100644 src/lims_utils/expeye_client/api/samples/get_sample_images_samples_sample_id_images_get.py create mode 100644 src/lims_utils/expeye_client/api/samples/get_sample_ligands_samples_sample_id_ligands_get.py create mode 100644 src/lims_utils/expeye_client/api/samples/get_sample_positions_samples_sample_id_positions_get.py create mode 100644 src/lims_utils/expeye_client/api/samples/get_sample_samples_sample_id_get.py create mode 100644 src/lims_utils/expeye_client/api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py create mode 100644 src/lims_utils/expeye_client/api/sessions/__init__.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py create mode 100644 src/lims_utils/expeye_client/api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_beamlines_beamlines_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/get_sessions_sessions_get.py create mode 100644 src/lims_utils/expeye_client/api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py create mode 100644 src/lims_utils/expeye_client/api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py create mode 100644 src/lims_utils/expeye_client/api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py create mode 100644 src/lims_utils/expeye_client/api/shipments/__init__.py create mode 100644 src/lims_utils/expeye_client/api/shipments/create_dewar_shipments_shipment_id_dewars_post.py create mode 100644 src/lims_utils/expeye_client/api/shipments/create_full_shipment_from_file_shipments_upload_post.py create mode 100644 src/lims_utils/expeye_client/api/shipments/edit_shipment_shipments_shipment_id_patch.py create mode 100644 src/lims_utils/expeye_client/api/shipments/get_dewars_shipments_shipment_id_dewars_get.py create mode 100644 src/lims_utils/expeye_client/api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py create mode 100644 src/lims_utils/expeye_client/api/shipments/get_samples_shipments_shipment_id_samples_get.py create mode 100644 src/lims_utils/expeye_client/api/shipments/get_shipment_shipments_shipment_id_get.py create mode 100644 src/lims_utils/expeye_client/api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py create mode 100644 src/lims_utils/expeye_client/api/tomograms/__init__.py create mode 100644 src/lims_utils/expeye_client/api/tomograms/get_tomogram_tomograms_tomogram_id_get.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/__init__.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/get_ldap_search_params_user_groups_search_params_get.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/get_usergroup_user_groups_usergroup_id_get.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/get_usergroups_user_groups_get.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py create mode 100644 src/lims_utils/expeye_client/api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py create mode 100644 src/lims_utils/expeye_client/client.py create mode 100644 src/lims_utils/expeye_client/errors.py create mode 100644 src/lims_utils/expeye_client/models/__init__.py create mode 100644 src/lims_utils/expeye_client/models/admin_var_in.py create mode 100644 src/lims_utils/expeye_client/models/admin_var_out.py create mode 100644 src/lims_utils/expeye_client/models/aperture_in.py create mode 100644 src/lims_utils/expeye_client/models/aperture_out.py create mode 100644 src/lims_utils/expeye_client/models/atlas_in.py create mode 100644 src/lims_utils/expeye_client/models/atlas_optional.py create mode 100644 src/lims_utils/expeye_client/models/atlas_out.py create mode 100644 src/lims_utils/expeye_client/models/atlas_type.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_integration_out.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_attachment_in.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_attachment_optional.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_attachment_out.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_in.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_optional.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_out.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_scaling_out.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_scaling_out_scaling_statistics_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out_scalingstatisticstype.py create mode 100644 src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py create mode 100644 src/lims_utils/expeye_client/models/body_create_full_shipment_from_file_shipments_upload_post.py create mode 100644 src/lims_utils/expeye_client/models/centring_method.py create mode 100644 src/lims_utils/expeye_client/models/collection_mode.py create mode 100644 src/lims_utils/expeye_client/models/container_history_in.py create mode 100644 src/lims_utils/expeye_client/models/container_history_out.py create mode 100644 src/lims_utils/expeye_client/models/container_in.py create mode 100644 src/lims_utils/expeye_client/models/container_inspection_in.py create mode 100644 src/lims_utils/expeye_client/models/container_inspection_optional.py create mode 100644 src/lims_utils/expeye_client/models/container_inspection_out.py create mode 100644 src/lims_utils/expeye_client/models/container_load.py create mode 100644 src/lims_utils/expeye_client/models/container_optional.py create mode 100644 src/lims_utils/expeye_client/models/container_out.py create mode 100644 src/lims_utils/expeye_client/models/container_queue_in.py create mode 100644 src/lims_utils/expeye_client/models/container_queue_out.py create mode 100644 src/lims_utils/expeye_client/models/container_with_children_in.py create mode 100644 src/lims_utils/expeye_client/models/container_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/crystal_in.py create mode 100644 src/lims_utils/expeye_client/models/crystal_optional.py create mode 100644 src/lims_utils/expeye_client/models/crystal_out.py create mode 100644 src/lims_utils/expeye_client/models/crystal_with_protein.py create mode 100644 src/lims_utils/expeye_client/models/ctf_base.py create mode 100644 src/lims_utils/expeye_client/models/ctf_in.py create mode 100644 src/lims_utils/expeye_client/models/ctf_optional.py create mode 100644 src/lims_utils/expeye_client/models/ctf_out.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_comment_in.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_comment_optional.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_comment_out.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_file_attachment_in.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_file_attachment_optional.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_file_attachment_out.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_group_in.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_group_in_experiment_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_group_optional.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_group_optional_experiment_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_group_out.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_group_out_experiment_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_in.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_optional.py create mode 100644 src/lims_utils/expeye_client/models/data_collection_out.py create mode 100644 src/lims_utils/expeye_client/models/dewar_in.py create mode 100644 src/lims_utils/expeye_client/models/dewar_in_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/dewar_optional.py create mode 100644 src/lims_utils/expeye_client/models/dewar_optional_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/dewar_out.py create mode 100644 src/lims_utils/expeye_client/models/dewar_out_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/dewar_transport_history_in.py create mode 100644 src/lims_utils/expeye_client/models/dewar_transport_history_out.py create mode 100644 src/lims_utils/expeye_client/models/dewar_with_children_in.py create mode 100644 src/lims_utils/expeye_client/models/dewar_with_children_in_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/dewar_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/dewar_with_children_out_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_experiment_type.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_in.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_in_scan_parameters_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_optional.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_optional_scan_parameters_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_out.py create mode 100644 src/lims_utils/expeye_client/models/diffraction_plan_out_scan_parameters_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/energy_scan_in.py create mode 100644 src/lims_utils/expeye_client/models/energy_scan_optional.py create mode 100644 src/lims_utils/expeye_client/models/energy_scan_out.py create mode 100644 src/lims_utils/expeye_client/models/file_attachment_type.py create mode 100644 src/lims_utils/expeye_client/models/file_type.py create mode 100644 src/lims_utils/expeye_client/models/fluorescence_spectrum_in.py create mode 100644 src/lims_utils/expeye_client/models/fluorescence_spectrum_optional.py create mode 100644 src/lims_utils/expeye_client/models/fluorescence_spectrum_out.py create mode 100644 src/lims_utils/expeye_client/models/foil_hole_in.py create mode 100644 src/lims_utils/expeye_client/models/foil_hole_optional_with_id.py create mode 100644 src/lims_utils/expeye_client/models/foil_hole_out.py create mode 100644 src/lims_utils/expeye_client/models/full_movie_optional.py create mode 100644 src/lims_utils/expeye_client/models/full_movie_out.py create mode 100644 src/lims_utils/expeye_client/models/get_tomograms_for_dcg_data_groups_group_id_tomograms_get_sort_by_type_0.py create mode 100644 src/lims_utils/expeye_client/models/grid_info_in.py create mode 100644 src/lims_utils/expeye_client/models/grid_info_in_orientation_type_0.py create mode 100644 src/lims_utils/expeye_client/models/grid_info_optional.py create mode 100644 src/lims_utils/expeye_client/models/grid_info_optional_orientation_type_0.py create mode 100644 src/lims_utils/expeye_client/models/grid_info_out.py create mode 100644 src/lims_utils/expeye_client/models/grid_info_out_orientation_type_0.py create mode 100644 src/lims_utils/expeye_client/models/grid_square_in.py create mode 100644 src/lims_utils/expeye_client/models/grid_square_mode.py create mode 100644 src/lims_utils/expeye_client/models/grid_square_out.py create mode 100644 src/lims_utils/expeye_client/models/http_validation_error.py create mode 100644 src/lims_utils/expeye_client/models/image_quality_indicator_out.py create mode 100644 src/lims_utils/expeye_client/models/lab_contact_out.py create mode 100644 src/lims_utils/expeye_client/models/laser_action_in.py create mode 100644 src/lims_utils/expeye_client/models/laser_action_out.py create mode 100644 src/lims_utils/expeye_client/models/laser_parameters_in.py create mode 100644 src/lims_utils/expeye_client/models/laser_parameters_out.py create mode 100644 src/lims_utils/expeye_client/models/laser_point_in.py create mode 100644 src/lims_utils/expeye_client/models/laser_point_list_in.py create mode 100644 src/lims_utils/expeye_client/models/laser_point_out.py create mode 100644 src/lims_utils/expeye_client/models/ldap_search_params.py create mode 100644 src/lims_utils/expeye_client/models/ligand_in.py create mode 100644 src/lims_utils/expeye_client/models/ligand_optional.py create mode 100644 src/lims_utils/expeye_client/models/ligand_out.py create mode 100644 src/lims_utils/expeye_client/models/milling_step_in.py create mode 100644 src/lims_utils/expeye_client/models/milling_step_in_beam_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/milling_step_in_status_type_0.py create mode 100644 src/lims_utils/expeye_client/models/milling_step_out.py create mode 100644 src/lims_utils/expeye_client/models/milling_step_out_beam_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/milling_step_out_status_type_0.py create mode 100644 src/lims_utils/expeye_client/models/motion_correction_optional.py create mode 100644 src/lims_utils/expeye_client/models/motion_correction_out.py create mode 100644 src/lims_utils/expeye_client/models/movie_optional.py create mode 100644 src/lims_utils/expeye_client/models/movie_out.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_contact.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_dewar.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_dewar_containerref.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_dewar_identifiers.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_dewar_urls.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_full_shipment_version.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule_identifiers.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_identifiers.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_parentsampleref.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_urls.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_macromolecule_urls.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_pin.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_pin_containerref.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_pin_identifiers.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_pin_sampleref.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_pin_urls.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_puck.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_puck_containerref.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_puck_identifiers.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_puck_urls.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_shipment.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_shipment_identifiers.py create mode 100644 src/lims_utils/expeye_client/models/mx_lims_shipment_urls.py create mode 100644 src/lims_utils/expeye_client/models/mxmr_run_blob_optional.py create mode 100644 src/lims_utils/expeye_client/models/mxmr_run_blob_optional_map_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/mxmr_run_blob_out.py create mode 100644 src/lims_utils/expeye_client/models/mxmr_run_blob_out_map_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_container_history_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_container_inspection_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_container_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_container_queue_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_crystal_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_data_collection_group_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_data_collection_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_dewar_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_energy_scan_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_foil_hole_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_full_movie_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_grid_info_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_grid_square_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_ligand_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_milling_step_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_pdb_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_person_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_proposal_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_protein_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_registered_container_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_registered_dewar_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_robot_action_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_sample_image_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_sample_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_sample_position_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_session_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_shipment_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_tomogram_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py create mode 100644 src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py create mode 100644 src/lims_utils/expeye_client/models/paged_user_group_out.py create mode 100644 src/lims_utils/expeye_client/models/pdb_ligand_out.py create mode 100644 src/lims_utils/expeye_client/models/pdb_out.py create mode 100644 src/lims_utils/expeye_client/models/person_id_with_role.py create mode 100644 src/lims_utils/expeye_client/models/person_id_with_role_role_type_0.py create mode 100644 src/lims_utils/expeye_client/models/person_in.py create mode 100644 src/lims_utils/expeye_client/models/person_list_numeric.py create mode 100644 src/lims_utils/expeye_client/models/person_list_str.py create mode 100644 src/lims_utils/expeye_client/models/person_list_uuid.py create mode 100644 src/lims_utils/expeye_client/models/person_optional.py create mode 100644 src/lims_utils/expeye_client/models/person_out.py create mode 100644 src/lims_utils/expeye_client/models/person_with_role.py create mode 100644 src/lims_utils/expeye_client/models/person_with_role_role_type_0.py create mode 100644 src/lims_utils/expeye_client/models/position_in.py create mode 100644 src/lims_utils/expeye_client/models/position_optional.py create mode 100644 src/lims_utils/expeye_client/models/position_out.py create mode 100644 src/lims_utils/expeye_client/models/processing_job_parameters_in.py create mode 100644 src/lims_utils/expeye_client/models/processing_job_parameters_in_items.py create mode 100644 src/lims_utils/expeye_client/models/processing_job_parameters_out.py create mode 100644 src/lims_utils/expeye_client/models/processing_job_parameters_out_items.py create mode 100644 src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py create mode 100644 src/lims_utils/expeye_client/models/processing_status.py create mode 100644 src/lims_utils/expeye_client/models/proposal_in.py create mode 100644 src/lims_utils/expeye_client/models/proposal_optional.py create mode 100644 src/lims_utils/expeye_client/models/proposal_out.py create mode 100644 src/lims_utils/expeye_client/models/proposal_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/protein_in.py create mode 100644 src/lims_utils/expeye_client/models/protein_optional.py create mode 100644 src/lims_utils/expeye_client/models/protein_out.py create mode 100644 src/lims_utils/expeye_client/models/protein_with_crystals_in.py create mode 100644 src/lims_utils/expeye_client/models/protein_with_crystals_out.py create mode 100644 src/lims_utils/expeye_client/models/reduction_parameters.py create mode 100644 src/lims_utils/expeye_client/models/registered_container_has_proposal_in.py create mode 100644 src/lims_utils/expeye_client/models/registered_container_has_proposal_out.py create mode 100644 src/lims_utils/expeye_client/models/registered_container_in.py create mode 100644 src/lims_utils/expeye_client/models/registered_container_optional.py create mode 100644 src/lims_utils/expeye_client/models/registered_container_out.py create mode 100644 src/lims_utils/expeye_client/models/registered_dewar_has_proposal_in.py create mode 100644 src/lims_utils/expeye_client/models/registered_dewar_has_proposal_out.py create mode 100644 src/lims_utils/expeye_client/models/registered_dewar_in.py create mode 100644 src/lims_utils/expeye_client/models/registered_dewar_optional.py create mode 100644 src/lims_utils/expeye_client/models/registered_dewar_out.py create mode 100644 src/lims_utils/expeye_client/models/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete_personas.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_in.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_in_action_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_in_status_type_0.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_optional.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_optional_action_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_optional_status_type_0.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_out.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_out_action_type_type_0.py create mode 100644 src/lims_utils/expeye_client/models/robot_action_out_status_type_0.py create mode 100644 src/lims_utils/expeye_client/models/rotation_axis_enum.py create mode 100644 src/lims_utils/expeye_client/models/safety_levels.py create mode 100644 src/lims_utils/expeye_client/models/sample_image_in.py create mode 100644 src/lims_utils/expeye_client/models/sample_image_optional.py create mode 100644 src/lims_utils/expeye_client/models/sample_image_out.py create mode 100644 src/lims_utils/expeye_client/models/sample_in.py create mode 100644 src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py create mode 100644 src/lims_utils/expeye_client/models/sample_ligand_out.py create mode 100644 src/lims_utils/expeye_client/models/sample_optional.py create mode 100644 src/lims_utils/expeye_client/models/sample_out.py create mode 100644 src/lims_utils/expeye_client/models/sample_position_in.py create mode 100644 src/lims_utils/expeye_client/models/sample_position_optional.py create mode 100644 src/lims_utils/expeye_client/models/sample_position_out.py create mode 100644 src/lims_utils/expeye_client/models/sample_with_crystal_in.py create mode 100644 src/lims_utils/expeye_client/models/session_event_out.py create mode 100644 src/lims_utils/expeye_client/models/session_event_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/session_in.py create mode 100644 src/lims_utils/expeye_client/models/session_optional.py create mode 100644 src/lims_utils/expeye_client/models/session_out.py create mode 100644 src/lims_utils/expeye_client/models/session_type_in.py create mode 100644 src/lims_utils/expeye_client/models/session_type_out.py create mode 100644 src/lims_utils/expeye_client/models/shipment_in.py create mode 100644 src/lims_utils/expeye_client/models/shipment_in_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/shipment_optional.py create mode 100644 src/lims_utils/expeye_client/models/shipment_optional_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/shipment_out.py create mode 100644 src/lims_utils/expeye_client/models/shipment_out_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/shipment_safety_levels.py create mode 100644 src/lims_utils/expeye_client/models/shipment_with_children_in.py create mode 100644 src/lims_utils/expeye_client/models/shipment_with_children_in_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/shipment_with_children_out.py create mode 100644 src/lims_utils/expeye_client/models/shipment_with_children_out_extra_type_0_type_0.py create mode 100644 src/lims_utils/expeye_client/models/shipping_data_out.py create mode 100644 src/lims_utils/expeye_client/models/state_enum.py create mode 100644 src/lims_utils/expeye_client/models/strategy_option.py create mode 100644 src/lims_utils/expeye_client/models/strategy_option_screen_type_0.py create mode 100644 src/lims_utils/expeye_client/models/string_serialised_strategy_option_type_0.py create mode 100644 src/lims_utils/expeye_client/models/tilt_image_alignment_optional.py create mode 100644 src/lims_utils/expeye_client/models/tilt_image_alignment_out.py create mode 100644 src/lims_utils/expeye_client/models/tomogram_out.py create mode 100644 src/lims_utils/expeye_client/models/user_group_has_person_out.py create mode 100644 src/lims_utils/expeye_client/models/user_group_ldap_search_params.py create mode 100644 src/lims_utils/expeye_client/models/user_group_out.py create mode 100644 src/lims_utils/expeye_client/models/validation_error.py create mode 100644 src/lims_utils/expeye_client/models/validation_error_context.py create mode 100644 src/lims_utils/expeye_client/py.typed create mode 100644 src/lims_utils/expeye_client/types.py diff --git a/src/lims_utils/expeye_client/README.md b/src/lims_utils/expeye_client/README.md new file mode 100644 index 0000000..c034aaa --- /dev/null +++ b/src/lims_utils/expeye_client/README.md @@ -0,0 +1,123 @@ +# expeye-client +A client library for accessing Expeye + +## Usage +First, create a client: + +```python +from expeye_client import Client + +client = Client(base_url="https://api.example.com") +``` + +If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead: + +```python +from expeye_client import AuthenticatedClient + +client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken") +``` + +Now call your endpoint and use your models: + +```python +from expeye_client.models import MyDataModel +from expeye_client.api.my_tag import get_my_data_model +from expeye_client.types import Response + +with client as client: + my_data: MyDataModel = get_my_data_model.sync(client=client) + # or if you need more info (e.g. status_code) + response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client) +``` + +Or do the same thing with an async version: + +```python +from expeye_client.models import MyDataModel +from expeye_client.api.my_tag import get_my_data_model +from expeye_client.types import Response + +async with client as client: + my_data: MyDataModel = await get_my_data_model.asyncio(client=client) + response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client) +``` + +By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle. + +```python +client = AuthenticatedClient( + base_url="https://internal_api.example.com", + token="SuperSecretToken", + verify_ssl="/path/to/certificate_bundle.pem", +) +``` + +You can also disable certificate validation altogether, but beware that **this is a security risk**. + +```python +client = AuthenticatedClient(base_url="https://internal_api.example.com", token="SuperSecretToken", verify_ssl=False) +``` + +Things to know: +1. Every path/method combo becomes a Python module with four functions: + 1. `sync`: Blocking request that returns parsed data (if successful) or `None` + 1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful. + 1. `asyncio`: Like `sync` but async instead of blocking + 1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking + +1. All path/query params, and bodies become method arguments. +1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above) +1. Any endpoint which did not have a tag will be in `expeye_client.api.default` + +## Advanced customizations + +There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx2.Client` or `httpx2.AsyncClient` (depending on your use-case): + +```python +from expeye_client import Client + + +def log_request(request): + print(f"Request event hook: {request.method} {request.url} - Waiting for response") + + +def log_response(response): + request = response.request + print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}") + + +client = Client( + base_url="https://api.example.com", + httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}}, +) + +# Or get the underlying httpx2 client to modify directly with client.get_httpx_client() or client.get_async_httpx_client() +``` + +You can even set the httpx2 client directly, but beware that this will override any existing settings (e.g., base_url): + +```python +import httpx2 +from expeye_client import Client + +client = Client( + base_url="https://api.example.com", +) +# Note that base_url needs to be re-set, as would any shared cookies, headers, etc. +client.set_httpx_client(httpx2.Client(base_url="https://api.example.com", proxy="http://localhost:8030")) +``` + +## Building / publishing this package +This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics: +1. Update the metadata in pyproject.toml (e.g. authors, version) +1. If you're using a private repository, configure it with Poetry + 1. `poetry config repositories. ` + 1. `poetry config http-basic. ` +1. Publish the client with `poetry publish --build -r ` or, if for public PyPI, just `poetry publish --build` + +If you want to install this client into another project without publishing it (e.g. for development) then: +1. If that project **is using Poetry**, you can simply do `poetry add ` from that project +1. If that project is not using Poetry: + 1. Build a wheel with `poetry build -f wheel` + 1. Install that wheel from the other project `pip install ` diff --git a/src/lims_utils/expeye_client/__init__.py b/src/lims_utils/expeye_client/__init__.py new file mode 100644 index 0000000..ac2ef2a --- /dev/null +++ b/src/lims_utils/expeye_client/__init__.py @@ -0,0 +1,8 @@ +"""A client library for accessing Expeye""" + +from .client import AuthenticatedClient, Client + +__all__ = ( + "AuthenticatedClient", + "Client", +) diff --git a/src/lims_utils/expeye_client/api/__init__.py b/src/lims_utils/expeye_client/api/__init__.py new file mode 100644 index 0000000..81f9fa2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/__init__.py @@ -0,0 +1 @@ +"""Contains methods for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/admin_vars/__init__.py b/src/lims_utils/expeye_client/api/admin_vars/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/admin_vars/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py b/src/lims_utils/expeye_client/api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py new file mode 100644 index 0000000..ac64c9d --- /dev/null +++ b/src/lims_utils/expeye_client/api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.admin_var_out import AdminVarOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + admin_var_name: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/admin-vars/{admin_var_name}".format( + admin_var_name=quote(str(admin_var_name), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AdminVarOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AdminVarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AdminVarOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + admin_var_name: str, + *, + client: AuthenticatedClient | Client, +) -> Response[AdminVarOut | HTTPValidationError]: + """Get Admin Var + + Get admin variable value + + Args: + admin_var_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AdminVarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + admin_var_name=admin_var_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + admin_var_name: str, + *, + client: AuthenticatedClient | Client, +) -> AdminVarOut | HTTPValidationError | None: + """Get Admin Var + + Get admin variable value + + Args: + admin_var_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AdminVarOut | HTTPValidationError + """ + + return sync_detailed( + admin_var_name=admin_var_name, + client=client, + ).parsed + + +async def asyncio_detailed( + admin_var_name: str, + *, + client: AuthenticatedClient | Client, +) -> Response[AdminVarOut | HTTPValidationError]: + """Get Admin Var + + Get admin variable value + + Args: + admin_var_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AdminVarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + admin_var_name=admin_var_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + admin_var_name: str, + *, + client: AuthenticatedClient | Client, +) -> AdminVarOut | HTTPValidationError | None: + """Get Admin Var + + Get admin variable value + + Args: + admin_var_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AdminVarOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + admin_var_name=admin_var_name, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py b/src/lims_utils/expeye_client/api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py new file mode 100644 index 0000000..0b643a9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.admin_var_in import AdminVarIn +from ...models.admin_var_out import AdminVarOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + admin_var_name: str, + *, + body: AdminVarIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/admin-vars/{admin_var_name}".format( + admin_var_name=quote(str(admin_var_name), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AdminVarOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AdminVarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AdminVarOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + admin_var_name: str, + *, + client: AuthenticatedClient, + body: AdminVarIn, +) -> Response[AdminVarOut | HTTPValidationError]: + """Update Admin Var + + Update admin variable value + + Args: + admin_var_name (str): + body (AdminVarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AdminVarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + admin_var_name=admin_var_name, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + admin_var_name: str, + *, + client: AuthenticatedClient, + body: AdminVarIn, +) -> AdminVarOut | HTTPValidationError | None: + """Update Admin Var + + Update admin variable value + + Args: + admin_var_name (str): + body (AdminVarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AdminVarOut | HTTPValidationError + """ + + return sync_detailed( + admin_var_name=admin_var_name, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + admin_var_name: str, + *, + client: AuthenticatedClient, + body: AdminVarIn, +) -> Response[AdminVarOut | HTTPValidationError]: + """Update Admin Var + + Update admin variable value + + Args: + admin_var_name (str): + body (AdminVarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AdminVarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + admin_var_name=admin_var_name, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + admin_var_name: str, + *, + client: AuthenticatedClient, + body: AdminVarIn, +) -> AdminVarOut | HTTPValidationError | None: + """Update Admin Var + + Update admin variable value + + Args: + admin_var_name (str): + body (AdminVarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AdminVarOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + admin_var_name=admin_var_name, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/atlas/__init__.py b/src/lims_utils/expeye_client/api/atlas/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/atlas/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/atlas/create_atlas_data_groups_group_id_atlas_post.py b/src/lims_utils/expeye_client/api/atlas/create_atlas_data_groups_group_id_atlas_post.py new file mode 100644 index 0000000..917f57b --- /dev/null +++ b/src/lims_utils/expeye_client/api/atlas/create_atlas_data_groups_group_id_atlas_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.atlas_in import AtlasIn +from ...models.atlas_out import AtlasOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + group_id: int, + *, + body: AtlasIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-groups/{group_id}/atlas".format( + group_id=quote(str(group_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AtlasOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = AtlasOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AtlasOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + group_id: int, + *, + client: AuthenticatedClient, + body: AtlasIn, +) -> Response[AtlasOut | HTTPValidationError]: + """Create Atlas + + Creates atlas for a data collection group + + Args: + group_id (int): + body (AtlasIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AtlasOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + group_id: int, + *, + client: AuthenticatedClient, + body: AtlasIn, +) -> AtlasOut | HTTPValidationError | None: + """Create Atlas + + Creates atlas for a data collection group + + Args: + group_id (int): + body (AtlasIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AtlasOut | HTTPValidationError + """ + + return sync_detailed( + group_id=group_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + group_id: int, + *, + client: AuthenticatedClient, + body: AtlasIn, +) -> Response[AtlasOut | HTTPValidationError]: + """Create Atlas + + Creates atlas for a data collection group + + Args: + group_id (int): + body (AtlasIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AtlasOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + group_id: int, + *, + client: AuthenticatedClient, + body: AtlasIn, +) -> AtlasOut | HTTPValidationError | None: + """Create Atlas + + Creates atlas for a data collection group + + Args: + group_id (int): + body (AtlasIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AtlasOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + group_id=group_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/atlas/get_atlas_data_groups_group_id_atlas_get.py b/src/lims_utils/expeye_client/api/atlas/get_atlas_data_groups_group_id_atlas_get.py new file mode 100644 index 0000000..a38090c --- /dev/null +++ b/src/lims_utils/expeye_client/api/atlas/get_atlas_data_groups_group_id_atlas_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.atlas_out import AtlasOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + group_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-groups/{group_id}/atlas".format( + group_id=quote(str(group_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AtlasOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AtlasOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AtlasOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + group_id: int, + *, + client: AuthenticatedClient, +) -> Response[AtlasOut | HTTPValidationError]: + """Get Atlas + + Returns atlas belonging to a data collection group + + Args: + group_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AtlasOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + group_id: int, + *, + client: AuthenticatedClient, +) -> AtlasOut | HTTPValidationError | None: + """Get Atlas + + Returns atlas belonging to a data collection group + + Args: + group_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AtlasOut | HTTPValidationError + """ + + return sync_detailed( + group_id=group_id, + client=client, + ).parsed + + +async def asyncio_detailed( + group_id: int, + *, + client: AuthenticatedClient, +) -> Response[AtlasOut | HTTPValidationError]: + """Get Atlas + + Returns atlas belonging to a data collection group + + Args: + group_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AtlasOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + group_id: int, + *, + client: AuthenticatedClient, +) -> AtlasOut | HTTPValidationError | None: + """Get Atlas + + Returns atlas belonging to a data collection group + + Args: + group_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AtlasOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + group_id=group_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py b/src/lims_utils/expeye_client/api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py new file mode 100644 index 0000000..ffc125e --- /dev/null +++ b/src/lims_utils/expeye_client/api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py @@ -0,0 +1,239 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_grid_square_out import PagedGridSquareOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + atlas_id: int, + *, + hide_squares: bool | Unset = False, + hide_empty_search_maps: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["hideSquares"] = hide_squares + + params["hideEmptySearchMaps"] = hide_empty_search_maps + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/atlas/{atlas_id}/grid-squares".format( + atlas_id=quote(str(atlas_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedGridSquareOut | None: + if response.status_code == 200: + response_200 = PagedGridSquareOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedGridSquareOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + atlas_id: int, + *, + client: AuthenticatedClient, + hide_squares: bool | Unset = False, + hide_empty_search_maps: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedGridSquareOut]: + """Get Atlas Grid Squares + + Get grid squares for an atlas + + Args: + atlas_id (int): + hide_squares (bool | Unset): Default: False. + hide_empty_search_maps (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedGridSquareOut] + """ + + kwargs = _get_kwargs( + atlas_id=atlas_id, + hide_squares=hide_squares, + hide_empty_search_maps=hide_empty_search_maps, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + atlas_id: int, + *, + client: AuthenticatedClient, + hide_squares: bool | Unset = False, + hide_empty_search_maps: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedGridSquareOut | None: + """Get Atlas Grid Squares + + Get grid squares for an atlas + + Args: + atlas_id (int): + hide_squares (bool | Unset): Default: False. + hide_empty_search_maps (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedGridSquareOut + """ + + return sync_detailed( + atlas_id=atlas_id, + client=client, + hide_squares=hide_squares, + hide_empty_search_maps=hide_empty_search_maps, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + atlas_id: int, + *, + client: AuthenticatedClient, + hide_squares: bool | Unset = False, + hide_empty_search_maps: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedGridSquareOut]: + """Get Atlas Grid Squares + + Get grid squares for an atlas + + Args: + atlas_id (int): + hide_squares (bool | Unset): Default: False. + hide_empty_search_maps (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedGridSquareOut] + """ + + kwargs = _get_kwargs( + atlas_id=atlas_id, + hide_squares=hide_squares, + hide_empty_search_maps=hide_empty_search_maps, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + atlas_id: int, + *, + client: AuthenticatedClient, + hide_squares: bool | Unset = False, + hide_empty_search_maps: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedGridSquareOut | None: + """Get Atlas Grid Squares + + Get grid squares for an atlas + + Args: + atlas_id (int): + hide_squares (bool | Unset): Default: False. + hide_empty_search_maps (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedGridSquareOut + """ + + return ( + await asyncio_detailed( + atlas_id=atlas_id, + client=client, + hide_squares=hide_squares, + hide_empty_search_maps=hide_empty_search_maps, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py b/src/lims_utils/expeye_client/api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py new file mode 100644 index 0000000..d9f9483 --- /dev/null +++ b/src/lims_utils/expeye_client/api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.grid_square_in import GridSquareIn +from ...models.grid_square_out import GridSquareOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + atlas_id: int, + *, + body: list[GridSquareIn], +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/atlas/{atlas_id}/grid-squares".format( + atlas_id=quote(str(atlas_id), safe=""), + ), + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[GridSquareOut] | None: + if response.status_code == 201: + response_201 = [] + _response_201 = response.json() + for response_201_item_data in _response_201: + response_201_item = GridSquareOut.from_dict(response_201_item_data) + + response_201.append(response_201_item) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[GridSquareOut]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + atlas_id: int, + *, + client: AuthenticatedClient, + body: list[GridSquareIn], +) -> Response[HTTPValidationError | list[GridSquareOut]]: + """Post Atlas Grid Squares + + Create grid squares for an atlas + + Args: + atlas_id (int): + body (list[GridSquareIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[GridSquareOut]] + """ + + kwargs = _get_kwargs( + atlas_id=atlas_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + atlas_id: int, + *, + client: AuthenticatedClient, + body: list[GridSquareIn], +) -> HTTPValidationError | list[GridSquareOut] | None: + """Post Atlas Grid Squares + + Create grid squares for an atlas + + Args: + atlas_id (int): + body (list[GridSquareIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[GridSquareOut] + """ + + return sync_detailed( + atlas_id=atlas_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + atlas_id: int, + *, + client: AuthenticatedClient, + body: list[GridSquareIn], +) -> Response[HTTPValidationError | list[GridSquareOut]]: + """Post Atlas Grid Squares + + Create grid squares for an atlas + + Args: + atlas_id (int): + body (list[GridSquareIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[GridSquareOut]] + """ + + kwargs = _get_kwargs( + atlas_id=atlas_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + atlas_id: int, + *, + client: AuthenticatedClient, + body: list[GridSquareIn], +) -> HTTPValidationError | list[GridSquareOut] | None: + """Post Atlas Grid Squares + + Create grid squares for an atlas + + Args: + atlas_id (int): + body (list[GridSquareIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[GridSquareOut] + """ + + return ( + await asyncio_detailed( + atlas_id=atlas_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/atlas/update_atlas_atlas_atlas_id_patch.py b/src/lims_utils/expeye_client/api/atlas/update_atlas_atlas_atlas_id_patch.py new file mode 100644 index 0000000..e72612d --- /dev/null +++ b/src/lims_utils/expeye_client/api/atlas/update_atlas_atlas_atlas_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.atlas_optional import AtlasOptional +from ...models.atlas_out import AtlasOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + atlas_id: int, + *, + body: AtlasOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/atlas/{atlas_id}".format( + atlas_id=quote(str(atlas_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AtlasOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AtlasOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AtlasOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + atlas_id: int, + *, + client: AuthenticatedClient, + body: AtlasOptional, +) -> Response[AtlasOut | HTTPValidationError]: + """Update Atlas + + Update atlas + + Args: + atlas_id (int): + body (AtlasOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AtlasOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + atlas_id=atlas_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + atlas_id: int, + *, + client: AuthenticatedClient, + body: AtlasOptional, +) -> AtlasOut | HTTPValidationError | None: + """Update Atlas + + Update atlas + + Args: + atlas_id (int): + body (AtlasOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AtlasOut | HTTPValidationError + """ + + return sync_detailed( + atlas_id=atlas_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + atlas_id: int, + *, + client: AuthenticatedClient, + body: AtlasOptional, +) -> Response[AtlasOut | HTTPValidationError]: + """Update Atlas + + Update atlas + + Args: + atlas_id (int): + body (AtlasOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AtlasOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + atlas_id=atlas_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + atlas_id: int, + *, + client: AuthenticatedClient, + body: AtlasOptional, +) -> AtlasOut | HTTPValidationError | None: + """Update Atlas + + Update atlas + + Args: + atlas_id (int): + body (AtlasOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AtlasOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + atlas_id=atlas_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/contacts/__init__.py b/src/lims_utils/expeye_client/api/contacts/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/contacts/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/contacts/get_lab_contact_contacts_lab_contact_id_get.py b/src/lims_utils/expeye_client/api/contacts/get_lab_contact_contacts_lab_contact_id_get.py new file mode 100644 index 0000000..0f17101 --- /dev/null +++ b/src/lims_utils/expeye_client/api/contacts/get_lab_contact_contacts_lab_contact_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.lab_contact_out import LabContactOut +from ...types import Response + + +def _get_kwargs( + lab_contact_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/contacts/{lab_contact_id}".format( + lab_contact_id=quote(str(lab_contact_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LabContactOut | None: + if response.status_code == 200: + response_200 = LabContactOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LabContactOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + lab_contact_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | LabContactOut]: + """Get Lab Contact + + Get lab contact information + + Args: + lab_contact_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LabContactOut] + """ + + kwargs = _get_kwargs( + lab_contact_id=lab_contact_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + lab_contact_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | LabContactOut | None: + """Get Lab Contact + + Get lab contact information + + Args: + lab_contact_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LabContactOut + """ + + return sync_detailed( + lab_contact_id=lab_contact_id, + client=client, + ).parsed + + +async def asyncio_detailed( + lab_contact_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | LabContactOut]: + """Get Lab Contact + + Get lab contact information + + Args: + lab_contact_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LabContactOut] + """ + + kwargs = _get_kwargs( + lab_contact_id=lab_contact_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + lab_contact_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | LabContactOut | None: + """Get Lab Contact + + Get lab contact information + + Args: + lab_contact_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LabContactOut + """ + + return ( + await asyncio_detailed( + lab_contact_id=lab_contact_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_inspections/__init__.py b/src/lims_utils/expeye_client/api/container_inspections/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_inspections/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py b/src/lims_utils/expeye_client/api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py new file mode 100644 index 0000000..4a2fb98 --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_inspection_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/container-inspections/{container_inspection_id}".format( + container_inspection_id=quote(str(container_inspection_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_inspection_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Container Inspection + + Delete container inspection entry + + Args: + container_inspection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_inspection_id=container_inspection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_inspection_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Container Inspection + + Delete container inspection entry + + Args: + container_inspection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + container_inspection_id=container_inspection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + container_inspection_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Container Inspection + + Delete container inspection entry + + Args: + container_inspection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_inspection_id=container_inspection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_inspection_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Container Inspection + + Delete container inspection entry + + Args: + container_inspection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_inspection_id=container_inspection_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py b/src/lims_utils/expeye_client/api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py new file mode 100644 index 0000000..cde5a3b --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_image_out import PagedSampleImageOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_inspection_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/container-inspections/{container_inspection_id}/sample-images".format( + container_inspection_id=quote(str(container_inspection_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSampleImageOut | None: + if response.status_code == 200: + response_200 = PagedSampleImageOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSampleImageOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_inspection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleImageOut]: + """Get Sample Images + + Get sample images for container inspection + + Args: + container_inspection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleImageOut] + """ + + kwargs = _get_kwargs( + container_inspection_id=container_inspection_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_inspection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleImageOut | None: + """Get Sample Images + + Get sample images for container inspection + + Args: + container_inspection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleImageOut + """ + + return sync_detailed( + container_inspection_id=container_inspection_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + container_inspection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleImageOut]: + """Get Sample Images + + Get sample images for container inspection + + Args: + container_inspection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleImageOut] + """ + + kwargs = _get_kwargs( + container_inspection_id=container_inspection_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_inspection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleImageOut | None: + """Get Sample Images + + Get sample images for container inspection + + Args: + container_inspection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleImageOut + """ + + return ( + await asyncio_detailed( + container_inspection_id=container_inspection_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py b/src/lims_utils/expeye_client/api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py new file mode 100644 index 0000000..a136fa0 --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_inspection_optional import ContainerInspectionOptional +from ...models.container_inspection_out import ContainerInspectionOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_inspection_id: int, + *, + body: ContainerInspectionOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/container-inspections/{container_inspection_id}".format( + container_inspection_id=quote(str(container_inspection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerInspectionOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ContainerInspectionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerInspectionOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_inspection_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionOptional, +) -> Response[ContainerInspectionOut | HTTPValidationError]: + """Update Container Inspection + + Update container inspection entry + + Args: + container_inspection_id (int): + body (ContainerInspectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerInspectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_inspection_id=container_inspection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_inspection_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionOptional, +) -> ContainerInspectionOut | HTTPValidationError | None: + """Update Container Inspection + + Update container inspection entry + + Args: + container_inspection_id (int): + body (ContainerInspectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerInspectionOut | HTTPValidationError + """ + + return sync_detailed( + container_inspection_id=container_inspection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_inspection_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionOptional, +) -> Response[ContainerInspectionOut | HTTPValidationError]: + """Update Container Inspection + + Update container inspection entry + + Args: + container_inspection_id (int): + body (ContainerInspectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerInspectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_inspection_id=container_inspection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_inspection_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionOptional, +) -> ContainerInspectionOut | HTTPValidationError | None: + """Update Container Inspection + + Update container inspection entry + + Args: + container_inspection_id (int): + body (ContainerInspectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerInspectionOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_inspection_id=container_inspection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_registry/__init__.py b/src/lims_utils/expeye_client/api/container_registry/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_registry/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entries_container_registry_get.py b/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entries_container_registry_get.py new file mode 100644 index 0000000..16c836e --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entries_container_registry_get.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_registered_container_out import PagedRegisteredContainerOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/container-registry", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedRegisteredContainerOut | None: + if response.status_code == 200: + response_200 = PagedRegisteredContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedRegisteredContainerOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredContainerOut]: + """Get Container Registry Entries + + Get container registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredContainerOut] + """ + + kwargs = _get_kwargs( + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredContainerOut | None: + """Get Container Registry Entries + + Get container registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredContainerOut + """ + + return sync_detailed( + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredContainerOut]: + """Get Container Registry Entries + + Get container registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredContainerOut] + """ + + kwargs = _get_kwargs( + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredContainerOut | None: + """Get Container Registry Entries + + Get container registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredContainerOut + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py b/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py new file mode 100644 index 0000000..433450a --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_container_out import RegisteredContainerOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + barcode_or_id: int | str, + *, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/container-registry/{barcode_or_id}".format( + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredContainerOut | None: + if response.status_code == 200: + response_200 = RegisteredContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredContainerOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerOut]: + """Get Container Registry Entry + + Get container registry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerOut] + """ + + kwargs = _get_kwargs( + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerOut | None: + """Get Container Registry Entry + + Get container registry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerOut + """ + + return sync_detailed( + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerOut]: + """Get Container Registry Entry + + Get container registry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerOut] + """ + + kwargs = _get_kwargs( + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerOut | None: + """Get Container Registry Entry + + Get container registry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerOut + """ + + return ( + await asyncio_detailed( + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py b/src/lims_utils/expeye_client/api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py new file mode 100644 index 0000000..26877e6 --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_container_out import PagedContainerOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + barcode_or_id: int | str, + *, + is_barcode: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/container-registry/{barcode_or_id}/containers".format( + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedContainerOut | None: + if response.status_code == 200: + response_200 = PagedContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedContainerOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerOut]: + """Get Containers + + Get container instances matched to this container registry entry + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerOut] + """ + + kwargs = _get_kwargs( + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerOut | None: + """Get Containers + + Get container instances matched to this container registry entry + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerOut + """ + + return sync_detailed( + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerOut]: + """Get Containers + + Get container instances matched to this container registry entry + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerOut] + """ + + kwargs = _get_kwargs( + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerOut | None: + """Get Containers + + Get container instances matched to this container registry entry + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerOut + """ + + return ( + await asyncio_detailed( + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py b/src/lims_utils/expeye_client/api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py new file mode 100644 index 0000000..72a0375 --- /dev/null +++ b/src/lims_utils/expeye_client/api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_container_optional import RegisteredContainerOptional +from ...models.registered_container_out import RegisteredContainerOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + barcode_or_id: int | str, + *, + body: RegisteredContainerOptional, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/container-registry/{barcode_or_id}".format( + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredContainerOut | None: + if response.status_code == 200: + response_200 = RegisteredContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredContainerOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerOptional, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerOut]: + """Update Container Registry Entry + + Update container registry entry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerOut] + """ + + kwargs = _get_kwargs( + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerOptional, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerOut | None: + """Update Container Registry Entry + + Update container registry entry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerOut + """ + + return sync_detailed( + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerOptional, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerOut]: + """Update Container Registry Entry + + Update container registry entry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerOut] + """ + + kwargs = _get_kwargs( + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerOptional, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerOut | None: + """Update Container Registry Entry + + Update container registry entry information + + Args: + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerOut + """ + + return ( + await asyncio_detailed( + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/__init__.py b/src/lims_utils/expeye_client/api/containers/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/containers/create_container_containers_container_id_containers_post.py b/src/lims_utils/expeye_client/api/containers/create_container_containers_container_id_containers_post.py new file mode 100644 index 0000000..14d6ed8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/create_container_containers_container_id_containers_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_in import ContainerIn +from ...models.container_out import ContainerOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: ContainerIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/containers/{container_id}/containers".format( + container_id=quote(str(container_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = ContainerOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> Response[ContainerOut | HTTPValidationError]: + """Create Container + + Create new parent container + + Args: + container_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> ContainerOut | HTTPValidationError | None: + """Create Container + + Create new parent container + + Args: + container_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> Response[ContainerOut | HTTPValidationError]: + """Create Container + + Create new parent container + + Args: + container_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> ContainerOut | HTTPValidationError | None: + """Create Container + + Create new parent container + + Args: + container_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/create_container_history_containers_container_id_history_post.py b/src/lims_utils/expeye_client/api/containers/create_container_history_containers_container_id_history_post.py new file mode 100644 index 0000000..7614e87 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/create_container_history_containers_container_id_history_post.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_history_in import ContainerHistoryIn +from ...models.container_history_out import ContainerHistoryOut +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_id: int, + *, + body: ContainerHistoryIn, + update_container: bool | Unset = False, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["updateContainer"] = update_container + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/containers/{container_id}/history".format( + container_id=quote(str(container_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerHistoryOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = ContainerHistoryOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerHistoryOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerHistoryIn, + update_container: bool | Unset = False, +) -> Response[ContainerHistoryOut | HTTPValidationError]: + """Create Container History + + Create new container history entry + + Args: + container_id (int): + update_container (bool | Unset): Default: False. + body (ContainerHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerHistoryOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + update_container=update_container, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerHistoryIn, + update_container: bool | Unset = False, +) -> ContainerHistoryOut | HTTPValidationError | None: + """Create Container History + + Create new container history entry + + Args: + container_id (int): + update_container (bool | Unset): Default: False. + body (ContainerHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerHistoryOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + update_container=update_container, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerHistoryIn, + update_container: bool | Unset = False, +) -> Response[ContainerHistoryOut | HTTPValidationError]: + """Create Container History + + Create new container history entry + + Args: + container_id (int): + update_container (bool | Unset): Default: False. + body (ContainerHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerHistoryOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + update_container=update_container, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerHistoryIn, + update_container: bool | Unset = False, +) -> ContainerHistoryOut | HTTPValidationError | None: + """Create Container History + + Create new container history entry + + Args: + container_id (int): + update_container (bool | Unset): Default: False. + body (ContainerHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerHistoryOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + update_container=update_container, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/create_container_inspection_containers_container_id_inspections_post.py b/src/lims_utils/expeye_client/api/containers/create_container_inspection_containers_container_id_inspections_post.py new file mode 100644 index 0000000..e5aa2dd --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/create_container_inspection_containers_container_id_inspections_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_inspection_in import ContainerInspectionIn +from ...models.container_inspection_out import ContainerInspectionOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: ContainerInspectionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/containers/{container_id}/inspections".format( + container_id=quote(str(container_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerInspectionOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = ContainerInspectionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerInspectionOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionIn, +) -> Response[ContainerInspectionOut | HTTPValidationError]: + """Create Container Inspection + + Create container inspection + + Args: + container_id (int): + body (ContainerInspectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerInspectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionIn, +) -> ContainerInspectionOut | HTTPValidationError | None: + """Create Container Inspection + + Create container inspection + + Args: + container_id (int): + body (ContainerInspectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerInspectionOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionIn, +) -> Response[ContainerInspectionOut | HTTPValidationError]: + """Create Container Inspection + + Create container inspection + + Args: + container_id (int): + body (ContainerInspectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerInspectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerInspectionIn, +) -> ContainerInspectionOut | HTTPValidationError | None: + """Create Container Inspection + + Create container inspection + + Args: + container_id (int): + body (ContainerInspectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerInspectionOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py b/src/lims_utils/expeye_client/api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py new file mode 100644 index 0000000..c790803 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_queue_in import ContainerQueueIn +from ...models.container_queue_out import ContainerQueueOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: ContainerQueueIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/containers/{container_id}/container-queue".format( + container_id=quote(str(container_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerQueueOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = ContainerQueueOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerQueueOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> Response[ContainerQueueOut | HTTPValidationError]: + """Create Container Queue Entry + + Create container queue entry + + Args: + container_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerQueueOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> ContainerQueueOut | HTTPValidationError | None: + """Create Container Queue Entry + + Create container queue entry + + Args: + container_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerQueueOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> Response[ContainerQueueOut | HTTPValidationError]: + """Create Container Queue Entry + + Create container queue entry + + Args: + container_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerQueueOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> ContainerQueueOut | HTTPValidationError | None: + """Create Container Queue Entry + + Create container queue entry + + Args: + container_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerQueueOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/create_sample_containers_container_id_samples_post.py b/src/lims_utils/expeye_client/api/containers/create_sample_containers_container_id_samples_post.py new file mode 100644 index 0000000..58f419a --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/create_sample_containers_container_id_samples_post.py @@ -0,0 +1,221 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_in_with_crystal_and_diffraction_plan import SampleInWithCrystalAndDiffractionPlan +from ...models.sample_out import SampleOut +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: list[SampleInWithCrystalAndDiffractionPlan] | SampleInWithCrystalAndDiffractionPlan, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/containers/{container_id}/samples".format( + container_id=quote(str(container_id), safe=""), + ), + } + + if isinstance(body, SampleInWithCrystalAndDiffractionPlan): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = [] + for body_type_1_item_data in body: + body_type_1_item = body_type_1_item_data.to_dict() + _kwargs["json"].append(body_type_1_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[SampleOut] | SampleOut | None: + if response.status_code == 201: + + def _parse_response_201(data: object) -> list[SampleOut] | SampleOut: + try: + if not isinstance(data, dict): + raise TypeError() + response_201_type_0 = SampleOut.from_dict(data) + + return response_201_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, list): + raise TypeError() + response_201_type_1 = [] + _response_201_type_1 = data + for response_201_type_1_item_data in _response_201_type_1: + response_201_type_1_item = SampleOut.from_dict(response_201_type_1_item_data) + + response_201_type_1.append(response_201_type_1_item) + + return response_201_type_1 + + response_201 = _parse_response_201(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[SampleOut] | SampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: list[SampleInWithCrystalAndDiffractionPlan] | SampleInWithCrystalAndDiffractionPlan, +) -> Response[HTTPValidationError | list[SampleOut] | SampleOut]: + """Create Sample + + Create new sample + + Args: + container_id (int): + body (list[SampleInWithCrystalAndDiffractionPlan] | + SampleInWithCrystalAndDiffractionPlan): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[SampleOut] | SampleOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: list[SampleInWithCrystalAndDiffractionPlan] | SampleInWithCrystalAndDiffractionPlan, +) -> HTTPValidationError | list[SampleOut] | SampleOut | None: + """Create Sample + + Create new sample + + Args: + container_id (int): + body (list[SampleInWithCrystalAndDiffractionPlan] | + SampleInWithCrystalAndDiffractionPlan): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[SampleOut] | SampleOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: list[SampleInWithCrystalAndDiffractionPlan] | SampleInWithCrystalAndDiffractionPlan, +) -> Response[HTTPValidationError | list[SampleOut] | SampleOut]: + """Create Sample + + Create new sample + + Args: + container_id (int): + body (list[SampleInWithCrystalAndDiffractionPlan] | + SampleInWithCrystalAndDiffractionPlan): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[SampleOut] | SampleOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: list[SampleInWithCrystalAndDiffractionPlan] | SampleInWithCrystalAndDiffractionPlan, +) -> HTTPValidationError | list[SampleOut] | SampleOut | None: + """Create Sample + + Create new sample + + Args: + container_id (int): + body (list[SampleInWithCrystalAndDiffractionPlan] | + SampleInWithCrystalAndDiffractionPlan): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[SampleOut] | SampleOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py b/src/lims_utils/expeye_client/api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py new file mode 100644 index 0000000..4f2fe4a --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/containers/{container_id}/container-queue".format( + container_id=quote(str(container_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Container Queue Entry + + Delete container queue entry + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Container Queue Entry + + Delete container queue entry + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Container Queue Entry + + Delete container queue entry + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Container Queue Entry + + Delete container queue entry + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/edit_container_containers_container_id_patch.py b/src/lims_utils/expeye_client/api/containers/edit_container_containers_container_id_patch.py new file mode 100644 index 0000000..55ce137 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/edit_container_containers_container_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_optional import ContainerOptional +from ...models.container_out import ContainerOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: ContainerOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/containers/{container_id}".format( + container_id=quote(str(container_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerOptional, +) -> Response[ContainerOut | HTTPValidationError]: + """Edit Container + + Edit existing container + + Args: + container_id (int): + body (ContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerOptional, +) -> ContainerOut | HTTPValidationError | None: + """Edit Container + + Edit existing container + + Args: + container_id (int): + body (ContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerOptional, +) -> Response[ContainerOut | HTTPValidationError]: + """Edit Container + + Edit existing container + + Args: + container_id (int): + body (ContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerOptional, +) -> ContainerOut | HTTPValidationError | None: + """Edit Container + + Edit existing container + + Args: + container_id (int): + body (ContainerOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/get_container_containers_container_id_get.py b/src/lims_utils/expeye_client/api/containers/get_container_containers_container_id_get.py new file mode 100644 index 0000000..c02d0d8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/get_container_containers_container_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_out import ContainerOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/containers/{container_id}".format( + container_id=quote(str(container_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, +) -> Response[ContainerOut | HTTPValidationError]: + """Get Container + + Get container information + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, +) -> ContainerOut | HTTPValidationError | None: + """Get Container + + Get container information + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, +) -> Response[ContainerOut | HTTPValidationError]: + """Get Container + + Get container information + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, +) -> ContainerOut | HTTPValidationError | None: + """Get Container + + Get container information + + Args: + container_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/get_container_history_containers_container_id_history_get.py b/src/lims_utils/expeye_client/api/containers/get_container_history_containers_container_id_history_get.py new file mode 100644 index 0000000..a38f9e8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/get_container_history_containers_container_id_history_get.py @@ -0,0 +1,254 @@ +import datetime +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_container_history_out import PagedContainerHistoryOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_id: int, + *, + min_date: datetime.datetime | None | Unset = UNSET, + max_date: datetime.datetime | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_min_date: None | str | Unset + if isinstance(min_date, Unset): + json_min_date = UNSET + elif isinstance(min_date, datetime.datetime): + json_min_date = min_date.isoformat() + else: + json_min_date = min_date + params["minDate"] = json_min_date + + json_max_date: None | str | Unset + if isinstance(max_date, Unset): + json_max_date = UNSET + elif isinstance(max_date, datetime.datetime): + json_max_date = max_date.isoformat() + else: + json_max_date = max_date + params["maxDate"] = json_max_date + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/containers/{container_id}/history".format( + container_id=quote(str(container_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedContainerHistoryOut | None: + if response.status_code == 200: + response_200 = PagedContainerHistoryOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedContainerHistoryOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + min_date: datetime.datetime | None | Unset = UNSET, + max_date: datetime.datetime | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerHistoryOut]: + """Get Container History + + Get container history + + Args: + container_id (int): + min_date (datetime.datetime | None | Unset): + max_date (datetime.datetime | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerHistoryOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + min_date=min_date, + max_date=max_date, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + min_date: datetime.datetime | None | Unset = UNSET, + max_date: datetime.datetime | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerHistoryOut | None: + """Get Container History + + Get container history + + Args: + container_id (int): + min_date (datetime.datetime | None | Unset): + max_date (datetime.datetime | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerHistoryOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + min_date=min_date, + max_date=max_date, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + min_date: datetime.datetime | None | Unset = UNSET, + max_date: datetime.datetime | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerHistoryOut]: + """Get Container History + + Get container history + + Args: + container_id (int): + min_date (datetime.datetime | None | Unset): + max_date (datetime.datetime | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerHistoryOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + min_date=min_date, + max_date=max_date, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + min_date: datetime.datetime | None | Unset = UNSET, + max_date: datetime.datetime | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerHistoryOut | None: + """Get Container History + + Get container history + + Args: + container_id (int): + min_date (datetime.datetime | None | Unset): + max_date (datetime.datetime | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerHistoryOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + min_date=min_date, + max_date=max_date, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/get_container_inspections_containers_container_id_inspections_get.py b/src/lims_utils/expeye_client/api/containers/get_container_inspections_containers_container_id_inspections_get.py new file mode 100644 index 0000000..6e0031a --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/get_container_inspections_containers_container_id_inspections_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_container_inspection_out import PagedContainerInspectionOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/containers/{container_id}/inspections".format( + container_id=quote(str(container_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedContainerInspectionOut | None: + if response.status_code == 200: + response_200 = PagedContainerInspectionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedContainerInspectionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerInspectionOut]: + """Get Container Inspections + + Get container inspections + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerInspectionOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerInspectionOut | None: + """Get Container Inspections + + Get container inspections + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerInspectionOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerInspectionOut]: + """Get Container Inspections + + Get container inspections + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerInspectionOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerInspectionOut | None: + """Get Container Inspections + + Get container inspections + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerInspectionOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py b/src/lims_utils/expeye_client/api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py new file mode 100644 index 0000000..1a56cb6 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_container_queue_out import PagedContainerQueueOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/containers/{container_id}/container-queue".format( + container_id=quote(str(container_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedContainerQueueOut | None: + if response.status_code == 200: + response_200 = PagedContainerQueueOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedContainerQueueOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerQueueOut]: + """Get Container Queue Entries + + Get container queue entries for the given container ID + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerQueueOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerQueueOut | None: + """Get Container Queue Entries + + Get container queue entries for the given container ID + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerQueueOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedContainerQueueOut]: + """Get Container Queue Entries + + Get container queue entries for the given container ID + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedContainerQueueOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedContainerQueueOut | None: + """Get Container Queue Entries + + Get container queue entries for the given container ID + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedContainerQueueOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py new file mode 100644 index 0000000..96b4264 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_diffraction_plan_out import PagedDiffractionPlanOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/containers/{container_id}/diffraction-plans".format( + container_id=quote(str(container_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + if response.status_code == 200: + response_200 = PagedDiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + container_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/get_samples_containers_container_id_samples_get.py b/src/lims_utils/expeye_client/api/containers/get_samples_containers_container_id_samples_get.py new file mode 100644 index 0000000..5d62af1 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/get_samples_containers_container_id_samples_get.py @@ -0,0 +1,253 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_out import PagedSampleOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + container_id: int, + *, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_loaded: bool | None | Unset + if isinstance(loaded, Unset): + json_loaded = UNSET + else: + json_loaded = loaded + params["loaded"] = json_loaded + + json_is_in_sample_changer: bool | None | Unset + if isinstance(is_in_sample_changer, Unset): + json_is_in_sample_changer = UNSET + else: + json_is_in_sample_changer = is_in_sample_changer + params["isInSampleChanger"] = json_is_in_sample_changer + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/containers/{container_id}/samples".format( + container_id=quote(str(container_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSampleOut | None: + if response.status_code == 200: + response_200 = PagedSampleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleOut]: + """Get Samples + + Get samples in container + + Args: + container_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleOut | None: + """Get Samples + + Get samples in container + + Args: + container_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleOut]: + """Get Samples + + Get samples in container + + Args: + container_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleOut | None: + """Get Samples + + Get samples in container + + Args: + container_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/load_or_unload_puck_containers_container_id_assign_post.py b/src/lims_utils/expeye_client/api/containers/load_or_unload_puck_containers_container_id_assign_post.py new file mode 100644 index 0000000..a3ff127 --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/load_or_unload_puck_containers_container_id_assign_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_load import ContainerLoad +from ...models.container_out import ContainerOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: ContainerLoad, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/containers/{container_id}/assign".format( + container_id=quote(str(container_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerLoad, +) -> Response[ContainerOut | HTTPValidationError]: + """Load Or Unload Puck + + Toggle load/unload state of puck and append to history + + Args: + container_id (int): + body (ContainerLoad): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerLoad, +) -> ContainerOut | HTTPValidationError | None: + """Load Or Unload Puck + + Toggle load/unload state of puck and append to history + + Args: + container_id (int): + body (ContainerLoad): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerLoad, +) -> Response[ContainerOut | HTTPValidationError]: + """Load Or Unload Puck + + Toggle load/unload state of puck and append to history + + Args: + container_id (int): + body (ContainerLoad): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: ContainerLoad, +) -> ContainerOut | HTTPValidationError | None: + """Load Or Unload Puck + + Toggle load/unload state of puck and append to history + + Args: + container_id (int): + body (ContainerLoad): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py b/src/lims_utils/expeye_client/api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py new file mode 100644 index 0000000..50d190e --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_queue_in import ContainerQueueIn +from ...models.container_queue_out import ContainerQueueOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + container_id: int, + container_queue_id: int, + *, + body: ContainerQueueIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/containers/{container_id}/container-queue/{container_queue_id}".format( + container_id=quote(str(container_id), safe=""), + container_queue_id=quote(str(container_queue_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerQueueOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = ContainerQueueOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerQueueOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + container_queue_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> Response[ContainerQueueOut | HTTPValidationError]: + """Update Container Queue Entry + + Update container queue entry + + Args: + container_id (int): + container_queue_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerQueueOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + container_queue_id=container_queue_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + container_queue_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> ContainerQueueOut | HTTPValidationError | None: + """Update Container Queue Entry + + Update container queue entry + + Args: + container_id (int): + container_queue_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerQueueOut | HTTPValidationError + """ + + return sync_detailed( + container_id=container_id, + container_queue_id=container_queue_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + container_queue_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> Response[ContainerQueueOut | HTTPValidationError]: + """Update Container Queue Entry + + Update container queue entry + + Args: + container_id (int): + container_queue_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerQueueOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + container_id=container_id, + container_queue_id=container_queue_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + container_queue_id: int, + *, + client: AuthenticatedClient, + body: ContainerQueueIn, +) -> ContainerQueueOut | HTTPValidationError | None: + """Update Container Queue Entry + + Update container queue entry + + Args: + container_id (int): + container_queue_id (int): + body (ContainerQueueIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerQueueOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + container_id=container_id, + container_queue_id=container_queue_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py new file mode 100644 index 0000000..4511b7e --- /dev/null +++ b/src/lims_utils/expeye_client/api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_optional import DiffractionPlanOptional +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_diffraction_plan_out import PagedDiffractionPlanOut +from ...types import Response + + +def _get_kwargs( + container_id: int, + *, + body: DiffractionPlanOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/containers/{container_id}/diffraction-plans".format( + container_id=quote(str(container_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + if response.status_code == 200: + response_200 = PagedDiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + container_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + container_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + container_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return sync_detailed( + container_id=container_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + container_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + container_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + container_id=container_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + container_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + container_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return ( + await asyncio_detailed( + container_id=container_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/crystals/__init__.py b/src/lims_utils/expeye_client/api/crystals/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/crystals/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/crystals/get_crystal_crystals_crystal_id_get.py b/src/lims_utils/expeye_client/api/crystals/get_crystal_crystals_crystal_id_get.py new file mode 100644 index 0000000..9cfd5f0 --- /dev/null +++ b/src/lims_utils/expeye_client/api/crystals/get_crystal_crystals_crystal_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.crystal_out import CrystalOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + crystal_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/crystals/{crystal_id}".format( + crystal_id=quote(str(crystal_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> CrystalOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = CrystalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[CrystalOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + crystal_id: int, + *, + client: AuthenticatedClient, +) -> Response[CrystalOut | HTTPValidationError]: + """Get Crystal + + Get crystal + + Args: + crystal_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CrystalOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + crystal_id=crystal_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + crystal_id: int, + *, + client: AuthenticatedClient, +) -> CrystalOut | HTTPValidationError | None: + """Get Crystal + + Get crystal + + Args: + crystal_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CrystalOut | HTTPValidationError + """ + + return sync_detailed( + crystal_id=crystal_id, + client=client, + ).parsed + + +async def asyncio_detailed( + crystal_id: int, + *, + client: AuthenticatedClient, +) -> Response[CrystalOut | HTTPValidationError]: + """Get Crystal + + Get crystal + + Args: + crystal_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CrystalOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + crystal_id=crystal_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + crystal_id: int, + *, + client: AuthenticatedClient, +) -> CrystalOut | HTTPValidationError | None: + """Get Crystal + + Get crystal + + Args: + crystal_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CrystalOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + crystal_id=crystal_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/crystals/update_crystal_crystals_crystal_id_patch.py b/src/lims_utils/expeye_client/api/crystals/update_crystal_crystals_crystal_id_patch.py new file mode 100644 index 0000000..1a65985 --- /dev/null +++ b/src/lims_utils/expeye_client/api/crystals/update_crystal_crystals_crystal_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.crystal_optional import CrystalOptional +from ...models.crystal_out import CrystalOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + crystal_id: int, + *, + body: CrystalOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/crystals/{crystal_id}".format( + crystal_id=quote(str(crystal_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> CrystalOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = CrystalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[CrystalOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + crystal_id: int, + *, + client: AuthenticatedClient, + body: CrystalOptional, +) -> Response[CrystalOut | HTTPValidationError]: + """Update Crystal + + Update crystal + + Args: + crystal_id (int): + body (CrystalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CrystalOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + crystal_id=crystal_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + crystal_id: int, + *, + client: AuthenticatedClient, + body: CrystalOptional, +) -> CrystalOut | HTTPValidationError | None: + """Update Crystal + + Update crystal + + Args: + crystal_id (int): + body (CrystalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CrystalOut | HTTPValidationError + """ + + return sync_detailed( + crystal_id=crystal_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + crystal_id: int, + *, + client: AuthenticatedClient, + body: CrystalOptional, +) -> Response[CrystalOut | HTTPValidationError]: + """Update Crystal + + Update crystal + + Args: + crystal_id (int): + body (CrystalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CrystalOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + crystal_id=crystal_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + crystal_id: int, + *, + client: AuthenticatedClient, + body: CrystalOptional, +) -> CrystalOut | HTTPValidationError | None: + """Update Crystal + + Update crystal + + Args: + crystal_id (int): + body (CrystalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CrystalOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + crystal_id=crystal_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ctf/__init__.py b/src/lims_utils/expeye_client/api/ctf/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/ctf/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/ctf/delete_ctf_ctf_ctf_id_delete.py b/src/lims_utils/expeye_client/api/ctf/delete_ctf_ctf_ctf_id_delete.py new file mode 100644 index 0000000..af584c5 --- /dev/null +++ b/src/lims_utils/expeye_client/api/ctf/delete_ctf_ctf_ctf_id_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + ctf_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/ctf/{ctf_id}".format( + ctf_id=quote(str(ctf_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 200: + response_200 = response.json() + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ctf_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Ctf + + Delete a CTF record + + Args: + ctf_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + ctf_id=ctf_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ctf_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Ctf + + Delete a CTF record + + Args: + ctf_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + ctf_id=ctf_id, + client=client, + ).parsed + + +async def asyncio_detailed( + ctf_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Ctf + + Delete a CTF record + + Args: + ctf_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + ctf_id=ctf_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ctf_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Ctf + + Delete a CTF record + + Args: + ctf_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + ctf_id=ctf_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py b/src/lims_utils/expeye_client/api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py new file mode 100644 index 0000000..8ce831e --- /dev/null +++ b/src/lims_utils/expeye_client/api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ctf_out import CTFOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/ctf".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[CTFOut] | None: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + for response_200_item_data in _response_200: + response_200_item = CTFOut.from_dict(response_200_item_data) + + response_200.append(response_200_item) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[CTFOut]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | list[CTFOut]]: + """Get Ctf + + Get CTF records for a data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[CTFOut]] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | list[CTFOut] | None: + """Get Ctf + + Get CTF records for a data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[CTFOut] + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | list[CTFOut]]: + """Get Ctf + + Get CTF records for a data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[CTFOut]] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | list[CTFOut] | None: + """Get Ctf + + Get CTF records for a data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[CTFOut] + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ctf/update_ctf_ctf_ctf_id_patch.py b/src/lims_utils/expeye_client/api/ctf/update_ctf_ctf_ctf_id_patch.py new file mode 100644 index 0000000..79b45ee --- /dev/null +++ b/src/lims_utils/expeye_client/api/ctf/update_ctf_ctf_ctf_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ctf_optional import CTFOptional +from ...models.ctf_out import CTFOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + ctf_id: int, + *, + body: CTFOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/ctf/{ctf_id}".format( + ctf_id=quote(str(ctf_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> CTFOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = CTFOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[CTFOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ctf_id: int, + *, + client: AuthenticatedClient, + body: CTFOptional, +) -> Response[CTFOut | HTTPValidationError]: + """Update Ctf + + Update CTF fields + + Args: + ctf_id (int): + body (CTFOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CTFOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + ctf_id=ctf_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ctf_id: int, + *, + client: AuthenticatedClient, + body: CTFOptional, +) -> CTFOut | HTTPValidationError | None: + """Update Ctf + + Update CTF fields + + Args: + ctf_id (int): + body (CTFOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CTFOut | HTTPValidationError + """ + + return sync_detailed( + ctf_id=ctf_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + ctf_id: int, + *, + client: AuthenticatedClient, + body: CTFOptional, +) -> Response[CTFOut | HTTPValidationError]: + """Update Ctf + + Update CTF fields + + Args: + ctf_id (int): + body (CTFOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CTFOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + ctf_id=ctf_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ctf_id: int, + *, + client: AuthenticatedClient, + body: CTFOptional, +) -> CTFOut | HTTPValidationError | None: + """Update Ctf + + Update CTF fields + + Args: + ctf_id (int): + body (CTFOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CTFOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + ctf_id=ctf_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/__init__.py b/src/lims_utils/expeye_client/api/data_collection_groups/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collection_groups/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py b/src/lims_utils/expeye_client/api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py new file mode 100644 index 0000000..c9bd4b9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_in import DataCollectionIn +from ...models.data_collection_out import DataCollectionOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + group_id: int, + *, + body: DataCollectionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-groups/{group_id}/data-collections".format( + group_id=quote(str(group_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DataCollectionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionIn, +) -> Response[DataCollectionOut | HTTPValidationError]: + """Create Collection + + Create data collection + + Args: + group_id (int): + body (DataCollectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionIn, +) -> DataCollectionOut | HTTPValidationError | None: + """Create Collection + + Create data collection + + Args: + group_id (int): + body (DataCollectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionOut | HTTPValidationError + """ + + return sync_detailed( + group_id=group_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionIn, +) -> Response[DataCollectionOut | HTTPValidationError]: + """Create Collection + + Create data collection + + Args: + group_id (int): + body (DataCollectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionIn, +) -> DataCollectionOut | HTTPValidationError | None: + """Create Collection + + Create data collection + + Args: + group_id (int): + body (DataCollectionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + group_id=group_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py b/src/lims_utils/expeye_client/api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py new file mode 100644 index 0000000..21a51cf --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_data_collection_out import PagedDataCollectionOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + group_id: int, + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-groups/{group_id}/data-collections".format( + group_id=quote(str(group_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDataCollectionOut | None: + if response.status_code == 200: + response_200 = PagedDataCollectionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDataCollectionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + group_id: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDataCollectionOut]: + """Get Collections + + List collections belonging to a data collection group + + Args: + group_id (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionOut] + """ + + kwargs = _get_kwargs( + group_id=group_id, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + group_id: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDataCollectionOut | None: + """Get Collections + + List collections belonging to a data collection group + + Args: + group_id (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionOut + """ + + return sync_detailed( + group_id=group_id, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + group_id: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDataCollectionOut]: + """Get Collections + + List collections belonging to a data collection group + + Args: + group_id (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionOut] + """ + + kwargs = _get_kwargs( + group_id=group_id, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + group_id: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDataCollectionOut | None: + """Get Collections + + List collections belonging to a data collection group + + Args: + group_id (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionOut + """ + + return ( + await asyncio_detailed( + group_id=group_id, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py b/src/lims_utils/expeye_client/api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py new file mode 100644 index 0000000..c4caad5 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py @@ -0,0 +1,268 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.get_tomograms_for_dcg_data_groups_group_id_tomograms_get_sort_by_type_0 import ( + GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0, +) +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_tomogram_out import PagedTomogramOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + group_id: int, + *, + sort_by: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 + | None + | Unset = GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_sort_by: None | str | Unset + if isinstance(sort_by, Unset): + json_sort_by = UNSET + elif isinstance(sort_by, GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0): + json_sort_by = sort_by.value + else: + json_sort_by = sort_by + params["sortBy"] = json_sort_by + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-groups/{group_id}/tomograms".format( + group_id=quote(str(group_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedTomogramOut | None: + if response.status_code == 200: + response_200 = PagedTomogramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedTomogramOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + group_id: int, + *, + client: AuthenticatedClient, + sort_by: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 + | None + | Unset = GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedTomogramOut]: + """Get Tomograms For Dcg + + List Tomograms belonging to a data collection group + + Args: + group_id (int): + sort_by (GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 | None | Unset): + Default: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE. + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedTomogramOut] + """ + + kwargs = _get_kwargs( + group_id=group_id, + sort_by=sort_by, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + group_id: int, + *, + client: AuthenticatedClient, + sort_by: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 + | None + | Unset = GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedTomogramOut | None: + """Get Tomograms For Dcg + + List Tomograms belonging to a data collection group + + Args: + group_id (int): + sort_by (GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 | None | Unset): + Default: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE. + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedTomogramOut + """ + + return sync_detailed( + group_id=group_id, + client=client, + sort_by=sort_by, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + group_id: int, + *, + client: AuthenticatedClient, + sort_by: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 + | None + | Unset = GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedTomogramOut]: + """Get Tomograms For Dcg + + List Tomograms belonging to a data collection group + + Args: + group_id (int): + sort_by (GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 | None | Unset): + Default: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE. + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedTomogramOut] + """ + + kwargs = _get_kwargs( + group_id=group_id, + sort_by=sort_by, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + group_id: int, + *, + client: AuthenticatedClient, + sort_by: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 + | None + | Unset = GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedTomogramOut | None: + """Get Tomograms For Dcg + + List Tomograms belonging to a data collection group + + Args: + group_id (int): + sort_by (GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0 | None | Unset): + Default: GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0.DATE. + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedTomogramOut + """ + + return ( + await asyncio_detailed( + group_id=group_id, + client=client, + sort_by=sort_by, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py b/src/lims_utils/expeye_client/api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py new file mode 100644 index 0000000..833d83b --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_group_optional import DataCollectionGroupOptional +from ...models.data_collection_group_out import DataCollectionGroupOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + group_id: int, + *, + body: DataCollectionGroupOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/data-groups/{group_id}".format( + group_id=quote(str(group_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionGroupOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DataCollectionGroupOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionGroupOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupOptional, +) -> Response[DataCollectionGroupOut | HTTPValidationError]: + """Update Data Collection Group + + Update existing data collection group + + Args: + group_id (int): + body (DataCollectionGroupOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionGroupOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupOptional, +) -> DataCollectionGroupOut | HTTPValidationError | None: + """Update Data Collection Group + + Update existing data collection group + + Args: + group_id (int): + body (DataCollectionGroupOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionGroupOut | HTTPValidationError + """ + + return sync_detailed( + group_id=group_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupOptional, +) -> Response[DataCollectionGroupOut | HTTPValidationError]: + """Update Data Collection Group + + Update existing data collection group + + Args: + group_id (int): + body (DataCollectionGroupOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionGroupOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + group_id=group_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + group_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupOptional, +) -> DataCollectionGroupOut | HTTPValidationError | None: + """Update Data Collection Group + + Update existing data collection group + + Args: + group_id (int): + body (DataCollectionGroupOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionGroupOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + group_id=group_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/__init__.py b/src/lims_utils/expeye_client/api/data_collections/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py b/src/lims_utils/expeye_client/api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py new file mode 100644 index 0000000..f1468fb --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.aperture_in import ApertureIn +from ...models.aperture_out import ApertureOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + *, + body: ApertureIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-collections/{data_collection_id}/apertures".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ApertureOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = ApertureOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ApertureOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: ApertureIn, +) -> Response[ApertureOut | HTTPValidationError]: + """Create Aperture + + Create new aperture associated with data collection + + Args: + data_collection_id (int): + body (ApertureIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApertureOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: ApertureIn, +) -> ApertureOut | HTTPValidationError | None: + """Create Aperture + + Create new aperture associated with data collection + + Args: + data_collection_id (int): + body (ApertureIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApertureOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: ApertureIn, +) -> Response[ApertureOut | HTTPValidationError]: + """Create Aperture + + Create new aperture associated with data collection + + Args: + data_collection_id (int): + body (ApertureIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApertureOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: ApertureIn, +) -> ApertureOut | HTTPValidationError | None: + """Create Aperture + + Create new aperture associated with data collection + + Args: + data_collection_id (int): + body (ApertureIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApertureOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py b/src/lims_utils/expeye_client/api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py new file mode 100644 index 0000000..123fe57 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_file_attachment_in import DataCollectionFileAttachmentIn +from ...models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + *, + body: DataCollectionFileAttachmentIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-collections/{data_collection_id}/attachments".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DataCollectionFileAttachmentOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentIn, +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + """Create Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + body (DataCollectionFileAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionFileAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentIn, +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + """Create Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + body (DataCollectionFileAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionFileAttachmentOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentIn, +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + """Create Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + body (DataCollectionFileAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionFileAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentIn, +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + """Create Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + body (DataCollectionFileAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionFileAttachmentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py b/src/lims_utils/expeye_client/api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py new file mode 100644 index 0000000..f00c58f --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_comment_in import DataCollectionCommentIn +from ...models.data_collection_comment_out import DataCollectionCommentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + *, + body: DataCollectionCommentIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-collections/{data_collection_id}/comments".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionCommentOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DataCollectionCommentOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionCommentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentIn, +) -> Response[DataCollectionCommentOut | HTTPValidationError]: + """Create Comment + + Create new data collection comment + + Args: + data_collection_id (int): + body (DataCollectionCommentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionCommentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentIn, +) -> DataCollectionCommentOut | HTTPValidationError | None: + """Create Comment + + Create new data collection comment + + Args: + data_collection_id (int): + body (DataCollectionCommentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionCommentOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentIn, +) -> Response[DataCollectionCommentOut | HTTPValidationError]: + """Create Comment + + Create new data collection comment + + Args: + data_collection_id (int): + body (DataCollectionCommentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionCommentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentIn, +) -> DataCollectionCommentOut | HTTPValidationError | None: + """Create Comment + + Create new data collection comment + + Args: + data_collection_id (int): + body (DataCollectionCommentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionCommentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py b/src/lims_utils/expeye_client/api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py new file mode 100644 index 0000000..2dfaeb9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.grid_info_in import GridInfoIn +from ...models.grid_info_out import GridInfoOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + *, + body: GridInfoIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-collections/{data_collection_id}/grids".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> GridInfoOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = GridInfoOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[GridInfoOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: GridInfoIn, +) -> Response[GridInfoOut | HTTPValidationError]: + """Create Grid + + Create new grid + + Args: + data_collection_id (int): + body (GridInfoIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GridInfoOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: GridInfoIn, +) -> GridInfoOut | HTTPValidationError | None: + """Create Grid + + Create new grid + + Args: + data_collection_id (int): + body (GridInfoIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GridInfoOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: GridInfoIn, +) -> Response[GridInfoOut | HTTPValidationError]: + """Create Grid + + Create new grid + + Args: + data_collection_id (int): + body (GridInfoIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GridInfoOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: GridInfoIn, +) -> GridInfoOut | HTTPValidationError | None: + """Create Grid + + Create new grid + + Args: + data_collection_id (int): + body (GridInfoIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GridInfoOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/create_position_data_collections_data_collection_id_position_post.py b/src/lims_utils/expeye_client/api/data_collections/create_position_data_collections_data_collection_id_position_post.py new file mode 100644 index 0000000..a324ad9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/create_position_data_collections_data_collection_id_position_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.position_in import PositionIn +from ...models.position_out import PositionOut +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + *, + body: PositionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/data-collections/{data_collection_id}/position".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PositionOut | None: + if response.status_code == 201: + response_201 = PositionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionIn, +) -> Response[HTTPValidationError | PositionOut]: + """Create Position + + Create new position associated with data collection + + Args: + data_collection_id (int): + body (PositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PositionOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionIn, +) -> HTTPValidationError | PositionOut | None: + """Create Position + + Create new position associated with data collection + + Args: + data_collection_id (int): + body (PositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PositionOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionIn, +) -> Response[HTTPValidationError | PositionOut]: + """Create Position + + Create new position associated with data collection + + Args: + data_collection_id (int): + body (PositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PositionOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionIn, +) -> HTTPValidationError | PositionOut | None: + """Create Position + + Create new position associated with data collection + + Args: + data_collection_id (int): + body (PositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PositionOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py b/src/lims_utils/expeye_client/api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py new file mode 100644 index 0000000..46feb05 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_file_attachment_optional import DataCollectionFileAttachmentOptional +from ...models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + attachment_id: int, + *, + body: DataCollectionFileAttachmentOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/data-collections/{data_collection_id}/attachments/{attachment_id}".format( + data_collection_id=quote(str(data_collection_id), safe=""), + attachment_id=quote(str(attachment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DataCollectionFileAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentOptional, +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + """Edit Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + attachment_id (int): + body (DataCollectionFileAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionFileAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentOptional, +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + """Edit Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + attachment_id (int): + body (DataCollectionFileAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionFileAttachmentOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentOptional, +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + """Edit Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + attachment_id (int): + body (DataCollectionFileAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionFileAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionFileAttachmentOptional, +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + """Edit Attachment + + Create new data collection file attachment + + Args: + data_collection_id (int): + attachment_id (int): + body (DataCollectionFileAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionFileAttachmentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py b/src/lims_utils/expeye_client/api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py new file mode 100644 index 0000000..472683e --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + attachment_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/attachments/{attachment_id}".format( + data_collection_id=quote(str(data_collection_id), safe=""), + attachment_id=quote(str(attachment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DataCollectionFileAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + """Get Attachment + + Get single file attachment metadata + + Args: + data_collection_id (int): + attachment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionFileAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + """Get Attachment + + Get single file attachment metadata + + Args: + data_collection_id (int): + attachment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionFileAttachmentOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, +) -> Response[DataCollectionFileAttachmentOut | HTTPValidationError]: + """Get Attachment + + Get single file attachment metadata + + Args: + data_collection_id (int): + attachment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionFileAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + attachment_id: int, + *, + client: AuthenticatedClient, +) -> DataCollectionFileAttachmentOut | HTTPValidationError | None: + """Get Attachment + + Get single file attachment metadata + + Args: + data_collection_id (int): + attachment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionFileAttachmentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + attachment_id=attachment_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py b/src/lims_utils/expeye_client/api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py new file mode 100644 index 0000000..48b9eea --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py @@ -0,0 +1,252 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.file_attachment_type import FileAttachmentType +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_data_collection_file_attachment_out import PagedDataCollectionFileAttachmentOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + data_collection_id: int, + *, + filetype: FileAttachmentType | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_filetype: None | str | Unset + if isinstance(filetype, Unset): + json_filetype = UNSET + elif isinstance(filetype, FileAttachmentType): + json_filetype = filetype.value + else: + json_filetype = filetype + params["filetype"] = json_filetype + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/attachments".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDataCollectionFileAttachmentOut | None: + if response.status_code == 200: + response_200 = PagedDataCollectionFileAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDataCollectionFileAttachmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + filetype: FileAttachmentType | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDataCollectionFileAttachmentOut]: + """Get Attachments + + Get attachments that belong to the data collection + + Args: + data_collection_id (int): + filetype (FileAttachmentType | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionFileAttachmentOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + filetype=filetype, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + filetype: FileAttachmentType | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDataCollectionFileAttachmentOut | None: + """Get Attachments + + Get attachments that belong to the data collection + + Args: + data_collection_id (int): + filetype (FileAttachmentType | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionFileAttachmentOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + filetype=filetype, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + filetype: FileAttachmentType | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDataCollectionFileAttachmentOut]: + """Get Attachments + + Get attachments that belong to the data collection + + Args: + data_collection_id (int): + filetype (FileAttachmentType | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionFileAttachmentOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + filetype=filetype, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + filetype: FileAttachmentType | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDataCollectionFileAttachmentOut | None: + """Get Attachments + + Get attachments that belong to the data collection + + Args: + data_collection_id (int): + filetype (FileAttachmentType | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionFileAttachmentOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + filetype=filetype, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py b/src/lims_utils/expeye_client/api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py new file mode 100644 index 0000000..2ce2afa --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_data_collection_comment_out import PagedDataCollectionCommentOut +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/comments".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDataCollectionCommentOut | None: + if response.status_code == 200: + response_200 = PagedDataCollectionCommentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDataCollectionCommentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PagedDataCollectionCommentOut]: + """Get Comments + + Get comments for data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionCommentOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PagedDataCollectionCommentOut | None: + """Get Comments + + Get comments for data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionCommentOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PagedDataCollectionCommentOut]: + """Get Comments + + Get comments for data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionCommentOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PagedDataCollectionCommentOut | None: + """Get Comments + + Get comments for data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionCommentOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_data_collection_data_collections_data_collection_id_get.py b/src/lims_utils/expeye_client/api/data_collections/get_data_collection_data_collections_data_collection_id_get.py new file mode 100644 index 0000000..a3378a8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_data_collection_data_collections_data_collection_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_out import DataCollectionOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DataCollectionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[DataCollectionOut | HTTPValidationError]: + """Get Data Collection + + Get data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> DataCollectionOut | HTTPValidationError | None: + """Get Data Collection + + Get data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[DataCollectionOut | HTTPValidationError]: + """Get Data Collection + + Get data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> DataCollectionOut | HTTPValidationError | None: + """Get Data Collection + + Get data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py b/src/lims_utils/expeye_client/api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py new file mode 100644 index 0000000..33ef7c0 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_grid_info_out import PagedGridInfoOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + data_collection_id: int, + *, + search: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/grids".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedGridInfoOut | None: + if response.status_code == 200: + response_200 = PagedGridInfoOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedGridInfoOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedGridInfoOut]: + """Get Grids + + Get grids that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedGridInfoOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedGridInfoOut | None: + """Get Grids + + Get grids that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedGridInfoOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedGridInfoOut]: + """Get Grids + + Get grids that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedGridInfoOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedGridInfoOut | None: + """Get Grids + + Get grids that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedGridInfoOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py b/src/lims_utils/expeye_client/api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py new file mode 100644 index 0000000..65c47a2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_image_quality_indicator_out import PagedImageQualityIndicatorOut +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/image-quality-indicators".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedImageQualityIndicatorOut | None: + if response.status_code == 200: + response_200 = PagedImageQualityIndicatorOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedImageQualityIndicatorOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PagedImageQualityIndicatorOut]: + """Get Image Quality Indicators + + Get image quality indicators + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedImageQualityIndicatorOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PagedImageQualityIndicatorOut | None: + """Get Image Quality Indicators + + Get image quality indicators + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedImageQualityIndicatorOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PagedImageQualityIndicatorOut]: + """Get Image Quality Indicators + + Get image quality indicators + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedImageQualityIndicatorOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PagedImageQualityIndicatorOut | None: + """Get Image Quality Indicators + + Get image quality indicators + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedImageQualityIndicatorOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_position_data_collections_data_collection_id_position_get.py b/src/lims_utils/expeye_client/api/data_collections/get_position_data_collections_data_collection_id_position_get.py new file mode 100644 index 0000000..4a6da7a --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_position_data_collections_data_collection_id_position_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.position_out import PositionOut +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/position".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PositionOut | None: + if response.status_code == 200: + response_200 = PositionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PositionOut]: + """Get Position + + Get position associated with data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PositionOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PositionOut | None: + """Get Position + + Get position associated with data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PositionOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PositionOut]: + """Get Position + + Get position associated with data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PositionOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PositionOut | None: + """Get Position + + Get position associated with data collection + + Args: + data_collection_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PositionOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py b/src/lims_utils/expeye_client/api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py new file mode 100644 index 0000000..7cabb7e --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py @@ -0,0 +1,479 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_processing_job_with_auto_proc_program_out import PagedProcessingJobWithAutoProcProgramOut +from ...models.processing_status import ProcessingStatus +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + data_collection_id: int, + *, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_min_completeness: float | None | Unset + if isinstance(min_completeness, Unset): + json_min_completeness = UNSET + else: + json_min_completeness = min_completeness + params["minCompleteness"] = json_min_completeness + + json_max_completeness: float | None | Unset + if isinstance(max_completeness, Unset): + json_max_completeness = UNSET + else: + json_max_completeness = max_completeness + params["maxCompleteness"] = json_max_completeness + + json_min_mean_i_over_sigma: float | None | Unset + if isinstance(min_mean_i_over_sigma, Unset): + json_min_mean_i_over_sigma = UNSET + else: + json_min_mean_i_over_sigma = min_mean_i_over_sigma + params["minMeanIOverSigma"] = json_min_mean_i_over_sigma + + json_max_mean_i_over_sigma: float | None | Unset + if isinstance(max_mean_i_over_sigma, Unset): + json_max_mean_i_over_sigma = UNSET + else: + json_max_mean_i_over_sigma = max_mean_i_over_sigma + params["maxMeanIOverSigma"] = json_max_mean_i_over_sigma + + json_min_res_i_over_sigma: float | None | Unset + if isinstance(min_res_i_over_sigma, Unset): + json_min_res_i_over_sigma = UNSET + else: + json_min_res_i_over_sigma = min_res_i_over_sigma + params["minResIOverSigma"] = json_min_res_i_over_sigma + + json_max_res_i_over_sigma: float | None | Unset + if isinstance(max_res_i_over_sigma, Unset): + json_max_res_i_over_sigma = UNSET + else: + json_max_res_i_over_sigma = max_res_i_over_sigma + params["maxResIOverSigma"] = json_max_res_i_over_sigma + + json_low_resolution_cutoff: float | None | Unset + if isinstance(low_resolution_cutoff, Unset): + json_low_resolution_cutoff = UNSET + else: + json_low_resolution_cutoff = low_resolution_cutoff + params["lowResolutionCutoff"] = json_low_resolution_cutoff + + json_high_resolution_cutoff: float | None | Unset + if isinstance(high_resolution_cutoff, Unset): + json_high_resolution_cutoff = UNSET + else: + json_high_resolution_cutoff = high_resolution_cutoff + params["highResolutionCutoff"] = json_high_resolution_cutoff + + json_space_group: None | str | Unset + if isinstance(space_group, Unset): + json_space_group = UNSET + else: + json_space_group = space_group + params["spaceGroup"] = json_space_group + + json_downstream: bool | None | Unset + if isinstance(downstream, Unset): + json_downstream = UNSET + else: + json_downstream = downstream + params["downstream"] = json_downstream + + json_processing_type: None | str | Unset + if isinstance(processing_type, Unset): + json_processing_type = UNSET + else: + json_processing_type = processing_type + params["processingType"] = json_processing_type + + json_status: list[str] | None | Unset + if isinstance(status, Unset): + json_status = UNSET + elif isinstance(status, list): + json_status = [] + for status_type_0_item_data in status: + status_type_0_item = status_type_0_item_data.value + json_status.append(status_type_0_item) + + else: + json_status = status + params["status"] = json_status + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/processing-jobs".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut | None: + if response.status_code == 200: + response_200 = PagedProcessingJobWithAutoProcProgramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut]: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut | None: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut]: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut | None: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + data_collection_id (int): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py b/src/lims_utils/expeye_client/api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py new file mode 100644 index 0000000..a64f915 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_comment_optional import DataCollectionCommentOptional +from ...models.data_collection_comment_out import DataCollectionCommentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + comment_id: int, + *, + body: DataCollectionCommentOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/data-collections/{data_collection_id}/comments/{comment_id}".format( + data_collection_id=quote(str(data_collection_id), safe=""), + comment_id=quote(str(comment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionCommentOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DataCollectionCommentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionCommentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + comment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentOptional, +) -> Response[DataCollectionCommentOut | HTTPValidationError]: + """Update Comment + + Update existing data collection comment + + Args: + data_collection_id (int): + comment_id (int): + body (DataCollectionCommentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionCommentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + comment_id=comment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + comment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentOptional, +) -> DataCollectionCommentOut | HTTPValidationError | None: + """Update Comment + + Update existing data collection comment + + Args: + data_collection_id (int): + comment_id (int): + body (DataCollectionCommentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionCommentOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + comment_id=comment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + comment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentOptional, +) -> Response[DataCollectionCommentOut | HTTPValidationError]: + """Update Comment + + Update existing data collection comment + + Args: + data_collection_id (int): + comment_id (int): + body (DataCollectionCommentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionCommentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + comment_id=comment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + comment_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionCommentOptional, +) -> DataCollectionCommentOut | HTTPValidationError | None: + """Update Comment + + Update existing data collection comment + + Args: + data_collection_id (int): + comment_id (int): + body (DataCollectionCommentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionCommentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + comment_id=comment_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py b/src/lims_utils/expeye_client/api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py new file mode 100644 index 0000000..3495bd0 --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_optional import DataCollectionOptional +from ...models.data_collection_out import DataCollectionOut +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + data_collection_id: int, + *, + body: DataCollectionOptional, + append_comment: bool | Unset = False, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["appendComment"] = append_comment + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/data-collections/{data_collection_id}".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DataCollectionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionOptional, + append_comment: bool | Unset = False, +) -> Response[DataCollectionOut | HTTPValidationError]: + """Update Data Collection + + Update data collection + + Args: + data_collection_id (int): + append_comment (bool | Unset): Default: False. + body (DataCollectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + append_comment=append_comment, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionOptional, + append_comment: bool | Unset = False, +) -> DataCollectionOut | HTTPValidationError | None: + """Update Data Collection + + Update data collection + + Args: + data_collection_id (int): + append_comment (bool | Unset): Default: False. + body (DataCollectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionOut | HTTPValidationError + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + append_comment=append_comment, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionOptional, + append_comment: bool | Unset = False, +) -> Response[DataCollectionOut | HTTPValidationError]: + """Update Data Collection + + Update data collection + + Args: + data_collection_id (int): + append_comment (bool | Unset): Default: False. + body (DataCollectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + append_comment=append_comment, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: DataCollectionOptional, + append_comment: bool | Unset = False, +) -> DataCollectionOut | HTTPValidationError | None: + """Update Data Collection + + Update data collection + + Args: + data_collection_id (int): + append_comment (bool | Unset): Default: False. + body (DataCollectionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + append_comment=append_comment, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/data_collections/update_position_data_collections_data_collection_id_position_patch.py b/src/lims_utils/expeye_client/api/data_collections/update_position_data_collections_data_collection_id_position_patch.py new file mode 100644 index 0000000..7ba2fec --- /dev/null +++ b/src/lims_utils/expeye_client/api/data_collections/update_position_data_collections_data_collection_id_position_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.position_optional import PositionOptional +from ...models.position_out import PositionOut +from ...types import Response + + +def _get_kwargs( + data_collection_id: int, + *, + body: PositionOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/data-collections/{data_collection_id}/position".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PositionOut | None: + if response.status_code == 200: + response_200 = PositionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionOptional, +) -> Response[HTTPValidationError | PositionOut]: + """Update Position + + Update data collection position + + Args: + data_collection_id (int): + body (PositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PositionOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionOptional, +) -> HTTPValidationError | PositionOut | None: + """Update Position + + Update data collection position + + Args: + data_collection_id (int): + body (PositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PositionOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionOptional, +) -> Response[HTTPValidationError | PositionOut]: + """Update Position + + Update data collection position + + Args: + data_collection_id (int): + body (PositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PositionOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + body: PositionOptional, +) -> HTTPValidationError | PositionOut | None: + """Update Position + + Update data collection position + + Args: + data_collection_id (int): + body (PositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PositionOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewar_registry/__init__.py b/src/lims_utils/expeye_client/api/dewar_registry/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewar_registry/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py b/src/lims_utils/expeye_client/api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py new file mode 100644 index 0000000..de26267 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_dewar_in import RegisteredDewarIn +from ...models.registered_dewar_out import RegisteredDewarOut +from ...types import Response + + +def _get_kwargs( + *, + body: RegisteredDewarIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/dewar-registry", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredDewarOut | None: + if response.status_code == 201: + response_201 = RegisteredDewarOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Create Dewar Registry Entry + + Create dewar registry entry + + Args: + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Create Dewar Registry Entry + + Create dewar registry entry + + Args: + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Create Dewar Registry Entry + + Create dewar registry entry + + Args: + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Create Dewar Registry Entry + + Create dewar registry entry + + Args: + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py b/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py new file mode 100644 index 0000000..68d59bb --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py @@ -0,0 +1,213 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_registered_dewar_out import PagedRegisteredDewarOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/dewar-registry", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedRegisteredDewarOut | None: + if response.status_code == 200: + response_200 = PagedRegisteredDewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedRegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredDewarOut]: + """Get Dewar Registry Entries + + Get dewar registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredDewarOut] + """ + + kwargs = _get_kwargs( + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredDewarOut | None: + """Get Dewar Registry Entries + + Get dewar registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredDewarOut + """ + + return sync_detailed( + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredDewarOut]: + """Get Dewar Registry Entries + + Get dewar registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredDewarOut] + """ + + kwargs = _get_kwargs( + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredDewarOut | None: + """Get Dewar Registry Entries + + Get dewar registry entries + + Args: + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredDewarOut + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py b/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py new file mode 100644 index 0000000..c01bb2e --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_dewar_out import RegisteredDewarOut +from ...types import Response + + +def _get_kwargs( + facility_code: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/dewar-registry/{facility_code}".format( + facility_code=quote(str(facility_code), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredDewarOut | None: + if response.status_code == 200: + response_200 = RegisteredDewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + facility_code: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + facility_code=facility_code, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + facility_code: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return sync_detailed( + facility_code=facility_code, + client=client, + ).parsed + + +async def asyncio_detailed( + facility_code: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + facility_code=facility_code, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + facility_code: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return ( + await asyncio_detailed( + facility_code=facility_code, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py b/src/lims_utils/expeye_client/api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py new file mode 100644 index 0000000..000f256 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_dewar_optional import RegisteredDewarOptional +from ...models.registered_dewar_out import RegisteredDewarOut +from ...types import Response + + +def _get_kwargs( + facility_code: str, + *, + body: RegisteredDewarOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/dewar-registry/{facility_code}".format( + facility_code=quote(str(facility_code), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredDewarOut | None: + if response.status_code == 200: + response_200 = RegisteredDewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + facility_code: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarOptional, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Update Dewar Registry Entry + + Update dewar registry entry information + + Args: + facility_code (str): + body (RegisteredDewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + facility_code=facility_code, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + facility_code: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarOptional, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Update Dewar Registry Entry + + Update dewar registry entry information + + Args: + facility_code (str): + body (RegisteredDewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return sync_detailed( + facility_code=facility_code, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + facility_code: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarOptional, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Update Dewar Registry Entry + + Update dewar registry entry information + + Args: + facility_code (str): + body (RegisteredDewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + facility_code=facility_code, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + facility_code: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarOptional, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Update Dewar Registry Entry + + Update dewar registry entry information + + Args: + facility_code (str): + body (RegisteredDewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return ( + await asyncio_detailed( + facility_code=facility_code, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/__init__.py b/src/lims_utils/expeye_client/api/dewars/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/dewars/create_container_dewars_dewar_id_containers_post.py b/src/lims_utils/expeye_client/api/dewars/create_container_dewars_dewar_id_containers_post.py new file mode 100644 index 0000000..cf07701 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/create_container_dewars_dewar_id_containers_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.container_in import ContainerIn +from ...models.container_out import ContainerOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + dewar_id: int, + *, + body: ContainerIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/dewars/{dewar_id}/containers".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> ContainerOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = ContainerOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[ContainerOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> Response[ContainerOut | HTTPValidationError]: + """Create Container + + Create new container + + Args: + dewar_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> ContainerOut | HTTPValidationError | None: + """Create Container + + Create new container + + Args: + dewar_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> Response[ContainerOut | HTTPValidationError]: + """Create Container + + Create new container + + Args: + dewar_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ContainerOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, + body: ContainerIn, +) -> ContainerOut | HTTPValidationError | None: + """Create Container + + Create new container + + Args: + dewar_id (int): + body (ContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ContainerOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py b/src/lims_utils/expeye_client/api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py new file mode 100644 index 0000000..f5bb9b7 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.dewar_transport_history_in import DewarTransportHistoryIn +from ...models.dewar_transport_history_out import DewarTransportHistoryOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + dewar_id: int, + *, + body: DewarTransportHistoryIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/dewars/{dewar_id}/history".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DewarTransportHistoryOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DewarTransportHistoryOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DewarTransportHistoryOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarTransportHistoryIn, +) -> Response[DewarTransportHistoryOut | HTTPValidationError]: + """Create Dewar History Entry + + Create dewar history entry + + Args: + dewar_id (int): + body (DewarTransportHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarTransportHistoryOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarTransportHistoryIn, +) -> DewarTransportHistoryOut | HTTPValidationError | None: + """Create Dewar History Entry + + Create dewar history entry + + Args: + dewar_id (int): + body (DewarTransportHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarTransportHistoryOut | HTTPValidationError + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarTransportHistoryIn, +) -> Response[DewarTransportHistoryOut | HTTPValidationError]: + """Create Dewar History Entry + + Create dewar history entry + + Args: + dewar_id (int): + body (DewarTransportHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarTransportHistoryOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarTransportHistoryIn, +) -> DewarTransportHistoryOut | HTTPValidationError | None: + """Create Dewar History Entry + + Create dewar history entry + + Args: + dewar_id (int): + body (DewarTransportHistoryIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarTransportHistoryOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/edit_dewar_dewars_dewar_id_patch.py b/src/lims_utils/expeye_client/api/dewars/edit_dewar_dewars_dewar_id_patch.py new file mode 100644 index 0000000..928df4e --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/edit_dewar_dewars_dewar_id_patch.py @@ -0,0 +1,214 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.dewar_optional import DewarOptional +from ...models.dewar_out import DewarOut +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + dewar_id: int, + *, + body: DewarOptional, + merge_json: bool | Unset = False, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["mergeJson"] = merge_json + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/dewars/{dewar_id}".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DewarOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DewarOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarOptional, + merge_json: bool | Unset = False, +) -> Response[DewarOut | HTTPValidationError]: + """Edit Dewar + + Edit dewar + + Args: + dewar_id (int): + merge_json (bool | Unset): Merge JSON in comments field instead of replacing Default: + False. + body (DewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + merge_json=merge_json, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarOptional, + merge_json: bool | Unset = False, +) -> DewarOut | HTTPValidationError | None: + """Edit Dewar + + Edit dewar + + Args: + dewar_id (int): + merge_json (bool | Unset): Merge JSON in comments field instead of replacing Default: + False. + body (DewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarOut | HTTPValidationError + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + body=body, + merge_json=merge_json, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarOptional, + merge_json: bool | Unset = False, +) -> Response[DewarOut | HTTPValidationError]: + """Edit Dewar + + Edit dewar + + Args: + dewar_id (int): + merge_json (bool | Unset): Merge JSON in comments field instead of replacing Default: + False. + body (DewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + merge_json=merge_json, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DewarOptional, + merge_json: bool | Unset = False, +) -> DewarOut | HTTPValidationError | None: + """Edit Dewar + + Edit dewar + + Args: + dewar_id (int): + merge_json (bool | Unset): Merge JSON in comments field instead of replacing Default: + False. + body (DewarOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + body=body, + merge_json=merge_json, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/get_dewar_dewars_dewar_id_get.py b/src/lims_utils/expeye_client/api/dewars/get_dewar_dewars_dewar_id_get.py new file mode 100644 index 0000000..dbd2c54 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/get_dewar_dewars_dewar_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.dewar_out import DewarOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + dewar_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/dewars/{dewar_id}".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DewarOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DewarOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, +) -> Response[DewarOut | HTTPValidationError]: + """Get Dewar + + Get dewar information + + Args: + dewar_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, +) -> DewarOut | HTTPValidationError | None: + """Get Dewar + + Get dewar information + + Args: + dewar_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarOut | HTTPValidationError + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, +) -> Response[DewarOut | HTTPValidationError]: + """Get Dewar + + Get dewar information + + Args: + dewar_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, +) -> DewarOut | HTTPValidationError | None: + """Get Dewar + + Get dewar information + + Args: + dewar_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/get_dewar_history_dewars_dewar_id_history_get.py b/src/lims_utils/expeye_client/api/dewars/get_dewar_history_dewars_dewar_id_history_get.py new file mode 100644 index 0000000..bb9d9d8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/get_dewar_history_dewars_dewar_id_history_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_dewar_transport_history_out import PagedDewarTransportHistoryOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + dewar_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/dewars/{dewar_id}/history".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDewarTransportHistoryOut | None: + if response.status_code == 200: + response_200 = PagedDewarTransportHistoryOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDewarTransportHistoryOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDewarTransportHistoryOut]: + """Get Dewar History + + Get dewar history + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDewarTransportHistoryOut] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDewarTransportHistoryOut | None: + """Get Dewar History + + Get dewar history + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDewarTransportHistoryOut + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDewarTransportHistoryOut]: + """Get Dewar History + + Get dewar history + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDewarTransportHistoryOut] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDewarTransportHistoryOut | None: + """Get Dewar History + + Get dewar history + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDewarTransportHistoryOut + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py new file mode 100644 index 0000000..09da8e1 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_diffraction_plan_out import PagedDiffractionPlanOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + dewar_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/dewars/{dewar_id}/diffraction-plans".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + if response.status_code == 200: + response_200 = PagedDiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + dewar_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py new file mode 100644 index 0000000..b79ea79 --- /dev/null +++ b/src/lims_utils/expeye_client/api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_optional import DiffractionPlanOptional +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_diffraction_plan_out import PagedDiffractionPlanOut +from ...types import Response + + +def _get_kwargs( + dewar_id: int, + *, + body: DiffractionPlanOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/dewars/{dewar_id}/diffraction-plans".format( + dewar_id=quote(str(dewar_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + if response.status_code == 200: + response_200 = PagedDiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + dewar_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + dewar_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return sync_detailed( + dewar_id=dewar_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + dewar_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + dewar_id=dewar_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + dewar_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + dewar_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return ( + await asyncio_detailed( + dewar_id=dewar_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/diffraction_plans/__init__.py b/src/lims_utils/expeye_client/api/diffraction_plans/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/diffraction_plans/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py b/src/lims_utils/expeye_client/api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py new file mode 100644 index 0000000..f1b6054 --- /dev/null +++ b/src/lims_utils/expeye_client/api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_optional import DiffractionPlanOptional +from ...models.diffraction_plan_out import DiffractionPlanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + diffraction_plan_id: int, + *, + body: DiffractionPlanOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/diffraction-plans/{diffraction_plan_id}".format( + diffraction_plan_id=quote(str(diffraction_plan_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DiffractionPlanOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DiffractionPlanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + diffraction_plan_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Update Diffraction Plan + + Update diffraction plan + + Args: + diffraction_plan_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + diffraction_plan_id=diffraction_plan_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + diffraction_plan_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Update Diffraction Plan + + Update diffraction plan + + Args: + diffraction_plan_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return sync_detailed( + diffraction_plan_id=diffraction_plan_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + diffraction_plan_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Update Diffraction Plan + + Update diffraction plan + + Args: + diffraction_plan_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + diffraction_plan_id=diffraction_plan_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + diffraction_plan_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Update Diffraction Plan + + Update diffraction plan + + Args: + diffraction_plan_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + diffraction_plan_id=diffraction_plan_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/energy_scans/__init__.py b/src/lims_utils/expeye_client/api/energy_scans/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/energy_scans/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py b/src/lims_utils/expeye_client/api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py new file mode 100644 index 0000000..b488f04 --- /dev/null +++ b/src/lims_utils/expeye_client/api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.energy_scan_out import EnergyScanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + energy_scan_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/energy-scans/{energy_scan_id}".format( + energy_scan_id=quote(str(energy_scan_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> EnergyScanOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EnergyScanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[EnergyScanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + energy_scan_id: int, + *, + client: AuthenticatedClient, +) -> Response[EnergyScanOut | HTTPValidationError]: + """Get Energy Scan + + Get energy scan + + Args: + energy_scan_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EnergyScanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + energy_scan_id=energy_scan_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + energy_scan_id: int, + *, + client: AuthenticatedClient, +) -> EnergyScanOut | HTTPValidationError | None: + """Get Energy Scan + + Get energy scan + + Args: + energy_scan_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EnergyScanOut | HTTPValidationError + """ + + return sync_detailed( + energy_scan_id=energy_scan_id, + client=client, + ).parsed + + +async def asyncio_detailed( + energy_scan_id: int, + *, + client: AuthenticatedClient, +) -> Response[EnergyScanOut | HTTPValidationError]: + """Get Energy Scan + + Get energy scan + + Args: + energy_scan_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EnergyScanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + energy_scan_id=energy_scan_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + energy_scan_id: int, + *, + client: AuthenticatedClient, +) -> EnergyScanOut | HTTPValidationError | None: + """Get Energy Scan + + Get energy scan + + Args: + energy_scan_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EnergyScanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + energy_scan_id=energy_scan_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py b/src/lims_utils/expeye_client/api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py new file mode 100644 index 0000000..e0c6553 --- /dev/null +++ b/src/lims_utils/expeye_client/api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.energy_scan_optional import EnergyScanOptional +from ...models.energy_scan_out import EnergyScanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + energy_scan_id: int, + *, + body: EnergyScanOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/energy-scans/{energy_scan_id}".format( + energy_scan_id=quote(str(energy_scan_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> EnergyScanOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = EnergyScanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[EnergyScanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + energy_scan_id: int, + *, + client: AuthenticatedClient, + body: EnergyScanOptional, +) -> Response[EnergyScanOut | HTTPValidationError]: + """Update Energy Scan + + Update existing energy scan + + Args: + energy_scan_id (int): + body (EnergyScanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EnergyScanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + energy_scan_id=energy_scan_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + energy_scan_id: int, + *, + client: AuthenticatedClient, + body: EnergyScanOptional, +) -> EnergyScanOut | HTTPValidationError | None: + """Update Energy Scan + + Update existing energy scan + + Args: + energy_scan_id (int): + body (EnergyScanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EnergyScanOut | HTTPValidationError + """ + + return sync_detailed( + energy_scan_id=energy_scan_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + energy_scan_id: int, + *, + client: AuthenticatedClient, + body: EnergyScanOptional, +) -> Response[EnergyScanOut | HTTPValidationError]: + """Update Energy Scan + + Update existing energy scan + + Args: + energy_scan_id (int): + body (EnergyScanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EnergyScanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + energy_scan_id=energy_scan_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + energy_scan_id: int, + *, + client: AuthenticatedClient, + body: EnergyScanOptional, +) -> EnergyScanOut | HTTPValidationError | None: + """Update Energy Scan + + Update existing energy scan + + Args: + energy_scan_id (int): + body (EnergyScanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EnergyScanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + energy_scan_id=energy_scan_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/fluorescence_spectrums/__init__.py b/src/lims_utils/expeye_client/api/fluorescence_spectrums/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/fluorescence_spectrums/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py b/src/lims_utils/expeye_client/api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py new file mode 100644 index 0000000..622d7c4 --- /dev/null +++ b/src/lims_utils/expeye_client/api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.fluorescence_spectrum_out import FluorescenceSpectrumOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + fluorescence_spectrum_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/fluorescence-spectrums/{fluorescence_spectrum_id}".format( + fluorescence_spectrum_id=quote(str(fluorescence_spectrum_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = FluorescenceSpectrumOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + """Get Fluorescence Spectrum + + Get fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FluorescenceSpectrumOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + fluorescence_spectrum_id=fluorescence_spectrum_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + """Get Fluorescence Spectrum + + Get fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FluorescenceSpectrumOut | HTTPValidationError + """ + + return sync_detailed( + fluorescence_spectrum_id=fluorescence_spectrum_id, + client=client, + ).parsed + + +async def asyncio_detailed( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + """Get Fluorescence Spectrum + + Get fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FluorescenceSpectrumOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + fluorescence_spectrum_id=fluorescence_spectrum_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + """Get Fluorescence Spectrum + + Get fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FluorescenceSpectrumOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + fluorescence_spectrum_id=fluorescence_spectrum_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py b/src/lims_utils/expeye_client/api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py new file mode 100644 index 0000000..abf9c5b --- /dev/null +++ b/src/lims_utils/expeye_client/api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.fluorescence_spectrum_optional import FluorescenceSpectrumOptional +from ...models.fluorescence_spectrum_out import FluorescenceSpectrumOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + fluorescence_spectrum_id: int, + *, + body: FluorescenceSpectrumOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/fluorescence-spectrums/{fluorescence_spectrum_id}".format( + fluorescence_spectrum_id=quote(str(fluorescence_spectrum_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = FluorescenceSpectrumOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumOptional, +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + """Update Fluorescence Spectrum + + Update existing fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + body (FluorescenceSpectrumOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FluorescenceSpectrumOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + fluorescence_spectrum_id=fluorescence_spectrum_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumOptional, +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + """Update Fluorescence Spectrum + + Update existing fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + body (FluorescenceSpectrumOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FluorescenceSpectrumOut | HTTPValidationError + """ + + return sync_detailed( + fluorescence_spectrum_id=fluorescence_spectrum_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumOptional, +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + """Update Fluorescence Spectrum + + Update existing fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + body (FluorescenceSpectrumOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FluorescenceSpectrumOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + fluorescence_spectrum_id=fluorescence_spectrum_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + fluorescence_spectrum_id: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumOptional, +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + """Update Fluorescence Spectrum + + Update existing fluorescence spectrum params + + Args: + fluorescence_spectrum_id (int): + body (FluorescenceSpectrumOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FluorescenceSpectrumOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + fluorescence_spectrum_id=fluorescence_spectrum_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/__init__.py b/src/lims_utils/expeye_client/api/grid_squares/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py b/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py new file mode 100644 index 0000000..91bfbf6 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_foil_hole_out import PagedFoilHoleOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + grid_square_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/grid-squares/{grid_square_id}/foil-holes".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedFoilHoleOut | None: + if response.status_code == 200: + response_200 = PagedFoilHoleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedFoilHoleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFoilHoleOut]: + """Get Grid Square Foil Holes + + Get foil holes for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFoilHoleOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFoilHoleOut | None: + """Get Grid Square Foil Holes + + Get foil holes for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFoilHoleOut + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFoilHoleOut]: + """Get Grid Square Foil Holes + + Get foil holes for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFoilHoleOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFoilHoleOut | None: + """Get Grid Square Foil Holes + + Get foil holes for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFoilHoleOut + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py b/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py new file mode 100644 index 0000000..d104967 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.grid_square_out import GridSquareOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + grid_square_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/grid-squares/{grid_square_id}".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> GridSquareOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = GridSquareOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[GridSquareOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, +) -> Response[GridSquareOut | HTTPValidationError]: + """Get Grid Square + + Get a specific grid square + + Args: + grid_square_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GridSquareOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, +) -> GridSquareOut | HTTPValidationError | None: + """Get Grid Square + + Get a specific grid square + + Args: + grid_square_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GridSquareOut | HTTPValidationError + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, +) -> Response[GridSquareOut | HTTPValidationError]: + """Get Grid Square + + Get a specific grid square + + Args: + grid_square_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GridSquareOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, +) -> GridSquareOut | HTTPValidationError | None: + """Get Grid Square + + Get a specific grid square + + Args: + grid_square_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GridSquareOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py b/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py new file mode 100644 index 0000000..0ae2be5 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_milling_step_out import PagedMillingStepOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + grid_square_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/grid-squares/{grid_square_id}/milling-steps".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedMillingStepOut | None: + if response.status_code == 200: + response_200 = PagedMillingStepOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedMillingStepOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedMillingStepOut]: + """Get Grid Square Milling Steps + + Get milling steps for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedMillingStepOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedMillingStepOut | None: + """Get Grid Square Milling Steps + + Get milling steps for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedMillingStepOut + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedMillingStepOut]: + """Get Grid Square Milling Steps + + Get milling steps for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedMillingStepOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedMillingStepOut | None: + """Get Grid Square Milling Steps + + Get milling steps for a grid square + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedMillingStepOut + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py b/src/lims_utils/expeye_client/api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py new file mode 100644 index 0000000..2a6a458 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_tomogram_out import PagedTomogramOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + grid_square_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/grid-squares/{grid_square_id}/tomograms".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedTomogramOut | None: + if response.status_code == 200: + response_200 = PagedTomogramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedTomogramOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedTomogramOut]: + """Get Tomograms + + Get tomograms in a search map + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedTomogramOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedTomogramOut | None: + """Get Tomograms + + Get tomograms in a search map + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedTomogramOut + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedTomogramOut]: + """Get Tomograms + + Get tomograms in a search map + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedTomogramOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedTomogramOut | None: + """Get Tomograms + + Get tomograms in a search map + + Args: + grid_square_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedTomogramOut + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py b/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py new file mode 100644 index 0000000..985e8d3 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.foil_hole_in import FoilHoleIn +from ...models.foil_hole_out import FoilHoleOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + grid_square_id: int, + *, + body: list[FoilHoleIn], +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/grid-squares/{grid_square_id}/foil-holes".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[FoilHoleOut] | None: + if response.status_code == 201: + response_201 = [] + _response_201 = response.json() + for response_201_item_data in _response_201: + response_201_item = FoilHoleOut.from_dict(response_201_item_data) + + response_201.append(response_201_item) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[FoilHoleOut]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleIn], +) -> Response[HTTPValidationError | list[FoilHoleOut]]: + """Post Grid Square Foil Holes + + Create foil holes for a grid square + + Args: + grid_square_id (int): + body (list[FoilHoleIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[FoilHoleOut]] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleIn], +) -> HTTPValidationError | list[FoilHoleOut] | None: + """Post Grid Square Foil Holes + + Create foil holes for a grid square + + Args: + grid_square_id (int): + body (list[FoilHoleIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[FoilHoleOut] + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleIn], +) -> Response[HTTPValidationError | list[FoilHoleOut]]: + """Post Grid Square Foil Holes + + Create foil holes for a grid square + + Args: + grid_square_id (int): + body (list[FoilHoleIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[FoilHoleOut]] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleIn], +) -> HTTPValidationError | list[FoilHoleOut] | None: + """Post Grid Square Foil Holes + + Create foil holes for a grid square + + Args: + grid_square_id (int): + body (list[FoilHoleIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[FoilHoleOut] + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py b/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py new file mode 100644 index 0000000..0d5b061 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.milling_step_in import MillingStepIn +from ...models.milling_step_out import MillingStepOut +from ...types import Response + + +def _get_kwargs( + grid_square_id: int, + *, + body: list[MillingStepIn], +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/grid-squares/{grid_square_id}/milling-steps".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[MillingStepOut] | None: + if response.status_code == 201: + response_201 = [] + _response_201 = response.json() + for response_201_item_data in _response_201: + response_201_item = MillingStepOut.from_dict(response_201_item_data) + + response_201.append(response_201_item) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[MillingStepOut]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[MillingStepIn], +) -> Response[HTTPValidationError | list[MillingStepOut]]: + """Post Grid Square Milling Steps + + Create milling steps for a grid square + + Args: + grid_square_id (int): + body (list[MillingStepIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[MillingStepOut]] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[MillingStepIn], +) -> HTTPValidationError | list[MillingStepOut] | None: + """Post Grid Square Milling Steps + + Create milling steps for a grid square + + Args: + grid_square_id (int): + body (list[MillingStepIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[MillingStepOut] + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[MillingStepIn], +) -> Response[HTTPValidationError | list[MillingStepOut]]: + """Post Grid Square Milling Steps + + Create milling steps for a grid square + + Args: + grid_square_id (int): + body (list[MillingStepIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[MillingStepOut]] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[MillingStepIn], +) -> HTTPValidationError | list[MillingStepOut] | None: + """Post Grid Square Milling Steps + + Create milling steps for a grid square + + Args: + grid_square_id (int): + body (list[MillingStepIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[MillingStepOut] + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py b/src/lims_utils/expeye_client/api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py new file mode 100644 index 0000000..f7a558d --- /dev/null +++ b/src/lims_utils/expeye_client/api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.foil_hole_optional_with_id import FoilHoleOptionalWithId +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_foil_hole_out import PagedFoilHoleOut +from ...types import Response + + +def _get_kwargs( + grid_square_id: int, + *, + body: list[FoilHoleOptionalWithId], +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/grid-squares/{grid_square_id}/foil-holes".format( + grid_square_id=quote(str(grid_square_id), safe=""), + ), + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedFoilHoleOut | None: + if response.status_code == 200: + response_200 = PagedFoilHoleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedFoilHoleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleOptionalWithId], +) -> Response[HTTPValidationError | PagedFoilHoleOut]: + """Update Foil Holes In Grid Square + + Update multiple foil holes in grid square + + Args: + grid_square_id (int): + body (list[FoilHoleOptionalWithId]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFoilHoleOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleOptionalWithId], +) -> HTTPValidationError | PagedFoilHoleOut | None: + """Update Foil Holes In Grid Square + + Update multiple foil holes in grid square + + Args: + grid_square_id (int): + body (list[FoilHoleOptionalWithId]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFoilHoleOut + """ + + return sync_detailed( + grid_square_id=grid_square_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleOptionalWithId], +) -> Response[HTTPValidationError | PagedFoilHoleOut]: + """Update Foil Holes In Grid Square + + Update multiple foil holes in grid square + + Args: + grid_square_id (int): + body (list[FoilHoleOptionalWithId]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFoilHoleOut] + """ + + kwargs = _get_kwargs( + grid_square_id=grid_square_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_square_id: int, + *, + client: AuthenticatedClient, + body: list[FoilHoleOptionalWithId], +) -> HTTPValidationError | PagedFoilHoleOut | None: + """Update Foil Holes In Grid Square + + Update multiple foil holes in grid square + + Args: + grid_square_id (int): + body (list[FoilHoleOptionalWithId]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFoilHoleOut + """ + + return ( + await asyncio_detailed( + grid_square_id=grid_square_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/grids/__init__.py b/src/lims_utils/expeye_client/api/grids/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grids/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/grids/update_grid_grids_grid_info_id_patch.py b/src/lims_utils/expeye_client/api/grids/update_grid_grids_grid_info_id_patch.py new file mode 100644 index 0000000..a266a83 --- /dev/null +++ b/src/lims_utils/expeye_client/api/grids/update_grid_grids_grid_info_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.grid_info_optional import GridInfoOptional +from ...models.grid_info_out import GridInfoOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + grid_info_id: int, + *, + body: GridInfoOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/grids/{grid_info_id}".format( + grid_info_id=quote(str(grid_info_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> GridInfoOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = GridInfoOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[GridInfoOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + grid_info_id: int, + *, + client: AuthenticatedClient, + body: GridInfoOptional, +) -> Response[GridInfoOut | HTTPValidationError]: + """Update Grid + + Update grid + + Args: + grid_info_id (int): + body (GridInfoOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GridInfoOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + grid_info_id=grid_info_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + grid_info_id: int, + *, + client: AuthenticatedClient, + body: GridInfoOptional, +) -> GridInfoOut | HTTPValidationError | None: + """Update Grid + + Update grid + + Args: + grid_info_id (int): + body (GridInfoOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GridInfoOut | HTTPValidationError + """ + + return sync_detailed( + grid_info_id=grid_info_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + grid_info_id: int, + *, + client: AuthenticatedClient, + body: GridInfoOptional, +) -> Response[GridInfoOut | HTTPValidationError]: + """Update Grid + + Update grid + + Args: + grid_info_id (int): + body (GridInfoOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[GridInfoOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + grid_info_id=grid_info_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + grid_info_id: int, + *, + client: AuthenticatedClient, + body: GridInfoOptional, +) -> GridInfoOut | HTTPValidationError | None: + """Update Grid + + Update grid + + Args: + grid_info_id (int): + body (GridInfoOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + GridInfoOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + grid_info_id=grid_info_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ligands/__init__.py b/src/lims_utils/expeye_client/api/ligands/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/ligands/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py b/src/lims_utils/expeye_client/api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py new file mode 100644 index 0000000..8f3062f --- /dev/null +++ b/src/lims_utils/expeye_client/api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.pdb_ligand_out import PDBLigandOut +from ...types import Response + + +def _get_kwargs( + ligand_id: int, + pdb_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ligands/{ligand_id}/pdb-entries/{pdb_id}".format( + ligand_id=quote(str(ligand_id), safe=""), + pdb_id=quote(str(pdb_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PDBLigandOut | None: + if response.status_code == 201: + response_201 = PDBLigandOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PDBLigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ligand_id: int, + pdb_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PDBLigandOut]: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + ligand_id (int): + pdb_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PDBLigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + pdb_id=pdb_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ligand_id: int, + pdb_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PDBLigandOut | None: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + ligand_id (int): + pdb_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PDBLigandOut + """ + + return sync_detailed( + ligand_id=ligand_id, + pdb_id=pdb_id, + client=client, + ).parsed + + +async def asyncio_detailed( + ligand_id: int, + pdb_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PDBLigandOut]: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + ligand_id (int): + pdb_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PDBLigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + pdb_id=pdb_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ligand_id: int, + pdb_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PDBLigandOut | None: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + ligand_id (int): + pdb_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PDBLigandOut + """ + + return ( + await asyncio_detailed( + ligand_id=ligand_id, + pdb_id=pdb_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py b/src/lims_utils/expeye_client/api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py new file mode 100644 index 0000000..5d5ab1a --- /dev/null +++ b/src/lims_utils/expeye_client/api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_ligand_out import SampleLigandOut +from ...types import Response + + +def _get_kwargs( + ligand_id: int, + sample_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/ligands/{ligand_id}/samples/{sample_id}".format( + ligand_id=quote(str(ligand_id), safe=""), + sample_id=quote(str(sample_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleLigandOut | None: + if response.status_code == 201: + response_201 = SampleLigandOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleLigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ligand_id: int, + sample_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleLigandOut]: + """Create Sample Ligand + + Link a sample to a ligand + + Args: + ligand_id (int): + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleLigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + sample_id=sample_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ligand_id: int, + sample_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleLigandOut | None: + """Create Sample Ligand + + Link a sample to a ligand + + Args: + ligand_id (int): + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleLigandOut + """ + + return sync_detailed( + ligand_id=ligand_id, + sample_id=sample_id, + client=client, + ).parsed + + +async def asyncio_detailed( + ligand_id: int, + sample_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleLigandOut]: + """Create Sample Ligand + + Link a sample to a ligand + + Args: + ligand_id (int): + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleLigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + sample_id=sample_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ligand_id: int, + sample_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleLigandOut | None: + """Create Sample Ligand + + Link a sample to a ligand + + Args: + ligand_id (int): + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleLigandOut + """ + + return ( + await asyncio_detailed( + ligand_id=ligand_id, + sample_id=sample_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ligands/edit_ligand_ligands_ligand_id_patch.py b/src/lims_utils/expeye_client/api/ligands/edit_ligand_ligands_ligand_id_patch.py new file mode 100644 index 0000000..03b3897 --- /dev/null +++ b/src/lims_utils/expeye_client/api/ligands/edit_ligand_ligands_ligand_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.ligand_optional import LigandOptional +from ...models.ligand_out import LigandOut +from ...types import Response + + +def _get_kwargs( + ligand_id: int, + *, + body: LigandOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/ligands/{ligand_id}".format( + ligand_id=quote(str(ligand_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LigandOut | None: + if response.status_code == 200: + response_200 = LigandOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ligand_id: int, + *, + client: AuthenticatedClient, + body: LigandOptional, +) -> Response[HTTPValidationError | LigandOut]: + """Edit Ligand + + Edit single ligand + + Args: + ligand_id (int): + body (LigandOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ligand_id: int, + *, + client: AuthenticatedClient, + body: LigandOptional, +) -> HTTPValidationError | LigandOut | None: + """Edit Ligand + + Edit single ligand + + Args: + ligand_id (int): + body (LigandOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LigandOut + """ + + return sync_detailed( + ligand_id=ligand_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + ligand_id: int, + *, + client: AuthenticatedClient, + body: LigandOptional, +) -> Response[HTTPValidationError | LigandOut]: + """Edit Ligand + + Edit single ligand + + Args: + ligand_id (int): + body (LigandOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ligand_id: int, + *, + client: AuthenticatedClient, + body: LigandOptional, +) -> HTTPValidationError | LigandOut | None: + """Edit Ligand + + Edit single ligand + + Args: + ligand_id (int): + body (LigandOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LigandOut + """ + + return ( + await asyncio_detailed( + ligand_id=ligand_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ligands/get_ligand_ligands_ligand_id_get.py b/src/lims_utils/expeye_client/api/ligands/get_ligand_ligands_ligand_id_get.py new file mode 100644 index 0000000..2145e74 --- /dev/null +++ b/src/lims_utils/expeye_client/api/ligands/get_ligand_ligands_ligand_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.ligand_out import LigandOut +from ...types import Response + + +def _get_kwargs( + ligand_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/ligands/{ligand_id}".format( + ligand_id=quote(str(ligand_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LigandOut | None: + if response.status_code == 200: + response_200 = LigandOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ligand_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | LigandOut]: + """Get Ligand + + Get ligand by ligandId + + Args: + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ligand_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | LigandOut | None: + """Get Ligand + + Get ligand by ligandId + + Args: + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LigandOut + """ + + return sync_detailed( + ligand_id=ligand_id, + client=client, + ).parsed + + +async def asyncio_detailed( + ligand_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | LigandOut]: + """Get Ligand + + Get ligand by ligandId + + Args: + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LigandOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ligand_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | LigandOut | None: + """Get Ligand + + Get ligand by ligandId + + Args: + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LigandOut + """ + + return ( + await asyncio_detailed( + ligand_id=ligand_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py b/src/lims_utils/expeye_client/api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py new file mode 100644 index 0000000..f7ebffc --- /dev/null +++ b/src/lims_utils/expeye_client/api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py @@ -0,0 +1,249 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_pdb_out import PagedPDBOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + ligand_id: int, + *, + name: None | str | Unset = UNSET, + code: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_name: None | str | Unset + if isinstance(name, Unset): + json_name = UNSET + else: + json_name = name + params["name"] = json_name + + json_code: None | str | Unset + if isinstance(code, Unset): + json_code = UNSET + else: + json_code = code + params["code"] = json_code + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/ligands/{ligand_id}/pdb-entries".format( + ligand_id=quote(str(ligand_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedPDBOut | None: + if response.status_code == 200: + response_200 = PagedPDBOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedPDBOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + ligand_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + code: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPDBOut]: + """Get Ligand Pdbs + + Get ligand PDB entries + + Args: + ligand_id (int): + name (None | str | Unset): + code (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPDBOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + name=name, + code=code, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + ligand_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + code: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPDBOut | None: + """Get Ligand Pdbs + + Get ligand PDB entries + + Args: + ligand_id (int): + name (None | str | Unset): + code (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPDBOut + """ + + return sync_detailed( + ligand_id=ligand_id, + client=client, + name=name, + code=code, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + ligand_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + code: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPDBOut]: + """Get Ligand Pdbs + + Get ligand PDB entries + + Args: + ligand_id (int): + name (None | str | Unset): + code (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPDBOut] + """ + + kwargs = _get_kwargs( + ligand_id=ligand_id, + name=name, + code=code, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + ligand_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + code: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPDBOut | None: + """Get Ligand Pdbs + + Get ligand PDB entries + + Args: + ligand_id (int): + name (None | str | Unset): + code (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPDBOut + """ + + return ( + await asyncio_detailed( + ligand_id=ligand_id, + client=client, + name=name, + code=code, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/meta/__init__.py b/src/lims_utils/expeye_client/api/meta/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/meta/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/meta/get_version_version_get.py b/src/lims_utils/expeye_client/api/meta/get_version_version_get.py new file mode 100644 index 0000000..57d6f40 --- /dev/null +++ b/src/lims_utils/expeye_client/api/meta/get_version_version_get.py @@ -0,0 +1,85 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/version", + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx2.Response) -> Any | None: + if response.status_code == 200: + return None + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx2.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any]: + """Get Version + + Get the current version of the API + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[Any]: + """Get Version + + Get the current version of the API + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/src/lims_utils/expeye_client/api/motion/__init__.py b/src/lims_utils/expeye_client/api/motion/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/motion/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py b/src/lims_utils/expeye_client/api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py new file mode 100644 index 0000000..8fd2d08 --- /dev/null +++ b/src/lims_utils/expeye_client/api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.ctf_in import CTFIn +from ...models.ctf_out import CTFOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + motion_correction_id: int, + *, + body: CTFIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/motion-correction/{motion_correction_id}/ctf".format( + motion_correction_id=quote(str(motion_correction_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> CTFOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = CTFOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[CTFOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: CTFIn, +) -> Response[CTFOut | HTTPValidationError]: + """Create Ctf + + Create a CTF record + + Args: + motion_correction_id (int): + body (CTFIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CTFOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + motion_correction_id=motion_correction_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: CTFIn, +) -> CTFOut | HTTPValidationError | None: + """Create Ctf + + Create a CTF record + + Args: + motion_correction_id (int): + body (CTFIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CTFOut | HTTPValidationError + """ + + return sync_detailed( + motion_correction_id=motion_correction_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: CTFIn, +) -> Response[CTFOut | HTTPValidationError]: + """Create Ctf + + Create a CTF record + + Args: + motion_correction_id (int): + body (CTFIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CTFOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + motion_correction_id=motion_correction_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: CTFIn, +) -> CTFOut | HTTPValidationError | None: + """Create Ctf + + Create a CTF record + + Args: + motion_correction_id (int): + body (CTFIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CTFOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + motion_correction_id=motion_correction_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py b/src/lims_utils/expeye_client/api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py new file mode 100644 index 0000000..bccc5de --- /dev/null +++ b/src/lims_utils/expeye_client/api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + motion_correction_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/motion-correction/{motion_correction_id}".format( + motion_correction_id=quote(str(motion_correction_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 200: + response_200 = response.json() + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + motion_correction_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Motion Correction + + Delete a movie, motion correction, CTF and optional tilt alignment bundle for a data collection. + + Args: + motion_correction_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + motion_correction_id=motion_correction_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + motion_correction_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Motion Correction + + Delete a movie, motion correction, CTF and optional tilt alignment bundle for a data collection. + + Args: + motion_correction_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + motion_correction_id=motion_correction_id, + client=client, + ).parsed + + +async def asyncio_detailed( + motion_correction_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Motion Correction + + Delete a movie, motion correction, CTF and optional tilt alignment bundle for a data collection. + + Args: + motion_correction_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + motion_correction_id=motion_correction_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + motion_correction_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Motion Correction + + Delete a movie, motion correction, CTF and optional tilt alignment bundle for a data collection. + + Args: + motion_correction_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + motion_correction_id=motion_correction_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py b/src/lims_utils/expeye_client/api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py new file mode 100644 index 0000000..20aced9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_full_movie_out import PagedFullMovieOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + data_collection_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/data-collections/{data_collection_id}/motion-correction".format( + data_collection_id=quote(str(data_collection_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedFullMovieOut | None: + if response.status_code == 200: + response_200 = PagedFullMovieOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedFullMovieOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFullMovieOut]: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + data_collection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFullMovieOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + data_collection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFullMovieOut | None: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + data_collection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFullMovieOut + """ + + return sync_detailed( + data_collection_id=data_collection_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + data_collection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFullMovieOut]: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + data_collection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFullMovieOut] + """ + + kwargs = _get_kwargs( + data_collection_id=data_collection_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + data_collection_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFullMovieOut | None: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + data_collection_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFullMovieOut + """ + + return ( + await asyncio_detailed( + data_collection_id=data_collection_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py b/src/lims_utils/expeye_client/api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py new file mode 100644 index 0000000..8b2ca43 --- /dev/null +++ b/src/lims_utils/expeye_client/api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py @@ -0,0 +1,198 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.full_movie_optional import FullMovieOptional +from ...models.full_movie_out import FullMovieOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + motion_correction_id: int, + *, + body: FullMovieOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/motion-correction/{motion_correction_id}".format( + motion_correction_id=quote(str(motion_correction_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> FullMovieOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = FullMovieOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[FullMovieOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: FullMovieOptional, +) -> Response[FullMovieOut | HTTPValidationError]: + """Update Motion Correction + + Update a movie, motion correction, CTF and optional tilt alignment bundle. + Omit TiltImageAlignment to leave alignments unchanged. + Setting TiltImageAlignment to null deletes the alignment. + + Args: + motion_correction_id (int): + body (FullMovieOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FullMovieOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + motion_correction_id=motion_correction_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: FullMovieOptional, +) -> FullMovieOut | HTTPValidationError | None: + """Update Motion Correction + + Update a movie, motion correction, CTF and optional tilt alignment bundle. + Omit TiltImageAlignment to leave alignments unchanged. + Setting TiltImageAlignment to null deletes the alignment. + + Args: + motion_correction_id (int): + body (FullMovieOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FullMovieOut | HTTPValidationError + """ + + return sync_detailed( + motion_correction_id=motion_correction_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: FullMovieOptional, +) -> Response[FullMovieOut | HTTPValidationError]: + """Update Motion Correction + + Update a movie, motion correction, CTF and optional tilt alignment bundle. + Omit TiltImageAlignment to leave alignments unchanged. + Setting TiltImageAlignment to null deletes the alignment. + + Args: + motion_correction_id (int): + body (FullMovieOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FullMovieOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + motion_correction_id=motion_correction_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + motion_correction_id: int, + *, + client: AuthenticatedClient, + body: FullMovieOptional, +) -> FullMovieOut | HTTPValidationError | None: + """Update Motion Correction + + Update a movie, motion correction, CTF and optional tilt alignment bundle. + Omit TiltImageAlignment to leave alignments unchanged. + Setting TiltImageAlignment to null deletes the alignment. + + Args: + motion_correction_id (int): + body (FullMovieOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FullMovieOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + motion_correction_id=motion_correction_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/mx_lims_shipments/__init__.py b/src/lims_utils/expeye_client/api/mx_lims_shipments/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/mx_lims_shipments/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py b/src/lims_utils/expeye_client/api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py new file mode 100644 index 0000000..d04ec35 --- /dev/null +++ b/src/lims_utils/expeye_client/api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py @@ -0,0 +1,172 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.mx_lims_full_shipment import MxLimsFullShipment +from ...types import Response + + +def _get_kwargs( + *, + body: MxLimsFullShipment, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/mxlims/shipments", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 201: + response_201 = response.json() + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: MxLimsFullShipment, +) -> Response[Any | HTTPValidationError]: + """Create Auto Proc Attachment + + Create shipment using MX LIMS standard JSON format + + Args: + body (MxLimsFullShipment): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: MxLimsFullShipment, +) -> Any | HTTPValidationError | None: + """Create Auto Proc Attachment + + Create shipment using MX LIMS standard JSON format + + Args: + body (MxLimsFullShipment): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: MxLimsFullShipment, +) -> Response[Any | HTTPValidationError]: + """Create Auto Proc Attachment + + Create shipment using MX LIMS standard JSON format + + Args: + body (MxLimsFullShipment): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: MxLimsFullShipment, +) -> Any | HTTPValidationError | None: + """Create Auto Proc Attachment + + Create shipment using MX LIMS standard JSON format + + Args: + body (MxLimsFullShipment): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/pdb_entries/__init__.py b/src/lims_utils/expeye_client/api/pdb_entries/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/pdb_entries/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py b/src/lims_utils/expeye_client/api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py new file mode 100644 index 0000000..aa87549 --- /dev/null +++ b/src/lims_utils/expeye_client/api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.pdb_ligand_out import PDBLigandOut +from ...types import Response + + +def _get_kwargs( + pdb_id: int, + ligand_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/pdb-entries/{pdb_id}/ligands/{ligand_id}".format( + pdb_id=quote(str(pdb_id), safe=""), + ligand_id=quote(str(ligand_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PDBLigandOut | None: + if response.status_code == 201: + response_201 = PDBLigandOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PDBLigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + pdb_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PDBLigandOut]: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + pdb_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PDBLigandOut] + """ + + kwargs = _get_kwargs( + pdb_id=pdb_id, + ligand_id=ligand_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + pdb_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PDBLigandOut | None: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + pdb_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PDBLigandOut + """ + + return sync_detailed( + pdb_id=pdb_id, + ligand_id=ligand_id, + client=client, + ).parsed + + +async def asyncio_detailed( + pdb_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PDBLigandOut]: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + pdb_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PDBLigandOut] + """ + + kwargs = _get_kwargs( + pdb_id=pdb_id, + ligand_id=ligand_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + pdb_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PDBLigandOut | None: + """Create Pdb Ligand + + Link a PDB entry to a ligand + + Args: + pdb_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PDBLigandOut + """ + + return ( + await asyncio_detailed( + pdb_id=pdb_id, + ligand_id=ligand_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py b/src/lims_utils/expeye_client/api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py new file mode 100644 index 0000000..99d909b --- /dev/null +++ b/src/lims_utils/expeye_client/api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_ligand_out import PagedLigandOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + pdb_id: int, + *, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_name: None | str | Unset + if isinstance(name, Unset): + json_name = UNSET + else: + json_name = name + params["name"] = json_name + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/pdb-entries/{pdb_id}/ligands".format( + pdb_id=quote(str(pdb_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedLigandOut | None: + if response.status_code == 200: + response_200 = PagedLigandOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedLigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + pdb_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedLigandOut]: + """Get Pdb Ligands + + Get ligands for PDB entry + + Args: + pdb_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedLigandOut] + """ + + kwargs = _get_kwargs( + pdb_id=pdb_id, + name=name, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + pdb_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedLigandOut | None: + """Get Pdb Ligands + + Get ligands for PDB entry + + Args: + pdb_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedLigandOut + """ + + return sync_detailed( + pdb_id=pdb_id, + client=client, + name=name, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + pdb_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedLigandOut]: + """Get Pdb Ligands + + Get ligands for PDB entry + + Args: + pdb_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedLigandOut] + """ + + kwargs = _get_kwargs( + pdb_id=pdb_id, + name=name, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + pdb_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedLigandOut | None: + """Get Pdb Ligands + + Get ligands for PDB entry + + Args: + pdb_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedLigandOut + """ + + return ( + await asyncio_detailed( + pdb_id=pdb_id, + client=client, + name=name, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/persons/__init__.py b/src/lims_utils/expeye_client/api/persons/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/persons/create_person_persons_post.py b/src/lims_utils/expeye_client/api/persons/create_person_persons_post.py new file mode 100644 index 0000000..e539dfc --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/create_person_persons_post.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.person_in import PersonIn +from ...models.person_out import PersonOut +from ...types import Response + + +def _get_kwargs( + *, + body: PersonIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/persons", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PersonOut | None: + if response.status_code == 201: + response_201 = PersonOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: PersonIn, +) -> Response[HTTPValidationError | PersonOut]: + """Create Person + + Create new person + + Args: + body (PersonIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PersonOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: PersonIn, +) -> HTTPValidationError | PersonOut | None: + """Create Person + + Create new person + + Args: + body (PersonIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PersonOut + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: PersonIn, +) -> Response[HTTPValidationError | PersonOut]: + """Create Person + + Create new person + + Args: + body (PersonIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PersonOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: PersonIn, +) -> HTTPValidationError | PersonOut | None: + """Create Person + + Create new person + + Args: + body (PersonIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PersonOut + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/persons/delete_person_persons_person_id_delete.py b/src/lims_utils/expeye_client/api/persons/delete_person_persons_person_id_delete.py new file mode 100644 index 0000000..8fe367a --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/delete_person_persons_person_id_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + person_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/persons/{person_id}".format( + person_id=quote(str(person_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + person_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Person + + Delete person + + Args: + person_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + person_id=person_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + person_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Person + + Delete person + + Args: + person_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + person_id=person_id, + client=client, + ).parsed + + +async def asyncio_detailed( + person_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Person + + Delete person + + Args: + person_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + person_id=person_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + person_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Person + + Delete person + + Args: + person_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + person_id=person_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/persons/get_person_persons_person_id_get.py b/src/lims_utils/expeye_client/api/persons/get_person_persons_person_id_get.py new file mode 100644 index 0000000..ec34991 --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/get_person_persons_person_id_get.py @@ -0,0 +1,170 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.person_out import PersonOut +from ...types import Response + + +def _get_kwargs( + person_id: int | UUID, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/persons/{person_id}".format( + person_id=quote(str(person_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PersonOut | None: + if response.status_code == 200: + response_200 = PersonOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + person_id: int | UUID, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PersonOut]: + """Get Person + + Get person + + Args: + person_id (int | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PersonOut] + """ + + kwargs = _get_kwargs( + person_id=person_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + person_id: int | UUID, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PersonOut | None: + """Get Person + + Get person + + Args: + person_id (int | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PersonOut + """ + + return sync_detailed( + person_id=person_id, + client=client, + ).parsed + + +async def asyncio_detailed( + person_id: int | UUID, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | PersonOut]: + """Get Person + + Get person + + Args: + person_id (int | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PersonOut] + """ + + kwargs = _get_kwargs( + person_id=person_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + person_id: int | UUID, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | PersonOut | None: + """Get Person + + Get person + + Args: + person_id (int | UUID): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PersonOut + """ + + return ( + await asyncio_detailed( + person_id=person_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/persons/get_persons_persons_get.py b/src/lims_utils/expeye_client/api/persons/get_persons_persons_get.py new file mode 100644 index 0000000..5ae9659 --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/get_persons_persons_get.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_person_out import PagedPersonOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + include_missing_email: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + params["includeMissingEmail"] = include_missing_email + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/persons", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedPersonOut | None: + if response.status_code == 200: + response_200 = PagedPersonOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedPersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + search: str | Unset = "", + include_missing_email: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPersonOut]: + """Get Persons + + Get persons + + Args: + search (str | Unset): Default: ''. + include_missing_email (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + search=search, + include_missing_email=include_missing_email, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + search: str | Unset = "", + include_missing_email: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPersonOut | None: + """Get Persons + + Get persons + + Args: + search (str | Unset): Default: ''. + include_missing_email (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return sync_detailed( + client=client, + search=search, + include_missing_email=include_missing_email, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + search: str | Unset = "", + include_missing_email: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPersonOut]: + """Get Persons + + Get persons + + Args: + search (str | Unset): Default: ''. + include_missing_email (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + search=search, + include_missing_email=include_missing_email, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + search: str | Unset = "", + include_missing_email: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPersonOut | None: + """Get Persons + + Get persons + + Args: + search (str | Unset): Default: ''. + include_missing_email (bool | Unset): Default: False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + include_missing_email=include_missing_email, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/persons/get_usergroups_persons_person_id_user_groups_get.py b/src/lims_utils/expeye_client/api/persons/get_usergroups_persons_person_id_user_groups_get.py new file mode 100644 index 0000000..7af643e --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/get_usergroups_persons_person_id_user_groups_get.py @@ -0,0 +1,210 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_user_group_out import PagedUserGroupOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + person_id: int | UUID, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/persons/{person_id}/user-groups".format( + person_id=quote(str(person_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedUserGroupOut | None: + if response.status_code == 200: + response_200 = PagedUserGroupOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedUserGroupOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + person_id: int | UUID, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupOut]: + """Get Usergroups + + Get usergroups person is in + + Args: + person_id (int | UUID): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupOut] + """ + + kwargs = _get_kwargs( + person_id=person_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + person_id: int | UUID, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupOut | None: + """Get Usergroups + + Get usergroups person is in + + Args: + person_id (int | UUID): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupOut + """ + + return sync_detailed( + person_id=person_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + person_id: int | UUID, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupOut]: + """Get Usergroups + + Get usergroups person is in + + Args: + person_id (int | UUID): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupOut] + """ + + kwargs = _get_kwargs( + person_id=person_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + person_id: int | UUID, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupOut | None: + """Get Usergroups + + Get usergroups person is in + + Args: + person_id (int | UUID): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupOut + """ + + return ( + await asyncio_detailed( + person_id=person_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/persons/update_person_persons_person_id_patch.py b/src/lims_utils/expeye_client/api/persons/update_person_persons_person_id_patch.py new file mode 100644 index 0000000..29bc8d8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/persons/update_person_persons_person_id_patch.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.person_optional import PersonOptional +from ...models.person_out import PersonOut +from ...types import Response + + +def _get_kwargs( + person_id: int | UUID, + *, + body: PersonOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/persons/{person_id}".format( + person_id=quote(str(person_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PersonOut | None: + if response.status_code == 200: + response_200 = PersonOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + person_id: int | UUID, + *, + client: AuthenticatedClient, + body: PersonOptional, +) -> Response[HTTPValidationError | PersonOut]: + """Update Person + + Update person + + Args: + person_id (int | UUID): + body (PersonOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PersonOut] + """ + + kwargs = _get_kwargs( + person_id=person_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + person_id: int | UUID, + *, + client: AuthenticatedClient, + body: PersonOptional, +) -> HTTPValidationError | PersonOut | None: + """Update Person + + Update person + + Args: + person_id (int | UUID): + body (PersonOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PersonOut + """ + + return sync_detailed( + person_id=person_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + person_id: int | UUID, + *, + client: AuthenticatedClient, + body: PersonOptional, +) -> Response[HTTPValidationError | PersonOut]: + """Update Person + + Update person + + Args: + person_id (int | UUID): + body (PersonOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PersonOut] + """ + + kwargs = _get_kwargs( + person_id=person_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + person_id: int | UUID, + *, + client: AuthenticatedClient, + body: PersonOptional, +) -> HTTPValidationError | PersonOut | None: + """Update Person + + Update person + + Args: + person_id (int | UUID): + body (PersonOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PersonOut + """ + + return ( + await asyncio_detailed( + person_id=person_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_jobs/__init__.py b/src/lims_utils/expeye_client/api/processing_jobs/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_jobs/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py b/src/lims_utils/expeye_client/api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py new file mode 100644 index 0000000..612e56f --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.auto_proc_program_in import AutoProcProgramIn +from ...models.auto_proc_program_out import AutoProcProgramOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + processing_job_id: int, + *, + body: AutoProcProgramIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/processing-jobs/{processing_job_id}/processing-programs".format( + processing_job_id=quote(str(processing_job_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AutoProcProgramOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = AutoProcProgramOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AutoProcProgramOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramIn, +) -> Response[AutoProcProgramOut | HTTPValidationError]: + """Create Auto Processing Program + + Create processing program + + Args: + processing_job_id (int): + body (AutoProcProgramIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramIn, +) -> AutoProcProgramOut | HTTPValidationError | None: + """Create Auto Processing Program + + Create processing program + + Args: + processing_job_id (int): + body (AutoProcProgramIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramOut | HTTPValidationError + """ + + return sync_detailed( + processing_job_id=processing_job_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramIn, +) -> Response[AutoProcProgramOut | HTTPValidationError]: + """Create Auto Processing Program + + Create processing program + + Args: + processing_job_id (int): + body (AutoProcProgramIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramIn, +) -> AutoProcProgramOut | HTTPValidationError | None: + """Create Auto Processing Program + + Create processing program + + Args: + processing_job_id (int): + body (AutoProcProgramIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + processing_job_id=processing_job_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py b/src/lims_utils/expeye_client/api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py new file mode 100644 index 0000000..5d36124 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_auto_proc_program_out import PagedAutoProcProgramOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + processing_job_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/processing-jobs/{processing_job_id}/processing-programs".format( + processing_job_id=quote(str(processing_job_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedAutoProcProgramOut | None: + if response.status_code == 200: + response_200 = PagedAutoProcProgramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedAutoProcProgramOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedAutoProcProgramOut]: + """Get Auto Processing Programs + + Get processing programs + + Args: + processing_job_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramOut] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + processing_job_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedAutoProcProgramOut | None: + """Get Auto Processing Programs + + Get processing programs + + Args: + processing_job_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramOut + """ + + return sync_detailed( + processing_job_id=processing_job_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedAutoProcProgramOut]: + """Get Auto Processing Programs + + Get processing programs + + Args: + processing_job_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramOut] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + processing_job_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedAutoProcProgramOut | None: + """Get Auto Processing Programs + + Get processing programs + + Args: + processing_job_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramOut + """ + + return ( + await asyncio_detailed( + processing_job_id=processing_job_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py b/src/lims_utils/expeye_client/api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py new file mode 100644 index 0000000..54c23c6 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.processing_job_parameters_out import ProcessingJobParametersOut +from ...types import Response + + +def _get_kwargs( + processing_job_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/processing-jobs/{processing_job_id}/parameters".format( + processing_job_id=quote(str(processing_job_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProcessingJobParametersOut | None: + if response.status_code == 200: + response_200 = ProcessingJobParametersOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProcessingJobParametersOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ProcessingJobParametersOut]: + """Get Processing Job Parameters + + Get processing job parameters + + Args: + processing_job_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProcessingJobParametersOut] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + processing_job_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ProcessingJobParametersOut | None: + """Get Processing Job Parameters + + Get processing job parameters + + Args: + processing_job_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProcessingJobParametersOut + """ + + return sync_detailed( + processing_job_id=processing_job_id, + client=client, + ).parsed + + +async def asyncio_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ProcessingJobParametersOut]: + """Get Processing Job Parameters + + Get processing job parameters + + Args: + processing_job_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProcessingJobParametersOut] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + processing_job_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ProcessingJobParametersOut | None: + """Get Processing Job Parameters + + Get processing job parameters + + Args: + processing_job_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProcessingJobParametersOut + """ + + return ( + await asyncio_detailed( + processing_job_id=processing_job_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py b/src/lims_utils/expeye_client/api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py new file mode 100644 index 0000000..08b43e9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.processing_job_parameters_in import ProcessingJobParametersIn +from ...models.processing_job_parameters_out import ProcessingJobParametersOut +from ...types import Response + + +def _get_kwargs( + processing_job_id: int, + *, + body: ProcessingJobParametersIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/processing-jobs/{processing_job_id}/parameters".format( + processing_job_id=quote(str(processing_job_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProcessingJobParametersOut | None: + if response.status_code == 200: + response_200 = ProcessingJobParametersOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProcessingJobParametersOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: ProcessingJobParametersIn, +) -> Response[HTTPValidationError | ProcessingJobParametersOut]: + """Upsert Processing Job Parameters + + Upsert processing job parameters + + Args: + processing_job_id (int): + body (ProcessingJobParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProcessingJobParametersOut] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: ProcessingJobParametersIn, +) -> HTTPValidationError | ProcessingJobParametersOut | None: + """Upsert Processing Job Parameters + + Upsert processing job parameters + + Args: + processing_job_id (int): + body (ProcessingJobParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProcessingJobParametersOut + """ + + return sync_detailed( + processing_job_id=processing_job_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: ProcessingJobParametersIn, +) -> Response[HTTPValidationError | ProcessingJobParametersOut]: + """Upsert Processing Job Parameters + + Upsert processing job parameters + + Args: + processing_job_id (int): + body (ProcessingJobParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProcessingJobParametersOut] + """ + + kwargs = _get_kwargs( + processing_job_id=processing_job_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + processing_job_id: int, + *, + client: AuthenticatedClient, + body: ProcessingJobParametersIn, +) -> HTTPValidationError | ProcessingJobParametersOut | None: + """Upsert Processing Job Parameters + + Upsert processing job parameters + + Args: + processing_job_id (int): + body (ProcessingJobParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProcessingJobParametersOut + """ + + return ( + await asyncio_detailed( + processing_job_id=processing_job_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_programs/__init__.py b/src/lims_utils/expeye_client/api/processing_programs/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py b/src/lims_utils/expeye_client/api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py new file mode 100644 index 0000000..fdd94ca --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.auto_proc_program_attachment_in import AutoProcProgramAttachmentIn +from ...models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + auto_proc_program_id: int, + *, + body: AutoProcProgramAttachmentIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/processing-programs/{auto_proc_program_id}/attachments".format( + auto_proc_program_id=quote(str(auto_proc_program_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = AutoProcProgramAttachmentOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentIn, +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + """Create Auto Proc Attachment + + Create processing program attachment + + Args: + auto_proc_program_id (int): + body (AutoProcProgramAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentIn, +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + """Create Auto Proc Attachment + + Create processing program attachment + + Args: + auto_proc_program_id (int): + body (AutoProcProgramAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramAttachmentOut | HTTPValidationError + """ + + return sync_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentIn, +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + """Create Auto Proc Attachment + + Create processing program attachment + + Args: + auto_proc_program_id (int): + body (AutoProcProgramAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentIn, +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + """Create Auto Proc Attachment + + Create processing program attachment + + Args: + auto_proc_program_id (int): + body (AutoProcProgramAttachmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramAttachmentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py b/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py new file mode 100644 index 0000000..5744644 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + auto_proc_program_id: int, + auto_proc_program_attachment_id: Any, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/processing-programs/{auto_proc_program_id}/attachments/{auto_proc_program_attachment_id}".format( + auto_proc_program_id=quote(str(auto_proc_program_id), safe=""), + auto_proc_program_attachment_id=quote(str(auto_proc_program_attachment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AutoProcProgramAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + auto_proc_program_id: int, + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + """Get Auto Proc Program Attachment + + Get processing program attachment by Id + + Args: + auto_proc_program_id (int): + auto_proc_program_attachment_id (Any): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + auto_proc_program_id: int, + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + """Get Auto Proc Program Attachment + + Get processing program attachment by Id + + Args: + auto_proc_program_id (int): + auto_proc_program_attachment_id (Any): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramAttachmentOut | HTTPValidationError + """ + + return sync_detailed( + auto_proc_program_id=auto_proc_program_id, + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + auto_proc_program_id: int, + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + """Get Auto Proc Program Attachment + + Get processing program attachment by Id + + Args: + auto_proc_program_id (int): + auto_proc_program_attachment_id (Any): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + auto_proc_program_id: int, + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + """Get Auto Proc Program Attachment + + Get processing program attachment by Id + + Args: + auto_proc_program_id (int): + auto_proc_program_attachment_id (Any): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramAttachmentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + auto_proc_program_id=auto_proc_program_id, + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py b/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py new file mode 100644 index 0000000..58a320f --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py @@ -0,0 +1,309 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_auto_proc_program_attachment_out import PagedAutoProcProgramAttachmentOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + auto_proc_program_id: int, + *, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + file_type: None | str | Unset = UNSET, + importance_rank: int | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_file_path: None | str | Unset + if isinstance(file_path, Unset): + json_file_path = UNSET + else: + json_file_path = file_path + params["filePath"] = json_file_path + + json_file_name: None | str | Unset + if isinstance(file_name, Unset): + json_file_name = UNSET + else: + json_file_name = file_name + params["fileName"] = json_file_name + + json_file_type: None | str | Unset + if isinstance(file_type, Unset): + json_file_type = UNSET + else: + json_file_type = file_type + params["fileType"] = json_file_type + + json_importance_rank: int | None | Unset + if isinstance(importance_rank, Unset): + json_importance_rank = UNSET + else: + json_importance_rank = importance_rank + params["importanceRank"] = json_importance_rank + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/processing-programs/{auto_proc_program_id}/attachments".format( + auto_proc_program_id=quote(str(auto_proc_program_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + if response.status_code == 200: + response_200 = PagedAutoProcProgramAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + file_type: None | str | Unset = UNSET, + importance_rank: int | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + """Get Auto Proc Program Attachments + + Get processing program attachments + + Args: + auto_proc_program_id (int): + file_path (None | str | Unset): + file_name (None | str | Unset): + file_type (None | str | Unset): + importance_rank (int | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + file_path=file_path, + file_name=file_name, + file_type=file_type, + importance_rank=importance_rank, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + file_type: None | str | Unset = UNSET, + importance_rank: int | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + """Get Auto Proc Program Attachments + + Get processing program attachments + + Args: + auto_proc_program_id (int): + file_path (None | str | Unset): + file_name (None | str | Unset): + file_type (None | str | Unset): + importance_rank (int | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramAttachmentOut + """ + + return sync_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + file_path=file_path, + file_name=file_name, + file_type=file_type, + importance_rank=importance_rank, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + file_type: None | str | Unset = UNSET, + importance_rank: int | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + """Get Auto Proc Program Attachments + + Get processing program attachments + + Args: + auto_proc_program_id (int): + file_path (None | str | Unset): + file_name (None | str | Unset): + file_type (None | str | Unset): + importance_rank (int | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + file_path=file_path, + file_name=file_name, + file_type=file_type, + importance_rank=importance_rank, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + file_type: None | str | Unset = UNSET, + importance_rank: int | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + """Get Auto Proc Program Attachments + + Get processing program attachments + + Args: + auto_proc_program_id (int): + file_path (None | str | Unset): + file_name (None | str | Unset): + file_type (None | str | Unset): + importance_rank (int | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramAttachmentOut + """ + + return ( + await asyncio_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + file_path=file_path, + file_name=file_name, + file_type=file_type, + importance_rank=importance_rank, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py b/src/lims_utils/expeye_client/api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py new file mode 100644 index 0000000..68d4940 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_full_movie_out import PagedFullMovieOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + auto_proc_program_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/processing-programs/{auto_proc_program_id}/motion-correction".format( + auto_proc_program_id=quote(str(auto_proc_program_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedFullMovieOut | None: + if response.status_code == 200: + response_200 = PagedFullMovieOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedFullMovieOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFullMovieOut]: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + auto_proc_program_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFullMovieOut] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFullMovieOut | None: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + auto_proc_program_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFullMovieOut + """ + + return sync_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFullMovieOut]: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + auto_proc_program_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFullMovieOut] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFullMovieOut | None: + """Get Motion Correction + + Get motion correction and tilt alignment data + + Args: + auto_proc_program_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFullMovieOut + """ + + return ( + await asyncio_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py b/src/lims_utils/expeye_client/api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py new file mode 100644 index 0000000..5549263 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.auto_proc_program_attachment_optional import AutoProcProgramAttachmentOptional +from ...models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + auto_proc_program_attachment_id: Any, + *, + body: AutoProcProgramAttachmentOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/processing-programs/attachments/{auto_proc_program_attachment_id}".format( + auto_proc_program_attachment_id=quote(str(auto_proc_program_attachment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AutoProcProgramAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + """Update Auto Proc Attachment + + Update processing program attachment + + Args: + auto_proc_program_attachment_id (Any): + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + """Update Auto Proc Attachment + + Update processing program attachment + + Args: + auto_proc_program_attachment_id (Any): + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramAttachmentOut | HTTPValidationError + """ + + return sync_detailed( + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, +) -> Response[AutoProcProgramAttachmentOut | HTTPValidationError]: + """Update Auto Proc Attachment + + Update processing program attachment + + Args: + auto_proc_program_attachment_id (Any): + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramAttachmentOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + auto_proc_program_attachment_id: Any, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, +) -> AutoProcProgramAttachmentOut | HTTPValidationError | None: + """Update Auto Proc Attachment + + Update processing program attachment + + Args: + auto_proc_program_attachment_id (Any): + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramAttachmentOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py b/src/lims_utils/expeye_client/api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py new file mode 100644 index 0000000..59b6d19 --- /dev/null +++ b/src/lims_utils/expeye_client/api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.auto_proc_program_optional import AutoProcProgramOptional +from ...models.auto_proc_program_out import AutoProcProgramOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + auto_proc_program_id: int, + *, + body: AutoProcProgramOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/processing-programs/{auto_proc_program_id}".format( + auto_proc_program_id=quote(str(auto_proc_program_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> AutoProcProgramOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = AutoProcProgramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[AutoProcProgramOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramOptional, +) -> Response[AutoProcProgramOut | HTTPValidationError]: + """Update Auto Processing Program + + Update processing program + + Args: + auto_proc_program_id (int): + body (AutoProcProgramOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramOptional, +) -> AutoProcProgramOut | HTTPValidationError | None: + """Update Auto Processing Program + + Update processing program + + Args: + auto_proc_program_id (int): + body (AutoProcProgramOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramOut | HTTPValidationError + """ + + return sync_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramOptional, +) -> Response[AutoProcProgramOut | HTTPValidationError]: + """Update Auto Processing Program + + Update processing program + + Args: + auto_proc_program_id (int): + body (AutoProcProgramOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AutoProcProgramOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + auto_proc_program_id=auto_proc_program_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + auto_proc_program_id: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramOptional, +) -> AutoProcProgramOut | HTTPValidationError | None: + """Update Auto Processing Program + + Update processing program + + Args: + auto_proc_program_id (int): + body (AutoProcProgramOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AutoProcProgramOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + auto_proc_program_id=auto_proc_program_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/__init__.py b/src/lims_utils/expeye_client/api/proposals/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py b/src/lims_utils/expeye_client/api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py new file mode 100644 index 0000000..4792982 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_container_in import RegisteredContainerIn +from ...models.registered_container_out import RegisteredContainerOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: RegisteredContainerIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/container-registry".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredContainerOut | None: + if response.status_code == 201: + response_201 = RegisteredContainerOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredContainerOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredContainerIn, +) -> Response[HTTPValidationError | RegisteredContainerOut]: + """Create Container Registry Entry + + Create new container registry entry + + Args: + proposal_reference (str): + body (RegisteredContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredContainerIn, +) -> HTTPValidationError | RegisteredContainerOut | None: + """Create Container Registry Entry + + Create new container registry entry + + Args: + proposal_reference (str): + body (RegisteredContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredContainerIn, +) -> Response[HTTPValidationError | RegisteredContainerOut]: + """Create Container Registry Entry + + Create new container registry entry + + Args: + proposal_reference (str): + body (RegisteredContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredContainerIn, +) -> HTTPValidationError | RegisteredContainerOut | None: + """Create Container Registry Entry + + Create new container registry entry + + Args: + proposal_reference (str): + body (RegisteredContainerIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py b/src/lims_utils/expeye_client/api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py new file mode 100644 index 0000000..25434f1 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_container_has_proposal_in import RegisteredContainerHasProposalIn +from ...models.registered_container_has_proposal_out import RegisteredContainerHasProposalOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + barcode_or_id: int | str, + *, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/container-registry/{barcode_or_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + if response.status_code == 201: + response_201 = RegisteredContainerHasProposalOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + """Create Container Registry Has Proposal Entry + + Assign container registry entry to proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + """Create Container Registry Has Proposal Entry + + Assign container registry entry to proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerHasProposalOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + """Create Container Registry Has Proposal Entry + + Assign container registry entry to proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + """Create Container Registry Has Proposal Entry + + Assign container registry entry to proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerHasProposalOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py b/src/lims_utils/expeye_client/api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py new file mode 100644 index 0000000..3d5ea1e --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.protein_with_crystals_in import ProteinWithCrystalsIn +from ...models.protein_with_crystals_out import ProteinWithCrystalsOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + body: list[ProteinWithCrystalsIn], + reference_by_name: bool | Unset = False, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["referenceByName"] = reference_by_name + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/crystals".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[ProteinWithCrystalsOut] | None: + if response.status_code == 201: + response_201 = [] + _response_201 = response.json() + for response_201_item_data in _response_201: + response_201_item = ProteinWithCrystalsOut.from_dict(response_201_item_data) + + response_201.append(response_201_item) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[ProteinWithCrystalsOut]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: list[ProteinWithCrystalsIn], + reference_by_name: bool | Unset = False, +) -> Response[HTTPValidationError | list[ProteinWithCrystalsOut]]: + """Create Crystals + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + reference_by_name (bool | Unset): Whether to reference proteins by name or ID Default: + False. + body (list[ProteinWithCrystalsIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[ProteinWithCrystalsOut]] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + reference_by_name=reference_by_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: list[ProteinWithCrystalsIn], + reference_by_name: bool | Unset = False, +) -> HTTPValidationError | list[ProteinWithCrystalsOut] | None: + """Create Crystals + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + reference_by_name (bool | Unset): Whether to reference proteins by name or ID Default: + False. + body (list[ProteinWithCrystalsIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[ProteinWithCrystalsOut] + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + reference_by_name=reference_by_name, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: list[ProteinWithCrystalsIn], + reference_by_name: bool | Unset = False, +) -> Response[HTTPValidationError | list[ProteinWithCrystalsOut]]: + """Create Crystals + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + reference_by_name (bool | Unset): Whether to reference proteins by name or ID Default: + False. + body (list[ProteinWithCrystalsIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[ProteinWithCrystalsOut]] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + reference_by_name=reference_by_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: list[ProteinWithCrystalsIn], + reference_by_name: bool | Unset = False, +) -> HTTPValidationError | list[ProteinWithCrystalsOut] | None: + """Create Crystals + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + reference_by_name (bool | Unset): Whether to reference proteins by name or ID Default: + False. + body (list[ProteinWithCrystalsIn]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[ProteinWithCrystalsOut] + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + reference_by_name=reference_by_name, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py b/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py new file mode 100644 index 0000000..e627566 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_dewar_in import RegisteredDewarIn +from ...models.registered_dewar_out import RegisteredDewarOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: RegisteredDewarIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/dewar-registry".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredDewarOut | None: + if response.status_code == 201: + response_201 = RegisteredDewarOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Create Dewar Registry Entry + + Create new dewar registry entry + + Args: + proposal_reference (str): + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Create Dewar Registry Entry + + Create new dewar registry entry + + Args: + proposal_reference (str): + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Create Dewar Registry Entry + + Create new dewar registry entry + + Args: + proposal_reference (str): + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: RegisteredDewarIn, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Create Dewar Registry Entry + + Create new dewar registry entry + + Args: + proposal_reference (str): + body (RegisteredDewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py b/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py new file mode 100644 index 0000000..6a4b060 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_dewar_has_proposal_in import RegisteredDewarHasProposalIn +from ...models.registered_dewar_has_proposal_out import RegisteredDewarHasProposalOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + barcode_or_id: int | str, + *, + body: RegisteredDewarHasProposalIn, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/proposals/{proposal_reference}/dewar-registry/{barcode_or_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredDewarHasProposalOut | None: + if response.status_code == 200: + response_200 = RegisteredDewarHasProposalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredDewarHasProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredDewarHasProposalIn, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredDewarHasProposalOut]: + """Create Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredDewarHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredDewarHasProposalIn, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredDewarHasProposalOut | None: + """Create Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredDewarHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarHasProposalOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredDewarHasProposalIn, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredDewarHasProposalOut]: + """Create Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredDewarHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredDewarHasProposalIn, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredDewarHasProposalOut | None: + """Create Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredDewarHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarHasProposalOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py b/src/lims_utils/expeye_client/api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py new file mode 100644 index 0000000..81085b7 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.shipment_with_children_in import ShipmentWithChildrenIn +from ...models.shipment_with_children_out import ShipmentWithChildrenOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: ShipmentWithChildrenIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/shipments/upload".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ShipmentWithChildrenOut | None: + if response.status_code == 201: + response_201 = ShipmentWithChildrenOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ShipmentWithChildrenOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentWithChildrenIn, +) -> Response[HTTPValidationError | ShipmentWithChildrenOut]: + """Create Full Shipment From Json + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + body (ShipmentWithChildrenIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentWithChildrenIn, +) -> HTTPValidationError | ShipmentWithChildrenOut | None: + """Create Full Shipment From Json + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + body (ShipmentWithChildrenIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentWithChildrenOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentWithChildrenIn, +) -> Response[HTTPValidationError | ShipmentWithChildrenOut]: + """Create Full Shipment From Json + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + body (ShipmentWithChildrenIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentWithChildrenIn, +) -> HTTPValidationError | ShipmentWithChildrenOut | None: + """Create Full Shipment From Json + + Create new shipment and its children from JSON + + Args: + proposal_reference (str): + body (ShipmentWithChildrenIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentWithChildrenOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py b/src/lims_utils/expeye_client/api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py new file mode 100644 index 0000000..68d37bf --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.ligand_in import LigandIn +from ...models.ligand_out import LigandOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: LigandIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/ligands".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LigandOut | None: + if response.status_code == 201: + response_201 = LigandOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: LigandIn, +) -> Response[HTTPValidationError | LigandOut]: + """Create Proposal Ligand + + Create new ligand for proposal + + Args: + proposal_reference (str): + body (LigandIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LigandOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: LigandIn, +) -> HTTPValidationError | LigandOut | None: + """Create Proposal Ligand + + Create new ligand for proposal + + Args: + proposal_reference (str): + body (LigandIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LigandOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: LigandIn, +) -> Response[HTTPValidationError | LigandOut]: + """Create Proposal Ligand + + Create new ligand for proposal + + Args: + proposal_reference (str): + body (LigandIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LigandOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: LigandIn, +) -> HTTPValidationError | LigandOut | None: + """Create Proposal Ligand + + Create new ligand for proposal + + Args: + proposal_reference (str): + body (LigandIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LigandOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_proposal_proposals_post.py b/src/lims_utils/expeye_client/api/proposals/create_proposal_proposals_post.py new file mode 100644 index 0000000..0e6be11 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_proposal_proposals_post.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.proposal_in import ProposalIn +from ...models.proposal_out import ProposalOut +from ...types import Response + + +def _get_kwargs( + *, + body: ProposalIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProposalOut | None: + if response.status_code == 201: + response_201 = ProposalOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: ProposalIn, +) -> Response[HTTPValidationError | ProposalOut]: + """Create Proposal + + Create new proposal + + Args: + body (ProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: ProposalIn, +) -> HTTPValidationError | ProposalOut | None: + """Create Proposal + + Create new proposal + + Args: + body (ProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalOut + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ProposalIn, +) -> Response[HTTPValidationError | ProposalOut]: + """Create Proposal + + Create new proposal + + Args: + body (ProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: ProposalIn, +) -> HTTPValidationError | ProposalOut | None: + """Create Proposal + + Create new proposal + + Args: + body (ProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalOut + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_protein_proposals_proposal_reference_proteins_post.py b/src/lims_utils/expeye_client/api/proposals/create_protein_proposals_proposal_reference_proteins_post.py new file mode 100644 index 0000000..f983ae2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_protein_proposals_proposal_reference_proteins_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.protein_in import ProteinIn +from ...models.protein_out import ProteinOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: ProteinIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/proteins".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProteinOut | None: + if response.status_code == 201: + response_201 = ProteinOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProteinOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProteinIn, +) -> Response[HTTPValidationError | ProteinOut]: + """Create Protein + + Create new protein + + Args: + proposal_reference (str): + body (ProteinIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProteinOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProteinIn, +) -> HTTPValidationError | ProteinOut | None: + """Create Protein + + Create new protein + + Args: + proposal_reference (str): + body (ProteinIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProteinOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProteinIn, +) -> Response[HTTPValidationError | ProteinOut]: + """Create Protein + + Create new protein + + Args: + proposal_reference (str): + body (ProteinIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProteinOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProteinIn, +) -> HTTPValidationError | ProteinOut | None: + """Create Protein + + Create new protein + + Args: + proposal_reference (str): + body (ProteinIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProteinOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_session_proposals_proposal_reference_sessions_post.py b/src/lims_utils/expeye_client/api/proposals/create_session_proposals_proposal_reference_sessions_post.py new file mode 100644 index 0000000..221036a --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_session_proposals_proposal_reference_sessions_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.session_in import SessionIn +from ...models.session_out import SessionOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: SessionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SessionOut | None: + if response.status_code == 201: + response_201 = SessionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SessionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: SessionIn, +) -> Response[HTTPValidationError | SessionOut]: + """Create Session + + Create new session + + Args: + proposal_reference (str): + body (SessionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: SessionIn, +) -> HTTPValidationError | SessionOut | None: + """Create Session + + Create new session + + Args: + proposal_reference (str): + body (SessionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: SessionIn, +) -> Response[HTTPValidationError | SessionOut]: + """Create Session + + Create new session + + Args: + proposal_reference (str): + body (SessionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: SessionIn, +) -> HTTPValidationError | SessionOut | None: + """Create Session + + Create new session + + Args: + proposal_reference (str): + body (SessionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py b/src/lims_utils/expeye_client/api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py new file mode 100644 index 0000000..13e869b --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.shipment_in import ShipmentIn +from ...models.shipment_out import ShipmentOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: ShipmentIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/shipments".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ShipmentOut | None: + if response.status_code == 201: + response_201 = ShipmentOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ShipmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentIn, +) -> Response[HTTPValidationError | ShipmentOut]: + """Create Shipment + + Create new shipment in proposal + + Args: + proposal_reference (str): + body (ShipmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentIn, +) -> HTTPValidationError | ShipmentOut | None: + """Create Shipment + + Create new shipment in proposal + + Args: + proposal_reference (str): + body (ShipmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentIn, +) -> Response[HTTPValidationError | ShipmentOut]: + """Create Shipment + + Create new shipment in proposal + + Args: + proposal_reference (str): + body (ShipmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ShipmentIn, +) -> HTTPValidationError | ShipmentOut | None: + """Create Shipment + + Create new shipment in proposal + + Args: + proposal_reference (str): + body (ShipmentIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py b/src/lims_utils/expeye_client/api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py new file mode 100644 index 0000000..6291140 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + barcode_or_id: int | str, + *, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/proposals/{proposal_reference}/container-registry/{barcode_or_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[Any | HTTPValidationError]: + """Delete Container Registry Has Proposal Entry + + Unassign container registry entry and proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Any | HTTPValidationError | None: + """Delete Container Registry Has Proposal Entry + + Unassign container registry entry and proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[Any | HTTPValidationError]: + """Delete Container Registry Has Proposal Entry + + Unassign container registry entry and proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Any | HTTPValidationError | None: + """Delete Container Registry Has Proposal Entry + + Unassign container registry entry and proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py b/src/lims_utils/expeye_client/api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py new file mode 100644 index 0000000..593c76f --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + barcode_or_id: int | str, + *, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/proposals/{proposal_reference}/dewar-registry/{barcode_or_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[Any | HTTPValidationError]: + """Delete Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Any | HTTPValidationError | None: + """Delete Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[Any | HTTPValidationError]: + """Delete Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Any | HTTPValidationError | None: + """Delete Dewar Registry Has Proposal Entry + + Create/update dewar registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/delete_proposal_proposals_proposal_reference_delete.py b/src/lims_utils/expeye_client/api/proposals/delete_proposal_proposals_proposal_reference_delete.py new file mode 100644 index 0000000..6d251e2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/delete_proposal_proposals_proposal_reference_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/proposals/{proposal_reference}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Proposal + + Delete proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Proposal + + Delete proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Proposal + + Delete proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Proposal + + Delete proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py b/src/lims_utils/expeye_client/api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py new file mode 100644 index 0000000..3bfb133 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_registered_container_out import PagedRegisteredContainerOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/container-registry".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedRegisteredContainerOut | None: + if response.status_code == 200: + response_200 = PagedRegisteredContainerOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedRegisteredContainerOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredContainerOut]: + """Get Container Registry Entries + + Get container registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredContainerOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredContainerOut | None: + """Get Container Registry Entries + + Get container registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredContainerOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredContainerOut]: + """Get Container Registry Entries + + Get container registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredContainerOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredContainerOut | None: + """Get Container Registry Entries + + Get container registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredContainerOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py b/src/lims_utils/expeye_client/api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py new file mode 100644 index 0000000..a4be86d --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_container_has_proposal_out import RegisteredContainerHasProposalOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + barcode_or_id: int | str, + *, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/container-registry/{barcode_or_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + if response.status_code == 200: + response_200 = RegisteredContainerHasProposalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + """Get Container Registry Entry + + Get information about a container registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + """Get Container Registry Entry + + Get information about a container registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerHasProposalOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + """Get Container Registry Entry + + Get information about a container registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + """Get Container Registry Entry + + Get information about a container registry entry's relationship to a proposal + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerHasProposalOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py b/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py new file mode 100644 index 0000000..f7bc973 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_registered_dewar_out import PagedRegisteredDewarOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/dewar-registry".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedRegisteredDewarOut | None: + if response.status_code == 200: + response_200 = PagedRegisteredDewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedRegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredDewarOut]: + """Get Dewar Registry Entries + + Get dewar registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredDewarOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredDewarOut | None: + """Get Dewar Registry Entries + + Get dewar registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredDewarOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRegisteredDewarOut]: + """Get Dewar Registry Entries + + Get dewar registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRegisteredDewarOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRegisteredDewarOut | None: + """Get Dewar Registry Entries + + Get dewar registry entries in proposal + + Args: + proposal_reference (str): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRegisteredDewarOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py b/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py new file mode 100644 index 0000000..6cd6416 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_dewar_out import RegisteredDewarOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + facility_code: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/dewar-registry/{facility_code}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + facility_code=quote(str(facility_code), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredDewarOut | None: + if response.status_code == 200: + response_200 = RegisteredDewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + facility_code: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + proposal_reference (str): + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + facility_code=facility_code, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + facility_code: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + proposal_reference (str): + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + facility_code=facility_code, + client=client, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + facility_code: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | RegisteredDewarOut]: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + proposal_reference (str): + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredDewarOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + facility_code=facility_code, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + facility_code: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | RegisteredDewarOut | None: + """Get Dewar Registry Entry + + Get dewar registry entry information + + Args: + proposal_reference (str): + facility_code (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredDewarOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + facility_code=facility_code, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_events_proposals_proposal_reference_sample_events_get.py b/src/lims_utils/expeye_client/api/proposals/get_events_proposals_proposal_reference_sample_events_get.py new file mode 100644 index 0000000..17a26f2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_events_proposals_proposal_reference_sample_events_get.py @@ -0,0 +1,274 @@ +import datetime +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_session_event_with_children_out import PagedSessionEventWithChildrenOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_start_time: None | str | Unset + if isinstance(start_time, Unset): + json_start_time = UNSET + elif isinstance(start_time, datetime.datetime): + json_start_time = start_time.isoformat() + else: + json_start_time = start_time + params["startTime"] = json_start_time + + json_end_time: None | str | Unset + if isinstance(end_time, Unset): + json_end_time = UNSET + elif isinstance(end_time, datetime.datetime): + json_end_time = end_time.isoformat() + else: + json_end_time = end_time + params["endTime"] = json_end_time + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sample-events".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSessionEventWithChildrenOut | None: + if response.status_code == 200: + response_200 = PagedSessionEventWithChildrenOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSessionEventWithChildrenOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionEventWithChildrenOut]: + """Get Events + + Get events in proposal grouped by sample + + Args: + proposal_reference (str): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionEventWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionEventWithChildrenOut | None: + """Get Events + + Get events in proposal grouped by sample + + Args: + proposal_reference (str): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionEventWithChildrenOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionEventWithChildrenOut]: + """Get Events + + Get events in proposal grouped by sample + + Args: + proposal_reference (str): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionEventWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionEventWithChildrenOut | None: + """Get Events + + Get events in proposal grouped by sample + + Args: + proposal_reference (str): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionEventWithChildrenOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py b/src/lims_utils/expeye_client/api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py new file mode 100644 index 0000000..0797de2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_person_out import PagedPersonOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/lab-contacts".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedPersonOut | None: + if response.status_code == 200: + response_200 = PagedPersonOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedPersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPersonOut]: + """Get Lab Contacts For Proposal + + Get lab contacts for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPersonOut | None: + """Get Lab Contacts For Proposal + + Get lab contacts for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPersonOut]: + """Get Lab Contacts For Proposal + + Get lab contacts for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPersonOut | None: + """Get Lab Contacts For Proposal + + Get lab contacts for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py b/src/lims_utils/expeye_client/api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py new file mode 100644 index 0000000..ff51dfd --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py @@ -0,0 +1,502 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_processing_job_with_auto_proc_program_out import PagedProcessingJobWithAutoProcProgramOut +from ...models.processing_status import ProcessingStatus +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + sessions: list[int] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_min_completeness: float | None | Unset + if isinstance(min_completeness, Unset): + json_min_completeness = UNSET + else: + json_min_completeness = min_completeness + params["minCompleteness"] = json_min_completeness + + json_max_completeness: float | None | Unset + if isinstance(max_completeness, Unset): + json_max_completeness = UNSET + else: + json_max_completeness = max_completeness + params["maxCompleteness"] = json_max_completeness + + json_min_mean_i_over_sigma: float | None | Unset + if isinstance(min_mean_i_over_sigma, Unset): + json_min_mean_i_over_sigma = UNSET + else: + json_min_mean_i_over_sigma = min_mean_i_over_sigma + params["minMeanIOverSigma"] = json_min_mean_i_over_sigma + + json_max_mean_i_over_sigma: float | None | Unset + if isinstance(max_mean_i_over_sigma, Unset): + json_max_mean_i_over_sigma = UNSET + else: + json_max_mean_i_over_sigma = max_mean_i_over_sigma + params["maxMeanIOverSigma"] = json_max_mean_i_over_sigma + + json_min_res_i_over_sigma: float | None | Unset + if isinstance(min_res_i_over_sigma, Unset): + json_min_res_i_over_sigma = UNSET + else: + json_min_res_i_over_sigma = min_res_i_over_sigma + params["minResIOverSigma"] = json_min_res_i_over_sigma + + json_max_res_i_over_sigma: float | None | Unset + if isinstance(max_res_i_over_sigma, Unset): + json_max_res_i_over_sigma = UNSET + else: + json_max_res_i_over_sigma = max_res_i_over_sigma + params["maxResIOverSigma"] = json_max_res_i_over_sigma + + json_low_resolution_cutoff: float | None | Unset + if isinstance(low_resolution_cutoff, Unset): + json_low_resolution_cutoff = UNSET + else: + json_low_resolution_cutoff = low_resolution_cutoff + params["lowResolutionCutoff"] = json_low_resolution_cutoff + + json_high_resolution_cutoff: float | None | Unset + if isinstance(high_resolution_cutoff, Unset): + json_high_resolution_cutoff = UNSET + else: + json_high_resolution_cutoff = high_resolution_cutoff + params["highResolutionCutoff"] = json_high_resolution_cutoff + + json_space_group: None | str | Unset + if isinstance(space_group, Unset): + json_space_group = UNSET + else: + json_space_group = space_group + params["spaceGroup"] = json_space_group + + json_downstream: bool | None | Unset + if isinstance(downstream, Unset): + json_downstream = UNSET + else: + json_downstream = downstream + params["downstream"] = json_downstream + + json_processing_type: None | str | Unset + if isinstance(processing_type, Unset): + json_processing_type = UNSET + else: + json_processing_type = processing_type + params["processingType"] = json_processing_type + + json_status: list[str] | None | Unset + if isinstance(status, Unset): + json_status = UNSET + elif isinstance(status, list): + json_status = [] + for status_type_0_item_data in status: + status_type_0_item = status_type_0_item_data.value + json_status.append(status_type_0_item) + + else: + json_status = status + params["status"] = json_status + + json_sessions: list[int] | None | Unset + if isinstance(sessions, Unset): + json_sessions = UNSET + elif isinstance(sessions, list): + json_sessions = sessions + + else: + json_sessions = sessions + params["sessions"] = json_sessions + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/processing-jobs".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut | None: + if response.status_code == 200: + response_200 = PagedProcessingJobWithAutoProcProgramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + sessions: list[int] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut]: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + sessions (list[int] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + sessions=sessions, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + sessions: list[int] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut | None: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + sessions (list[int] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + sessions=sessions, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + sessions: list[int] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut]: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + sessions (list[int] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + sessions=sessions, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + min_completeness: float | None | Unset = UNSET, + max_completeness: float | None | Unset = UNSET, + min_mean_i_over_sigma: float | None | Unset = UNSET, + max_mean_i_over_sigma: float | None | Unset = UNSET, + min_res_i_over_sigma: float | None | Unset = UNSET, + max_res_i_over_sigma: float | None | Unset = UNSET, + low_resolution_cutoff: float | None | Unset = UNSET, + high_resolution_cutoff: float | None | Unset = UNSET, + space_group: None | str | Unset = UNSET, + downstream: bool | None | Unset = UNSET, + processing_type: None | str | Unset = UNSET, + status: list[ProcessingStatus] | None | Unset = UNSET, + sessions: list[int] | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut | None: + """Get Processing Jobs + + Get processing jobs that belong to the data collection + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + min_completeness (float | None | Unset): + max_completeness (float | None | Unset): + min_mean_i_over_sigma (float | None | Unset): + max_mean_i_over_sigma (float | None | Unset): + min_res_i_over_sigma (float | None | Unset): + max_res_i_over_sigma (float | None | Unset): + low_resolution_cutoff (float | None | Unset): + high_resolution_cutoff (float | None | Unset): + space_group (None | str | Unset): + downstream (bool | None | Unset): If True, only return processing jobs that are downstream + of another processing job. If False, only return processing jobs that are not downstream + of another processing job. If None, return all processing jobs. + processing_type (None | str | Unset): + status (list[ProcessingStatus] | None | Unset): + sessions (list[int] | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProcessingJobWithAutoProcProgramOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + min_completeness=min_completeness, + max_completeness=max_completeness, + min_mean_i_over_sigma=min_mean_i_over_sigma, + max_mean_i_over_sigma=max_mean_i_over_sigma, + min_res_i_over_sigma=min_res_i_over_sigma, + max_res_i_over_sigma=max_res_i_over_sigma, + low_resolution_cutoff=low_resolution_cutoff, + high_resolution_cutoff=high_resolution_cutoff, + space_group=space_group, + downstream=downstream, + processing_type=processing_type, + status=status, + sessions=sessions, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py b/src/lims_utils/expeye_client/api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py new file mode 100644 index 0000000..41749e0 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.shipping_data_out import ShippingDataOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/data".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ShippingDataOut | None: + if response.status_code == 200: + response_200 = ShippingDataOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ShippingDataOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ShippingDataOut]: + """Get Proposal Data + + Get shipment-related proposal data + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShippingDataOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ShippingDataOut | None: + """Get Proposal Data + + Get shipment-related proposal data + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShippingDataOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ShippingDataOut]: + """Get Proposal Data + + Get shipment-related proposal data + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShippingDataOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ShippingDataOut | None: + """Get Proposal Data + + Get shipment-related proposal data + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShippingDataOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_proposals_proposal_reference_get.py b/src/lims_utils/expeye_client/api/proposals/get_proposal_proposals_proposal_reference_get.py new file mode 100644 index 0000000..0750c29 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_proposal_proposals_proposal_reference_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.proposal_out import ProposalOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProposalOut | None: + if response.status_code == 200: + response_200 = ProposalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ProposalOut]: + """Get Proposal + + Get individual proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ProposalOut | None: + """Get Proposal + + Get individual proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ProposalOut]: + """Get Proposal + + Get individual proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ProposalOut | None: + """Get Proposal + + Get individual proposal + + Args: + proposal_reference (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py b/src/lims_utils/expeye_client/api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py new file mode 100644 index 0000000..07b6d01 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py @@ -0,0 +1,253 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_out import PagedSampleOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_loaded: bool | None | Unset + if isinstance(loaded, Unset): + json_loaded = UNSET + else: + json_loaded = loaded + params["loaded"] = json_loaded + + json_is_in_sample_changer: bool | None | Unset + if isinstance(is_in_sample_changer, Unset): + json_is_in_sample_changer = UNSET + else: + json_is_in_sample_changer = is_in_sample_changer + params["isInSampleChanger"] = json_is_in_sample_changer + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/samples".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSampleOut | None: + if response.status_code == 200: + response_200 = PagedSampleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleOut]: + """Get Proposal Samples + + Get proposal samples + + Args: + proposal_reference (str): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleOut | None: + """Get Proposal Samples + + Get proposal samples + + Args: + proposal_reference (str): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleOut]: + """Get Proposal Samples + + Get proposal samples + + Args: + proposal_reference (str): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleOut | None: + """Get Proposal Samples + + Get proposal samples + + Args: + proposal_reference (str): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py b/src/lims_utils/expeye_client/api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py new file mode 100644 index 0000000..38945b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_shipment_out import PagedShipmentOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/shipments".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedShipmentOut | None: + if response.status_code == 200: + response_200 = PagedShipmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedShipmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedShipmentOut]: + """Get Proposal Shipments + + Get shipments that belong to this proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedShipmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedShipmentOut | None: + """Get Proposal Shipments + + Get shipments that belong to this proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedShipmentOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedShipmentOut]: + """Get Proposal Shipments + + Get shipments that belong to this proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedShipmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedShipmentOut | None: + """Get Proposal Shipments + + Get shipments that belong to this proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedShipmentOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposals_proposals_get.py b/src/lims_utils/expeye_client/api/proposals/get_proposals_proposals_get.py new file mode 100644 index 0000000..25a9f76 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_proposals_proposals_get.py @@ -0,0 +1,268 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_proposal_out import PagedProposalOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: str | Unset = "", + proposal_reference: str | Unset = "", + title: str | Unset = "", + beam_line_name: str | Unset = "", + principal_investigator: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + params["proposalReference"] = proposal_reference + + params["title"] = title + + params["beamLineName"] = beam_line_name + + params["principalInvestigator"] = principal_investigator + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedProposalOut | None: + if response.status_code == 200: + response_200 = PagedProposalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + search: str | Unset = "", + proposal_reference: str | Unset = "", + title: str | Unset = "", + beam_line_name: str | Unset = "", + principal_investigator: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProposalOut]: + """Get Proposals + + List proposals + + Args: + search (str | Unset): Default: ''. + proposal_reference (str | Unset): Default: ''. + title (str | Unset): Default: ''. + beam_line_name (str | Unset): Default: ''. + principal_investigator (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProposalOut] + """ + + kwargs = _get_kwargs( + search=search, + proposal_reference=proposal_reference, + title=title, + beam_line_name=beam_line_name, + principal_investigator=principal_investigator, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + search: str | Unset = "", + proposal_reference: str | Unset = "", + title: str | Unset = "", + beam_line_name: str | Unset = "", + principal_investigator: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProposalOut | None: + """Get Proposals + + List proposals + + Args: + search (str | Unset): Default: ''. + proposal_reference (str | Unset): Default: ''. + title (str | Unset): Default: ''. + beam_line_name (str | Unset): Default: ''. + principal_investigator (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProposalOut + """ + + return sync_detailed( + client=client, + search=search, + proposal_reference=proposal_reference, + title=title, + beam_line_name=beam_line_name, + principal_investigator=principal_investigator, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + search: str | Unset = "", + proposal_reference: str | Unset = "", + title: str | Unset = "", + beam_line_name: str | Unset = "", + principal_investigator: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProposalOut]: + """Get Proposals + + List proposals + + Args: + search (str | Unset): Default: ''. + proposal_reference (str | Unset): Default: ''. + title (str | Unset): Default: ''. + beam_line_name (str | Unset): Default: ''. + principal_investigator (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProposalOut] + """ + + kwargs = _get_kwargs( + search=search, + proposal_reference=proposal_reference, + title=title, + beam_line_name=beam_line_name, + principal_investigator=principal_investigator, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + search: str | Unset = "", + proposal_reference: str | Unset = "", + title: str | Unset = "", + beam_line_name: str | Unset = "", + principal_investigator: str | Unset = "", + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProposalOut | None: + """Get Proposals + + List proposals + + Args: + search (str | Unset): Default: ''. + proposal_reference (str | Unset): Default: ''. + title (str | Unset): Default: ''. + beam_line_name (str | Unset): Default: ''. + principal_investigator (str | Unset): Default: ''. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProposalOut + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + proposal_reference=proposal_reference, + title=title, + beam_line_name=beam_line_name, + principal_investigator=principal_investigator, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py b/src/lims_utils/expeye_client/api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py new file mode 100644 index 0000000..94e4bce --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_protein_out import PagedProteinOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/proteins".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedProteinOut | None: + if response.status_code == 200: + response_200 = PagedProteinOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedProteinOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProteinOut]: + """Get Proteins + + Create new protein + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProteinOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProteinOut | None: + """Get Proteins + + Create new protein + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProteinOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedProteinOut]: + """Get Proteins + + Create new protein + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedProteinOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedProteinOut | None: + """Get Proteins + + Create new protein + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedProteinOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py b/src/lims_utils/expeye_client/api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py new file mode 100644 index 0000000..0ee07f8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py @@ -0,0 +1,292 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_session_out import PagedSessionOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + search: str | Unset = "", + beam_line_name: list[str] | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = True, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["search"] = search + + json_beam_line_name: list[str] | None | Unset + if isinstance(beam_line_name, Unset): + json_beam_line_name = UNSET + elif isinstance(beam_line_name, list): + json_beam_line_name = beam_line_name + + else: + json_beam_line_name = beam_line_name + params["beamLineName"] = json_beam_line_name + + params["active"] = active + + params["countCollections"] = count_collections + + params["hideNull"] = hide_null + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSessionOut | None: + if response.status_code == 200: + response_200 = PagedSessionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSessionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + beam_line_name: list[str] | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = True, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionOut]: + """Get Sessions + + Get sessions belonging to proposal + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + beam_line_name (list[str] | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: True. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + beam_line_name=beam_line_name, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + beam_line_name: list[str] | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = True, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionOut | None: + """Get Sessions + + Get sessions belonging to proposal + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + beam_line_name (list[str] | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: True. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + beam_line_name=beam_line_name, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + beam_line_name: list[str] | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = True, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionOut]: + """Get Sessions + + Get sessions belonging to proposal + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + beam_line_name (list[str] | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: True. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + search=search, + beam_line_name=beam_line_name, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + search: str | Unset = "", + beam_line_name: list[str] | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = True, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionOut | None: + """Get Sessions + + Get sessions belonging to proposal + + Args: + proposal_reference (str): + search (str | Unset): Default: ''. + beam_line_name (list[str] | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: True. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + search=search, + beam_line_name=beam_line_name, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py b/src/lims_utils/expeye_client/api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py new file mode 100644 index 0000000..789c810 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_person_out import PagedPersonOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/staff".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedPersonOut | None: + if response.status_code == 200: + response_200 = PagedPersonOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedPersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPersonOut]: + """Get Staff For Proposal + + Get staff for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPersonOut | None: + """Get Staff For Proposal + + Get staff for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedPersonOut]: + """Get Staff For Proposal + + Get staff for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedPersonOut | None: + """Get Staff For Proposal + + Get staff for the proposal + + Args: + proposal_reference (str): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py b/src/lims_utils/expeye_client/api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py new file mode 100644 index 0000000..f1d7dad --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py @@ -0,0 +1,224 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.registered_container_has_proposal_in import RegisteredContainerHasProposalIn +from ...models.registered_container_has_proposal_out import RegisteredContainerHasProposalOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + barcode_or_id: int | str, + *, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["isBarcode"] = is_barcode + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proposals/{proposal_reference}/container-registry/{barcode_or_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + barcode_or_id=quote(str(barcode_or_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + if response.status_code == 200: + response_200 = RegisteredContainerHasProposalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + """Update Container Registry Entry + + Update container registry entry information + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + """Update Container Registry Entry + + Update container registry entry information + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerHasProposalOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> Response[HTTPValidationError | RegisteredContainerHasProposalOut]: + """Update Container Registry Entry + + Update container registry entry information + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RegisteredContainerHasProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + body=body, + is_barcode=is_barcode, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + barcode_or_id: int | str, + *, + client: AuthenticatedClient, + body: RegisteredContainerHasProposalIn, + is_barcode: bool | Unset = True, +) -> HTTPValidationError | RegisteredContainerHasProposalOut | None: + """Update Container Registry Entry + + Update container registry entry information + + Args: + proposal_reference (str): + barcode_or_id (int | str): + is_barcode (bool | Unset): Default: True. + body (RegisteredContainerHasProposalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RegisteredContainerHasProposalOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + barcode_or_id=barcode_or_id, + client=client, + body=body, + is_barcode=is_barcode, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proposals/update_proposal_proposals_proposal_reference_patch.py b/src/lims_utils/expeye_client/api/proposals/update_proposal_proposals_proposal_reference_patch.py new file mode 100644 index 0000000..d188093 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proposals/update_proposal_proposals_proposal_reference_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.proposal_optional import ProposalOptional +from ...models.proposal_out import ProposalOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + *, + body: ProposalOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proposals/{proposal_reference}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProposalOut | None: + if response.status_code == 200: + response_200 = ProposalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProposalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProposalOptional, +) -> Response[HTTPValidationError | ProposalOut]: + """Update Proposal + + Update existing proposal + + Args: + proposal_reference (str): + body (ProposalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProposalOptional, +) -> HTTPValidationError | ProposalOut | None: + """Update Proposal + + Update existing proposal + + Args: + proposal_reference (str): + body (ProposalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProposalOptional, +) -> Response[HTTPValidationError | ProposalOut]: + """Update Proposal + + Update existing proposal + + Args: + proposal_reference (str): + body (ProposalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + *, + client: AuthenticatedClient, + body: ProposalOptional, +) -> HTTPValidationError | ProposalOut | None: + """Update Proposal + + Update existing proposal + + Args: + proposal_reference (str): + body (ProposalOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proteins/__init__.py b/src/lims_utils/expeye_client/api/proteins/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proteins/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/proteins/create_crystal_proteins_protein_id_crystals_post.py b/src/lims_utils/expeye_client/api/proteins/create_crystal_proteins_protein_id_crystals_post.py new file mode 100644 index 0000000..2add58e --- /dev/null +++ b/src/lims_utils/expeye_client/api/proteins/create_crystal_proteins_protein_id_crystals_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.crystal_in import CrystalIn +from ...models.crystal_out import CrystalOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + protein_id: int, + *, + body: CrystalIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proteins/{protein_id}/crystals".format( + protein_id=quote(str(protein_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> CrystalOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = CrystalOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[CrystalOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + protein_id: int, + *, + client: AuthenticatedClient, + body: CrystalIn, +) -> Response[CrystalOut | HTTPValidationError]: + """Create Crystal + + Create crystal + + Args: + protein_id (int): + body (CrystalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CrystalOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + protein_id: int, + *, + client: AuthenticatedClient, + body: CrystalIn, +) -> CrystalOut | HTTPValidationError | None: + """Create Crystal + + Create crystal + + Args: + protein_id (int): + body (CrystalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CrystalOut | HTTPValidationError + """ + + return sync_detailed( + protein_id=protein_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + protein_id: int, + *, + client: AuthenticatedClient, + body: CrystalIn, +) -> Response[CrystalOut | HTTPValidationError]: + """Create Crystal + + Create crystal + + Args: + protein_id (int): + body (CrystalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CrystalOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + protein_id: int, + *, + client: AuthenticatedClient, + body: CrystalIn, +) -> CrystalOut | HTTPValidationError | None: + """Create Crystal + + Create crystal + + Args: + protein_id (int): + body (CrystalIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CrystalOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + protein_id=protein_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proteins/edit_protein_proteins_protein_id_patch.py b/src/lims_utils/expeye_client/api/proteins/edit_protein_proteins_protein_id_patch.py new file mode 100644 index 0000000..453a1f4 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proteins/edit_protein_proteins_protein_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.protein_optional import ProteinOptional +from ...models.protein_out import ProteinOut +from ...types import Response + + +def _get_kwargs( + protein_id: int, + *, + body: ProteinOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proteins/{protein_id}".format( + protein_id=quote(str(protein_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProteinOut | None: + if response.status_code == 200: + response_200 = ProteinOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProteinOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + protein_id: int, + *, + client: AuthenticatedClient, + body: ProteinOptional, +) -> Response[HTTPValidationError | ProteinOut]: + """Edit Protein + + Edit protein + + Args: + protein_id (int): + body (ProteinOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProteinOut] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + protein_id: int, + *, + client: AuthenticatedClient, + body: ProteinOptional, +) -> HTTPValidationError | ProteinOut | None: + """Edit Protein + + Edit protein + + Args: + protein_id (int): + body (ProteinOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProteinOut + """ + + return sync_detailed( + protein_id=protein_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + protein_id: int, + *, + client: AuthenticatedClient, + body: ProteinOptional, +) -> Response[HTTPValidationError | ProteinOut]: + """Edit Protein + + Edit protein + + Args: + protein_id (int): + body (ProteinOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProteinOut] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + protein_id: int, + *, + client: AuthenticatedClient, + body: ProteinOptional, +) -> HTTPValidationError | ProteinOut | None: + """Edit Protein + + Edit protein + + Args: + protein_id (int): + body (ProteinOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProteinOut + """ + + return ( + await asyncio_detailed( + protein_id=protein_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proteins/get_crystals_proteins_protein_id_crystals_get.py b/src/lims_utils/expeye_client/api/proteins/get_crystals_proteins_protein_id_crystals_get.py new file mode 100644 index 0000000..ef14069 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proteins/get_crystals_proteins_protein_id_crystals_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_crystal_out import PagedCrystalOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + protein_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proteins/{protein_id}/crystals".format( + protein_id=quote(str(protein_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedCrystalOut | None: + if response.status_code == 200: + response_200 = PagedCrystalOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedCrystalOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + protein_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedCrystalOut]: + """Get Crystals + + Get crystals of a specific protein + + Args: + protein_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedCrystalOut] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + protein_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedCrystalOut | None: + """Get Crystals + + Get crystals of a specific protein + + Args: + protein_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedCrystalOut + """ + + return sync_detailed( + protein_id=protein_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + protein_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedCrystalOut]: + """Get Crystals + + Get crystals of a specific protein + + Args: + protein_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedCrystalOut] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + protein_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedCrystalOut | None: + """Get Crystals + + Get crystals of a specific protein + + Args: + protein_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedCrystalOut + """ + + return ( + await asyncio_detailed( + protein_id=protein_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/proteins/get_protein_proteins_protein_id_get.py b/src/lims_utils/expeye_client/api/proteins/get_protein_proteins_protein_id_get.py new file mode 100644 index 0000000..1cb0ab7 --- /dev/null +++ b/src/lims_utils/expeye_client/api/proteins/get_protein_proteins_protein_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.protein_out import ProteinOut +from ...types import Response + + +def _get_kwargs( + protein_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proteins/{protein_id}".format( + protein_id=quote(str(protein_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProteinOut | None: + if response.status_code == 200: + response_200 = ProteinOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProteinOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + protein_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ProteinOut]: + """Get Protein + + Get protein + + Args: + protein_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProteinOut] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + protein_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ProteinOut | None: + """Get Protein + + Get protein + + Args: + protein_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProteinOut + """ + + return sync_detailed( + protein_id=protein_id, + client=client, + ).parsed + + +async def asyncio_detailed( + protein_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ProteinOut]: + """Get Protein + + Get protein + + Args: + protein_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProteinOut] + """ + + kwargs = _get_kwargs( + protein_id=protein_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + protein_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ProteinOut | None: + """Get Protein + + Get protein + + Args: + protein_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProteinOut + """ + + return ( + await asyncio_detailed( + protein_id=protein_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/robot_actions/__init__.py b/src/lims_utils/expeye_client/api/robot_actions/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py b/src/lims_utils/expeye_client/api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py new file mode 100644 index 0000000..ab068e5 --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.laser_action_out import LaserActionOut +from ...models.laser_point_list_in import LaserPointListIn +from ...types import Response + + +def _get_kwargs( + robot_action_id: int, + *, + body: LaserPointListIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/robot-actions/{robot_action_id}/laser/points".format( + robot_action_id=quote(str(robot_action_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LaserActionOut | None: + if response.status_code == 201: + response_201 = LaserActionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LaserActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserPointListIn, +) -> Response[HTTPValidationError | LaserActionOut]: + """Add Laser Points + + Add laser points + + Args: + robot_action_id (int): + body (LaserPointListIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserPointListIn, +) -> HTTPValidationError | LaserActionOut | None: + """Add Laser Points + + Add laser points + + Args: + robot_action_id (int): + body (LaserPointListIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserActionOut + """ + + return sync_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserPointListIn, +) -> Response[HTTPValidationError | LaserActionOut]: + """Add Laser Points + + Add laser points + + Args: + robot_action_id (int): + body (LaserPointListIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserPointListIn, +) -> HTTPValidationError | LaserActionOut | None: + """Add Laser Points + + Add laser points + + Args: + robot_action_id (int): + body (LaserPointListIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserActionOut + """ + + return ( + await asyncio_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py b/src/lims_utils/expeye_client/api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py new file mode 100644 index 0000000..eba5d2f --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.laser_action_in import LaserActionIn +from ...models.laser_action_out import LaserActionOut +from ...types import Response + + +def _get_kwargs( + robot_action_id: int, + *, + body: LaserActionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/robot-actions/{robot_action_id}/laser".format( + robot_action_id=quote(str(robot_action_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LaserActionOut | None: + if response.status_code == 201: + response_201 = LaserActionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LaserActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserActionIn, +) -> Response[HTTPValidationError | LaserActionOut]: + """Create Laser Action + + Create laser points and parameters + + Args: + robot_action_id (int): + body (LaserActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserActionIn, +) -> HTTPValidationError | LaserActionOut | None: + """Create Laser Action + + Create laser points and parameters + + Args: + robot_action_id (int): + body (LaserActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserActionOut + """ + + return sync_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserActionIn, +) -> Response[HTTPValidationError | LaserActionOut]: + """Create Laser Action + + Create laser points and parameters + + Args: + robot_action_id (int): + body (LaserActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserActionIn, +) -> HTTPValidationError | LaserActionOut | None: + """Create Laser Action + + Create laser points and parameters + + Args: + robot_action_id (int): + body (LaserActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserActionOut + """ + + return ( + await asyncio_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py b/src/lims_utils/expeye_client/api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py new file mode 100644 index 0000000..342ab68 --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.laser_action_out import LaserActionOut +from ...types import Response + + +def _get_kwargs( + robot_action_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/robot-actions/{robot_action_id}/laser".format( + robot_action_id=quote(str(robot_action_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LaserActionOut | None: + if response.status_code == 200: + response_200 = LaserActionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LaserActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | LaserActionOut]: + """Get Laser Action + + Get laser points and parameters + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | LaserActionOut | None: + """Get Laser Action + + Get laser points and parameters + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserActionOut + """ + + return sync_detailed( + robot_action_id=robot_action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | LaserActionOut]: + """Get Laser Action + + Get laser points and parameters + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | LaserActionOut | None: + """Get Laser Action + + Get laser points and parameters + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserActionOut + """ + + return ( + await asyncio_detailed( + robot_action_id=robot_action_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py b/src/lims_utils/expeye_client/api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py new file mode 100644 index 0000000..91a53d7 --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.robot_action_out import RobotActionOut +from ...types import Response + + +def _get_kwargs( + robot_action_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/robot-actions/{robot_action_id}".format( + robot_action_id=quote(str(robot_action_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RobotActionOut | None: + if response.status_code == 200: + response_200 = RobotActionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RobotActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | RobotActionOut]: + """Get Robot Action + + Get robot action + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RobotActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | RobotActionOut | None: + """Get Robot Action + + Get robot action + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RobotActionOut + """ + + return sync_detailed( + robot_action_id=robot_action_id, + client=client, + ).parsed + + +async def asyncio_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | RobotActionOut]: + """Get Robot Action + + Get robot action + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RobotActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + robot_action_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | RobotActionOut | None: + """Get Robot Action + + Get robot action + + Args: + robot_action_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RobotActionOut + """ + + return ( + await asyncio_detailed( + robot_action_id=robot_action_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py b/src/lims_utils/expeye_client/api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py new file mode 100644 index 0000000..45bfe97 --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.laser_parameters_in import LaserParametersIn +from ...models.laser_parameters_out import LaserParametersOut +from ...types import Response + + +def _get_kwargs( + robot_action_id: int, + *, + body: LaserParametersIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/robot-actions/{robot_action_id}/laser/parameters".format( + robot_action_id=quote(str(robot_action_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | LaserParametersOut | None: + if response.status_code == 200: + response_200 = LaserParametersOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | LaserParametersOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserParametersIn, +) -> Response[HTTPValidationError | LaserParametersOut]: + """Update Laser Parameters + + Update laser parameters + + Args: + robot_action_id (int): + body (LaserParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserParametersOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserParametersIn, +) -> HTTPValidationError | LaserParametersOut | None: + """Update Laser Parameters + + Update laser parameters + + Args: + robot_action_id (int): + body (LaserParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserParametersOut + """ + + return sync_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserParametersIn, +) -> Response[HTTPValidationError | LaserParametersOut]: + """Update Laser Parameters + + Update laser parameters + + Args: + robot_action_id (int): + body (LaserParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | LaserParametersOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: LaserParametersIn, +) -> HTTPValidationError | LaserParametersOut | None: + """Update Laser Parameters + + Update laser parameters + + Args: + robot_action_id (int): + body (LaserParametersIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | LaserParametersOut + """ + + return ( + await asyncio_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py b/src/lims_utils/expeye_client/api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py new file mode 100644 index 0000000..fa84cea --- /dev/null +++ b/src/lims_utils/expeye_client/api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.robot_action_optional import RobotActionOptional +from ...models.robot_action_out import RobotActionOut +from ...types import Response + + +def _get_kwargs( + robot_action_id: int, + *, + body: RobotActionOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/robot-actions/{robot_action_id}".format( + robot_action_id=quote(str(robot_action_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RobotActionOut | None: + if response.status_code == 200: + response_200 = RobotActionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RobotActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: RobotActionOptional, +) -> Response[HTTPValidationError | RobotActionOut]: + """Update Robot Action + + Update existing robot action + + Args: + robot_action_id (int): + body (RobotActionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RobotActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: RobotActionOptional, +) -> HTTPValidationError | RobotActionOut | None: + """Update Robot Action + + Update existing robot action + + Args: + robot_action_id (int): + body (RobotActionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RobotActionOut + """ + + return sync_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: RobotActionOptional, +) -> Response[HTTPValidationError | RobotActionOut]: + """Update Robot Action + + Update existing robot action + + Args: + robot_action_id (int): + body (RobotActionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RobotActionOut] + """ + + kwargs = _get_kwargs( + robot_action_id=robot_action_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + robot_action_id: int, + *, + client: AuthenticatedClient, + body: RobotActionOptional, +) -> HTTPValidationError | RobotActionOut | None: + """Update Robot Action + + Update existing robot action + + Args: + robot_action_id (int): + body (RobotActionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RobotActionOut + """ + + return ( + await asyncio_detailed( + robot_action_id=robot_action_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sample_images/__init__.py b/src/lims_utils/expeye_client/api/sample_images/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sample_images/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py b/src/lims_utils/expeye_client/api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py new file mode 100644 index 0000000..e3c221b --- /dev/null +++ b/src/lims_utils/expeye_client/api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py @@ -0,0 +1,167 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + sample_image_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/sample-images/{sample_image_id}".format( + sample_image_id=quote(str(sample_image_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Sample Image + + Delete sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_image_id=sample_image_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Sample Image + + Delete sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + sample_image_id=sample_image_id, + client=client, + ).parsed + + +async def asyncio_detailed( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Sample Image + + Delete sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_image_id=sample_image_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Sample Image + + Delete sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + sample_image_id=sample_image_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sample_images/get_sample_image_sample_images_sample_image_id_get.py b/src/lims_utils/expeye_client/api/sample_images/get_sample_image_sample_images_sample_image_id_get.py new file mode 100644 index 0000000..65f36c1 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sample_images/get_sample_image_sample_images_sample_image_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_image_out import SampleImageOut +from ...types import Response + + +def _get_kwargs( + sample_image_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sample-images/{sample_image_id}".format( + sample_image_id=quote(str(sample_image_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleImageOut | None: + if response.status_code == 200: + response_200 = SampleImageOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleImageOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleImageOut]: + """Get Sample Image + + Get sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleImageOut] + """ + + kwargs = _get_kwargs( + sample_image_id=sample_image_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleImageOut | None: + """Get Sample Image + + Get sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleImageOut + """ + + return sync_detailed( + sample_image_id=sample_image_id, + client=client, + ).parsed + + +async def asyncio_detailed( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleImageOut]: + """Get Sample Image + + Get sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleImageOut] + """ + + kwargs = _get_kwargs( + sample_image_id=sample_image_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_image_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleImageOut | None: + """Get Sample Image + + Get sample image + + Args: + sample_image_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleImageOut + """ + + return ( + await asyncio_detailed( + sample_image_id=sample_image_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py b/src/lims_utils/expeye_client/api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py new file mode 100644 index 0000000..a5cb916 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_image_optional import SampleImageOptional +from ...models.sample_image_out import SampleImageOut +from ...types import Response + + +def _get_kwargs( + sample_image_id: int, + *, + body: SampleImageOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/sample-images/{sample_image_id}".format( + sample_image_id=quote(str(sample_image_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleImageOut | None: + if response.status_code == 200: + response_200 = SampleImageOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleImageOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_image_id: int, + *, + client: AuthenticatedClient, + body: SampleImageOptional, +) -> Response[HTTPValidationError | SampleImageOut]: + """Update Sample Image + + Update sample image + + Args: + sample_image_id (int): + body (SampleImageOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleImageOut] + """ + + kwargs = _get_kwargs( + sample_image_id=sample_image_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_image_id: int, + *, + client: AuthenticatedClient, + body: SampleImageOptional, +) -> HTTPValidationError | SampleImageOut | None: + """Update Sample Image + + Update sample image + + Args: + sample_image_id (int): + body (SampleImageOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleImageOut + """ + + return sync_detailed( + sample_image_id=sample_image_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_image_id: int, + *, + client: AuthenticatedClient, + body: SampleImageOptional, +) -> Response[HTTPValidationError | SampleImageOut]: + """Update Sample Image + + Update sample image + + Args: + sample_image_id (int): + body (SampleImageOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleImageOut] + """ + + kwargs = _get_kwargs( + sample_image_id=sample_image_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_image_id: int, + *, + client: AuthenticatedClient, + body: SampleImageOptional, +) -> HTTPValidationError | SampleImageOut | None: + """Update Sample Image + + Update sample image + + Args: + sample_image_id (int): + body (SampleImageOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleImageOut + """ + + return ( + await asyncio_detailed( + sample_image_id=sample_image_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/__init__.py b/src/lims_utils/expeye_client/api/samples/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py b/src/lims_utils/expeye_client/api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py new file mode 100644 index 0000000..2a8bca4 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_in import DiffractionPlanIn +from ...models.diffraction_plan_out import DiffractionPlanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + sample_id: int, + *, + body: DiffractionPlanIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/samples/{sample_id}/diffraction-plan".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DiffractionPlanOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DiffractionPlanOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DiffractionPlanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanIn, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Create Diffraction Plan + + Create diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanIn, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Create Diffraction Plan + + Create diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanIn, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Create Diffraction Plan + + Create diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanIn, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Create Diffraction Plan + + Create diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_image_samples_sample_id_images_post.py b/src/lims_utils/expeye_client/api/samples/create_sample_image_samples_sample_id_images_post.py new file mode 100644 index 0000000..783c82c --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/create_sample_image_samples_sample_id_images_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_image_in import SampleImageIn +from ...models.sample_image_out import SampleImageOut +from ...types import Response + + +def _get_kwargs( + sample_id: int, + *, + body: SampleImageIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/samples/{sample_id}/images".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleImageOut | None: + if response.status_code == 201: + response_201 = SampleImageOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleImageOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleImageIn, +) -> Response[HTTPValidationError | SampleImageOut]: + """Create Sample Image + + Create sample image + + Args: + sample_id (int): + body (SampleImageIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleImageOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleImageIn, +) -> HTTPValidationError | SampleImageOut | None: + """Create Sample Image + + Create sample image + + Args: + sample_id (int): + body (SampleImageIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleImageOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleImageIn, +) -> Response[HTTPValidationError | SampleImageOut]: + """Create Sample Image + + Create sample image + + Args: + sample_id (int): + body (SampleImageIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleImageOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleImageIn, +) -> HTTPValidationError | SampleImageOut | None: + """Create Sample Image + + Create sample image + + Args: + sample_id (int): + body (SampleImageIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleImageOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py b/src/lims_utils/expeye_client/api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py new file mode 100644 index 0000000..a2a705d --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_ligand_out import SampleLigandOut +from ...types import Response + + +def _get_kwargs( + sample_id: int, + ligand_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/samples/{sample_id}/ligands/{ligand_id}".format( + sample_id=quote(str(sample_id), safe=""), + ligand_id=quote(str(ligand_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleLigandOut | None: + if response.status_code == 201: + response_201 = SampleLigandOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleLigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleLigandOut]: + """Create Sample Ligand + + Add ligand to sample + + Args: + sample_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleLigandOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + ligand_id=ligand_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleLigandOut | None: + """Create Sample Ligand + + Add ligand to sample + + Args: + sample_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleLigandOut + """ + + return sync_detailed( + sample_id=sample_id, + ligand_id=ligand_id, + client=client, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleLigandOut]: + """Create Sample Ligand + + Add ligand to sample + + Args: + sample_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleLigandOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + ligand_id=ligand_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + ligand_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleLigandOut | None: + """Create Sample Ligand + + Add ligand to sample + + Args: + sample_id (int): + ligand_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleLigandOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + ligand_id=ligand_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_position_samples_sample_id_positions_post.py b/src/lims_utils/expeye_client/api/samples/create_sample_position_samples_sample_id_positions_post.py new file mode 100644 index 0000000..85d6949 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/create_sample_position_samples_sample_id_positions_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_position_in import SamplePositionIn +from ...models.sample_position_out import SamplePositionOut +from ...types import Response + + +def _get_kwargs( + sample_id: int, + *, + body: SamplePositionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/samples/{sample_id}/positions".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SamplePositionOut | None: + if response.status_code == 201: + response_201 = SamplePositionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SamplePositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionIn, +) -> Response[HTTPValidationError | SamplePositionOut]: + """Create Sample Position + + Create new sample position + + Args: + sample_id (int): + body (SamplePositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionIn, +) -> HTTPValidationError | SamplePositionOut | None: + """Create Sample Position + + Create new sample position + + Args: + sample_id (int): + body (SamplePositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SamplePositionOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionIn, +) -> Response[HTTPValidationError | SamplePositionOut]: + """Create Sample Position + + Create new sample position + + Args: + sample_id (int): + body (SamplePositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionIn, +) -> HTTPValidationError | SamplePositionOut | None: + """Create Sample Position + + Create new sample position + + Args: + sample_id (int): + body (SamplePositionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SamplePositionOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_samples_post.py b/src/lims_utils/expeye_client/api/samples/create_sample_samples_post.py new file mode 100644 index 0000000..625e1e7 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/create_sample_samples_post.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_in import SampleIn +from ...models.sample_out import SampleOut +from ...types import Response + + +def _get_kwargs( + *, + body: SampleIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/samples", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | list[SampleOut] | SampleOut | None: + if response.status_code == 201: + + def _parse_response_201(data: object) -> list[SampleOut] | SampleOut: + try: + if not isinstance(data, dict): + raise TypeError() + response_201_type_0 = SampleOut.from_dict(data) + + return response_201_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, list): + raise TypeError() + response_201_type_1 = [] + _response_201_type_1 = data + for response_201_type_1_item_data in _response_201_type_1: + response_201_type_1_item = SampleOut.from_dict(response_201_type_1_item_data) + + response_201_type_1.append(response_201_type_1_item) + + return response_201_type_1 + + response_201 = _parse_response_201(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | list[SampleOut] | SampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: SampleIn, +) -> Response[HTTPValidationError | list[SampleOut] | SampleOut]: + """Create Sample + + Create new sample. This creates orphaned samples, which cannot be linked to a session or proposal, + unless that information is held elsewhere. + + Args: + body (SampleIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[SampleOut] | SampleOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: SampleIn, +) -> HTTPValidationError | list[SampleOut] | SampleOut | None: + """Create Sample + + Create new sample. This creates orphaned samples, which cannot be linked to a session or proposal, + unless that information is held elsewhere. + + Args: + body (SampleIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[SampleOut] | SampleOut + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: SampleIn, +) -> Response[HTTPValidationError | list[SampleOut] | SampleOut]: + """Create Sample + + Create new sample. This creates orphaned samples, which cannot be linked to a session or proposal, + unless that information is held elsewhere. + + Args: + body (SampleIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | list[SampleOut] | SampleOut] + """ + + kwargs = _get_kwargs( + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: SampleIn, +) -> HTTPValidationError | list[SampleOut] | SampleOut | None: + """Create Sample + + Create new sample. This creates orphaned samples, which cannot be linked to a session or proposal, + unless that information is held elsewhere. + + Args: + body (SampleIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | list[SampleOut] | SampleOut + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py b/src/lims_utils/expeye_client/api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py new file mode 100644 index 0000000..ff3c0b6 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_position_optional import SamplePositionOptional +from ...models.sample_position_out import SamplePositionOut +from ...types import Response + + +def _get_kwargs( + sample_id: int, + position_id: int, + *, + body: SamplePositionOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/samples/{sample_id}/positions/{position_id}".format( + sample_id=quote(str(sample_id), safe=""), + position_id=quote(str(position_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SamplePositionOut | None: + if response.status_code == 200: + response_200 = SamplePositionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SamplePositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + position_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, +) -> Response[HTTPValidationError | SamplePositionOut]: + """Edit Sample Position + + Edit single sample position + + Args: + sample_id (int): + position_id (int): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + position_id=position_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + position_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, +) -> HTTPValidationError | SamplePositionOut | None: + """Edit Sample Position + + Edit single sample position + + Args: + sample_id (int): + position_id (int): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SamplePositionOut + """ + + return sync_detailed( + sample_id=sample_id, + position_id=position_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + position_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, +) -> Response[HTTPValidationError | SamplePositionOut]: + """Edit Sample Position + + Edit single sample position + + Args: + sample_id (int): + position_id (int): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + position_id=position_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + position_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, +) -> HTTPValidationError | SamplePositionOut | None: + """Edit Sample Position + + Edit single sample position + + Args: + sample_id (int): + position_id (int): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SamplePositionOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + position_id=position_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/edit_sample_positions_samples_sample_id_positions_patch.py b/src/lims_utils/expeye_client/api/samples/edit_sample_positions_samples_sample_id_positions_patch.py new file mode 100644 index 0000000..be9a88c --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/edit_sample_positions_samples_sample_id_positions_patch.py @@ -0,0 +1,215 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_position_out import PagedSamplePositionOut +from ...models.sample_position_optional import SamplePositionOptional +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + sample_id: int, + *, + body: SamplePositionOptional, + position_type: None | str | Unset = UNSET, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + json_position_type: None | str | Unset + if isinstance(position_type, Unset): + json_position_type = UNSET + else: + json_position_type = position_type + params["positionType"] = json_position_type + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/samples/{sample_id}/positions".format( + sample_id=quote(str(sample_id), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSamplePositionOut | None: + if response.status_code == 200: + response_200 = PagedSamplePositionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSamplePositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, + position_type: None | str | Unset = UNSET, +) -> Response[HTTPValidationError | PagedSamplePositionOut]: + """Edit Sample Positions + + Edit multiple sample positions in a sample simultaneously + + Args: + sample_id (int): + position_type (None | str | Unset): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + position_type=position_type, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, + position_type: None | str | Unset = UNSET, +) -> HTTPValidationError | PagedSamplePositionOut | None: + """Edit Sample Positions + + Edit multiple sample positions in a sample simultaneously + + Args: + sample_id (int): + position_type (None | str | Unset): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSamplePositionOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + body=body, + position_type=position_type, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, + position_type: None | str | Unset = UNSET, +) -> Response[HTTPValidationError | PagedSamplePositionOut]: + """Edit Sample Positions + + Edit multiple sample positions in a sample simultaneously + + Args: + sample_id (int): + position_type (None | str | Unset): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + position_type=position_type, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + body: SamplePositionOptional, + position_type: None | str | Unset = UNSET, +) -> HTTPValidationError | PagedSamplePositionOut | None: + """Edit Sample Positions + + Edit multiple sample positions in a sample simultaneously + + Args: + sample_id (int): + position_type (None | str | Unset): + body (SamplePositionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSamplePositionOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + body=body, + position_type=position_type, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/edit_sample_samples_sample_id_patch.py b/src/lims_utils/expeye_client/api/samples/edit_sample_samples_sample_id_patch.py new file mode 100644 index 0000000..9e585e2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/edit_sample_samples_sample_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_optional import SampleOptional +from ...models.sample_out import SampleOut +from ...types import Response + + +def _get_kwargs( + sample_id: int, + *, + body: SampleOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/samples/{sample_id}".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleOut | None: + if response.status_code == 200: + response_200 = SampleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleOptional, +) -> Response[HTTPValidationError | SampleOut]: + """Edit Sample + + Edit sample + + Args: + sample_id (int): + body (SampleOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleOptional, +) -> HTTPValidationError | SampleOut | None: + """Edit Sample + + Edit sample + + Args: + sample_id (int): + body (SampleOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleOptional, +) -> Response[HTTPValidationError | SampleOut]: + """Edit Sample + + Edit sample + + Args: + sample_id (int): + body (SampleOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + body: SampleOptional, +) -> HTTPValidationError | SampleOut | None: + """Edit Sample + + Edit sample + + Args: + sample_id (int): + body (SampleOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py b/src/lims_utils/expeye_client/api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py new file mode 100644 index 0000000..ff4d9b3 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_out import DiffractionPlanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + sample_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/samples/{sample_id}/diffraction-plan".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DiffractionPlanOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DiffractionPlanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Get Diffraction Plans + + Get diffraction plan + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Get Diffraction Plans + + Get diffraction plan + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Get Diffraction Plans + + Get diffraction plan + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Get Diffraction Plans + + Get diffraction plan + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py b/src/lims_utils/expeye_client/api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py new file mode 100644 index 0000000..c5b8bdf --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_energy_scan_out import PagedEnergyScanOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + sample_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/samples/{sample_id}/energy-scans".format( + sample_id=quote(str(sample_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedEnergyScanOut | None: + if response.status_code == 200: + response_200 = PagedEnergyScanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedEnergyScanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedEnergyScanOut]: + """Get Energy Scans + + Get energy scans for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedEnergyScanOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedEnergyScanOut | None: + """Get Energy Scans + + Get energy scans for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedEnergyScanOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedEnergyScanOut]: + """Get Energy Scans + + Get energy scans for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedEnergyScanOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedEnergyScanOut | None: + """Get Energy Scans + + Get energy scans for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedEnergyScanOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_images_samples_sample_id_images_get.py b/src/lims_utils/expeye_client/api/samples/get_sample_images_samples_sample_id_images_get.py new file mode 100644 index 0000000..21e0c54 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/get_sample_images_samples_sample_id_images_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_image_out import PagedSampleImageOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + sample_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/samples/{sample_id}/images".format( + sample_id=quote(str(sample_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSampleImageOut | None: + if response.status_code == 200: + response_200 = PagedSampleImageOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSampleImageOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleImageOut]: + """Get Sample Images + + Get sample images for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleImageOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleImageOut | None: + """Get Sample Images + + Get sample images for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleImageOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleImageOut]: + """Get Sample Images + + Get sample images for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleImageOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleImageOut | None: + """Get Sample Images + + Get sample images for sample + + Args: + sample_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleImageOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_ligands_samples_sample_id_ligands_get.py b/src/lims_utils/expeye_client/api/samples/get_sample_ligands_samples_sample_id_ligands_get.py new file mode 100644 index 0000000..ca2f9ff --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/get_sample_ligands_samples_sample_id_ligands_get.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_ligand_out import PagedLigandOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + sample_id: int, + *, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_name: None | str | Unset + if isinstance(name, Unset): + json_name = UNSET + else: + json_name = name + params["name"] = json_name + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/samples/{sample_id}/ligands".format( + sample_id=quote(str(sample_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedLigandOut | None: + if response.status_code == 200: + response_200 = PagedLigandOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedLigandOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedLigandOut]: + """Get Sample Ligands + + Get sample ligands + + Args: + sample_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedLigandOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + name=name, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedLigandOut | None: + """Get Sample Ligands + + Get sample ligands + + Args: + sample_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedLigandOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + name=name, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedLigandOut]: + """Get Sample Ligands + + Get sample ligands + + Args: + sample_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedLigandOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + name=name, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedLigandOut | None: + """Get Sample Ligands + + Get sample ligands + + Args: + sample_id (int): + name (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedLigandOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + name=name, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_positions_samples_sample_id_positions_get.py b/src/lims_utils/expeye_client/api/samples/get_sample_positions_samples_sample_id_positions_get.py new file mode 100644 index 0000000..bd9188c --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/get_sample_positions_samples_sample_id_positions_get.py @@ -0,0 +1,229 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_position_out import PagedSamplePositionOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + sample_id: int, + *, + position_type: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_position_type: None | str | Unset + if isinstance(position_type, Unset): + json_position_type = UNSET + else: + json_position_type = position_type + params["positionType"] = json_position_type + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/samples/{sample_id}/positions".format( + sample_id=quote(str(sample_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSamplePositionOut | None: + if response.status_code == 200: + response_200 = PagedSamplePositionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSamplePositionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + position_type: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSamplePositionOut]: + """Get Sample Positions + + Get sample positions + + Args: + sample_id (int): + position_type (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + position_type=position_type, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + position_type: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSamplePositionOut | None: + """Get Sample Positions + + Get sample positions + + Args: + sample_id (int): + position_type (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSamplePositionOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + position_type=position_type, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + position_type: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSamplePositionOut]: + """Get Sample Positions + + Get sample positions + + Args: + sample_id (int): + position_type (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSamplePositionOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + position_type=position_type, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + position_type: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSamplePositionOut | None: + """Get Sample Positions + + Get sample positions + + Args: + sample_id (int): + position_type (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSamplePositionOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + position_type=position_type, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_samples_sample_id_get.py b/src/lims_utils/expeye_client/api/samples/get_sample_samples_sample_id_get.py new file mode 100644 index 0000000..48dc751 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/get_sample_samples_sample_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.sample_out import SampleOut +from ...types import Response + + +def _get_kwargs( + sample_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/samples/{sample_id}".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SampleOut | None: + if response.status_code == 200: + response_200 = SampleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleOut]: + """Get Sample + + Retrieve a single Sample + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleOut | None: + """Get Sample + + Retrieve a single Sample + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleOut + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SampleOut]: + """Get Sample + + Retrieve a single Sample + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SampleOut] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SampleOut | None: + """Get Sample + + Retrieve a single Sample + + Args: + sample_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SampleOut + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py b/src/lims_utils/expeye_client/api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py new file mode 100644 index 0000000..3a09e17 --- /dev/null +++ b/src/lims_utils/expeye_client/api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_optional import DiffractionPlanOptional +from ...models.diffraction_plan_out import DiffractionPlanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + sample_id: int, + *, + body: DiffractionPlanOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/samples/{sample_id}/diffraction-plan".format( + sample_id=quote(str(sample_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DiffractionPlanOut | HTTPValidationError | None: + if response.status_code == 200: + response_200 = DiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DiffractionPlanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Update Diffraction Plan + + Update diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Update Diffraction Plan + + Update diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return sync_detailed( + sample_id=sample_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[DiffractionPlanOut | HTTPValidationError]: + """Update Diffraction Plan + + Update diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DiffractionPlanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + sample_id=sample_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + sample_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> DiffractionPlanOut | HTTPValidationError | None: + """Update Diffraction Plan + + Update diffraction plan + + Args: + sample_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DiffractionPlanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + sample_id=sample_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/__init__.py b/src/lims_utils/expeye_client/api/sessions/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py b/src/lims_utils/expeye_client/api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py new file mode 100644 index 0000000..70a0b0c --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.data_collection_group_in import DataCollectionGroupIn +from ...models.data_collection_group_out import DataCollectionGroupOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: DataCollectionGroupIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/data-groups".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DataCollectionGroupOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DataCollectionGroupOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DataCollectionGroupOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupIn, +) -> Response[DataCollectionGroupOut | HTTPValidationError]: + """Create Data Collection Group + + Create new data collection group + + Args: + proposal_reference (str): + visit_number (int): + body (DataCollectionGroupIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionGroupOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupIn, +) -> DataCollectionGroupOut | HTTPValidationError | None: + """Create Data Collection Group + + Create new data collection group + + Args: + proposal_reference (str): + visit_number (int): + body (DataCollectionGroupIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionGroupOut | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupIn, +) -> Response[DataCollectionGroupOut | HTTPValidationError]: + """Create Data Collection Group + + Create new data collection group + + Args: + proposal_reference (str): + visit_number (int): + body (DataCollectionGroupIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DataCollectionGroupOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: DataCollectionGroupIn, +) -> DataCollectionGroupOut | HTTPValidationError | None: + """Create Data Collection Group + + Create new data collection group + + Args: + proposal_reference (str): + visit_number (int): + body (DataCollectionGroupIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DataCollectionGroupOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py b/src/lims_utils/expeye_client/api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py new file mode 100644 index 0000000..0213a0d --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.energy_scan_in import EnergyScanIn +from ...models.energy_scan_out import EnergyScanOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: EnergyScanIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/energy-scans".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> EnergyScanOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = EnergyScanOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[EnergyScanOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: EnergyScanIn, +) -> Response[EnergyScanOut | HTTPValidationError]: + """Create Energy Scans + + Create new energy scan + + Args: + proposal_reference (str): + visit_number (int): + body (EnergyScanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EnergyScanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: EnergyScanIn, +) -> EnergyScanOut | HTTPValidationError | None: + """Create Energy Scans + + Create new energy scan + + Args: + proposal_reference (str): + visit_number (int): + body (EnergyScanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EnergyScanOut | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: EnergyScanIn, +) -> Response[EnergyScanOut | HTTPValidationError]: + """Create Energy Scans + + Create new energy scan + + Args: + proposal_reference (str): + visit_number (int): + body (EnergyScanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[EnergyScanOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: EnergyScanIn, +) -> EnergyScanOut | HTTPValidationError | None: + """Create Energy Scans + + Create new energy scan + + Args: + proposal_reference (str): + visit_number (int): + body (EnergyScanIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + EnergyScanOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py b/src/lims_utils/expeye_client/api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py new file mode 100644 index 0000000..bfc951b --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.fluorescence_spectrum_in import FluorescenceSpectrumIn +from ...models.fluorescence_spectrum_out import FluorescenceSpectrumOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: FluorescenceSpectrumIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/fluorescence-spectrums".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = FluorescenceSpectrumOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumIn, +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + """Create Fluorescence Spectrum Params + + Create new fluorescence spectrum parameters entry + + Args: + proposal_reference (str): + visit_number (int): + body (FluorescenceSpectrumIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FluorescenceSpectrumOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumIn, +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + """Create Fluorescence Spectrum Params + + Create new fluorescence spectrum parameters entry + + Args: + proposal_reference (str): + visit_number (int): + body (FluorescenceSpectrumIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FluorescenceSpectrumOut | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumIn, +) -> Response[FluorescenceSpectrumOut | HTTPValidationError]: + """Create Fluorescence Spectrum Params + + Create new fluorescence spectrum parameters entry + + Args: + proposal_reference (str): + visit_number (int): + body (FluorescenceSpectrumIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[FluorescenceSpectrumOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: FluorescenceSpectrumIn, +) -> FluorescenceSpectrumOut | HTTPValidationError | None: + """Create Fluorescence Spectrum Params + + Create new fluorescence spectrum parameters entry + + Args: + proposal_reference (str): + visit_number (int): + body (FluorescenceSpectrumIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + FluorescenceSpectrumOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py b/src/lims_utils/expeye_client/api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py new file mode 100644 index 0000000..7ed29a8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_person_out import PagedPersonOut +from ...models.person_with_role import PersonWithRole +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: list[PersonWithRole], +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/persons".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedPersonOut | None: + if response.status_code == 201: + response_201 = PagedPersonOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedPersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonWithRole], +) -> Response[HTTPValidationError | PagedPersonOut]: + """Create Persons + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonWithRole], +) -> HTTPValidationError | PagedPersonOut | None: + """Create Persons + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonWithRole], +) -> Response[HTTPValidationError | PagedPersonOut]: + """Create Persons + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonWithRole], +) -> HTTPValidationError | PagedPersonOut | None: + """Create Persons + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py b/src/lims_utils/expeye_client/api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py new file mode 100644 index 0000000..e1dadaf --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.robot_action_in import RobotActionIn +from ...models.robot_action_out import RobotActionOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: RobotActionIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/robot-actions".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | RobotActionOut | None: + if response.status_code == 201: + response_201 = RobotActionOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | RobotActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: RobotActionIn, +) -> Response[HTTPValidationError | RobotActionOut]: + """Create Robot Action + + Create new robot action entry + + Args: + proposal_reference (str): + visit_number (int): + body (RobotActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RobotActionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: RobotActionIn, +) -> HTTPValidationError | RobotActionOut | None: + """Create Robot Action + + Create new robot action entry + + Args: + proposal_reference (str): + visit_number (int): + body (RobotActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RobotActionOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: RobotActionIn, +) -> Response[HTTPValidationError | RobotActionOut]: + """Create Robot Action + + Create new robot action entry + + Args: + proposal_reference (str): + visit_number (int): + body (RobotActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | RobotActionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: RobotActionIn, +) -> HTTPValidationError | RobotActionOut | None: + """Create Robot Action + + Create new robot action entry + + Args: + proposal_reference (str): + visit_number (int): + body (RobotActionIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | RobotActionOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py b/src/lims_utils/expeye_client/api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py new file mode 100644 index 0000000..0c5df56 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.session_type_in import SessionTypeIn +from ...models.session_type_out import SessionTypeOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: SessionTypeIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/session-types".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SessionTypeOut | None: + if response.status_code == 201: + response_201 = SessionTypeOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SessionTypeOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> Response[HTTPValidationError | SessionTypeOut]: + """Create Session Type + + Add new session type to session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionTypeOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> HTTPValidationError | SessionTypeOut | None: + """Create Session Type + + Add new session type to session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionTypeOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> Response[HTTPValidationError | SessionTypeOut]: + """Create Session Type + + Add new session type to session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionTypeOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> HTTPValidationError | SessionTypeOut | None: + """Create Session Type + + Add new session type to session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionTypeOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py b/src/lims_utils/expeye_client/api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py new file mode 100644 index 0000000..f2968b4 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py @@ -0,0 +1,191 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote +from uuid import UUID + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.session_type_in import SessionTypeIn +from ...models.session_type_out import SessionTypeOut +from ...types import Response + + +def _get_kwargs( + session_uuid: UUID, + *, + body: SessionTypeIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/sessions/{session_uuid}/session-types".format( + session_uuid=quote(str(session_uuid), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SessionTypeOut | None: + if response.status_code == 201: + response_201 = SessionTypeOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SessionTypeOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + session_uuid: UUID, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> Response[HTTPValidationError | SessionTypeOut]: + """Create Session Type Through Uuid + + Add new session type to session (using UUID) + + Args: + session_uuid (UUID): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionTypeOut] + """ + + kwargs = _get_kwargs( + session_uuid=session_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + session_uuid: UUID, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> HTTPValidationError | SessionTypeOut | None: + """Create Session Type Through Uuid + + Add new session type to session (using UUID) + + Args: + session_uuid (UUID): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionTypeOut + """ + + return sync_detailed( + session_uuid=session_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + session_uuid: UUID, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> Response[HTTPValidationError | SessionTypeOut]: + """Create Session Type Through Uuid + + Add new session type to session (using UUID) + + Args: + session_uuid (UUID): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionTypeOut] + """ + + kwargs = _get_kwargs( + session_uuid=session_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + session_uuid: UUID, + *, + client: AuthenticatedClient, + body: SessionTypeIn, +) -> HTTPValidationError | SessionTypeOut | None: + """Create Session Type Through Uuid + + Add new session type to session (using UUID) + + Args: + session_uuid (UUID): + body (SessionTypeIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionTypeOut + """ + + return ( + await asyncio_detailed( + session_uuid=session_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py b/src/lims_utils/expeye_client/api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py new file mode 100644 index 0000000..51207be --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py @@ -0,0 +1,181 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Session + + Delete session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Session + + Delete session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> Response[Any | HTTPValidationError]: + """Delete Session + + Delete session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> Any | HTTPValidationError | None: + """Delete Session + + Delete session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_beamlines_beamlines_get.py b/src/lims_utils/expeye_client/api/sessions/get_beamlines_beamlines_get.py new file mode 100644 index 0000000..98b40ef --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_beamlines_beamlines_get.py @@ -0,0 +1,131 @@ +from http import HTTPStatus +from typing import Any, cast + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import Response + + +def _get_kwargs() -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/beamlines", + } + + return _kwargs + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx2.Response) -> list[str] | None: + if response.status_code == 200: + response_200 = cast(list[str], response.json()) + + return response_200 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: AuthenticatedClient | Client, response: httpx2.Response) -> Response[list[str]]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[list[str]]: + """Get Beamlines + + Get individual beamlines + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[list[str]] + """ + + kwargs = _get_kwargs() + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient | Client, +) -> list[str] | None: + """Get Beamlines + + Get individual beamlines + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + list[str] + """ + + return sync_detailed( + client=client, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient | Client, +) -> Response[list[str]]: + """Get Beamlines + + Get individual beamlines + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[list[str]] + """ + + kwargs = _get_kwargs() + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient | Client, +) -> list[str] | None: + """Get Beamlines + + Get individual beamlines + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + list[str] + """ + + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py b/src/lims_utils/expeye_client/api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py new file mode 100644 index 0000000..7e83f1e --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_data_collection_group_out import PagedDataCollectionGroupOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/data-groups".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDataCollectionGroupOut | None: + if response.status_code == 200: + response_200 = PagedDataCollectionGroupOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDataCollectionGroupOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDataCollectionGroupOut]: + """Get Collection Groups + + List collection groups belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionGroupOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDataCollectionGroupOut | None: + """Get Collection Groups + + List collection groups belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionGroupOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDataCollectionGroupOut]: + """Get Collection Groups + + List collection groups belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDataCollectionGroupOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDataCollectionGroupOut | None: + """Get Collection Groups + + List collection groups belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDataCollectionGroupOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py b/src/lims_utils/expeye_client/api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py new file mode 100644 index 0000000..9035dc2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py @@ -0,0 +1,223 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_energy_scan_out import PagedEnergyScanOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/energy-scans".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedEnergyScanOut | None: + if response.status_code == 200: + response_200 = PagedEnergyScanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedEnergyScanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedEnergyScanOut]: + """Get Energy Scans + + List energy scans belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedEnergyScanOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedEnergyScanOut | None: + """Get Energy Scans + + List energy scans belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedEnergyScanOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedEnergyScanOut]: + """Get Energy Scans + + List energy scans belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedEnergyScanOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedEnergyScanOut | None: + """Get Energy Scans + + List energy scans belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedEnergyScanOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py b/src/lims_utils/expeye_client/api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py new file mode 100644 index 0000000..3e6b35f --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_fluorescence_spectrum_out import PagedFluorescenceSpectrumOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/fluorescence-spectrums".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedFluorescenceSpectrumOut | None: + if response.status_code == 200: + response_200 = PagedFluorescenceSpectrumOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedFluorescenceSpectrumOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFluorescenceSpectrumOut]: + """Get Fluorescence Spectrum Params List + + List fluorescence spectrum parameters belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFluorescenceSpectrumOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFluorescenceSpectrumOut | None: + """Get Fluorescence Spectrum Params List + + List fluorescence spectrum parameters belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFluorescenceSpectrumOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedFluorescenceSpectrumOut]: + """Get Fluorescence Spectrum Params List + + List fluorescence spectrum parameters belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedFluorescenceSpectrumOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedFluorescenceSpectrumOut | None: + """Get Fluorescence Spectrum Params List + + List fluorescence spectrum parameters belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedFluorescenceSpectrumOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py b/src/lims_utils/expeye_client/api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py new file mode 100644 index 0000000..074bd7a --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_mxmr_run_blob_out import PagedMXMRRunBlobOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + file_path: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_file_path: None | str | Unset + if isinstance(file_path, Unset): + json_file_path = UNSET + else: + json_file_path = file_path + params["filePath"] = json_file_path + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/blobs".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedMXMRRunBlobOut | None: + if response.status_code == 200: + response_200 = PagedMXMRRunBlobOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedMXMRRunBlobOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedMXMRRunBlobOut]: + """Get Mxmrrun Blobs + + Get processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedMXMRRunBlobOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + file_path=file_path, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedMXMRRunBlobOut | None: + """Get Mxmrrun Blobs + + Get processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedMXMRRunBlobOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + file_path=file_path, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedMXMRRunBlobOut]: + """Get Mxmrrun Blobs + + Get processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedMXMRRunBlobOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + file_path=file_path, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + file_path: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedMXMRRunBlobOut | None: + """Get Mxmrrun Blobs + + Get processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedMXMRRunBlobOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + file_path=file_path, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py b/src/lims_utils/expeye_client/api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py new file mode 100644 index 0000000..fe2bfdb --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py @@ -0,0 +1,286 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_auto_proc_program_attachment_out import PagedAutoProcProgramAttachmentOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + legacy_join: bool | Unset = False, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["legacyJoin"] = legacy_join + + json_file_path: None | str | Unset + if isinstance(file_path, Unset): + json_file_path = UNSET + else: + json_file_path = file_path + params["filePath"] = json_file_path + + json_file_name: None | str | Unset + if isinstance(file_name, Unset): + json_file_name = UNSET + else: + json_file_name = file_name + params["fileName"] = json_file_name + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/processing-programs/attachments".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + if response.status_code == 200: + response_200 = PagedAutoProcProgramAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + legacy_join: bool | Unset = False, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + """Get Processing Program Attachments + + List processing program attachments belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + legacy_join=legacy_join, + file_path=file_path, + file_name=file_name, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + legacy_join: bool | Unset = False, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + """Get Processing Program Attachments + + List processing program attachments belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramAttachmentOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + legacy_join=legacy_join, + file_path=file_path, + file_name=file_name, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + legacy_join: bool | Unset = False, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + """Get Processing Program Attachments + + List processing program attachments belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + legacy_join=legacy_join, + file_path=file_path, + file_name=file_name, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + legacy_join: bool | Unset = False, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + """Get Processing Program Attachments + + List processing program attachments belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramAttachmentOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + legacy_join=legacy_join, + file_path=file_path, + file_name=file_name, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py b/src/lims_utils/expeye_client/api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py new file mode 100644 index 0000000..a0ed96e --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py @@ -0,0 +1,243 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_robot_action_out import PagedRobotActionOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/robot-actions".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedRobotActionOut | None: + if response.status_code == 200: + response_200 = PagedRobotActionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedRobotActionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRobotActionOut]: + """Get Robot Actions + + List robot actions belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRobotActionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRobotActionOut | None: + """Get Robot Actions + + List robot actions belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRobotActionOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedRobotActionOut]: + """Get Robot Actions + + List robot actions belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedRobotActionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedRobotActionOut | None: + """Get Robot Actions + + List robot actions belonging to a session + + Args: + proposal_reference (str): + visit_number (int): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedRobotActionOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py b/src/lims_utils/expeye_client/api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py new file mode 100644 index 0000000..8e6a626 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py @@ -0,0 +1,309 @@ +import datetime +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_union_session_event_out_session_event_with_children_out import ( + PagedUnionSessionEventOutSessionEventWithChildrenOut, +) +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + exclude: list[str] | Unset = UNSET, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_exclude: list[str] | Unset = UNSET + if not isinstance(exclude, Unset): + json_exclude = exclude + + params["exclude"] = json_exclude + + json_start_time: None | str | Unset + if isinstance(start_time, Unset): + json_start_time = UNSET + elif isinstance(start_time, datetime.datetime): + json_start_time = start_time.isoformat() + else: + json_start_time = start_time + params["startTime"] = json_start_time + + json_end_time: None | str | Unset + if isinstance(end_time, Unset): + json_end_time = UNSET + elif isinstance(end_time, datetime.datetime): + json_end_time = end_time.isoformat() + else: + json_end_time = end_time + params["endTime"] = json_end_time + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/events".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut | None: + if response.status_code == 200: + response_200 = PagedUnionSessionEventOutSessionEventWithChildrenOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + exclude: list[str] | Unset = UNSET, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut]: + """Get Session Events + + Get session events (robot actions, fluorescence spectrums, data collection groups, energy scans) + + Args: + proposal_reference (str): + visit_number (int): + exclude (list[str] | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + exclude=exclude, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + exclude: list[str] | Unset = UNSET, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut | None: + """Get Session Events + + Get session events (robot actions, fluorescence spectrums, data collection groups, energy scans) + + Args: + proposal_reference (str): + visit_number (int): + exclude (list[str] | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + exclude=exclude, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + exclude: list[str] | Unset = UNSET, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut]: + """Get Session Events + + Get session events (robot actions, fluorescence spectrums, data collection groups, energy scans) + + Args: + proposal_reference (str): + visit_number (int): + exclude (list[str] | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + exclude=exclude, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + exclude: list[str] | Unset = UNSET, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut | None: + """Get Session Events + + Get session events (robot actions, fluorescence spectrums, data collection groups, energy scans) + + Args: + proposal_reference (str): + visit_number (int): + exclude (list[str] | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUnionSessionEventOutSessionEventWithChildrenOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + exclude=exclude, + start_time=start_time, + end_time=end_time, + search=search, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py b/src/lims_utils/expeye_client/api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py new file mode 100644 index 0000000..e4926d9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py @@ -0,0 +1,307 @@ +import datetime +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_session_event_with_children_out import PagedSessionEventWithChildrenOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + include_autoproc: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_start_time: None | str | Unset + if isinstance(start_time, Unset): + json_start_time = UNSET + elif isinstance(start_time, datetime.datetime): + json_start_time = start_time.isoformat() + else: + json_start_time = start_time + params["startTime"] = json_start_time + + json_end_time: None | str | Unset + if isinstance(end_time, Unset): + json_end_time = UNSET + elif isinstance(end_time, datetime.datetime): + json_end_time = end_time.isoformat() + else: + json_end_time = end_time + params["endTime"] = json_end_time + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + params["includeAutoproc"] = include_autoproc + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/group-events".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSessionEventWithChildrenOut | None: + if response.status_code == 200: + response_200 = PagedSessionEventWithChildrenOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSessionEventWithChildrenOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + include_autoproc: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionEventWithChildrenOut]: + """Get Session Group Events + + Get session events, grouped by their parent data collection group + + Args: + proposal_reference (str): + visit_number (int): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + include_autoproc (bool | Unset): Include autoprocessing events in returned data Default: + False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionEventWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + start_time=start_time, + end_time=end_time, + search=search, + include_autoproc=include_autoproc, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + include_autoproc: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionEventWithChildrenOut | None: + """Get Session Group Events + + Get session events, grouped by their parent data collection group + + Args: + proposal_reference (str): + visit_number (int): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + include_autoproc (bool | Unset): Include autoprocessing events in returned data Default: + False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionEventWithChildrenOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + start_time=start_time, + end_time=end_time, + search=search, + include_autoproc=include_autoproc, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + include_autoproc: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionEventWithChildrenOut]: + """Get Session Group Events + + Get session events, grouped by their parent data collection group + + Args: + proposal_reference (str): + visit_number (int): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + include_autoproc (bool | Unset): Include autoprocessing events in returned data Default: + False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionEventWithChildrenOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + start_time=start_time, + end_time=end_time, + search=search, + include_autoproc=include_autoproc, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + start_time: datetime.datetime | None | Unset = UNSET, + end_time: datetime.datetime | None | Unset = UNSET, + search: None | str | Unset = UNSET, + include_autoproc: bool | Unset = False, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionEventWithChildrenOut | None: + """Get Session Group Events + + Get session events, grouped by their parent data collection group + + Args: + proposal_reference (str): + visit_number (int): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + search (None | str | Unset): + include_autoproc (bool | Unset): Include autoprocessing events in returned data Default: + False. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionEventWithChildrenOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + start_time=start_time, + end_time=end_time, + search=search, + include_autoproc=include_autoproc, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py b/src/lims_utils/expeye_client/api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py new file mode 100644 index 0000000..4aaaf91 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py @@ -0,0 +1,183 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.session_out import SessionOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SessionOut | None: + if response.status_code == 200: + response_200 = SessionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SessionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SessionOut]: + """Get Session + + Get individual session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SessionOut | None: + """Get Session + + Get individual session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | SessionOut]: + """Get Session + + Get individual session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | SessionOut | None: + """Get Session + + Get individual session + + Args: + proposal_reference (str): + visit_number (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/get_sessions_sessions_get.py b/src/lims_utils/expeye_client/api/sessions/get_sessions_sessions_get.py new file mode 100644 index 0000000..72a33cd --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/get_sessions_sessions_get.py @@ -0,0 +1,390 @@ +import datetime +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_session_out import PagedSessionOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + search: None | str | Unset = UNSET, + beam_line_name: list[str] | None | Unset = UNSET, + proposal_code: None | str | Unset = UNSET, + min_end_date: datetime.datetime | None | Unset = UNSET, + max_end_date: datetime.datetime | None | Unset = UNSET, + min_start_date: datetime.datetime | None | Unset = UNSET, + max_start_date: datetime.datetime | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = False, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_search: None | str | Unset + if isinstance(search, Unset): + json_search = UNSET + else: + json_search = search + params["search"] = json_search + + json_beam_line_name: list[str] | None | Unset + if isinstance(beam_line_name, Unset): + json_beam_line_name = UNSET + elif isinstance(beam_line_name, list): + json_beam_line_name = beam_line_name + + else: + json_beam_line_name = beam_line_name + params["beamLineName"] = json_beam_line_name + + json_proposal_code: None | str | Unset + if isinstance(proposal_code, Unset): + json_proposal_code = UNSET + else: + json_proposal_code = proposal_code + params["proposalCode"] = json_proposal_code + + json_min_end_date: None | str | Unset + if isinstance(min_end_date, Unset): + json_min_end_date = UNSET + elif isinstance(min_end_date, datetime.datetime): + json_min_end_date = min_end_date.isoformat() + else: + json_min_end_date = min_end_date + params["minEndDate"] = json_min_end_date + + json_max_end_date: None | str | Unset + if isinstance(max_end_date, Unset): + json_max_end_date = UNSET + elif isinstance(max_end_date, datetime.datetime): + json_max_end_date = max_end_date.isoformat() + else: + json_max_end_date = max_end_date + params["maxEndDate"] = json_max_end_date + + json_min_start_date: None | str | Unset + if isinstance(min_start_date, Unset): + json_min_start_date = UNSET + elif isinstance(min_start_date, datetime.datetime): + json_min_start_date = min_start_date.isoformat() + else: + json_min_start_date = min_start_date + params["minStartDate"] = json_min_start_date + + json_max_start_date: None | str | Unset + if isinstance(max_start_date, Unset): + json_max_start_date = UNSET + elif isinstance(max_start_date, datetime.datetime): + json_max_start_date = max_start_date.isoformat() + else: + json_max_start_date = max_start_date + params["maxStartDate"] = json_max_start_date + + params["active"] = active + + params["countCollections"] = count_collections + + params["hideNull"] = hide_null + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/sessions", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSessionOut | None: + if response.status_code == 200: + response_200 = PagedSessionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSessionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + beam_line_name: list[str] | None | Unset = UNSET, + proposal_code: None | str | Unset = UNSET, + min_end_date: datetime.datetime | None | Unset = UNSET, + max_end_date: datetime.datetime | None | Unset = UNSET, + min_start_date: datetime.datetime | None | Unset = UNSET, + max_start_date: datetime.datetime | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = False, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionOut]: + """Get Sessions + + List visits + + Args: + search (None | str | Unset): + beam_line_name (list[str] | None | Unset): + proposal_code (None | str | Unset): + min_end_date (datetime.datetime | None | Unset): + max_end_date (datetime.datetime | None | Unset): + min_start_date (datetime.datetime | None | Unset): + max_start_date (datetime.datetime | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: False. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionOut] + """ + + kwargs = _get_kwargs( + search=search, + beam_line_name=beam_line_name, + proposal_code=proposal_code, + min_end_date=min_end_date, + max_end_date=max_end_date, + min_start_date=min_start_date, + max_start_date=max_start_date, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + beam_line_name: list[str] | None | Unset = UNSET, + proposal_code: None | str | Unset = UNSET, + min_end_date: datetime.datetime | None | Unset = UNSET, + max_end_date: datetime.datetime | None | Unset = UNSET, + min_start_date: datetime.datetime | None | Unset = UNSET, + max_start_date: datetime.datetime | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = False, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionOut | None: + """Get Sessions + + List visits + + Args: + search (None | str | Unset): + beam_line_name (list[str] | None | Unset): + proposal_code (None | str | Unset): + min_end_date (datetime.datetime | None | Unset): + max_end_date (datetime.datetime | None | Unset): + min_start_date (datetime.datetime | None | Unset): + max_start_date (datetime.datetime | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: False. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionOut + """ + + return sync_detailed( + client=client, + search=search, + beam_line_name=beam_line_name, + proposal_code=proposal_code, + min_end_date=min_end_date, + max_end_date=max_end_date, + min_start_date=min_start_date, + max_start_date=max_start_date, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + beam_line_name: list[str] | None | Unset = UNSET, + proposal_code: None | str | Unset = UNSET, + min_end_date: datetime.datetime | None | Unset = UNSET, + max_end_date: datetime.datetime | None | Unset = UNSET, + min_start_date: datetime.datetime | None | Unset = UNSET, + max_start_date: datetime.datetime | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = False, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSessionOut]: + """Get Sessions + + List visits + + Args: + search (None | str | Unset): + beam_line_name (list[str] | None | Unset): + proposal_code (None | str | Unset): + min_end_date (datetime.datetime | None | Unset): + max_end_date (datetime.datetime | None | Unset): + min_start_date (datetime.datetime | None | Unset): + max_start_date (datetime.datetime | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: False. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSessionOut] + """ + + kwargs = _get_kwargs( + search=search, + beam_line_name=beam_line_name, + proposal_code=proposal_code, + min_end_date=min_end_date, + max_end_date=max_end_date, + min_start_date=min_start_date, + max_start_date=max_start_date, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + search: None | str | Unset = UNSET, + beam_line_name: list[str] | None | Unset = UNSET, + proposal_code: None | str | Unset = UNSET, + min_end_date: datetime.datetime | None | Unset = UNSET, + max_end_date: datetime.datetime | None | Unset = UNSET, + min_start_date: datetime.datetime | None | Unset = UNSET, + max_start_date: datetime.datetime | None | Unset = UNSET, + active: bool | Unset = False, + count_collections: bool | Unset = False, + hide_null: bool | Unset = True, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSessionOut | None: + """Get Sessions + + List visits + + Args: + search (None | str | Unset): + beam_line_name (list[str] | None | Unset): + proposal_code (None | str | Unset): + min_end_date (datetime.datetime | None | Unset): + max_end_date (datetime.datetime | None | Unset): + min_start_date (datetime.datetime | None | Unset): + max_start_date (datetime.datetime | None | Unset): + active (bool | Unset): Default: False. + count_collections (bool | Unset): Default: False. + hide_null (bool | Unset): Default: True. + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSessionOut + """ + + return ( + await asyncio_detailed( + client=client, + search=search, + beam_line_name=beam_line_name, + proposal_code=proposal_code, + min_end_date=min_end_date, + max_end_date=max_end_date, + min_start_date=min_start_date, + max_start_date=max_start_date, + active=active, + count_collections=count_collections, + hide_null=hide_null, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py b/src/lims_utils/expeye_client/api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py new file mode 100644 index 0000000..56c558d --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_person_out import PagedPersonOut +from ...models.person_id_with_role import PersonIdWithRole +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: list[PersonIdWithRole], +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/persons".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _kwargs["json"].append(body_item) + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedPersonOut | None: + if response.status_code == 200: + response_200 = PagedPersonOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedPersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonIdWithRole], +) -> Response[HTTPValidationError | PagedPersonOut]: + """Include Persons In Session + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonIdWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonIdWithRole], +) -> HTTPValidationError | PagedPersonOut | None: + """Include Persons In Session + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonIdWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonIdWithRole], +) -> Response[HTTPValidationError | PagedPersonOut]: + """Include Persons In Session + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonIdWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedPersonOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: list[PersonIdWithRole], +) -> HTTPValidationError | PagedPersonOut | None: + """Include Persons In Session + + Create persons in session + + Args: + proposal_reference (str): + visit_number (int): + body (list[PersonIdWithRole]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedPersonOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py b/src/lims_utils/expeye_client/api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py new file mode 100644 index 0000000..16d9300 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py @@ -0,0 +1,218 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.mxmr_run_blob_optional import MXMRRunBlobOptional +from ...models.mxmr_run_blob_out import MXMRRunBlobOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + blob_id: int, + *, + body: MXMRRunBlobOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/blobs/{blob_id}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + blob_id=quote(str(blob_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | MXMRRunBlobOut | None: + if response.status_code == 200: + response_200 = MXMRRunBlobOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | MXMRRunBlobOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + blob_id: int, + *, + client: AuthenticatedClient, + body: MXMRRunBlobOptional, +) -> Response[HTTPValidationError | MXMRRunBlobOut]: + """Update Mxmrrun Blob + + Update processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + blob_id (int): + body (MXMRRunBlobOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MXMRRunBlobOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + blob_id=blob_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + blob_id: int, + *, + client: AuthenticatedClient, + body: MXMRRunBlobOptional, +) -> HTTPValidationError | MXMRRunBlobOut | None: + """Update Mxmrrun Blob + + Update processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + blob_id (int): + body (MXMRRunBlobOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MXMRRunBlobOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + blob_id=blob_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + blob_id: int, + *, + client: AuthenticatedClient, + body: MXMRRunBlobOptional, +) -> Response[HTTPValidationError | MXMRRunBlobOut]: + """Update Mxmrrun Blob + + Update processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + blob_id (int): + body (MXMRRunBlobOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | MXMRRunBlobOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + blob_id=blob_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + blob_id: int, + *, + client: AuthenticatedClient, + body: MXMRRunBlobOptional, +) -> HTTPValidationError | MXMRRunBlobOut | None: + """Update Mxmrrun Blob + + Update processing program MXMRRun Blobs + + Args: + proposal_reference (str): + visit_number (int): + blob_id (int): + body (MXMRRunBlobOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | MXMRRunBlobOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + blob_id=blob_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py b/src/lims_utils/expeye_client/api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py new file mode 100644 index 0000000..5ea6bbf --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py @@ -0,0 +1,272 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.auto_proc_program_attachment_optional import AutoProcProgramAttachmentOptional +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_auto_proc_program_attachment_out import PagedAutoProcProgramAttachmentOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: AutoProcProgramAttachmentOptional, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + legacy_join: bool | Unset = False, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + json_file_path: None | str | Unset + if isinstance(file_path, Unset): + json_file_path = UNSET + else: + json_file_path = file_path + params["filePath"] = json_file_path + + json_file_name: None | str | Unset + if isinstance(file_name, Unset): + json_file_name = UNSET + else: + json_file_name = file_name + params["fileName"] = json_file_name + + params["legacyJoin"] = legacy_join + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}/processing-programs/attachments".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + "params": params, + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + if response.status_code == 200: + response_200 = PagedAutoProcProgramAttachmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + legacy_join: bool | Unset = False, +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + """Update Processing Program Attachments + + List processing program attachments belonging to a session. Multiple items can be updated at once. + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + file_path=file_path, + file_name=file_name, + legacy_join=legacy_join, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + legacy_join: bool | Unset = False, +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + """Update Processing Program Attachments + + List processing program attachments belonging to a session. Multiple items can be updated at once. + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramAttachmentOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + file_path=file_path, + file_name=file_name, + legacy_join=legacy_join, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + legacy_join: bool | Unset = False, +) -> Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut]: + """Update Processing Program Attachments + + List processing program attachments belonging to a session. Multiple items can be updated at once. + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedAutoProcProgramAttachmentOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + file_path=file_path, + file_name=file_name, + legacy_join=legacy_join, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: AutoProcProgramAttachmentOptional, + file_path: None | str | Unset = UNSET, + file_name: None | str | Unset = UNSET, + legacy_join: bool | Unset = False, +) -> HTTPValidationError | PagedAutoProcProgramAttachmentOut | None: + """Update Processing Program Attachments + + List processing program attachments belonging to a session. Multiple items can be updated at once. + + Args: + proposal_reference (str): + visit_number (int): + file_path (None | str | Unset): File path to filter by + file_name (None | str | Unset): File name to filter by + legacy_join (bool | Unset): Also join through AutoProcIntegration where attachments don't + have a parent processing job. Useful for attachments created before 2018, but slows down + execution significantly Default: False. + body (AutoProcProgramAttachmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedAutoProcProgramAttachmentOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + file_path=file_path, + file_name=file_name, + legacy_join=legacy_join, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py b/src/lims_utils/expeye_client/api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py new file mode 100644 index 0000000..d12bee3 --- /dev/null +++ b/src/lims_utils/expeye_client/api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py @@ -0,0 +1,204 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.session_optional import SessionOptional +from ...models.session_out import SessionOut +from ...types import Response + + +def _get_kwargs( + proposal_reference: str, + visit_number: int, + *, + body: SessionOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/proposals/{proposal_reference}/sessions/{visit_number}".format( + proposal_reference=quote(str(proposal_reference), safe=""), + visit_number=quote(str(visit_number), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | SessionOut | None: + if response.status_code == 200: + response_200 = SessionOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | SessionOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionOptional, +) -> Response[HTTPValidationError | SessionOut]: + """Update Session + + Update session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionOptional, +) -> HTTPValidationError | SessionOut | None: + """Update Session + + Update session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionOut + """ + + return sync_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionOptional, +) -> Response[HTTPValidationError | SessionOut]: + """Update Session + + Update session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | SessionOut] + """ + + kwargs = _get_kwargs( + proposal_reference=proposal_reference, + visit_number=visit_number, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + proposal_reference: str, + visit_number: int, + *, + client: AuthenticatedClient, + body: SessionOptional, +) -> HTTPValidationError | SessionOut | None: + """Update Session + + Update session + + Args: + proposal_reference (str): + visit_number (int): + body (SessionOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | SessionOut + """ + + return ( + await asyncio_detailed( + proposal_reference=proposal_reference, + visit_number=visit_number, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/__init__.py b/src/lims_utils/expeye_client/api/shipments/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/shipments/create_dewar_shipments_shipment_id_dewars_post.py b/src/lims_utils/expeye_client/api/shipments/create_dewar_shipments_shipment_id_dewars_post.py new file mode 100644 index 0000000..4c26a64 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/create_dewar_shipments_shipment_id_dewars_post.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.dewar_in import DewarIn +from ...models.dewar_out import DewarOut +from ...models.http_validation_error import HTTPValidationError +from ...types import Response + + +def _get_kwargs( + shipment_id: int, + *, + body: DewarIn, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/shipments/{shipment_id}/dewars".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> DewarOut | HTTPValidationError | None: + if response.status_code == 201: + response_201 = DewarOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[DewarOut | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DewarIn, +) -> Response[DewarOut | HTTPValidationError]: + """Create Dewar + + Create new dewar + + Args: + shipment_id (int): + body (DewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DewarIn, +) -> DewarOut | HTTPValidationError | None: + """Create Dewar + + Create new dewar + + Args: + shipment_id (int): + body (DewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarOut | HTTPValidationError + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DewarIn, +) -> Response[DewarOut | HTTPValidationError]: + """Create Dewar + + Create new dewar + + Args: + shipment_id (int): + body (DewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DewarOut | HTTPValidationError] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DewarIn, +) -> DewarOut | HTTPValidationError | None: + """Create Dewar + + Create new dewar + + Args: + shipment_id (int): + body (DewarIn): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DewarOut | HTTPValidationError + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/create_full_shipment_from_file_shipments_upload_post.py b/src/lims_utils/expeye_client/api/shipments/create_full_shipment_from_file_shipments_upload_post.py new file mode 100644 index 0000000..f34f7a8 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/create_full_shipment_from_file_shipments_upload_post.py @@ -0,0 +1,233 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.body_create_full_shipment_from_file_shipments_upload_post import ( + BodyCreateFullShipmentFromFileShipmentsUploadPost, +) +from ...models.http_validation_error import HTTPValidationError +from ...models.proposal_with_children_out import ProposalWithChildrenOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + body: BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset = UNSET, + queue_container: bool | Unset = False, + allow_missing_facility_code: bool | Unset = False, + reuse_shipments: bool | Unset = False, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + params: dict[str, Any] = {} + + params["queueContainer"] = queue_container + + params["allowMissingFacilityCode"] = allow_missing_facility_code + + params["reuseShipments"] = reuse_shipments + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/shipments/upload", + "params": params, + } + + if not isinstance(body, Unset): + _kwargs["files"] = body.to_multipart() + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ProposalWithChildrenOut | None: + if response.status_code == 201: + response_201 = ProposalWithChildrenOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ProposalWithChildrenOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + body: BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset = UNSET, + queue_container: bool | Unset = False, + allow_missing_facility_code: bool | Unset = False, + reuse_shipments: bool | Unset = False, +) -> Response[HTTPValidationError | ProposalWithChildrenOut]: + """Create Full Shipment From File + + Create new full shipment from file + + Args: + queue_container (bool | Unset): Queue container for UDC Default: False. + allow_missing_facility_code (bool | Unset): Ignore facility code if it's not provided or + invalid Default: False. + reuse_shipments (bool | Unset): Reuse existing shipments/dewars if they match the provided + shipments/dewars in the file Default: False. + body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalWithChildrenOut] + """ + + kwargs = _get_kwargs( + body=body, + queue_container=queue_container, + allow_missing_facility_code=allow_missing_facility_code, + reuse_shipments=reuse_shipments, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + body: BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset = UNSET, + queue_container: bool | Unset = False, + allow_missing_facility_code: bool | Unset = False, + reuse_shipments: bool | Unset = False, +) -> HTTPValidationError | ProposalWithChildrenOut | None: + """Create Full Shipment From File + + Create new full shipment from file + + Args: + queue_container (bool | Unset): Queue container for UDC Default: False. + allow_missing_facility_code (bool | Unset): Ignore facility code if it's not provided or + invalid Default: False. + reuse_shipments (bool | Unset): Reuse existing shipments/dewars if they match the provided + shipments/dewars in the file Default: False. + body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalWithChildrenOut + """ + + return sync_detailed( + client=client, + body=body, + queue_container=queue_container, + allow_missing_facility_code=allow_missing_facility_code, + reuse_shipments=reuse_shipments, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset = UNSET, + queue_container: bool | Unset = False, + allow_missing_facility_code: bool | Unset = False, + reuse_shipments: bool | Unset = False, +) -> Response[HTTPValidationError | ProposalWithChildrenOut]: + """Create Full Shipment From File + + Create new full shipment from file + + Args: + queue_container (bool | Unset): Queue container for UDC Default: False. + allow_missing_facility_code (bool | Unset): Ignore facility code if it's not provided or + invalid Default: False. + reuse_shipments (bool | Unset): Reuse existing shipments/dewars if they match the provided + shipments/dewars in the file Default: False. + body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ProposalWithChildrenOut] + """ + + kwargs = _get_kwargs( + body=body, + queue_container=queue_container, + allow_missing_facility_code=allow_missing_facility_code, + reuse_shipments=reuse_shipments, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + body: BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset = UNSET, + queue_container: bool | Unset = False, + allow_missing_facility_code: bool | Unset = False, + reuse_shipments: bool | Unset = False, +) -> HTTPValidationError | ProposalWithChildrenOut | None: + """Create Full Shipment From File + + Create new full shipment from file + + Args: + queue_container (bool | Unset): Queue container for UDC Default: False. + allow_missing_facility_code (bool | Unset): Ignore facility code if it's not provided or + invalid Default: False. + reuse_shipments (bool | Unset): Reuse existing shipments/dewars if they match the provided + shipments/dewars in the file Default: False. + body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ProposalWithChildrenOut + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + queue_container=queue_container, + allow_missing_facility_code=allow_missing_facility_code, + reuse_shipments=reuse_shipments, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/edit_shipment_shipments_shipment_id_patch.py b/src/lims_utils/expeye_client/api/shipments/edit_shipment_shipments_shipment_id_patch.py new file mode 100644 index 0000000..6afad1a --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/edit_shipment_shipments_shipment_id_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.shipment_optional import ShipmentOptional +from ...models.shipment_out import ShipmentOut +from ...types import Response + + +def _get_kwargs( + shipment_id: int, + *, + body: ShipmentOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/shipments/{shipment_id}".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ShipmentOut | None: + if response.status_code == 200: + response_200 = ShipmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ShipmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + body: ShipmentOptional, +) -> Response[HTTPValidationError | ShipmentOut]: + """Edit Shipment + + Edit shipment + + Args: + shipment_id (int): + body (ShipmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, + body: ShipmentOptional, +) -> HTTPValidationError | ShipmentOut | None: + """Edit Shipment + + Edit shipment + + Args: + shipment_id (int): + body (ShipmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentOut + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + body: ShipmentOptional, +) -> Response[HTTPValidationError | ShipmentOut]: + """Edit Shipment + + Edit shipment + + Args: + shipment_id (int): + body (ShipmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, + body: ShipmentOptional, +) -> HTTPValidationError | ShipmentOut | None: + """Edit Shipment + + Edit shipment + + Args: + shipment_id (int): + body (ShipmentOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentOut + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/get_dewars_shipments_shipment_id_dewars_get.py b/src/lims_utils/expeye_client/api/shipments/get_dewars_shipments_shipment_id_dewars_get.py new file mode 100644 index 0000000..da7bfb7 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/get_dewars_shipments_shipment_id_dewars_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_dewar_out import PagedDewarOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + shipment_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/shipments/{shipment_id}/dewars".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDewarOut | None: + if response.status_code == 200: + response_200 = PagedDewarOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDewarOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDewarOut]: + """Get Dewars + + Get dewars in shipment + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDewarOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDewarOut | None: + """Get Dewars + + Get dewars in shipment + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDewarOut + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDewarOut]: + """Get Dewars + + Get dewars in shipment + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDewarOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDewarOut | None: + """Get Dewars + + Get dewars in shipment + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDewarOut + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py new file mode 100644 index 0000000..30e0271 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_diffraction_plan_out import PagedDiffractionPlanOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + shipment_id: int, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/shipments/{shipment_id}/diffraction-plans".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + if response.status_code == 200: + response_200 = PagedDiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Get Diffraction Plans + + Get diffraction plans in container + + Args: + shipment_id (int): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/get_samples_shipments_shipment_id_samples_get.py b/src/lims_utils/expeye_client/api/shipments/get_samples_shipments_shipment_id_samples_get.py new file mode 100644 index 0000000..2304a13 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/get_samples_shipments_shipment_id_samples_get.py @@ -0,0 +1,253 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_sample_out import PagedSampleOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + shipment_id: int, + *, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_loaded: bool | None | Unset + if isinstance(loaded, Unset): + json_loaded = UNSET + else: + json_loaded = loaded + params["loaded"] = json_loaded + + json_is_in_sample_changer: bool | None | Unset + if isinstance(is_in_sample_changer, Unset): + json_is_in_sample_changer = UNSET + else: + json_is_in_sample_changer = is_in_sample_changer + params["isInSampleChanger"] = json_is_in_sample_changer + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/shipments/{shipment_id}/samples".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedSampleOut | None: + if response.status_code == 200: + response_200 = PagedSampleOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedSampleOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleOut]: + """Get Samples + + Get shipment samples + + Args: + shipment_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleOut | None: + """Get Samples + + Get shipment samples + + Args: + shipment_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleOut + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedSampleOut]: + """Get Samples + + Get shipment samples + + Args: + shipment_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedSampleOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, + loaded: bool | None | Unset = UNSET, + is_in_sample_changer: bool | None | Unset = UNSET, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedSampleOut | None: + """Get Samples + + Get shipment samples + + Args: + shipment_id (int): + loaded (bool | None | Unset): Only return samples have been/have not been loaded into the + beamline(i.e. have a RobotAction entry or not) + is_in_sample_changer (bool | None | Unset): + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedSampleOut + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + loaded=loaded, + is_in_sample_changer=is_in_sample_changer, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/get_shipment_shipments_shipment_id_get.py b/src/lims_utils/expeye_client/api/shipments/get_shipment_shipments_shipment_id_get.py new file mode 100644 index 0000000..b8d46f1 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/get_shipment_shipments_shipment_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.shipment_out import ShipmentOut +from ...types import Response + + +def _get_kwargs( + shipment_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/shipments/{shipment_id}".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | ShipmentOut | None: + if response.status_code == 200: + response_200 = ShipmentOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | ShipmentOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ShipmentOut]: + """Get Shipment + + Get shipment + + Args: + shipment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ShipmentOut | None: + """Get Shipment + + Get shipment + + Args: + shipment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentOut + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | ShipmentOut]: + """Get Shipment + + Get shipment + + Args: + shipment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | ShipmentOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | ShipmentOut | None: + """Get Shipment + + Get shipment + + Args: + shipment_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | ShipmentOut + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py new file mode 100644 index 0000000..e2926e9 --- /dev/null +++ b/src/lims_utils/expeye_client/api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py @@ -0,0 +1,190 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.diffraction_plan_optional import DiffractionPlanOptional +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_diffraction_plan_out import PagedDiffractionPlanOut +from ...types import Response + + +def _get_kwargs( + shipment_id: int, + *, + body: DiffractionPlanOptional, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "patch", + "url": "/shipments/{shipment_id}/diffraction-plans".format( + shipment_id=quote(str(shipment_id), safe=""), + ), + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + if response.status_code == 200: + response_200 = PagedDiffractionPlanOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + shipment_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + shipment_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return sync_detailed( + shipment_id=shipment_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> Response[HTTPValidationError | PagedDiffractionPlanOut]: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + shipment_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedDiffractionPlanOut] + """ + + kwargs = _get_kwargs( + shipment_id=shipment_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + shipment_id: int, + *, + client: AuthenticatedClient, + body: DiffractionPlanOptional, +) -> HTTPValidationError | PagedDiffractionPlanOut | None: + """Update Diffraction Plans + + Update diffraction plans in container + + Args: + shipment_id (int): + body (DiffractionPlanOptional): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedDiffractionPlanOut + """ + + return ( + await asyncio_detailed( + shipment_id=shipment_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/tomograms/__init__.py b/src/lims_utils/expeye_client/api/tomograms/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/tomograms/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/tomograms/get_tomogram_tomograms_tomogram_id_get.py b/src/lims_utils/expeye_client/api/tomograms/get_tomogram_tomograms_tomogram_id_get.py new file mode 100644 index 0000000..643d90e --- /dev/null +++ b/src/lims_utils/expeye_client/api/tomograms/get_tomogram_tomograms_tomogram_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.tomogram_out import TomogramOut +from ...types import Response + + +def _get_kwargs( + tomogram_id: int, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/tomograms/{tomogram_id}".format( + tomogram_id=quote(str(tomogram_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | TomogramOut | None: + if response.status_code == 200: + response_200 = TomogramOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | TomogramOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + tomogram_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | TomogramOut]: + """Get Tomogram + + Get a single tomogram + + Args: + tomogram_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | TomogramOut] + """ + + kwargs = _get_kwargs( + tomogram_id=tomogram_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + tomogram_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | TomogramOut | None: + """Get Tomogram + + Get a single tomogram + + Args: + tomogram_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | TomogramOut + """ + + return sync_detailed( + tomogram_id=tomogram_id, + client=client, + ).parsed + + +async def asyncio_detailed( + tomogram_id: int, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | TomogramOut]: + """Get Tomogram + + Get a single tomogram + + Args: + tomogram_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | TomogramOut] + """ + + kwargs = _get_kwargs( + tomogram_id=tomogram_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + tomogram_id: int, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | TomogramOut | None: + """Get Tomogram + + Get a single tomogram + + Args: + tomogram_id (int): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | TomogramOut + """ + + return ( + await asyncio_detailed( + tomogram_id=tomogram_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/user_groups/__init__.py b/src/lims_utils/expeye_client/api/user_groups/__init__.py new file mode 100644 index 0000000..2d7c0b2 --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/__init__.py @@ -0,0 +1 @@ +"""Contains endpoint functions for accessing the API""" diff --git a/src/lims_utils/expeye_client/api/user_groups/get_ldap_search_params_user_groups_search_params_get.py b/src/lims_utils/expeye_client/api/user_groups/get_ldap_search_params_user_groups_search_params_get.py new file mode 100644 index 0000000..6c7ee57 --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/get_ldap_search_params_user_groups_search_params_get.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_user_group_ldap_search_params import PagedUserGroupLDAPSearchParams +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/user-groups/search-params", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedUserGroupLDAPSearchParams | None: + if response.status_code == 200: + response_200 = PagedUserGroupLDAPSearchParams.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedUserGroupLDAPSearchParams]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupLDAPSearchParams]: + """Get Ldap Search Params + + Get LDAP search params + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupLDAPSearchParams] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupLDAPSearchParams | None: + """Get Ldap Search Params + + Get LDAP search params + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupLDAPSearchParams + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupLDAPSearchParams]: + """Get Ldap Search Params + + Get LDAP search params + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupLDAPSearchParams] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupLDAPSearchParams | None: + """Get Ldap Search Params + + Get LDAP search params + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupLDAPSearchParams + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py b/src/lims_utils/expeye_client/api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py new file mode 100644 index 0000000..e963b73 --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py @@ -0,0 +1,209 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_user_group_ldap_search_params import PagedUserGroupLDAPSearchParams +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + usergroup_id: str, + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/user-groups/{usergroup_id}/search-params".format( + usergroup_id=quote(str(usergroup_id), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedUserGroupLDAPSearchParams | None: + if response.status_code == 200: + response_200 = PagedUserGroupLDAPSearchParams.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedUserGroupLDAPSearchParams]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + usergroup_id: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupLDAPSearchParams]: + """Get Usergroup Ldap Search Params + + Get LDAP search params for user group + + Args: + usergroup_id (str): User group ID or usergroup name + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupLDAPSearchParams] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + usergroup_id: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupLDAPSearchParams | None: + """Get Usergroup Ldap Search Params + + Get LDAP search params for user group + + Args: + usergroup_id (str): User group ID or usergroup name + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupLDAPSearchParams + """ + + return sync_detailed( + usergroup_id=usergroup_id, + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + usergroup_id: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupLDAPSearchParams]: + """Get Usergroup Ldap Search Params + + Get LDAP search params for user group + + Args: + usergroup_id (str): User group ID or usergroup name + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupLDAPSearchParams] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + usergroup_id: str, + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupLDAPSearchParams | None: + """Get Usergroup Ldap Search Params + + Get LDAP search params for user group + + Args: + usergroup_id (str): User group ID or usergroup name + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupLDAPSearchParams + """ + + return ( + await asyncio_detailed( + usergroup_id=usergroup_id, + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/user_groups/get_usergroup_user_groups_usergroup_id_get.py b/src/lims_utils/expeye_client/api/user_groups/get_usergroup_user_groups_usergroup_id_get.py new file mode 100644 index 0000000..c043710 --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/get_usergroup_user_groups_usergroup_id_get.py @@ -0,0 +1,169 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.user_group_out import UserGroupOut +from ...types import Response + + +def _get_kwargs( + usergroup_id: str, +) -> dict[str, Any]: + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/user-groups/{usergroup_id}".format( + usergroup_id=quote(str(usergroup_id), safe=""), + ), + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | UserGroupOut | None: + if response.status_code == 200: + response_200 = UserGroupOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | UserGroupOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + usergroup_id: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | UserGroupOut]: + """Get Usergroup + + Get user group + + Args: + usergroup_id (str): User group ID or usergroup name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UserGroupOut] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + usergroup_id: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | UserGroupOut | None: + """Get Usergroup + + Get user group + + Args: + usergroup_id (str): User group ID or usergroup name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UserGroupOut + """ + + return sync_detailed( + usergroup_id=usergroup_id, + client=client, + ).parsed + + +async def asyncio_detailed( + usergroup_id: str, + *, + client: AuthenticatedClient, +) -> Response[HTTPValidationError | UserGroupOut]: + """Get Usergroup + + Get user group + + Args: + usergroup_id (str): User group ID or usergroup name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | UserGroupOut] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + usergroup_id: str, + *, + client: AuthenticatedClient, +) -> HTTPValidationError | UserGroupOut | None: + """Get Usergroup + + Get user group + + Args: + usergroup_id (str): User group ID or usergroup name + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | UserGroupOut + """ + + return ( + await asyncio_detailed( + usergroup_id=usergroup_id, + client=client, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/user_groups/get_usergroups_user_groups_get.py b/src/lims_utils/expeye_client/api/user_groups/get_usergroups_user_groups_get.py new file mode 100644 index 0000000..b4e5df0 --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/get_usergroups_user_groups_get.py @@ -0,0 +1,193 @@ +from http import HTTPStatus +from typing import Any + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_user_group_out import PagedUserGroupOut +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + *, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + params["page"] = page + + params["limit"] = limit + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/user-groups", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedUserGroupOut | None: + if response.status_code == 200: + response_200 = PagedUserGroupOut.from_dict(response.json()) + + return response_200 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedUserGroupOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupOut]: + """Get Usergroups + + Get all usergroups + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupOut] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupOut | None: + """Get Usergroups + + Get all usergroups + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupOut + """ + + return sync_detailed( + client=client, + page=page, + limit=limit, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> Response[HTTPValidationError | PagedUserGroupOut]: + """Get Usergroups + + Get all usergroups + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupOut] + """ + + kwargs = _get_kwargs( + page=page, + limit=limit, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + *, + client: AuthenticatedClient, + page: int | Unset = 0, + limit: int | Unset = 25, +) -> HTTPValidationError | PagedUserGroupOut | None: + """Get Usergroups + + Get all usergroups + + Args: + page (int | Unset): Page number/Results to skip. Negative numbers count backwards from the + last page Default: 0. + limit (int | Unset): Number of results to show Default: 25. + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupOut + """ + + return ( + await asyncio_detailed( + client=client, + page=page, + limit=limit, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py b/src/lims_utils/expeye_client/api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py new file mode 100644 index 0000000..4b7c068 --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py @@ -0,0 +1,197 @@ +from http import HTTPStatus +from typing import Any +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.paged_user_group_has_person_out import PagedUserGroupHasPersonOut +from ...models.person_list_numeric import PersonListNumeric +from ...models.person_list_str import PersonListStr +from ...models.person_list_uuid import PersonListUuid +from ...types import Response + + +def _get_kwargs( + usergroup_id: str, + *, + body: PersonListNumeric | PersonListStr | PersonListUuid, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/user-groups/{usergroup_id}/persons".format( + usergroup_id=quote(str(usergroup_id), safe=""), + ), + } + + if isinstance(body, PersonListNumeric): + _kwargs["json"] = body.to_dict() + elif isinstance(body, PersonListUuid): + _kwargs["json"] = body.to_dict() + else: + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> HTTPValidationError | PagedUserGroupHasPersonOut | None: + if response.status_code == 201: + response_201 = PagedUserGroupHasPersonOut.from_dict(response.json()) + + return response_201 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[HTTPValidationError | PagedUserGroupHasPersonOut]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + usergroup_id: str, + *, + client: AuthenticatedClient, + body: PersonListNumeric | PersonListStr | PersonListUuid, +) -> Response[HTTPValidationError | PagedUserGroupHasPersonOut]: + """Include Persons In Usergroup + + Add users to user group + + Args: + usergroup_id (str): User group ID or usergroup name + body (PersonListNumeric | PersonListStr | PersonListUuid): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupHasPersonOut] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + usergroup_id: str, + *, + client: AuthenticatedClient, + body: PersonListNumeric | PersonListStr | PersonListUuid, +) -> HTTPValidationError | PagedUserGroupHasPersonOut | None: + """Include Persons In Usergroup + + Add users to user group + + Args: + usergroup_id (str): User group ID or usergroup name + body (PersonListNumeric | PersonListStr | PersonListUuid): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupHasPersonOut + """ + + return sync_detailed( + usergroup_id=usergroup_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + usergroup_id: str, + *, + client: AuthenticatedClient, + body: PersonListNumeric | PersonListStr | PersonListUuid, +) -> Response[HTTPValidationError | PagedUserGroupHasPersonOut]: + """Include Persons In Usergroup + + Add users to user group + + Args: + usergroup_id (str): User group ID or usergroup name + body (PersonListNumeric | PersonListStr | PersonListUuid): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[HTTPValidationError | PagedUserGroupHasPersonOut] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + usergroup_id: str, + *, + client: AuthenticatedClient, + body: PersonListNumeric | PersonListStr | PersonListUuid, +) -> HTTPValidationError | PagedUserGroupHasPersonOut | None: + """Include Persons In Usergroup + + Add users to user group + + Args: + usergroup_id (str): User group ID or usergroup name + body (PersonListNumeric | PersonListStr | PersonListUuid): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + HTTPValidationError | PagedUserGroupHasPersonOut + """ + + return ( + await asyncio_detailed( + usergroup_id=usergroup_id, + client=client, + body=body, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py b/src/lims_utils/expeye_client/api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py new file mode 100644 index 0000000..aa6642c --- /dev/null +++ b/src/lims_utils/expeye_client/api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py @@ -0,0 +1,206 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx2 + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.http_validation_error import HTTPValidationError +from ...models.remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete_personas import ( + RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) +from ...types import UNSET, Response + + +def _get_kwargs( + usergroup_id: str, + person: str, + *, + person_as: RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) -> dict[str, Any]: + + params: dict[str, Any] = {} + + json_person_as = person_as.value + params["personAs"] = json_person_as + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/user-groups/{usergroup_id}/persons/{person}".format( + usergroup_id=quote(str(usergroup_id), safe=""), + person=quote(str(person), safe=""), + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Any | HTTPValidationError | None: + if response.status_code == 204: + response_204 = cast(Any, None) + return response_204 + + if response.status_code == 422: + response_422 = HTTPValidationError.from_dict(response.json()) + + return response_422 + + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx2.Response +) -> Response[Any | HTTPValidationError]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + usergroup_id: str, + person: str, + *, + client: AuthenticatedClient, + person_as: RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) -> Response[Any | HTTPValidationError]: + """Remove Person From Usergroup + + Remove user from user group + + Args: + usergroup_id (str): User group ID or usergroup name + person (str): + person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + person=person, + person_as=person_as, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + usergroup_id: str, + person: str, + *, + client: AuthenticatedClient, + person_as: RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) -> Any | HTTPValidationError | None: + """Remove Person From Usergroup + + Remove user from user group + + Args: + usergroup_id (str): User group ID or usergroup name + person (str): + person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return sync_detailed( + usergroup_id=usergroup_id, + person=person, + client=client, + person_as=person_as, + ).parsed + + +async def asyncio_detailed( + usergroup_id: str, + person: str, + *, + client: AuthenticatedClient, + person_as: RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) -> Response[Any | HTTPValidationError]: + """Remove Person From Usergroup + + Remove user from user group + + Args: + usergroup_id (str): User group ID or usergroup name + person (str): + person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any | HTTPValidationError] + """ + + kwargs = _get_kwargs( + usergroup_id=usergroup_id, + person=person, + person_as=person_as, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + usergroup_id: str, + person: str, + *, + client: AuthenticatedClient, + person_as: RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) -> Any | HTTPValidationError | None: + """Remove Person From Usergroup + + Remove user from user group + + Args: + usergroup_id (str): User group ID or usergroup name + person (str): + person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx2.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Any | HTTPValidationError + """ + + return ( + await asyncio_detailed( + usergroup_id=usergroup_id, + person=person, + client=client, + person_as=person_as, + ) + ).parsed diff --git a/src/lims_utils/expeye_client/client.py b/src/lims_utils/expeye_client/client.py new file mode 100644 index 0000000..136b83d --- /dev/null +++ b/src/lims_utils/expeye_client/client.py @@ -0,0 +1,268 @@ +import ssl +from typing import Any, Self + +import httpx2 +from attrs import define, evolve, field + + +@define +class Client: + """A class for keeping track of data related to the API + + The following are accepted as keyword arguments and will be used to construct httpx2 Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx2.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx2.Client`` and ``httpx2.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str = field(alias="base_url") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _timeout: httpx2.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl") + _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _client: httpx2.Client | None = field(default=None, init=False) + _async_client: httpx2.AsyncClient | None = field(default=None, init=False) + + def with_headers(self, headers: dict[str, str]) -> "Client": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: dict[str, str]) -> "Client": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx2.Timeout) -> "Client": + """Get a new client matching this one with a new timeout configuration""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx2.Client) -> Self: + """Manually set the underlying httpx2.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx2.Client: + """Get the underlying httpx2.Client, constructing a new one if not previously set""" + if self._client is None: + self._client = httpx2.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> Self: + """Enter a context manager for self.client—you cannot enter twice (see httpx2 docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx2.Client (see httpx2 docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx2.AsyncClient) -> Self: + """Manually set the underlying httpx2.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx2.AsyncClient: + """Get the underlying httpx2.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._async_client = httpx2.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> Self: + """Enter a context manager for underlying httpx2.AsyncClient—you cannot enter twice (see httpx2 docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx2.AsyncClient (see httpx2 docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) + + +@define +class AuthenticatedClient: + """A Client which has been authenticated for use on secured endpoints + + The following are accepted as keyword arguments and will be used to construct httpx2 Clients internally: + + ``base_url``: The base URL for the API, all requests are made to a relative path to this URL + + ``cookies``: A dictionary of cookies to be sent with every request + + ``headers``: A dictionary of headers to be sent with every request + + ``timeout``: The maximum amount of a time a request can take. API functions will raise + httpx2.TimeoutException if this is exceeded. + + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, + but can be set to False for testing purposes. + + ``follow_redirects``: Whether or not to follow redirects. Default value is False. + + ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx2.Client`` and ``httpx2.AsyncClient`` constructor. + + + Attributes: + raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a + status code that was not documented in the source OpenAPI document. Can also be provided as a keyword + argument to the constructor. + token: The token to use for authentication + prefix: The prefix to use for the Authorization header + auth_header_name: The name of the Authorization header + """ + + raise_on_unexpected_status: bool = field(default=False, kw_only=True) + _base_url: str = field(alias="base_url") + _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") + _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") + _timeout: httpx2.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl") + _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") + _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _client: httpx2.Client | None = field(default=None, init=False) + _async_client: httpx2.AsyncClient | None = field(default=None, init=False) + + token: str + prefix: str = "Bearer" + auth_header_name: str = "Authorization" + + def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional headers""" + if self._client is not None: + self._client.headers.update(headers) + if self._async_client is not None: + self._async_client.headers.update(headers) + return evolve(self, headers={**self._headers, **headers}) + + def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient": + """Get a new client matching this one with additional cookies""" + if self._client is not None: + self._client.cookies.update(cookies) + if self._async_client is not None: + self._async_client.cookies.update(cookies) + return evolve(self, cookies={**self._cookies, **cookies}) + + def with_timeout(self, timeout: httpx2.Timeout) -> "AuthenticatedClient": + """Get a new client matching this one with a new timeout configuration""" + if self._client is not None: + self._client.timeout = timeout + if self._async_client is not None: + self._async_client.timeout = timeout + return evolve(self, timeout=timeout) + + def set_httpx_client(self, client: httpx2.Client) -> Self: + """Manually set the underlying httpx2.Client + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._client = client + return self + + def get_httpx_client(self) -> httpx2.Client: + """Get the underlying httpx2.Client, constructing a new one if not previously set""" + if self._client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._client = httpx2.Client( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._client + + def __enter__(self) -> Self: + """Enter a context manager for self.client—you cannot enter twice (see httpx2 docs)""" + self.get_httpx_client().__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for internal httpx2.Client (see httpx2 docs)""" + self.get_httpx_client().__exit__(*args, **kwargs) + + def set_async_httpx_client(self, async_client: httpx2.AsyncClient) -> Self: + """Manually set the underlying httpx2.AsyncClient + + **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout. + """ + self._async_client = async_client + return self + + def get_async_httpx_client(self) -> httpx2.AsyncClient: + """Get the underlying httpx2.AsyncClient, constructing a new one if not previously set""" + if self._async_client is None: + self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token + self._async_client = httpx2.AsyncClient( + base_url=self._base_url, + cookies=self._cookies, + headers=self._headers, + timeout=self._timeout, + verify=self._verify_ssl, + follow_redirects=self._follow_redirects, + **self._httpx_args, + ) + return self._async_client + + async def __aenter__(self) -> Self: + """Enter a context manager for underlying httpx2.AsyncClient—you cannot enter twice (see httpx2 docs)""" + await self.get_async_httpx_client().__aenter__() + return self + + async def __aexit__(self, *args: Any, **kwargs: Any) -> None: + """Exit a context manager for underlying httpx2.AsyncClient (see httpx2 docs)""" + await self.get_async_httpx_client().__aexit__(*args, **kwargs) diff --git a/src/lims_utils/expeye_client/errors.py b/src/lims_utils/expeye_client/errors.py new file mode 100644 index 0000000..5f92e76 --- /dev/null +++ b/src/lims_utils/expeye_client/errors.py @@ -0,0 +1,16 @@ +"""Contains shared errors types that can be raised from API functions""" + + +class UnexpectedStatus(Exception): + """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" + + def __init__(self, status_code: int, content: bytes): + self.status_code = status_code + self.content = content + + super().__init__( + f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" + ) + + +__all__ = ["UnexpectedStatus"] diff --git a/src/lims_utils/expeye_client/models/__init__.py b/src/lims_utils/expeye_client/models/__init__.py new file mode 100644 index 0000000..a0c7dc4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/__init__.py @@ -0,0 +1,615 @@ +"""Contains all the data models used in inputs/outputs""" + +from .admin_var_in import AdminVarIn +from .admin_var_out import AdminVarOut +from .aperture_in import ApertureIn +from .aperture_out import ApertureOut +from .atlas_in import AtlasIn +from .atlas_optional import AtlasOptional +from .atlas_out import AtlasOut +from .atlas_type import AtlasType +from .auto_proc_integration_out import AutoProcIntegrationOut +from .auto_proc_program_attachment_in import AutoProcProgramAttachmentIn +from .auto_proc_program_attachment_optional import AutoProcProgramAttachmentOptional +from .auto_proc_program_attachment_out import AutoProcProgramAttachmentOut +from .auto_proc_program_in import AutoProcProgramIn +from .auto_proc_program_optional import AutoProcProgramOptional +from .auto_proc_program_out import AutoProcProgramOut +from .auto_proc_program_scaling_out import AutoProcProgramScalingOut +from .auto_proc_program_scaling_out_scaling_statistics_type_type_0 import ( + AutoProcProgramScalingOutScalingStatisticsTypeType0, +) +from .auto_proc_program_with_auto_proc_out import AutoProcProgramWithAutoProcOut +from .auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut +from .auto_proc_scaling_statistics_out_scalingstatisticstype import AutoProcScalingStatisticsOutScalingstatisticstype +from .auto_proc_with_scaling_out import AutoProcWithScalingOut +from .body_create_full_shipment_from_file_shipments_upload_post import BodyCreateFullShipmentFromFileShipmentsUploadPost +from .centring_method import CentringMethod +from .collection_mode import CollectionMode +from .container_history_in import ContainerHistoryIn +from .container_history_out import ContainerHistoryOut +from .container_in import ContainerIn +from .container_inspection_in import ContainerInspectionIn +from .container_inspection_optional import ContainerInspectionOptional +from .container_inspection_out import ContainerInspectionOut +from .container_load import ContainerLoad +from .container_optional import ContainerOptional +from .container_out import ContainerOut +from .container_queue_in import ContainerQueueIn +from .container_queue_out import ContainerQueueOut +from .container_with_children_in import ContainerWithChildrenIn +from .container_with_children_out import ContainerWithChildrenOut +from .crystal_in import CrystalIn +from .crystal_optional import CrystalOptional +from .crystal_out import CrystalOut +from .crystal_with_protein import CrystalWithProtein +from .ctf_base import CTFBase +from .ctf_in import CTFIn +from .ctf_optional import CTFOptional +from .ctf_out import CTFOut +from .data_collection_comment_in import DataCollectionCommentIn +from .data_collection_comment_optional import DataCollectionCommentOptional +from .data_collection_comment_out import DataCollectionCommentOut +from .data_collection_file_attachment_in import DataCollectionFileAttachmentIn +from .data_collection_file_attachment_optional import DataCollectionFileAttachmentOptional +from .data_collection_file_attachment_out import DataCollectionFileAttachmentOut +from .data_collection_group_in import DataCollectionGroupIn +from .data_collection_group_in_experiment_type_type_0 import DataCollectionGroupInExperimentTypeType0 +from .data_collection_group_optional import DataCollectionGroupOptional +from .data_collection_group_optional_experiment_type_type_0 import DataCollectionGroupOptionalExperimentTypeType0 +from .data_collection_group_out import DataCollectionGroupOut +from .data_collection_group_out_experiment_type_type_0 import DataCollectionGroupOutExperimentTypeType0 +from .data_collection_in import DataCollectionIn +from .data_collection_optional import DataCollectionOptional +from .data_collection_out import DataCollectionOut +from .dewar_in import DewarIn +from .dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 +from .dewar_optional import DewarOptional +from .dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 +from .dewar_out import DewarOut +from .dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 +from .dewar_transport_history_in import DewarTransportHistoryIn +from .dewar_transport_history_out import DewarTransportHistoryOut +from .dewar_with_children_in import DewarWithChildrenIn +from .dewar_with_children_in_extra_type_0_type_0 import DewarWithChildrenInExtraType0Type0 +from .dewar_with_children_out import DewarWithChildrenOut +from .dewar_with_children_out_extra_type_0_type_0 import DewarWithChildrenOutExtraType0Type0 +from .diffraction_plan_experiment_type import DiffractionPlanExperimentType +from .diffraction_plan_in import DiffractionPlanIn +from .diffraction_plan_in_scan_parameters_type_0_type_0 import DiffractionPlanInScanParametersType0Type0 +from .diffraction_plan_optional import DiffractionPlanOptional +from .diffraction_plan_optional_scan_parameters_type_0_type_0 import DiffractionPlanOptionalScanParametersType0Type0 +from .diffraction_plan_out import DiffractionPlanOut +from .diffraction_plan_out_scan_parameters_type_0_type_0 import DiffractionPlanOutScanParametersType0Type0 +from .energy_scan_in import EnergyScanIn +from .energy_scan_optional import EnergyScanOptional +from .energy_scan_out import EnergyScanOut +from .file_attachment_type import FileAttachmentType +from .file_type import FileType +from .fluorescence_spectrum_in import FluorescenceSpectrumIn +from .fluorescence_spectrum_optional import FluorescenceSpectrumOptional +from .fluorescence_spectrum_out import FluorescenceSpectrumOut +from .foil_hole_in import FoilHoleIn +from .foil_hole_optional_with_id import FoilHoleOptionalWithId +from .foil_hole_out import FoilHoleOut +from .full_movie_optional import FullMovieOptional +from .full_movie_out import FullMovieOut +from .get_tomograms_for_dcg_data_groups_group_id_tomograms_get_sort_by_type_0 import ( + GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0, +) +from .grid_info_in import GridInfoIn +from .grid_info_in_orientation_type_0 import GridInfoInOrientationType0 +from .grid_info_optional import GridInfoOptional +from .grid_info_optional_orientation_type_0 import GridInfoOptionalOrientationType0 +from .grid_info_out import GridInfoOut +from .grid_info_out_orientation_type_0 import GridInfoOutOrientationType0 +from .grid_square_in import GridSquareIn +from .grid_square_mode import GridSquareMode +from .grid_square_out import GridSquareOut +from .http_validation_error import HTTPValidationError +from .image_quality_indicator_out import ImageQualityIndicatorOut +from .lab_contact_out import LabContactOut +from .laser_action_in import LaserActionIn +from .laser_action_out import LaserActionOut +from .laser_parameters_in import LaserParametersIn +from .laser_parameters_out import LaserParametersOut +from .laser_point_in import LaserPointIn +from .laser_point_list_in import LaserPointListIn +from .laser_point_out import LaserPointOut +from .ldap_search_params import LDAPSearchParams +from .ligand_in import LigandIn +from .ligand_optional import LigandOptional +from .ligand_out import LigandOut +from .milling_step_in import MillingStepIn +from .milling_step_in_beam_type_type_0 import MillingStepInBeamTypeType0 +from .milling_step_in_status_type_0 import MillingStepInStatusType0 +from .milling_step_out import MillingStepOut +from .milling_step_out_beam_type_type_0 import MillingStepOutBeamTypeType0 +from .milling_step_out_status_type_0 import MillingStepOutStatusType0 +from .motion_correction_optional import MotionCorrectionOptional +from .motion_correction_out import MotionCorrectionOut +from .movie_optional import MovieOptional +from .movie_out import MovieOut +from .mx_lims_contact import MxLimsContact +from .mx_lims_dewar import MxLimsDewar +from .mx_lims_dewar_containerref import MxLimsDewarContainerref +from .mx_lims_dewar_identifiers import MxLimsDewarIdentifiers +from .mx_lims_dewar_urls import MxLimsDewarUrls +from .mx_lims_full_shipment import MxLimsFullShipment +from .mx_lims_full_shipment_dewar import MxLimsFullShipmentDewar +from .mx_lims_full_shipment_macromolecule import MxLimsFullShipmentMacromolecule +from .mx_lims_full_shipment_macromoleculesample import MxLimsFullShipmentMacromoleculesample +from .mx_lims_full_shipment_pin import MxLimsFullShipmentPin +from .mx_lims_full_shipment_puck import MxLimsFullShipmentPuck +from .mx_lims_full_shipment_shipment import MxLimsFullShipmentShipment +from .mx_lims_full_shipment_version import MxLimsFullShipmentVersion +from .mx_lims_macromolecule import MxLimsMacromolecule +from .mx_lims_macromolecule_identifiers import MxLimsMacromoleculeIdentifiers +from .mx_lims_macromolecule_sample import MxLimsMacromoleculeSample +from .mx_lims_macromolecule_sample_identifiers import MxLimsMacromoleculeSampleIdentifiers +from .mx_lims_macromolecule_sample_parentsampleref import MxLimsMacromoleculeSampleParentsampleref +from .mx_lims_macromolecule_sample_urls import MxLimsMacromoleculeSampleUrls +from .mx_lims_macromolecule_urls import MxLimsMacromoleculeUrls +from .mx_lims_pin import MxLimsPin +from .mx_lims_pin_containerref import MxLimsPinContainerref +from .mx_lims_pin_identifiers import MxLimsPinIdentifiers +from .mx_lims_pin_sampleref import MxLimsPinSampleref +from .mx_lims_pin_urls import MxLimsPinUrls +from .mx_lims_puck import MxLimsPuck +from .mx_lims_puck_containerref import MxLimsPuckContainerref +from .mx_lims_puck_identifiers import MxLimsPuckIdentifiers +from .mx_lims_puck_urls import MxLimsPuckUrls +from .mx_lims_shipment import MxLimsShipment +from .mx_lims_shipment_identifiers import MxLimsShipmentIdentifiers +from .mx_lims_shipment_urls import MxLimsShipmentUrls +from .mxmr_run_blob_optional import MXMRRunBlobOptional +from .mxmr_run_blob_optional_map_type_type_0 import MXMRRunBlobOptionalMapTypeType0 +from .mxmr_run_blob_out import MXMRRunBlobOut +from .mxmr_run_blob_out_map_type_type_0 import MXMRRunBlobOutMapTypeType0 +from .paged_auto_proc_program_attachment_out import PagedAutoProcProgramAttachmentOut +from .paged_auto_proc_program_out import PagedAutoProcProgramOut +from .paged_container_history_out import PagedContainerHistoryOut +from .paged_container_inspection_out import PagedContainerInspectionOut +from .paged_container_out import PagedContainerOut +from .paged_container_queue_out import PagedContainerQueueOut +from .paged_crystal_out import PagedCrystalOut +from .paged_data_collection_comment_out import PagedDataCollectionCommentOut +from .paged_data_collection_file_attachment_out import PagedDataCollectionFileAttachmentOut +from .paged_data_collection_group_out import PagedDataCollectionGroupOut +from .paged_data_collection_out import PagedDataCollectionOut +from .paged_dewar_out import PagedDewarOut +from .paged_dewar_transport_history_out import PagedDewarTransportHistoryOut +from .paged_diffraction_plan_out import PagedDiffractionPlanOut +from .paged_energy_scan_out import PagedEnergyScanOut +from .paged_fluorescence_spectrum_out import PagedFluorescenceSpectrumOut +from .paged_foil_hole_out import PagedFoilHoleOut +from .paged_full_movie_out import PagedFullMovieOut +from .paged_grid_info_out import PagedGridInfoOut +from .paged_grid_square_out import PagedGridSquareOut +from .paged_image_quality_indicator_out import PagedImageQualityIndicatorOut +from .paged_ligand_out import PagedLigandOut +from .paged_milling_step_out import PagedMillingStepOut +from .paged_mxmr_run_blob_out import PagedMXMRRunBlobOut +from .paged_pdb_out import PagedPDBOut +from .paged_person_out import PagedPersonOut +from .paged_processing_job_with_auto_proc_program_out import PagedProcessingJobWithAutoProcProgramOut +from .paged_proposal_out import PagedProposalOut +from .paged_protein_out import PagedProteinOut +from .paged_registered_container_out import PagedRegisteredContainerOut +from .paged_registered_dewar_out import PagedRegisteredDewarOut +from .paged_robot_action_out import PagedRobotActionOut +from .paged_sample_image_out import PagedSampleImageOut +from .paged_sample_out import PagedSampleOut +from .paged_sample_position_out import PagedSamplePositionOut +from .paged_session_event_with_children_out import PagedSessionEventWithChildrenOut +from .paged_session_out import PagedSessionOut +from .paged_shipment_out import PagedShipmentOut +from .paged_tomogram_out import PagedTomogramOut +from .paged_union_session_event_out_session_event_with_children_out import ( + PagedUnionSessionEventOutSessionEventWithChildrenOut, +) +from .paged_user_group_has_person_out import PagedUserGroupHasPersonOut +from .paged_user_group_ldap_search_params import PagedUserGroupLDAPSearchParams +from .paged_user_group_out import PagedUserGroupOut +from .pdb_ligand_out import PDBLigandOut +from .pdb_out import PDBOut +from .person_id_with_role import PersonIdWithRole +from .person_id_with_role_role_type_0 import PersonIdWithRoleRoleType0 +from .person_in import PersonIn +from .person_list_numeric import PersonListNumeric +from .person_list_str import PersonListStr +from .person_list_uuid import PersonListUuid +from .person_optional import PersonOptional +from .person_out import PersonOut +from .person_with_role import PersonWithRole +from .person_with_role_role_type_0 import PersonWithRoleRoleType0 +from .position_in import PositionIn +from .position_optional import PositionOptional +from .position_out import PositionOut +from .processing_job_parameters_in import ProcessingJobParametersIn +from .processing_job_parameters_in_items import ProcessingJobParametersInItems +from .processing_job_parameters_out import ProcessingJobParametersOut +from .processing_job_parameters_out_items import ProcessingJobParametersOutItems +from .processing_job_with_auto_proc_program_out import ProcessingJobWithAutoProcProgramOut +from .processing_status import ProcessingStatus +from .proposal_in import ProposalIn +from .proposal_optional import ProposalOptional +from .proposal_out import ProposalOut +from .proposal_with_children_out import ProposalWithChildrenOut +from .protein_in import ProteinIn +from .protein_optional import ProteinOptional +from .protein_out import ProteinOut +from .protein_with_crystals_in import ProteinWithCrystalsIn +from .protein_with_crystals_out import ProteinWithCrystalsOut +from .reduction_parameters import ReductionParameters +from .registered_container_has_proposal_in import RegisteredContainerHasProposalIn +from .registered_container_has_proposal_out import RegisteredContainerHasProposalOut +from .registered_container_in import RegisteredContainerIn +from .registered_container_optional import RegisteredContainerOptional +from .registered_container_out import RegisteredContainerOut +from .registered_dewar_has_proposal_in import RegisteredDewarHasProposalIn +from .registered_dewar_has_proposal_out import RegisteredDewarHasProposalOut +from .registered_dewar_in import RegisteredDewarIn +from .registered_dewar_optional import RegisteredDewarOptional +from .registered_dewar_out import RegisteredDewarOut +from .remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete_personas import ( + RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas, +) +from .robot_action_in import RobotActionIn +from .robot_action_in_action_type_type_0 import RobotActionInActionTypeType0 +from .robot_action_in_status_type_0 import RobotActionInStatusType0 +from .robot_action_optional import RobotActionOptional +from .robot_action_optional_action_type_type_0 import RobotActionOptionalActionTypeType0 +from .robot_action_optional_status_type_0 import RobotActionOptionalStatusType0 +from .robot_action_out import RobotActionOut +from .robot_action_out_action_type_type_0 import RobotActionOutActionTypeType0 +from .robot_action_out_status_type_0 import RobotActionOutStatusType0 +from .rotation_axis_enum import RotationAxisEnum +from .safety_levels import SafetyLevels +from .sample_image_in import SampleImageIn +from .sample_image_optional import SampleImageOptional +from .sample_image_out import SampleImageOut +from .sample_in import SampleIn +from .sample_in_with_crystal_and_diffraction_plan import SampleInWithCrystalAndDiffractionPlan +from .sample_ligand_out import SampleLigandOut +from .sample_optional import SampleOptional +from .sample_out import SampleOut +from .sample_position_in import SamplePositionIn +from .sample_position_optional import SamplePositionOptional +from .sample_position_out import SamplePositionOut +from .sample_with_crystal_in import SampleWithCrystalIn +from .session_event_out import SessionEventOut +from .session_event_with_children_out import SessionEventWithChildrenOut +from .session_in import SessionIn +from .session_optional import SessionOptional +from .session_out import SessionOut +from .session_type_in import SessionTypeIn +from .session_type_out import SessionTypeOut +from .shipment_in import ShipmentIn +from .shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 +from .shipment_optional import ShipmentOptional +from .shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 +from .shipment_out import ShipmentOut +from .shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 +from .shipment_safety_levels import ShipmentSafetyLevels +from .shipment_with_children_in import ShipmentWithChildrenIn +from .shipment_with_children_in_extra_type_0_type_0 import ShipmentWithChildrenInExtraType0Type0 +from .shipment_with_children_out import ShipmentWithChildrenOut +from .shipment_with_children_out_extra_type_0_type_0 import ShipmentWithChildrenOutExtraType0Type0 +from .shipping_data_out import ShippingDataOut +from .state_enum import StateEnum +from .strategy_option import StrategyOption +from .strategy_option_screen_type_0 import StrategyOptionScreenType0 +from .string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 +from .tilt_image_alignment_optional import TiltImageAlignmentOptional +from .tilt_image_alignment_out import TiltImageAlignmentOut +from .tomogram_out import TomogramOut +from .user_group_has_person_out import UserGroupHasPersonOut +from .user_group_ldap_search_params import UserGroupLDAPSearchParams +from .user_group_out import UserGroupOut +from .validation_error import ValidationError +from .validation_error_context import ValidationErrorContext + +__all__ = ( + "AdminVarIn", + "AdminVarOut", + "ApertureIn", + "ApertureOut", + "AtlasIn", + "AtlasOptional", + "AtlasOut", + "AtlasType", + "AutoProcIntegrationOut", + "AutoProcProgramAttachmentIn", + "AutoProcProgramAttachmentOptional", + "AutoProcProgramAttachmentOut", + "AutoProcProgramIn", + "AutoProcProgramOptional", + "AutoProcProgramOut", + "AutoProcProgramScalingOut", + "AutoProcProgramScalingOutScalingStatisticsTypeType0", + "AutoProcProgramWithAutoProcOut", + "AutoProcScalingStatisticsOut", + "AutoProcScalingStatisticsOutScalingstatisticstype", + "AutoProcWithScalingOut", + "BodyCreateFullShipmentFromFileShipmentsUploadPost", + "CentringMethod", + "CollectionMode", + "ContainerHistoryIn", + "ContainerHistoryOut", + "ContainerIn", + "ContainerInspectionIn", + "ContainerInspectionOptional", + "ContainerInspectionOut", + "ContainerLoad", + "ContainerOptional", + "ContainerOut", + "ContainerQueueIn", + "ContainerQueueOut", + "ContainerWithChildrenIn", + "ContainerWithChildrenOut", + "CrystalIn", + "CrystalOptional", + "CrystalOut", + "CrystalWithProtein", + "CTFBase", + "CTFIn", + "CTFOptional", + "CTFOut", + "DataCollectionCommentIn", + "DataCollectionCommentOptional", + "DataCollectionCommentOut", + "DataCollectionFileAttachmentIn", + "DataCollectionFileAttachmentOptional", + "DataCollectionFileAttachmentOut", + "DataCollectionGroupIn", + "DataCollectionGroupInExperimentTypeType0", + "DataCollectionGroupOptional", + "DataCollectionGroupOptionalExperimentTypeType0", + "DataCollectionGroupOut", + "DataCollectionGroupOutExperimentTypeType0", + "DataCollectionIn", + "DataCollectionOptional", + "DataCollectionOut", + "DewarIn", + "DewarInExtraType0Type0", + "DewarOptional", + "DewarOptionalExtraType0Type0", + "DewarOut", + "DewarOutExtraType0Type0", + "DewarTransportHistoryIn", + "DewarTransportHistoryOut", + "DewarWithChildrenIn", + "DewarWithChildrenInExtraType0Type0", + "DewarWithChildrenOut", + "DewarWithChildrenOutExtraType0Type0", + "DiffractionPlanExperimentType", + "DiffractionPlanIn", + "DiffractionPlanInScanParametersType0Type0", + "DiffractionPlanOptional", + "DiffractionPlanOptionalScanParametersType0Type0", + "DiffractionPlanOut", + "DiffractionPlanOutScanParametersType0Type0", + "EnergyScanIn", + "EnergyScanOptional", + "EnergyScanOut", + "FileAttachmentType", + "FileType", + "FluorescenceSpectrumIn", + "FluorescenceSpectrumOptional", + "FluorescenceSpectrumOut", + "FoilHoleIn", + "FoilHoleOptionalWithId", + "FoilHoleOut", + "FullMovieOptional", + "FullMovieOut", + "GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0", + "GridInfoIn", + "GridInfoInOrientationType0", + "GridInfoOptional", + "GridInfoOptionalOrientationType0", + "GridInfoOut", + "GridInfoOutOrientationType0", + "GridSquareIn", + "GridSquareMode", + "GridSquareOut", + "HTTPValidationError", + "ImageQualityIndicatorOut", + "LabContactOut", + "LaserActionIn", + "LaserActionOut", + "LaserParametersIn", + "LaserParametersOut", + "LaserPointIn", + "LaserPointListIn", + "LaserPointOut", + "LDAPSearchParams", + "LigandIn", + "LigandOptional", + "LigandOut", + "MillingStepIn", + "MillingStepInBeamTypeType0", + "MillingStepInStatusType0", + "MillingStepOut", + "MillingStepOutBeamTypeType0", + "MillingStepOutStatusType0", + "MotionCorrectionOptional", + "MotionCorrectionOut", + "MovieOptional", + "MovieOut", + "MxLimsContact", + "MxLimsDewar", + "MxLimsDewarContainerref", + "MxLimsDewarIdentifiers", + "MxLimsDewarUrls", + "MxLimsFullShipment", + "MxLimsFullShipmentDewar", + "MxLimsFullShipmentMacromolecule", + "MxLimsFullShipmentMacromoleculesample", + "MxLimsFullShipmentPin", + "MxLimsFullShipmentPuck", + "MxLimsFullShipmentShipment", + "MxLimsFullShipmentVersion", + "MxLimsMacromolecule", + "MxLimsMacromoleculeIdentifiers", + "MxLimsMacromoleculeSample", + "MxLimsMacromoleculeSampleIdentifiers", + "MxLimsMacromoleculeSampleParentsampleref", + "MxLimsMacromoleculeSampleUrls", + "MxLimsMacromoleculeUrls", + "MxLimsPin", + "MxLimsPinContainerref", + "MxLimsPinIdentifiers", + "MxLimsPinSampleref", + "MxLimsPinUrls", + "MxLimsPuck", + "MxLimsPuckContainerref", + "MxLimsPuckIdentifiers", + "MxLimsPuckUrls", + "MxLimsShipment", + "MxLimsShipmentIdentifiers", + "MxLimsShipmentUrls", + "MXMRRunBlobOptional", + "MXMRRunBlobOptionalMapTypeType0", + "MXMRRunBlobOut", + "MXMRRunBlobOutMapTypeType0", + "PagedAutoProcProgramAttachmentOut", + "PagedAutoProcProgramOut", + "PagedContainerHistoryOut", + "PagedContainerInspectionOut", + "PagedContainerOut", + "PagedContainerQueueOut", + "PagedCrystalOut", + "PagedDataCollectionCommentOut", + "PagedDataCollectionFileAttachmentOut", + "PagedDataCollectionGroupOut", + "PagedDataCollectionOut", + "PagedDewarOut", + "PagedDewarTransportHistoryOut", + "PagedDiffractionPlanOut", + "PagedEnergyScanOut", + "PagedFluorescenceSpectrumOut", + "PagedFoilHoleOut", + "PagedFullMovieOut", + "PagedGridInfoOut", + "PagedGridSquareOut", + "PagedImageQualityIndicatorOut", + "PagedLigandOut", + "PagedMillingStepOut", + "PagedMXMRRunBlobOut", + "PagedPDBOut", + "PagedPersonOut", + "PagedProcessingJobWithAutoProcProgramOut", + "PagedProposalOut", + "PagedProteinOut", + "PagedRegisteredContainerOut", + "PagedRegisteredDewarOut", + "PagedRobotActionOut", + "PagedSampleImageOut", + "PagedSampleOut", + "PagedSamplePositionOut", + "PagedSessionEventWithChildrenOut", + "PagedSessionOut", + "PagedShipmentOut", + "PagedTomogramOut", + "PagedUnionSessionEventOutSessionEventWithChildrenOut", + "PagedUserGroupHasPersonOut", + "PagedUserGroupLDAPSearchParams", + "PagedUserGroupOut", + "PDBLigandOut", + "PDBOut", + "PersonIdWithRole", + "PersonIdWithRoleRoleType0", + "PersonIn", + "PersonListNumeric", + "PersonListStr", + "PersonListUuid", + "PersonOptional", + "PersonOut", + "PersonWithRole", + "PersonWithRoleRoleType0", + "PositionIn", + "PositionOptional", + "PositionOut", + "ProcessingJobParametersIn", + "ProcessingJobParametersInItems", + "ProcessingJobParametersOut", + "ProcessingJobParametersOutItems", + "ProcessingJobWithAutoProcProgramOut", + "ProcessingStatus", + "ProposalIn", + "ProposalOptional", + "ProposalOut", + "ProposalWithChildrenOut", + "ProteinIn", + "ProteinOptional", + "ProteinOut", + "ProteinWithCrystalsIn", + "ProteinWithCrystalsOut", + "ReductionParameters", + "RegisteredContainerHasProposalIn", + "RegisteredContainerHasProposalOut", + "RegisteredContainerIn", + "RegisteredContainerOptional", + "RegisteredContainerOut", + "RegisteredDewarHasProposalIn", + "RegisteredDewarHasProposalOut", + "RegisteredDewarIn", + "RegisteredDewarOptional", + "RegisteredDewarOut", + "RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas", + "RobotActionIn", + "RobotActionInActionTypeType0", + "RobotActionInStatusType0", + "RobotActionOptional", + "RobotActionOptionalActionTypeType0", + "RobotActionOptionalStatusType0", + "RobotActionOut", + "RobotActionOutActionTypeType0", + "RobotActionOutStatusType0", + "RotationAxisEnum", + "SafetyLevels", + "SampleImageIn", + "SampleImageOptional", + "SampleImageOut", + "SampleIn", + "SampleInWithCrystalAndDiffractionPlan", + "SampleLigandOut", + "SampleOptional", + "SampleOut", + "SamplePositionIn", + "SamplePositionOptional", + "SamplePositionOut", + "SampleWithCrystalIn", + "SessionEventOut", + "SessionEventWithChildrenOut", + "SessionIn", + "SessionOptional", + "SessionOut", + "SessionTypeIn", + "SessionTypeOut", + "ShipmentIn", + "ShipmentInExtraType0Type0", + "ShipmentOptional", + "ShipmentOptionalExtraType0Type0", + "ShipmentOut", + "ShipmentOutExtraType0Type0", + "ShipmentSafetyLevels", + "ShipmentWithChildrenIn", + "ShipmentWithChildrenInExtraType0Type0", + "ShipmentWithChildrenOut", + "ShipmentWithChildrenOutExtraType0Type0", + "ShippingDataOut", + "StateEnum", + "StrategyOption", + "StrategyOptionScreenType0", + "StringSerialisedStrategyOptionType0", + "TiltImageAlignmentOptional", + "TiltImageAlignmentOut", + "TomogramOut", + "UserGroupHasPersonOut", + "UserGroupLDAPSearchParams", + "UserGroupOut", + "ValidationError", + "ValidationErrorContext", +) diff --git a/src/lims_utils/expeye_client/models/admin_var_in.py b/src/lims_utils/expeye_client/models/admin_var_in.py new file mode 100644 index 0000000..a883113 --- /dev/null +++ b/src/lims_utils/expeye_client/models/admin_var_in.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AdminVarIn") + + +@_attrs_define +class AdminVarIn: + """ + Attributes: + value (None | str | Unset): + """ + + value: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + admin_var_in = cls( + value=value, + ) + + admin_var_in.additional_properties = d + return admin_var_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/admin_var_out.py b/src/lims_utils/expeye_client/models/admin_var_out.py new file mode 100644 index 0000000..d32ee70 --- /dev/null +++ b/src/lims_utils/expeye_client/models/admin_var_out.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AdminVarOut") + + +@_attrs_define +class AdminVarOut: + """ + Attributes: + var_id (int): + name (None | str | Unset): + value (None | str | Unset): + """ + + var_id: int + name: None | str | Unset = UNSET + value: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + var_id = self.var_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + value: None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + else: + value = self.value + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "varId": var_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + var_id = d.pop("varId") + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_value(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + admin_var_out = cls( + var_id=var_id, + name=name, + value=value, + ) + + admin_var_out.additional_properties = d + return admin_var_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/aperture_in.py b/src/lims_utils/expeye_client/models/aperture_in.py new file mode 100644 index 0000000..151d877 --- /dev/null +++ b/src/lims_utils/expeye_client/models/aperture_in.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApertureIn") + + +@_attrs_define +class ApertureIn: + """ + Attributes: + size_x (float | None | Unset): + """ + + size_x: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + size_x: float | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if size_x is not UNSET: + field_dict["sizeX"] = size_x + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + aperture_in = cls( + size_x=size_x, + ) + + aperture_in.additional_properties = d + return aperture_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/aperture_out.py b/src/lims_utils/expeye_client/models/aperture_out.py new file mode 100644 index 0000000..31c1b04 --- /dev/null +++ b/src/lims_utils/expeye_client/models/aperture_out.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApertureOut") + + +@_attrs_define +class ApertureOut: + """ + Attributes: + aperture_id (int): + size_x (float | None | Unset): + """ + + aperture_id: int + size_x: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + aperture_id = self.aperture_id + + size_x: float | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "apertureId": aperture_id, + } + ) + if size_x is not UNSET: + field_dict["sizeX"] = size_x + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + aperture_id = d.pop("apertureId") + + def _parse_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + aperture_out = cls( + aperture_id=aperture_id, + size_x=size_x, + ) + + aperture_out.additional_properties = d + return aperture_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/atlas_in.py b/src/lims_utils/expeye_client/models/atlas_in.py new file mode 100644 index 0000000..0e3e5fa --- /dev/null +++ b/src/lims_utils/expeye_client/models/atlas_in.py @@ -0,0 +1,183 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.atlas_type import AtlasType +from ..models.grid_square_mode import GridSquareMode +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AtlasIn") + + +@_attrs_define +class AtlasIn: + """ + Attributes: + atlas_image (str): + pixel_size (float): + cassette_slot (int | None | Unset): + has_red (bool | Unset): Default: False. + has_green (bool | Unset): Default: False. + has_blue (bool | Unset): Default: False. + has_cyan (bool | Unset): Default: False. + has_magenta (bool | Unset): Default: False. + has_yellow (bool | Unset): Default: False. + has_grey (bool | Unset): Default: False. + mode (GridSquareMode | None | Unset): + atlas_type (AtlasType | Unset): + """ + + atlas_image: str + pixel_size: float + cassette_slot: int | None | Unset = UNSET + has_red: bool | Unset = False + has_green: bool | Unset = False + has_blue: bool | Unset = False + has_cyan: bool | Unset = False + has_magenta: bool | Unset = False + has_yellow: bool | Unset = False + has_grey: bool | Unset = False + mode: GridSquareMode | None | Unset = UNSET + atlas_type: AtlasType | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + atlas_image = self.atlas_image + + pixel_size = self.pixel_size + + cassette_slot: int | None | Unset + if isinstance(self.cassette_slot, Unset): + cassette_slot = UNSET + else: + cassette_slot = self.cassette_slot + + has_red = self.has_red + + has_green = self.has_green + + has_blue = self.has_blue + + has_cyan = self.has_cyan + + has_magenta = self.has_magenta + + has_yellow = self.has_yellow + + has_grey = self.has_grey + + mode: None | str | Unset + if isinstance(self.mode, Unset): + mode = UNSET + elif isinstance(self.mode, GridSquareMode): + mode = self.mode.value + else: + mode = self.mode + + atlas_type: str | Unset = UNSET + if not isinstance(self.atlas_type, Unset): + atlas_type = self.atlas_type.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "atlasImage": atlas_image, + "pixelSize": pixel_size, + } + ) + if cassette_slot is not UNSET: + field_dict["cassetteSlot"] = cassette_slot + if has_red is not UNSET: + field_dict["hasRed"] = has_red + if has_green is not UNSET: + field_dict["hasGreen"] = has_green + if has_blue is not UNSET: + field_dict["hasBlue"] = has_blue + if has_cyan is not UNSET: + field_dict["hasCyan"] = has_cyan + if has_magenta is not UNSET: + field_dict["hasMagenta"] = has_magenta + if has_yellow is not UNSET: + field_dict["hasYellow"] = has_yellow + if has_grey is not UNSET: + field_dict["hasGrey"] = has_grey + if mode is not UNSET: + field_dict["mode"] = mode + if atlas_type is not UNSET: + field_dict["atlasType"] = atlas_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + atlas_image = d.pop("atlasImage") + + pixel_size = d.pop("pixelSize") + + def _parse_cassette_slot(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cassette_slot = _parse_cassette_slot(d.pop("cassetteSlot", UNSET)) + + has_red = d.pop("hasRed", UNSET) + + has_green = d.pop("hasGreen", UNSET) + + has_blue = d.pop("hasBlue", UNSET) + + has_cyan = d.pop("hasCyan", UNSET) + + has_magenta = d.pop("hasMagenta", UNSET) + + has_yellow = d.pop("hasYellow", UNSET) + + has_grey = d.pop("hasGrey", UNSET) + + def _parse_mode(data: object) -> GridSquareMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mode_type_0 = GridSquareMode(data) + + return mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridSquareMode | None | Unset, data) + + mode = _parse_mode(d.pop("mode", UNSET)) + + _atlas_type = d.pop("atlasType", UNSET) + atlas_type: AtlasType | Unset + if isinstance(_atlas_type, Unset): + atlas_type = UNSET + else: + atlas_type = AtlasType(_atlas_type) + + atlas_in = cls( + atlas_image=atlas_image, + pixel_size=pixel_size, + cassette_slot=cassette_slot, + has_red=has_red, + has_green=has_green, + has_blue=has_blue, + has_cyan=has_cyan, + has_magenta=has_magenta, + has_yellow=has_yellow, + has_grey=has_grey, + mode=mode, + atlas_type=atlas_type, + ) + + return atlas_in diff --git a/src/lims_utils/expeye_client/models/atlas_optional.py b/src/lims_utils/expeye_client/models/atlas_optional.py new file mode 100644 index 0000000..b14ea35 --- /dev/null +++ b/src/lims_utils/expeye_client/models/atlas_optional.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.atlas_type import AtlasType +from ..models.grid_square_mode import GridSquareMode +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AtlasOptional") + + +@_attrs_define +class AtlasOptional: + """ + Attributes: + atlas_image (str): + cassette_slot (int | None | Unset): + has_red (bool | Unset): Default: False. + has_green (bool | Unset): Default: False. + has_blue (bool | Unset): Default: False. + has_cyan (bool | Unset): Default: False. + has_magenta (bool | Unset): Default: False. + has_yellow (bool | Unset): Default: False. + has_grey (bool | Unset): Default: False. + mode (GridSquareMode | None | Unset): + pixel_size (float | None | Unset): + atlas_type (AtlasType | None | Unset): + """ + + atlas_image: str + cassette_slot: int | None | Unset = UNSET + has_red: bool | Unset = False + has_green: bool | Unset = False + has_blue: bool | Unset = False + has_cyan: bool | Unset = False + has_magenta: bool | Unset = False + has_yellow: bool | Unset = False + has_grey: bool | Unset = False + mode: GridSquareMode | None | Unset = UNSET + pixel_size: float | None | Unset = UNSET + atlas_type: AtlasType | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + atlas_image = self.atlas_image + + cassette_slot: int | None | Unset + if isinstance(self.cassette_slot, Unset): + cassette_slot = UNSET + else: + cassette_slot = self.cassette_slot + + has_red = self.has_red + + has_green = self.has_green + + has_blue = self.has_blue + + has_cyan = self.has_cyan + + has_magenta = self.has_magenta + + has_yellow = self.has_yellow + + has_grey = self.has_grey + + mode: None | str | Unset + if isinstance(self.mode, Unset): + mode = UNSET + elif isinstance(self.mode, GridSquareMode): + mode = self.mode.value + else: + mode = self.mode + + pixel_size: float | None | Unset + if isinstance(self.pixel_size, Unset): + pixel_size = UNSET + else: + pixel_size = self.pixel_size + + atlas_type: None | str | Unset + if isinstance(self.atlas_type, Unset): + atlas_type = UNSET + elif isinstance(self.atlas_type, AtlasType): + atlas_type = self.atlas_type.value + else: + atlas_type = self.atlas_type + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "atlasImage": atlas_image, + } + ) + if cassette_slot is not UNSET: + field_dict["cassetteSlot"] = cassette_slot + if has_red is not UNSET: + field_dict["hasRed"] = has_red + if has_green is not UNSET: + field_dict["hasGreen"] = has_green + if has_blue is not UNSET: + field_dict["hasBlue"] = has_blue + if has_cyan is not UNSET: + field_dict["hasCyan"] = has_cyan + if has_magenta is not UNSET: + field_dict["hasMagenta"] = has_magenta + if has_yellow is not UNSET: + field_dict["hasYellow"] = has_yellow + if has_grey is not UNSET: + field_dict["hasGrey"] = has_grey + if mode is not UNSET: + field_dict["mode"] = mode + if pixel_size is not UNSET: + field_dict["pixelSize"] = pixel_size + if atlas_type is not UNSET: + field_dict["atlasType"] = atlas_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + atlas_image = d.pop("atlasImage") + + def _parse_cassette_slot(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cassette_slot = _parse_cassette_slot(d.pop("cassetteSlot", UNSET)) + + has_red = d.pop("hasRed", UNSET) + + has_green = d.pop("hasGreen", UNSET) + + has_blue = d.pop("hasBlue", UNSET) + + has_cyan = d.pop("hasCyan", UNSET) + + has_magenta = d.pop("hasMagenta", UNSET) + + has_yellow = d.pop("hasYellow", UNSET) + + has_grey = d.pop("hasGrey", UNSET) + + def _parse_mode(data: object) -> GridSquareMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mode_type_0 = GridSquareMode(data) + + return mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridSquareMode | None | Unset, data) + + mode = _parse_mode(d.pop("mode", UNSET)) + + def _parse_pixel_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size = _parse_pixel_size(d.pop("pixelSize", UNSET)) + + def _parse_atlas_type(data: object) -> AtlasType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + atlas_type_type_0 = AtlasType(data) + + return atlas_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AtlasType | None | Unset, data) + + atlas_type = _parse_atlas_type(d.pop("atlasType", UNSET)) + + atlas_optional = cls( + atlas_image=atlas_image, + cassette_slot=cassette_slot, + has_red=has_red, + has_green=has_green, + has_blue=has_blue, + has_cyan=has_cyan, + has_magenta=has_magenta, + has_yellow=has_yellow, + has_grey=has_grey, + mode=mode, + pixel_size=pixel_size, + atlas_type=atlas_type, + ) + + return atlas_optional diff --git a/src/lims_utils/expeye_client/models/atlas_out.py b/src/lims_utils/expeye_client/models/atlas_out.py new file mode 100644 index 0000000..32a5141 --- /dev/null +++ b/src/lims_utils/expeye_client/models/atlas_out.py @@ -0,0 +1,199 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.atlas_type import AtlasType +from ..models.grid_square_mode import GridSquareMode +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AtlasOut") + + +@_attrs_define +class AtlasOut: + """ + Attributes: + atlas_image (str): + atlas_id (int): + data_collection_group_id (int): + pixel_size (float): + cassette_slot (int | None | Unset): + has_red (bool | Unset): Default: False. + has_green (bool | Unset): Default: False. + has_blue (bool | Unset): Default: False. + has_cyan (bool | Unset): Default: False. + has_magenta (bool | Unset): Default: False. + has_yellow (bool | Unset): Default: False. + has_grey (bool | Unset): Default: False. + mode (GridSquareMode | None | Unset): + atlas_type (AtlasType | Unset): + """ + + atlas_image: str + atlas_id: int + data_collection_group_id: int + pixel_size: float + cassette_slot: int | None | Unset = UNSET + has_red: bool | Unset = False + has_green: bool | Unset = False + has_blue: bool | Unset = False + has_cyan: bool | Unset = False + has_magenta: bool | Unset = False + has_yellow: bool | Unset = False + has_grey: bool | Unset = False + mode: GridSquareMode | None | Unset = UNSET + atlas_type: AtlasType | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + atlas_image = self.atlas_image + + atlas_id = self.atlas_id + + data_collection_group_id = self.data_collection_group_id + + pixel_size = self.pixel_size + + cassette_slot: int | None | Unset + if isinstance(self.cassette_slot, Unset): + cassette_slot = UNSET + else: + cassette_slot = self.cassette_slot + + has_red = self.has_red + + has_green = self.has_green + + has_blue = self.has_blue + + has_cyan = self.has_cyan + + has_magenta = self.has_magenta + + has_yellow = self.has_yellow + + has_grey = self.has_grey + + mode: None | str | Unset + if isinstance(self.mode, Unset): + mode = UNSET + elif isinstance(self.mode, GridSquareMode): + mode = self.mode.value + else: + mode = self.mode + + atlas_type: str | Unset = UNSET + if not isinstance(self.atlas_type, Unset): + atlas_type = self.atlas_type.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "atlasImage": atlas_image, + "atlasId": atlas_id, + "dataCollectionGroupId": data_collection_group_id, + "pixelSize": pixel_size, + } + ) + if cassette_slot is not UNSET: + field_dict["cassetteSlot"] = cassette_slot + if has_red is not UNSET: + field_dict["hasRed"] = has_red + if has_green is not UNSET: + field_dict["hasGreen"] = has_green + if has_blue is not UNSET: + field_dict["hasBlue"] = has_blue + if has_cyan is not UNSET: + field_dict["hasCyan"] = has_cyan + if has_magenta is not UNSET: + field_dict["hasMagenta"] = has_magenta + if has_yellow is not UNSET: + field_dict["hasYellow"] = has_yellow + if has_grey is not UNSET: + field_dict["hasGrey"] = has_grey + if mode is not UNSET: + field_dict["mode"] = mode + if atlas_type is not UNSET: + field_dict["atlasType"] = atlas_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + atlas_image = d.pop("atlasImage") + + atlas_id = d.pop("atlasId") + + data_collection_group_id = d.pop("dataCollectionGroupId") + + pixel_size = d.pop("pixelSize") + + def _parse_cassette_slot(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + cassette_slot = _parse_cassette_slot(d.pop("cassetteSlot", UNSET)) + + has_red = d.pop("hasRed", UNSET) + + has_green = d.pop("hasGreen", UNSET) + + has_blue = d.pop("hasBlue", UNSET) + + has_cyan = d.pop("hasCyan", UNSET) + + has_magenta = d.pop("hasMagenta", UNSET) + + has_yellow = d.pop("hasYellow", UNSET) + + has_grey = d.pop("hasGrey", UNSET) + + def _parse_mode(data: object) -> GridSquareMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mode_type_0 = GridSquareMode(data) + + return mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridSquareMode | None | Unset, data) + + mode = _parse_mode(d.pop("mode", UNSET)) + + _atlas_type = d.pop("atlasType", UNSET) + atlas_type: AtlasType | Unset + if isinstance(_atlas_type, Unset): + atlas_type = UNSET + else: + atlas_type = AtlasType(_atlas_type) + + atlas_out = cls( + atlas_image=atlas_image, + atlas_id=atlas_id, + data_collection_group_id=data_collection_group_id, + pixel_size=pixel_size, + cassette_slot=cassette_slot, + has_red=has_red, + has_green=has_green, + has_blue=has_blue, + has_cyan=has_cyan, + has_magenta=has_magenta, + has_yellow=has_yellow, + has_grey=has_grey, + mode=mode, + atlas_type=atlas_type, + ) + + return atlas_out diff --git a/src/lims_utils/expeye_client/models/atlas_type.py b/src/lims_utils/expeye_client/models/atlas_type.py new file mode 100644 index 0000000..e860e77 --- /dev/null +++ b/src/lims_utils/expeye_client/models/atlas_type.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class AtlasType(StrEnum): + ROI = "ROI" + TILESCAN = "Tilescan" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/auto_proc_integration_out.py b/src/lims_utils/expeye_client/models/auto_proc_integration_out.py new file mode 100644 index 0000000..a99039b --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_integration_out.py @@ -0,0 +1,418 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcIntegrationOut") + + +@_attrs_define +class AutoProcIntegrationOut: + """ + Attributes: + auto_proc_integration_id (int): + cell_a (float | None): + cell_b (float | None): + cell_c (float | None): + cell_alpha (float | None): + cell_beta (float | None): + cell_gamma (float | None): + start_image_number (int | None | Unset): + end_image_number (int | None | Unset): + refined_detector_distance (float | None | Unset): + refined_x_beam (float | None | Unset): + refined_y_beam (float | None | Unset): + rotation_axis_x (float | None | Unset): + rotation_axis_y (float | None | Unset): + rotation_axis_z (float | None | Unset): + beam_vector_x (float | None | Unset): + beam_vector_y (float | None | Unset): + beam_vector_z (float | None | Unset): + record_time_stamp (datetime.datetime | None | Unset): + anomalous (bool | None | Unset): + """ + + auto_proc_integration_id: int + cell_a: float | None + cell_b: float | None + cell_c: float | None + cell_alpha: float | None + cell_beta: float | None + cell_gamma: float | None + start_image_number: int | None | Unset = UNSET + end_image_number: int | None | Unset = UNSET + refined_detector_distance: float | None | Unset = UNSET + refined_x_beam: float | None | Unset = UNSET + refined_y_beam: float | None | Unset = UNSET + rotation_axis_x: float | None | Unset = UNSET + rotation_axis_y: float | None | Unset = UNSET + rotation_axis_z: float | None | Unset = UNSET + beam_vector_x: float | None | Unset = UNSET + beam_vector_y: float | None | Unset = UNSET + beam_vector_z: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + anomalous: bool | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_proc_integration_id = self.auto_proc_integration_id + + cell_a: float | None + cell_a = self.cell_a + + cell_b: float | None + cell_b = self.cell_b + + cell_c: float | None + cell_c = self.cell_c + + cell_alpha: float | None + cell_alpha = self.cell_alpha + + cell_beta: float | None + cell_beta = self.cell_beta + + cell_gamma: float | None + cell_gamma = self.cell_gamma + + start_image_number: int | None | Unset + if isinstance(self.start_image_number, Unset): + start_image_number = UNSET + else: + start_image_number = self.start_image_number + + end_image_number: int | None | Unset + if isinstance(self.end_image_number, Unset): + end_image_number = UNSET + else: + end_image_number = self.end_image_number + + refined_detector_distance: float | None | Unset + if isinstance(self.refined_detector_distance, Unset): + refined_detector_distance = UNSET + else: + refined_detector_distance = self.refined_detector_distance + + refined_x_beam: float | None | Unset + if isinstance(self.refined_x_beam, Unset): + refined_x_beam = UNSET + else: + refined_x_beam = self.refined_x_beam + + refined_y_beam: float | None | Unset + if isinstance(self.refined_y_beam, Unset): + refined_y_beam = UNSET + else: + refined_y_beam = self.refined_y_beam + + rotation_axis_x: float | None | Unset + if isinstance(self.rotation_axis_x, Unset): + rotation_axis_x = UNSET + else: + rotation_axis_x = self.rotation_axis_x + + rotation_axis_y: float | None | Unset + if isinstance(self.rotation_axis_y, Unset): + rotation_axis_y = UNSET + else: + rotation_axis_y = self.rotation_axis_y + + rotation_axis_z: float | None | Unset + if isinstance(self.rotation_axis_z, Unset): + rotation_axis_z = UNSET + else: + rotation_axis_z = self.rotation_axis_z + + beam_vector_x: float | None | Unset + if isinstance(self.beam_vector_x, Unset): + beam_vector_x = UNSET + else: + beam_vector_x = self.beam_vector_x + + beam_vector_y: float | None | Unset + if isinstance(self.beam_vector_y, Unset): + beam_vector_y = UNSET + else: + beam_vector_y = self.beam_vector_y + + beam_vector_z: float | None | Unset + if isinstance(self.beam_vector_z, Unset): + beam_vector_z = UNSET + else: + beam_vector_z = self.beam_vector_z + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + anomalous: bool | None | Unset + if isinstance(self.anomalous, Unset): + anomalous = UNSET + else: + anomalous = self.anomalous + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "autoProcIntegrationId": auto_proc_integration_id, + "cellA": cell_a, + "cellB": cell_b, + "cellC": cell_c, + "cellAlpha": cell_alpha, + "cellBeta": cell_beta, + "cellGamma": cell_gamma, + } + ) + if start_image_number is not UNSET: + field_dict["startImageNumber"] = start_image_number + if end_image_number is not UNSET: + field_dict["endImageNumber"] = end_image_number + if refined_detector_distance is not UNSET: + field_dict["refinedDetectorDistance"] = refined_detector_distance + if refined_x_beam is not UNSET: + field_dict["refinedXBeam"] = refined_x_beam + if refined_y_beam is not UNSET: + field_dict["refinedYBeam"] = refined_y_beam + if rotation_axis_x is not UNSET: + field_dict["rotationAxisX"] = rotation_axis_x + if rotation_axis_y is not UNSET: + field_dict["rotationAxisY"] = rotation_axis_y + if rotation_axis_z is not UNSET: + field_dict["rotationAxisZ"] = rotation_axis_z + if beam_vector_x is not UNSET: + field_dict["beamVectorX"] = beam_vector_x + if beam_vector_y is not UNSET: + field_dict["beamVectorY"] = beam_vector_y + if beam_vector_z is not UNSET: + field_dict["beamVectorZ"] = beam_vector_z + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if anomalous is not UNSET: + field_dict["anomalous"] = anomalous + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + auto_proc_integration_id = d.pop("autoProcIntegrationId") + + def _parse_cell_a(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cell_a = _parse_cell_a(d.pop("cellA")) + + def _parse_cell_b(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cell_b = _parse_cell_b(d.pop("cellB")) + + def _parse_cell_c(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cell_c = _parse_cell_c(d.pop("cellC")) + + def _parse_cell_alpha(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cell_alpha = _parse_cell_alpha(d.pop("cellAlpha")) + + def _parse_cell_beta(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cell_beta = _parse_cell_beta(d.pop("cellBeta")) + + def _parse_cell_gamma(data: object) -> float | None: + if data is None: + return data + return cast(float | None, data) + + cell_gamma = _parse_cell_gamma(d.pop("cellGamma")) + + def _parse_start_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + start_image_number = _parse_start_image_number(d.pop("startImageNumber", UNSET)) + + def _parse_end_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + end_image_number = _parse_end_image_number(d.pop("endImageNumber", UNSET)) + + def _parse_refined_detector_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_detector_distance = _parse_refined_detector_distance(d.pop("refinedDetectorDistance", UNSET)) + + def _parse_refined_x_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_x_beam = _parse_refined_x_beam(d.pop("refinedXBeam", UNSET)) + + def _parse_refined_y_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_y_beam = _parse_refined_y_beam(d.pop("refinedYBeam", UNSET)) + + def _parse_rotation_axis_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + rotation_axis_x = _parse_rotation_axis_x(d.pop("rotationAxisX", UNSET)) + + def _parse_rotation_axis_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + rotation_axis_y = _parse_rotation_axis_y(d.pop("rotationAxisY", UNSET)) + + def _parse_rotation_axis_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + rotation_axis_z = _parse_rotation_axis_z(d.pop("rotationAxisZ", UNSET)) + + def _parse_beam_vector_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_vector_x = _parse_beam_vector_x(d.pop("beamVectorX", UNSET)) + + def _parse_beam_vector_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_vector_y = _parse_beam_vector_y(d.pop("beamVectorY", UNSET)) + + def _parse_beam_vector_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_vector_z = _parse_beam_vector_z(d.pop("beamVectorZ", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_anomalous(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + anomalous = _parse_anomalous(d.pop("anomalous", UNSET)) + + auto_proc_integration_out = cls( + auto_proc_integration_id=auto_proc_integration_id, + cell_a=cell_a, + cell_b=cell_b, + cell_c=cell_c, + cell_alpha=cell_alpha, + cell_beta=cell_beta, + cell_gamma=cell_gamma, + start_image_number=start_image_number, + end_image_number=end_image_number, + refined_detector_distance=refined_detector_distance, + refined_x_beam=refined_x_beam, + refined_y_beam=refined_y_beam, + rotation_axis_x=rotation_axis_x, + rotation_axis_y=rotation_axis_y, + rotation_axis_z=rotation_axis_z, + beam_vector_x=beam_vector_x, + beam_vector_y=beam_vector_y, + beam_vector_z=beam_vector_z, + record_time_stamp=record_time_stamp, + anomalous=anomalous, + ) + + auto_proc_integration_out.additional_properties = d + return auto_proc_integration_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_attachment_in.py b/src/lims_utils/expeye_client/models/auto_proc_program_attachment_in.py new file mode 100644 index 0000000..5965fc4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_attachment_in.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.file_type import FileType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramAttachmentIn") + + +@_attrs_define +class AutoProcProgramAttachmentIn: + """ + Attributes: + file_type (FileType | None | Unset): + file_name (None | str | Unset): + file_path (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + importance_rank (int | None | Unset): + deleted (bool | None | Unset): Default: False. + """ + + file_type: FileType | None | Unset = UNSET + file_name: None | str | Unset = UNSET + file_path: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + importance_rank: int | None | Unset = UNSET + deleted: bool | None | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file_type: None | str | Unset + if isinstance(self.file_type, Unset): + file_type = UNSET + elif isinstance(self.file_type, FileType): + file_type = self.file_type.value + else: + file_type = self.file_type + + file_name: None | str | Unset + if isinstance(self.file_name, Unset): + file_name = UNSET + else: + file_name = self.file_name + + file_path: None | str | Unset + if isinstance(self.file_path, Unset): + file_path = UNSET + else: + file_path = self.file_path + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + importance_rank: int | None | Unset + if isinstance(self.importance_rank, Unset): + importance_rank = UNSET + else: + importance_rank = self.importance_rank + + deleted: bool | None | Unset + if isinstance(self.deleted, Unset): + deleted = UNSET + else: + deleted = self.deleted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_type is not UNSET: + field_dict["fileType"] = file_type + if file_name is not UNSET: + field_dict["fileName"] = file_name + if file_path is not UNSET: + field_dict["filePath"] = file_path + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if importance_rank is not UNSET: + field_dict["importanceRank"] = importance_rank + if deleted is not UNSET: + field_dict["deleted"] = deleted + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_file_type(data: object) -> FileType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + file_type_type_0 = FileType(data) + + return file_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(FileType | None | Unset, data) + + file_type = _parse_file_type(d.pop("fileType", UNSET)) + + def _parse_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_name = _parse_file_name(d.pop("fileName", UNSET)) + + def _parse_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_path = _parse_file_path(d.pop("filePath", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_importance_rank(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + importance_rank = _parse_importance_rank(d.pop("importanceRank", UNSET)) + + def _parse_deleted(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + deleted = _parse_deleted(d.pop("deleted", UNSET)) + + auto_proc_program_attachment_in = cls( + file_type=file_type, + file_name=file_name, + file_path=file_path, + record_time_stamp=record_time_stamp, + importance_rank=importance_rank, + deleted=deleted, + ) + + auto_proc_program_attachment_in.additional_properties = d + return auto_proc_program_attachment_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_attachment_optional.py b/src/lims_utils/expeye_client/models/auto_proc_program_attachment_optional.py new file mode 100644 index 0000000..344d48f --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_attachment_optional.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.file_type import FileType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramAttachmentOptional") + + +@_attrs_define +class AutoProcProgramAttachmentOptional: + """ + Attributes: + file_type (FileType | None | Unset): + file_name (None | str | Unset): + file_path (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + importance_rank (int | None | Unset): + deleted (bool | None | Unset): Default: False. + """ + + file_type: FileType | None | Unset = UNSET + file_name: None | str | Unset = UNSET + file_path: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + importance_rank: int | None | Unset = UNSET + deleted: bool | None | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file_type: None | str | Unset + if isinstance(self.file_type, Unset): + file_type = UNSET + elif isinstance(self.file_type, FileType): + file_type = self.file_type.value + else: + file_type = self.file_type + + file_name: None | str | Unset + if isinstance(self.file_name, Unset): + file_name = UNSET + else: + file_name = self.file_name + + file_path: None | str | Unset + if isinstance(self.file_path, Unset): + file_path = UNSET + else: + file_path = self.file_path + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + importance_rank: int | None | Unset + if isinstance(self.importance_rank, Unset): + importance_rank = UNSET + else: + importance_rank = self.importance_rank + + deleted: bool | None | Unset + if isinstance(self.deleted, Unset): + deleted = UNSET + else: + deleted = self.deleted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_type is not UNSET: + field_dict["fileType"] = file_type + if file_name is not UNSET: + field_dict["fileName"] = file_name + if file_path is not UNSET: + field_dict["filePath"] = file_path + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if importance_rank is not UNSET: + field_dict["importanceRank"] = importance_rank + if deleted is not UNSET: + field_dict["deleted"] = deleted + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_file_type(data: object) -> FileType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + file_type_type_0 = FileType(data) + + return file_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(FileType | None | Unset, data) + + file_type = _parse_file_type(d.pop("fileType", UNSET)) + + def _parse_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_name = _parse_file_name(d.pop("fileName", UNSET)) + + def _parse_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_path = _parse_file_path(d.pop("filePath", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_importance_rank(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + importance_rank = _parse_importance_rank(d.pop("importanceRank", UNSET)) + + def _parse_deleted(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + deleted = _parse_deleted(d.pop("deleted", UNSET)) + + auto_proc_program_attachment_optional = cls( + file_type=file_type, + file_name=file_name, + file_path=file_path, + record_time_stamp=record_time_stamp, + importance_rank=importance_rank, + deleted=deleted, + ) + + auto_proc_program_attachment_optional.additional_properties = d + return auto_proc_program_attachment_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_attachment_out.py b/src/lims_utils/expeye_client/models/auto_proc_program_attachment_out.py new file mode 100644 index 0000000..39d4b8c --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_attachment_out.py @@ -0,0 +1,213 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.file_type import FileType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramAttachmentOut") + + +@_attrs_define +class AutoProcProgramAttachmentOut: + """ + Attributes: + auto_proc_program_attachment_id (int): + auto_proc_program_id (int): + file_type (FileType | None | Unset): + file_name (None | str | Unset): + file_path (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + importance_rank (int | None | Unset): + deleted (bool | None | Unset): Default: False. + """ + + auto_proc_program_attachment_id: int + auto_proc_program_id: int + file_type: FileType | None | Unset = UNSET + file_name: None | str | Unset = UNSET + file_path: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + importance_rank: int | None | Unset = UNSET + deleted: bool | None | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_attachment_id = self.auto_proc_program_attachment_id + + auto_proc_program_id = self.auto_proc_program_id + + file_type: None | str | Unset + if isinstance(self.file_type, Unset): + file_type = UNSET + elif isinstance(self.file_type, FileType): + file_type = self.file_type.value + else: + file_type = self.file_type + + file_name: None | str | Unset + if isinstance(self.file_name, Unset): + file_name = UNSET + else: + file_name = self.file_name + + file_path: None | str | Unset + if isinstance(self.file_path, Unset): + file_path = UNSET + else: + file_path = self.file_path + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + importance_rank: int | None | Unset + if isinstance(self.importance_rank, Unset): + importance_rank = UNSET + else: + importance_rank = self.importance_rank + + deleted: bool | None | Unset + if isinstance(self.deleted, Unset): + deleted = UNSET + else: + deleted = self.deleted + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "autoProcProgramAttachmentId": auto_proc_program_attachment_id, + "autoProcProgramId": auto_proc_program_id, + } + ) + if file_type is not UNSET: + field_dict["fileType"] = file_type + if file_name is not UNSET: + field_dict["fileName"] = file_name + if file_path is not UNSET: + field_dict["filePath"] = file_path + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if importance_rank is not UNSET: + field_dict["importanceRank"] = importance_rank + if deleted is not UNSET: + field_dict["deleted"] = deleted + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + auto_proc_program_attachment_id = d.pop("autoProcProgramAttachmentId") + + auto_proc_program_id = d.pop("autoProcProgramId") + + def _parse_file_type(data: object) -> FileType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + file_type_type_0 = FileType(data) + + return file_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(FileType | None | Unset, data) + + file_type = _parse_file_type(d.pop("fileType", UNSET)) + + def _parse_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_name = _parse_file_name(d.pop("fileName", UNSET)) + + def _parse_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_path = _parse_file_path(d.pop("filePath", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_importance_rank(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + importance_rank = _parse_importance_rank(d.pop("importanceRank", UNSET)) + + def _parse_deleted(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + deleted = _parse_deleted(d.pop("deleted", UNSET)) + + auto_proc_program_attachment_out = cls( + auto_proc_program_attachment_id=auto_proc_program_attachment_id, + auto_proc_program_id=auto_proc_program_id, + file_type=file_type, + file_name=file_name, + file_path=file_path, + record_time_stamp=record_time_stamp, + importance_rank=importance_rank, + deleted=deleted, + ) + + auto_proc_program_attachment_out.additional_properties = d + return auto_proc_program_attachment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_in.py b/src/lims_utils/expeye_client/models/auto_proc_program_in.py new file mode 100644 index 0000000..f01a05f --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_in.py @@ -0,0 +1,295 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramIn") + + +@_attrs_define +class AutoProcProgramIn: + """ + Attributes: + parent_auto_proc_program_id (int | None | Unset): + processing_command_line (None | str | Unset): + processing_programs (None | str | Unset): + processing_status (int | None | Unset): + processing_message (None | str | Unset): + processing_start_time (datetime.datetime | None | Unset): + processing_end_time (datetime.datetime | None | Unset): + processing_environment (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + job_uuid (None | Unset | UUID): + """ + + parent_auto_proc_program_id: int | None | Unset = UNSET + processing_command_line: None | str | Unset = UNSET + processing_programs: None | str | Unset = UNSET + processing_status: int | None | Unset = UNSET + processing_message: None | str | Unset = UNSET + processing_start_time: datetime.datetime | None | Unset = UNSET + processing_end_time: datetime.datetime | None | Unset = UNSET + processing_environment: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + job_uuid: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + parent_auto_proc_program_id: int | None | Unset + if isinstance(self.parent_auto_proc_program_id, Unset): + parent_auto_proc_program_id = UNSET + else: + parent_auto_proc_program_id = self.parent_auto_proc_program_id + + processing_command_line: None | str | Unset + if isinstance(self.processing_command_line, Unset): + processing_command_line = UNSET + else: + processing_command_line = self.processing_command_line + + processing_programs: None | str | Unset + if isinstance(self.processing_programs, Unset): + processing_programs = UNSET + else: + processing_programs = self.processing_programs + + processing_status: int | None | Unset + if isinstance(self.processing_status, Unset): + processing_status = UNSET + else: + processing_status = self.processing_status + + processing_message: None | str | Unset + if isinstance(self.processing_message, Unset): + processing_message = UNSET + else: + processing_message = self.processing_message + + processing_start_time: None | str | Unset + if isinstance(self.processing_start_time, Unset): + processing_start_time = UNSET + elif isinstance(self.processing_start_time, datetime.datetime): + processing_start_time = self.processing_start_time.isoformat() + else: + processing_start_time = self.processing_start_time + + processing_end_time: None | str | Unset + if isinstance(self.processing_end_time, Unset): + processing_end_time = UNSET + elif isinstance(self.processing_end_time, datetime.datetime): + processing_end_time = self.processing_end_time.isoformat() + else: + processing_end_time = self.processing_end_time + + processing_environment: None | str | Unset + if isinstance(self.processing_environment, Unset): + processing_environment = UNSET + else: + processing_environment = self.processing_environment + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + job_uuid: None | str | Unset + if isinstance(self.job_uuid, Unset): + job_uuid = UNSET + elif isinstance(self.job_uuid, UUID): + job_uuid = str(self.job_uuid) + else: + job_uuid = self.job_uuid + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if parent_auto_proc_program_id is not UNSET: + field_dict["parentAutoProcProgramId"] = parent_auto_proc_program_id + if processing_command_line is not UNSET: + field_dict["processingCommandLine"] = processing_command_line + if processing_programs is not UNSET: + field_dict["processingPrograms"] = processing_programs + if processing_status is not UNSET: + field_dict["processingStatus"] = processing_status + if processing_message is not UNSET: + field_dict["processingMessage"] = processing_message + if processing_start_time is not UNSET: + field_dict["processingStartTime"] = processing_start_time + if processing_end_time is not UNSET: + field_dict["processingEndTime"] = processing_end_time + if processing_environment is not UNSET: + field_dict["processingEnvironment"] = processing_environment + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if job_uuid is not UNSET: + field_dict["jobUuid"] = job_uuid + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_parent_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + parent_auto_proc_program_id = _parse_parent_auto_proc_program_id(d.pop("parentAutoProcProgramId", UNSET)) + + def _parse_processing_command_line(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_command_line = _parse_processing_command_line(d.pop("processingCommandLine", UNSET)) + + def _parse_processing_programs(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_programs = _parse_processing_programs(d.pop("processingPrograms", UNSET)) + + def _parse_processing_status(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + processing_status = _parse_processing_status(d.pop("processingStatus", UNSET)) + + def _parse_processing_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_message = _parse_processing_message(d.pop("processingMessage", UNSET)) + + def _parse_processing_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_start_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_start_time = _parse_processing_start_time(d.pop("processingStartTime", UNSET)) + + def _parse_processing_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_end_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_end_time = _parse_processing_end_time(d.pop("processingEndTime", UNSET)) + + def _parse_processing_environment(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_environment = _parse_processing_environment(d.pop("processingEnvironment", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_job_uuid(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + job_uuid_type_0 = UUID(data) + + return job_uuid_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + job_uuid = _parse_job_uuid(d.pop("jobUuid", UNSET)) + + auto_proc_program_in = cls( + parent_auto_proc_program_id=parent_auto_proc_program_id, + processing_command_line=processing_command_line, + processing_programs=processing_programs, + processing_status=processing_status, + processing_message=processing_message, + processing_start_time=processing_start_time, + processing_end_time=processing_end_time, + processing_environment=processing_environment, + record_time_stamp=record_time_stamp, + job_uuid=job_uuid, + ) + + auto_proc_program_in.additional_properties = d + return auto_proc_program_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_optional.py b/src/lims_utils/expeye_client/models/auto_proc_program_optional.py new file mode 100644 index 0000000..8426955 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_optional.py @@ -0,0 +1,295 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramOptional") + + +@_attrs_define +class AutoProcProgramOptional: + """ + Attributes: + parent_auto_proc_program_id (int | None | Unset): + processing_command_line (None | str | Unset): + processing_programs (None | str | Unset): + processing_status (int | None | Unset): + processing_message (None | str | Unset): + processing_start_time (datetime.datetime | None | Unset): + processing_end_time (datetime.datetime | None | Unset): + processing_environment (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + job_uuid (None | Unset | UUID): + """ + + parent_auto_proc_program_id: int | None | Unset = UNSET + processing_command_line: None | str | Unset = UNSET + processing_programs: None | str | Unset = UNSET + processing_status: int | None | Unset = UNSET + processing_message: None | str | Unset = UNSET + processing_start_time: datetime.datetime | None | Unset = UNSET + processing_end_time: datetime.datetime | None | Unset = UNSET + processing_environment: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + job_uuid: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + parent_auto_proc_program_id: int | None | Unset + if isinstance(self.parent_auto_proc_program_id, Unset): + parent_auto_proc_program_id = UNSET + else: + parent_auto_proc_program_id = self.parent_auto_proc_program_id + + processing_command_line: None | str | Unset + if isinstance(self.processing_command_line, Unset): + processing_command_line = UNSET + else: + processing_command_line = self.processing_command_line + + processing_programs: None | str | Unset + if isinstance(self.processing_programs, Unset): + processing_programs = UNSET + else: + processing_programs = self.processing_programs + + processing_status: int | None | Unset + if isinstance(self.processing_status, Unset): + processing_status = UNSET + else: + processing_status = self.processing_status + + processing_message: None | str | Unset + if isinstance(self.processing_message, Unset): + processing_message = UNSET + else: + processing_message = self.processing_message + + processing_start_time: None | str | Unset + if isinstance(self.processing_start_time, Unset): + processing_start_time = UNSET + elif isinstance(self.processing_start_time, datetime.datetime): + processing_start_time = self.processing_start_time.isoformat() + else: + processing_start_time = self.processing_start_time + + processing_end_time: None | str | Unset + if isinstance(self.processing_end_time, Unset): + processing_end_time = UNSET + elif isinstance(self.processing_end_time, datetime.datetime): + processing_end_time = self.processing_end_time.isoformat() + else: + processing_end_time = self.processing_end_time + + processing_environment: None | str | Unset + if isinstance(self.processing_environment, Unset): + processing_environment = UNSET + else: + processing_environment = self.processing_environment + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + job_uuid: None | str | Unset + if isinstance(self.job_uuid, Unset): + job_uuid = UNSET + elif isinstance(self.job_uuid, UUID): + job_uuid = str(self.job_uuid) + else: + job_uuid = self.job_uuid + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if parent_auto_proc_program_id is not UNSET: + field_dict["parentAutoProcProgramId"] = parent_auto_proc_program_id + if processing_command_line is not UNSET: + field_dict["processingCommandLine"] = processing_command_line + if processing_programs is not UNSET: + field_dict["processingPrograms"] = processing_programs + if processing_status is not UNSET: + field_dict["processingStatus"] = processing_status + if processing_message is not UNSET: + field_dict["processingMessage"] = processing_message + if processing_start_time is not UNSET: + field_dict["processingStartTime"] = processing_start_time + if processing_end_time is not UNSET: + field_dict["processingEndTime"] = processing_end_time + if processing_environment is not UNSET: + field_dict["processingEnvironment"] = processing_environment + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if job_uuid is not UNSET: + field_dict["jobUuid"] = job_uuid + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_parent_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + parent_auto_proc_program_id = _parse_parent_auto_proc_program_id(d.pop("parentAutoProcProgramId", UNSET)) + + def _parse_processing_command_line(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_command_line = _parse_processing_command_line(d.pop("processingCommandLine", UNSET)) + + def _parse_processing_programs(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_programs = _parse_processing_programs(d.pop("processingPrograms", UNSET)) + + def _parse_processing_status(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + processing_status = _parse_processing_status(d.pop("processingStatus", UNSET)) + + def _parse_processing_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_message = _parse_processing_message(d.pop("processingMessage", UNSET)) + + def _parse_processing_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_start_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_start_time = _parse_processing_start_time(d.pop("processingStartTime", UNSET)) + + def _parse_processing_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_end_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_end_time = _parse_processing_end_time(d.pop("processingEndTime", UNSET)) + + def _parse_processing_environment(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_environment = _parse_processing_environment(d.pop("processingEnvironment", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_job_uuid(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + job_uuid_type_0 = UUID(data) + + return job_uuid_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + job_uuid = _parse_job_uuid(d.pop("jobUuid", UNSET)) + + auto_proc_program_optional = cls( + parent_auto_proc_program_id=parent_auto_proc_program_id, + processing_command_line=processing_command_line, + processing_programs=processing_programs, + processing_status=processing_status, + processing_message=processing_message, + processing_start_time=processing_start_time, + processing_end_time=processing_end_time, + processing_environment=processing_environment, + record_time_stamp=record_time_stamp, + job_uuid=job_uuid, + ) + + auto_proc_program_optional.additional_properties = d + return auto_proc_program_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_out.py b/src/lims_utils/expeye_client/models/auto_proc_program_out.py new file mode 100644 index 0000000..c761926 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_out.py @@ -0,0 +1,322 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.processing_status import ProcessingStatus +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramOut") + + +@_attrs_define +class AutoProcProgramOut: + """ + Attributes: + auto_proc_program_id (int): + processing_job_id (int): + status (ProcessingStatus): + parent_auto_proc_program_id (int | None | Unset): + processing_command_line (None | str | Unset): + processing_programs (None | str | Unset): + processing_status (int | None | Unset): + processing_message (None | str | Unset): + processing_start_time (datetime.datetime | None | Unset): + processing_end_time (datetime.datetime | None | Unset): + processing_environment (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + job_uuid (None | Unset | UUID): + """ + + auto_proc_program_id: int + processing_job_id: int + status: ProcessingStatus + parent_auto_proc_program_id: int | None | Unset = UNSET + processing_command_line: None | str | Unset = UNSET + processing_programs: None | str | Unset = UNSET + processing_status: int | None | Unset = UNSET + processing_message: None | str | Unset = UNSET + processing_start_time: datetime.datetime | None | Unset = UNSET + processing_end_time: datetime.datetime | None | Unset = UNSET + processing_environment: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + job_uuid: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_id = self.auto_proc_program_id + + processing_job_id = self.processing_job_id + + status = self.status.value + + parent_auto_proc_program_id: int | None | Unset + if isinstance(self.parent_auto_proc_program_id, Unset): + parent_auto_proc_program_id = UNSET + else: + parent_auto_proc_program_id = self.parent_auto_proc_program_id + + processing_command_line: None | str | Unset + if isinstance(self.processing_command_line, Unset): + processing_command_line = UNSET + else: + processing_command_line = self.processing_command_line + + processing_programs: None | str | Unset + if isinstance(self.processing_programs, Unset): + processing_programs = UNSET + else: + processing_programs = self.processing_programs + + processing_status: int | None | Unset + if isinstance(self.processing_status, Unset): + processing_status = UNSET + else: + processing_status = self.processing_status + + processing_message: None | str | Unset + if isinstance(self.processing_message, Unset): + processing_message = UNSET + else: + processing_message = self.processing_message + + processing_start_time: None | str | Unset + if isinstance(self.processing_start_time, Unset): + processing_start_time = UNSET + elif isinstance(self.processing_start_time, datetime.datetime): + processing_start_time = self.processing_start_time.isoformat() + else: + processing_start_time = self.processing_start_time + + processing_end_time: None | str | Unset + if isinstance(self.processing_end_time, Unset): + processing_end_time = UNSET + elif isinstance(self.processing_end_time, datetime.datetime): + processing_end_time = self.processing_end_time.isoformat() + else: + processing_end_time = self.processing_end_time + + processing_environment: None | str | Unset + if isinstance(self.processing_environment, Unset): + processing_environment = UNSET + else: + processing_environment = self.processing_environment + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + job_uuid: None | str | Unset + if isinstance(self.job_uuid, Unset): + job_uuid = UNSET + elif isinstance(self.job_uuid, UUID): + job_uuid = str(self.job_uuid) + else: + job_uuid = self.job_uuid + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "autoProcProgramId": auto_proc_program_id, + "processingJobId": processing_job_id, + "status": status, + } + ) + if parent_auto_proc_program_id is not UNSET: + field_dict["parentAutoProcProgramId"] = parent_auto_proc_program_id + if processing_command_line is not UNSET: + field_dict["processingCommandLine"] = processing_command_line + if processing_programs is not UNSET: + field_dict["processingPrograms"] = processing_programs + if processing_status is not UNSET: + field_dict["processingStatus"] = processing_status + if processing_message is not UNSET: + field_dict["processingMessage"] = processing_message + if processing_start_time is not UNSET: + field_dict["processingStartTime"] = processing_start_time + if processing_end_time is not UNSET: + field_dict["processingEndTime"] = processing_end_time + if processing_environment is not UNSET: + field_dict["processingEnvironment"] = processing_environment + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if job_uuid is not UNSET: + field_dict["jobUuid"] = job_uuid + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + auto_proc_program_id = d.pop("autoProcProgramId") + + processing_job_id = d.pop("processingJobId") + + status = ProcessingStatus(d.pop("status")) + + def _parse_parent_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + parent_auto_proc_program_id = _parse_parent_auto_proc_program_id(d.pop("parentAutoProcProgramId", UNSET)) + + def _parse_processing_command_line(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_command_line = _parse_processing_command_line(d.pop("processingCommandLine", UNSET)) + + def _parse_processing_programs(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_programs = _parse_processing_programs(d.pop("processingPrograms", UNSET)) + + def _parse_processing_status(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + processing_status = _parse_processing_status(d.pop("processingStatus", UNSET)) + + def _parse_processing_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_message = _parse_processing_message(d.pop("processingMessage", UNSET)) + + def _parse_processing_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_start_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_start_time = _parse_processing_start_time(d.pop("processingStartTime", UNSET)) + + def _parse_processing_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_end_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_end_time = _parse_processing_end_time(d.pop("processingEndTime", UNSET)) + + def _parse_processing_environment(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_environment = _parse_processing_environment(d.pop("processingEnvironment", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_job_uuid(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + job_uuid_type_0 = UUID(data) + + return job_uuid_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + job_uuid = _parse_job_uuid(d.pop("jobUuid", UNSET)) + + auto_proc_program_out = cls( + auto_proc_program_id=auto_proc_program_id, + processing_job_id=processing_job_id, + status=status, + parent_auto_proc_program_id=parent_auto_proc_program_id, + processing_command_line=processing_command_line, + processing_programs=processing_programs, + processing_status=processing_status, + processing_message=processing_message, + processing_start_time=processing_start_time, + processing_end_time=processing_end_time, + processing_environment=processing_environment, + record_time_stamp=record_time_stamp, + job_uuid=job_uuid, + ) + + auto_proc_program_out.additional_properties = d + return auto_proc_program_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_scaling_out.py b/src/lims_utils/expeye_client/models/auto_proc_program_scaling_out.py new file mode 100644 index 0000000..7847623 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_scaling_out.py @@ -0,0 +1,328 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.auto_proc_program_scaling_out_scaling_statistics_type_type_0 import ( + AutoProcProgramScalingOutScalingStatisticsTypeType0, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcProgramScalingOut") + + +@_attrs_define +class AutoProcProgramScalingOut: + """ + Attributes: + cc_half (float | None | Unset): + cc_anomalous (float | None | Unset): + resolution_limit_low (float | None | Unset): + resolution_limit_high (float | None | Unset): + r_merge (float | None | Unset): + r_meas (float | None | Unset): + mean_i_over_sig_i (float | None | Unset): + anomalous_completeness (float | None | Unset): + completeness (float | None | Unset): + multiplicity (float | None | Unset): + res_i_over_sig_i2 (float | None | Unset): + recipe (None | str | Unset): + scaling_statistics_type (AutoProcProgramScalingOutScalingStatisticsTypeType0 | None | Unset): + """ + + cc_half: float | None | Unset = UNSET + cc_anomalous: float | None | Unset = UNSET + resolution_limit_low: float | None | Unset = UNSET + resolution_limit_high: float | None | Unset = UNSET + r_merge: float | None | Unset = UNSET + r_meas: float | None | Unset = UNSET + mean_i_over_sig_i: float | None | Unset = UNSET + anomalous_completeness: float | None | Unset = UNSET + completeness: float | None | Unset = UNSET + multiplicity: float | None | Unset = UNSET + res_i_over_sig_i2: float | None | Unset = UNSET + recipe: None | str | Unset = UNSET + scaling_statistics_type: AutoProcProgramScalingOutScalingStatisticsTypeType0 | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + cc_half: float | None | Unset + if isinstance(self.cc_half, Unset): + cc_half = UNSET + else: + cc_half = self.cc_half + + cc_anomalous: float | None | Unset + if isinstance(self.cc_anomalous, Unset): + cc_anomalous = UNSET + else: + cc_anomalous = self.cc_anomalous + + resolution_limit_low: float | None | Unset + if isinstance(self.resolution_limit_low, Unset): + resolution_limit_low = UNSET + else: + resolution_limit_low = self.resolution_limit_low + + resolution_limit_high: float | None | Unset + if isinstance(self.resolution_limit_high, Unset): + resolution_limit_high = UNSET + else: + resolution_limit_high = self.resolution_limit_high + + r_merge: float | None | Unset + if isinstance(self.r_merge, Unset): + r_merge = UNSET + else: + r_merge = self.r_merge + + r_meas: float | None | Unset + if isinstance(self.r_meas, Unset): + r_meas = UNSET + else: + r_meas = self.r_meas + + mean_i_over_sig_i: float | None | Unset + if isinstance(self.mean_i_over_sig_i, Unset): + mean_i_over_sig_i = UNSET + else: + mean_i_over_sig_i = self.mean_i_over_sig_i + + anomalous_completeness: float | None | Unset + if isinstance(self.anomalous_completeness, Unset): + anomalous_completeness = UNSET + else: + anomalous_completeness = self.anomalous_completeness + + completeness: float | None | Unset + if isinstance(self.completeness, Unset): + completeness = UNSET + else: + completeness = self.completeness + + multiplicity: float | None | Unset + if isinstance(self.multiplicity, Unset): + multiplicity = UNSET + else: + multiplicity = self.multiplicity + + res_i_over_sig_i2: float | None | Unset + if isinstance(self.res_i_over_sig_i2, Unset): + res_i_over_sig_i2 = UNSET + else: + res_i_over_sig_i2 = self.res_i_over_sig_i2 + + recipe: None | str | Unset + if isinstance(self.recipe, Unset): + recipe = UNSET + else: + recipe = self.recipe + + scaling_statistics_type: None | str | Unset + if isinstance(self.scaling_statistics_type, Unset): + scaling_statistics_type = UNSET + elif isinstance(self.scaling_statistics_type, AutoProcProgramScalingOutScalingStatisticsTypeType0): + scaling_statistics_type = self.scaling_statistics_type.value + else: + scaling_statistics_type = self.scaling_statistics_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cc_half is not UNSET: + field_dict["ccHalf"] = cc_half + if cc_anomalous is not UNSET: + field_dict["ccAnomalous"] = cc_anomalous + if resolution_limit_low is not UNSET: + field_dict["resolutionLimitLow"] = resolution_limit_low + if resolution_limit_high is not UNSET: + field_dict["resolutionLimitHigh"] = resolution_limit_high + if r_merge is not UNSET: + field_dict["rMerge"] = r_merge + if r_meas is not UNSET: + field_dict["rMeas"] = r_meas + if mean_i_over_sig_i is not UNSET: + field_dict["meanIOverSigI"] = mean_i_over_sig_i + if anomalous_completeness is not UNSET: + field_dict["anomalousCompleteness"] = anomalous_completeness + if completeness is not UNSET: + field_dict["completeness"] = completeness + if multiplicity is not UNSET: + field_dict["multiplicity"] = multiplicity + if res_i_over_sig_i2 is not UNSET: + field_dict["resIOverSigI2"] = res_i_over_sig_i2 + if recipe is not UNSET: + field_dict["recipe"] = recipe + if scaling_statistics_type is not UNSET: + field_dict["scalingStatisticsType"] = scaling_statistics_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_cc_half(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_half = _parse_cc_half(d.pop("ccHalf", UNSET)) + + def _parse_cc_anomalous(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_anomalous = _parse_cc_anomalous(d.pop("ccAnomalous", UNSET)) + + def _parse_resolution_limit_low(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution_limit_low = _parse_resolution_limit_low(d.pop("resolutionLimitLow", UNSET)) + + def _parse_resolution_limit_high(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution_limit_high = _parse_resolution_limit_high(d.pop("resolutionLimitHigh", UNSET)) + + def _parse_r_merge(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_merge = _parse_r_merge(d.pop("rMerge", UNSET)) + + def _parse_r_meas(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_meas = _parse_r_meas(d.pop("rMeas", UNSET)) + + def _parse_mean_i_over_sig_i(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mean_i_over_sig_i = _parse_mean_i_over_sig_i(d.pop("meanIOverSigI", UNSET)) + + def _parse_anomalous_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + anomalous_completeness = _parse_anomalous_completeness(d.pop("anomalousCompleteness", UNSET)) + + def _parse_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + completeness = _parse_completeness(d.pop("completeness", UNSET)) + + def _parse_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + multiplicity = _parse_multiplicity(d.pop("multiplicity", UNSET)) + + def _parse_res_i_over_sig_i2(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + res_i_over_sig_i2 = _parse_res_i_over_sig_i2(d.pop("resIOverSigI2", UNSET)) + + def _parse_recipe(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recipe = _parse_recipe(d.pop("recipe", UNSET)) + + def _parse_scaling_statistics_type( + data: object, + ) -> AutoProcProgramScalingOutScalingStatisticsTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + scaling_statistics_type_type_0 = AutoProcProgramScalingOutScalingStatisticsTypeType0(data) + + return scaling_statistics_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AutoProcProgramScalingOutScalingStatisticsTypeType0 | None | Unset, data) + + scaling_statistics_type = _parse_scaling_statistics_type(d.pop("scalingStatisticsType", UNSET)) + + auto_proc_program_scaling_out = cls( + cc_half=cc_half, + cc_anomalous=cc_anomalous, + resolution_limit_low=resolution_limit_low, + resolution_limit_high=resolution_limit_high, + r_merge=r_merge, + r_meas=r_meas, + mean_i_over_sig_i=mean_i_over_sig_i, + anomalous_completeness=anomalous_completeness, + completeness=completeness, + multiplicity=multiplicity, + res_i_over_sig_i2=res_i_over_sig_i2, + recipe=recipe, + scaling_statistics_type=scaling_statistics_type, + ) + + auto_proc_program_scaling_out.additional_properties = d + return auto_proc_program_scaling_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_scaling_out_scaling_statistics_type_type_0.py b/src/lims_utils/expeye_client/models/auto_proc_program_scaling_out_scaling_statistics_type_type_0.py new file mode 100644 index 0000000..3259c30 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_scaling_out_scaling_statistics_type_type_0.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class AutoProcProgramScalingOutScalingStatisticsTypeType0(StrEnum): + INNERSHELL = "innerShell" + OUTERSHELL = "outerShell" + OVERALL = "overall" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py b/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py new file mode 100644 index 0000000..937355b --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py @@ -0,0 +1,372 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.processing_status import ProcessingStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.auto_proc_integration_out import AutoProcIntegrationOut + from ..models.auto_proc_with_scaling_out import AutoProcWithScalingOut + + +T = TypeVar("T", bound="AutoProcProgramWithAutoProcOut") + + +@_attrs_define +class AutoProcProgramWithAutoProcOut: + """ + Attributes: + auto_proc_program_id (int): + processing_job_id (int): + status (ProcessingStatus): + parent_auto_proc_program_id (int | None | Unset): + processing_command_line (None | str | Unset): + processing_programs (None | str | Unset): + processing_status (int | None | Unset): + processing_message (None | str | Unset): + processing_start_time (datetime.datetime | None | Unset): + processing_end_time (datetime.datetime | None | Unset): + processing_environment (None | str | Unset): + record_time_stamp (datetime.datetime | None | Unset): + job_uuid (None | Unset | UUID): + auto_proc (list[AutoProcWithScalingOut] | Unset): + auto_proc_integration (list[AutoProcIntegrationOut] | Unset): + """ + + auto_proc_program_id: int + processing_job_id: int + status: ProcessingStatus + parent_auto_proc_program_id: int | None | Unset = UNSET + processing_command_line: None | str | Unset = UNSET + processing_programs: None | str | Unset = UNSET + processing_status: int | None | Unset = UNSET + processing_message: None | str | Unset = UNSET + processing_start_time: datetime.datetime | None | Unset = UNSET + processing_end_time: datetime.datetime | None | Unset = UNSET + processing_environment: None | str | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + job_uuid: None | Unset | UUID = UNSET + auto_proc: list[AutoProcWithScalingOut] | Unset = UNSET + auto_proc_integration: list[AutoProcIntegrationOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_id = self.auto_proc_program_id + + processing_job_id = self.processing_job_id + + status = self.status.value + + parent_auto_proc_program_id: int | None | Unset + if isinstance(self.parent_auto_proc_program_id, Unset): + parent_auto_proc_program_id = UNSET + else: + parent_auto_proc_program_id = self.parent_auto_proc_program_id + + processing_command_line: None | str | Unset + if isinstance(self.processing_command_line, Unset): + processing_command_line = UNSET + else: + processing_command_line = self.processing_command_line + + processing_programs: None | str | Unset + if isinstance(self.processing_programs, Unset): + processing_programs = UNSET + else: + processing_programs = self.processing_programs + + processing_status: int | None | Unset + if isinstance(self.processing_status, Unset): + processing_status = UNSET + else: + processing_status = self.processing_status + + processing_message: None | str | Unset + if isinstance(self.processing_message, Unset): + processing_message = UNSET + else: + processing_message = self.processing_message + + processing_start_time: None | str | Unset + if isinstance(self.processing_start_time, Unset): + processing_start_time = UNSET + elif isinstance(self.processing_start_time, datetime.datetime): + processing_start_time = self.processing_start_time.isoformat() + else: + processing_start_time = self.processing_start_time + + processing_end_time: None | str | Unset + if isinstance(self.processing_end_time, Unset): + processing_end_time = UNSET + elif isinstance(self.processing_end_time, datetime.datetime): + processing_end_time = self.processing_end_time.isoformat() + else: + processing_end_time = self.processing_end_time + + processing_environment: None | str | Unset + if isinstance(self.processing_environment, Unset): + processing_environment = UNSET + else: + processing_environment = self.processing_environment + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + job_uuid: None | str | Unset + if isinstance(self.job_uuid, Unset): + job_uuid = UNSET + elif isinstance(self.job_uuid, UUID): + job_uuid = str(self.job_uuid) + else: + job_uuid = self.job_uuid + + auto_proc: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.auto_proc, Unset): + auto_proc = [] + for auto_proc_item_data in self.auto_proc: + auto_proc_item = auto_proc_item_data.to_dict() + auto_proc.append(auto_proc_item) + + auto_proc_integration: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.auto_proc_integration, Unset): + auto_proc_integration = [] + for auto_proc_integration_item_data in self.auto_proc_integration: + auto_proc_integration_item = auto_proc_integration_item_data.to_dict() + auto_proc_integration.append(auto_proc_integration_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "autoProcProgramId": auto_proc_program_id, + "processingJobId": processing_job_id, + "status": status, + } + ) + if parent_auto_proc_program_id is not UNSET: + field_dict["parentAutoProcProgramId"] = parent_auto_proc_program_id + if processing_command_line is not UNSET: + field_dict["processingCommandLine"] = processing_command_line + if processing_programs is not UNSET: + field_dict["processingPrograms"] = processing_programs + if processing_status is not UNSET: + field_dict["processingStatus"] = processing_status + if processing_message is not UNSET: + field_dict["processingMessage"] = processing_message + if processing_start_time is not UNSET: + field_dict["processingStartTime"] = processing_start_time + if processing_end_time is not UNSET: + field_dict["processingEndTime"] = processing_end_time + if processing_environment is not UNSET: + field_dict["processingEnvironment"] = processing_environment + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if job_uuid is not UNSET: + field_dict["jobUuid"] = job_uuid + if auto_proc is not UNSET: + field_dict["autoProc"] = auto_proc + if auto_proc_integration is not UNSET: + field_dict["autoProcIntegration"] = auto_proc_integration + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.auto_proc_integration_out import AutoProcIntegrationOut # noqa: PLC0415 + from ..models.auto_proc_with_scaling_out import AutoProcWithScalingOut # noqa: PLC0415 + + d = dict(src_dict) + auto_proc_program_id = d.pop("autoProcProgramId") + + processing_job_id = d.pop("processingJobId") + + status = ProcessingStatus(d.pop("status")) + + def _parse_parent_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + parent_auto_proc_program_id = _parse_parent_auto_proc_program_id(d.pop("parentAutoProcProgramId", UNSET)) + + def _parse_processing_command_line(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_command_line = _parse_processing_command_line(d.pop("processingCommandLine", UNSET)) + + def _parse_processing_programs(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_programs = _parse_processing_programs(d.pop("processingPrograms", UNSET)) + + def _parse_processing_status(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + processing_status = _parse_processing_status(d.pop("processingStatus", UNSET)) + + def _parse_processing_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_message = _parse_processing_message(d.pop("processingMessage", UNSET)) + + def _parse_processing_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_start_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_start_time = _parse_processing_start_time(d.pop("processingStartTime", UNSET)) + + def _parse_processing_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + processing_end_time_type_0 = datetime.datetime.fromisoformat(data) + + return processing_end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + processing_end_time = _parse_processing_end_time(d.pop("processingEndTime", UNSET)) + + def _parse_processing_environment(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + processing_environment = _parse_processing_environment(d.pop("processingEnvironment", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_job_uuid(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + job_uuid_type_0 = UUID(data) + + return job_uuid_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + job_uuid = _parse_job_uuid(d.pop("jobUuid", UNSET)) + + _auto_proc = d.pop("autoProc", UNSET) + auto_proc: list[AutoProcWithScalingOut] | Unset = UNSET + if _auto_proc is not UNSET: + auto_proc = [] + for auto_proc_item_data in _auto_proc: + auto_proc_item = AutoProcWithScalingOut.from_dict(auto_proc_item_data) + + auto_proc.append(auto_proc_item) + + _auto_proc_integration = d.pop("autoProcIntegration", UNSET) + auto_proc_integration: list[AutoProcIntegrationOut] | Unset = UNSET + if _auto_proc_integration is not UNSET: + auto_proc_integration = [] + for auto_proc_integration_item_data in _auto_proc_integration: + auto_proc_integration_item = AutoProcIntegrationOut.from_dict(auto_proc_integration_item_data) + + auto_proc_integration.append(auto_proc_integration_item) + + auto_proc_program_with_auto_proc_out = cls( + auto_proc_program_id=auto_proc_program_id, + processing_job_id=processing_job_id, + status=status, + parent_auto_proc_program_id=parent_auto_proc_program_id, + processing_command_line=processing_command_line, + processing_programs=processing_programs, + processing_status=processing_status, + processing_message=processing_message, + processing_start_time=processing_start_time, + processing_end_time=processing_end_time, + processing_environment=processing_environment, + record_time_stamp=record_time_stamp, + job_uuid=job_uuid, + auto_proc=auto_proc, + auto_proc_integration=auto_proc_integration, + ) + + auto_proc_program_with_auto_proc_out.additional_properties = d + return auto_proc_program_with_auto_proc_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out.py b/src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out.py new file mode 100644 index 0000000..0241d23 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out.py @@ -0,0 +1,454 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.auto_proc_scaling_statistics_out_scalingstatisticstype import ( + AutoProcScalingStatisticsOutScalingstatisticstype, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AutoProcScalingStatisticsOut") + + +@_attrs_define +class AutoProcScalingStatisticsOut: + """ + Attributes: + auto_proc_scaling_statistics_id (int): + scaling_statistics_type (AutoProcScalingStatisticsOutScalingstatisticstype): + r_merge (float | None | Unset): + comments (None | str | Unset): + fractional_partial_bias (float | None | Unset): + resolution_limit_high (float | None | Unset): + resolution_limit_low (float | None | Unset): + r_meas_within_i_plus_i_minus (float | None | Unset): + r_meas_all_i_plus_i_minus (float | None | Unset): + r_pim_within_i_plus_i_minus (float | None | Unset): + r_pim_all_i_plus_i_minus (float | None | Unset): + cc_half (float | None | Unset): + cc_anomalous (float | None | Unset): + mean_i_over_sig_i (float | None | Unset): + n_total_observations (int | None | Unset): + res_i_over_sig_i2 (float | None | Unset): + n_total_unique_observations (int | None | Unset): + multiplicity (float | None | Unset): + completeness (float | None | Unset): + anomalous_completeness (float | None | Unset): + anomalous_multiplicity (float | None | Unset): + """ + + auto_proc_scaling_statistics_id: int + scaling_statistics_type: AutoProcScalingStatisticsOutScalingstatisticstype + r_merge: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + fractional_partial_bias: float | None | Unset = UNSET + resolution_limit_high: float | None | Unset = UNSET + resolution_limit_low: float | None | Unset = UNSET + r_meas_within_i_plus_i_minus: float | None | Unset = UNSET + r_meas_all_i_plus_i_minus: float | None | Unset = UNSET + r_pim_within_i_plus_i_minus: float | None | Unset = UNSET + r_pim_all_i_plus_i_minus: float | None | Unset = UNSET + cc_half: float | None | Unset = UNSET + cc_anomalous: float | None | Unset = UNSET + mean_i_over_sig_i: float | None | Unset = UNSET + n_total_observations: int | None | Unset = UNSET + res_i_over_sig_i2: float | None | Unset = UNSET + n_total_unique_observations: int | None | Unset = UNSET + multiplicity: float | None | Unset = UNSET + completeness: float | None | Unset = UNSET + anomalous_completeness: float | None | Unset = UNSET + anomalous_multiplicity: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + auto_proc_scaling_statistics_id = self.auto_proc_scaling_statistics_id + + scaling_statistics_type = self.scaling_statistics_type.value + + r_merge: float | None | Unset + if isinstance(self.r_merge, Unset): + r_merge = UNSET + else: + r_merge = self.r_merge + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + fractional_partial_bias: float | None | Unset + if isinstance(self.fractional_partial_bias, Unset): + fractional_partial_bias = UNSET + else: + fractional_partial_bias = self.fractional_partial_bias + + resolution_limit_high: float | None | Unset + if isinstance(self.resolution_limit_high, Unset): + resolution_limit_high = UNSET + else: + resolution_limit_high = self.resolution_limit_high + + resolution_limit_low: float | None | Unset + if isinstance(self.resolution_limit_low, Unset): + resolution_limit_low = UNSET + else: + resolution_limit_low = self.resolution_limit_low + + r_meas_within_i_plus_i_minus: float | None | Unset + if isinstance(self.r_meas_within_i_plus_i_minus, Unset): + r_meas_within_i_plus_i_minus = UNSET + else: + r_meas_within_i_plus_i_minus = self.r_meas_within_i_plus_i_minus + + r_meas_all_i_plus_i_minus: float | None | Unset + if isinstance(self.r_meas_all_i_plus_i_minus, Unset): + r_meas_all_i_plus_i_minus = UNSET + else: + r_meas_all_i_plus_i_minus = self.r_meas_all_i_plus_i_minus + + r_pim_within_i_plus_i_minus: float | None | Unset + if isinstance(self.r_pim_within_i_plus_i_minus, Unset): + r_pim_within_i_plus_i_minus = UNSET + else: + r_pim_within_i_plus_i_minus = self.r_pim_within_i_plus_i_minus + + r_pim_all_i_plus_i_minus: float | None | Unset + if isinstance(self.r_pim_all_i_plus_i_minus, Unset): + r_pim_all_i_plus_i_minus = UNSET + else: + r_pim_all_i_plus_i_minus = self.r_pim_all_i_plus_i_minus + + cc_half: float | None | Unset + if isinstance(self.cc_half, Unset): + cc_half = UNSET + else: + cc_half = self.cc_half + + cc_anomalous: float | None | Unset + if isinstance(self.cc_anomalous, Unset): + cc_anomalous = UNSET + else: + cc_anomalous = self.cc_anomalous + + mean_i_over_sig_i: float | None | Unset + if isinstance(self.mean_i_over_sig_i, Unset): + mean_i_over_sig_i = UNSET + else: + mean_i_over_sig_i = self.mean_i_over_sig_i + + n_total_observations: int | None | Unset + if isinstance(self.n_total_observations, Unset): + n_total_observations = UNSET + else: + n_total_observations = self.n_total_observations + + res_i_over_sig_i2: float | None | Unset + if isinstance(self.res_i_over_sig_i2, Unset): + res_i_over_sig_i2 = UNSET + else: + res_i_over_sig_i2 = self.res_i_over_sig_i2 + + n_total_unique_observations: int | None | Unset + if isinstance(self.n_total_unique_observations, Unset): + n_total_unique_observations = UNSET + else: + n_total_unique_observations = self.n_total_unique_observations + + multiplicity: float | None | Unset + if isinstance(self.multiplicity, Unset): + multiplicity = UNSET + else: + multiplicity = self.multiplicity + + completeness: float | None | Unset + if isinstance(self.completeness, Unset): + completeness = UNSET + else: + completeness = self.completeness + + anomalous_completeness: float | None | Unset + if isinstance(self.anomalous_completeness, Unset): + anomalous_completeness = UNSET + else: + anomalous_completeness = self.anomalous_completeness + + anomalous_multiplicity: float | None | Unset + if isinstance(self.anomalous_multiplicity, Unset): + anomalous_multiplicity = UNSET + else: + anomalous_multiplicity = self.anomalous_multiplicity + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "autoProcScalingStatisticsId": auto_proc_scaling_statistics_id, + "scalingStatisticsType": scaling_statistics_type, + } + ) + if r_merge is not UNSET: + field_dict["rMerge"] = r_merge + if comments is not UNSET: + field_dict["comments"] = comments + if fractional_partial_bias is not UNSET: + field_dict["fractionalPartialBias"] = fractional_partial_bias + if resolution_limit_high is not UNSET: + field_dict["resolutionLimitHigh"] = resolution_limit_high + if resolution_limit_low is not UNSET: + field_dict["resolutionLimitLow"] = resolution_limit_low + if r_meas_within_i_plus_i_minus is not UNSET: + field_dict["rMeasWithinIPlusIMinus"] = r_meas_within_i_plus_i_minus + if r_meas_all_i_plus_i_minus is not UNSET: + field_dict["rMeasAllIPlusIMinus"] = r_meas_all_i_plus_i_minus + if r_pim_within_i_plus_i_minus is not UNSET: + field_dict["rPimWithinIPlusIMinus"] = r_pim_within_i_plus_i_minus + if r_pim_all_i_plus_i_minus is not UNSET: + field_dict["rPimAllIPlusIMinus"] = r_pim_all_i_plus_i_minus + if cc_half is not UNSET: + field_dict["ccHalf"] = cc_half + if cc_anomalous is not UNSET: + field_dict["ccAnomalous"] = cc_anomalous + if mean_i_over_sig_i is not UNSET: + field_dict["meanIOverSigI"] = mean_i_over_sig_i + if n_total_observations is not UNSET: + field_dict["nTotalObservations"] = n_total_observations + if res_i_over_sig_i2 is not UNSET: + field_dict["resIOverSigI2"] = res_i_over_sig_i2 + if n_total_unique_observations is not UNSET: + field_dict["nTotalUniqueObservations"] = n_total_unique_observations + if multiplicity is not UNSET: + field_dict["multiplicity"] = multiplicity + if completeness is not UNSET: + field_dict["completeness"] = completeness + if anomalous_completeness is not UNSET: + field_dict["anomalousCompleteness"] = anomalous_completeness + if anomalous_multiplicity is not UNSET: + field_dict["anomalousMultiplicity"] = anomalous_multiplicity + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + auto_proc_scaling_statistics_id = d.pop("autoProcScalingStatisticsId") + + scaling_statistics_type = AutoProcScalingStatisticsOutScalingstatisticstype(d.pop("scalingStatisticsType")) + + def _parse_r_merge(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_merge = _parse_r_merge(d.pop("rMerge", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_fractional_partial_bias(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + fractional_partial_bias = _parse_fractional_partial_bias(d.pop("fractionalPartialBias", UNSET)) + + def _parse_resolution_limit_high(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution_limit_high = _parse_resolution_limit_high(d.pop("resolutionLimitHigh", UNSET)) + + def _parse_resolution_limit_low(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution_limit_low = _parse_resolution_limit_low(d.pop("resolutionLimitLow", UNSET)) + + def _parse_r_meas_within_i_plus_i_minus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_meas_within_i_plus_i_minus = _parse_r_meas_within_i_plus_i_minus(d.pop("rMeasWithinIPlusIMinus", UNSET)) + + def _parse_r_meas_all_i_plus_i_minus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_meas_all_i_plus_i_minus = _parse_r_meas_all_i_plus_i_minus(d.pop("rMeasAllIPlusIMinus", UNSET)) + + def _parse_r_pim_within_i_plus_i_minus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_pim_within_i_plus_i_minus = _parse_r_pim_within_i_plus_i_minus(d.pop("rPimWithinIPlusIMinus", UNSET)) + + def _parse_r_pim_all_i_plus_i_minus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + r_pim_all_i_plus_i_minus = _parse_r_pim_all_i_plus_i_minus(d.pop("rPimAllIPlusIMinus", UNSET)) + + def _parse_cc_half(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_half = _parse_cc_half(d.pop("ccHalf", UNSET)) + + def _parse_cc_anomalous(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_anomalous = _parse_cc_anomalous(d.pop("ccAnomalous", UNSET)) + + def _parse_mean_i_over_sig_i(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mean_i_over_sig_i = _parse_mean_i_over_sig_i(d.pop("meanIOverSigI", UNSET)) + + def _parse_n_total_observations(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + n_total_observations = _parse_n_total_observations(d.pop("nTotalObservations", UNSET)) + + def _parse_res_i_over_sig_i2(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + res_i_over_sig_i2 = _parse_res_i_over_sig_i2(d.pop("resIOverSigI2", UNSET)) + + def _parse_n_total_unique_observations(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + n_total_unique_observations = _parse_n_total_unique_observations(d.pop("nTotalUniqueObservations", UNSET)) + + def _parse_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + multiplicity = _parse_multiplicity(d.pop("multiplicity", UNSET)) + + def _parse_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + completeness = _parse_completeness(d.pop("completeness", UNSET)) + + def _parse_anomalous_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + anomalous_completeness = _parse_anomalous_completeness(d.pop("anomalousCompleteness", UNSET)) + + def _parse_anomalous_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + anomalous_multiplicity = _parse_anomalous_multiplicity(d.pop("anomalousMultiplicity", UNSET)) + + auto_proc_scaling_statistics_out = cls( + auto_proc_scaling_statistics_id=auto_proc_scaling_statistics_id, + scaling_statistics_type=scaling_statistics_type, + r_merge=r_merge, + comments=comments, + fractional_partial_bias=fractional_partial_bias, + resolution_limit_high=resolution_limit_high, + resolution_limit_low=resolution_limit_low, + r_meas_within_i_plus_i_minus=r_meas_within_i_plus_i_minus, + r_meas_all_i_plus_i_minus=r_meas_all_i_plus_i_minus, + r_pim_within_i_plus_i_minus=r_pim_within_i_plus_i_minus, + r_pim_all_i_plus_i_minus=r_pim_all_i_plus_i_minus, + cc_half=cc_half, + cc_anomalous=cc_anomalous, + mean_i_over_sig_i=mean_i_over_sig_i, + n_total_observations=n_total_observations, + res_i_over_sig_i2=res_i_over_sig_i2, + n_total_unique_observations=n_total_unique_observations, + multiplicity=multiplicity, + completeness=completeness, + anomalous_completeness=anomalous_completeness, + anomalous_multiplicity=anomalous_multiplicity, + ) + + auto_proc_scaling_statistics_out.additional_properties = d + return auto_proc_scaling_statistics_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out_scalingstatisticstype.py b/src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out_scalingstatisticstype.py new file mode 100644 index 0000000..c8f7352 --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_scaling_statistics_out_scalingstatisticstype.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class AutoProcScalingStatisticsOutScalingstatisticstype(StrEnum): + INNERSHELL = "innerShell" + OUTERSHELL = "outerShell" + OVERALL = "overall" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py b/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py new file mode 100644 index 0000000..be4a01d --- /dev/null +++ b/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py @@ -0,0 +1,301 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut + + +T = TypeVar("T", bound="AutoProcWithScalingOut") + + +@_attrs_define +class AutoProcWithScalingOut: + """ + Attributes: + auto_proc_id (int): + outer_shell_statistics (AutoProcScalingStatisticsOut | None | Unset): + inner_shell_statistics (AutoProcScalingStatisticsOut | None | Unset): + overall_statistics (AutoProcScalingStatisticsOut | None | Unset): + space_group (None | str | Unset): + cell_a (float | None | Unset): + cell_b (float | None | Unset): + cell_c (float | None | Unset): + cell_alpha (float | None | Unset): + cell_beta (float | None | Unset): + cell_gamma (float | None | Unset): + """ + + auto_proc_id: int + outer_shell_statistics: AutoProcScalingStatisticsOut | None | Unset = UNSET + inner_shell_statistics: AutoProcScalingStatisticsOut | None | Unset = UNSET + overall_statistics: AutoProcScalingStatisticsOut | None | Unset = UNSET + space_group: None | str | Unset = UNSET + cell_a: float | None | Unset = UNSET + cell_b: float | None | Unset = UNSET + cell_c: float | None | Unset = UNSET + cell_alpha: float | None | Unset = UNSET + cell_beta: float | None | Unset = UNSET + cell_gamma: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut # noqa: PLC0415 + + auto_proc_id = self.auto_proc_id + + outer_shell_statistics: dict[str, Any] | None | Unset + if isinstance(self.outer_shell_statistics, Unset): + outer_shell_statistics = UNSET + elif isinstance(self.outer_shell_statistics, AutoProcScalingStatisticsOut): + outer_shell_statistics = self.outer_shell_statistics.to_dict() + else: + outer_shell_statistics = self.outer_shell_statistics + + inner_shell_statistics: dict[str, Any] | None | Unset + if isinstance(self.inner_shell_statistics, Unset): + inner_shell_statistics = UNSET + elif isinstance(self.inner_shell_statistics, AutoProcScalingStatisticsOut): + inner_shell_statistics = self.inner_shell_statistics.to_dict() + else: + inner_shell_statistics = self.inner_shell_statistics + + overall_statistics: dict[str, Any] | None | Unset + if isinstance(self.overall_statistics, Unset): + overall_statistics = UNSET + elif isinstance(self.overall_statistics, AutoProcScalingStatisticsOut): + overall_statistics = self.overall_statistics.to_dict() + else: + overall_statistics = self.overall_statistics + + space_group: None | str | Unset + if isinstance(self.space_group, Unset): + space_group = UNSET + else: + space_group = self.space_group + + cell_a: float | None | Unset + if isinstance(self.cell_a, Unset): + cell_a = UNSET + else: + cell_a = self.cell_a + + cell_b: float | None | Unset + if isinstance(self.cell_b, Unset): + cell_b = UNSET + else: + cell_b = self.cell_b + + cell_c: float | None | Unset + if isinstance(self.cell_c, Unset): + cell_c = UNSET + else: + cell_c = self.cell_c + + cell_alpha: float | None | Unset + if isinstance(self.cell_alpha, Unset): + cell_alpha = UNSET + else: + cell_alpha = self.cell_alpha + + cell_beta: float | None | Unset + if isinstance(self.cell_beta, Unset): + cell_beta = UNSET + else: + cell_beta = self.cell_beta + + cell_gamma: float | None | Unset + if isinstance(self.cell_gamma, Unset): + cell_gamma = UNSET + else: + cell_gamma = self.cell_gamma + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "autoProcId": auto_proc_id, + } + ) + if outer_shell_statistics is not UNSET: + field_dict["outerShellStatistics"] = outer_shell_statistics + if inner_shell_statistics is not UNSET: + field_dict["innerShellStatistics"] = inner_shell_statistics + if overall_statistics is not UNSET: + field_dict["overallStatistics"] = overall_statistics + if space_group is not UNSET: + field_dict["spaceGroup"] = space_group + if cell_a is not UNSET: + field_dict["cellA"] = cell_a + if cell_b is not UNSET: + field_dict["cellB"] = cell_b + if cell_c is not UNSET: + field_dict["cellC"] = cell_c + if cell_alpha is not UNSET: + field_dict["cellAlpha"] = cell_alpha + if cell_beta is not UNSET: + field_dict["cellBeta"] = cell_beta + if cell_gamma is not UNSET: + field_dict["cellGamma"] = cell_gamma + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut # noqa: PLC0415 + + d = dict(src_dict) + auto_proc_id = d.pop("autoProcId") + + def _parse_outer_shell_statistics(data: object) -> AutoProcScalingStatisticsOut | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + outer_shell_statistics_type_0 = AutoProcScalingStatisticsOut.from_dict(data) + + return outer_shell_statistics_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AutoProcScalingStatisticsOut | None | Unset, data) + + outer_shell_statistics = _parse_outer_shell_statistics(d.pop("outerShellStatistics", UNSET)) + + def _parse_inner_shell_statistics(data: object) -> AutoProcScalingStatisticsOut | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + inner_shell_statistics_type_0 = AutoProcScalingStatisticsOut.from_dict(data) + + return inner_shell_statistics_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AutoProcScalingStatisticsOut | None | Unset, data) + + inner_shell_statistics = _parse_inner_shell_statistics(d.pop("innerShellStatistics", UNSET)) + + def _parse_overall_statistics(data: object) -> AutoProcScalingStatisticsOut | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + overall_statistics_type_0 = AutoProcScalingStatisticsOut.from_dict(data) + + return overall_statistics_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AutoProcScalingStatisticsOut | None | Unset, data) + + overall_statistics = _parse_overall_statistics(d.pop("overallStatistics", UNSET)) + + def _parse_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + space_group = _parse_space_group(d.pop("spaceGroup", UNSET)) + + def _parse_cell_a(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_a = _parse_cell_a(d.pop("cellA", UNSET)) + + def _parse_cell_b(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_b = _parse_cell_b(d.pop("cellB", UNSET)) + + def _parse_cell_c(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_c = _parse_cell_c(d.pop("cellC", UNSET)) + + def _parse_cell_alpha(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_alpha = _parse_cell_alpha(d.pop("cellAlpha", UNSET)) + + def _parse_cell_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_beta = _parse_cell_beta(d.pop("cellBeta", UNSET)) + + def _parse_cell_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_gamma = _parse_cell_gamma(d.pop("cellGamma", UNSET)) + + auto_proc_with_scaling_out = cls( + auto_proc_id=auto_proc_id, + outer_shell_statistics=outer_shell_statistics, + inner_shell_statistics=inner_shell_statistics, + overall_statistics=overall_statistics, + space_group=space_group, + cell_a=cell_a, + cell_b=cell_b, + cell_c=cell_c, + cell_alpha=cell_alpha, + cell_beta=cell_beta, + cell_gamma=cell_gamma, + ) + + auto_proc_with_scaling_out.additional_properties = d + return auto_proc_with_scaling_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/body_create_full_shipment_from_file_shipments_upload_post.py b/src/lims_utils/expeye_client/models/body_create_full_shipment_from_file_shipments_upload_post.py new file mode 100644 index 0000000..b581a5d --- /dev/null +++ b/src/lims_utils/expeye_client/models/body_create_full_shipment_from_file_shipments_upload_post.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from .. import types +from ..types import UNSET, Unset + +T = TypeVar("T", bound="BodyCreateFullShipmentFromFileShipmentsUploadPost") + + +@_attrs_define +class BodyCreateFullShipmentFromFileShipmentsUploadPost: + """ + Attributes: + file (None | str | Unset): + """ + + file: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file: None | str | Unset + if isinstance(self.file, Unset): + file = UNSET + else: + file = self.file + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file is not UNSET: + field_dict["file"] = file + + return field_dict + + def to_multipart(self) -> types.RequestFiles: + files: types.RequestFiles = [] + + if not isinstance(self.file, Unset): + if isinstance(self.file, str): + files.append(("file", (None, str(self.file).encode(), "text/plain"))) + else: + files.append(("file", (None, str(self.file).encode(), "text/plain"))) + + for prop_name, prop in self.additional_properties.items(): + files.append((prop_name, (None, str(prop).encode(), "text/plain"))) + + return files + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_file(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file = _parse_file(d.pop("file", UNSET)) + + body_create_full_shipment_from_file_shipments_upload_post = cls( + file=file, + ) + + body_create_full_shipment_from_file_shipments_upload_post.additional_properties = d + return body_create_full_shipment_from_file_shipments_upload_post + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/centring_method.py b/src/lims_utils/expeye_client/models/centring_method.py new file mode 100644 index 0000000..0fd252e --- /dev/null +++ b/src/lims_utils/expeye_client/models/centring_method.py @@ -0,0 +1,11 @@ +from enum import StrEnum + + +class CentringMethod(StrEnum): + DIFFRACTION = "diffraction" + LOOP = "loop" + OPTICAL = "optical" + XRAY = "xray" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/collection_mode.py b/src/lims_utils/expeye_client/models/collection_mode.py new file mode 100644 index 0000000..b7a9a12 --- /dev/null +++ b/src/lims_utils/expeye_client/models/collection_mode.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class CollectionMode(StrEnum): + AUTO = "auto" + MANUAL = "manual" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/container_history_in.py b/src/lims_utils/expeye_client/models/container_history_in.py new file mode 100644 index 0000000..9ec124c --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_history_in.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerHistoryIn") + + +@_attrs_define +class ContainerHistoryIn: + """ + Attributes: + container_id (int | None | Unset): + location (None | str | Unset): + status (None | str | Unset): + beamline_name (None | str | Unset): + current_dewar_id (int | None | Unset): + """ + + container_id: int | None | Unset = UNSET + location: None | str | Unset = UNSET + status: None | str | Unset = UNSET + beamline_name: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_id: int | None | Unset + if isinstance(self.container_id, Unset): + container_id = UNSET + else: + container_id = self.container_id + + location: None | str | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + else: + status = self.status + + beamline_name: None | str | Unset + if isinstance(self.beamline_name, Unset): + beamline_name = UNSET + else: + beamline_name = self.beamline_name + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if container_id is not UNSET: + field_dict["containerId"] = container_id + if location is not UNSET: + field_dict["location"] = location + if status is not UNSET: + field_dict["status"] = status + if beamline_name is not UNSET: + field_dict["beamlineName"] = beamline_name + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_id = _parse_container_id(d.pop("containerId", UNSET)) + + def _parse_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_beamline_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_name = _parse_beamline_name(d.pop("beamlineName", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + container_history_in = cls( + container_id=container_id, + location=location, + status=status, + beamline_name=beamline_name, + current_dewar_id=current_dewar_id, + ) + + container_history_in.additional_properties = d + return container_history_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_history_out.py b/src/lims_utils/expeye_client/models/container_history_out.py new file mode 100644 index 0000000..4f0faca --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_history_out.py @@ -0,0 +1,172 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerHistoryOut") + + +@_attrs_define +class ContainerHistoryOut: + """ + Attributes: + container_history_id (int): + bl_time_stamp (datetime.datetime): + container_id (int | None | Unset): + location (None | str | Unset): + status (None | str | Unset): + beamline_name (None | str | Unset): + current_dewar_id (int | None | Unset): + """ + + container_history_id: int + bl_time_stamp: datetime.datetime + container_id: int | None | Unset = UNSET + location: None | str | Unset = UNSET + status: None | str | Unset = UNSET + beamline_name: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_history_id = self.container_history_id + + bl_time_stamp = self.bl_time_stamp.isoformat() + + container_id: int | None | Unset + if isinstance(self.container_id, Unset): + container_id = UNSET + else: + container_id = self.container_id + + location: None | str | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + else: + status = self.status + + beamline_name: None | str | Unset + if isinstance(self.beamline_name, Unset): + beamline_name = UNSET + else: + beamline_name = self.beamline_name + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "containerHistoryId": container_history_id, + "blTimeStamp": bl_time_stamp, + } + ) + if container_id is not UNSET: + field_dict["containerId"] = container_id + if location is not UNSET: + field_dict["location"] = location + if status is not UNSET: + field_dict["status"] = status + if beamline_name is not UNSET: + field_dict["beamlineName"] = beamline_name + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + container_history_id = d.pop("containerHistoryId") + + bl_time_stamp = datetime.datetime.fromisoformat(d.pop("blTimeStamp")) + + def _parse_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_id = _parse_container_id(d.pop("containerId", UNSET)) + + def _parse_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_beamline_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_name = _parse_beamline_name(d.pop("beamlineName", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + container_history_out = cls( + container_history_id=container_history_id, + bl_time_stamp=bl_time_stamp, + container_id=container_id, + location=location, + status=status, + beamline_name=beamline_name, + current_dewar_id=current_dewar_id, + ) + + container_history_out.additional_properties = d + return container_history_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_in.py b/src/lims_utils/expeye_client/models/container_in.py new file mode 100644 index 0000000..7d038af --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_in.py @@ -0,0 +1,353 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerIn") + + +@_attrs_define +class ContainerIn: + """ + Attributes: + code (None | str | Unset): + container_type (None | str | Unset): + capacity (int | None | Unset): + container_status (None | str | Unset): + beamline_location (None | str | Unset): + barcode (None | str | Unset): + current_dewar_id (int | None | Unset): + storage_temperature (int | None | Unset): + sample_changer_location (None | str | Unset): + experiment_type_id (int | None | Unset): + comments (None | str | Unset): + container_registry_id (int | None | Unset): + source (None | str | Unset): + session_id (int | None | Unset): + imager_id (int | None | Unset): + """ + + code: None | str | Unset = UNSET + container_type: None | str | Unset = UNSET + capacity: int | None | Unset = UNSET + container_status: None | str | Unset = UNSET + beamline_location: None | str | Unset = UNSET + barcode: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + storage_temperature: int | None | Unset = UNSET + sample_changer_location: None | str | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + container_registry_id: int | None | Unset = UNSET + source: None | str | Unset = UNSET + session_id: int | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + container_type: None | str | Unset + if isinstance(self.container_type, Unset): + container_type = UNSET + else: + container_type = self.container_type + + capacity: int | None | Unset + if isinstance(self.capacity, Unset): + capacity = UNSET + else: + capacity = self.capacity + + container_status: None | str | Unset + if isinstance(self.container_status, Unset): + container_status = UNSET + else: + container_status = self.container_status + + beamline_location: None | str | Unset + if isinstance(self.beamline_location, Unset): + beamline_location = UNSET + else: + beamline_location = self.beamline_location + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + storage_temperature: int | None | Unset + if isinstance(self.storage_temperature, Unset): + storage_temperature = UNSET + else: + storage_temperature = self.storage_temperature + + sample_changer_location: None | str | Unset + if isinstance(self.sample_changer_location, Unset): + sample_changer_location = UNSET + else: + sample_changer_location = self.sample_changer_location + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + container_registry_id: int | None | Unset + if isinstance(self.container_registry_id, Unset): + container_registry_id = UNSET + else: + container_registry_id = self.container_registry_id + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if container_type is not UNSET: + field_dict["containerType"] = container_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if container_status is not UNSET: + field_dict["containerStatus"] = container_status + if beamline_location is not UNSET: + field_dict["beamlineLocation"] = beamline_location + if barcode is not UNSET: + field_dict["barcode"] = barcode + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + if storage_temperature is not UNSET: + field_dict["storageTemperature"] = storage_temperature + if sample_changer_location is not UNSET: + field_dict["sampleChangerLocation"] = sample_changer_location + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if comments is not UNSET: + field_dict["comments"] = comments + if container_registry_id is not UNSET: + field_dict["containerRegistryId"] = container_registry_id + if source is not UNSET: + field_dict["source"] = source + if session_id is not UNSET: + field_dict["sessionId"] = session_id + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_container_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_type = _parse_container_type(d.pop("containerType", UNSET)) + + def _parse_capacity(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + capacity = _parse_capacity(d.pop("capacity", UNSET)) + + def _parse_container_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_status = _parse_container_status(d.pop("containerStatus", UNSET)) + + def _parse_beamline_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_location = _parse_beamline_location(d.pop("beamlineLocation", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + def _parse_storage_temperature(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + storage_temperature = _parse_storage_temperature(d.pop("storageTemperature", UNSET)) + + def _parse_sample_changer_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_changer_location = _parse_sample_changer_location(d.pop("sampleChangerLocation", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_container_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_registry_id = _parse_container_registry_id(d.pop("containerRegistryId", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + container_in = cls( + code=code, + container_type=container_type, + capacity=capacity, + container_status=container_status, + beamline_location=beamline_location, + barcode=barcode, + current_dewar_id=current_dewar_id, + storage_temperature=storage_temperature, + sample_changer_location=sample_changer_location, + experiment_type_id=experiment_type_id, + comments=comments, + container_registry_id=container_registry_id, + source=source, + session_id=session_id, + imager_id=imager_id, + ) + + container_in.additional_properties = d + return container_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_inspection_in.py b/src/lims_utils/expeye_client/models/container_inspection_in.py new file mode 100644 index 0000000..146bc4e --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_inspection_in.py @@ -0,0 +1,274 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerInspectionIn") + + +@_attrs_define +class ContainerInspectionIn: + """ + Attributes: + inspection_type_id (int): + temperature (float | None | Unset): + state (None | str | Unset): + priority (int | None | Unset): + manual (bool | None | Unset): + scheduled_time_stamp (datetime.datetime | None | Unset): + completed_time_stamp (datetime.datetime | None | Unset): + schedule_component_id (int | None | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + imager_id (int | None | Unset): + """ + + inspection_type_id: int + temperature: float | None | Unset = UNSET + state: None | str | Unset = UNSET + priority: int | None | Unset = UNSET + manual: bool | None | Unset = UNSET + scheduled_time_stamp: datetime.datetime | None | Unset = UNSET + completed_time_stamp: datetime.datetime | None | Unset = UNSET + schedule_component_id: int | None | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + inspection_type_id = self.inspection_type_id + + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + state: None | str | Unset + if isinstance(self.state, Unset): + state = UNSET + else: + state = self.state + + priority: int | None | Unset + if isinstance(self.priority, Unset): + priority = UNSET + else: + priority = self.priority + + manual: bool | None | Unset + if isinstance(self.manual, Unset): + manual = UNSET + else: + manual = self.manual + + scheduled_time_stamp: None | str | Unset + if isinstance(self.scheduled_time_stamp, Unset): + scheduled_time_stamp = UNSET + elif isinstance(self.scheduled_time_stamp, datetime.datetime): + scheduled_time_stamp = self.scheduled_time_stamp.isoformat() + else: + scheduled_time_stamp = self.scheduled_time_stamp + + completed_time_stamp: None | str | Unset + if isinstance(self.completed_time_stamp, Unset): + completed_time_stamp = UNSET + elif isinstance(self.completed_time_stamp, datetime.datetime): + completed_time_stamp = self.completed_time_stamp.isoformat() + else: + completed_time_stamp = self.completed_time_stamp + + schedule_component_id: int | None | Unset + if isinstance(self.schedule_component_id, Unset): + schedule_component_id = UNSET + else: + schedule_component_id = self.schedule_component_id + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "inspectionTypeId": inspection_type_id, + } + ) + if temperature is not UNSET: + field_dict["temperature"] = temperature + if state is not UNSET: + field_dict["state"] = state + if priority is not UNSET: + field_dict["priority"] = priority + if manual is not UNSET: + field_dict["manual"] = manual + if scheduled_time_stamp is not UNSET: + field_dict["scheduledTimeStamp"] = scheduled_time_stamp + if completed_time_stamp is not UNSET: + field_dict["completedTimeStamp"] = completed_time_stamp + if schedule_component_id is not UNSET: + field_dict["scheduleComponentId"] = schedule_component_id + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + inspection_type_id = d.pop("inspectionTypeId") + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_state(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + state = _parse_state(d.pop("state", UNSET)) + + def _parse_priority(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + priority = _parse_priority(d.pop("priority", UNSET)) + + def _parse_manual(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + manual = _parse_manual(d.pop("manual", UNSET)) + + def _parse_scheduled_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + scheduled_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return scheduled_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + scheduled_time_stamp = _parse_scheduled_time_stamp(d.pop("scheduledTimeStamp", UNSET)) + + def _parse_completed_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return completed_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_time_stamp = _parse_completed_time_stamp(d.pop("completedTimeStamp", UNSET)) + + def _parse_schedule_component_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + schedule_component_id = _parse_schedule_component_id(d.pop("scheduleComponentId", UNSET)) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + container_inspection_in = cls( + inspection_type_id=inspection_type_id, + temperature=temperature, + state=state, + priority=priority, + manual=manual, + scheduled_time_stamp=scheduled_time_stamp, + completed_time_stamp=completed_time_stamp, + schedule_component_id=schedule_component_id, + bl_time_stamp=bl_time_stamp, + imager_id=imager_id, + ) + + container_inspection_in.additional_properties = d + return container_inspection_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_inspection_optional.py b/src/lims_utils/expeye_client/models/container_inspection_optional.py new file mode 100644 index 0000000..249dc6a --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_inspection_optional.py @@ -0,0 +1,273 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerInspectionOptional") + + +@_attrs_define +class ContainerInspectionOptional: + """ + Attributes: + temperature (float | None | Unset): + state (None | str | Unset): + priority (int | None | Unset): + manual (bool | None | Unset): + scheduled_time_stamp (datetime.datetime | None | Unset): + completed_time_stamp (datetime.datetime | None | Unset): + schedule_component_id (int | None | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + imager_id (int | None | Unset): + inspection_type_id (int | Unset): Default: 0. + """ + + temperature: float | None | Unset = UNSET + state: None | str | Unset = UNSET + priority: int | None | Unset = UNSET + manual: bool | None | Unset = UNSET + scheduled_time_stamp: datetime.datetime | None | Unset = UNSET + completed_time_stamp: datetime.datetime | None | Unset = UNSET + schedule_component_id: int | None | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + inspection_type_id: int | Unset = 0 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + state: None | str | Unset + if isinstance(self.state, Unset): + state = UNSET + else: + state = self.state + + priority: int | None | Unset + if isinstance(self.priority, Unset): + priority = UNSET + else: + priority = self.priority + + manual: bool | None | Unset + if isinstance(self.manual, Unset): + manual = UNSET + else: + manual = self.manual + + scheduled_time_stamp: None | str | Unset + if isinstance(self.scheduled_time_stamp, Unset): + scheduled_time_stamp = UNSET + elif isinstance(self.scheduled_time_stamp, datetime.datetime): + scheduled_time_stamp = self.scheduled_time_stamp.isoformat() + else: + scheduled_time_stamp = self.scheduled_time_stamp + + completed_time_stamp: None | str | Unset + if isinstance(self.completed_time_stamp, Unset): + completed_time_stamp = UNSET + elif isinstance(self.completed_time_stamp, datetime.datetime): + completed_time_stamp = self.completed_time_stamp.isoformat() + else: + completed_time_stamp = self.completed_time_stamp + + schedule_component_id: int | None | Unset + if isinstance(self.schedule_component_id, Unset): + schedule_component_id = UNSET + else: + schedule_component_id = self.schedule_component_id + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + inspection_type_id = self.inspection_type_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if temperature is not UNSET: + field_dict["temperature"] = temperature + if state is not UNSET: + field_dict["state"] = state + if priority is not UNSET: + field_dict["priority"] = priority + if manual is not UNSET: + field_dict["manual"] = manual + if scheduled_time_stamp is not UNSET: + field_dict["scheduledTimeStamp"] = scheduled_time_stamp + if completed_time_stamp is not UNSET: + field_dict["completedTimeStamp"] = completed_time_stamp + if schedule_component_id is not UNSET: + field_dict["scheduleComponentId"] = schedule_component_id + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + if inspection_type_id is not UNSET: + field_dict["inspectionTypeId"] = inspection_type_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_state(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + state = _parse_state(d.pop("state", UNSET)) + + def _parse_priority(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + priority = _parse_priority(d.pop("priority", UNSET)) + + def _parse_manual(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + manual = _parse_manual(d.pop("manual", UNSET)) + + def _parse_scheduled_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + scheduled_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return scheduled_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + scheduled_time_stamp = _parse_scheduled_time_stamp(d.pop("scheduledTimeStamp", UNSET)) + + def _parse_completed_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return completed_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_time_stamp = _parse_completed_time_stamp(d.pop("completedTimeStamp", UNSET)) + + def _parse_schedule_component_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + schedule_component_id = _parse_schedule_component_id(d.pop("scheduleComponentId", UNSET)) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + inspection_type_id = d.pop("inspectionTypeId", UNSET) + + container_inspection_optional = cls( + temperature=temperature, + state=state, + priority=priority, + manual=manual, + scheduled_time_stamp=scheduled_time_stamp, + completed_time_stamp=completed_time_stamp, + schedule_component_id=schedule_component_id, + bl_time_stamp=bl_time_stamp, + imager_id=imager_id, + inspection_type_id=inspection_type_id, + ) + + container_inspection_optional.additional_properties = d + return container_inspection_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_inspection_out.py b/src/lims_utils/expeye_client/models/container_inspection_out.py new file mode 100644 index 0000000..9794129 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_inspection_out.py @@ -0,0 +1,290 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerInspectionOut") + + +@_attrs_define +class ContainerInspectionOut: + """ + Attributes: + inspection_type_id (int): + container_id (int): + container_inspection_id (int): + temperature (float | None | Unset): + state (None | str | Unset): + priority (int | None | Unset): + manual (bool | None | Unset): + scheduled_time_stamp (datetime.datetime | None | Unset): + completed_time_stamp (datetime.datetime | None | Unset): + schedule_component_id (int | None | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + imager_id (int | None | Unset): + """ + + inspection_type_id: int + container_id: int + container_inspection_id: int + temperature: float | None | Unset = UNSET + state: None | str | Unset = UNSET + priority: int | None | Unset = UNSET + manual: bool | None | Unset = UNSET + scheduled_time_stamp: datetime.datetime | None | Unset = UNSET + completed_time_stamp: datetime.datetime | None | Unset = UNSET + schedule_component_id: int | None | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + inspection_type_id = self.inspection_type_id + + container_id = self.container_id + + container_inspection_id = self.container_inspection_id + + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + state: None | str | Unset + if isinstance(self.state, Unset): + state = UNSET + else: + state = self.state + + priority: int | None | Unset + if isinstance(self.priority, Unset): + priority = UNSET + else: + priority = self.priority + + manual: bool | None | Unset + if isinstance(self.manual, Unset): + manual = UNSET + else: + manual = self.manual + + scheduled_time_stamp: None | str | Unset + if isinstance(self.scheduled_time_stamp, Unset): + scheduled_time_stamp = UNSET + elif isinstance(self.scheduled_time_stamp, datetime.datetime): + scheduled_time_stamp = self.scheduled_time_stamp.isoformat() + else: + scheduled_time_stamp = self.scheduled_time_stamp + + completed_time_stamp: None | str | Unset + if isinstance(self.completed_time_stamp, Unset): + completed_time_stamp = UNSET + elif isinstance(self.completed_time_stamp, datetime.datetime): + completed_time_stamp = self.completed_time_stamp.isoformat() + else: + completed_time_stamp = self.completed_time_stamp + + schedule_component_id: int | None | Unset + if isinstance(self.schedule_component_id, Unset): + schedule_component_id = UNSET + else: + schedule_component_id = self.schedule_component_id + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "inspectionTypeId": inspection_type_id, + "containerId": container_id, + "containerInspectionId": container_inspection_id, + } + ) + if temperature is not UNSET: + field_dict["temperature"] = temperature + if state is not UNSET: + field_dict["state"] = state + if priority is not UNSET: + field_dict["priority"] = priority + if manual is not UNSET: + field_dict["manual"] = manual + if scheduled_time_stamp is not UNSET: + field_dict["scheduledTimeStamp"] = scheduled_time_stamp + if completed_time_stamp is not UNSET: + field_dict["completedTimeStamp"] = completed_time_stamp + if schedule_component_id is not UNSET: + field_dict["scheduleComponentId"] = schedule_component_id + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + inspection_type_id = d.pop("inspectionTypeId") + + container_id = d.pop("containerId") + + container_inspection_id = d.pop("containerInspectionId") + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_state(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + state = _parse_state(d.pop("state", UNSET)) + + def _parse_priority(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + priority = _parse_priority(d.pop("priority", UNSET)) + + def _parse_manual(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + manual = _parse_manual(d.pop("manual", UNSET)) + + def _parse_scheduled_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + scheduled_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return scheduled_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + scheduled_time_stamp = _parse_scheduled_time_stamp(d.pop("scheduledTimeStamp", UNSET)) + + def _parse_completed_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return completed_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_time_stamp = _parse_completed_time_stamp(d.pop("completedTimeStamp", UNSET)) + + def _parse_schedule_component_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + schedule_component_id = _parse_schedule_component_id(d.pop("scheduleComponentId", UNSET)) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + container_inspection_out = cls( + inspection_type_id=inspection_type_id, + container_id=container_id, + container_inspection_id=container_inspection_id, + temperature=temperature, + state=state, + priority=priority, + manual=manual, + scheduled_time_stamp=scheduled_time_stamp, + completed_time_stamp=completed_time_stamp, + schedule_component_id=schedule_component_id, + bl_time_stamp=bl_time_stamp, + imager_id=imager_id, + ) + + container_inspection_out.additional_properties = d + return container_inspection_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_load.py b/src/lims_utils/expeye_client/models/container_load.py new file mode 100644 index 0000000..b055a8d --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_load.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerLoad") + + +@_attrs_define +class ContainerLoad: + """ + Attributes: + beamline (str): + location (int | None | Unset): + """ + + beamline: str + location: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + beamline = self.beamline + + location: int | None | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "beamline": beamline, + } + ) + if location is not UNSET: + field_dict["location"] = location + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + beamline = d.pop("beamline") + + def _parse_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + container_load = cls( + beamline=beamline, + location=location, + ) + + container_load.additional_properties = d + return container_load + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_optional.py b/src/lims_utils/expeye_client/models/container_optional.py new file mode 100644 index 0000000..83d07f3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_optional.py @@ -0,0 +1,353 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerOptional") + + +@_attrs_define +class ContainerOptional: + """ + Attributes: + code (None | str | Unset): + container_type (None | str | Unset): + capacity (int | None | Unset): + container_status (None | str | Unset): + beamline_location (None | str | Unset): + barcode (None | str | Unset): + current_dewar_id (int | None | Unset): + storage_temperature (int | None | Unset): + sample_changer_location (None | str | Unset): + experiment_type_id (int | None | Unset): + comments (None | str | Unset): + container_registry_id (int | None | Unset): + source (None | str | Unset): + session_id (int | None | Unset): + imager_id (int | None | Unset): + """ + + code: None | str | Unset = UNSET + container_type: None | str | Unset = UNSET + capacity: int | None | Unset = UNSET + container_status: None | str | Unset = UNSET + beamline_location: None | str | Unset = UNSET + barcode: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + storage_temperature: int | None | Unset = UNSET + sample_changer_location: None | str | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + container_registry_id: int | None | Unset = UNSET + source: None | str | Unset = UNSET + session_id: int | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + container_type: None | str | Unset + if isinstance(self.container_type, Unset): + container_type = UNSET + else: + container_type = self.container_type + + capacity: int | None | Unset + if isinstance(self.capacity, Unset): + capacity = UNSET + else: + capacity = self.capacity + + container_status: None | str | Unset + if isinstance(self.container_status, Unset): + container_status = UNSET + else: + container_status = self.container_status + + beamline_location: None | str | Unset + if isinstance(self.beamline_location, Unset): + beamline_location = UNSET + else: + beamline_location = self.beamline_location + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + storage_temperature: int | None | Unset + if isinstance(self.storage_temperature, Unset): + storage_temperature = UNSET + else: + storage_temperature = self.storage_temperature + + sample_changer_location: None | str | Unset + if isinstance(self.sample_changer_location, Unset): + sample_changer_location = UNSET + else: + sample_changer_location = self.sample_changer_location + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + container_registry_id: int | None | Unset + if isinstance(self.container_registry_id, Unset): + container_registry_id = UNSET + else: + container_registry_id = self.container_registry_id + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if code is not UNSET: + field_dict["code"] = code + if container_type is not UNSET: + field_dict["containerType"] = container_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if container_status is not UNSET: + field_dict["containerStatus"] = container_status + if beamline_location is not UNSET: + field_dict["beamlineLocation"] = beamline_location + if barcode is not UNSET: + field_dict["barcode"] = barcode + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + if storage_temperature is not UNSET: + field_dict["storageTemperature"] = storage_temperature + if sample_changer_location is not UNSET: + field_dict["sampleChangerLocation"] = sample_changer_location + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if comments is not UNSET: + field_dict["comments"] = comments + if container_registry_id is not UNSET: + field_dict["containerRegistryId"] = container_registry_id + if source is not UNSET: + field_dict["source"] = source + if session_id is not UNSET: + field_dict["sessionId"] = session_id + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_container_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_type = _parse_container_type(d.pop("containerType", UNSET)) + + def _parse_capacity(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + capacity = _parse_capacity(d.pop("capacity", UNSET)) + + def _parse_container_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_status = _parse_container_status(d.pop("containerStatus", UNSET)) + + def _parse_beamline_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_location = _parse_beamline_location(d.pop("beamlineLocation", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + def _parse_storage_temperature(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + storage_temperature = _parse_storage_temperature(d.pop("storageTemperature", UNSET)) + + def _parse_sample_changer_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_changer_location = _parse_sample_changer_location(d.pop("sampleChangerLocation", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_container_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_registry_id = _parse_container_registry_id(d.pop("containerRegistryId", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + container_optional = cls( + code=code, + container_type=container_type, + capacity=capacity, + container_status=container_status, + beamline_location=beamline_location, + barcode=barcode, + current_dewar_id=current_dewar_id, + storage_temperature=storage_temperature, + sample_changer_location=sample_changer_location, + experiment_type_id=experiment_type_id, + comments=comments, + container_registry_id=container_registry_id, + source=source, + session_id=session_id, + imager_id=imager_id, + ) + + container_optional.additional_properties = d + return container_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_out.py b/src/lims_utils/expeye_client/models/container_out.py new file mode 100644 index 0000000..5b8fcd1 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_out.py @@ -0,0 +1,403 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerOut") + + +@_attrs_define +class ContainerOut: + """ + Attributes: + container_id (int): + code (None | str | Unset): + container_type (None | str | Unset): + capacity (int | None | Unset): + container_status (None | str | Unset): + beamline_location (None | str | Unset): + barcode (None | str | Unset): + current_dewar_id (int | None | Unset): + storage_temperature (int | None | Unset): + sample_changer_location (None | str | Unset): + experiment_type_id (int | None | Unset): + comments (None | str | Unset): + container_registry_id (int | None | Unset): + source (None | str | Unset): + session_id (int | None | Unset): + imager_id (int | None | Unset): + dewar_id (int | None | Unset): + parent_container_id (int | None | Unset): + """ + + container_id: int + code: None | str | Unset = UNSET + container_type: None | str | Unset = UNSET + capacity: int | None | Unset = UNSET + container_status: None | str | Unset = UNSET + beamline_location: None | str | Unset = UNSET + barcode: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + storage_temperature: int | None | Unset = UNSET + sample_changer_location: None | str | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + container_registry_id: int | None | Unset = UNSET + source: None | str | Unset = UNSET + session_id: int | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + dewar_id: int | None | Unset = UNSET + parent_container_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_id = self.container_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + container_type: None | str | Unset + if isinstance(self.container_type, Unset): + container_type = UNSET + else: + container_type = self.container_type + + capacity: int | None | Unset + if isinstance(self.capacity, Unset): + capacity = UNSET + else: + capacity = self.capacity + + container_status: None | str | Unset + if isinstance(self.container_status, Unset): + container_status = UNSET + else: + container_status = self.container_status + + beamline_location: None | str | Unset + if isinstance(self.beamline_location, Unset): + beamline_location = UNSET + else: + beamline_location = self.beamline_location + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + storage_temperature: int | None | Unset + if isinstance(self.storage_temperature, Unset): + storage_temperature = UNSET + else: + storage_temperature = self.storage_temperature + + sample_changer_location: None | str | Unset + if isinstance(self.sample_changer_location, Unset): + sample_changer_location = UNSET + else: + sample_changer_location = self.sample_changer_location + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + container_registry_id: int | None | Unset + if isinstance(self.container_registry_id, Unset): + container_registry_id = UNSET + else: + container_registry_id = self.container_registry_id + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + dewar_id: int | None | Unset + if isinstance(self.dewar_id, Unset): + dewar_id = UNSET + else: + dewar_id = self.dewar_id + + parent_container_id: int | None | Unset + if isinstance(self.parent_container_id, Unset): + parent_container_id = UNSET + else: + parent_container_id = self.parent_container_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "containerId": container_id, + } + ) + if code is not UNSET: + field_dict["code"] = code + if container_type is not UNSET: + field_dict["containerType"] = container_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if container_status is not UNSET: + field_dict["containerStatus"] = container_status + if beamline_location is not UNSET: + field_dict["beamlineLocation"] = beamline_location + if barcode is not UNSET: + field_dict["barcode"] = barcode + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + if storage_temperature is not UNSET: + field_dict["storageTemperature"] = storage_temperature + if sample_changer_location is not UNSET: + field_dict["sampleChangerLocation"] = sample_changer_location + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if comments is not UNSET: + field_dict["comments"] = comments + if container_registry_id is not UNSET: + field_dict["containerRegistryId"] = container_registry_id + if source is not UNSET: + field_dict["source"] = source + if session_id is not UNSET: + field_dict["sessionId"] = session_id + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + if dewar_id is not UNSET: + field_dict["dewarId"] = dewar_id + if parent_container_id is not UNSET: + field_dict["parentContainerId"] = parent_container_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + container_id = d.pop("containerId") + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_container_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_type = _parse_container_type(d.pop("containerType", UNSET)) + + def _parse_capacity(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + capacity = _parse_capacity(d.pop("capacity", UNSET)) + + def _parse_container_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_status = _parse_container_status(d.pop("containerStatus", UNSET)) + + def _parse_beamline_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_location = _parse_beamline_location(d.pop("beamlineLocation", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + def _parse_storage_temperature(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + storage_temperature = _parse_storage_temperature(d.pop("storageTemperature", UNSET)) + + def _parse_sample_changer_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_changer_location = _parse_sample_changer_location(d.pop("sampleChangerLocation", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_container_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_registry_id = _parse_container_registry_id(d.pop("containerRegistryId", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + def _parse_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_id = _parse_dewar_id(d.pop("dewarId", UNSET)) + + def _parse_parent_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + parent_container_id = _parse_parent_container_id(d.pop("parentContainerId", UNSET)) + + container_out = cls( + container_id=container_id, + code=code, + container_type=container_type, + capacity=capacity, + container_status=container_status, + beamline_location=beamline_location, + barcode=barcode, + current_dewar_id=current_dewar_id, + storage_temperature=storage_temperature, + sample_changer_location=sample_changer_location, + experiment_type_id=experiment_type_id, + comments=comments, + container_registry_id=container_registry_id, + source=source, + session_id=session_id, + imager_id=imager_id, + dewar_id=dewar_id, + parent_container_id=parent_container_id, + ) + + container_out.additional_properties = d + return container_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_queue_in.py b/src/lims_utils/expeye_client/models/container_queue_in.py new file mode 100644 index 0000000..d637054 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_queue_in.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerQueueIn") + + +@_attrs_define +class ContainerQueueIn: + """ + Attributes: + person_id (int | None | Unset): + completed_time_stamp (datetime.datetime | None | Unset): + """ + + person_id: int | None | Unset = UNSET + completed_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + completed_time_stamp: None | str | Unset + if isinstance(self.completed_time_stamp, Unset): + completed_time_stamp = UNSET + elif isinstance(self.completed_time_stamp, datetime.datetime): + completed_time_stamp = self.completed_time_stamp.isoformat() + else: + completed_time_stamp = self.completed_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if person_id is not UNSET: + field_dict["personId"] = person_id + if completed_time_stamp is not UNSET: + field_dict["completedTimeStamp"] = completed_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_completed_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return completed_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_time_stamp = _parse_completed_time_stamp(d.pop("completedTimeStamp", UNSET)) + + container_queue_in = cls( + person_id=person_id, + completed_time_stamp=completed_time_stamp, + ) + + container_queue_in.additional_properties = d + return container_queue_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_queue_out.py b/src/lims_utils/expeye_client/models/container_queue_out.py new file mode 100644 index 0000000..72a5e42 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_queue_out.py @@ -0,0 +1,174 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ContainerQueueOut") + + +@_attrs_define +class ContainerQueueOut: + """ + Attributes: + person_id (int | None | Unset): + completed_time_stamp (datetime.datetime | None | Unset): + container_id (int | None | Unset): + container_queue_id (int | None | Unset): + created_time_stamp (datetime.datetime | None | Unset): + """ + + person_id: int | None | Unset = UNSET + completed_time_stamp: datetime.datetime | None | Unset = UNSET + container_id: int | None | Unset = UNSET + container_queue_id: int | None | Unset = UNSET + created_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + completed_time_stamp: None | str | Unset + if isinstance(self.completed_time_stamp, Unset): + completed_time_stamp = UNSET + elif isinstance(self.completed_time_stamp, datetime.datetime): + completed_time_stamp = self.completed_time_stamp.isoformat() + else: + completed_time_stamp = self.completed_time_stamp + + container_id: int | None | Unset + if isinstance(self.container_id, Unset): + container_id = UNSET + else: + container_id = self.container_id + + container_queue_id: int | None | Unset + if isinstance(self.container_queue_id, Unset): + container_queue_id = UNSET + else: + container_queue_id = self.container_queue_id + + created_time_stamp: None | str | Unset + if isinstance(self.created_time_stamp, Unset): + created_time_stamp = UNSET + elif isinstance(self.created_time_stamp, datetime.datetime): + created_time_stamp = self.created_time_stamp.isoformat() + else: + created_time_stamp = self.created_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if person_id is not UNSET: + field_dict["personId"] = person_id + if completed_time_stamp is not UNSET: + field_dict["completedTimeStamp"] = completed_time_stamp + if container_id is not UNSET: + field_dict["containerId"] = container_id + if container_queue_id is not UNSET: + field_dict["containerQueueId"] = container_queue_id + if created_time_stamp is not UNSET: + field_dict["createdTimeStamp"] = created_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_completed_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + completed_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return completed_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + completed_time_stamp = _parse_completed_time_stamp(d.pop("completedTimeStamp", UNSET)) + + def _parse_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_id = _parse_container_id(d.pop("containerId", UNSET)) + + def _parse_container_queue_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_queue_id = _parse_container_queue_id(d.pop("containerQueueId", UNSET)) + + def _parse_created_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + created_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return created_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + created_time_stamp = _parse_created_time_stamp(d.pop("createdTimeStamp", UNSET)) + + container_queue_out = cls( + person_id=person_id, + completed_time_stamp=completed_time_stamp, + container_id=container_id, + container_queue_id=container_queue_id, + created_time_stamp=created_time_stamp, + ) + + container_queue_out.additional_properties = d + return container_queue_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_with_children_in.py b/src/lims_utils/expeye_client/models/container_with_children_in.py new file mode 100644 index 0000000..8973956 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_with_children_in.py @@ -0,0 +1,377 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sample_with_crystal_in import SampleWithCrystalIn + + +T = TypeVar("T", bound="ContainerWithChildrenIn") + + +@_attrs_define +class ContainerWithChildrenIn: + """ + Attributes: + children (list[SampleWithCrystalIn]): + code (None | str | Unset): + container_type (None | str | Unset): + capacity (int | None | Unset): + container_status (None | str | Unset): + beamline_location (None | str | Unset): + barcode (None | str | Unset): + current_dewar_id (int | None | Unset): + storage_temperature (int | None | Unset): + sample_changer_location (None | str | Unset): + experiment_type_id (int | None | Unset): + comments (None | str | Unset): + container_registry_id (int | None | Unset): + source (None | str | Unset): + session_id (int | None | Unset): + imager_id (int | None | Unset): + """ + + children: list[SampleWithCrystalIn] + code: None | str | Unset = UNSET + container_type: None | str | Unset = UNSET + capacity: int | None | Unset = UNSET + container_status: None | str | Unset = UNSET + beamline_location: None | str | Unset = UNSET + barcode: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + storage_temperature: int | None | Unset = UNSET + sample_changer_location: None | str | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + container_registry_id: int | None | Unset = UNSET + source: None | str | Unset = UNSET + session_id: int | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + container_type: None | str | Unset + if isinstance(self.container_type, Unset): + container_type = UNSET + else: + container_type = self.container_type + + capacity: int | None | Unset + if isinstance(self.capacity, Unset): + capacity = UNSET + else: + capacity = self.capacity + + container_status: None | str | Unset + if isinstance(self.container_status, Unset): + container_status = UNSET + else: + container_status = self.container_status + + beamline_location: None | str | Unset + if isinstance(self.beamline_location, Unset): + beamline_location = UNSET + else: + beamline_location = self.beamline_location + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + storage_temperature: int | None | Unset + if isinstance(self.storage_temperature, Unset): + storage_temperature = UNSET + else: + storage_temperature = self.storage_temperature + + sample_changer_location: None | str | Unset + if isinstance(self.sample_changer_location, Unset): + sample_changer_location = UNSET + else: + sample_changer_location = self.sample_changer_location + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + container_registry_id: int | None | Unset + if isinstance(self.container_registry_id, Unset): + container_registry_id = UNSET + else: + container_registry_id = self.container_registry_id + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "children": children, + } + ) + if code is not UNSET: + field_dict["code"] = code + if container_type is not UNSET: + field_dict["containerType"] = container_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if container_status is not UNSET: + field_dict["containerStatus"] = container_status + if beamline_location is not UNSET: + field_dict["beamlineLocation"] = beamline_location + if barcode is not UNSET: + field_dict["barcode"] = barcode + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + if storage_temperature is not UNSET: + field_dict["storageTemperature"] = storage_temperature + if sample_changer_location is not UNSET: + field_dict["sampleChangerLocation"] = sample_changer_location + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if comments is not UNSET: + field_dict["comments"] = comments + if container_registry_id is not UNSET: + field_dict["containerRegistryId"] = container_registry_id + if source is not UNSET: + field_dict["source"] = source + if session_id is not UNSET: + field_dict["sessionId"] = session_id + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sample_with_crystal_in import SampleWithCrystalIn # noqa: PLC0415 + + d = dict(src_dict) + children = [] + _children = d.pop("children") + for children_item_data in _children: + children_item = SampleWithCrystalIn.from_dict(children_item_data) + + children.append(children_item) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_container_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_type = _parse_container_type(d.pop("containerType", UNSET)) + + def _parse_capacity(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + capacity = _parse_capacity(d.pop("capacity", UNSET)) + + def _parse_container_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_status = _parse_container_status(d.pop("containerStatus", UNSET)) + + def _parse_beamline_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_location = _parse_beamline_location(d.pop("beamlineLocation", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + def _parse_storage_temperature(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + storage_temperature = _parse_storage_temperature(d.pop("storageTemperature", UNSET)) + + def _parse_sample_changer_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_changer_location = _parse_sample_changer_location(d.pop("sampleChangerLocation", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_container_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_registry_id = _parse_container_registry_id(d.pop("containerRegistryId", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + container_with_children_in = cls( + children=children, + code=code, + container_type=container_type, + capacity=capacity, + container_status=container_status, + beamline_location=beamline_location, + barcode=barcode, + current_dewar_id=current_dewar_id, + storage_temperature=storage_temperature, + sample_changer_location=sample_changer_location, + experiment_type_id=experiment_type_id, + comments=comments, + container_registry_id=container_registry_id, + source=source, + session_id=session_id, + imager_id=imager_id, + ) + + container_with_children_in.additional_properties = d + return container_with_children_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/container_with_children_out.py b/src/lims_utils/expeye_client/models/container_with_children_out.py new file mode 100644 index 0000000..0456904 --- /dev/null +++ b/src/lims_utils/expeye_client/models/container_with_children_out.py @@ -0,0 +1,430 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sample_out import SampleOut + + +T = TypeVar("T", bound="ContainerWithChildrenOut") + + +@_attrs_define +class ContainerWithChildrenOut: + """ + Attributes: + container_id (int): + code (None | str | Unset): + container_type (None | str | Unset): + capacity (int | None | Unset): + container_status (None | str | Unset): + beamline_location (None | str | Unset): + barcode (None | str | Unset): + current_dewar_id (int | None | Unset): + storage_temperature (int | None | Unset): + sample_changer_location (None | str | Unset): + experiment_type_id (int | None | Unset): + comments (None | str | Unset): + container_registry_id (int | None | Unset): + source (None | str | Unset): + session_id (int | None | Unset): + imager_id (int | None | Unset): + dewar_id (int | None | Unset): + parent_container_id (int | None | Unset): + children (list[SampleOut] | Unset): + """ + + container_id: int + code: None | str | Unset = UNSET + container_type: None | str | Unset = UNSET + capacity: int | None | Unset = UNSET + container_status: None | str | Unset = UNSET + beamline_location: None | str | Unset = UNSET + barcode: None | str | Unset = UNSET + current_dewar_id: int | None | Unset = UNSET + storage_temperature: int | None | Unset = UNSET + sample_changer_location: None | str | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + container_registry_id: int | None | Unset = UNSET + source: None | str | Unset = UNSET + session_id: int | None | Unset = UNSET + imager_id: int | None | Unset = UNSET + dewar_id: int | None | Unset = UNSET + parent_container_id: int | None | Unset = UNSET + children: list[SampleOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_id = self.container_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + container_type: None | str | Unset + if isinstance(self.container_type, Unset): + container_type = UNSET + else: + container_type = self.container_type + + capacity: int | None | Unset + if isinstance(self.capacity, Unset): + capacity = UNSET + else: + capacity = self.capacity + + container_status: None | str | Unset + if isinstance(self.container_status, Unset): + container_status = UNSET + else: + container_status = self.container_status + + beamline_location: None | str | Unset + if isinstance(self.beamline_location, Unset): + beamline_location = UNSET + else: + beamline_location = self.beamline_location + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + current_dewar_id: int | None | Unset + if isinstance(self.current_dewar_id, Unset): + current_dewar_id = UNSET + else: + current_dewar_id = self.current_dewar_id + + storage_temperature: int | None | Unset + if isinstance(self.storage_temperature, Unset): + storage_temperature = UNSET + else: + storage_temperature = self.storage_temperature + + sample_changer_location: None | str | Unset + if isinstance(self.sample_changer_location, Unset): + sample_changer_location = UNSET + else: + sample_changer_location = self.sample_changer_location + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + container_registry_id: int | None | Unset + if isinstance(self.container_registry_id, Unset): + container_registry_id = UNSET + else: + container_registry_id = self.container_registry_id + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + imager_id: int | None | Unset + if isinstance(self.imager_id, Unset): + imager_id = UNSET + else: + imager_id = self.imager_id + + dewar_id: int | None | Unset + if isinstance(self.dewar_id, Unset): + dewar_id = UNSET + else: + dewar_id = self.dewar_id + + parent_container_id: int | None | Unset + if isinstance(self.parent_container_id, Unset): + parent_container_id = UNSET + else: + parent_container_id = self.parent_container_id + + children: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.children, Unset): + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "containerId": container_id, + } + ) + if code is not UNSET: + field_dict["code"] = code + if container_type is not UNSET: + field_dict["containerType"] = container_type + if capacity is not UNSET: + field_dict["capacity"] = capacity + if container_status is not UNSET: + field_dict["containerStatus"] = container_status + if beamline_location is not UNSET: + field_dict["beamlineLocation"] = beamline_location + if barcode is not UNSET: + field_dict["barcode"] = barcode + if current_dewar_id is not UNSET: + field_dict["currentDewarId"] = current_dewar_id + if storage_temperature is not UNSET: + field_dict["storageTemperature"] = storage_temperature + if sample_changer_location is not UNSET: + field_dict["sampleChangerLocation"] = sample_changer_location + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if comments is not UNSET: + field_dict["comments"] = comments + if container_registry_id is not UNSET: + field_dict["containerRegistryId"] = container_registry_id + if source is not UNSET: + field_dict["source"] = source + if session_id is not UNSET: + field_dict["sessionId"] = session_id + if imager_id is not UNSET: + field_dict["imagerId"] = imager_id + if dewar_id is not UNSET: + field_dict["dewarId"] = dewar_id + if parent_container_id is not UNSET: + field_dict["parentContainerId"] = parent_container_id + if children is not UNSET: + field_dict["children"] = children + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sample_out import SampleOut # noqa: PLC0415 + + d = dict(src_dict) + container_id = d.pop("containerId") + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_container_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_type = _parse_container_type(d.pop("containerType", UNSET)) + + def _parse_capacity(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + capacity = _parse_capacity(d.pop("capacity", UNSET)) + + def _parse_container_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + container_status = _parse_container_status(d.pop("containerStatus", UNSET)) + + def _parse_beamline_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beamline_location = _parse_beamline_location(d.pop("beamlineLocation", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_current_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_dewar_id = _parse_current_dewar_id(d.pop("currentDewarId", UNSET)) + + def _parse_storage_temperature(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + storage_temperature = _parse_storage_temperature(d.pop("storageTemperature", UNSET)) + + def _parse_sample_changer_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_changer_location = _parse_sample_changer_location(d.pop("sampleChangerLocation", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_container_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_registry_id = _parse_container_registry_id(d.pop("containerRegistryId", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + def _parse_imager_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + imager_id = _parse_imager_id(d.pop("imagerId", UNSET)) + + def _parse_dewar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_id = _parse_dewar_id(d.pop("dewarId", UNSET)) + + def _parse_parent_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + parent_container_id = _parse_parent_container_id(d.pop("parentContainerId", UNSET)) + + _children = d.pop("children", UNSET) + children: list[SampleOut] | Unset = UNSET + if _children is not UNSET: + children = [] + for children_item_data in _children: + children_item = SampleOut.from_dict(children_item_data) + + children.append(children_item) + + container_with_children_out = cls( + container_id=container_id, + code=code, + container_type=container_type, + capacity=capacity, + container_status=container_status, + beamline_location=beamline_location, + barcode=barcode, + current_dewar_id=current_dewar_id, + storage_temperature=storage_temperature, + sample_changer_location=sample_changer_location, + experiment_type_id=experiment_type_id, + comments=comments, + container_registry_id=container_registry_id, + source=source, + session_id=session_id, + imager_id=imager_id, + dewar_id=dewar_id, + parent_container_id=parent_container_id, + children=children, + ) + + container_with_children_out.additional_properties = d + return container_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/crystal_in.py b/src/lims_utils/expeye_client/models/crystal_in.py new file mode 100644 index 0000000..e43776a --- /dev/null +++ b/src/lims_utils/expeye_client/models/crystal_in.py @@ -0,0 +1,470 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CrystalIn") + + +@_attrs_define +class CrystalIn: + """ + Attributes: + name (None | str | Unset): + morphology (None | str | Unset): + color (None | str | Unset): + space_group (None | str | Unset): + comments (None | str | Unset): + pdb_file_name (None | str | Unset): + pdb_file_path (None | str | Unset): + abundance (float | None | Unset): + theoretical_density (float | None | Unset): + diffraction_plan_id (int | None | Unset): + crystal_uuid (None | str | Unset): + size_x (float | None | Unset): + size_y (float | None | Unset): + size_z (float | None | Unset): + cell_a (float | None | Unset): + cell_b (float | None | Unset): + cell_c (float | None | Unset): + cell_alpha (float | None | Unset): + cell_beta (float | None | Unset): + cell_gamma (float | None | Unset): + record_time_stamp (datetime.datetime | Unset): + """ + + name: None | str | Unset = UNSET + morphology: None | str | Unset = UNSET + color: None | str | Unset = UNSET + space_group: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + pdb_file_name: None | str | Unset = UNSET + pdb_file_path: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + theoretical_density: float | None | Unset = UNSET + diffraction_plan_id: int | None | Unset = UNSET + crystal_uuid: None | str | Unset = UNSET + size_x: float | None | Unset = UNSET + size_y: float | None | Unset = UNSET + size_z: float | None | Unset = UNSET + cell_a: float | None | Unset = UNSET + cell_b: float | None | Unset = UNSET + cell_c: float | None | Unset = UNSET + cell_alpha: float | None | Unset = UNSET + cell_beta: float | None | Unset = UNSET + cell_gamma: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + morphology: None | str | Unset + if isinstance(self.morphology, Unset): + morphology = UNSET + else: + morphology = self.morphology + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + space_group: None | str | Unset + if isinstance(self.space_group, Unset): + space_group = UNSET + else: + space_group = self.space_group + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + pdb_file_name: None | str | Unset + if isinstance(self.pdb_file_name, Unset): + pdb_file_name = UNSET + else: + pdb_file_name = self.pdb_file_name + + pdb_file_path: None | str | Unset + if isinstance(self.pdb_file_path, Unset): + pdb_file_path = UNSET + else: + pdb_file_path = self.pdb_file_path + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + theoretical_density: float | None | Unset + if isinstance(self.theoretical_density, Unset): + theoretical_density = UNSET + else: + theoretical_density = self.theoretical_density + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + crystal_uuid: None | str | Unset + if isinstance(self.crystal_uuid, Unset): + crystal_uuid = UNSET + else: + crystal_uuid = self.crystal_uuid + + size_x: float | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + size_y: float | None | Unset + if isinstance(self.size_y, Unset): + size_y = UNSET + else: + size_y = self.size_y + + size_z: float | None | Unset + if isinstance(self.size_z, Unset): + size_z = UNSET + else: + size_z = self.size_z + + cell_a: float | None | Unset + if isinstance(self.cell_a, Unset): + cell_a = UNSET + else: + cell_a = self.cell_a + + cell_b: float | None | Unset + if isinstance(self.cell_b, Unset): + cell_b = UNSET + else: + cell_b = self.cell_b + + cell_c: float | None | Unset + if isinstance(self.cell_c, Unset): + cell_c = UNSET + else: + cell_c = self.cell_c + + cell_alpha: float | None | Unset + if isinstance(self.cell_alpha, Unset): + cell_alpha = UNSET + else: + cell_alpha = self.cell_alpha + + cell_beta: float | None | Unset + if isinstance(self.cell_beta, Unset): + cell_beta = UNSET + else: + cell_beta = self.cell_beta + + cell_gamma: float | None | Unset + if isinstance(self.cell_gamma, Unset): + cell_gamma = UNSET + else: + cell_gamma = self.cell_gamma + + record_time_stamp: str | Unset = UNSET + if not isinstance(self.record_time_stamp, Unset): + record_time_stamp = self.record_time_stamp.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if morphology is not UNSET: + field_dict["morphology"] = morphology + if color is not UNSET: + field_dict["color"] = color + if space_group is not UNSET: + field_dict["spaceGroup"] = space_group + if comments is not UNSET: + field_dict["comments"] = comments + if pdb_file_name is not UNSET: + field_dict["pdbFileName"] = pdb_file_name + if pdb_file_path is not UNSET: + field_dict["pdbFilePath"] = pdb_file_path + if abundance is not UNSET: + field_dict["abundance"] = abundance + if theoretical_density is not UNSET: + field_dict["theoreticalDensity"] = theoretical_density + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if crystal_uuid is not UNSET: + field_dict["crystalUUID"] = crystal_uuid + if size_x is not UNSET: + field_dict["sizeX"] = size_x + if size_y is not UNSET: + field_dict["sizeY"] = size_y + if size_z is not UNSET: + field_dict["sizeZ"] = size_z + if cell_a is not UNSET: + field_dict["cellA"] = cell_a + if cell_b is not UNSET: + field_dict["cellB"] = cell_b + if cell_c is not UNSET: + field_dict["cellC"] = cell_c + if cell_alpha is not UNSET: + field_dict["cellAlpha"] = cell_alpha + if cell_beta is not UNSET: + field_dict["cellBeta"] = cell_beta + if cell_gamma is not UNSET: + field_dict["cellGamma"] = cell_gamma + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_morphology(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + morphology = _parse_morphology(d.pop("morphology", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + space_group = _parse_space_group(d.pop("spaceGroup", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_pdb_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_name = _parse_pdb_file_name(d.pop("pdbFileName", UNSET)) + + def _parse_pdb_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_path = _parse_pdb_file_path(d.pop("pdbFilePath", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_theoretical_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + theoretical_density = _parse_theoretical_density(d.pop("theoreticalDensity", UNSET)) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_crystal_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_uuid = _parse_crystal_uuid(d.pop("crystalUUID", UNSET)) + + def _parse_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + def _parse_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_y = _parse_size_y(d.pop("sizeY", UNSET)) + + def _parse_size_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_z = _parse_size_z(d.pop("sizeZ", UNSET)) + + def _parse_cell_a(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_a = _parse_cell_a(d.pop("cellA", UNSET)) + + def _parse_cell_b(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_b = _parse_cell_b(d.pop("cellB", UNSET)) + + def _parse_cell_c(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_c = _parse_cell_c(d.pop("cellC", UNSET)) + + def _parse_cell_alpha(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_alpha = _parse_cell_alpha(d.pop("cellAlpha", UNSET)) + + def _parse_cell_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_beta = _parse_cell_beta(d.pop("cellBeta", UNSET)) + + def _parse_cell_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_gamma = _parse_cell_gamma(d.pop("cellGamma", UNSET)) + + _record_time_stamp = d.pop("recordTimeStamp", UNSET) + record_time_stamp: datetime.datetime | Unset + if isinstance(_record_time_stamp, Unset): + record_time_stamp = UNSET + else: + record_time_stamp = datetime.datetime.fromisoformat(_record_time_stamp) + + crystal_in = cls( + name=name, + morphology=morphology, + color=color, + space_group=space_group, + comments=comments, + pdb_file_name=pdb_file_name, + pdb_file_path=pdb_file_path, + abundance=abundance, + theoretical_density=theoretical_density, + diffraction_plan_id=diffraction_plan_id, + crystal_uuid=crystal_uuid, + size_x=size_x, + size_y=size_y, + size_z=size_z, + cell_a=cell_a, + cell_b=cell_b, + cell_c=cell_c, + cell_alpha=cell_alpha, + cell_beta=cell_beta, + cell_gamma=cell_gamma, + record_time_stamp=record_time_stamp, + ) + + crystal_in.additional_properties = d + return crystal_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/crystal_optional.py b/src/lims_utils/expeye_client/models/crystal_optional.py new file mode 100644 index 0000000..b53438e --- /dev/null +++ b/src/lims_utils/expeye_client/models/crystal_optional.py @@ -0,0 +1,470 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CrystalOptional") + + +@_attrs_define +class CrystalOptional: + """ + Attributes: + name (None | str | Unset): + morphology (None | str | Unset): + color (None | str | Unset): + space_group (None | str | Unset): + comments (None | str | Unset): + pdb_file_name (None | str | Unset): + pdb_file_path (None | str | Unset): + abundance (float | None | Unset): + theoretical_density (float | None | Unset): + diffraction_plan_id (int | None | Unset): + crystal_uuid (None | str | Unset): + size_x (float | None | Unset): + size_y (float | None | Unset): + size_z (float | None | Unset): + cell_a (float | None | Unset): + cell_b (float | None | Unset): + cell_c (float | None | Unset): + cell_alpha (float | None | Unset): + cell_beta (float | None | Unset): + cell_gamma (float | None | Unset): + record_time_stamp (datetime.datetime | Unset): + """ + + name: None | str | Unset = UNSET + morphology: None | str | Unset = UNSET + color: None | str | Unset = UNSET + space_group: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + pdb_file_name: None | str | Unset = UNSET + pdb_file_path: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + theoretical_density: float | None | Unset = UNSET + diffraction_plan_id: int | None | Unset = UNSET + crystal_uuid: None | str | Unset = UNSET + size_x: float | None | Unset = UNSET + size_y: float | None | Unset = UNSET + size_z: float | None | Unset = UNSET + cell_a: float | None | Unset = UNSET + cell_b: float | None | Unset = UNSET + cell_c: float | None | Unset = UNSET + cell_alpha: float | None | Unset = UNSET + cell_beta: float | None | Unset = UNSET + cell_gamma: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + morphology: None | str | Unset + if isinstance(self.morphology, Unset): + morphology = UNSET + else: + morphology = self.morphology + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + space_group: None | str | Unset + if isinstance(self.space_group, Unset): + space_group = UNSET + else: + space_group = self.space_group + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + pdb_file_name: None | str | Unset + if isinstance(self.pdb_file_name, Unset): + pdb_file_name = UNSET + else: + pdb_file_name = self.pdb_file_name + + pdb_file_path: None | str | Unset + if isinstance(self.pdb_file_path, Unset): + pdb_file_path = UNSET + else: + pdb_file_path = self.pdb_file_path + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + theoretical_density: float | None | Unset + if isinstance(self.theoretical_density, Unset): + theoretical_density = UNSET + else: + theoretical_density = self.theoretical_density + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + crystal_uuid: None | str | Unset + if isinstance(self.crystal_uuid, Unset): + crystal_uuid = UNSET + else: + crystal_uuid = self.crystal_uuid + + size_x: float | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + size_y: float | None | Unset + if isinstance(self.size_y, Unset): + size_y = UNSET + else: + size_y = self.size_y + + size_z: float | None | Unset + if isinstance(self.size_z, Unset): + size_z = UNSET + else: + size_z = self.size_z + + cell_a: float | None | Unset + if isinstance(self.cell_a, Unset): + cell_a = UNSET + else: + cell_a = self.cell_a + + cell_b: float | None | Unset + if isinstance(self.cell_b, Unset): + cell_b = UNSET + else: + cell_b = self.cell_b + + cell_c: float | None | Unset + if isinstance(self.cell_c, Unset): + cell_c = UNSET + else: + cell_c = self.cell_c + + cell_alpha: float | None | Unset + if isinstance(self.cell_alpha, Unset): + cell_alpha = UNSET + else: + cell_alpha = self.cell_alpha + + cell_beta: float | None | Unset + if isinstance(self.cell_beta, Unset): + cell_beta = UNSET + else: + cell_beta = self.cell_beta + + cell_gamma: float | None | Unset + if isinstance(self.cell_gamma, Unset): + cell_gamma = UNSET + else: + cell_gamma = self.cell_gamma + + record_time_stamp: str | Unset = UNSET + if not isinstance(self.record_time_stamp, Unset): + record_time_stamp = self.record_time_stamp.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if morphology is not UNSET: + field_dict["morphology"] = morphology + if color is not UNSET: + field_dict["color"] = color + if space_group is not UNSET: + field_dict["spaceGroup"] = space_group + if comments is not UNSET: + field_dict["comments"] = comments + if pdb_file_name is not UNSET: + field_dict["pdbFileName"] = pdb_file_name + if pdb_file_path is not UNSET: + field_dict["pdbFilePath"] = pdb_file_path + if abundance is not UNSET: + field_dict["abundance"] = abundance + if theoretical_density is not UNSET: + field_dict["theoreticalDensity"] = theoretical_density + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if crystal_uuid is not UNSET: + field_dict["crystalUUID"] = crystal_uuid + if size_x is not UNSET: + field_dict["sizeX"] = size_x + if size_y is not UNSET: + field_dict["sizeY"] = size_y + if size_z is not UNSET: + field_dict["sizeZ"] = size_z + if cell_a is not UNSET: + field_dict["cellA"] = cell_a + if cell_b is not UNSET: + field_dict["cellB"] = cell_b + if cell_c is not UNSET: + field_dict["cellC"] = cell_c + if cell_alpha is not UNSET: + field_dict["cellAlpha"] = cell_alpha + if cell_beta is not UNSET: + field_dict["cellBeta"] = cell_beta + if cell_gamma is not UNSET: + field_dict["cellGamma"] = cell_gamma + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_morphology(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + morphology = _parse_morphology(d.pop("morphology", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + space_group = _parse_space_group(d.pop("spaceGroup", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_pdb_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_name = _parse_pdb_file_name(d.pop("pdbFileName", UNSET)) + + def _parse_pdb_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_path = _parse_pdb_file_path(d.pop("pdbFilePath", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_theoretical_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + theoretical_density = _parse_theoretical_density(d.pop("theoreticalDensity", UNSET)) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_crystal_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_uuid = _parse_crystal_uuid(d.pop("crystalUUID", UNSET)) + + def _parse_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + def _parse_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_y = _parse_size_y(d.pop("sizeY", UNSET)) + + def _parse_size_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_z = _parse_size_z(d.pop("sizeZ", UNSET)) + + def _parse_cell_a(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_a = _parse_cell_a(d.pop("cellA", UNSET)) + + def _parse_cell_b(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_b = _parse_cell_b(d.pop("cellB", UNSET)) + + def _parse_cell_c(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_c = _parse_cell_c(d.pop("cellC", UNSET)) + + def _parse_cell_alpha(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_alpha = _parse_cell_alpha(d.pop("cellAlpha", UNSET)) + + def _parse_cell_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_beta = _parse_cell_beta(d.pop("cellBeta", UNSET)) + + def _parse_cell_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_gamma = _parse_cell_gamma(d.pop("cellGamma", UNSET)) + + _record_time_stamp = d.pop("recordTimeStamp", UNSET) + record_time_stamp: datetime.datetime | Unset + if isinstance(_record_time_stamp, Unset): + record_time_stamp = UNSET + else: + record_time_stamp = datetime.datetime.fromisoformat(_record_time_stamp) + + crystal_optional = cls( + name=name, + morphology=morphology, + color=color, + space_group=space_group, + comments=comments, + pdb_file_name=pdb_file_name, + pdb_file_path=pdb_file_path, + abundance=abundance, + theoretical_density=theoretical_density, + diffraction_plan_id=diffraction_plan_id, + crystal_uuid=crystal_uuid, + size_x=size_x, + size_y=size_y, + size_z=size_z, + cell_a=cell_a, + cell_b=cell_b, + cell_c=cell_c, + cell_alpha=cell_alpha, + cell_beta=cell_beta, + cell_gamma=cell_gamma, + record_time_stamp=record_time_stamp, + ) + + crystal_optional.additional_properties = d + return crystal_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/crystal_out.py b/src/lims_utils/expeye_client/models/crystal_out.py new file mode 100644 index 0000000..2c78dfa --- /dev/null +++ b/src/lims_utils/expeye_client/models/crystal_out.py @@ -0,0 +1,472 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CrystalOut") + + +@_attrs_define +class CrystalOut: + """ + Attributes: + crystal_id (int): + record_time_stamp (datetime.datetime): + name (None | str | Unset): + morphology (None | str | Unset): + color (None | str | Unset): + space_group (None | str | Unset): + comments (None | str | Unset): + pdb_file_name (None | str | Unset): + pdb_file_path (None | str | Unset): + abundance (float | None | Unset): + theoretical_density (float | None | Unset): + diffraction_plan_id (int | None | Unset): + crystal_uuid (None | str | Unset): + size_x (float | None | Unset): + size_y (float | None | Unset): + size_z (float | None | Unset): + cell_a (float | None | Unset): + cell_b (float | None | Unset): + cell_c (float | None | Unset): + cell_alpha (float | None | Unset): + cell_beta (float | None | Unset): + cell_gamma (float | None | Unset): + """ + + crystal_id: int + record_time_stamp: datetime.datetime + name: None | str | Unset = UNSET + morphology: None | str | Unset = UNSET + color: None | str | Unset = UNSET + space_group: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + pdb_file_name: None | str | Unset = UNSET + pdb_file_path: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + theoretical_density: float | None | Unset = UNSET + diffraction_plan_id: int | None | Unset = UNSET + crystal_uuid: None | str | Unset = UNSET + size_x: float | None | Unset = UNSET + size_y: float | None | Unset = UNSET + size_z: float | None | Unset = UNSET + cell_a: float | None | Unset = UNSET + cell_b: float | None | Unset = UNSET + cell_c: float | None | Unset = UNSET + cell_alpha: float | None | Unset = UNSET + cell_beta: float | None | Unset = UNSET + cell_gamma: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + crystal_id = self.crystal_id + + record_time_stamp = self.record_time_stamp.isoformat() + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + morphology: None | str | Unset + if isinstance(self.morphology, Unset): + morphology = UNSET + else: + morphology = self.morphology + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + space_group: None | str | Unset + if isinstance(self.space_group, Unset): + space_group = UNSET + else: + space_group = self.space_group + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + pdb_file_name: None | str | Unset + if isinstance(self.pdb_file_name, Unset): + pdb_file_name = UNSET + else: + pdb_file_name = self.pdb_file_name + + pdb_file_path: None | str | Unset + if isinstance(self.pdb_file_path, Unset): + pdb_file_path = UNSET + else: + pdb_file_path = self.pdb_file_path + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + theoretical_density: float | None | Unset + if isinstance(self.theoretical_density, Unset): + theoretical_density = UNSET + else: + theoretical_density = self.theoretical_density + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + crystal_uuid: None | str | Unset + if isinstance(self.crystal_uuid, Unset): + crystal_uuid = UNSET + else: + crystal_uuid = self.crystal_uuid + + size_x: float | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + size_y: float | None | Unset + if isinstance(self.size_y, Unset): + size_y = UNSET + else: + size_y = self.size_y + + size_z: float | None | Unset + if isinstance(self.size_z, Unset): + size_z = UNSET + else: + size_z = self.size_z + + cell_a: float | None | Unset + if isinstance(self.cell_a, Unset): + cell_a = UNSET + else: + cell_a = self.cell_a + + cell_b: float | None | Unset + if isinstance(self.cell_b, Unset): + cell_b = UNSET + else: + cell_b = self.cell_b + + cell_c: float | None | Unset + if isinstance(self.cell_c, Unset): + cell_c = UNSET + else: + cell_c = self.cell_c + + cell_alpha: float | None | Unset + if isinstance(self.cell_alpha, Unset): + cell_alpha = UNSET + else: + cell_alpha = self.cell_alpha + + cell_beta: float | None | Unset + if isinstance(self.cell_beta, Unset): + cell_beta = UNSET + else: + cell_beta = self.cell_beta + + cell_gamma: float | None | Unset + if isinstance(self.cell_gamma, Unset): + cell_gamma = UNSET + else: + cell_gamma = self.cell_gamma + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "crystalId": crystal_id, + "recordTimeStamp": record_time_stamp, + } + ) + if name is not UNSET: + field_dict["name"] = name + if morphology is not UNSET: + field_dict["morphology"] = morphology + if color is not UNSET: + field_dict["color"] = color + if space_group is not UNSET: + field_dict["spaceGroup"] = space_group + if comments is not UNSET: + field_dict["comments"] = comments + if pdb_file_name is not UNSET: + field_dict["pdbFileName"] = pdb_file_name + if pdb_file_path is not UNSET: + field_dict["pdbFilePath"] = pdb_file_path + if abundance is not UNSET: + field_dict["abundance"] = abundance + if theoretical_density is not UNSET: + field_dict["theoreticalDensity"] = theoretical_density + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if crystal_uuid is not UNSET: + field_dict["crystalUUID"] = crystal_uuid + if size_x is not UNSET: + field_dict["sizeX"] = size_x + if size_y is not UNSET: + field_dict["sizeY"] = size_y + if size_z is not UNSET: + field_dict["sizeZ"] = size_z + if cell_a is not UNSET: + field_dict["cellA"] = cell_a + if cell_b is not UNSET: + field_dict["cellB"] = cell_b + if cell_c is not UNSET: + field_dict["cellC"] = cell_c + if cell_alpha is not UNSET: + field_dict["cellAlpha"] = cell_alpha + if cell_beta is not UNSET: + field_dict["cellBeta"] = cell_beta + if cell_gamma is not UNSET: + field_dict["cellGamma"] = cell_gamma + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + crystal_id = d.pop("crystalId") + + record_time_stamp = datetime.datetime.fromisoformat(d.pop("recordTimeStamp")) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_morphology(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + morphology = _parse_morphology(d.pop("morphology", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + space_group = _parse_space_group(d.pop("spaceGroup", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_pdb_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_name = _parse_pdb_file_name(d.pop("pdbFileName", UNSET)) + + def _parse_pdb_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_path = _parse_pdb_file_path(d.pop("pdbFilePath", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_theoretical_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + theoretical_density = _parse_theoretical_density(d.pop("theoreticalDensity", UNSET)) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_crystal_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_uuid = _parse_crystal_uuid(d.pop("crystalUUID", UNSET)) + + def _parse_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + def _parse_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_y = _parse_size_y(d.pop("sizeY", UNSET)) + + def _parse_size_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_z = _parse_size_z(d.pop("sizeZ", UNSET)) + + def _parse_cell_a(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_a = _parse_cell_a(d.pop("cellA", UNSET)) + + def _parse_cell_b(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_b = _parse_cell_b(d.pop("cellB", UNSET)) + + def _parse_cell_c(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_c = _parse_cell_c(d.pop("cellC", UNSET)) + + def _parse_cell_alpha(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_alpha = _parse_cell_alpha(d.pop("cellAlpha", UNSET)) + + def _parse_cell_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_beta = _parse_cell_beta(d.pop("cellBeta", UNSET)) + + def _parse_cell_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_gamma = _parse_cell_gamma(d.pop("cellGamma", UNSET)) + + crystal_out = cls( + crystal_id=crystal_id, + record_time_stamp=record_time_stamp, + name=name, + morphology=morphology, + color=color, + space_group=space_group, + comments=comments, + pdb_file_name=pdb_file_name, + pdb_file_path=pdb_file_path, + abundance=abundance, + theoretical_density=theoretical_density, + diffraction_plan_id=diffraction_plan_id, + crystal_uuid=crystal_uuid, + size_x=size_x, + size_y=size_y, + size_z=size_z, + cell_a=cell_a, + cell_b=cell_b, + cell_c=cell_c, + cell_alpha=cell_alpha, + cell_beta=cell_beta, + cell_gamma=cell_gamma, + ) + + crystal_out.additional_properties = d + return crystal_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/crystal_with_protein.py b/src/lims_utils/expeye_client/models/crystal_with_protein.py new file mode 100644 index 0000000..0071156 --- /dev/null +++ b/src/lims_utils/expeye_client/models/crystal_with_protein.py @@ -0,0 +1,481 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CrystalWithProtein") + + +@_attrs_define +class CrystalWithProtein: + """Crystal input model including protein reference + + Attributes: + protein_id (int): + name (None | str | Unset): + morphology (None | str | Unset): + color (None | str | Unset): + space_group (None | str | Unset): + comments (None | str | Unset): + pdb_file_name (None | str | Unset): + pdb_file_path (None | str | Unset): + abundance (float | None | Unset): + theoretical_density (float | None | Unset): + diffraction_plan_id (int | None | Unset): + crystal_uuid (None | str | Unset): + size_x (float | None | Unset): + size_y (float | None | Unset): + size_z (float | None | Unset): + cell_a (float | None | Unset): + cell_b (float | None | Unset): + cell_c (float | None | Unset): + cell_alpha (float | None | Unset): + cell_beta (float | None | Unset): + cell_gamma (float | None | Unset): + record_time_stamp (datetime.datetime | Unset): + """ + + protein_id: int + name: None | str | Unset = UNSET + morphology: None | str | Unset = UNSET + color: None | str | Unset = UNSET + space_group: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + pdb_file_name: None | str | Unset = UNSET + pdb_file_path: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + theoretical_density: float | None | Unset = UNSET + diffraction_plan_id: int | None | Unset = UNSET + crystal_uuid: None | str | Unset = UNSET + size_x: float | None | Unset = UNSET + size_y: float | None | Unset = UNSET + size_z: float | None | Unset = UNSET + cell_a: float | None | Unset = UNSET + cell_b: float | None | Unset = UNSET + cell_c: float | None | Unset = UNSET + cell_alpha: float | None | Unset = UNSET + cell_beta: float | None | Unset = UNSET + cell_gamma: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + protein_id = self.protein_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + morphology: None | str | Unset + if isinstance(self.morphology, Unset): + morphology = UNSET + else: + morphology = self.morphology + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + space_group: None | str | Unset + if isinstance(self.space_group, Unset): + space_group = UNSET + else: + space_group = self.space_group + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + pdb_file_name: None | str | Unset + if isinstance(self.pdb_file_name, Unset): + pdb_file_name = UNSET + else: + pdb_file_name = self.pdb_file_name + + pdb_file_path: None | str | Unset + if isinstance(self.pdb_file_path, Unset): + pdb_file_path = UNSET + else: + pdb_file_path = self.pdb_file_path + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + theoretical_density: float | None | Unset + if isinstance(self.theoretical_density, Unset): + theoretical_density = UNSET + else: + theoretical_density = self.theoretical_density + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + crystal_uuid: None | str | Unset + if isinstance(self.crystal_uuid, Unset): + crystal_uuid = UNSET + else: + crystal_uuid = self.crystal_uuid + + size_x: float | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + size_y: float | None | Unset + if isinstance(self.size_y, Unset): + size_y = UNSET + else: + size_y = self.size_y + + size_z: float | None | Unset + if isinstance(self.size_z, Unset): + size_z = UNSET + else: + size_z = self.size_z + + cell_a: float | None | Unset + if isinstance(self.cell_a, Unset): + cell_a = UNSET + else: + cell_a = self.cell_a + + cell_b: float | None | Unset + if isinstance(self.cell_b, Unset): + cell_b = UNSET + else: + cell_b = self.cell_b + + cell_c: float | None | Unset + if isinstance(self.cell_c, Unset): + cell_c = UNSET + else: + cell_c = self.cell_c + + cell_alpha: float | None | Unset + if isinstance(self.cell_alpha, Unset): + cell_alpha = UNSET + else: + cell_alpha = self.cell_alpha + + cell_beta: float | None | Unset + if isinstance(self.cell_beta, Unset): + cell_beta = UNSET + else: + cell_beta = self.cell_beta + + cell_gamma: float | None | Unset + if isinstance(self.cell_gamma, Unset): + cell_gamma = UNSET + else: + cell_gamma = self.cell_gamma + + record_time_stamp: str | Unset = UNSET + if not isinstance(self.record_time_stamp, Unset): + record_time_stamp = self.record_time_stamp.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "proteinId": protein_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if morphology is not UNSET: + field_dict["morphology"] = morphology + if color is not UNSET: + field_dict["color"] = color + if space_group is not UNSET: + field_dict["spaceGroup"] = space_group + if comments is not UNSET: + field_dict["comments"] = comments + if pdb_file_name is not UNSET: + field_dict["pdbFileName"] = pdb_file_name + if pdb_file_path is not UNSET: + field_dict["pdbFilePath"] = pdb_file_path + if abundance is not UNSET: + field_dict["abundance"] = abundance + if theoretical_density is not UNSET: + field_dict["theoreticalDensity"] = theoretical_density + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if crystal_uuid is not UNSET: + field_dict["crystalUUID"] = crystal_uuid + if size_x is not UNSET: + field_dict["sizeX"] = size_x + if size_y is not UNSET: + field_dict["sizeY"] = size_y + if size_z is not UNSET: + field_dict["sizeZ"] = size_z + if cell_a is not UNSET: + field_dict["cellA"] = cell_a + if cell_b is not UNSET: + field_dict["cellB"] = cell_b + if cell_c is not UNSET: + field_dict["cellC"] = cell_c + if cell_alpha is not UNSET: + field_dict["cellAlpha"] = cell_alpha + if cell_beta is not UNSET: + field_dict["cellBeta"] = cell_beta + if cell_gamma is not UNSET: + field_dict["cellGamma"] = cell_gamma + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + protein_id = d.pop("proteinId") + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_morphology(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + morphology = _parse_morphology(d.pop("morphology", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + def _parse_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + space_group = _parse_space_group(d.pop("spaceGroup", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_pdb_file_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_name = _parse_pdb_file_name(d.pop("pdbFileName", UNSET)) + + def _parse_pdb_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pdb_file_path = _parse_pdb_file_path(d.pop("pdbFilePath", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_theoretical_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + theoretical_density = _parse_theoretical_density(d.pop("theoreticalDensity", UNSET)) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_crystal_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_uuid = _parse_crystal_uuid(d.pop("crystalUUID", UNSET)) + + def _parse_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + def _parse_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_y = _parse_size_y(d.pop("sizeY", UNSET)) + + def _parse_size_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + size_z = _parse_size_z(d.pop("sizeZ", UNSET)) + + def _parse_cell_a(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_a = _parse_cell_a(d.pop("cellA", UNSET)) + + def _parse_cell_b(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_b = _parse_cell_b(d.pop("cellB", UNSET)) + + def _parse_cell_c(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_c = _parse_cell_c(d.pop("cellC", UNSET)) + + def _parse_cell_alpha(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_alpha = _parse_cell_alpha(d.pop("cellAlpha", UNSET)) + + def _parse_cell_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_beta = _parse_cell_beta(d.pop("cellBeta", UNSET)) + + def _parse_cell_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cell_gamma = _parse_cell_gamma(d.pop("cellGamma", UNSET)) + + _record_time_stamp = d.pop("recordTimeStamp", UNSET) + record_time_stamp: datetime.datetime | Unset + if isinstance(_record_time_stamp, Unset): + record_time_stamp = UNSET + else: + record_time_stamp = datetime.datetime.fromisoformat(_record_time_stamp) + + crystal_with_protein = cls( + protein_id=protein_id, + name=name, + morphology=morphology, + color=color, + space_group=space_group, + comments=comments, + pdb_file_name=pdb_file_name, + pdb_file_path=pdb_file_path, + abundance=abundance, + theoretical_density=theoretical_density, + diffraction_plan_id=diffraction_plan_id, + crystal_uuid=crystal_uuid, + size_x=size_x, + size_y=size_y, + size_z=size_z, + cell_a=cell_a, + cell_b=cell_b, + cell_c=cell_c, + cell_alpha=cell_alpha, + cell_beta=cell_beta, + cell_gamma=cell_gamma, + record_time_stamp=record_time_stamp, + ) + + crystal_with_protein.additional_properties = d + return crystal_with_protein + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/ctf_base.py b/src/lims_utils/expeye_client/models/ctf_base.py new file mode 100644 index 0000000..9df93d2 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ctf_base.py @@ -0,0 +1,374 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CTFBase") + + +@_attrs_define +class CTFBase: + """ + Attributes: + auto_proc_program_id (int | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + min_resolution (float | None | Unset): + max_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + defocus_step_size (float | None | Unset): + astigmatism (float | None | Unset): + astigmatism_angle (float | None | Unset): + estimated_resolution (float | None | Unset): + estimated_defocus (float | None | Unset): + amplitude_contrast (float | None | Unset): + cc_value (float | None | Unset): + fft_theoretical_full_path (None | str | Unset): + comments (None | str | Unset): + ice_ring_density (float | None | Unset): + """ + + auto_proc_program_id: int | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + max_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + defocus_step_size: float | None | Unset = UNSET + astigmatism: float | None | Unset = UNSET + astigmatism_angle: float | None | Unset = UNSET + estimated_resolution: float | None | Unset = UNSET + estimated_defocus: float | None | Unset = UNSET + amplitude_contrast: float | None | Unset = UNSET + cc_value: float | None | Unset = UNSET + fft_theoretical_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + ice_ring_density: float | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_id: int | None | Unset + if isinstance(self.auto_proc_program_id, Unset): + auto_proc_program_id = UNSET + else: + auto_proc_program_id = self.auto_proc_program_id + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + max_resolution: float | None | Unset + if isinstance(self.max_resolution, Unset): + max_resolution = UNSET + else: + max_resolution = self.max_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + defocus_step_size: float | None | Unset + if isinstance(self.defocus_step_size, Unset): + defocus_step_size = UNSET + else: + defocus_step_size = self.defocus_step_size + + astigmatism: float | None | Unset + if isinstance(self.astigmatism, Unset): + astigmatism = UNSET + else: + astigmatism = self.astigmatism + + astigmatism_angle: float | None | Unset + if isinstance(self.astigmatism_angle, Unset): + astigmatism_angle = UNSET + else: + astigmatism_angle = self.astigmatism_angle + + estimated_resolution: float | None | Unset + if isinstance(self.estimated_resolution, Unset): + estimated_resolution = UNSET + else: + estimated_resolution = self.estimated_resolution + + estimated_defocus: float | None | Unset + if isinstance(self.estimated_defocus, Unset): + estimated_defocus = UNSET + else: + estimated_defocus = self.estimated_defocus + + amplitude_contrast: float | None | Unset + if isinstance(self.amplitude_contrast, Unset): + amplitude_contrast = UNSET + else: + amplitude_contrast = self.amplitude_contrast + + cc_value: float | None | Unset + if isinstance(self.cc_value, Unset): + cc_value = UNSET + else: + cc_value = self.cc_value + + fft_theoretical_full_path: None | str | Unset + if isinstance(self.fft_theoretical_full_path, Unset): + fft_theoretical_full_path = UNSET + else: + fft_theoretical_full_path = self.fft_theoretical_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + ice_ring_density: float | None | Unset + if isinstance(self.ice_ring_density, Unset): + ice_ring_density = UNSET + else: + ice_ring_density = self.ice_ring_density + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if auto_proc_program_id is not UNSET: + field_dict["autoProcProgramId"] = auto_proc_program_id + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if max_resolution is not UNSET: + field_dict["maxResolution"] = max_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if defocus_step_size is not UNSET: + field_dict["defocusStepSize"] = defocus_step_size + if astigmatism is not UNSET: + field_dict["astigmatism"] = astigmatism + if astigmatism_angle is not UNSET: + field_dict["astigmatismAngle"] = astigmatism_angle + if estimated_resolution is not UNSET: + field_dict["estimatedResolution"] = estimated_resolution + if estimated_defocus is not UNSET: + field_dict["estimatedDefocus"] = estimated_defocus + if amplitude_contrast is not UNSET: + field_dict["amplitudeContrast"] = amplitude_contrast + if cc_value is not UNSET: + field_dict["ccValue"] = cc_value + if fft_theoretical_full_path is not UNSET: + field_dict["fftTheoreticalFullPath"] = fft_theoretical_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if ice_ring_density is not UNSET: + field_dict["iceRingDensity"] = ice_ring_density + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_proc_program_id = _parse_auto_proc_program_id(d.pop("autoProcProgramId", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_max_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_resolution = _parse_max_resolution(d.pop("maxResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_defocus_step_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_step_size = _parse_defocus_step_size(d.pop("defocusStepSize", UNSET)) + + def _parse_astigmatism(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism = _parse_astigmatism(d.pop("astigmatism", UNSET)) + + def _parse_astigmatism_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism_angle = _parse_astigmatism_angle(d.pop("astigmatismAngle", UNSET)) + + def _parse_estimated_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_resolution = _parse_estimated_resolution(d.pop("estimatedResolution", UNSET)) + + def _parse_estimated_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_defocus = _parse_estimated_defocus(d.pop("estimatedDefocus", UNSET)) + + def _parse_amplitude_contrast(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + amplitude_contrast = _parse_amplitude_contrast(d.pop("amplitudeContrast", UNSET)) + + def _parse_cc_value(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_value = _parse_cc_value(d.pop("ccValue", UNSET)) + + def _parse_fft_theoretical_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_theoretical_full_path = _parse_fft_theoretical_full_path(d.pop("fftTheoreticalFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_ice_ring_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + ice_ring_density = _parse_ice_ring_density(d.pop("iceRingDensity", UNSET)) + + ctf_base = cls( + auto_proc_program_id=auto_proc_program_id, + box_size_x=box_size_x, + box_size_y=box_size_y, + min_resolution=min_resolution, + max_resolution=max_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + defocus_step_size=defocus_step_size, + astigmatism=astigmatism, + astigmatism_angle=astigmatism_angle, + estimated_resolution=estimated_resolution, + estimated_defocus=estimated_defocus, + amplitude_contrast=amplitude_contrast, + cc_value=cc_value, + fft_theoretical_full_path=fft_theoretical_full_path, + comments=comments, + ice_ring_density=ice_ring_density, + ) + + return ctf_base diff --git a/src/lims_utils/expeye_client/models/ctf_in.py b/src/lims_utils/expeye_client/models/ctf_in.py new file mode 100644 index 0000000..66df629 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ctf_in.py @@ -0,0 +1,374 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CTFIn") + + +@_attrs_define +class CTFIn: + """ + Attributes: + auto_proc_program_id (int | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + min_resolution (float | None | Unset): + max_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + defocus_step_size (float | None | Unset): + astigmatism (float | None | Unset): + astigmatism_angle (float | None | Unset): + estimated_resolution (float | None | Unset): + estimated_defocus (float | None | Unset): + amplitude_contrast (float | None | Unset): + cc_value (float | None | Unset): + fft_theoretical_full_path (None | str | Unset): + comments (None | str | Unset): + ice_ring_density (float | None | Unset): + """ + + auto_proc_program_id: int | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + max_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + defocus_step_size: float | None | Unset = UNSET + astigmatism: float | None | Unset = UNSET + astigmatism_angle: float | None | Unset = UNSET + estimated_resolution: float | None | Unset = UNSET + estimated_defocus: float | None | Unset = UNSET + amplitude_contrast: float | None | Unset = UNSET + cc_value: float | None | Unset = UNSET + fft_theoretical_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + ice_ring_density: float | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_id: int | None | Unset + if isinstance(self.auto_proc_program_id, Unset): + auto_proc_program_id = UNSET + else: + auto_proc_program_id = self.auto_proc_program_id + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + max_resolution: float | None | Unset + if isinstance(self.max_resolution, Unset): + max_resolution = UNSET + else: + max_resolution = self.max_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + defocus_step_size: float | None | Unset + if isinstance(self.defocus_step_size, Unset): + defocus_step_size = UNSET + else: + defocus_step_size = self.defocus_step_size + + astigmatism: float | None | Unset + if isinstance(self.astigmatism, Unset): + astigmatism = UNSET + else: + astigmatism = self.astigmatism + + astigmatism_angle: float | None | Unset + if isinstance(self.astigmatism_angle, Unset): + astigmatism_angle = UNSET + else: + astigmatism_angle = self.astigmatism_angle + + estimated_resolution: float | None | Unset + if isinstance(self.estimated_resolution, Unset): + estimated_resolution = UNSET + else: + estimated_resolution = self.estimated_resolution + + estimated_defocus: float | None | Unset + if isinstance(self.estimated_defocus, Unset): + estimated_defocus = UNSET + else: + estimated_defocus = self.estimated_defocus + + amplitude_contrast: float | None | Unset + if isinstance(self.amplitude_contrast, Unset): + amplitude_contrast = UNSET + else: + amplitude_contrast = self.amplitude_contrast + + cc_value: float | None | Unset + if isinstance(self.cc_value, Unset): + cc_value = UNSET + else: + cc_value = self.cc_value + + fft_theoretical_full_path: None | str | Unset + if isinstance(self.fft_theoretical_full_path, Unset): + fft_theoretical_full_path = UNSET + else: + fft_theoretical_full_path = self.fft_theoretical_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + ice_ring_density: float | None | Unset + if isinstance(self.ice_ring_density, Unset): + ice_ring_density = UNSET + else: + ice_ring_density = self.ice_ring_density + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if auto_proc_program_id is not UNSET: + field_dict["autoProcProgramId"] = auto_proc_program_id + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if max_resolution is not UNSET: + field_dict["maxResolution"] = max_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if defocus_step_size is not UNSET: + field_dict["defocusStepSize"] = defocus_step_size + if astigmatism is not UNSET: + field_dict["astigmatism"] = astigmatism + if astigmatism_angle is not UNSET: + field_dict["astigmatismAngle"] = astigmatism_angle + if estimated_resolution is not UNSET: + field_dict["estimatedResolution"] = estimated_resolution + if estimated_defocus is not UNSET: + field_dict["estimatedDefocus"] = estimated_defocus + if amplitude_contrast is not UNSET: + field_dict["amplitudeContrast"] = amplitude_contrast + if cc_value is not UNSET: + field_dict["ccValue"] = cc_value + if fft_theoretical_full_path is not UNSET: + field_dict["fftTheoreticalFullPath"] = fft_theoretical_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if ice_ring_density is not UNSET: + field_dict["iceRingDensity"] = ice_ring_density + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_proc_program_id = _parse_auto_proc_program_id(d.pop("autoProcProgramId", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_max_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_resolution = _parse_max_resolution(d.pop("maxResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_defocus_step_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_step_size = _parse_defocus_step_size(d.pop("defocusStepSize", UNSET)) + + def _parse_astigmatism(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism = _parse_astigmatism(d.pop("astigmatism", UNSET)) + + def _parse_astigmatism_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism_angle = _parse_astigmatism_angle(d.pop("astigmatismAngle", UNSET)) + + def _parse_estimated_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_resolution = _parse_estimated_resolution(d.pop("estimatedResolution", UNSET)) + + def _parse_estimated_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_defocus = _parse_estimated_defocus(d.pop("estimatedDefocus", UNSET)) + + def _parse_amplitude_contrast(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + amplitude_contrast = _parse_amplitude_contrast(d.pop("amplitudeContrast", UNSET)) + + def _parse_cc_value(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_value = _parse_cc_value(d.pop("ccValue", UNSET)) + + def _parse_fft_theoretical_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_theoretical_full_path = _parse_fft_theoretical_full_path(d.pop("fftTheoreticalFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_ice_ring_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + ice_ring_density = _parse_ice_ring_density(d.pop("iceRingDensity", UNSET)) + + ctf_in = cls( + auto_proc_program_id=auto_proc_program_id, + box_size_x=box_size_x, + box_size_y=box_size_y, + min_resolution=min_resolution, + max_resolution=max_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + defocus_step_size=defocus_step_size, + astigmatism=astigmatism, + astigmatism_angle=astigmatism_angle, + estimated_resolution=estimated_resolution, + estimated_defocus=estimated_defocus, + amplitude_contrast=amplitude_contrast, + cc_value=cc_value, + fft_theoretical_full_path=fft_theoretical_full_path, + comments=comments, + ice_ring_density=ice_ring_density, + ) + + return ctf_in diff --git a/src/lims_utils/expeye_client/models/ctf_optional.py b/src/lims_utils/expeye_client/models/ctf_optional.py new file mode 100644 index 0000000..b2e4569 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ctf_optional.py @@ -0,0 +1,394 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CTFOptional") + + +@_attrs_define +class CTFOptional: + """ + Attributes: + auto_proc_program_id (int | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + min_resolution (float | None | Unset): + max_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + defocus_step_size (float | None | Unset): + astigmatism (float | None | Unset): + astigmatism_angle (float | None | Unset): + estimated_resolution (float | None | Unset): + estimated_defocus (float | None | Unset): + amplitude_contrast (float | None | Unset): + cc_value (float | None | Unset): + fft_theoretical_full_path (None | str | Unset): + comments (None | str | Unset): + ice_ring_density (float | None | Unset): + motion_correction_id (int | None | Unset): + """ + + auto_proc_program_id: int | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + max_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + defocus_step_size: float | None | Unset = UNSET + astigmatism: float | None | Unset = UNSET + astigmatism_angle: float | None | Unset = UNSET + estimated_resolution: float | None | Unset = UNSET + estimated_defocus: float | None | Unset = UNSET + amplitude_contrast: float | None | Unset = UNSET + cc_value: float | None | Unset = UNSET + fft_theoretical_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + ice_ring_density: float | None | Unset = UNSET + motion_correction_id: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_id: int | None | Unset + if isinstance(self.auto_proc_program_id, Unset): + auto_proc_program_id = UNSET + else: + auto_proc_program_id = self.auto_proc_program_id + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + max_resolution: float | None | Unset + if isinstance(self.max_resolution, Unset): + max_resolution = UNSET + else: + max_resolution = self.max_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + defocus_step_size: float | None | Unset + if isinstance(self.defocus_step_size, Unset): + defocus_step_size = UNSET + else: + defocus_step_size = self.defocus_step_size + + astigmatism: float | None | Unset + if isinstance(self.astigmatism, Unset): + astigmatism = UNSET + else: + astigmatism = self.astigmatism + + astigmatism_angle: float | None | Unset + if isinstance(self.astigmatism_angle, Unset): + astigmatism_angle = UNSET + else: + astigmatism_angle = self.astigmatism_angle + + estimated_resolution: float | None | Unset + if isinstance(self.estimated_resolution, Unset): + estimated_resolution = UNSET + else: + estimated_resolution = self.estimated_resolution + + estimated_defocus: float | None | Unset + if isinstance(self.estimated_defocus, Unset): + estimated_defocus = UNSET + else: + estimated_defocus = self.estimated_defocus + + amplitude_contrast: float | None | Unset + if isinstance(self.amplitude_contrast, Unset): + amplitude_contrast = UNSET + else: + amplitude_contrast = self.amplitude_contrast + + cc_value: float | None | Unset + if isinstance(self.cc_value, Unset): + cc_value = UNSET + else: + cc_value = self.cc_value + + fft_theoretical_full_path: None | str | Unset + if isinstance(self.fft_theoretical_full_path, Unset): + fft_theoretical_full_path = UNSET + else: + fft_theoretical_full_path = self.fft_theoretical_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + ice_ring_density: float | None | Unset + if isinstance(self.ice_ring_density, Unset): + ice_ring_density = UNSET + else: + ice_ring_density = self.ice_ring_density + + motion_correction_id: int | None | Unset + if isinstance(self.motion_correction_id, Unset): + motion_correction_id = UNSET + else: + motion_correction_id = self.motion_correction_id + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if auto_proc_program_id is not UNSET: + field_dict["autoProcProgramId"] = auto_proc_program_id + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if max_resolution is not UNSET: + field_dict["maxResolution"] = max_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if defocus_step_size is not UNSET: + field_dict["defocusStepSize"] = defocus_step_size + if astigmatism is not UNSET: + field_dict["astigmatism"] = astigmatism + if astigmatism_angle is not UNSET: + field_dict["astigmatismAngle"] = astigmatism_angle + if estimated_resolution is not UNSET: + field_dict["estimatedResolution"] = estimated_resolution + if estimated_defocus is not UNSET: + field_dict["estimatedDefocus"] = estimated_defocus + if amplitude_contrast is not UNSET: + field_dict["amplitudeContrast"] = amplitude_contrast + if cc_value is not UNSET: + field_dict["ccValue"] = cc_value + if fft_theoretical_full_path is not UNSET: + field_dict["fftTheoreticalFullPath"] = fft_theoretical_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if ice_ring_density is not UNSET: + field_dict["iceRingDensity"] = ice_ring_density + if motion_correction_id is not UNSET: + field_dict["motionCorrectionId"] = motion_correction_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_proc_program_id = _parse_auto_proc_program_id(d.pop("autoProcProgramId", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_max_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_resolution = _parse_max_resolution(d.pop("maxResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_defocus_step_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_step_size = _parse_defocus_step_size(d.pop("defocusStepSize", UNSET)) + + def _parse_astigmatism(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism = _parse_astigmatism(d.pop("astigmatism", UNSET)) + + def _parse_astigmatism_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism_angle = _parse_astigmatism_angle(d.pop("astigmatismAngle", UNSET)) + + def _parse_estimated_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_resolution = _parse_estimated_resolution(d.pop("estimatedResolution", UNSET)) + + def _parse_estimated_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_defocus = _parse_estimated_defocus(d.pop("estimatedDefocus", UNSET)) + + def _parse_amplitude_contrast(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + amplitude_contrast = _parse_amplitude_contrast(d.pop("amplitudeContrast", UNSET)) + + def _parse_cc_value(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_value = _parse_cc_value(d.pop("ccValue", UNSET)) + + def _parse_fft_theoretical_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_theoretical_full_path = _parse_fft_theoretical_full_path(d.pop("fftTheoreticalFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_ice_ring_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + ice_ring_density = _parse_ice_ring_density(d.pop("iceRingDensity", UNSET)) + + def _parse_motion_correction_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + motion_correction_id = _parse_motion_correction_id(d.pop("motionCorrectionId", UNSET)) + + ctf_optional = cls( + auto_proc_program_id=auto_proc_program_id, + box_size_x=box_size_x, + box_size_y=box_size_y, + min_resolution=min_resolution, + max_resolution=max_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + defocus_step_size=defocus_step_size, + astigmatism=astigmatism, + astigmatism_angle=astigmatism_angle, + estimated_resolution=estimated_resolution, + estimated_defocus=estimated_defocus, + amplitude_contrast=amplitude_contrast, + cc_value=cc_value, + fft_theoretical_full_path=fft_theoretical_full_path, + comments=comments, + ice_ring_density=ice_ring_density, + motion_correction_id=motion_correction_id, + ) + + return ctf_optional diff --git a/src/lims_utils/expeye_client/models/ctf_out.py b/src/lims_utils/expeye_client/models/ctf_out.py new file mode 100644 index 0000000..3510e63 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ctf_out.py @@ -0,0 +1,424 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CTFOut") + + +@_attrs_define +class CTFOut: + """ + Attributes: + ctf_id (int): + auto_proc_program_id (int | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + min_resolution (float | None | Unset): + max_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + defocus_step_size (float | None | Unset): + astigmatism (float | None | Unset): + astigmatism_angle (float | None | Unset): + estimated_resolution (float | None | Unset): + estimated_defocus (float | None | Unset): + amplitude_contrast (float | None | Unset): + cc_value (float | None | Unset): + fft_theoretical_full_path (None | str | Unset): + comments (None | str | Unset): + ice_ring_density (float | None | Unset): + motion_correction_id (int | None | Unset): + number_of_particles (int | None | Unset): + """ + + ctf_id: int + auto_proc_program_id: int | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + max_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + defocus_step_size: float | None | Unset = UNSET + astigmatism: float | None | Unset = UNSET + astigmatism_angle: float | None | Unset = UNSET + estimated_resolution: float | None | Unset = UNSET + estimated_defocus: float | None | Unset = UNSET + amplitude_contrast: float | None | Unset = UNSET + cc_value: float | None | Unset = UNSET + fft_theoretical_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + ice_ring_density: float | None | Unset = UNSET + motion_correction_id: int | None | Unset = UNSET + number_of_particles: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + ctf_id = self.ctf_id + + auto_proc_program_id: int | None | Unset + if isinstance(self.auto_proc_program_id, Unset): + auto_proc_program_id = UNSET + else: + auto_proc_program_id = self.auto_proc_program_id + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + max_resolution: float | None | Unset + if isinstance(self.max_resolution, Unset): + max_resolution = UNSET + else: + max_resolution = self.max_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + defocus_step_size: float | None | Unset + if isinstance(self.defocus_step_size, Unset): + defocus_step_size = UNSET + else: + defocus_step_size = self.defocus_step_size + + astigmatism: float | None | Unset + if isinstance(self.astigmatism, Unset): + astigmatism = UNSET + else: + astigmatism = self.astigmatism + + astigmatism_angle: float | None | Unset + if isinstance(self.astigmatism_angle, Unset): + astigmatism_angle = UNSET + else: + astigmatism_angle = self.astigmatism_angle + + estimated_resolution: float | None | Unset + if isinstance(self.estimated_resolution, Unset): + estimated_resolution = UNSET + else: + estimated_resolution = self.estimated_resolution + + estimated_defocus: float | None | Unset + if isinstance(self.estimated_defocus, Unset): + estimated_defocus = UNSET + else: + estimated_defocus = self.estimated_defocus + + amplitude_contrast: float | None | Unset + if isinstance(self.amplitude_contrast, Unset): + amplitude_contrast = UNSET + else: + amplitude_contrast = self.amplitude_contrast + + cc_value: float | None | Unset + if isinstance(self.cc_value, Unset): + cc_value = UNSET + else: + cc_value = self.cc_value + + fft_theoretical_full_path: None | str | Unset + if isinstance(self.fft_theoretical_full_path, Unset): + fft_theoretical_full_path = UNSET + else: + fft_theoretical_full_path = self.fft_theoretical_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + ice_ring_density: float | None | Unset + if isinstance(self.ice_ring_density, Unset): + ice_ring_density = UNSET + else: + ice_ring_density = self.ice_ring_density + + motion_correction_id: int | None | Unset + if isinstance(self.motion_correction_id, Unset): + motion_correction_id = UNSET + else: + motion_correction_id = self.motion_correction_id + + number_of_particles: int | None | Unset + if isinstance(self.number_of_particles, Unset): + number_of_particles = UNSET + else: + number_of_particles = self.number_of_particles + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "ctfId": ctf_id, + } + ) + if auto_proc_program_id is not UNSET: + field_dict["autoProcProgramId"] = auto_proc_program_id + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if max_resolution is not UNSET: + field_dict["maxResolution"] = max_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if defocus_step_size is not UNSET: + field_dict["defocusStepSize"] = defocus_step_size + if astigmatism is not UNSET: + field_dict["astigmatism"] = astigmatism + if astigmatism_angle is not UNSET: + field_dict["astigmatismAngle"] = astigmatism_angle + if estimated_resolution is not UNSET: + field_dict["estimatedResolution"] = estimated_resolution + if estimated_defocus is not UNSET: + field_dict["estimatedDefocus"] = estimated_defocus + if amplitude_contrast is not UNSET: + field_dict["amplitudeContrast"] = amplitude_contrast + if cc_value is not UNSET: + field_dict["ccValue"] = cc_value + if fft_theoretical_full_path is not UNSET: + field_dict["fftTheoreticalFullPath"] = fft_theoretical_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if ice_ring_density is not UNSET: + field_dict["iceRingDensity"] = ice_ring_density + if motion_correction_id is not UNSET: + field_dict["motionCorrectionId"] = motion_correction_id + if number_of_particles is not UNSET: + field_dict["numberOfParticles"] = number_of_particles + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ctf_id = d.pop("ctfId") + + def _parse_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_proc_program_id = _parse_auto_proc_program_id(d.pop("autoProcProgramId", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_max_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_resolution = _parse_max_resolution(d.pop("maxResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_defocus_step_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_step_size = _parse_defocus_step_size(d.pop("defocusStepSize", UNSET)) + + def _parse_astigmatism(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism = _parse_astigmatism(d.pop("astigmatism", UNSET)) + + def _parse_astigmatism_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism_angle = _parse_astigmatism_angle(d.pop("astigmatismAngle", UNSET)) + + def _parse_estimated_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_resolution = _parse_estimated_resolution(d.pop("estimatedResolution", UNSET)) + + def _parse_estimated_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + estimated_defocus = _parse_estimated_defocus(d.pop("estimatedDefocus", UNSET)) + + def _parse_amplitude_contrast(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + amplitude_contrast = _parse_amplitude_contrast(d.pop("amplitudeContrast", UNSET)) + + def _parse_cc_value(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + cc_value = _parse_cc_value(d.pop("ccValue", UNSET)) + + def _parse_fft_theoretical_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_theoretical_full_path = _parse_fft_theoretical_full_path(d.pop("fftTheoreticalFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_ice_ring_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + ice_ring_density = _parse_ice_ring_density(d.pop("iceRingDensity", UNSET)) + + def _parse_motion_correction_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + motion_correction_id = _parse_motion_correction_id(d.pop("motionCorrectionId", UNSET)) + + def _parse_number_of_particles(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_particles = _parse_number_of_particles(d.pop("numberOfParticles", UNSET)) + + ctf_out = cls( + ctf_id=ctf_id, + auto_proc_program_id=auto_proc_program_id, + box_size_x=box_size_x, + box_size_y=box_size_y, + min_resolution=min_resolution, + max_resolution=max_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + defocus_step_size=defocus_step_size, + astigmatism=astigmatism, + astigmatism_angle=astigmatism_angle, + estimated_resolution=estimated_resolution, + estimated_defocus=estimated_defocus, + amplitude_contrast=amplitude_contrast, + cc_value=cc_value, + fft_theoretical_full_path=fft_theoretical_full_path, + comments=comments, + ice_ring_density=ice_ring_density, + motion_correction_id=motion_correction_id, + number_of_particles=number_of_particles, + ) + + return ctf_out diff --git a/src/lims_utils/expeye_client/models/data_collection_comment_in.py b/src/lims_utils/expeye_client/models/data_collection_comment_in.py new file mode 100644 index 0000000..649a2aa --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_comment_in.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionCommentIn") + + +@_attrs_define +class DataCollectionCommentIn: + """ + Attributes: + comments (str): + mod_time (datetime.datetime | None | Unset): + """ + + comments: str + mod_time: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comments = self.comments + + mod_time: None | str | Unset + if isinstance(self.mod_time, Unset): + mod_time = UNSET + elif isinstance(self.mod_time, datetime.datetime): + mod_time = self.mod_time.isoformat() + else: + mod_time = self.mod_time + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "comments": comments, + } + ) + if mod_time is not UNSET: + field_dict["modTime"] = mod_time + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + comments = d.pop("comments") + + def _parse_mod_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mod_time_type_0 = datetime.datetime.fromisoformat(data) + + return mod_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + mod_time = _parse_mod_time(d.pop("modTime", UNSET)) + + data_collection_comment_in = cls( + comments=comments, + mod_time=mod_time, + ) + + data_collection_comment_in.additional_properties = d + return data_collection_comment_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_comment_optional.py b/src/lims_utils/expeye_client/models/data_collection_comment_optional.py new file mode 100644 index 0000000..c26e590 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_comment_optional.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionCommentOptional") + + +@_attrs_define +class DataCollectionCommentOptional: + """ + Attributes: + comments (str): + mod_time (datetime.datetime | None | Unset): + data_collection_id (int | None | Unset): + """ + + comments: str + mod_time: datetime.datetime | None | Unset = UNSET + data_collection_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comments = self.comments + + mod_time: None | str | Unset + if isinstance(self.mod_time, Unset): + mod_time = UNSET + elif isinstance(self.mod_time, datetime.datetime): + mod_time = self.mod_time.isoformat() + else: + mod_time = self.mod_time + + data_collection_id: int | None | Unset + if isinstance(self.data_collection_id, Unset): + data_collection_id = UNSET + else: + data_collection_id = self.data_collection_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "comments": comments, + } + ) + if mod_time is not UNSET: + field_dict["modTime"] = mod_time + if data_collection_id is not UNSET: + field_dict["dataCollectionId"] = data_collection_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + comments = d.pop("comments") + + def _parse_mod_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mod_time_type_0 = datetime.datetime.fromisoformat(data) + + return mod_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + mod_time = _parse_mod_time(d.pop("modTime", UNSET)) + + def _parse_data_collection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_id = _parse_data_collection_id(d.pop("dataCollectionId", UNSET)) + + data_collection_comment_optional = cls( + comments=comments, + mod_time=mod_time, + data_collection_id=data_collection_id, + ) + + data_collection_comment_optional.additional_properties = d + return data_collection_comment_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_comment_out.py b/src/lims_utils/expeye_client/models/data_collection_comment_out.py new file mode 100644 index 0000000..4967a9f --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_comment_out.py @@ -0,0 +1,198 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionCommentOut") + + +@_attrs_define +class DataCollectionCommentOut: + """ + Attributes: + comments (str): + data_collection_comment_id (int): + create_time (datetime.datetime): + person_id (int): + mod_time (datetime.datetime | None | Unset): + data_collection_id (int | None | Unset): + person_given_name (None | str | Unset): + person_family_name (None | str | Unset): + person_fed_id (None | str | Unset): + """ + + comments: str + data_collection_comment_id: int + create_time: datetime.datetime + person_id: int + mod_time: datetime.datetime | None | Unset = UNSET + data_collection_id: int | None | Unset = UNSET + person_given_name: None | str | Unset = UNSET + person_family_name: None | str | Unset = UNSET + person_fed_id: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comments = self.comments + + data_collection_comment_id = self.data_collection_comment_id + + create_time = self.create_time.isoformat() + + person_id = self.person_id + + mod_time: None | str | Unset + if isinstance(self.mod_time, Unset): + mod_time = UNSET + elif isinstance(self.mod_time, datetime.datetime): + mod_time = self.mod_time.isoformat() + else: + mod_time = self.mod_time + + data_collection_id: int | None | Unset + if isinstance(self.data_collection_id, Unset): + data_collection_id = UNSET + else: + data_collection_id = self.data_collection_id + + person_given_name: None | str | Unset + if isinstance(self.person_given_name, Unset): + person_given_name = UNSET + else: + person_given_name = self.person_given_name + + person_family_name: None | str | Unset + if isinstance(self.person_family_name, Unset): + person_family_name = UNSET + else: + person_family_name = self.person_family_name + + person_fed_id: None | str | Unset + if isinstance(self.person_fed_id, Unset): + person_fed_id = UNSET + else: + person_fed_id = self.person_fed_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "comments": comments, + "dataCollectionCommentId": data_collection_comment_id, + "createTime": create_time, + "personId": person_id, + } + ) + if mod_time is not UNSET: + field_dict["modTime"] = mod_time + if data_collection_id is not UNSET: + field_dict["dataCollectionId"] = data_collection_id + if person_given_name is not UNSET: + field_dict["personGivenName"] = person_given_name + if person_family_name is not UNSET: + field_dict["personFamilyName"] = person_family_name + if person_fed_id is not UNSET: + field_dict["personFedID"] = person_fed_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + comments = d.pop("comments") + + data_collection_comment_id = d.pop("dataCollectionCommentId") + + create_time = datetime.datetime.fromisoformat(d.pop("createTime")) + + person_id = d.pop("personId") + + def _parse_mod_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mod_time_type_0 = datetime.datetime.fromisoformat(data) + + return mod_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + mod_time = _parse_mod_time(d.pop("modTime", UNSET)) + + def _parse_data_collection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_id = _parse_data_collection_id(d.pop("dataCollectionId", UNSET)) + + def _parse_person_given_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + person_given_name = _parse_person_given_name(d.pop("personGivenName", UNSET)) + + def _parse_person_family_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + person_family_name = _parse_person_family_name(d.pop("personFamilyName", UNSET)) + + def _parse_person_fed_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + person_fed_id = _parse_person_fed_id(d.pop("personFedID", UNSET)) + + data_collection_comment_out = cls( + comments=comments, + data_collection_comment_id=data_collection_comment_id, + create_time=create_time, + person_id=person_id, + mod_time=mod_time, + data_collection_id=data_collection_id, + person_given_name=person_given_name, + person_family_name=person_family_name, + person_fed_id=person_fed_id, + ) + + data_collection_comment_out.additional_properties = d + return data_collection_comment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_file_attachment_in.py b/src/lims_utils/expeye_client/models/data_collection_file_attachment_in.py new file mode 100644 index 0000000..e1e63ad --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_file_attachment_in.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.file_attachment_type import FileAttachmentType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionFileAttachmentIn") + + +@_attrs_define +class DataCollectionFileAttachmentIn: + """ + Attributes: + file_full_path (None | str): + file_type (FileAttachmentType | None | Unset): + """ + + file_full_path: None | str + file_type: FileAttachmentType | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file_full_path: None | str + file_full_path = self.file_full_path + + file_type: None | str | Unset + if isinstance(self.file_type, Unset): + file_type = UNSET + elif isinstance(self.file_type, FileAttachmentType): + file_type = self.file_type.value + else: + file_type = self.file_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "fileFullPath": file_full_path, + } + ) + if file_type is not UNSET: + field_dict["fileType"] = file_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_file_full_path(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + file_full_path = _parse_file_full_path(d.pop("fileFullPath")) + + def _parse_file_type(data: object) -> FileAttachmentType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + file_type_type_0 = FileAttachmentType(data) + + return file_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(FileAttachmentType | None | Unset, data) + + file_type = _parse_file_type(d.pop("fileType", UNSET)) + + data_collection_file_attachment_in = cls( + file_full_path=file_full_path, + file_type=file_type, + ) + + data_collection_file_attachment_in.additional_properties = d + return data_collection_file_attachment_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_file_attachment_optional.py b/src/lims_utils/expeye_client/models/data_collection_file_attachment_optional.py new file mode 100644 index 0000000..c875712 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_file_attachment_optional.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.file_attachment_type import FileAttachmentType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionFileAttachmentOptional") + + +@_attrs_define +class DataCollectionFileAttachmentOptional: + """ + Attributes: + file_type (FileAttachmentType | None | Unset): + file_full_path (None | str | Unset): + """ + + file_type: FileAttachmentType | None | Unset = UNSET + file_full_path: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file_type: None | str | Unset + if isinstance(self.file_type, Unset): + file_type = UNSET + elif isinstance(self.file_type, FileAttachmentType): + file_type = self.file_type.value + else: + file_type = self.file_type + + file_full_path: None | str | Unset + if isinstance(self.file_full_path, Unset): + file_full_path = UNSET + else: + file_full_path = self.file_full_path + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_type is not UNSET: + field_dict["fileType"] = file_type + if file_full_path is not UNSET: + field_dict["fileFullPath"] = file_full_path + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_file_type(data: object) -> FileAttachmentType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + file_type_type_0 = FileAttachmentType(data) + + return file_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(FileAttachmentType | None | Unset, data) + + file_type = _parse_file_type(d.pop("fileType", UNSET)) + + def _parse_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_full_path = _parse_file_full_path(d.pop("fileFullPath", UNSET)) + + data_collection_file_attachment_optional = cls( + file_type=file_type, + file_full_path=file_full_path, + ) + + data_collection_file_attachment_optional.additional_properties = d + return data_collection_file_attachment_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_file_attachment_out.py b/src/lims_utils/expeye_client/models/data_collection_file_attachment_out.py new file mode 100644 index 0000000..d046a21 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_file_attachment_out.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.file_attachment_type import FileAttachmentType +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionFileAttachmentOut") + + +@_attrs_define +class DataCollectionFileAttachmentOut: + """ + Attributes: + data_collection_file_attachment_id (int): + data_collection_id (int): + file_full_path (None | str): + create_time (datetime.datetime): + file_type (FileAttachmentType | None | Unset): + """ + + data_collection_file_attachment_id: int + data_collection_id: int + file_full_path: None | str + create_time: datetime.datetime + file_type: FileAttachmentType | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data_collection_file_attachment_id = self.data_collection_file_attachment_id + + data_collection_id = self.data_collection_id + + file_full_path: None | str + file_full_path = self.file_full_path + + create_time = self.create_time.isoformat() + + file_type: None | str | Unset + if isinstance(self.file_type, Unset): + file_type = UNSET + elif isinstance(self.file_type, FileAttachmentType): + file_type = self.file_type.value + else: + file_type = self.file_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataCollectionFileAttachmentId": data_collection_file_attachment_id, + "dataCollectionId": data_collection_id, + "fileFullPath": file_full_path, + "createTime": create_time, + } + ) + if file_type is not UNSET: + field_dict["fileType"] = file_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + data_collection_file_attachment_id = d.pop("dataCollectionFileAttachmentId") + + data_collection_id = d.pop("dataCollectionId") + + def _parse_file_full_path(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + file_full_path = _parse_file_full_path(d.pop("fileFullPath")) + + create_time = datetime.datetime.fromisoformat(d.pop("createTime")) + + def _parse_file_type(data: object) -> FileAttachmentType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + file_type_type_0 = FileAttachmentType(data) + + return file_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(FileAttachmentType | None | Unset, data) + + file_type = _parse_file_type(d.pop("fileType", UNSET)) + + data_collection_file_attachment_out = cls( + data_collection_file_attachment_id=data_collection_file_attachment_id, + data_collection_id=data_collection_id, + file_full_path=file_full_path, + create_time=create_time, + file_type=file_type, + ) + + data_collection_file_attachment_out.additional_properties = d + return data_collection_file_attachment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_group_in.py b/src/lims_utils/expeye_client/models/data_collection_group_in.py new file mode 100644 index 0000000..5f894ae --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_group_in.py @@ -0,0 +1,387 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.data_collection_group_in_experiment_type_type_0 import DataCollectionGroupInExperimentTypeType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionGroupIn") + + +@_attrs_define +class DataCollectionGroupIn: + """ + Attributes: + experiment_type (DataCollectionGroupInExperimentTypeType0 | None | Unset): + experiment_type_id (int | None | Unset): + experiment_type_name (None | str | Unset): + comments (None | str | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + crystal_class (None | str | Unset): + detector_mode (None | str | Unset): + actual_sample_barcode (None | str | Unset): + actual_sample_slot_in_container (int | None | Unset): + actual_container_barcode (None | str | Unset): + actual_sample_slot_in_sc (int | None | Unset): + xtal_snapshot_full_path (None | str | Unset): + scan_parameters (None | str | Unset): + sample_id (int | None | Unset): + """ + + experiment_type: DataCollectionGroupInExperimentTypeType0 | None | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + experiment_type_name: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + crystal_class: None | str | Unset = UNSET + detector_mode: None | str | Unset = UNSET + actual_sample_barcode: None | str | Unset = UNSET + actual_sample_slot_in_container: int | None | Unset = UNSET + actual_container_barcode: None | str | Unset = UNSET + actual_sample_slot_in_sc: int | None | Unset = UNSET + xtal_snapshot_full_path: None | str | Unset = UNSET + scan_parameters: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_type: None | str | Unset + if isinstance(self.experiment_type, Unset): + experiment_type = UNSET + elif isinstance(self.experiment_type, DataCollectionGroupInExperimentTypeType0): + experiment_type = self.experiment_type.value + else: + experiment_type = self.experiment_type + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + experiment_type_name: None | str | Unset + if isinstance(self.experiment_type_name, Unset): + experiment_type_name = UNSET + else: + experiment_type_name = self.experiment_type_name + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + crystal_class: None | str | Unset + if isinstance(self.crystal_class, Unset): + crystal_class = UNSET + else: + crystal_class = self.crystal_class + + detector_mode: None | str | Unset + if isinstance(self.detector_mode, Unset): + detector_mode = UNSET + else: + detector_mode = self.detector_mode + + actual_sample_barcode: None | str | Unset + if isinstance(self.actual_sample_barcode, Unset): + actual_sample_barcode = UNSET + else: + actual_sample_barcode = self.actual_sample_barcode + + actual_sample_slot_in_container: int | None | Unset + if isinstance(self.actual_sample_slot_in_container, Unset): + actual_sample_slot_in_container = UNSET + else: + actual_sample_slot_in_container = self.actual_sample_slot_in_container + + actual_container_barcode: None | str | Unset + if isinstance(self.actual_container_barcode, Unset): + actual_container_barcode = UNSET + else: + actual_container_barcode = self.actual_container_barcode + + actual_sample_slot_in_sc: int | None | Unset + if isinstance(self.actual_sample_slot_in_sc, Unset): + actual_sample_slot_in_sc = UNSET + else: + actual_sample_slot_in_sc = self.actual_sample_slot_in_sc + + xtal_snapshot_full_path: None | str | Unset + if isinstance(self.xtal_snapshot_full_path, Unset): + xtal_snapshot_full_path = UNSET + else: + xtal_snapshot_full_path = self.xtal_snapshot_full_path + + scan_parameters: None | str | Unset + if isinstance(self.scan_parameters, Unset): + scan_parameters = UNSET + else: + scan_parameters = self.scan_parameters + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if experiment_type is not UNSET: + field_dict["experimentType"] = experiment_type + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if experiment_type_name is not UNSET: + field_dict["experimentTypeName"] = experiment_type_name + if comments is not UNSET: + field_dict["comments"] = comments + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if crystal_class is not UNSET: + field_dict["crystalClass"] = crystal_class + if detector_mode is not UNSET: + field_dict["detectorMode"] = detector_mode + if actual_sample_barcode is not UNSET: + field_dict["actualSampleBarcode"] = actual_sample_barcode + if actual_sample_slot_in_container is not UNSET: + field_dict["actualSampleSlotInContainer"] = actual_sample_slot_in_container + if actual_container_barcode is not UNSET: + field_dict["actualContainerBarcode"] = actual_container_barcode + if actual_sample_slot_in_sc is not UNSET: + field_dict["actualSampleSlotInSC"] = actual_sample_slot_in_sc + if xtal_snapshot_full_path is not UNSET: + field_dict["xtalSnapshotFullPath"] = xtal_snapshot_full_path + if scan_parameters is not UNSET: + field_dict["scanParameters"] = scan_parameters + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_experiment_type(data: object) -> DataCollectionGroupInExperimentTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_type_type_0 = DataCollectionGroupInExperimentTypeType0(data) + + return experiment_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DataCollectionGroupInExperimentTypeType0 | None | Unset, data) + + experiment_type = _parse_experiment_type(d.pop("experimentType", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_experiment_type_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + experiment_type_name = _parse_experiment_type_name(d.pop("experimentTypeName", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_crystal_class(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_class = _parse_crystal_class(d.pop("crystalClass", UNSET)) + + def _parse_detector_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detector_mode = _parse_detector_mode(d.pop("detectorMode", UNSET)) + + def _parse_actual_sample_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actual_sample_barcode = _parse_actual_sample_barcode(d.pop("actualSampleBarcode", UNSET)) + + def _parse_actual_sample_slot_in_container(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + actual_sample_slot_in_container = _parse_actual_sample_slot_in_container( + d.pop("actualSampleSlotInContainer", UNSET) + ) + + def _parse_actual_container_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actual_container_barcode = _parse_actual_container_barcode(d.pop("actualContainerBarcode", UNSET)) + + def _parse_actual_sample_slot_in_sc(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + actual_sample_slot_in_sc = _parse_actual_sample_slot_in_sc(d.pop("actualSampleSlotInSC", UNSET)) + + def _parse_xtal_snapshot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path = _parse_xtal_snapshot_full_path(d.pop("xtalSnapshotFullPath", UNSET)) + + def _parse_scan_parameters(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_parameters = _parse_scan_parameters(d.pop("scanParameters", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + data_collection_group_in = cls( + experiment_type=experiment_type, + experiment_type_id=experiment_type_id, + experiment_type_name=experiment_type_name, + comments=comments, + start_time=start_time, + end_time=end_time, + crystal_class=crystal_class, + detector_mode=detector_mode, + actual_sample_barcode=actual_sample_barcode, + actual_sample_slot_in_container=actual_sample_slot_in_container, + actual_container_barcode=actual_container_barcode, + actual_sample_slot_in_sc=actual_sample_slot_in_sc, + xtal_snapshot_full_path=xtal_snapshot_full_path, + scan_parameters=scan_parameters, + sample_id=sample_id, + ) + + data_collection_group_in.additional_properties = d + return data_collection_group_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_group_in_experiment_type_type_0.py b/src/lims_utils/expeye_client/models/data_collection_group_in_experiment_type_type_0.py new file mode 100644 index 0000000..6eb4f10 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_group_in_experiment_type_type_0.py @@ -0,0 +1,38 @@ +from enum import StrEnum + + +class DataCollectionGroupInExperimentTypeType0(StrEnum): + BRAGG = "Bragg" + BURN = "Burn" + CHARACTERIZATION = "Characterization" + COLLECT_MULTIWEDGE = "Collect - Multiwedge" + CUSTOM = "Custom" + DEHYDRATION = "Dehydration" + DIAMOND_ANVIL_HIGH_PRESSURE = "Diamond Anvil High Pressure" + EM = "EM" + ENERGY_SCAN = "Energy scan" + EXPERIMENT = "experiment" + HELICAL = "Helical" + MAD = "MAD" + MAD_INVERSE_BEAM = "MAD - Inverse Beam" + MESH = "Mesh" + MESH3D = "Mesh3D" + MULTI_POSITIONAL = "Multi-positional" + OSC = "OSC" + PDF = "PDF" + PDFBRAGG = "PDF+Bragg" + SAD = "SAD" + SAD_INVERSE_BEAM = "SAD - Inverse Beam" + SCREENING = "Screening" + SERIAL_FIXED = "Serial Fixed" + SERIAL_JET = "Serial Jet" + SINGLE_PARTICLE = "single particle" + STANDARD = "Standard" + TIME_RESOLVED = "Time Resolved" + TOMO = "tomo" + XRF_MAP = "XRF map" + XRF_MAP_XAS = "XRF map xas" + XRF_SPECTRUM = "XRF spectrum" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/data_collection_group_optional.py b/src/lims_utils/expeye_client/models/data_collection_group_optional.py new file mode 100644 index 0000000..2b48bd3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_group_optional.py @@ -0,0 +1,429 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.data_collection_group_optional_experiment_type_type_0 import ( + DataCollectionGroupOptionalExperimentTypeType0, +) +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionGroupOptional") + + +@_attrs_define +class DataCollectionGroupOptional: + """ + Attributes: + experiment_type (DataCollectionGroupOptionalExperimentTypeType0 | None | Unset): + experiment_type_id (int | None | Unset): + experiment_type_name (None | str | Unset): + comments (None | str | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + crystal_class (None | str | Unset): + detector_mode (None | str | Unset): + actual_sample_barcode (None | str | Unset): + actual_sample_slot_in_container (int | None | Unset): + actual_container_barcode (None | str | Unset): + actual_sample_slot_in_sc (int | None | Unset): + xtal_snapshot_full_path (None | str | Unset): + scan_parameters (None | str | Unset): + sample_id (int | None | Unset): + data_collection_group_id (int | None | Unset): Data Collection Group ID + session_id (int | None | Unset): Session ID + """ + + experiment_type: DataCollectionGroupOptionalExperimentTypeType0 | None | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + experiment_type_name: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + crystal_class: None | str | Unset = UNSET + detector_mode: None | str | Unset = UNSET + actual_sample_barcode: None | str | Unset = UNSET + actual_sample_slot_in_container: int | None | Unset = UNSET + actual_container_barcode: None | str | Unset = UNSET + actual_sample_slot_in_sc: int | None | Unset = UNSET + xtal_snapshot_full_path: None | str | Unset = UNSET + scan_parameters: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + data_collection_group_id: int | None | Unset = UNSET + session_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + experiment_type: None | str | Unset + if isinstance(self.experiment_type, Unset): + experiment_type = UNSET + elif isinstance(self.experiment_type, DataCollectionGroupOptionalExperimentTypeType0): + experiment_type = self.experiment_type.value + else: + experiment_type = self.experiment_type + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + experiment_type_name: None | str | Unset + if isinstance(self.experiment_type_name, Unset): + experiment_type_name = UNSET + else: + experiment_type_name = self.experiment_type_name + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + crystal_class: None | str | Unset + if isinstance(self.crystal_class, Unset): + crystal_class = UNSET + else: + crystal_class = self.crystal_class + + detector_mode: None | str | Unset + if isinstance(self.detector_mode, Unset): + detector_mode = UNSET + else: + detector_mode = self.detector_mode + + actual_sample_barcode: None | str | Unset + if isinstance(self.actual_sample_barcode, Unset): + actual_sample_barcode = UNSET + else: + actual_sample_barcode = self.actual_sample_barcode + + actual_sample_slot_in_container: int | None | Unset + if isinstance(self.actual_sample_slot_in_container, Unset): + actual_sample_slot_in_container = UNSET + else: + actual_sample_slot_in_container = self.actual_sample_slot_in_container + + actual_container_barcode: None | str | Unset + if isinstance(self.actual_container_barcode, Unset): + actual_container_barcode = UNSET + else: + actual_container_barcode = self.actual_container_barcode + + actual_sample_slot_in_sc: int | None | Unset + if isinstance(self.actual_sample_slot_in_sc, Unset): + actual_sample_slot_in_sc = UNSET + else: + actual_sample_slot_in_sc = self.actual_sample_slot_in_sc + + xtal_snapshot_full_path: None | str | Unset + if isinstance(self.xtal_snapshot_full_path, Unset): + xtal_snapshot_full_path = UNSET + else: + xtal_snapshot_full_path = self.xtal_snapshot_full_path + + scan_parameters: None | str | Unset + if isinstance(self.scan_parameters, Unset): + scan_parameters = UNSET + else: + scan_parameters = self.scan_parameters + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + data_collection_group_id: int | None | Unset + if isinstance(self.data_collection_group_id, Unset): + data_collection_group_id = UNSET + else: + data_collection_group_id = self.data_collection_group_id + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if experiment_type is not UNSET: + field_dict["experimentType"] = experiment_type + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if experiment_type_name is not UNSET: + field_dict["experimentTypeName"] = experiment_type_name + if comments is not UNSET: + field_dict["comments"] = comments + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if crystal_class is not UNSET: + field_dict["crystalClass"] = crystal_class + if detector_mode is not UNSET: + field_dict["detectorMode"] = detector_mode + if actual_sample_barcode is not UNSET: + field_dict["actualSampleBarcode"] = actual_sample_barcode + if actual_sample_slot_in_container is not UNSET: + field_dict["actualSampleSlotInContainer"] = actual_sample_slot_in_container + if actual_container_barcode is not UNSET: + field_dict["actualContainerBarcode"] = actual_container_barcode + if actual_sample_slot_in_sc is not UNSET: + field_dict["actualSampleSlotInSC"] = actual_sample_slot_in_sc + if xtal_snapshot_full_path is not UNSET: + field_dict["xtalSnapshotFullPath"] = xtal_snapshot_full_path + if scan_parameters is not UNSET: + field_dict["scanParameters"] = scan_parameters + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if data_collection_group_id is not UNSET: + field_dict["dataCollectionGroupId"] = data_collection_group_id + if session_id is not UNSET: + field_dict["sessionId"] = session_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_experiment_type(data: object) -> DataCollectionGroupOptionalExperimentTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_type_type_0 = DataCollectionGroupOptionalExperimentTypeType0(data) + + return experiment_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DataCollectionGroupOptionalExperimentTypeType0 | None | Unset, data) + + experiment_type = _parse_experiment_type(d.pop("experimentType", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_experiment_type_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + experiment_type_name = _parse_experiment_type_name(d.pop("experimentTypeName", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_crystal_class(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_class = _parse_crystal_class(d.pop("crystalClass", UNSET)) + + def _parse_detector_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detector_mode = _parse_detector_mode(d.pop("detectorMode", UNSET)) + + def _parse_actual_sample_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actual_sample_barcode = _parse_actual_sample_barcode(d.pop("actualSampleBarcode", UNSET)) + + def _parse_actual_sample_slot_in_container(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + actual_sample_slot_in_container = _parse_actual_sample_slot_in_container( + d.pop("actualSampleSlotInContainer", UNSET) + ) + + def _parse_actual_container_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actual_container_barcode = _parse_actual_container_barcode(d.pop("actualContainerBarcode", UNSET)) + + def _parse_actual_sample_slot_in_sc(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + actual_sample_slot_in_sc = _parse_actual_sample_slot_in_sc(d.pop("actualSampleSlotInSC", UNSET)) + + def _parse_xtal_snapshot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path = _parse_xtal_snapshot_full_path(d.pop("xtalSnapshotFullPath", UNSET)) + + def _parse_scan_parameters(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_parameters = _parse_scan_parameters(d.pop("scanParameters", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_data_collection_group_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_group_id = _parse_data_collection_group_id(d.pop("dataCollectionGroupId", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + data_collection_group_optional = cls( + experiment_type=experiment_type, + experiment_type_id=experiment_type_id, + experiment_type_name=experiment_type_name, + comments=comments, + start_time=start_time, + end_time=end_time, + crystal_class=crystal_class, + detector_mode=detector_mode, + actual_sample_barcode=actual_sample_barcode, + actual_sample_slot_in_container=actual_sample_slot_in_container, + actual_container_barcode=actual_container_barcode, + actual_sample_slot_in_sc=actual_sample_slot_in_sc, + xtal_snapshot_full_path=xtal_snapshot_full_path, + scan_parameters=scan_parameters, + sample_id=sample_id, + data_collection_group_id=data_collection_group_id, + session_id=session_id, + ) + + data_collection_group_optional.additional_properties = d + return data_collection_group_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_group_optional_experiment_type_type_0.py b/src/lims_utils/expeye_client/models/data_collection_group_optional_experiment_type_type_0.py new file mode 100644 index 0000000..4ed4fb2 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_group_optional_experiment_type_type_0.py @@ -0,0 +1,38 @@ +from enum import StrEnum + + +class DataCollectionGroupOptionalExperimentTypeType0(StrEnum): + BRAGG = "Bragg" + BURN = "Burn" + CHARACTERIZATION = "Characterization" + COLLECT_MULTIWEDGE = "Collect - Multiwedge" + CUSTOM = "Custom" + DEHYDRATION = "Dehydration" + DIAMOND_ANVIL_HIGH_PRESSURE = "Diamond Anvil High Pressure" + EM = "EM" + ENERGY_SCAN = "Energy scan" + EXPERIMENT = "experiment" + HELICAL = "Helical" + MAD = "MAD" + MAD_INVERSE_BEAM = "MAD - Inverse Beam" + MESH = "Mesh" + MESH3D = "Mesh3D" + MULTI_POSITIONAL = "Multi-positional" + OSC = "OSC" + PDF = "PDF" + PDFBRAGG = "PDF+Bragg" + SAD = "SAD" + SAD_INVERSE_BEAM = "SAD - Inverse Beam" + SCREENING = "Screening" + SERIAL_FIXED = "Serial Fixed" + SERIAL_JET = "Serial Jet" + SINGLE_PARTICLE = "single particle" + STANDARD = "Standard" + TIME_RESOLVED = "Time Resolved" + TOMO = "tomo" + XRF_MAP = "XRF map" + XRF_MAP_XAS = "XRF map xas" + XRF_SPECTRUM = "XRF spectrum" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/data_collection_group_out.py b/src/lims_utils/expeye_client/models/data_collection_group_out.py new file mode 100644 index 0000000..5539a48 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_group_out.py @@ -0,0 +1,445 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.data_collection_group_out_experiment_type_type_0 import DataCollectionGroupOutExperimentTypeType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionGroupOut") + + +@_attrs_define +class DataCollectionGroupOut: + """ + Attributes: + data_collection_group_id (int): Data Collection Group ID + session_id (int): Session ID + experiment_type (DataCollectionGroupOutExperimentTypeType0 | None | Unset): + experiment_type_id (int | None | Unset): + experiment_type_name (None | str | Unset): + comments (None | str | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + crystal_class (None | str | Unset): + detector_mode (None | str | Unset): + actual_sample_barcode (None | str | Unset): + actual_sample_slot_in_container (int | None | Unset): + actual_container_barcode (None | str | Unset): + actual_sample_slot_in_sc (int | None | Unset): + xtal_snapshot_full_path (None | str | Unset): + scan_parameters (None | str | Unset): + sample_id (int | None | Unset): + collections (int | None | Unset): + image_directory (None | str | Unset): The directory where files reside - should end with a slash + """ + + data_collection_group_id: int + session_id: int + experiment_type: DataCollectionGroupOutExperimentTypeType0 | None | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + experiment_type_name: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + crystal_class: None | str | Unset = UNSET + detector_mode: None | str | Unset = UNSET + actual_sample_barcode: None | str | Unset = UNSET + actual_sample_slot_in_container: int | None | Unset = UNSET + actual_container_barcode: None | str | Unset = UNSET + actual_sample_slot_in_sc: int | None | Unset = UNSET + xtal_snapshot_full_path: None | str | Unset = UNSET + scan_parameters: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + collections: int | None | Unset = UNSET + image_directory: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data_collection_group_id = self.data_collection_group_id + + session_id = self.session_id + + experiment_type: None | str | Unset + if isinstance(self.experiment_type, Unset): + experiment_type = UNSET + elif isinstance(self.experiment_type, DataCollectionGroupOutExperimentTypeType0): + experiment_type = self.experiment_type.value + else: + experiment_type = self.experiment_type + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + experiment_type_name: None | str | Unset + if isinstance(self.experiment_type_name, Unset): + experiment_type_name = UNSET + else: + experiment_type_name = self.experiment_type_name + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + crystal_class: None | str | Unset + if isinstance(self.crystal_class, Unset): + crystal_class = UNSET + else: + crystal_class = self.crystal_class + + detector_mode: None | str | Unset + if isinstance(self.detector_mode, Unset): + detector_mode = UNSET + else: + detector_mode = self.detector_mode + + actual_sample_barcode: None | str | Unset + if isinstance(self.actual_sample_barcode, Unset): + actual_sample_barcode = UNSET + else: + actual_sample_barcode = self.actual_sample_barcode + + actual_sample_slot_in_container: int | None | Unset + if isinstance(self.actual_sample_slot_in_container, Unset): + actual_sample_slot_in_container = UNSET + else: + actual_sample_slot_in_container = self.actual_sample_slot_in_container + + actual_container_barcode: None | str | Unset + if isinstance(self.actual_container_barcode, Unset): + actual_container_barcode = UNSET + else: + actual_container_barcode = self.actual_container_barcode + + actual_sample_slot_in_sc: int | None | Unset + if isinstance(self.actual_sample_slot_in_sc, Unset): + actual_sample_slot_in_sc = UNSET + else: + actual_sample_slot_in_sc = self.actual_sample_slot_in_sc + + xtal_snapshot_full_path: None | str | Unset + if isinstance(self.xtal_snapshot_full_path, Unset): + xtal_snapshot_full_path = UNSET + else: + xtal_snapshot_full_path = self.xtal_snapshot_full_path + + scan_parameters: None | str | Unset + if isinstance(self.scan_parameters, Unset): + scan_parameters = UNSET + else: + scan_parameters = self.scan_parameters + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + collections: int | None | Unset + if isinstance(self.collections, Unset): + collections = UNSET + else: + collections = self.collections + + image_directory: None | str | Unset + if isinstance(self.image_directory, Unset): + image_directory = UNSET + else: + image_directory = self.image_directory + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataCollectionGroupId": data_collection_group_id, + "sessionId": session_id, + } + ) + if experiment_type is not UNSET: + field_dict["experimentType"] = experiment_type + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if experiment_type_name is not UNSET: + field_dict["experimentTypeName"] = experiment_type_name + if comments is not UNSET: + field_dict["comments"] = comments + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if crystal_class is not UNSET: + field_dict["crystalClass"] = crystal_class + if detector_mode is not UNSET: + field_dict["detectorMode"] = detector_mode + if actual_sample_barcode is not UNSET: + field_dict["actualSampleBarcode"] = actual_sample_barcode + if actual_sample_slot_in_container is not UNSET: + field_dict["actualSampleSlotInContainer"] = actual_sample_slot_in_container + if actual_container_barcode is not UNSET: + field_dict["actualContainerBarcode"] = actual_container_barcode + if actual_sample_slot_in_sc is not UNSET: + field_dict["actualSampleSlotInSC"] = actual_sample_slot_in_sc + if xtal_snapshot_full_path is not UNSET: + field_dict["xtalSnapshotFullPath"] = xtal_snapshot_full_path + if scan_parameters is not UNSET: + field_dict["scanParameters"] = scan_parameters + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if collections is not UNSET: + field_dict["collections"] = collections + if image_directory is not UNSET: + field_dict["imageDirectory"] = image_directory + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + data_collection_group_id = d.pop("dataCollectionGroupId") + + session_id = d.pop("sessionId") + + def _parse_experiment_type(data: object) -> DataCollectionGroupOutExperimentTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_type_type_0 = DataCollectionGroupOutExperimentTypeType0(data) + + return experiment_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DataCollectionGroupOutExperimentTypeType0 | None | Unset, data) + + experiment_type = _parse_experiment_type(d.pop("experimentType", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_experiment_type_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + experiment_type_name = _parse_experiment_type_name(d.pop("experimentTypeName", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_crystal_class(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_class = _parse_crystal_class(d.pop("crystalClass", UNSET)) + + def _parse_detector_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detector_mode = _parse_detector_mode(d.pop("detectorMode", UNSET)) + + def _parse_actual_sample_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actual_sample_barcode = _parse_actual_sample_barcode(d.pop("actualSampleBarcode", UNSET)) + + def _parse_actual_sample_slot_in_container(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + actual_sample_slot_in_container = _parse_actual_sample_slot_in_container( + d.pop("actualSampleSlotInContainer", UNSET) + ) + + def _parse_actual_container_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + actual_container_barcode = _parse_actual_container_barcode(d.pop("actualContainerBarcode", UNSET)) + + def _parse_actual_sample_slot_in_sc(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + actual_sample_slot_in_sc = _parse_actual_sample_slot_in_sc(d.pop("actualSampleSlotInSC", UNSET)) + + def _parse_xtal_snapshot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path = _parse_xtal_snapshot_full_path(d.pop("xtalSnapshotFullPath", UNSET)) + + def _parse_scan_parameters(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_parameters = _parse_scan_parameters(d.pop("scanParameters", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_collections(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + collections = _parse_collections(d.pop("collections", UNSET)) + + def _parse_image_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_directory = _parse_image_directory(d.pop("imageDirectory", UNSET)) + + data_collection_group_out = cls( + data_collection_group_id=data_collection_group_id, + session_id=session_id, + experiment_type=experiment_type, + experiment_type_id=experiment_type_id, + experiment_type_name=experiment_type_name, + comments=comments, + start_time=start_time, + end_time=end_time, + crystal_class=crystal_class, + detector_mode=detector_mode, + actual_sample_barcode=actual_sample_barcode, + actual_sample_slot_in_container=actual_sample_slot_in_container, + actual_container_barcode=actual_container_barcode, + actual_sample_slot_in_sc=actual_sample_slot_in_sc, + xtal_snapshot_full_path=xtal_snapshot_full_path, + scan_parameters=scan_parameters, + sample_id=sample_id, + collections=collections, + image_directory=image_directory, + ) + + data_collection_group_out.additional_properties = d + return data_collection_group_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_group_out_experiment_type_type_0.py b/src/lims_utils/expeye_client/models/data_collection_group_out_experiment_type_type_0.py new file mode 100644 index 0000000..d297b4d --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_group_out_experiment_type_type_0.py @@ -0,0 +1,38 @@ +from enum import StrEnum + + +class DataCollectionGroupOutExperimentTypeType0(StrEnum): + BRAGG = "Bragg" + BURN = "Burn" + CHARACTERIZATION = "Characterization" + COLLECT_MULTIWEDGE = "Collect - Multiwedge" + CUSTOM = "Custom" + DEHYDRATION = "Dehydration" + DIAMOND_ANVIL_HIGH_PRESSURE = "Diamond Anvil High Pressure" + EM = "EM" + ENERGY_SCAN = "Energy scan" + EXPERIMENT = "experiment" + HELICAL = "Helical" + MAD = "MAD" + MAD_INVERSE_BEAM = "MAD - Inverse Beam" + MESH = "Mesh" + MESH3D = "Mesh3D" + MULTI_POSITIONAL = "Multi-positional" + OSC = "OSC" + PDF = "PDF" + PDFBRAGG = "PDF+Bragg" + SAD = "SAD" + SAD_INVERSE_BEAM = "SAD - Inverse Beam" + SCREENING = "Screening" + SERIAL_FIXED = "Serial Fixed" + SERIAL_JET = "Serial Jet" + SINGLE_PARTICLE = "single particle" + STANDARD = "Standard" + TIME_RESOLVED = "Time Resolved" + TOMO = "tomo" + XRF_MAP = "XRF map" + XRF_MAP_XAS = "XRF map xas" + XRF_SPECTRUM = "XRF spectrum" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/data_collection_in.py b/src/lims_utils/expeye_client/models/data_collection_in.py new file mode 100644 index 0000000..41dba2d --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_in.py @@ -0,0 +1,1426 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.rotation_axis_enum import RotationAxisEnum +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionIn") + + +@_attrs_define +class DataCollectionIn: + """ + Attributes: + comments (None | str | Unset): + start_time (datetime.datetime | None | Unset): Start time of the dataCollection + pixel_size_on_image (float | None | Unset): Pixel size on image, calculated from magnification + voltage (float | None | Unset): Unit: kV + image_size_x (int | None | Unset): Image size in x, in case crop has been used. + image_size_y (int | None | Unset): Image size in y, in case crop has been used. + experimenttype (None | str | Unset): + end_time (datetime.datetime | None | Unset): End time of the dataCollection + run_status (None | str | Unset): + axis_start (float | None | Unset): + axis_end (float | None | Unset): + axis_range (float | None | Unset): + overlap (float | None | Unset): + number_of_images (int | None | Unset): + start_image_number (int | None | Unset): + number_of_passes (int | None | Unset): + exposure_time (float | None | Unset): + image_directory (None | str | Unset): The directory where files reside - should end with a slash + image_prefix (None | str | Unset): + image_suffix (None | str | Unset): + image_container_sub_path (None | str | Unset): Internal path of a HDF5 file pointing to the data + for this data collection + file_template (None | str | Unset): + wavelength (float | None | Unset): + resolution (float | None | Unset): + detector_distance (float | None | Unset): + x_beam (float | None | Unset): + y_beam (float | None | Unset): + printable_for_report (int | None | Unset): + slit_gap_vertical (float | None | Unset): + slit_gap_horizontal (float | None | Unset): + transmission (float | None | Unset): + synchrotron_mode (None | str | Unset): + xtal_snapshot_full_path_1 (None | str | Unset): + xtal_snapshot_full_path_2 (None | str | Unset): + xtal_snapshot_full_path_3 (None | str | Unset): + xtal_snapshot_full_path_4 (None | str | Unset): + rotation_axis (None | RotationAxisEnum | Unset): + phi_start (float | None | Unset): + kappa_start (float | None | Unset): + omega_start (float | None | Unset): + chi_start (float | None | Unset): + detector_2_theta (float | None | Unset): + detector_mode (None | str | Unset): + sample_id (int | None | Unset): + undulator_gap_1 (float | None | Unset): + undulator_gap_2 (float | None | Unset): + undulator_gap_3 (float | None | Unset): + beam_size_at_sample_x (float | None | Unset): + beam_size_at_sample_y (float | None | Unset): + centering_method (None | str | Unset): + detector_id (int | None | Unset): + flux (float | None | Unset): + bl_sub_sample_id (int | None | Unset): + flux_end (float | None | Unset): + dat_full_path (None | str | Unset): + magnification (float | None | Unset): + total_absorbed_dose (float | None | Unset): + binning (int | None | Unset): + particle_diameter (float | None | Unset): + min_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + c2aperture (float | None | Unset): + total_exposed_dose (float | None | Unset): + phase_plate (int | None | Unset): + data_collection_plan_id (int | None | Unset): + data_collection_number (int | None | Unset): + """ + + comments: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + pixel_size_on_image: float | None | Unset = UNSET + voltage: float | None | Unset = UNSET + image_size_x: int | None | Unset = UNSET + image_size_y: int | None | Unset = UNSET + experimenttype: None | str | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + run_status: None | str | Unset = UNSET + axis_start: float | None | Unset = UNSET + axis_end: float | None | Unset = UNSET + axis_range: float | None | Unset = UNSET + overlap: float | None | Unset = UNSET + number_of_images: int | None | Unset = UNSET + start_image_number: int | None | Unset = UNSET + number_of_passes: int | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + image_directory: None | str | Unset = UNSET + image_prefix: None | str | Unset = UNSET + image_suffix: None | str | Unset = UNSET + image_container_sub_path: None | str | Unset = UNSET + file_template: None | str | Unset = UNSET + wavelength: float | None | Unset = UNSET + resolution: float | None | Unset = UNSET + detector_distance: float | None | Unset = UNSET + x_beam: float | None | Unset = UNSET + y_beam: float | None | Unset = UNSET + printable_for_report: int | None | Unset = UNSET + slit_gap_vertical: float | None | Unset = UNSET + slit_gap_horizontal: float | None | Unset = UNSET + transmission: float | None | Unset = UNSET + synchrotron_mode: None | str | Unset = UNSET + xtal_snapshot_full_path_1: None | str | Unset = UNSET + xtal_snapshot_full_path_2: None | str | Unset = UNSET + xtal_snapshot_full_path_3: None | str | Unset = UNSET + xtal_snapshot_full_path_4: None | str | Unset = UNSET + rotation_axis: None | RotationAxisEnum | Unset = UNSET + phi_start: float | None | Unset = UNSET + kappa_start: float | None | Unset = UNSET + omega_start: float | None | Unset = UNSET + chi_start: float | None | Unset = UNSET + detector_2_theta: float | None | Unset = UNSET + detector_mode: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + undulator_gap_1: float | None | Unset = UNSET + undulator_gap_2: float | None | Unset = UNSET + undulator_gap_3: float | None | Unset = UNSET + beam_size_at_sample_x: float | None | Unset = UNSET + beam_size_at_sample_y: float | None | Unset = UNSET + centering_method: None | str | Unset = UNSET + detector_id: int | None | Unset = UNSET + flux: float | None | Unset = UNSET + bl_sub_sample_id: int | None | Unset = UNSET + flux_end: float | None | Unset = UNSET + dat_full_path: None | str | Unset = UNSET + magnification: float | None | Unset = UNSET + total_absorbed_dose: float | None | Unset = UNSET + binning: int | None | Unset = UNSET + particle_diameter: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + c2aperture: float | None | Unset = UNSET + total_exposed_dose: float | None | Unset = UNSET + phase_plate: int | None | Unset = UNSET + data_collection_plan_id: int | None | Unset = UNSET + data_collection_number: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + pixel_size_on_image: float | None | Unset + if isinstance(self.pixel_size_on_image, Unset): + pixel_size_on_image = UNSET + else: + pixel_size_on_image = self.pixel_size_on_image + + voltage: float | None | Unset + if isinstance(self.voltage, Unset): + voltage = UNSET + else: + voltage = self.voltage + + image_size_x: int | None | Unset + if isinstance(self.image_size_x, Unset): + image_size_x = UNSET + else: + image_size_x = self.image_size_x + + image_size_y: int | None | Unset + if isinstance(self.image_size_y, Unset): + image_size_y = UNSET + else: + image_size_y = self.image_size_y + + experimenttype: None | str | Unset + if isinstance(self.experimenttype, Unset): + experimenttype = UNSET + else: + experimenttype = self.experimenttype + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + run_status: None | str | Unset + if isinstance(self.run_status, Unset): + run_status = UNSET + else: + run_status = self.run_status + + axis_start: float | None | Unset + if isinstance(self.axis_start, Unset): + axis_start = UNSET + else: + axis_start = self.axis_start + + axis_end: float | None | Unset + if isinstance(self.axis_end, Unset): + axis_end = UNSET + else: + axis_end = self.axis_end + + axis_range: float | None | Unset + if isinstance(self.axis_range, Unset): + axis_range = UNSET + else: + axis_range = self.axis_range + + overlap: float | None | Unset + if isinstance(self.overlap, Unset): + overlap = UNSET + else: + overlap = self.overlap + + number_of_images: int | None | Unset + if isinstance(self.number_of_images, Unset): + number_of_images = UNSET + else: + number_of_images = self.number_of_images + + start_image_number: int | None | Unset + if isinstance(self.start_image_number, Unset): + start_image_number = UNSET + else: + start_image_number = self.start_image_number + + number_of_passes: int | None | Unset + if isinstance(self.number_of_passes, Unset): + number_of_passes = UNSET + else: + number_of_passes = self.number_of_passes + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + image_directory: None | str | Unset + if isinstance(self.image_directory, Unset): + image_directory = UNSET + else: + image_directory = self.image_directory + + image_prefix: None | str | Unset + if isinstance(self.image_prefix, Unset): + image_prefix = UNSET + else: + image_prefix = self.image_prefix + + image_suffix: None | str | Unset + if isinstance(self.image_suffix, Unset): + image_suffix = UNSET + else: + image_suffix = self.image_suffix + + image_container_sub_path: None | str | Unset + if isinstance(self.image_container_sub_path, Unset): + image_container_sub_path = UNSET + else: + image_container_sub_path = self.image_container_sub_path + + file_template: None | str | Unset + if isinstance(self.file_template, Unset): + file_template = UNSET + else: + file_template = self.file_template + + wavelength: float | None | Unset + if isinstance(self.wavelength, Unset): + wavelength = UNSET + else: + wavelength = self.wavelength + + resolution: float | None | Unset + if isinstance(self.resolution, Unset): + resolution = UNSET + else: + resolution = self.resolution + + detector_distance: float | None | Unset + if isinstance(self.detector_distance, Unset): + detector_distance = UNSET + else: + detector_distance = self.detector_distance + + x_beam: float | None | Unset + if isinstance(self.x_beam, Unset): + x_beam = UNSET + else: + x_beam = self.x_beam + + y_beam: float | None | Unset + if isinstance(self.y_beam, Unset): + y_beam = UNSET + else: + y_beam = self.y_beam + + printable_for_report: int | None | Unset + if isinstance(self.printable_for_report, Unset): + printable_for_report = UNSET + else: + printable_for_report = self.printable_for_report + + slit_gap_vertical: float | None | Unset + if isinstance(self.slit_gap_vertical, Unset): + slit_gap_vertical = UNSET + else: + slit_gap_vertical = self.slit_gap_vertical + + slit_gap_horizontal: float | None | Unset + if isinstance(self.slit_gap_horizontal, Unset): + slit_gap_horizontal = UNSET + else: + slit_gap_horizontal = self.slit_gap_horizontal + + transmission: float | None | Unset + if isinstance(self.transmission, Unset): + transmission = UNSET + else: + transmission = self.transmission + + synchrotron_mode: None | str | Unset + if isinstance(self.synchrotron_mode, Unset): + synchrotron_mode = UNSET + else: + synchrotron_mode = self.synchrotron_mode + + xtal_snapshot_full_path_1: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_1, Unset): + xtal_snapshot_full_path_1 = UNSET + else: + xtal_snapshot_full_path_1 = self.xtal_snapshot_full_path_1 + + xtal_snapshot_full_path_2: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_2, Unset): + xtal_snapshot_full_path_2 = UNSET + else: + xtal_snapshot_full_path_2 = self.xtal_snapshot_full_path_2 + + xtal_snapshot_full_path_3: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_3, Unset): + xtal_snapshot_full_path_3 = UNSET + else: + xtal_snapshot_full_path_3 = self.xtal_snapshot_full_path_3 + + xtal_snapshot_full_path_4: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_4, Unset): + xtal_snapshot_full_path_4 = UNSET + else: + xtal_snapshot_full_path_4 = self.xtal_snapshot_full_path_4 + + rotation_axis: None | str | Unset + if isinstance(self.rotation_axis, Unset): + rotation_axis = UNSET + elif isinstance(self.rotation_axis, RotationAxisEnum): + rotation_axis = self.rotation_axis.value + else: + rotation_axis = self.rotation_axis + + phi_start: float | None | Unset + if isinstance(self.phi_start, Unset): + phi_start = UNSET + else: + phi_start = self.phi_start + + kappa_start: float | None | Unset + if isinstance(self.kappa_start, Unset): + kappa_start = UNSET + else: + kappa_start = self.kappa_start + + omega_start: float | None | Unset + if isinstance(self.omega_start, Unset): + omega_start = UNSET + else: + omega_start = self.omega_start + + chi_start: float | None | Unset + if isinstance(self.chi_start, Unset): + chi_start = UNSET + else: + chi_start = self.chi_start + + detector_2_theta: float | None | Unset + if isinstance(self.detector_2_theta, Unset): + detector_2_theta = UNSET + else: + detector_2_theta = self.detector_2_theta + + detector_mode: None | str | Unset + if isinstance(self.detector_mode, Unset): + detector_mode = UNSET + else: + detector_mode = self.detector_mode + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + undulator_gap_1: float | None | Unset + if isinstance(self.undulator_gap_1, Unset): + undulator_gap_1 = UNSET + else: + undulator_gap_1 = self.undulator_gap_1 + + undulator_gap_2: float | None | Unset + if isinstance(self.undulator_gap_2, Unset): + undulator_gap_2 = UNSET + else: + undulator_gap_2 = self.undulator_gap_2 + + undulator_gap_3: float | None | Unset + if isinstance(self.undulator_gap_3, Unset): + undulator_gap_3 = UNSET + else: + undulator_gap_3 = self.undulator_gap_3 + + beam_size_at_sample_x: float | None | Unset + if isinstance(self.beam_size_at_sample_x, Unset): + beam_size_at_sample_x = UNSET + else: + beam_size_at_sample_x = self.beam_size_at_sample_x + + beam_size_at_sample_y: float | None | Unset + if isinstance(self.beam_size_at_sample_y, Unset): + beam_size_at_sample_y = UNSET + else: + beam_size_at_sample_y = self.beam_size_at_sample_y + + centering_method: None | str | Unset + if isinstance(self.centering_method, Unset): + centering_method = UNSET + else: + centering_method = self.centering_method + + detector_id: int | None | Unset + if isinstance(self.detector_id, Unset): + detector_id = UNSET + else: + detector_id = self.detector_id + + flux: float | None | Unset + if isinstance(self.flux, Unset): + flux = UNSET + else: + flux = self.flux + + bl_sub_sample_id: int | None | Unset + if isinstance(self.bl_sub_sample_id, Unset): + bl_sub_sample_id = UNSET + else: + bl_sub_sample_id = self.bl_sub_sample_id + + flux_end: float | None | Unset + if isinstance(self.flux_end, Unset): + flux_end = UNSET + else: + flux_end = self.flux_end + + dat_full_path: None | str | Unset + if isinstance(self.dat_full_path, Unset): + dat_full_path = UNSET + else: + dat_full_path = self.dat_full_path + + magnification: float | None | Unset + if isinstance(self.magnification, Unset): + magnification = UNSET + else: + magnification = self.magnification + + total_absorbed_dose: float | None | Unset + if isinstance(self.total_absorbed_dose, Unset): + total_absorbed_dose = UNSET + else: + total_absorbed_dose = self.total_absorbed_dose + + binning: int | None | Unset + if isinstance(self.binning, Unset): + binning = UNSET + else: + binning = self.binning + + particle_diameter: float | None | Unset + if isinstance(self.particle_diameter, Unset): + particle_diameter = UNSET + else: + particle_diameter = self.particle_diameter + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + c2aperture: float | None | Unset + if isinstance(self.c2aperture, Unset): + c2aperture = UNSET + else: + c2aperture = self.c2aperture + + total_exposed_dose: float | None | Unset + if isinstance(self.total_exposed_dose, Unset): + total_exposed_dose = UNSET + else: + total_exposed_dose = self.total_exposed_dose + + phase_plate: int | None | Unset + if isinstance(self.phase_plate, Unset): + phase_plate = UNSET + else: + phase_plate = self.phase_plate + + data_collection_plan_id: int | None | Unset + if isinstance(self.data_collection_plan_id, Unset): + data_collection_plan_id = UNSET + else: + data_collection_plan_id = self.data_collection_plan_id + + data_collection_number: int | None | Unset + if isinstance(self.data_collection_number, Unset): + data_collection_number = UNSET + else: + data_collection_number = self.data_collection_number + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comments is not UNSET: + field_dict["comments"] = comments + if start_time is not UNSET: + field_dict["startTime"] = start_time + if pixel_size_on_image is not UNSET: + field_dict["pixelSizeOnImage"] = pixel_size_on_image + if voltage is not UNSET: + field_dict["voltage"] = voltage + if image_size_x is not UNSET: + field_dict["imageSizeX"] = image_size_x + if image_size_y is not UNSET: + field_dict["imageSizeY"] = image_size_y + if experimenttype is not UNSET: + field_dict["experimenttype"] = experimenttype + if end_time is not UNSET: + field_dict["endTime"] = end_time + if run_status is not UNSET: + field_dict["runStatus"] = run_status + if axis_start is not UNSET: + field_dict["axisStart"] = axis_start + if axis_end is not UNSET: + field_dict["axisEnd"] = axis_end + if axis_range is not UNSET: + field_dict["axisRange"] = axis_range + if overlap is not UNSET: + field_dict["overlap"] = overlap + if number_of_images is not UNSET: + field_dict["numberOfImages"] = number_of_images + if start_image_number is not UNSET: + field_dict["startImageNumber"] = start_image_number + if number_of_passes is not UNSET: + field_dict["numberOfPasses"] = number_of_passes + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if image_directory is not UNSET: + field_dict["imageDirectory"] = image_directory + if image_prefix is not UNSET: + field_dict["imagePrefix"] = image_prefix + if image_suffix is not UNSET: + field_dict["imageSuffix"] = image_suffix + if image_container_sub_path is not UNSET: + field_dict["imageContainerSubPath"] = image_container_sub_path + if file_template is not UNSET: + field_dict["fileTemplate"] = file_template + if wavelength is not UNSET: + field_dict["wavelength"] = wavelength + if resolution is not UNSET: + field_dict["resolution"] = resolution + if detector_distance is not UNSET: + field_dict["detectorDistance"] = detector_distance + if x_beam is not UNSET: + field_dict["xBeam"] = x_beam + if y_beam is not UNSET: + field_dict["yBeam"] = y_beam + if printable_for_report is not UNSET: + field_dict["printableForReport"] = printable_for_report + if slit_gap_vertical is not UNSET: + field_dict["slitGapVertical"] = slit_gap_vertical + if slit_gap_horizontal is not UNSET: + field_dict["slitGapHorizontal"] = slit_gap_horizontal + if transmission is not UNSET: + field_dict["transmission"] = transmission + if synchrotron_mode is not UNSET: + field_dict["synchrotronMode"] = synchrotron_mode + if xtal_snapshot_full_path_1 is not UNSET: + field_dict["xtalSnapshotFullPath1"] = xtal_snapshot_full_path_1 + if xtal_snapshot_full_path_2 is not UNSET: + field_dict["xtalSnapshotFullPath2"] = xtal_snapshot_full_path_2 + if xtal_snapshot_full_path_3 is not UNSET: + field_dict["xtalSnapshotFullPath3"] = xtal_snapshot_full_path_3 + if xtal_snapshot_full_path_4 is not UNSET: + field_dict["xtalSnapshotFullPath4"] = xtal_snapshot_full_path_4 + if rotation_axis is not UNSET: + field_dict["rotationAxis"] = rotation_axis + if phi_start is not UNSET: + field_dict["phiStart"] = phi_start + if kappa_start is not UNSET: + field_dict["kappaStart"] = kappa_start + if omega_start is not UNSET: + field_dict["omegaStart"] = omega_start + if chi_start is not UNSET: + field_dict["chiStart"] = chi_start + if detector_2_theta is not UNSET: + field_dict["detector2Theta"] = detector_2_theta + if detector_mode is not UNSET: + field_dict["detectorMode"] = detector_mode + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if undulator_gap_1 is not UNSET: + field_dict["undulatorGap1"] = undulator_gap_1 + if undulator_gap_2 is not UNSET: + field_dict["undulatorGap2"] = undulator_gap_2 + if undulator_gap_3 is not UNSET: + field_dict["undulatorGap3"] = undulator_gap_3 + if beam_size_at_sample_x is not UNSET: + field_dict["beamSizeAtSampleX"] = beam_size_at_sample_x + if beam_size_at_sample_y is not UNSET: + field_dict["beamSizeAtSampleY"] = beam_size_at_sample_y + if centering_method is not UNSET: + field_dict["centeringMethod"] = centering_method + if detector_id is not UNSET: + field_dict["detectorId"] = detector_id + if flux is not UNSET: + field_dict["flux"] = flux + if bl_sub_sample_id is not UNSET: + field_dict["blSubSampleId"] = bl_sub_sample_id + if flux_end is not UNSET: + field_dict["flux_end"] = flux_end + if dat_full_path is not UNSET: + field_dict["datFullPath"] = dat_full_path + if magnification is not UNSET: + field_dict["magnification"] = magnification + if total_absorbed_dose is not UNSET: + field_dict["totalAbsorbedDose"] = total_absorbed_dose + if binning is not UNSET: + field_dict["binning"] = binning + if particle_diameter is not UNSET: + field_dict["particleDiameter"] = particle_diameter + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if c2aperture is not UNSET: + field_dict["c2aperture"] = c2aperture + if total_exposed_dose is not UNSET: + field_dict["totalExposedDose"] = total_exposed_dose + if phase_plate is not UNSET: + field_dict["phasePlate"] = phase_plate + if data_collection_plan_id is not UNSET: + field_dict["dataCollectionPlanId"] = data_collection_plan_id + if data_collection_number is not UNSET: + field_dict["dataCollectionNumber"] = data_collection_number + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_pixel_size_on_image(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size_on_image = _parse_pixel_size_on_image(d.pop("pixelSizeOnImage", UNSET)) + + def _parse_voltage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + voltage = _parse_voltage(d.pop("voltage", UNSET)) + + def _parse_image_size_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_size_x = _parse_image_size_x(d.pop("imageSizeX", UNSET)) + + def _parse_image_size_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_size_y = _parse_image_size_y(d.pop("imageSizeY", UNSET)) + + def _parse_experimenttype(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + experimenttype = _parse_experimenttype(d.pop("experimenttype", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_run_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + run_status = _parse_run_status(d.pop("runStatus", UNSET)) + + def _parse_axis_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_start = _parse_axis_start(d.pop("axisStart", UNSET)) + + def _parse_axis_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_end = _parse_axis_end(d.pop("axisEnd", UNSET)) + + def _parse_axis_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_range = _parse_axis_range(d.pop("axisRange", UNSET)) + + def _parse_overlap(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overlap = _parse_overlap(d.pop("overlap", UNSET)) + + def _parse_number_of_images(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_images = _parse_number_of_images(d.pop("numberOfImages", UNSET)) + + def _parse_start_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + start_image_number = _parse_start_image_number(d.pop("startImageNumber", UNSET)) + + def _parse_number_of_passes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_passes = _parse_number_of_passes(d.pop("numberOfPasses", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_image_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_directory = _parse_image_directory(d.pop("imageDirectory", UNSET)) + + def _parse_image_prefix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_prefix = _parse_image_prefix(d.pop("imagePrefix", UNSET)) + + def _parse_image_suffix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_suffix = _parse_image_suffix(d.pop("imageSuffix", UNSET)) + + def _parse_image_container_sub_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_container_sub_path = _parse_image_container_sub_path(d.pop("imageContainerSubPath", UNSET)) + + def _parse_file_template(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_template = _parse_file_template(d.pop("fileTemplate", UNSET)) + + def _parse_wavelength(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wavelength = _parse_wavelength(d.pop("wavelength", UNSET)) + + def _parse_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution = _parse_resolution(d.pop("resolution", UNSET)) + + def _parse_detector_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + detector_distance = _parse_detector_distance(d.pop("detectorDistance", UNSET)) + + def _parse_x_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_beam = _parse_x_beam(d.pop("xBeam", UNSET)) + + def _parse_y_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y_beam = _parse_y_beam(d.pop("yBeam", UNSET)) + + def _parse_printable_for_report(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + printable_for_report = _parse_printable_for_report(d.pop("printableForReport", UNSET)) + + def _parse_slit_gap_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + slit_gap_vertical = _parse_slit_gap_vertical(d.pop("slitGapVertical", UNSET)) + + def _parse_slit_gap_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + slit_gap_horizontal = _parse_slit_gap_horizontal(d.pop("slitGapHorizontal", UNSET)) + + def _parse_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission = _parse_transmission(d.pop("transmission", UNSET)) + + def _parse_synchrotron_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + synchrotron_mode = _parse_synchrotron_mode(d.pop("synchrotronMode", UNSET)) + + def _parse_xtal_snapshot_full_path_1(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_1 = _parse_xtal_snapshot_full_path_1(d.pop("xtalSnapshotFullPath1", UNSET)) + + def _parse_xtal_snapshot_full_path_2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_2 = _parse_xtal_snapshot_full_path_2(d.pop("xtalSnapshotFullPath2", UNSET)) + + def _parse_xtal_snapshot_full_path_3(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_3 = _parse_xtal_snapshot_full_path_3(d.pop("xtalSnapshotFullPath3", UNSET)) + + def _parse_xtal_snapshot_full_path_4(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_4 = _parse_xtal_snapshot_full_path_4(d.pop("xtalSnapshotFullPath4", UNSET)) + + def _parse_rotation_axis(data: object) -> None | RotationAxisEnum | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + rotation_axis_type_0 = RotationAxisEnum(data) + + return rotation_axis_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RotationAxisEnum | Unset, data) + + rotation_axis = _parse_rotation_axis(d.pop("rotationAxis", UNSET)) + + def _parse_phi_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + phi_start = _parse_phi_start(d.pop("phiStart", UNSET)) + + def _parse_kappa_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + kappa_start = _parse_kappa_start(d.pop("kappaStart", UNSET)) + + def _parse_omega_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + omega_start = _parse_omega_start(d.pop("omegaStart", UNSET)) + + def _parse_chi_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + chi_start = _parse_chi_start(d.pop("chiStart", UNSET)) + + def _parse_detector_2_theta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + detector_2_theta = _parse_detector_2_theta(d.pop("detector2Theta", UNSET)) + + def _parse_detector_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detector_mode = _parse_detector_mode(d.pop("detectorMode", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_undulator_gap_1(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_1 = _parse_undulator_gap_1(d.pop("undulatorGap1", UNSET)) + + def _parse_undulator_gap_2(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_2 = _parse_undulator_gap_2(d.pop("undulatorGap2", UNSET)) + + def _parse_undulator_gap_3(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_3 = _parse_undulator_gap_3(d.pop("undulatorGap3", UNSET)) + + def _parse_beam_size_at_sample_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_at_sample_x = _parse_beam_size_at_sample_x(d.pop("beamSizeAtSampleX", UNSET)) + + def _parse_beam_size_at_sample_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_at_sample_y = _parse_beam_size_at_sample_y(d.pop("beamSizeAtSampleY", UNSET)) + + def _parse_centering_method(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + centering_method = _parse_centering_method(d.pop("centeringMethod", UNSET)) + + def _parse_detector_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + detector_id = _parse_detector_id(d.pop("detectorId", UNSET)) + + def _parse_flux(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux = _parse_flux(d.pop("flux", UNSET)) + + def _parse_bl_sub_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sub_sample_id = _parse_bl_sub_sample_id(d.pop("blSubSampleId", UNSET)) + + def _parse_flux_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux_end = _parse_flux_end(d.pop("flux_end", UNSET)) + + def _parse_dat_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dat_full_path = _parse_dat_full_path(d.pop("datFullPath", UNSET)) + + def _parse_magnification(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + magnification = _parse_magnification(d.pop("magnification", UNSET)) + + def _parse_total_absorbed_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_absorbed_dose = _parse_total_absorbed_dose(d.pop("totalAbsorbedDose", UNSET)) + + def _parse_binning(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + binning = _parse_binning(d.pop("binning", UNSET)) + + def _parse_particle_diameter(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + particle_diameter = _parse_particle_diameter(d.pop("particleDiameter", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_c2aperture(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + c2aperture = _parse_c2aperture(d.pop("c2aperture", UNSET)) + + def _parse_total_exposed_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_exposed_dose = _parse_total_exposed_dose(d.pop("totalExposedDose", UNSET)) + + def _parse_phase_plate(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + phase_plate = _parse_phase_plate(d.pop("phasePlate", UNSET)) + + def _parse_data_collection_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_plan_id = _parse_data_collection_plan_id(d.pop("dataCollectionPlanId", UNSET)) + + def _parse_data_collection_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_number = _parse_data_collection_number(d.pop("dataCollectionNumber", UNSET)) + + data_collection_in = cls( + comments=comments, + start_time=start_time, + pixel_size_on_image=pixel_size_on_image, + voltage=voltage, + image_size_x=image_size_x, + image_size_y=image_size_y, + experimenttype=experimenttype, + end_time=end_time, + run_status=run_status, + axis_start=axis_start, + axis_end=axis_end, + axis_range=axis_range, + overlap=overlap, + number_of_images=number_of_images, + start_image_number=start_image_number, + number_of_passes=number_of_passes, + exposure_time=exposure_time, + image_directory=image_directory, + image_prefix=image_prefix, + image_suffix=image_suffix, + image_container_sub_path=image_container_sub_path, + file_template=file_template, + wavelength=wavelength, + resolution=resolution, + detector_distance=detector_distance, + x_beam=x_beam, + y_beam=y_beam, + printable_for_report=printable_for_report, + slit_gap_vertical=slit_gap_vertical, + slit_gap_horizontal=slit_gap_horizontal, + transmission=transmission, + synchrotron_mode=synchrotron_mode, + xtal_snapshot_full_path_1=xtal_snapshot_full_path_1, + xtal_snapshot_full_path_2=xtal_snapshot_full_path_2, + xtal_snapshot_full_path_3=xtal_snapshot_full_path_3, + xtal_snapshot_full_path_4=xtal_snapshot_full_path_4, + rotation_axis=rotation_axis, + phi_start=phi_start, + kappa_start=kappa_start, + omega_start=omega_start, + chi_start=chi_start, + detector_2_theta=detector_2_theta, + detector_mode=detector_mode, + sample_id=sample_id, + undulator_gap_1=undulator_gap_1, + undulator_gap_2=undulator_gap_2, + undulator_gap_3=undulator_gap_3, + beam_size_at_sample_x=beam_size_at_sample_x, + beam_size_at_sample_y=beam_size_at_sample_y, + centering_method=centering_method, + detector_id=detector_id, + flux=flux, + bl_sub_sample_id=bl_sub_sample_id, + flux_end=flux_end, + dat_full_path=dat_full_path, + magnification=magnification, + total_absorbed_dose=total_absorbed_dose, + binning=binning, + particle_diameter=particle_diameter, + min_resolution=min_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + c2aperture=c2aperture, + total_exposed_dose=total_exposed_dose, + phase_plate=phase_plate, + data_collection_plan_id=data_collection_plan_id, + data_collection_number=data_collection_number, + ) + + data_collection_in.additional_properties = d + return data_collection_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_optional.py b/src/lims_utils/expeye_client/models/data_collection_optional.py new file mode 100644 index 0000000..3cc8f29 --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_optional.py @@ -0,0 +1,1446 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.rotation_axis_enum import RotationAxisEnum +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionOptional") + + +@_attrs_define +class DataCollectionOptional: + """ + Attributes: + comments (None | str | Unset): + start_time (datetime.datetime | None | Unset): Start time of the dataCollection + pixel_size_on_image (float | None | Unset): Pixel size on image, calculated from magnification + voltage (float | None | Unset): Unit: kV + image_size_x (int | None | Unset): Image size in x, in case crop has been used. + image_size_y (int | None | Unset): Image size in y, in case crop has been used. + experimenttype (None | str | Unset): + end_time (datetime.datetime | None | Unset): End time of the dataCollection + run_status (None | str | Unset): + axis_start (float | None | Unset): + axis_end (float | None | Unset): + axis_range (float | None | Unset): + overlap (float | None | Unset): + number_of_images (int | None | Unset): + start_image_number (int | None | Unset): + number_of_passes (int | None | Unset): + exposure_time (float | None | Unset): + image_directory (None | str | Unset): The directory where files reside - should end with a slash + image_prefix (None | str | Unset): + image_suffix (None | str | Unset): + image_container_sub_path (None | str | Unset): Internal path of a HDF5 file pointing to the data + for this data collection + file_template (None | str | Unset): + wavelength (float | None | Unset): + resolution (float | None | Unset): + detector_distance (float | None | Unset): + x_beam (float | None | Unset): + y_beam (float | None | Unset): + printable_for_report (int | None | Unset): + slit_gap_vertical (float | None | Unset): + slit_gap_horizontal (float | None | Unset): + transmission (float | None | Unset): + synchrotron_mode (None | str | Unset): + xtal_snapshot_full_path_1 (None | str | Unset): + xtal_snapshot_full_path_2 (None | str | Unset): + xtal_snapshot_full_path_3 (None | str | Unset): + xtal_snapshot_full_path_4 (None | str | Unset): + rotation_axis (None | RotationAxisEnum | Unset): + phi_start (float | None | Unset): + kappa_start (float | None | Unset): + omega_start (float | None | Unset): + chi_start (float | None | Unset): + detector_2_theta (float | None | Unset): + detector_mode (None | str | Unset): + sample_id (int | None | Unset): + undulator_gap_1 (float | None | Unset): + undulator_gap_2 (float | None | Unset): + undulator_gap_3 (float | None | Unset): + beam_size_at_sample_x (float | None | Unset): + beam_size_at_sample_y (float | None | Unset): + centering_method (None | str | Unset): + detector_id (int | None | Unset): + flux (float | None | Unset): + bl_sub_sample_id (int | None | Unset): + flux_end (float | None | Unset): + dat_full_path (None | str | Unset): + magnification (float | None | Unset): + total_absorbed_dose (float | None | Unset): + binning (int | None | Unset): + particle_diameter (float | None | Unset): + min_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + c2aperture (float | None | Unset): + total_exposed_dose (float | None | Unset): + phase_plate (int | None | Unset): + data_collection_plan_id (int | None | Unset): + data_collection_number (int | None | Unset): + data_collection_group_id (int | None | Unset): + """ + + comments: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + pixel_size_on_image: float | None | Unset = UNSET + voltage: float | None | Unset = UNSET + image_size_x: int | None | Unset = UNSET + image_size_y: int | None | Unset = UNSET + experimenttype: None | str | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + run_status: None | str | Unset = UNSET + axis_start: float | None | Unset = UNSET + axis_end: float | None | Unset = UNSET + axis_range: float | None | Unset = UNSET + overlap: float | None | Unset = UNSET + number_of_images: int | None | Unset = UNSET + start_image_number: int | None | Unset = UNSET + number_of_passes: int | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + image_directory: None | str | Unset = UNSET + image_prefix: None | str | Unset = UNSET + image_suffix: None | str | Unset = UNSET + image_container_sub_path: None | str | Unset = UNSET + file_template: None | str | Unset = UNSET + wavelength: float | None | Unset = UNSET + resolution: float | None | Unset = UNSET + detector_distance: float | None | Unset = UNSET + x_beam: float | None | Unset = UNSET + y_beam: float | None | Unset = UNSET + printable_for_report: int | None | Unset = UNSET + slit_gap_vertical: float | None | Unset = UNSET + slit_gap_horizontal: float | None | Unset = UNSET + transmission: float | None | Unset = UNSET + synchrotron_mode: None | str | Unset = UNSET + xtal_snapshot_full_path_1: None | str | Unset = UNSET + xtal_snapshot_full_path_2: None | str | Unset = UNSET + xtal_snapshot_full_path_3: None | str | Unset = UNSET + xtal_snapshot_full_path_4: None | str | Unset = UNSET + rotation_axis: None | RotationAxisEnum | Unset = UNSET + phi_start: float | None | Unset = UNSET + kappa_start: float | None | Unset = UNSET + omega_start: float | None | Unset = UNSET + chi_start: float | None | Unset = UNSET + detector_2_theta: float | None | Unset = UNSET + detector_mode: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + undulator_gap_1: float | None | Unset = UNSET + undulator_gap_2: float | None | Unset = UNSET + undulator_gap_3: float | None | Unset = UNSET + beam_size_at_sample_x: float | None | Unset = UNSET + beam_size_at_sample_y: float | None | Unset = UNSET + centering_method: None | str | Unset = UNSET + detector_id: int | None | Unset = UNSET + flux: float | None | Unset = UNSET + bl_sub_sample_id: int | None | Unset = UNSET + flux_end: float | None | Unset = UNSET + dat_full_path: None | str | Unset = UNSET + magnification: float | None | Unset = UNSET + total_absorbed_dose: float | None | Unset = UNSET + binning: int | None | Unset = UNSET + particle_diameter: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + c2aperture: float | None | Unset = UNSET + total_exposed_dose: float | None | Unset = UNSET + phase_plate: int | None | Unset = UNSET + data_collection_plan_id: int | None | Unset = UNSET + data_collection_number: int | None | Unset = UNSET + data_collection_group_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + pixel_size_on_image: float | None | Unset + if isinstance(self.pixel_size_on_image, Unset): + pixel_size_on_image = UNSET + else: + pixel_size_on_image = self.pixel_size_on_image + + voltage: float | None | Unset + if isinstance(self.voltage, Unset): + voltage = UNSET + else: + voltage = self.voltage + + image_size_x: int | None | Unset + if isinstance(self.image_size_x, Unset): + image_size_x = UNSET + else: + image_size_x = self.image_size_x + + image_size_y: int | None | Unset + if isinstance(self.image_size_y, Unset): + image_size_y = UNSET + else: + image_size_y = self.image_size_y + + experimenttype: None | str | Unset + if isinstance(self.experimenttype, Unset): + experimenttype = UNSET + else: + experimenttype = self.experimenttype + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + run_status: None | str | Unset + if isinstance(self.run_status, Unset): + run_status = UNSET + else: + run_status = self.run_status + + axis_start: float | None | Unset + if isinstance(self.axis_start, Unset): + axis_start = UNSET + else: + axis_start = self.axis_start + + axis_end: float | None | Unset + if isinstance(self.axis_end, Unset): + axis_end = UNSET + else: + axis_end = self.axis_end + + axis_range: float | None | Unset + if isinstance(self.axis_range, Unset): + axis_range = UNSET + else: + axis_range = self.axis_range + + overlap: float | None | Unset + if isinstance(self.overlap, Unset): + overlap = UNSET + else: + overlap = self.overlap + + number_of_images: int | None | Unset + if isinstance(self.number_of_images, Unset): + number_of_images = UNSET + else: + number_of_images = self.number_of_images + + start_image_number: int | None | Unset + if isinstance(self.start_image_number, Unset): + start_image_number = UNSET + else: + start_image_number = self.start_image_number + + number_of_passes: int | None | Unset + if isinstance(self.number_of_passes, Unset): + number_of_passes = UNSET + else: + number_of_passes = self.number_of_passes + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + image_directory: None | str | Unset + if isinstance(self.image_directory, Unset): + image_directory = UNSET + else: + image_directory = self.image_directory + + image_prefix: None | str | Unset + if isinstance(self.image_prefix, Unset): + image_prefix = UNSET + else: + image_prefix = self.image_prefix + + image_suffix: None | str | Unset + if isinstance(self.image_suffix, Unset): + image_suffix = UNSET + else: + image_suffix = self.image_suffix + + image_container_sub_path: None | str | Unset + if isinstance(self.image_container_sub_path, Unset): + image_container_sub_path = UNSET + else: + image_container_sub_path = self.image_container_sub_path + + file_template: None | str | Unset + if isinstance(self.file_template, Unset): + file_template = UNSET + else: + file_template = self.file_template + + wavelength: float | None | Unset + if isinstance(self.wavelength, Unset): + wavelength = UNSET + else: + wavelength = self.wavelength + + resolution: float | None | Unset + if isinstance(self.resolution, Unset): + resolution = UNSET + else: + resolution = self.resolution + + detector_distance: float | None | Unset + if isinstance(self.detector_distance, Unset): + detector_distance = UNSET + else: + detector_distance = self.detector_distance + + x_beam: float | None | Unset + if isinstance(self.x_beam, Unset): + x_beam = UNSET + else: + x_beam = self.x_beam + + y_beam: float | None | Unset + if isinstance(self.y_beam, Unset): + y_beam = UNSET + else: + y_beam = self.y_beam + + printable_for_report: int | None | Unset + if isinstance(self.printable_for_report, Unset): + printable_for_report = UNSET + else: + printable_for_report = self.printable_for_report + + slit_gap_vertical: float | None | Unset + if isinstance(self.slit_gap_vertical, Unset): + slit_gap_vertical = UNSET + else: + slit_gap_vertical = self.slit_gap_vertical + + slit_gap_horizontal: float | None | Unset + if isinstance(self.slit_gap_horizontal, Unset): + slit_gap_horizontal = UNSET + else: + slit_gap_horizontal = self.slit_gap_horizontal + + transmission: float | None | Unset + if isinstance(self.transmission, Unset): + transmission = UNSET + else: + transmission = self.transmission + + synchrotron_mode: None | str | Unset + if isinstance(self.synchrotron_mode, Unset): + synchrotron_mode = UNSET + else: + synchrotron_mode = self.synchrotron_mode + + xtal_snapshot_full_path_1: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_1, Unset): + xtal_snapshot_full_path_1 = UNSET + else: + xtal_snapshot_full_path_1 = self.xtal_snapshot_full_path_1 + + xtal_snapshot_full_path_2: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_2, Unset): + xtal_snapshot_full_path_2 = UNSET + else: + xtal_snapshot_full_path_2 = self.xtal_snapshot_full_path_2 + + xtal_snapshot_full_path_3: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_3, Unset): + xtal_snapshot_full_path_3 = UNSET + else: + xtal_snapshot_full_path_3 = self.xtal_snapshot_full_path_3 + + xtal_snapshot_full_path_4: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_4, Unset): + xtal_snapshot_full_path_4 = UNSET + else: + xtal_snapshot_full_path_4 = self.xtal_snapshot_full_path_4 + + rotation_axis: None | str | Unset + if isinstance(self.rotation_axis, Unset): + rotation_axis = UNSET + elif isinstance(self.rotation_axis, RotationAxisEnum): + rotation_axis = self.rotation_axis.value + else: + rotation_axis = self.rotation_axis + + phi_start: float | None | Unset + if isinstance(self.phi_start, Unset): + phi_start = UNSET + else: + phi_start = self.phi_start + + kappa_start: float | None | Unset + if isinstance(self.kappa_start, Unset): + kappa_start = UNSET + else: + kappa_start = self.kappa_start + + omega_start: float | None | Unset + if isinstance(self.omega_start, Unset): + omega_start = UNSET + else: + omega_start = self.omega_start + + chi_start: float | None | Unset + if isinstance(self.chi_start, Unset): + chi_start = UNSET + else: + chi_start = self.chi_start + + detector_2_theta: float | None | Unset + if isinstance(self.detector_2_theta, Unset): + detector_2_theta = UNSET + else: + detector_2_theta = self.detector_2_theta + + detector_mode: None | str | Unset + if isinstance(self.detector_mode, Unset): + detector_mode = UNSET + else: + detector_mode = self.detector_mode + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + undulator_gap_1: float | None | Unset + if isinstance(self.undulator_gap_1, Unset): + undulator_gap_1 = UNSET + else: + undulator_gap_1 = self.undulator_gap_1 + + undulator_gap_2: float | None | Unset + if isinstance(self.undulator_gap_2, Unset): + undulator_gap_2 = UNSET + else: + undulator_gap_2 = self.undulator_gap_2 + + undulator_gap_3: float | None | Unset + if isinstance(self.undulator_gap_3, Unset): + undulator_gap_3 = UNSET + else: + undulator_gap_3 = self.undulator_gap_3 + + beam_size_at_sample_x: float | None | Unset + if isinstance(self.beam_size_at_sample_x, Unset): + beam_size_at_sample_x = UNSET + else: + beam_size_at_sample_x = self.beam_size_at_sample_x + + beam_size_at_sample_y: float | None | Unset + if isinstance(self.beam_size_at_sample_y, Unset): + beam_size_at_sample_y = UNSET + else: + beam_size_at_sample_y = self.beam_size_at_sample_y + + centering_method: None | str | Unset + if isinstance(self.centering_method, Unset): + centering_method = UNSET + else: + centering_method = self.centering_method + + detector_id: int | None | Unset + if isinstance(self.detector_id, Unset): + detector_id = UNSET + else: + detector_id = self.detector_id + + flux: float | None | Unset + if isinstance(self.flux, Unset): + flux = UNSET + else: + flux = self.flux + + bl_sub_sample_id: int | None | Unset + if isinstance(self.bl_sub_sample_id, Unset): + bl_sub_sample_id = UNSET + else: + bl_sub_sample_id = self.bl_sub_sample_id + + flux_end: float | None | Unset + if isinstance(self.flux_end, Unset): + flux_end = UNSET + else: + flux_end = self.flux_end + + dat_full_path: None | str | Unset + if isinstance(self.dat_full_path, Unset): + dat_full_path = UNSET + else: + dat_full_path = self.dat_full_path + + magnification: float | None | Unset + if isinstance(self.magnification, Unset): + magnification = UNSET + else: + magnification = self.magnification + + total_absorbed_dose: float | None | Unset + if isinstance(self.total_absorbed_dose, Unset): + total_absorbed_dose = UNSET + else: + total_absorbed_dose = self.total_absorbed_dose + + binning: int | None | Unset + if isinstance(self.binning, Unset): + binning = UNSET + else: + binning = self.binning + + particle_diameter: float | None | Unset + if isinstance(self.particle_diameter, Unset): + particle_diameter = UNSET + else: + particle_diameter = self.particle_diameter + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + c2aperture: float | None | Unset + if isinstance(self.c2aperture, Unset): + c2aperture = UNSET + else: + c2aperture = self.c2aperture + + total_exposed_dose: float | None | Unset + if isinstance(self.total_exposed_dose, Unset): + total_exposed_dose = UNSET + else: + total_exposed_dose = self.total_exposed_dose + + phase_plate: int | None | Unset + if isinstance(self.phase_plate, Unset): + phase_plate = UNSET + else: + phase_plate = self.phase_plate + + data_collection_plan_id: int | None | Unset + if isinstance(self.data_collection_plan_id, Unset): + data_collection_plan_id = UNSET + else: + data_collection_plan_id = self.data_collection_plan_id + + data_collection_number: int | None | Unset + if isinstance(self.data_collection_number, Unset): + data_collection_number = UNSET + else: + data_collection_number = self.data_collection_number + + data_collection_group_id: int | None | Unset + if isinstance(self.data_collection_group_id, Unset): + data_collection_group_id = UNSET + else: + data_collection_group_id = self.data_collection_group_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comments is not UNSET: + field_dict["comments"] = comments + if start_time is not UNSET: + field_dict["startTime"] = start_time + if pixel_size_on_image is not UNSET: + field_dict["pixelSizeOnImage"] = pixel_size_on_image + if voltage is not UNSET: + field_dict["voltage"] = voltage + if image_size_x is not UNSET: + field_dict["imageSizeX"] = image_size_x + if image_size_y is not UNSET: + field_dict["imageSizeY"] = image_size_y + if experimenttype is not UNSET: + field_dict["experimenttype"] = experimenttype + if end_time is not UNSET: + field_dict["endTime"] = end_time + if run_status is not UNSET: + field_dict["runStatus"] = run_status + if axis_start is not UNSET: + field_dict["axisStart"] = axis_start + if axis_end is not UNSET: + field_dict["axisEnd"] = axis_end + if axis_range is not UNSET: + field_dict["axisRange"] = axis_range + if overlap is not UNSET: + field_dict["overlap"] = overlap + if number_of_images is not UNSET: + field_dict["numberOfImages"] = number_of_images + if start_image_number is not UNSET: + field_dict["startImageNumber"] = start_image_number + if number_of_passes is not UNSET: + field_dict["numberOfPasses"] = number_of_passes + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if image_directory is not UNSET: + field_dict["imageDirectory"] = image_directory + if image_prefix is not UNSET: + field_dict["imagePrefix"] = image_prefix + if image_suffix is not UNSET: + field_dict["imageSuffix"] = image_suffix + if image_container_sub_path is not UNSET: + field_dict["imageContainerSubPath"] = image_container_sub_path + if file_template is not UNSET: + field_dict["fileTemplate"] = file_template + if wavelength is not UNSET: + field_dict["wavelength"] = wavelength + if resolution is not UNSET: + field_dict["resolution"] = resolution + if detector_distance is not UNSET: + field_dict["detectorDistance"] = detector_distance + if x_beam is not UNSET: + field_dict["xBeam"] = x_beam + if y_beam is not UNSET: + field_dict["yBeam"] = y_beam + if printable_for_report is not UNSET: + field_dict["printableForReport"] = printable_for_report + if slit_gap_vertical is not UNSET: + field_dict["slitGapVertical"] = slit_gap_vertical + if slit_gap_horizontal is not UNSET: + field_dict["slitGapHorizontal"] = slit_gap_horizontal + if transmission is not UNSET: + field_dict["transmission"] = transmission + if synchrotron_mode is not UNSET: + field_dict["synchrotronMode"] = synchrotron_mode + if xtal_snapshot_full_path_1 is not UNSET: + field_dict["xtalSnapshotFullPath1"] = xtal_snapshot_full_path_1 + if xtal_snapshot_full_path_2 is not UNSET: + field_dict["xtalSnapshotFullPath2"] = xtal_snapshot_full_path_2 + if xtal_snapshot_full_path_3 is not UNSET: + field_dict["xtalSnapshotFullPath3"] = xtal_snapshot_full_path_3 + if xtal_snapshot_full_path_4 is not UNSET: + field_dict["xtalSnapshotFullPath4"] = xtal_snapshot_full_path_4 + if rotation_axis is not UNSET: + field_dict["rotationAxis"] = rotation_axis + if phi_start is not UNSET: + field_dict["phiStart"] = phi_start + if kappa_start is not UNSET: + field_dict["kappaStart"] = kappa_start + if omega_start is not UNSET: + field_dict["omegaStart"] = omega_start + if chi_start is not UNSET: + field_dict["chiStart"] = chi_start + if detector_2_theta is not UNSET: + field_dict["detector2Theta"] = detector_2_theta + if detector_mode is not UNSET: + field_dict["detectorMode"] = detector_mode + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if undulator_gap_1 is not UNSET: + field_dict["undulatorGap1"] = undulator_gap_1 + if undulator_gap_2 is not UNSET: + field_dict["undulatorGap2"] = undulator_gap_2 + if undulator_gap_3 is not UNSET: + field_dict["undulatorGap3"] = undulator_gap_3 + if beam_size_at_sample_x is not UNSET: + field_dict["beamSizeAtSampleX"] = beam_size_at_sample_x + if beam_size_at_sample_y is not UNSET: + field_dict["beamSizeAtSampleY"] = beam_size_at_sample_y + if centering_method is not UNSET: + field_dict["centeringMethod"] = centering_method + if detector_id is not UNSET: + field_dict["detectorId"] = detector_id + if flux is not UNSET: + field_dict["flux"] = flux + if bl_sub_sample_id is not UNSET: + field_dict["blSubSampleId"] = bl_sub_sample_id + if flux_end is not UNSET: + field_dict["flux_end"] = flux_end + if dat_full_path is not UNSET: + field_dict["datFullPath"] = dat_full_path + if magnification is not UNSET: + field_dict["magnification"] = magnification + if total_absorbed_dose is not UNSET: + field_dict["totalAbsorbedDose"] = total_absorbed_dose + if binning is not UNSET: + field_dict["binning"] = binning + if particle_diameter is not UNSET: + field_dict["particleDiameter"] = particle_diameter + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if c2aperture is not UNSET: + field_dict["c2aperture"] = c2aperture + if total_exposed_dose is not UNSET: + field_dict["totalExposedDose"] = total_exposed_dose + if phase_plate is not UNSET: + field_dict["phasePlate"] = phase_plate + if data_collection_plan_id is not UNSET: + field_dict["dataCollectionPlanId"] = data_collection_plan_id + if data_collection_number is not UNSET: + field_dict["dataCollectionNumber"] = data_collection_number + if data_collection_group_id is not UNSET: + field_dict["dataCollectionGroupId"] = data_collection_group_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_pixel_size_on_image(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size_on_image = _parse_pixel_size_on_image(d.pop("pixelSizeOnImage", UNSET)) + + def _parse_voltage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + voltage = _parse_voltage(d.pop("voltage", UNSET)) + + def _parse_image_size_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_size_x = _parse_image_size_x(d.pop("imageSizeX", UNSET)) + + def _parse_image_size_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_size_y = _parse_image_size_y(d.pop("imageSizeY", UNSET)) + + def _parse_experimenttype(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + experimenttype = _parse_experimenttype(d.pop("experimenttype", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_run_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + run_status = _parse_run_status(d.pop("runStatus", UNSET)) + + def _parse_axis_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_start = _parse_axis_start(d.pop("axisStart", UNSET)) + + def _parse_axis_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_end = _parse_axis_end(d.pop("axisEnd", UNSET)) + + def _parse_axis_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_range = _parse_axis_range(d.pop("axisRange", UNSET)) + + def _parse_overlap(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overlap = _parse_overlap(d.pop("overlap", UNSET)) + + def _parse_number_of_images(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_images = _parse_number_of_images(d.pop("numberOfImages", UNSET)) + + def _parse_start_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + start_image_number = _parse_start_image_number(d.pop("startImageNumber", UNSET)) + + def _parse_number_of_passes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_passes = _parse_number_of_passes(d.pop("numberOfPasses", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_image_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_directory = _parse_image_directory(d.pop("imageDirectory", UNSET)) + + def _parse_image_prefix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_prefix = _parse_image_prefix(d.pop("imagePrefix", UNSET)) + + def _parse_image_suffix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_suffix = _parse_image_suffix(d.pop("imageSuffix", UNSET)) + + def _parse_image_container_sub_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_container_sub_path = _parse_image_container_sub_path(d.pop("imageContainerSubPath", UNSET)) + + def _parse_file_template(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_template = _parse_file_template(d.pop("fileTemplate", UNSET)) + + def _parse_wavelength(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wavelength = _parse_wavelength(d.pop("wavelength", UNSET)) + + def _parse_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution = _parse_resolution(d.pop("resolution", UNSET)) + + def _parse_detector_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + detector_distance = _parse_detector_distance(d.pop("detectorDistance", UNSET)) + + def _parse_x_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_beam = _parse_x_beam(d.pop("xBeam", UNSET)) + + def _parse_y_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y_beam = _parse_y_beam(d.pop("yBeam", UNSET)) + + def _parse_printable_for_report(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + printable_for_report = _parse_printable_for_report(d.pop("printableForReport", UNSET)) + + def _parse_slit_gap_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + slit_gap_vertical = _parse_slit_gap_vertical(d.pop("slitGapVertical", UNSET)) + + def _parse_slit_gap_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + slit_gap_horizontal = _parse_slit_gap_horizontal(d.pop("slitGapHorizontal", UNSET)) + + def _parse_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission = _parse_transmission(d.pop("transmission", UNSET)) + + def _parse_synchrotron_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + synchrotron_mode = _parse_synchrotron_mode(d.pop("synchrotronMode", UNSET)) + + def _parse_xtal_snapshot_full_path_1(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_1 = _parse_xtal_snapshot_full_path_1(d.pop("xtalSnapshotFullPath1", UNSET)) + + def _parse_xtal_snapshot_full_path_2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_2 = _parse_xtal_snapshot_full_path_2(d.pop("xtalSnapshotFullPath2", UNSET)) + + def _parse_xtal_snapshot_full_path_3(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_3 = _parse_xtal_snapshot_full_path_3(d.pop("xtalSnapshotFullPath3", UNSET)) + + def _parse_xtal_snapshot_full_path_4(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_4 = _parse_xtal_snapshot_full_path_4(d.pop("xtalSnapshotFullPath4", UNSET)) + + def _parse_rotation_axis(data: object) -> None | RotationAxisEnum | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + rotation_axis_type_0 = RotationAxisEnum(data) + + return rotation_axis_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RotationAxisEnum | Unset, data) + + rotation_axis = _parse_rotation_axis(d.pop("rotationAxis", UNSET)) + + def _parse_phi_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + phi_start = _parse_phi_start(d.pop("phiStart", UNSET)) + + def _parse_kappa_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + kappa_start = _parse_kappa_start(d.pop("kappaStart", UNSET)) + + def _parse_omega_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + omega_start = _parse_omega_start(d.pop("omegaStart", UNSET)) + + def _parse_chi_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + chi_start = _parse_chi_start(d.pop("chiStart", UNSET)) + + def _parse_detector_2_theta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + detector_2_theta = _parse_detector_2_theta(d.pop("detector2Theta", UNSET)) + + def _parse_detector_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detector_mode = _parse_detector_mode(d.pop("detectorMode", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_undulator_gap_1(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_1 = _parse_undulator_gap_1(d.pop("undulatorGap1", UNSET)) + + def _parse_undulator_gap_2(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_2 = _parse_undulator_gap_2(d.pop("undulatorGap2", UNSET)) + + def _parse_undulator_gap_3(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_3 = _parse_undulator_gap_3(d.pop("undulatorGap3", UNSET)) + + def _parse_beam_size_at_sample_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_at_sample_x = _parse_beam_size_at_sample_x(d.pop("beamSizeAtSampleX", UNSET)) + + def _parse_beam_size_at_sample_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_at_sample_y = _parse_beam_size_at_sample_y(d.pop("beamSizeAtSampleY", UNSET)) + + def _parse_centering_method(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + centering_method = _parse_centering_method(d.pop("centeringMethod", UNSET)) + + def _parse_detector_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + detector_id = _parse_detector_id(d.pop("detectorId", UNSET)) + + def _parse_flux(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux = _parse_flux(d.pop("flux", UNSET)) + + def _parse_bl_sub_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sub_sample_id = _parse_bl_sub_sample_id(d.pop("blSubSampleId", UNSET)) + + def _parse_flux_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux_end = _parse_flux_end(d.pop("flux_end", UNSET)) + + def _parse_dat_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dat_full_path = _parse_dat_full_path(d.pop("datFullPath", UNSET)) + + def _parse_magnification(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + magnification = _parse_magnification(d.pop("magnification", UNSET)) + + def _parse_total_absorbed_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_absorbed_dose = _parse_total_absorbed_dose(d.pop("totalAbsorbedDose", UNSET)) + + def _parse_binning(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + binning = _parse_binning(d.pop("binning", UNSET)) + + def _parse_particle_diameter(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + particle_diameter = _parse_particle_diameter(d.pop("particleDiameter", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_c2aperture(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + c2aperture = _parse_c2aperture(d.pop("c2aperture", UNSET)) + + def _parse_total_exposed_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_exposed_dose = _parse_total_exposed_dose(d.pop("totalExposedDose", UNSET)) + + def _parse_phase_plate(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + phase_plate = _parse_phase_plate(d.pop("phasePlate", UNSET)) + + def _parse_data_collection_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_plan_id = _parse_data_collection_plan_id(d.pop("dataCollectionPlanId", UNSET)) + + def _parse_data_collection_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_number = _parse_data_collection_number(d.pop("dataCollectionNumber", UNSET)) + + def _parse_data_collection_group_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_group_id = _parse_data_collection_group_id(d.pop("dataCollectionGroupId", UNSET)) + + data_collection_optional = cls( + comments=comments, + start_time=start_time, + pixel_size_on_image=pixel_size_on_image, + voltage=voltage, + image_size_x=image_size_x, + image_size_y=image_size_y, + experimenttype=experimenttype, + end_time=end_time, + run_status=run_status, + axis_start=axis_start, + axis_end=axis_end, + axis_range=axis_range, + overlap=overlap, + number_of_images=number_of_images, + start_image_number=start_image_number, + number_of_passes=number_of_passes, + exposure_time=exposure_time, + image_directory=image_directory, + image_prefix=image_prefix, + image_suffix=image_suffix, + image_container_sub_path=image_container_sub_path, + file_template=file_template, + wavelength=wavelength, + resolution=resolution, + detector_distance=detector_distance, + x_beam=x_beam, + y_beam=y_beam, + printable_for_report=printable_for_report, + slit_gap_vertical=slit_gap_vertical, + slit_gap_horizontal=slit_gap_horizontal, + transmission=transmission, + synchrotron_mode=synchrotron_mode, + xtal_snapshot_full_path_1=xtal_snapshot_full_path_1, + xtal_snapshot_full_path_2=xtal_snapshot_full_path_2, + xtal_snapshot_full_path_3=xtal_snapshot_full_path_3, + xtal_snapshot_full_path_4=xtal_snapshot_full_path_4, + rotation_axis=rotation_axis, + phi_start=phi_start, + kappa_start=kappa_start, + omega_start=omega_start, + chi_start=chi_start, + detector_2_theta=detector_2_theta, + detector_mode=detector_mode, + sample_id=sample_id, + undulator_gap_1=undulator_gap_1, + undulator_gap_2=undulator_gap_2, + undulator_gap_3=undulator_gap_3, + beam_size_at_sample_x=beam_size_at_sample_x, + beam_size_at_sample_y=beam_size_at_sample_y, + centering_method=centering_method, + detector_id=detector_id, + flux=flux, + bl_sub_sample_id=bl_sub_sample_id, + flux_end=flux_end, + dat_full_path=dat_full_path, + magnification=magnification, + total_absorbed_dose=total_absorbed_dose, + binning=binning, + particle_diameter=particle_diameter, + min_resolution=min_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + c2aperture=c2aperture, + total_exposed_dose=total_exposed_dose, + phase_plate=phase_plate, + data_collection_plan_id=data_collection_plan_id, + data_collection_number=data_collection_number, + data_collection_group_id=data_collection_group_id, + ) + + data_collection_optional.additional_properties = d + return data_collection_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/data_collection_out.py b/src/lims_utils/expeye_client/models/data_collection_out.py new file mode 100644 index 0000000..673382f --- /dev/null +++ b/src/lims_utils/expeye_client/models/data_collection_out.py @@ -0,0 +1,1468 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.rotation_axis_enum import RotationAxisEnum +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DataCollectionOut") + + +@_attrs_define +class DataCollectionOut: + """ + Attributes: + data_collection_id (int): + data_collection_group_id (int): + proposal_reference (str): + visit_number (int): + beam_line_name (str): + comments (None | str | Unset): + start_time (datetime.datetime | None | Unset): Start time of the dataCollection + pixel_size_on_image (float | None | Unset): Pixel size on image, calculated from magnification + voltage (float | None | Unset): Unit: kV + image_size_x (int | None | Unset): Image size in x, in case crop has been used. + image_size_y (int | None | Unset): Image size in y, in case crop has been used. + experimenttype (None | str | Unset): + end_time (datetime.datetime | None | Unset): End time of the dataCollection + run_status (None | str | Unset): + axis_start (float | None | Unset): + axis_end (float | None | Unset): + axis_range (float | None | Unset): + overlap (float | None | Unset): + number_of_images (int | None | Unset): + start_image_number (int | None | Unset): + number_of_passes (int | None | Unset): + exposure_time (float | None | Unset): + image_directory (None | str | Unset): The directory where files reside - should end with a slash + image_prefix (None | str | Unset): + image_suffix (None | str | Unset): + image_container_sub_path (None | str | Unset): Internal path of a HDF5 file pointing to the data + for this data collection + file_template (None | str | Unset): + wavelength (float | None | Unset): + resolution (float | None | Unset): + detector_distance (float | None | Unset): + x_beam (float | None | Unset): + y_beam (float | None | Unset): + printable_for_report (int | None | Unset): + slit_gap_vertical (float | None | Unset): + slit_gap_horizontal (float | None | Unset): + transmission (float | None | Unset): + synchrotron_mode (None | str | Unset): + xtal_snapshot_full_path_1 (None | str | Unset): + xtal_snapshot_full_path_2 (None | str | Unset): + xtal_snapshot_full_path_3 (None | str | Unset): + xtal_snapshot_full_path_4 (None | str | Unset): + rotation_axis (None | RotationAxisEnum | Unset): + phi_start (float | None | Unset): + kappa_start (float | None | Unset): + omega_start (float | None | Unset): + chi_start (float | None | Unset): + detector_2_theta (float | None | Unset): + detector_mode (None | str | Unset): + sample_id (int | None | Unset): + undulator_gap_1 (float | None | Unset): + undulator_gap_2 (float | None | Unset): + undulator_gap_3 (float | None | Unset): + beam_size_at_sample_x (float | None | Unset): + beam_size_at_sample_y (float | None | Unset): + centering_method (None | str | Unset): + detector_id (int | None | Unset): + flux (float | None | Unset): + bl_sub_sample_id (int | None | Unset): + flux_end (float | None | Unset): + dat_full_path (None | str | Unset): + magnification (float | None | Unset): + total_absorbed_dose (float | None | Unset): + binning (int | None | Unset): + particle_diameter (float | None | Unset): + min_resolution (float | None | Unset): + min_defocus (float | None | Unset): + max_defocus (float | None | Unset): + c2aperture (float | None | Unset): + total_exposed_dose (float | None | Unset): + phase_plate (int | None | Unset): + data_collection_plan_id (int | None | Unset): + data_collection_number (int | None | Unset): + """ + + data_collection_id: int + data_collection_group_id: int + proposal_reference: str + visit_number: int + beam_line_name: str + comments: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + pixel_size_on_image: float | None | Unset = UNSET + voltage: float | None | Unset = UNSET + image_size_x: int | None | Unset = UNSET + image_size_y: int | None | Unset = UNSET + experimenttype: None | str | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + run_status: None | str | Unset = UNSET + axis_start: float | None | Unset = UNSET + axis_end: float | None | Unset = UNSET + axis_range: float | None | Unset = UNSET + overlap: float | None | Unset = UNSET + number_of_images: int | None | Unset = UNSET + start_image_number: int | None | Unset = UNSET + number_of_passes: int | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + image_directory: None | str | Unset = UNSET + image_prefix: None | str | Unset = UNSET + image_suffix: None | str | Unset = UNSET + image_container_sub_path: None | str | Unset = UNSET + file_template: None | str | Unset = UNSET + wavelength: float | None | Unset = UNSET + resolution: float | None | Unset = UNSET + detector_distance: float | None | Unset = UNSET + x_beam: float | None | Unset = UNSET + y_beam: float | None | Unset = UNSET + printable_for_report: int | None | Unset = UNSET + slit_gap_vertical: float | None | Unset = UNSET + slit_gap_horizontal: float | None | Unset = UNSET + transmission: float | None | Unset = UNSET + synchrotron_mode: None | str | Unset = UNSET + xtal_snapshot_full_path_1: None | str | Unset = UNSET + xtal_snapshot_full_path_2: None | str | Unset = UNSET + xtal_snapshot_full_path_3: None | str | Unset = UNSET + xtal_snapshot_full_path_4: None | str | Unset = UNSET + rotation_axis: None | RotationAxisEnum | Unset = UNSET + phi_start: float | None | Unset = UNSET + kappa_start: float | None | Unset = UNSET + omega_start: float | None | Unset = UNSET + chi_start: float | None | Unset = UNSET + detector_2_theta: float | None | Unset = UNSET + detector_mode: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + undulator_gap_1: float | None | Unset = UNSET + undulator_gap_2: float | None | Unset = UNSET + undulator_gap_3: float | None | Unset = UNSET + beam_size_at_sample_x: float | None | Unset = UNSET + beam_size_at_sample_y: float | None | Unset = UNSET + centering_method: None | str | Unset = UNSET + detector_id: int | None | Unset = UNSET + flux: float | None | Unset = UNSET + bl_sub_sample_id: int | None | Unset = UNSET + flux_end: float | None | Unset = UNSET + dat_full_path: None | str | Unset = UNSET + magnification: float | None | Unset = UNSET + total_absorbed_dose: float | None | Unset = UNSET + binning: int | None | Unset = UNSET + particle_diameter: float | None | Unset = UNSET + min_resolution: float | None | Unset = UNSET + min_defocus: float | None | Unset = UNSET + max_defocus: float | None | Unset = UNSET + c2aperture: float | None | Unset = UNSET + total_exposed_dose: float | None | Unset = UNSET + phase_plate: int | None | Unset = UNSET + data_collection_plan_id: int | None | Unset = UNSET + data_collection_number: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + data_collection_id = self.data_collection_id + + data_collection_group_id = self.data_collection_group_id + + proposal_reference = self.proposal_reference + + visit_number = self.visit_number + + beam_line_name = self.beam_line_name + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + pixel_size_on_image: float | None | Unset + if isinstance(self.pixel_size_on_image, Unset): + pixel_size_on_image = UNSET + else: + pixel_size_on_image = self.pixel_size_on_image + + voltage: float | None | Unset + if isinstance(self.voltage, Unset): + voltage = UNSET + else: + voltage = self.voltage + + image_size_x: int | None | Unset + if isinstance(self.image_size_x, Unset): + image_size_x = UNSET + else: + image_size_x = self.image_size_x + + image_size_y: int | None | Unset + if isinstance(self.image_size_y, Unset): + image_size_y = UNSET + else: + image_size_y = self.image_size_y + + experimenttype: None | str | Unset + if isinstance(self.experimenttype, Unset): + experimenttype = UNSET + else: + experimenttype = self.experimenttype + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + run_status: None | str | Unset + if isinstance(self.run_status, Unset): + run_status = UNSET + else: + run_status = self.run_status + + axis_start: float | None | Unset + if isinstance(self.axis_start, Unset): + axis_start = UNSET + else: + axis_start = self.axis_start + + axis_end: float | None | Unset + if isinstance(self.axis_end, Unset): + axis_end = UNSET + else: + axis_end = self.axis_end + + axis_range: float | None | Unset + if isinstance(self.axis_range, Unset): + axis_range = UNSET + else: + axis_range = self.axis_range + + overlap: float | None | Unset + if isinstance(self.overlap, Unset): + overlap = UNSET + else: + overlap = self.overlap + + number_of_images: int | None | Unset + if isinstance(self.number_of_images, Unset): + number_of_images = UNSET + else: + number_of_images = self.number_of_images + + start_image_number: int | None | Unset + if isinstance(self.start_image_number, Unset): + start_image_number = UNSET + else: + start_image_number = self.start_image_number + + number_of_passes: int | None | Unset + if isinstance(self.number_of_passes, Unset): + number_of_passes = UNSET + else: + number_of_passes = self.number_of_passes + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + image_directory: None | str | Unset + if isinstance(self.image_directory, Unset): + image_directory = UNSET + else: + image_directory = self.image_directory + + image_prefix: None | str | Unset + if isinstance(self.image_prefix, Unset): + image_prefix = UNSET + else: + image_prefix = self.image_prefix + + image_suffix: None | str | Unset + if isinstance(self.image_suffix, Unset): + image_suffix = UNSET + else: + image_suffix = self.image_suffix + + image_container_sub_path: None | str | Unset + if isinstance(self.image_container_sub_path, Unset): + image_container_sub_path = UNSET + else: + image_container_sub_path = self.image_container_sub_path + + file_template: None | str | Unset + if isinstance(self.file_template, Unset): + file_template = UNSET + else: + file_template = self.file_template + + wavelength: float | None | Unset + if isinstance(self.wavelength, Unset): + wavelength = UNSET + else: + wavelength = self.wavelength + + resolution: float | None | Unset + if isinstance(self.resolution, Unset): + resolution = UNSET + else: + resolution = self.resolution + + detector_distance: float | None | Unset + if isinstance(self.detector_distance, Unset): + detector_distance = UNSET + else: + detector_distance = self.detector_distance + + x_beam: float | None | Unset + if isinstance(self.x_beam, Unset): + x_beam = UNSET + else: + x_beam = self.x_beam + + y_beam: float | None | Unset + if isinstance(self.y_beam, Unset): + y_beam = UNSET + else: + y_beam = self.y_beam + + printable_for_report: int | None | Unset + if isinstance(self.printable_for_report, Unset): + printable_for_report = UNSET + else: + printable_for_report = self.printable_for_report + + slit_gap_vertical: float | None | Unset + if isinstance(self.slit_gap_vertical, Unset): + slit_gap_vertical = UNSET + else: + slit_gap_vertical = self.slit_gap_vertical + + slit_gap_horizontal: float | None | Unset + if isinstance(self.slit_gap_horizontal, Unset): + slit_gap_horizontal = UNSET + else: + slit_gap_horizontal = self.slit_gap_horizontal + + transmission: float | None | Unset + if isinstance(self.transmission, Unset): + transmission = UNSET + else: + transmission = self.transmission + + synchrotron_mode: None | str | Unset + if isinstance(self.synchrotron_mode, Unset): + synchrotron_mode = UNSET + else: + synchrotron_mode = self.synchrotron_mode + + xtal_snapshot_full_path_1: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_1, Unset): + xtal_snapshot_full_path_1 = UNSET + else: + xtal_snapshot_full_path_1 = self.xtal_snapshot_full_path_1 + + xtal_snapshot_full_path_2: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_2, Unset): + xtal_snapshot_full_path_2 = UNSET + else: + xtal_snapshot_full_path_2 = self.xtal_snapshot_full_path_2 + + xtal_snapshot_full_path_3: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_3, Unset): + xtal_snapshot_full_path_3 = UNSET + else: + xtal_snapshot_full_path_3 = self.xtal_snapshot_full_path_3 + + xtal_snapshot_full_path_4: None | str | Unset + if isinstance(self.xtal_snapshot_full_path_4, Unset): + xtal_snapshot_full_path_4 = UNSET + else: + xtal_snapshot_full_path_4 = self.xtal_snapshot_full_path_4 + + rotation_axis: None | str | Unset + if isinstance(self.rotation_axis, Unset): + rotation_axis = UNSET + elif isinstance(self.rotation_axis, RotationAxisEnum): + rotation_axis = self.rotation_axis.value + else: + rotation_axis = self.rotation_axis + + phi_start: float | None | Unset + if isinstance(self.phi_start, Unset): + phi_start = UNSET + else: + phi_start = self.phi_start + + kappa_start: float | None | Unset + if isinstance(self.kappa_start, Unset): + kappa_start = UNSET + else: + kappa_start = self.kappa_start + + omega_start: float | None | Unset + if isinstance(self.omega_start, Unset): + omega_start = UNSET + else: + omega_start = self.omega_start + + chi_start: float | None | Unset + if isinstance(self.chi_start, Unset): + chi_start = UNSET + else: + chi_start = self.chi_start + + detector_2_theta: float | None | Unset + if isinstance(self.detector_2_theta, Unset): + detector_2_theta = UNSET + else: + detector_2_theta = self.detector_2_theta + + detector_mode: None | str | Unset + if isinstance(self.detector_mode, Unset): + detector_mode = UNSET + else: + detector_mode = self.detector_mode + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + undulator_gap_1: float | None | Unset + if isinstance(self.undulator_gap_1, Unset): + undulator_gap_1 = UNSET + else: + undulator_gap_1 = self.undulator_gap_1 + + undulator_gap_2: float | None | Unset + if isinstance(self.undulator_gap_2, Unset): + undulator_gap_2 = UNSET + else: + undulator_gap_2 = self.undulator_gap_2 + + undulator_gap_3: float | None | Unset + if isinstance(self.undulator_gap_3, Unset): + undulator_gap_3 = UNSET + else: + undulator_gap_3 = self.undulator_gap_3 + + beam_size_at_sample_x: float | None | Unset + if isinstance(self.beam_size_at_sample_x, Unset): + beam_size_at_sample_x = UNSET + else: + beam_size_at_sample_x = self.beam_size_at_sample_x + + beam_size_at_sample_y: float | None | Unset + if isinstance(self.beam_size_at_sample_y, Unset): + beam_size_at_sample_y = UNSET + else: + beam_size_at_sample_y = self.beam_size_at_sample_y + + centering_method: None | str | Unset + if isinstance(self.centering_method, Unset): + centering_method = UNSET + else: + centering_method = self.centering_method + + detector_id: int | None | Unset + if isinstance(self.detector_id, Unset): + detector_id = UNSET + else: + detector_id = self.detector_id + + flux: float | None | Unset + if isinstance(self.flux, Unset): + flux = UNSET + else: + flux = self.flux + + bl_sub_sample_id: int | None | Unset + if isinstance(self.bl_sub_sample_id, Unset): + bl_sub_sample_id = UNSET + else: + bl_sub_sample_id = self.bl_sub_sample_id + + flux_end: float | None | Unset + if isinstance(self.flux_end, Unset): + flux_end = UNSET + else: + flux_end = self.flux_end + + dat_full_path: None | str | Unset + if isinstance(self.dat_full_path, Unset): + dat_full_path = UNSET + else: + dat_full_path = self.dat_full_path + + magnification: float | None | Unset + if isinstance(self.magnification, Unset): + magnification = UNSET + else: + magnification = self.magnification + + total_absorbed_dose: float | None | Unset + if isinstance(self.total_absorbed_dose, Unset): + total_absorbed_dose = UNSET + else: + total_absorbed_dose = self.total_absorbed_dose + + binning: int | None | Unset + if isinstance(self.binning, Unset): + binning = UNSET + else: + binning = self.binning + + particle_diameter: float | None | Unset + if isinstance(self.particle_diameter, Unset): + particle_diameter = UNSET + else: + particle_diameter = self.particle_diameter + + min_resolution: float | None | Unset + if isinstance(self.min_resolution, Unset): + min_resolution = UNSET + else: + min_resolution = self.min_resolution + + min_defocus: float | None | Unset + if isinstance(self.min_defocus, Unset): + min_defocus = UNSET + else: + min_defocus = self.min_defocus + + max_defocus: float | None | Unset + if isinstance(self.max_defocus, Unset): + max_defocus = UNSET + else: + max_defocus = self.max_defocus + + c2aperture: float | None | Unset + if isinstance(self.c2aperture, Unset): + c2aperture = UNSET + else: + c2aperture = self.c2aperture + + total_exposed_dose: float | None | Unset + if isinstance(self.total_exposed_dose, Unset): + total_exposed_dose = UNSET + else: + total_exposed_dose = self.total_exposed_dose + + phase_plate: int | None | Unset + if isinstance(self.phase_plate, Unset): + phase_plate = UNSET + else: + phase_plate = self.phase_plate + + data_collection_plan_id: int | None | Unset + if isinstance(self.data_collection_plan_id, Unset): + data_collection_plan_id = UNSET + else: + data_collection_plan_id = self.data_collection_plan_id + + data_collection_number: int | None | Unset + if isinstance(self.data_collection_number, Unset): + data_collection_number = UNSET + else: + data_collection_number = self.data_collection_number + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dataCollectionId": data_collection_id, + "dataCollectionGroupId": data_collection_group_id, + "proposalReference": proposal_reference, + "visitNumber": visit_number, + "beamLineName": beam_line_name, + } + ) + if comments is not UNSET: + field_dict["comments"] = comments + if start_time is not UNSET: + field_dict["startTime"] = start_time + if pixel_size_on_image is not UNSET: + field_dict["pixelSizeOnImage"] = pixel_size_on_image + if voltage is not UNSET: + field_dict["voltage"] = voltage + if image_size_x is not UNSET: + field_dict["imageSizeX"] = image_size_x + if image_size_y is not UNSET: + field_dict["imageSizeY"] = image_size_y + if experimenttype is not UNSET: + field_dict["experimenttype"] = experimenttype + if end_time is not UNSET: + field_dict["endTime"] = end_time + if run_status is not UNSET: + field_dict["runStatus"] = run_status + if axis_start is not UNSET: + field_dict["axisStart"] = axis_start + if axis_end is not UNSET: + field_dict["axisEnd"] = axis_end + if axis_range is not UNSET: + field_dict["axisRange"] = axis_range + if overlap is not UNSET: + field_dict["overlap"] = overlap + if number_of_images is not UNSET: + field_dict["numberOfImages"] = number_of_images + if start_image_number is not UNSET: + field_dict["startImageNumber"] = start_image_number + if number_of_passes is not UNSET: + field_dict["numberOfPasses"] = number_of_passes + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if image_directory is not UNSET: + field_dict["imageDirectory"] = image_directory + if image_prefix is not UNSET: + field_dict["imagePrefix"] = image_prefix + if image_suffix is not UNSET: + field_dict["imageSuffix"] = image_suffix + if image_container_sub_path is not UNSET: + field_dict["imageContainerSubPath"] = image_container_sub_path + if file_template is not UNSET: + field_dict["fileTemplate"] = file_template + if wavelength is not UNSET: + field_dict["wavelength"] = wavelength + if resolution is not UNSET: + field_dict["resolution"] = resolution + if detector_distance is not UNSET: + field_dict["detectorDistance"] = detector_distance + if x_beam is not UNSET: + field_dict["xBeam"] = x_beam + if y_beam is not UNSET: + field_dict["yBeam"] = y_beam + if printable_for_report is not UNSET: + field_dict["printableForReport"] = printable_for_report + if slit_gap_vertical is not UNSET: + field_dict["slitGapVertical"] = slit_gap_vertical + if slit_gap_horizontal is not UNSET: + field_dict["slitGapHorizontal"] = slit_gap_horizontal + if transmission is not UNSET: + field_dict["transmission"] = transmission + if synchrotron_mode is not UNSET: + field_dict["synchrotronMode"] = synchrotron_mode + if xtal_snapshot_full_path_1 is not UNSET: + field_dict["xtalSnapshotFullPath1"] = xtal_snapshot_full_path_1 + if xtal_snapshot_full_path_2 is not UNSET: + field_dict["xtalSnapshotFullPath2"] = xtal_snapshot_full_path_2 + if xtal_snapshot_full_path_3 is not UNSET: + field_dict["xtalSnapshotFullPath3"] = xtal_snapshot_full_path_3 + if xtal_snapshot_full_path_4 is not UNSET: + field_dict["xtalSnapshotFullPath4"] = xtal_snapshot_full_path_4 + if rotation_axis is not UNSET: + field_dict["rotationAxis"] = rotation_axis + if phi_start is not UNSET: + field_dict["phiStart"] = phi_start + if kappa_start is not UNSET: + field_dict["kappaStart"] = kappa_start + if omega_start is not UNSET: + field_dict["omegaStart"] = omega_start + if chi_start is not UNSET: + field_dict["chiStart"] = chi_start + if detector_2_theta is not UNSET: + field_dict["detector2Theta"] = detector_2_theta + if detector_mode is not UNSET: + field_dict["detectorMode"] = detector_mode + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if undulator_gap_1 is not UNSET: + field_dict["undulatorGap1"] = undulator_gap_1 + if undulator_gap_2 is not UNSET: + field_dict["undulatorGap2"] = undulator_gap_2 + if undulator_gap_3 is not UNSET: + field_dict["undulatorGap3"] = undulator_gap_3 + if beam_size_at_sample_x is not UNSET: + field_dict["beamSizeAtSampleX"] = beam_size_at_sample_x + if beam_size_at_sample_y is not UNSET: + field_dict["beamSizeAtSampleY"] = beam_size_at_sample_y + if centering_method is not UNSET: + field_dict["centeringMethod"] = centering_method + if detector_id is not UNSET: + field_dict["detectorId"] = detector_id + if flux is not UNSET: + field_dict["flux"] = flux + if bl_sub_sample_id is not UNSET: + field_dict["blSubSampleId"] = bl_sub_sample_id + if flux_end is not UNSET: + field_dict["flux_end"] = flux_end + if dat_full_path is not UNSET: + field_dict["datFullPath"] = dat_full_path + if magnification is not UNSET: + field_dict["magnification"] = magnification + if total_absorbed_dose is not UNSET: + field_dict["totalAbsorbedDose"] = total_absorbed_dose + if binning is not UNSET: + field_dict["binning"] = binning + if particle_diameter is not UNSET: + field_dict["particleDiameter"] = particle_diameter + if min_resolution is not UNSET: + field_dict["minResolution"] = min_resolution + if min_defocus is not UNSET: + field_dict["minDefocus"] = min_defocus + if max_defocus is not UNSET: + field_dict["maxDefocus"] = max_defocus + if c2aperture is not UNSET: + field_dict["c2aperture"] = c2aperture + if total_exposed_dose is not UNSET: + field_dict["totalExposedDose"] = total_exposed_dose + if phase_plate is not UNSET: + field_dict["phasePlate"] = phase_plate + if data_collection_plan_id is not UNSET: + field_dict["dataCollectionPlanId"] = data_collection_plan_id + if data_collection_number is not UNSET: + field_dict["dataCollectionNumber"] = data_collection_number + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + data_collection_id = d.pop("dataCollectionId") + + data_collection_group_id = d.pop("dataCollectionGroupId") + + proposal_reference = d.pop("proposalReference") + + visit_number = d.pop("visitNumber") + + beam_line_name = d.pop("beamLineName") + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_pixel_size_on_image(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size_on_image = _parse_pixel_size_on_image(d.pop("pixelSizeOnImage", UNSET)) + + def _parse_voltage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + voltage = _parse_voltage(d.pop("voltage", UNSET)) + + def _parse_image_size_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_size_x = _parse_image_size_x(d.pop("imageSizeX", UNSET)) + + def _parse_image_size_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_size_y = _parse_image_size_y(d.pop("imageSizeY", UNSET)) + + def _parse_experimenttype(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + experimenttype = _parse_experimenttype(d.pop("experimenttype", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_run_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + run_status = _parse_run_status(d.pop("runStatus", UNSET)) + + def _parse_axis_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_start = _parse_axis_start(d.pop("axisStart", UNSET)) + + def _parse_axis_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_end = _parse_axis_end(d.pop("axisEnd", UNSET)) + + def _parse_axis_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_range = _parse_axis_range(d.pop("axisRange", UNSET)) + + def _parse_overlap(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + overlap = _parse_overlap(d.pop("overlap", UNSET)) + + def _parse_number_of_images(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_images = _parse_number_of_images(d.pop("numberOfImages", UNSET)) + + def _parse_start_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + start_image_number = _parse_start_image_number(d.pop("startImageNumber", UNSET)) + + def _parse_number_of_passes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_passes = _parse_number_of_passes(d.pop("numberOfPasses", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_image_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_directory = _parse_image_directory(d.pop("imageDirectory", UNSET)) + + def _parse_image_prefix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_prefix = _parse_image_prefix(d.pop("imagePrefix", UNSET)) + + def _parse_image_suffix(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_suffix = _parse_image_suffix(d.pop("imageSuffix", UNSET)) + + def _parse_image_container_sub_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_container_sub_path = _parse_image_container_sub_path(d.pop("imageContainerSubPath", UNSET)) + + def _parse_file_template(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_template = _parse_file_template(d.pop("fileTemplate", UNSET)) + + def _parse_wavelength(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wavelength = _parse_wavelength(d.pop("wavelength", UNSET)) + + def _parse_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution = _parse_resolution(d.pop("resolution", UNSET)) + + def _parse_detector_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + detector_distance = _parse_detector_distance(d.pop("detectorDistance", UNSET)) + + def _parse_x_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_beam = _parse_x_beam(d.pop("xBeam", UNSET)) + + def _parse_y_beam(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y_beam = _parse_y_beam(d.pop("yBeam", UNSET)) + + def _parse_printable_for_report(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + printable_for_report = _parse_printable_for_report(d.pop("printableForReport", UNSET)) + + def _parse_slit_gap_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + slit_gap_vertical = _parse_slit_gap_vertical(d.pop("slitGapVertical", UNSET)) + + def _parse_slit_gap_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + slit_gap_horizontal = _parse_slit_gap_horizontal(d.pop("slitGapHorizontal", UNSET)) + + def _parse_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission = _parse_transmission(d.pop("transmission", UNSET)) + + def _parse_synchrotron_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + synchrotron_mode = _parse_synchrotron_mode(d.pop("synchrotronMode", UNSET)) + + def _parse_xtal_snapshot_full_path_1(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_1 = _parse_xtal_snapshot_full_path_1(d.pop("xtalSnapshotFullPath1", UNSET)) + + def _parse_xtal_snapshot_full_path_2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_2 = _parse_xtal_snapshot_full_path_2(d.pop("xtalSnapshotFullPath2", UNSET)) + + def _parse_xtal_snapshot_full_path_3(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_3 = _parse_xtal_snapshot_full_path_3(d.pop("xtalSnapshotFullPath3", UNSET)) + + def _parse_xtal_snapshot_full_path_4(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_full_path_4 = _parse_xtal_snapshot_full_path_4(d.pop("xtalSnapshotFullPath4", UNSET)) + + def _parse_rotation_axis(data: object) -> None | RotationAxisEnum | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + rotation_axis_type_0 = RotationAxisEnum(data) + + return rotation_axis_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RotationAxisEnum | Unset, data) + + rotation_axis = _parse_rotation_axis(d.pop("rotationAxis", UNSET)) + + def _parse_phi_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + phi_start = _parse_phi_start(d.pop("phiStart", UNSET)) + + def _parse_kappa_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + kappa_start = _parse_kappa_start(d.pop("kappaStart", UNSET)) + + def _parse_omega_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + omega_start = _parse_omega_start(d.pop("omegaStart", UNSET)) + + def _parse_chi_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + chi_start = _parse_chi_start(d.pop("chiStart", UNSET)) + + def _parse_detector_2_theta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + detector_2_theta = _parse_detector_2_theta(d.pop("detector2Theta", UNSET)) + + def _parse_detector_mode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + detector_mode = _parse_detector_mode(d.pop("detectorMode", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_undulator_gap_1(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_1 = _parse_undulator_gap_1(d.pop("undulatorGap1", UNSET)) + + def _parse_undulator_gap_2(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_2 = _parse_undulator_gap_2(d.pop("undulatorGap2", UNSET)) + + def _parse_undulator_gap_3(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + undulator_gap_3 = _parse_undulator_gap_3(d.pop("undulatorGap3", UNSET)) + + def _parse_beam_size_at_sample_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_at_sample_x = _parse_beam_size_at_sample_x(d.pop("beamSizeAtSampleX", UNSET)) + + def _parse_beam_size_at_sample_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_at_sample_y = _parse_beam_size_at_sample_y(d.pop("beamSizeAtSampleY", UNSET)) + + def _parse_centering_method(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + centering_method = _parse_centering_method(d.pop("centeringMethod", UNSET)) + + def _parse_detector_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + detector_id = _parse_detector_id(d.pop("detectorId", UNSET)) + + def _parse_flux(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux = _parse_flux(d.pop("flux", UNSET)) + + def _parse_bl_sub_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sub_sample_id = _parse_bl_sub_sample_id(d.pop("blSubSampleId", UNSET)) + + def _parse_flux_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux_end = _parse_flux_end(d.pop("flux_end", UNSET)) + + def _parse_dat_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dat_full_path = _parse_dat_full_path(d.pop("datFullPath", UNSET)) + + def _parse_magnification(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + magnification = _parse_magnification(d.pop("magnification", UNSET)) + + def _parse_total_absorbed_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_absorbed_dose = _parse_total_absorbed_dose(d.pop("totalAbsorbedDose", UNSET)) + + def _parse_binning(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + binning = _parse_binning(d.pop("binning", UNSET)) + + def _parse_particle_diameter(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + particle_diameter = _parse_particle_diameter(d.pop("particleDiameter", UNSET)) + + def _parse_min_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_resolution = _parse_min_resolution(d.pop("minResolution", UNSET)) + + def _parse_min_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_defocus = _parse_min_defocus(d.pop("minDefocus", UNSET)) + + def _parse_max_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_defocus = _parse_max_defocus(d.pop("maxDefocus", UNSET)) + + def _parse_c2aperture(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + c2aperture = _parse_c2aperture(d.pop("c2aperture", UNSET)) + + def _parse_total_exposed_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_exposed_dose = _parse_total_exposed_dose(d.pop("totalExposedDose", UNSET)) + + def _parse_phase_plate(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + phase_plate = _parse_phase_plate(d.pop("phasePlate", UNSET)) + + def _parse_data_collection_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_plan_id = _parse_data_collection_plan_id(d.pop("dataCollectionPlanId", UNSET)) + + def _parse_data_collection_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_number = _parse_data_collection_number(d.pop("dataCollectionNumber", UNSET)) + + data_collection_out = cls( + data_collection_id=data_collection_id, + data_collection_group_id=data_collection_group_id, + proposal_reference=proposal_reference, + visit_number=visit_number, + beam_line_name=beam_line_name, + comments=comments, + start_time=start_time, + pixel_size_on_image=pixel_size_on_image, + voltage=voltage, + image_size_x=image_size_x, + image_size_y=image_size_y, + experimenttype=experimenttype, + end_time=end_time, + run_status=run_status, + axis_start=axis_start, + axis_end=axis_end, + axis_range=axis_range, + overlap=overlap, + number_of_images=number_of_images, + start_image_number=start_image_number, + number_of_passes=number_of_passes, + exposure_time=exposure_time, + image_directory=image_directory, + image_prefix=image_prefix, + image_suffix=image_suffix, + image_container_sub_path=image_container_sub_path, + file_template=file_template, + wavelength=wavelength, + resolution=resolution, + detector_distance=detector_distance, + x_beam=x_beam, + y_beam=y_beam, + printable_for_report=printable_for_report, + slit_gap_vertical=slit_gap_vertical, + slit_gap_horizontal=slit_gap_horizontal, + transmission=transmission, + synchrotron_mode=synchrotron_mode, + xtal_snapshot_full_path_1=xtal_snapshot_full_path_1, + xtal_snapshot_full_path_2=xtal_snapshot_full_path_2, + xtal_snapshot_full_path_3=xtal_snapshot_full_path_3, + xtal_snapshot_full_path_4=xtal_snapshot_full_path_4, + rotation_axis=rotation_axis, + phi_start=phi_start, + kappa_start=kappa_start, + omega_start=omega_start, + chi_start=chi_start, + detector_2_theta=detector_2_theta, + detector_mode=detector_mode, + sample_id=sample_id, + undulator_gap_1=undulator_gap_1, + undulator_gap_2=undulator_gap_2, + undulator_gap_3=undulator_gap_3, + beam_size_at_sample_x=beam_size_at_sample_x, + beam_size_at_sample_y=beam_size_at_sample_y, + centering_method=centering_method, + detector_id=detector_id, + flux=flux, + bl_sub_sample_id=bl_sub_sample_id, + flux_end=flux_end, + dat_full_path=dat_full_path, + magnification=magnification, + total_absorbed_dose=total_absorbed_dose, + binning=binning, + particle_diameter=particle_diameter, + min_resolution=min_resolution, + min_defocus=min_defocus, + max_defocus=max_defocus, + c2aperture=c2aperture, + total_exposed_dose=total_exposed_dose, + phase_plate=phase_plate, + data_collection_plan_id=data_collection_plan_id, + data_collection_number=data_collection_number, + ) + + data_collection_out.additional_properties = d + return data_collection_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_in.py b/src/lims_utils/expeye_client/models/dewar_in.py new file mode 100644 index 0000000..a871fd3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_in.py @@ -0,0 +1,386 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 + + +T = TypeVar("T", bound="DewarIn") + + +@_attrs_define +class DewarIn: + """ + Attributes: + weight (float | None | Unset): + extra (DewarInExtraType0Type0 | None | str | Unset): + first_experiment_id (int | None | Unset): + code (None | str | Unset): Code used to uniquely identify physical dewars/top level containers + facility_code (None | str | Unset): + dewar_status (None | str | Unset): + storage_location (None | str | Unset): + is_storage_dewar (bool | None | Unset): + barcode (None | str | Unset): Barcode used for internal tracking, one is used for each journey to Diamond + comments (None | str | Unset): + source (None | str | Unset): + dewar_registry_id (int | None | Unset): + tracking_number_to_synchrotron (None | str | Unset): + tracking_number_from_synchrotron (None | str | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + """ + + weight: float | None | Unset = UNSET + extra: DewarInExtraType0Type0 | None | str | Unset = UNSET + first_experiment_id: int | None | Unset = UNSET + code: None | str | Unset = UNSET + facility_code: None | str | Unset = UNSET + dewar_status: None | str | Unset = UNSET + storage_location: None | str | Unset = UNSET + is_storage_dewar: bool | None | Unset = UNSET + barcode: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + source: None | str | Unset = UNSET + dewar_registry_id: int | None | Unset = UNSET + tracking_number_to_synchrotron: None | str | Unset = UNSET + tracking_number_from_synchrotron: None | str | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 # noqa: PLC0415 + + weight: float | None | Unset + if isinstance(self.weight, Unset): + weight = UNSET + else: + weight = self.weight + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, DewarInExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + first_experiment_id: int | None | Unset + if isinstance(self.first_experiment_id, Unset): + first_experiment_id = UNSET + else: + first_experiment_id = self.first_experiment_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + facility_code: None | str | Unset + if isinstance(self.facility_code, Unset): + facility_code = UNSET + else: + facility_code = self.facility_code + + dewar_status: None | str | Unset + if isinstance(self.dewar_status, Unset): + dewar_status = UNSET + else: + dewar_status = self.dewar_status + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + is_storage_dewar: bool | None | Unset + if isinstance(self.is_storage_dewar, Unset): + is_storage_dewar = UNSET + else: + is_storage_dewar = self.is_storage_dewar + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + dewar_registry_id: int | None | Unset + if isinstance(self.dewar_registry_id, Unset): + dewar_registry_id = UNSET + else: + dewar_registry_id = self.dewar_registry_id + + tracking_number_to_synchrotron: None | str | Unset + if isinstance(self.tracking_number_to_synchrotron, Unset): + tracking_number_to_synchrotron = UNSET + else: + tracking_number_to_synchrotron = self.tracking_number_to_synchrotron + + tracking_number_from_synchrotron: None | str | Unset + if isinstance(self.tracking_number_from_synchrotron, Unset): + tracking_number_from_synchrotron = UNSET + else: + tracking_number_from_synchrotron = self.tracking_number_from_synchrotron + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if weight is not UNSET: + field_dict["weight"] = weight + if extra is not UNSET: + field_dict["extra"] = extra + if first_experiment_id is not UNSET: + field_dict["firstExperimentId"] = first_experiment_id + if code is not UNSET: + field_dict["code"] = code + if facility_code is not UNSET: + field_dict["facilityCode"] = facility_code + if dewar_status is not UNSET: + field_dict["dewarStatus"] = dewar_status + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if is_storage_dewar is not UNSET: + field_dict["isStorageDewar"] = is_storage_dewar + if barcode is not UNSET: + field_dict["barcode"] = barcode + if comments is not UNSET: + field_dict["comments"] = comments + if source is not UNSET: + field_dict["source"] = source + if dewar_registry_id is not UNSET: + field_dict["dewarRegistryId"] = dewar_registry_id + if tracking_number_to_synchrotron is not UNSET: + field_dict["trackingNumberToSynchrotron"] = tracking_number_to_synchrotron + if tracking_number_from_synchrotron is not UNSET: + field_dict["trackingNumberFromSynchrotron"] = tracking_number_from_synchrotron + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + weight = _parse_weight(d.pop("weight", UNSET)) + + def _parse_extra(data: object) -> DewarInExtraType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = DewarInExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DewarInExtraType0Type0 | None | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_first_experiment_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_experiment_id = _parse_first_experiment_id(d.pop("firstExperimentId", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_facility_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + facility_code = _parse_facility_code(d.pop("facilityCode", UNSET)) + + def _parse_dewar_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dewar_status = _parse_dewar_status(d.pop("dewarStatus", UNSET)) + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_is_storage_dewar(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_storage_dewar = _parse_is_storage_dewar(d.pop("isStorageDewar", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_dewar_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_registry_id = _parse_dewar_registry_id(d.pop("dewarRegistryId", UNSET)) + + def _parse_tracking_number_to_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_to_synchrotron = _parse_tracking_number_to_synchrotron( + d.pop("trackingNumberToSynchrotron", UNSET) + ) + + def _parse_tracking_number_from_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_from_synchrotron = _parse_tracking_number_from_synchrotron( + d.pop("trackingNumberFromSynchrotron", UNSET) + ) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + dewar_in = cls( + weight=weight, + extra=extra, + first_experiment_id=first_experiment_id, + code=code, + facility_code=facility_code, + dewar_status=dewar_status, + storage_location=storage_location, + is_storage_dewar=is_storage_dewar, + barcode=barcode, + comments=comments, + source=source, + dewar_registry_id=dewar_registry_id, + tracking_number_to_synchrotron=tracking_number_to_synchrotron, + tracking_number_from_synchrotron=tracking_number_from_synchrotron, + bl_time_stamp=bl_time_stamp, + ) + + dewar_in.additional_properties = d + return dewar_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_in_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/dewar_in_extra_type_0_type_0.py new file mode 100644 index 0000000..f629fd4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_in_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DewarInExtraType0Type0") + + +@_attrs_define +class DewarInExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_in_extra_type_0_type_0 = cls() + + dewar_in_extra_type_0_type_0.additional_properties = d + return dewar_in_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_optional.py b/src/lims_utils/expeye_client/models/dewar_optional.py new file mode 100644 index 0000000..75d8b29 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_optional.py @@ -0,0 +1,386 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 + + +T = TypeVar("T", bound="DewarOptional") + + +@_attrs_define +class DewarOptional: + """ + Attributes: + weight (float | None | Unset): + extra (DewarOptionalExtraType0Type0 | None | str | Unset): + first_experiment_id (int | None | Unset): + code (None | str | Unset): Code used to uniquely identify physical dewars/top level containers + facility_code (None | str | Unset): + dewar_status (None | str | Unset): + storage_location (None | str | Unset): + is_storage_dewar (bool | None | Unset): + barcode (None | str | Unset): Barcode used for internal tracking, one is used for each journey to Diamond + comments (None | str | Unset): + source (None | str | Unset): + dewar_registry_id (int | None | Unset): + tracking_number_to_synchrotron (None | str | Unset): + tracking_number_from_synchrotron (None | str | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + """ + + weight: float | None | Unset = UNSET + extra: DewarOptionalExtraType0Type0 | None | str | Unset = UNSET + first_experiment_id: int | None | Unset = UNSET + code: None | str | Unset = UNSET + facility_code: None | str | Unset = UNSET + dewar_status: None | str | Unset = UNSET + storage_location: None | str | Unset = UNSET + is_storage_dewar: bool | None | Unset = UNSET + barcode: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + source: None | str | Unset = UNSET + dewar_registry_id: int | None | Unset = UNSET + tracking_number_to_synchrotron: None | str | Unset = UNSET + tracking_number_from_synchrotron: None | str | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 # noqa: PLC0415 + + weight: float | None | Unset + if isinstance(self.weight, Unset): + weight = UNSET + else: + weight = self.weight + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, DewarOptionalExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + first_experiment_id: int | None | Unset + if isinstance(self.first_experiment_id, Unset): + first_experiment_id = UNSET + else: + first_experiment_id = self.first_experiment_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + facility_code: None | str | Unset + if isinstance(self.facility_code, Unset): + facility_code = UNSET + else: + facility_code = self.facility_code + + dewar_status: None | str | Unset + if isinstance(self.dewar_status, Unset): + dewar_status = UNSET + else: + dewar_status = self.dewar_status + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + is_storage_dewar: bool | None | Unset + if isinstance(self.is_storage_dewar, Unset): + is_storage_dewar = UNSET + else: + is_storage_dewar = self.is_storage_dewar + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + dewar_registry_id: int | None | Unset + if isinstance(self.dewar_registry_id, Unset): + dewar_registry_id = UNSET + else: + dewar_registry_id = self.dewar_registry_id + + tracking_number_to_synchrotron: None | str | Unset + if isinstance(self.tracking_number_to_synchrotron, Unset): + tracking_number_to_synchrotron = UNSET + else: + tracking_number_to_synchrotron = self.tracking_number_to_synchrotron + + tracking_number_from_synchrotron: None | str | Unset + if isinstance(self.tracking_number_from_synchrotron, Unset): + tracking_number_from_synchrotron = UNSET + else: + tracking_number_from_synchrotron = self.tracking_number_from_synchrotron + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if weight is not UNSET: + field_dict["weight"] = weight + if extra is not UNSET: + field_dict["extra"] = extra + if first_experiment_id is not UNSET: + field_dict["firstExperimentId"] = first_experiment_id + if code is not UNSET: + field_dict["code"] = code + if facility_code is not UNSET: + field_dict["facilityCode"] = facility_code + if dewar_status is not UNSET: + field_dict["dewarStatus"] = dewar_status + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if is_storage_dewar is not UNSET: + field_dict["isStorageDewar"] = is_storage_dewar + if barcode is not UNSET: + field_dict["barcode"] = barcode + if comments is not UNSET: + field_dict["comments"] = comments + if source is not UNSET: + field_dict["source"] = source + if dewar_registry_id is not UNSET: + field_dict["dewarRegistryId"] = dewar_registry_id + if tracking_number_to_synchrotron is not UNSET: + field_dict["trackingNumberToSynchrotron"] = tracking_number_to_synchrotron + if tracking_number_from_synchrotron is not UNSET: + field_dict["trackingNumberFromSynchrotron"] = tracking_number_from_synchrotron + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + weight = _parse_weight(d.pop("weight", UNSET)) + + def _parse_extra(data: object) -> DewarOptionalExtraType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = DewarOptionalExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DewarOptionalExtraType0Type0 | None | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_first_experiment_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_experiment_id = _parse_first_experiment_id(d.pop("firstExperimentId", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_facility_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + facility_code = _parse_facility_code(d.pop("facilityCode", UNSET)) + + def _parse_dewar_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dewar_status = _parse_dewar_status(d.pop("dewarStatus", UNSET)) + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_is_storage_dewar(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_storage_dewar = _parse_is_storage_dewar(d.pop("isStorageDewar", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_dewar_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_registry_id = _parse_dewar_registry_id(d.pop("dewarRegistryId", UNSET)) + + def _parse_tracking_number_to_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_to_synchrotron = _parse_tracking_number_to_synchrotron( + d.pop("trackingNumberToSynchrotron", UNSET) + ) + + def _parse_tracking_number_from_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_from_synchrotron = _parse_tracking_number_from_synchrotron( + d.pop("trackingNumberFromSynchrotron", UNSET) + ) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + dewar_optional = cls( + weight=weight, + extra=extra, + first_experiment_id=first_experiment_id, + code=code, + facility_code=facility_code, + dewar_status=dewar_status, + storage_location=storage_location, + is_storage_dewar=is_storage_dewar, + barcode=barcode, + comments=comments, + source=source, + dewar_registry_id=dewar_registry_id, + tracking_number_to_synchrotron=tracking_number_to_synchrotron, + tracking_number_from_synchrotron=tracking_number_from_synchrotron, + bl_time_stamp=bl_time_stamp, + ) + + dewar_optional.additional_properties = d + return dewar_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_optional_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/dewar_optional_extra_type_0_type_0.py new file mode 100644 index 0000000..afb3044 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_optional_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DewarOptionalExtraType0Type0") + + +@_attrs_define +class DewarOptionalExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_optional_extra_type_0_type_0 = cls() + + dewar_optional_extra_type_0_type_0.additional_properties = d + return dewar_optional_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_out.py b/src/lims_utils/expeye_client/models/dewar_out.py new file mode 100644 index 0000000..bd6c2e0 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_out.py @@ -0,0 +1,404 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 + + +T = TypeVar("T", bound="DewarOut") + + +@_attrs_define +class DewarOut: + """ + Attributes: + dewar_id (int): + shipping_id (int): + weight (float | None | Unset): + extra (DewarOutExtraType0Type0 | None | str | Unset): + first_experiment_id (int | None | Unset): + code (None | str | Unset): Code used to uniquely identify physical dewars/top level containers + facility_code (None | str | Unset): + dewar_status (None | str | Unset): + storage_location (None | str | Unset): + is_storage_dewar (bool | None | Unset): + barcode (None | str | Unset): Barcode used for internal tracking, one is used for each journey to Diamond + comments (None | str | Unset): + source (None | str | Unset): + dewar_registry_id (int | None | Unset): + tracking_number_to_synchrotron (None | str | Unset): + tracking_number_from_synchrotron (None | str | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + """ + + dewar_id: int + shipping_id: int + weight: float | None | Unset = UNSET + extra: DewarOutExtraType0Type0 | None | str | Unset = UNSET + first_experiment_id: int | None | Unset = UNSET + code: None | str | Unset = UNSET + facility_code: None | str | Unset = UNSET + dewar_status: None | str | Unset = UNSET + storage_location: None | str | Unset = UNSET + is_storage_dewar: bool | None | Unset = UNSET + barcode: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + source: None | str | Unset = UNSET + dewar_registry_id: int | None | Unset = UNSET + tracking_number_to_synchrotron: None | str | Unset = UNSET + tracking_number_from_synchrotron: None | str | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 # noqa: PLC0415 + + dewar_id = self.dewar_id + + shipping_id = self.shipping_id + + weight: float | None | Unset + if isinstance(self.weight, Unset): + weight = UNSET + else: + weight = self.weight + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, DewarOutExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + first_experiment_id: int | None | Unset + if isinstance(self.first_experiment_id, Unset): + first_experiment_id = UNSET + else: + first_experiment_id = self.first_experiment_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + facility_code: None | str | Unset + if isinstance(self.facility_code, Unset): + facility_code = UNSET + else: + facility_code = self.facility_code + + dewar_status: None | str | Unset + if isinstance(self.dewar_status, Unset): + dewar_status = UNSET + else: + dewar_status = self.dewar_status + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + is_storage_dewar: bool | None | Unset + if isinstance(self.is_storage_dewar, Unset): + is_storage_dewar = UNSET + else: + is_storage_dewar = self.is_storage_dewar + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + dewar_registry_id: int | None | Unset + if isinstance(self.dewar_registry_id, Unset): + dewar_registry_id = UNSET + else: + dewar_registry_id = self.dewar_registry_id + + tracking_number_to_synchrotron: None | str | Unset + if isinstance(self.tracking_number_to_synchrotron, Unset): + tracking_number_to_synchrotron = UNSET + else: + tracking_number_to_synchrotron = self.tracking_number_to_synchrotron + + tracking_number_from_synchrotron: None | str | Unset + if isinstance(self.tracking_number_from_synchrotron, Unset): + tracking_number_from_synchrotron = UNSET + else: + tracking_number_from_synchrotron = self.tracking_number_from_synchrotron + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dewarId": dewar_id, + "shippingId": shipping_id, + } + ) + if weight is not UNSET: + field_dict["weight"] = weight + if extra is not UNSET: + field_dict["extra"] = extra + if first_experiment_id is not UNSET: + field_dict["firstExperimentId"] = first_experiment_id + if code is not UNSET: + field_dict["code"] = code + if facility_code is not UNSET: + field_dict["facilityCode"] = facility_code + if dewar_status is not UNSET: + field_dict["dewarStatus"] = dewar_status + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if is_storage_dewar is not UNSET: + field_dict["isStorageDewar"] = is_storage_dewar + if barcode is not UNSET: + field_dict["barcode"] = barcode + if comments is not UNSET: + field_dict["comments"] = comments + if source is not UNSET: + field_dict["source"] = source + if dewar_registry_id is not UNSET: + field_dict["dewarRegistryId"] = dewar_registry_id + if tracking_number_to_synchrotron is not UNSET: + field_dict["trackingNumberToSynchrotron"] = tracking_number_to_synchrotron + if tracking_number_from_synchrotron is not UNSET: + field_dict["trackingNumberFromSynchrotron"] = tracking_number_from_synchrotron + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + dewar_id = d.pop("dewarId") + + shipping_id = d.pop("shippingId") + + def _parse_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + weight = _parse_weight(d.pop("weight", UNSET)) + + def _parse_extra(data: object) -> DewarOutExtraType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = DewarOutExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DewarOutExtraType0Type0 | None | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_first_experiment_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_experiment_id = _parse_first_experiment_id(d.pop("firstExperimentId", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_facility_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + facility_code = _parse_facility_code(d.pop("facilityCode", UNSET)) + + def _parse_dewar_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dewar_status = _parse_dewar_status(d.pop("dewarStatus", UNSET)) + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_is_storage_dewar(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_storage_dewar = _parse_is_storage_dewar(d.pop("isStorageDewar", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_dewar_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_registry_id = _parse_dewar_registry_id(d.pop("dewarRegistryId", UNSET)) + + def _parse_tracking_number_to_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_to_synchrotron = _parse_tracking_number_to_synchrotron( + d.pop("trackingNumberToSynchrotron", UNSET) + ) + + def _parse_tracking_number_from_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_from_synchrotron = _parse_tracking_number_from_synchrotron( + d.pop("trackingNumberFromSynchrotron", UNSET) + ) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + dewar_out = cls( + dewar_id=dewar_id, + shipping_id=shipping_id, + weight=weight, + extra=extra, + first_experiment_id=first_experiment_id, + code=code, + facility_code=facility_code, + dewar_status=dewar_status, + storage_location=storage_location, + is_storage_dewar=is_storage_dewar, + barcode=barcode, + comments=comments, + source=source, + dewar_registry_id=dewar_registry_id, + tracking_number_to_synchrotron=tracking_number_to_synchrotron, + tracking_number_from_synchrotron=tracking_number_from_synchrotron, + bl_time_stamp=bl_time_stamp, + ) + + dewar_out.additional_properties = d + return dewar_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_out_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/dewar_out_extra_type_0_type_0.py new file mode 100644 index 0000000..f5df48e --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_out_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DewarOutExtraType0Type0") + + +@_attrs_define +class DewarOutExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_out_extra_type_0_type_0 = cls() + + dewar_out_extra_type_0_type_0.additional_properties = d + return dewar_out_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_transport_history_in.py b/src/lims_utils/expeye_client/models/dewar_transport_history_in.py new file mode 100644 index 0000000..568de36 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_transport_history_in.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DewarTransportHistoryIn") + + +@_attrs_define +class DewarTransportHistoryIn: + """ + Attributes: + dewar_status (str): + storage_location (None | str | Unset): + arrival_date (datetime.datetime | None | Unset): + """ + + dewar_status: str + storage_location: None | str | Unset = UNSET + arrival_date: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dewar_status = self.dewar_status + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + arrival_date: None | str | Unset + if isinstance(self.arrival_date, Unset): + arrival_date = UNSET + elif isinstance(self.arrival_date, datetime.datetime): + arrival_date = self.arrival_date.isoformat() + else: + arrival_date = self.arrival_date + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dewarStatus": dewar_status, + } + ) + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if arrival_date is not UNSET: + field_dict["arrivalDate"] = arrival_date + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_status = d.pop("dewarStatus") + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_arrival_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + arrival_date_type_0 = datetime.datetime.fromisoformat(data) + + return arrival_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + arrival_date = _parse_arrival_date(d.pop("arrivalDate", UNSET)) + + dewar_transport_history_in = cls( + dewar_status=dewar_status, + storage_location=storage_location, + arrival_date=arrival_date, + ) + + dewar_transport_history_in.additional_properties = d + return dewar_transport_history_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_transport_history_out.py b/src/lims_utils/expeye_client/models/dewar_transport_history_out.py new file mode 100644 index 0000000..f54d848 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_transport_history_out.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DewarTransportHistoryOut") + + +@_attrs_define +class DewarTransportHistoryOut: + """ + Attributes: + dewar_id (int): + dewar_status (str): + dewar_transport_history_id (float): + storage_location (None | str | Unset): + arrival_date (datetime.datetime | None | Unset): + """ + + dewar_id: int + dewar_status: str + dewar_transport_history_id: float + storage_location: None | str | Unset = UNSET + arrival_date: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + dewar_id = self.dewar_id + + dewar_status = self.dewar_status + + dewar_transport_history_id = self.dewar_transport_history_id + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + arrival_date: None | str | Unset + if isinstance(self.arrival_date, Unset): + arrival_date = UNSET + elif isinstance(self.arrival_date, datetime.datetime): + arrival_date = self.arrival_date.isoformat() + else: + arrival_date = self.arrival_date + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dewarId": dewar_id, + "dewarStatus": dewar_status, + "dewarTransportHistoryId": dewar_transport_history_id, + } + ) + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if arrival_date is not UNSET: + field_dict["arrivalDate"] = arrival_date + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_id = d.pop("dewarId") + + dewar_status = d.pop("dewarStatus") + + dewar_transport_history_id = d.pop("dewarTransportHistoryId") + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_arrival_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + arrival_date_type_0 = datetime.datetime.fromisoformat(data) + + return arrival_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + arrival_date = _parse_arrival_date(d.pop("arrivalDate", UNSET)) + + dewar_transport_history_out = cls( + dewar_id=dewar_id, + dewar_status=dewar_status, + dewar_transport_history_id=dewar_transport_history_id, + storage_location=storage_location, + arrival_date=arrival_date, + ) + + dewar_transport_history_out.additional_properties = d + return dewar_transport_history_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_with_children_in.py b/src/lims_utils/expeye_client/models/dewar_with_children_in.py new file mode 100644 index 0000000..8a9cfc9 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_with_children_in.py @@ -0,0 +1,406 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.container_with_children_in import ContainerWithChildrenIn + from ..models.dewar_with_children_in_extra_type_0_type_0 import DewarWithChildrenInExtraType0Type0 + + +T = TypeVar("T", bound="DewarWithChildrenIn") + + +@_attrs_define +class DewarWithChildrenIn: + """ + Attributes: + children (list[ContainerWithChildrenIn]): + weight (float | None | Unset): + extra (DewarWithChildrenInExtraType0Type0 | None | str | Unset): + first_experiment_id (int | None | Unset): + code (None | str | Unset): Code used to uniquely identify physical dewars/top level containers + facility_code (None | str | Unset): + dewar_status (None | str | Unset): + storage_location (None | str | Unset): + is_storage_dewar (bool | None | Unset): + barcode (None | str | Unset): Barcode used for internal tracking, one is used for each journey to Diamond + comments (None | str | Unset): + source (None | str | Unset): + dewar_registry_id (int | None | Unset): + tracking_number_to_synchrotron (None | str | Unset): + tracking_number_from_synchrotron (None | str | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + """ + + children: list[ContainerWithChildrenIn] + weight: float | None | Unset = UNSET + extra: DewarWithChildrenInExtraType0Type0 | None | str | Unset = UNSET + first_experiment_id: int | None | Unset = UNSET + code: None | str | Unset = UNSET + facility_code: None | str | Unset = UNSET + dewar_status: None | str | Unset = UNSET + storage_location: None | str | Unset = UNSET + is_storage_dewar: bool | None | Unset = UNSET + barcode: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + source: None | str | Unset = UNSET + dewar_registry_id: int | None | Unset = UNSET + tracking_number_to_synchrotron: None | str | Unset = UNSET + tracking_number_from_synchrotron: None | str | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.dewar_with_children_in_extra_type_0_type_0 import DewarWithChildrenInExtraType0Type0 # noqa: PLC0415 + + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + weight: float | None | Unset + if isinstance(self.weight, Unset): + weight = UNSET + else: + weight = self.weight + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, DewarWithChildrenInExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + first_experiment_id: int | None | Unset + if isinstance(self.first_experiment_id, Unset): + first_experiment_id = UNSET + else: + first_experiment_id = self.first_experiment_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + facility_code: None | str | Unset + if isinstance(self.facility_code, Unset): + facility_code = UNSET + else: + facility_code = self.facility_code + + dewar_status: None | str | Unset + if isinstance(self.dewar_status, Unset): + dewar_status = UNSET + else: + dewar_status = self.dewar_status + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + is_storage_dewar: bool | None | Unset + if isinstance(self.is_storage_dewar, Unset): + is_storage_dewar = UNSET + else: + is_storage_dewar = self.is_storage_dewar + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + dewar_registry_id: int | None | Unset + if isinstance(self.dewar_registry_id, Unset): + dewar_registry_id = UNSET + else: + dewar_registry_id = self.dewar_registry_id + + tracking_number_to_synchrotron: None | str | Unset + if isinstance(self.tracking_number_to_synchrotron, Unset): + tracking_number_to_synchrotron = UNSET + else: + tracking_number_to_synchrotron = self.tracking_number_to_synchrotron + + tracking_number_from_synchrotron: None | str | Unset + if isinstance(self.tracking_number_from_synchrotron, Unset): + tracking_number_from_synchrotron = UNSET + else: + tracking_number_from_synchrotron = self.tracking_number_from_synchrotron + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "children": children, + } + ) + if weight is not UNSET: + field_dict["weight"] = weight + if extra is not UNSET: + field_dict["extra"] = extra + if first_experiment_id is not UNSET: + field_dict["firstExperimentId"] = first_experiment_id + if code is not UNSET: + field_dict["code"] = code + if facility_code is not UNSET: + field_dict["facilityCode"] = facility_code + if dewar_status is not UNSET: + field_dict["dewarStatus"] = dewar_status + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if is_storage_dewar is not UNSET: + field_dict["isStorageDewar"] = is_storage_dewar + if barcode is not UNSET: + field_dict["barcode"] = barcode + if comments is not UNSET: + field_dict["comments"] = comments + if source is not UNSET: + field_dict["source"] = source + if dewar_registry_id is not UNSET: + field_dict["dewarRegistryId"] = dewar_registry_id + if tracking_number_to_synchrotron is not UNSET: + field_dict["trackingNumberToSynchrotron"] = tracking_number_to_synchrotron + if tracking_number_from_synchrotron is not UNSET: + field_dict["trackingNumberFromSynchrotron"] = tracking_number_from_synchrotron + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.container_with_children_in import ContainerWithChildrenIn # noqa: PLC0415 + from ..models.dewar_with_children_in_extra_type_0_type_0 import DewarWithChildrenInExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + children = [] + _children = d.pop("children") + for children_item_data in _children: + children_item = ContainerWithChildrenIn.from_dict(children_item_data) + + children.append(children_item) + + def _parse_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + weight = _parse_weight(d.pop("weight", UNSET)) + + def _parse_extra(data: object) -> DewarWithChildrenInExtraType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = DewarWithChildrenInExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DewarWithChildrenInExtraType0Type0 | None | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_first_experiment_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_experiment_id = _parse_first_experiment_id(d.pop("firstExperimentId", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_facility_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + facility_code = _parse_facility_code(d.pop("facilityCode", UNSET)) + + def _parse_dewar_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dewar_status = _parse_dewar_status(d.pop("dewarStatus", UNSET)) + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_is_storage_dewar(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_storage_dewar = _parse_is_storage_dewar(d.pop("isStorageDewar", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_dewar_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_registry_id = _parse_dewar_registry_id(d.pop("dewarRegistryId", UNSET)) + + def _parse_tracking_number_to_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_to_synchrotron = _parse_tracking_number_to_synchrotron( + d.pop("trackingNumberToSynchrotron", UNSET) + ) + + def _parse_tracking_number_from_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_from_synchrotron = _parse_tracking_number_from_synchrotron( + d.pop("trackingNumberFromSynchrotron", UNSET) + ) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + dewar_with_children_in = cls( + children=children, + weight=weight, + extra=extra, + first_experiment_id=first_experiment_id, + code=code, + facility_code=facility_code, + dewar_status=dewar_status, + storage_location=storage_location, + is_storage_dewar=is_storage_dewar, + barcode=barcode, + comments=comments, + source=source, + dewar_registry_id=dewar_registry_id, + tracking_number_to_synchrotron=tracking_number_to_synchrotron, + tracking_number_from_synchrotron=tracking_number_from_synchrotron, + bl_time_stamp=bl_time_stamp, + ) + + dewar_with_children_in.additional_properties = d + return dewar_with_children_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_with_children_in_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/dewar_with_children_in_extra_type_0_type_0.py new file mode 100644 index 0000000..c823972 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_with_children_in_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DewarWithChildrenInExtraType0Type0") + + +@_attrs_define +class DewarWithChildrenInExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_with_children_in_extra_type_0_type_0 = cls() + + dewar_with_children_in_extra_type_0_type_0.additional_properties = d + return dewar_with_children_in_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_with_children_out.py b/src/lims_utils/expeye_client/models/dewar_with_children_out.py new file mode 100644 index 0000000..7991d06 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_with_children_out.py @@ -0,0 +1,427 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.container_with_children_out import ContainerWithChildrenOut + from ..models.dewar_with_children_out_extra_type_0_type_0 import DewarWithChildrenOutExtraType0Type0 + + +T = TypeVar("T", bound="DewarWithChildrenOut") + + +@_attrs_define +class DewarWithChildrenOut: + """ + Attributes: + dewar_id (int): + shipping_id (int): + weight (float | None | Unset): + extra (DewarWithChildrenOutExtraType0Type0 | None | str | Unset): + first_experiment_id (int | None | Unset): + code (None | str | Unset): Code used to uniquely identify physical dewars/top level containers + facility_code (None | str | Unset): + dewar_status (None | str | Unset): + storage_location (None | str | Unset): + is_storage_dewar (bool | None | Unset): + barcode (None | str | Unset): Barcode used for internal tracking, one is used for each journey to Diamond + comments (None | str | Unset): + source (None | str | Unset): + dewar_registry_id (int | None | Unset): + tracking_number_to_synchrotron (None | str | Unset): + tracking_number_from_synchrotron (None | str | Unset): + bl_time_stamp (datetime.datetime | None | Unset): + children (list[ContainerWithChildrenOut] | Unset): + """ + + dewar_id: int + shipping_id: int + weight: float | None | Unset = UNSET + extra: DewarWithChildrenOutExtraType0Type0 | None | str | Unset = UNSET + first_experiment_id: int | None | Unset = UNSET + code: None | str | Unset = UNSET + facility_code: None | str | Unset = UNSET + dewar_status: None | str | Unset = UNSET + storage_location: None | str | Unset = UNSET + is_storage_dewar: bool | None | Unset = UNSET + barcode: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + source: None | str | Unset = UNSET + dewar_registry_id: int | None | Unset = UNSET + tracking_number_to_synchrotron: None | str | Unset = UNSET + tracking_number_from_synchrotron: None | str | Unset = UNSET + bl_time_stamp: datetime.datetime | None | Unset = UNSET + children: list[ContainerWithChildrenOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.dewar_with_children_out_extra_type_0_type_0 import DewarWithChildrenOutExtraType0Type0 # noqa: PLC0415 + + dewar_id = self.dewar_id + + shipping_id = self.shipping_id + + weight: float | None | Unset + if isinstance(self.weight, Unset): + weight = UNSET + else: + weight = self.weight + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, DewarWithChildrenOutExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + first_experiment_id: int | None | Unset + if isinstance(self.first_experiment_id, Unset): + first_experiment_id = UNSET + else: + first_experiment_id = self.first_experiment_id + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + facility_code: None | str | Unset + if isinstance(self.facility_code, Unset): + facility_code = UNSET + else: + facility_code = self.facility_code + + dewar_status: None | str | Unset + if isinstance(self.dewar_status, Unset): + dewar_status = UNSET + else: + dewar_status = self.dewar_status + + storage_location: None | str | Unset + if isinstance(self.storage_location, Unset): + storage_location = UNSET + else: + storage_location = self.storage_location + + is_storage_dewar: bool | None | Unset + if isinstance(self.is_storage_dewar, Unset): + is_storage_dewar = UNSET + else: + is_storage_dewar = self.is_storage_dewar + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + dewar_registry_id: int | None | Unset + if isinstance(self.dewar_registry_id, Unset): + dewar_registry_id = UNSET + else: + dewar_registry_id = self.dewar_registry_id + + tracking_number_to_synchrotron: None | str | Unset + if isinstance(self.tracking_number_to_synchrotron, Unset): + tracking_number_to_synchrotron = UNSET + else: + tracking_number_to_synchrotron = self.tracking_number_to_synchrotron + + tracking_number_from_synchrotron: None | str | Unset + if isinstance(self.tracking_number_from_synchrotron, Unset): + tracking_number_from_synchrotron = UNSET + else: + tracking_number_from_synchrotron = self.tracking_number_from_synchrotron + + bl_time_stamp: None | str | Unset + if isinstance(self.bl_time_stamp, Unset): + bl_time_stamp = UNSET + elif isinstance(self.bl_time_stamp, datetime.datetime): + bl_time_stamp = self.bl_time_stamp.isoformat() + else: + bl_time_stamp = self.bl_time_stamp + + children: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.children, Unset): + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dewarId": dewar_id, + "shippingId": shipping_id, + } + ) + if weight is not UNSET: + field_dict["weight"] = weight + if extra is not UNSET: + field_dict["extra"] = extra + if first_experiment_id is not UNSET: + field_dict["firstExperimentId"] = first_experiment_id + if code is not UNSET: + field_dict["code"] = code + if facility_code is not UNSET: + field_dict["facilityCode"] = facility_code + if dewar_status is not UNSET: + field_dict["dewarStatus"] = dewar_status + if storage_location is not UNSET: + field_dict["storageLocation"] = storage_location + if is_storage_dewar is not UNSET: + field_dict["isStorageDewar"] = is_storage_dewar + if barcode is not UNSET: + field_dict["barcode"] = barcode + if comments is not UNSET: + field_dict["comments"] = comments + if source is not UNSET: + field_dict["source"] = source + if dewar_registry_id is not UNSET: + field_dict["dewarRegistryId"] = dewar_registry_id + if tracking_number_to_synchrotron is not UNSET: + field_dict["trackingNumberToSynchrotron"] = tracking_number_to_synchrotron + if tracking_number_from_synchrotron is not UNSET: + field_dict["trackingNumberFromSynchrotron"] = tracking_number_from_synchrotron + if bl_time_stamp is not UNSET: + field_dict["blTimeStamp"] = bl_time_stamp + if children is not UNSET: + field_dict["children"] = children + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.container_with_children_out import ContainerWithChildrenOut # noqa: PLC0415 + from ..models.dewar_with_children_out_extra_type_0_type_0 import DewarWithChildrenOutExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + dewar_id = d.pop("dewarId") + + shipping_id = d.pop("shippingId") + + def _parse_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + weight = _parse_weight(d.pop("weight", UNSET)) + + def _parse_extra(data: object) -> DewarWithChildrenOutExtraType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = DewarWithChildrenOutExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DewarWithChildrenOutExtraType0Type0 | None | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_first_experiment_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_experiment_id = _parse_first_experiment_id(d.pop("firstExperimentId", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_facility_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + facility_code = _parse_facility_code(d.pop("facilityCode", UNSET)) + + def _parse_dewar_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + dewar_status = _parse_dewar_status(d.pop("dewarStatus", UNSET)) + + def _parse_storage_location(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + storage_location = _parse_storage_location(d.pop("storageLocation", UNSET)) + + def _parse_is_storage_dewar(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_storage_dewar = _parse_is_storage_dewar(d.pop("isStorageDewar", UNSET)) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_dewar_registry_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_registry_id = _parse_dewar_registry_id(d.pop("dewarRegistryId", UNSET)) + + def _parse_tracking_number_to_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_to_synchrotron = _parse_tracking_number_to_synchrotron( + d.pop("trackingNumberToSynchrotron", UNSET) + ) + + def _parse_tracking_number_from_synchrotron(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + tracking_number_from_synchrotron = _parse_tracking_number_from_synchrotron( + d.pop("trackingNumberFromSynchrotron", UNSET) + ) + + def _parse_bl_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bl_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bl_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bl_time_stamp = _parse_bl_time_stamp(d.pop("blTimeStamp", UNSET)) + + _children = d.pop("children", UNSET) + children: list[ContainerWithChildrenOut] | Unset = UNSET + if _children is not UNSET: + children = [] + for children_item_data in _children: + children_item = ContainerWithChildrenOut.from_dict(children_item_data) + + children.append(children_item) + + dewar_with_children_out = cls( + dewar_id=dewar_id, + shipping_id=shipping_id, + weight=weight, + extra=extra, + first_experiment_id=first_experiment_id, + code=code, + facility_code=facility_code, + dewar_status=dewar_status, + storage_location=storage_location, + is_storage_dewar=is_storage_dewar, + barcode=barcode, + comments=comments, + source=source, + dewar_registry_id=dewar_registry_id, + tracking_number_to_synchrotron=tracking_number_to_synchrotron, + tracking_number_from_synchrotron=tracking_number_from_synchrotron, + bl_time_stamp=bl_time_stamp, + children=children, + ) + + dewar_with_children_out.additional_properties = d + return dewar_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/dewar_with_children_out_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/dewar_with_children_out_extra_type_0_type_0.py new file mode 100644 index 0000000..17ae506 --- /dev/null +++ b/src/lims_utils/expeye_client/models/dewar_with_children_out_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DewarWithChildrenOutExtraType0Type0") + + +@_attrs_define +class DewarWithChildrenOutExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + dewar_with_children_out_extra_type_0_type_0 = cls() + + dewar_with_children_out_extra_type_0_type_0.additional_properties = d + return dewar_with_children_out_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_experiment_type.py b/src/lims_utils/expeye_client/models/diffraction_plan_experiment_type.py new file mode 100644 index 0000000..b9a6b4f --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_experiment_type.py @@ -0,0 +1,28 @@ +from enum import StrEnum + + +class DiffractionPlanExperimentType(StrEnum): + COMMISSIONING = "Commissioning" + DEFAULT = "Default" + FIXED = "Fixed" + LIGAND_BINDING = "Ligand binding" + MAD = "MAD" + MAD_INVERSE_BEAM = "MAD - Inverse Beam" + MESH = "MESH" + METAL_ID = "Metal ID" + MXPRESSE = "MXPressE" + MXPRESSE_SAD = "MXPressE_SAD" + MXPRESSM = "MXPressM" + MXPRESSO = "MXPressO" + MXSCORE = "MXScore" + OSC = "OSC" + REFINEMENT = "Refinement" + SAD = "SAD" + SAD_INVERSE_BEAM = "SAD - Inverse Beam" + STEPPED_TRANSMISSION = "Stepped transmission" + XCHEM_HIGH_SYMMETRY = "XChem High Symmetry" + XCHEM_LOW_SYMMETRY = "XChem Low Symmetry" + XFE = "XFE" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_in.py b/src/lims_utils/expeye_client/models/diffraction_plan_in.py new file mode 100644 index 0000000..5d83b06 --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_in.py @@ -0,0 +1,1334 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.centring_method import CentringMethod +from ..models.collection_mode import CollectionMode +from ..models.diffraction_plan_experiment_type import DiffractionPlanExperimentType +from ..models.reduction_parameters import ReductionParameters +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import DiffractionPlanInScanParametersType0Type0 + from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 + + +T = TypeVar("T", bound="DiffractionPlanIn") + + +@_attrs_define +class DiffractionPlanIn: + """ + Attributes: + name (None | str | Unset): + experiment_kind (DiffractionPlanExperimentType | None | Unset): + observed_resolution (float | None | Unset): + minimal_resolution (float | None | Unset): + exposure_time (float | None | Unset): + oscillation_range (float | None | Unset): + maximal_resolution (float | None | Unset): + screening_resolution (float | None | Unset): + radiation_sensitivity (float | None | Unset): + anomalous_scatterer (None | str | Unset): + preferred_beam_size_x (float | None | Unset): + preferred_beam_size_y (float | None | Unset): + preferred_beam_diameter (float | None | Unset): + comments (None | str | Unset): + aimed_completeness (float | None | Unset): + aimed_i_over_sigma_at_highest_res (float | None | Unset): + aimed_multiplicity (float | None | Unset): + aimed_resolution (float | None | Unset): + anomalous_data (bool | None | Unset): + complexity (None | str | Unset): + estimate_radiation_damage (bool | None | Unset): + forced_space_group (None | str | Unset): + required_completeness (float | None | Unset): + required_multiplicity (float | None | Unset): + required_resolution (float | None | Unset): + kappa_strategy_option (None | str | Unset): + number_of_positions (int | None | Unset): + min_dim_accross_spindle_axis (float | None | Unset): + max_dim_accross_spindle_axis (float | None | Unset): + radiation_sensitivity_beta (float | None | Unset): + radiation_sensitivity_gamma (float | None | Unset): + min_osc_width (float | None | Unset): + detector_id (int | None | Unset): + distance (float | None | Unset): + orientation (float | None | Unset): + mono_bandwidth (float | None | Unset): + monochromator (None | str | Unset): + energy (float | None | Unset): + transmission (float | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + kappa_start (float | None | Unset): + axis_start (float | None | Unset): + axis_range (float | None | Unset): + number_of_images (int | None | Unset): + preset_for_proposal_id (int | None | Unset): + beam_line_name (None | str | Unset): + centring_method (CentringMethod | None | Unset): + user_path (None | str | Unset): + robot_plate_temperature (float | None | Unset): + exposure_temperature (float | None | Unset): + purification_column_id (int | None | Unset): + experiment_type_id (int | None | Unset): + collection_mode (CollectionMode | None | Unset): + priority (int | None | Unset): + q_min (float | None | Unset): + q_max (float | None | Unset): + reduction_parameters_averaging (None | ReductionParameters | Unset): + scan_parameters (DiffractionPlanInScanParametersType0Type0 | None | str | Unset): + strategy_option (None | str | StringSerialisedStrategyOptionType0 | Unset): + """ + + name: None | str | Unset = UNSET + experiment_kind: DiffractionPlanExperimentType | None | Unset = UNSET + observed_resolution: float | None | Unset = UNSET + minimal_resolution: float | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + oscillation_range: float | None | Unset = UNSET + maximal_resolution: float | None | Unset = UNSET + screening_resolution: float | None | Unset = UNSET + radiation_sensitivity: float | None | Unset = UNSET + anomalous_scatterer: None | str | Unset = UNSET + preferred_beam_size_x: float | None | Unset = UNSET + preferred_beam_size_y: float | None | Unset = UNSET + preferred_beam_diameter: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + aimed_completeness: float | None | Unset = UNSET + aimed_i_over_sigma_at_highest_res: float | None | Unset = UNSET + aimed_multiplicity: float | None | Unset = UNSET + aimed_resolution: float | None | Unset = UNSET + anomalous_data: bool | None | Unset = UNSET + complexity: None | str | Unset = UNSET + estimate_radiation_damage: bool | None | Unset = UNSET + forced_space_group: None | str | Unset = UNSET + required_completeness: float | None | Unset = UNSET + required_multiplicity: float | None | Unset = UNSET + required_resolution: float | None | Unset = UNSET + kappa_strategy_option: None | str | Unset = UNSET + number_of_positions: int | None | Unset = UNSET + min_dim_accross_spindle_axis: float | None | Unset = UNSET + max_dim_accross_spindle_axis: float | None | Unset = UNSET + radiation_sensitivity_beta: float | None | Unset = UNSET + radiation_sensitivity_gamma: float | None | Unset = UNSET + min_osc_width: float | None | Unset = UNSET + detector_id: int | None | Unset = UNSET + distance: float | None | Unset = UNSET + orientation: float | None | Unset = UNSET + mono_bandwidth: float | None | Unset = UNSET + monochromator: None | str | Unset = UNSET + energy: float | None | Unset = UNSET + transmission: float | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + kappa_start: float | None | Unset = UNSET + axis_start: float | None | Unset = UNSET + axis_range: float | None | Unset = UNSET + number_of_images: int | None | Unset = UNSET + preset_for_proposal_id: int | None | Unset = UNSET + beam_line_name: None | str | Unset = UNSET + centring_method: CentringMethod | None | Unset = UNSET + user_path: None | str | Unset = UNSET + robot_plate_temperature: float | None | Unset = UNSET + exposure_temperature: float | None | Unset = UNSET + purification_column_id: int | None | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + collection_mode: CollectionMode | None | Unset = UNSET + priority: int | None | Unset = UNSET + q_min: float | None | Unset = UNSET + q_max: float | None | Unset = UNSET + reduction_parameters_averaging: None | ReductionParameters | Unset = UNSET + scan_parameters: DiffractionPlanInScanParametersType0Type0 | None | str | Unset = UNSET + strategy_option: None | str | StringSerialisedStrategyOptionType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import DiffractionPlanInScanParametersType0Type0 # noqa: PLC0415 + from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + experiment_kind: None | str | Unset + if isinstance(self.experiment_kind, Unset): + experiment_kind = UNSET + elif isinstance(self.experiment_kind, DiffractionPlanExperimentType): + experiment_kind = self.experiment_kind.value + else: + experiment_kind = self.experiment_kind + + observed_resolution: float | None | Unset + if isinstance(self.observed_resolution, Unset): + observed_resolution = UNSET + else: + observed_resolution = self.observed_resolution + + minimal_resolution: float | None | Unset + if isinstance(self.minimal_resolution, Unset): + minimal_resolution = UNSET + else: + minimal_resolution = self.minimal_resolution + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + oscillation_range: float | None | Unset + if isinstance(self.oscillation_range, Unset): + oscillation_range = UNSET + else: + oscillation_range = self.oscillation_range + + maximal_resolution: float | None | Unset + if isinstance(self.maximal_resolution, Unset): + maximal_resolution = UNSET + else: + maximal_resolution = self.maximal_resolution + + screening_resolution: float | None | Unset + if isinstance(self.screening_resolution, Unset): + screening_resolution = UNSET + else: + screening_resolution = self.screening_resolution + + radiation_sensitivity: float | None | Unset + if isinstance(self.radiation_sensitivity, Unset): + radiation_sensitivity = UNSET + else: + radiation_sensitivity = self.radiation_sensitivity + + anomalous_scatterer: None | str | Unset + if isinstance(self.anomalous_scatterer, Unset): + anomalous_scatterer = UNSET + else: + anomalous_scatterer = self.anomalous_scatterer + + preferred_beam_size_x: float | None | Unset + if isinstance(self.preferred_beam_size_x, Unset): + preferred_beam_size_x = UNSET + else: + preferred_beam_size_x = self.preferred_beam_size_x + + preferred_beam_size_y: float | None | Unset + if isinstance(self.preferred_beam_size_y, Unset): + preferred_beam_size_y = UNSET + else: + preferred_beam_size_y = self.preferred_beam_size_y + + preferred_beam_diameter: float | None | Unset + if isinstance(self.preferred_beam_diameter, Unset): + preferred_beam_diameter = UNSET + else: + preferred_beam_diameter = self.preferred_beam_diameter + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + aimed_completeness: float | None | Unset + if isinstance(self.aimed_completeness, Unset): + aimed_completeness = UNSET + else: + aimed_completeness = self.aimed_completeness + + aimed_i_over_sigma_at_highest_res: float | None | Unset + if isinstance(self.aimed_i_over_sigma_at_highest_res, Unset): + aimed_i_over_sigma_at_highest_res = UNSET + else: + aimed_i_over_sigma_at_highest_res = self.aimed_i_over_sigma_at_highest_res + + aimed_multiplicity: float | None | Unset + if isinstance(self.aimed_multiplicity, Unset): + aimed_multiplicity = UNSET + else: + aimed_multiplicity = self.aimed_multiplicity + + aimed_resolution: float | None | Unset + if isinstance(self.aimed_resolution, Unset): + aimed_resolution = UNSET + else: + aimed_resolution = self.aimed_resolution + + anomalous_data: bool | None | Unset + if isinstance(self.anomalous_data, Unset): + anomalous_data = UNSET + else: + anomalous_data = self.anomalous_data + + complexity: None | str | Unset + if isinstance(self.complexity, Unset): + complexity = UNSET + else: + complexity = self.complexity + + estimate_radiation_damage: bool | None | Unset + if isinstance(self.estimate_radiation_damage, Unset): + estimate_radiation_damage = UNSET + else: + estimate_radiation_damage = self.estimate_radiation_damage + + forced_space_group: None | str | Unset + if isinstance(self.forced_space_group, Unset): + forced_space_group = UNSET + else: + forced_space_group = self.forced_space_group + + required_completeness: float | None | Unset + if isinstance(self.required_completeness, Unset): + required_completeness = UNSET + else: + required_completeness = self.required_completeness + + required_multiplicity: float | None | Unset + if isinstance(self.required_multiplicity, Unset): + required_multiplicity = UNSET + else: + required_multiplicity = self.required_multiplicity + + required_resolution: float | None | Unset + if isinstance(self.required_resolution, Unset): + required_resolution = UNSET + else: + required_resolution = self.required_resolution + + kappa_strategy_option: None | str | Unset + if isinstance(self.kappa_strategy_option, Unset): + kappa_strategy_option = UNSET + else: + kappa_strategy_option = self.kappa_strategy_option + + number_of_positions: int | None | Unset + if isinstance(self.number_of_positions, Unset): + number_of_positions = UNSET + else: + number_of_positions = self.number_of_positions + + min_dim_accross_spindle_axis: float | None | Unset + if isinstance(self.min_dim_accross_spindle_axis, Unset): + min_dim_accross_spindle_axis = UNSET + else: + min_dim_accross_spindle_axis = self.min_dim_accross_spindle_axis + + max_dim_accross_spindle_axis: float | None | Unset + if isinstance(self.max_dim_accross_spindle_axis, Unset): + max_dim_accross_spindle_axis = UNSET + else: + max_dim_accross_spindle_axis = self.max_dim_accross_spindle_axis + + radiation_sensitivity_beta: float | None | Unset + if isinstance(self.radiation_sensitivity_beta, Unset): + radiation_sensitivity_beta = UNSET + else: + radiation_sensitivity_beta = self.radiation_sensitivity_beta + + radiation_sensitivity_gamma: float | None | Unset + if isinstance(self.radiation_sensitivity_gamma, Unset): + radiation_sensitivity_gamma = UNSET + else: + radiation_sensitivity_gamma = self.radiation_sensitivity_gamma + + min_osc_width: float | None | Unset + if isinstance(self.min_osc_width, Unset): + min_osc_width = UNSET + else: + min_osc_width = self.min_osc_width + + detector_id: int | None | Unset + if isinstance(self.detector_id, Unset): + detector_id = UNSET + else: + detector_id = self.detector_id + + distance: float | None | Unset + if isinstance(self.distance, Unset): + distance = UNSET + else: + distance = self.distance + + orientation: float | None | Unset + if isinstance(self.orientation, Unset): + orientation = UNSET + else: + orientation = self.orientation + + mono_bandwidth: float | None | Unset + if isinstance(self.mono_bandwidth, Unset): + mono_bandwidth = UNSET + else: + mono_bandwidth = self.mono_bandwidth + + monochromator: None | str | Unset + if isinstance(self.monochromator, Unset): + monochromator = UNSET + else: + monochromator = self.monochromator + + energy: float | None | Unset + if isinstance(self.energy, Unset): + energy = UNSET + else: + energy = self.energy + + transmission: float | None | Unset + if isinstance(self.transmission, Unset): + transmission = UNSET + else: + transmission = self.transmission + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + kappa_start: float | None | Unset + if isinstance(self.kappa_start, Unset): + kappa_start = UNSET + else: + kappa_start = self.kappa_start + + axis_start: float | None | Unset + if isinstance(self.axis_start, Unset): + axis_start = UNSET + else: + axis_start = self.axis_start + + axis_range: float | None | Unset + if isinstance(self.axis_range, Unset): + axis_range = UNSET + else: + axis_range = self.axis_range + + number_of_images: int | None | Unset + if isinstance(self.number_of_images, Unset): + number_of_images = UNSET + else: + number_of_images = self.number_of_images + + preset_for_proposal_id: int | None | Unset + if isinstance(self.preset_for_proposal_id, Unset): + preset_for_proposal_id = UNSET + else: + preset_for_proposal_id = self.preset_for_proposal_id + + beam_line_name: None | str | Unset + if isinstance(self.beam_line_name, Unset): + beam_line_name = UNSET + else: + beam_line_name = self.beam_line_name + + centring_method: None | str | Unset + if isinstance(self.centring_method, Unset): + centring_method = UNSET + elif isinstance(self.centring_method, CentringMethod): + centring_method = self.centring_method.value + else: + centring_method = self.centring_method + + user_path: None | str | Unset + if isinstance(self.user_path, Unset): + user_path = UNSET + else: + user_path = self.user_path + + robot_plate_temperature: float | None | Unset + if isinstance(self.robot_plate_temperature, Unset): + robot_plate_temperature = UNSET + else: + robot_plate_temperature = self.robot_plate_temperature + + exposure_temperature: float | None | Unset + if isinstance(self.exposure_temperature, Unset): + exposure_temperature = UNSET + else: + exposure_temperature = self.exposure_temperature + + purification_column_id: int | None | Unset + if isinstance(self.purification_column_id, Unset): + purification_column_id = UNSET + else: + purification_column_id = self.purification_column_id + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + collection_mode: None | str | Unset + if isinstance(self.collection_mode, Unset): + collection_mode = UNSET + elif isinstance(self.collection_mode, CollectionMode): + collection_mode = self.collection_mode.value + else: + collection_mode = self.collection_mode + + priority: int | None | Unset + if isinstance(self.priority, Unset): + priority = UNSET + else: + priority = self.priority + + q_min: float | None | Unset + if isinstance(self.q_min, Unset): + q_min = UNSET + else: + q_min = self.q_min + + q_max: float | None | Unset + if isinstance(self.q_max, Unset): + q_max = UNSET + else: + q_max = self.q_max + + reduction_parameters_averaging: None | str | Unset + if isinstance(self.reduction_parameters_averaging, Unset): + reduction_parameters_averaging = UNSET + elif isinstance(self.reduction_parameters_averaging, ReductionParameters): + reduction_parameters_averaging = self.reduction_parameters_averaging.value + else: + reduction_parameters_averaging = self.reduction_parameters_averaging + + scan_parameters: dict[str, Any] | None | str | Unset + if isinstance(self.scan_parameters, Unset): + scan_parameters = UNSET + elif isinstance(self.scan_parameters, DiffractionPlanInScanParametersType0Type0): + scan_parameters = self.scan_parameters.to_dict() + else: + scan_parameters = self.scan_parameters + + strategy_option: dict[str, Any] | None | str | Unset + if isinstance(self.strategy_option, Unset): + strategy_option = UNSET + elif isinstance(self.strategy_option, StringSerialisedStrategyOptionType0): + strategy_option = self.strategy_option.to_dict() + else: + strategy_option = self.strategy_option + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if experiment_kind is not UNSET: + field_dict["experimentKind"] = experiment_kind + if observed_resolution is not UNSET: + field_dict["observedResolution"] = observed_resolution + if minimal_resolution is not UNSET: + field_dict["minimalResolution"] = minimal_resolution + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if oscillation_range is not UNSET: + field_dict["oscillationRange"] = oscillation_range + if maximal_resolution is not UNSET: + field_dict["maximalResolution"] = maximal_resolution + if screening_resolution is not UNSET: + field_dict["screeningResolution"] = screening_resolution + if radiation_sensitivity is not UNSET: + field_dict["radiationSensitivity"] = radiation_sensitivity + if anomalous_scatterer is not UNSET: + field_dict["anomalousScatterer"] = anomalous_scatterer + if preferred_beam_size_x is not UNSET: + field_dict["preferredBeamSizeX"] = preferred_beam_size_x + if preferred_beam_size_y is not UNSET: + field_dict["preferredBeamSizeY"] = preferred_beam_size_y + if preferred_beam_diameter is not UNSET: + field_dict["preferredBeamDiameter"] = preferred_beam_diameter + if comments is not UNSET: + field_dict["comments"] = comments + if aimed_completeness is not UNSET: + field_dict["aimedCompleteness"] = aimed_completeness + if aimed_i_over_sigma_at_highest_res is not UNSET: + field_dict["aimedIOverSigmaAtHighestRes"] = aimed_i_over_sigma_at_highest_res + if aimed_multiplicity is not UNSET: + field_dict["aimedMultiplicity"] = aimed_multiplicity + if aimed_resolution is not UNSET: + field_dict["aimedResolution"] = aimed_resolution + if anomalous_data is not UNSET: + field_dict["anomalousData"] = anomalous_data + if complexity is not UNSET: + field_dict["complexity"] = complexity + if estimate_radiation_damage is not UNSET: + field_dict["estimateRadiationDamage"] = estimate_radiation_damage + if forced_space_group is not UNSET: + field_dict["forcedSpaceGroup"] = forced_space_group + if required_completeness is not UNSET: + field_dict["requiredCompleteness"] = required_completeness + if required_multiplicity is not UNSET: + field_dict["requiredMultiplicity"] = required_multiplicity + if required_resolution is not UNSET: + field_dict["requiredResolution"] = required_resolution + if kappa_strategy_option is not UNSET: + field_dict["kappaStrategyOption"] = kappa_strategy_option + if number_of_positions is not UNSET: + field_dict["numberOfPositions"] = number_of_positions + if min_dim_accross_spindle_axis is not UNSET: + field_dict["minDimAccrossSpindleAxis"] = min_dim_accross_spindle_axis + if max_dim_accross_spindle_axis is not UNSET: + field_dict["maxDimAccrossSpindleAxis"] = max_dim_accross_spindle_axis + if radiation_sensitivity_beta is not UNSET: + field_dict["radiationSensitivityBeta"] = radiation_sensitivity_beta + if radiation_sensitivity_gamma is not UNSET: + field_dict["radiationSensitivityGamma"] = radiation_sensitivity_gamma + if min_osc_width is not UNSET: + field_dict["minOscWidth"] = min_osc_width + if detector_id is not UNSET: + field_dict["detectorId"] = detector_id + if distance is not UNSET: + field_dict["distance"] = distance + if orientation is not UNSET: + field_dict["orientation"] = orientation + if mono_bandwidth is not UNSET: + field_dict["monoBandwidth"] = mono_bandwidth + if monochromator is not UNSET: + field_dict["monochromator"] = monochromator + if energy is not UNSET: + field_dict["energy"] = energy + if transmission is not UNSET: + field_dict["transmission"] = transmission + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if kappa_start is not UNSET: + field_dict["kappaStart"] = kappa_start + if axis_start is not UNSET: + field_dict["axisStart"] = axis_start + if axis_range is not UNSET: + field_dict["axisRange"] = axis_range + if number_of_images is not UNSET: + field_dict["numberOfImages"] = number_of_images + if preset_for_proposal_id is not UNSET: + field_dict["presetForProposalId"] = preset_for_proposal_id + if beam_line_name is not UNSET: + field_dict["beamLineName"] = beam_line_name + if centring_method is not UNSET: + field_dict["centringMethod"] = centring_method + if user_path is not UNSET: + field_dict["userPath"] = user_path + if robot_plate_temperature is not UNSET: + field_dict["robotPlateTemperature"] = robot_plate_temperature + if exposure_temperature is not UNSET: + field_dict["exposureTemperature"] = exposure_temperature + if purification_column_id is not UNSET: + field_dict["purificationColumnId"] = purification_column_id + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if collection_mode is not UNSET: + field_dict["collectionMode"] = collection_mode + if priority is not UNSET: + field_dict["priority"] = priority + if q_min is not UNSET: + field_dict["qMin"] = q_min + if q_max is not UNSET: + field_dict["qMax"] = q_max + if reduction_parameters_averaging is not UNSET: + field_dict["reductionParametersAveraging"] = reduction_parameters_averaging + if scan_parameters is not UNSET: + field_dict["scanParameters"] = scan_parameters + if strategy_option is not UNSET: + field_dict["strategyOption"] = strategy_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import DiffractionPlanInScanParametersType0Type0 # noqa: PLC0415 + from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_experiment_kind(data: object) -> DiffractionPlanExperimentType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_kind_type_0 = DiffractionPlanExperimentType(data) + + return experiment_kind_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanExperimentType | None | Unset, data) + + experiment_kind = _parse_experiment_kind(d.pop("experimentKind", UNSET)) + + def _parse_observed_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + observed_resolution = _parse_observed_resolution(d.pop("observedResolution", UNSET)) + + def _parse_minimal_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + minimal_resolution = _parse_minimal_resolution(d.pop("minimalResolution", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_oscillation_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + oscillation_range = _parse_oscillation_range(d.pop("oscillationRange", UNSET)) + + def _parse_maximal_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + maximal_resolution = _parse_maximal_resolution(d.pop("maximalResolution", UNSET)) + + def _parse_screening_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + screening_resolution = _parse_screening_resolution(d.pop("screeningResolution", UNSET)) + + def _parse_radiation_sensitivity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity = _parse_radiation_sensitivity(d.pop("radiationSensitivity", UNSET)) + + def _parse_anomalous_scatterer(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + anomalous_scatterer = _parse_anomalous_scatterer(d.pop("anomalousScatterer", UNSET)) + + def _parse_preferred_beam_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_size_x = _parse_preferred_beam_size_x(d.pop("preferredBeamSizeX", UNSET)) + + def _parse_preferred_beam_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_size_y = _parse_preferred_beam_size_y(d.pop("preferredBeamSizeY", UNSET)) + + def _parse_preferred_beam_diameter(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_diameter = _parse_preferred_beam_diameter(d.pop("preferredBeamDiameter", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_aimed_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_completeness = _parse_aimed_completeness(d.pop("aimedCompleteness", UNSET)) + + def _parse_aimed_i_over_sigma_at_highest_res(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_i_over_sigma_at_highest_res = _parse_aimed_i_over_sigma_at_highest_res( + d.pop("aimedIOverSigmaAtHighestRes", UNSET) + ) + + def _parse_aimed_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_multiplicity = _parse_aimed_multiplicity(d.pop("aimedMultiplicity", UNSET)) + + def _parse_aimed_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_resolution = _parse_aimed_resolution(d.pop("aimedResolution", UNSET)) + + def _parse_anomalous_data(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + anomalous_data = _parse_anomalous_data(d.pop("anomalousData", UNSET)) + + def _parse_complexity(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + complexity = _parse_complexity(d.pop("complexity", UNSET)) + + def _parse_estimate_radiation_damage(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + estimate_radiation_damage = _parse_estimate_radiation_damage(d.pop("estimateRadiationDamage", UNSET)) + + def _parse_forced_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + forced_space_group = _parse_forced_space_group(d.pop("forcedSpaceGroup", UNSET)) + + def _parse_required_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_completeness = _parse_required_completeness(d.pop("requiredCompleteness", UNSET)) + + def _parse_required_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_multiplicity = _parse_required_multiplicity(d.pop("requiredMultiplicity", UNSET)) + + def _parse_required_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_resolution = _parse_required_resolution(d.pop("requiredResolution", UNSET)) + + def _parse_kappa_strategy_option(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kappa_strategy_option = _parse_kappa_strategy_option(d.pop("kappaStrategyOption", UNSET)) + + def _parse_number_of_positions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_positions = _parse_number_of_positions(d.pop("numberOfPositions", UNSET)) + + def _parse_min_dim_accross_spindle_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_dim_accross_spindle_axis = _parse_min_dim_accross_spindle_axis(d.pop("minDimAccrossSpindleAxis", UNSET)) + + def _parse_max_dim_accross_spindle_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_dim_accross_spindle_axis = _parse_max_dim_accross_spindle_axis(d.pop("maxDimAccrossSpindleAxis", UNSET)) + + def _parse_radiation_sensitivity_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity_beta = _parse_radiation_sensitivity_beta(d.pop("radiationSensitivityBeta", UNSET)) + + def _parse_radiation_sensitivity_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity_gamma = _parse_radiation_sensitivity_gamma(d.pop("radiationSensitivityGamma", UNSET)) + + def _parse_min_osc_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_osc_width = _parse_min_osc_width(d.pop("minOscWidth", UNSET)) + + def _parse_detector_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + detector_id = _parse_detector_id(d.pop("detectorId", UNSET)) + + def _parse_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + distance = _parse_distance(d.pop("distance", UNSET)) + + def _parse_orientation(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + orientation = _parse_orientation(d.pop("orientation", UNSET)) + + def _parse_mono_bandwidth(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mono_bandwidth = _parse_mono_bandwidth(d.pop("monoBandwidth", UNSET)) + + def _parse_monochromator(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + monochromator = _parse_monochromator(d.pop("monochromator", UNSET)) + + def _parse_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + energy = _parse_energy(d.pop("energy", UNSET)) + + def _parse_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission = _parse_transmission(d.pop("transmission", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_kappa_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + kappa_start = _parse_kappa_start(d.pop("kappaStart", UNSET)) + + def _parse_axis_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_start = _parse_axis_start(d.pop("axisStart", UNSET)) + + def _parse_axis_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_range = _parse_axis_range(d.pop("axisRange", UNSET)) + + def _parse_number_of_images(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_images = _parse_number_of_images(d.pop("numberOfImages", UNSET)) + + def _parse_preset_for_proposal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + preset_for_proposal_id = _parse_preset_for_proposal_id(d.pop("presetForProposalId", UNSET)) + + def _parse_beam_line_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beam_line_name = _parse_beam_line_name(d.pop("beamLineName", UNSET)) + + def _parse_centring_method(data: object) -> CentringMethod | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + centring_method_type_0 = CentringMethod(data) + + return centring_method_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CentringMethod | None | Unset, data) + + centring_method = _parse_centring_method(d.pop("centringMethod", UNSET)) + + def _parse_user_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_path = _parse_user_path(d.pop("userPath", UNSET)) + + def _parse_robot_plate_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + robot_plate_temperature = _parse_robot_plate_temperature(d.pop("robotPlateTemperature", UNSET)) + + def _parse_exposure_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_temperature = _parse_exposure_temperature(d.pop("exposureTemperature", UNSET)) + + def _parse_purification_column_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + purification_column_id = _parse_purification_column_id(d.pop("purificationColumnId", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_collection_mode(data: object) -> CollectionMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + collection_mode_type_0 = CollectionMode(data) + + return collection_mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CollectionMode | None | Unset, data) + + collection_mode = _parse_collection_mode(d.pop("collectionMode", UNSET)) + + def _parse_priority(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + priority = _parse_priority(d.pop("priority", UNSET)) + + def _parse_q_min(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + q_min = _parse_q_min(d.pop("qMin", UNSET)) + + def _parse_q_max(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + q_max = _parse_q_max(d.pop("qMax", UNSET)) + + def _parse_reduction_parameters_averaging(data: object) -> None | ReductionParameters | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reduction_parameters_averaging_type_0 = ReductionParameters(data) + + return reduction_parameters_averaging_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ReductionParameters | Unset, data) + + reduction_parameters_averaging = _parse_reduction_parameters_averaging( + d.pop("reductionParametersAveraging", UNSET) + ) + + def _parse_scan_parameters(data: object) -> DiffractionPlanInScanParametersType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + scan_parameters_type_0_type_0 = DiffractionPlanInScanParametersType0Type0.from_dict(data) + + return scan_parameters_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanInScanParametersType0Type0 | None | str | Unset, data) + + scan_parameters = _parse_scan_parameters(d.pop("scanParameters", UNSET)) + + def _parse_strategy_option(data: object) -> None | str | StringSerialisedStrategyOptionType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_string_serialised_strategy_option_type_0 = ( + StringSerialisedStrategyOptionType0.from_dict(data) + ) + + return componentsschemas_string_serialised_strategy_option_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | str | StringSerialisedStrategyOptionType0 | Unset, data) + + strategy_option = _parse_strategy_option(d.pop("strategyOption", UNSET)) + + diffraction_plan_in = cls( + name=name, + experiment_kind=experiment_kind, + observed_resolution=observed_resolution, + minimal_resolution=minimal_resolution, + exposure_time=exposure_time, + oscillation_range=oscillation_range, + maximal_resolution=maximal_resolution, + screening_resolution=screening_resolution, + radiation_sensitivity=radiation_sensitivity, + anomalous_scatterer=anomalous_scatterer, + preferred_beam_size_x=preferred_beam_size_x, + preferred_beam_size_y=preferred_beam_size_y, + preferred_beam_diameter=preferred_beam_diameter, + comments=comments, + aimed_completeness=aimed_completeness, + aimed_i_over_sigma_at_highest_res=aimed_i_over_sigma_at_highest_res, + aimed_multiplicity=aimed_multiplicity, + aimed_resolution=aimed_resolution, + anomalous_data=anomalous_data, + complexity=complexity, + estimate_radiation_damage=estimate_radiation_damage, + forced_space_group=forced_space_group, + required_completeness=required_completeness, + required_multiplicity=required_multiplicity, + required_resolution=required_resolution, + kappa_strategy_option=kappa_strategy_option, + number_of_positions=number_of_positions, + min_dim_accross_spindle_axis=min_dim_accross_spindle_axis, + max_dim_accross_spindle_axis=max_dim_accross_spindle_axis, + radiation_sensitivity_beta=radiation_sensitivity_beta, + radiation_sensitivity_gamma=radiation_sensitivity_gamma, + min_osc_width=min_osc_width, + detector_id=detector_id, + distance=distance, + orientation=orientation, + mono_bandwidth=mono_bandwidth, + monochromator=monochromator, + energy=energy, + transmission=transmission, + box_size_x=box_size_x, + box_size_y=box_size_y, + kappa_start=kappa_start, + axis_start=axis_start, + axis_range=axis_range, + number_of_images=number_of_images, + preset_for_proposal_id=preset_for_proposal_id, + beam_line_name=beam_line_name, + centring_method=centring_method, + user_path=user_path, + robot_plate_temperature=robot_plate_temperature, + exposure_temperature=exposure_temperature, + purification_column_id=purification_column_id, + experiment_type_id=experiment_type_id, + collection_mode=collection_mode, + priority=priority, + q_min=q_min, + q_max=q_max, + reduction_parameters_averaging=reduction_parameters_averaging, + scan_parameters=scan_parameters, + strategy_option=strategy_option, + ) + + diffraction_plan_in.additional_properties = d + return diffraction_plan_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_in_scan_parameters_type_0_type_0.py b/src/lims_utils/expeye_client/models/diffraction_plan_in_scan_parameters_type_0_type_0.py new file mode 100644 index 0000000..bbeacb5 --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_in_scan_parameters_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DiffractionPlanInScanParametersType0Type0") + + +@_attrs_define +class DiffractionPlanInScanParametersType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + diffraction_plan_in_scan_parameters_type_0_type_0 = cls() + + diffraction_plan_in_scan_parameters_type_0_type_0.additional_properties = d + return diffraction_plan_in_scan_parameters_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_optional.py b/src/lims_utils/expeye_client/models/diffraction_plan_optional.py new file mode 100644 index 0000000..8512b09 --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_optional.py @@ -0,0 +1,1342 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.centring_method import CentringMethod +from ..models.collection_mode import CollectionMode +from ..models.diffraction_plan_experiment_type import DiffractionPlanExperimentType +from ..models.reduction_parameters import ReductionParameters +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.diffraction_plan_optional_scan_parameters_type_0_type_0 import ( + DiffractionPlanOptionalScanParametersType0Type0, + ) + from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 + + +T = TypeVar("T", bound="DiffractionPlanOptional") + + +@_attrs_define +class DiffractionPlanOptional: + """ + Attributes: + name (None | str | Unset): + experiment_kind (DiffractionPlanExperimentType | None | Unset): + observed_resolution (float | None | Unset): + minimal_resolution (float | None | Unset): + exposure_time (float | None | Unset): + oscillation_range (float | None | Unset): + maximal_resolution (float | None | Unset): + screening_resolution (float | None | Unset): + radiation_sensitivity (float | None | Unset): + anomalous_scatterer (None | str | Unset): + preferred_beam_size_x (float | None | Unset): + preferred_beam_size_y (float | None | Unset): + preferred_beam_diameter (float | None | Unset): + comments (None | str | Unset): + aimed_completeness (float | None | Unset): + aimed_i_over_sigma_at_highest_res (float | None | Unset): + aimed_multiplicity (float | None | Unset): + aimed_resolution (float | None | Unset): + anomalous_data (bool | None | Unset): + complexity (None | str | Unset): + estimate_radiation_damage (bool | None | Unset): + forced_space_group (None | str | Unset): + required_completeness (float | None | Unset): + required_multiplicity (float | None | Unset): + required_resolution (float | None | Unset): + kappa_strategy_option (None | str | Unset): + number_of_positions (int | None | Unset): + min_dim_accross_spindle_axis (float | None | Unset): + max_dim_accross_spindle_axis (float | None | Unset): + radiation_sensitivity_beta (float | None | Unset): + radiation_sensitivity_gamma (float | None | Unset): + min_osc_width (float | None | Unset): + detector_id (int | None | Unset): + distance (float | None | Unset): + orientation (float | None | Unset): + mono_bandwidth (float | None | Unset): + monochromator (None | str | Unset): + energy (float | None | Unset): + transmission (float | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + kappa_start (float | None | Unset): + axis_start (float | None | Unset): + axis_range (float | None | Unset): + number_of_images (int | None | Unset): + preset_for_proposal_id (int | None | Unset): + beam_line_name (None | str | Unset): + centring_method (CentringMethod | None | Unset): + user_path (None | str | Unset): + robot_plate_temperature (float | None | Unset): + exposure_temperature (float | None | Unset): + purification_column_id (int | None | Unset): + experiment_type_id (int | None | Unset): + collection_mode (CollectionMode | None | Unset): + priority (int | None | Unset): + q_min (float | None | Unset): + q_max (float | None | Unset): + reduction_parameters_averaging (None | ReductionParameters | Unset): + scan_parameters (DiffractionPlanOptionalScanParametersType0Type0 | None | str | Unset): + strategy_option (None | str | StringSerialisedStrategyOptionType0 | Unset): + """ + + name: None | str | Unset = UNSET + experiment_kind: DiffractionPlanExperimentType | None | Unset = UNSET + observed_resolution: float | None | Unset = UNSET + minimal_resolution: float | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + oscillation_range: float | None | Unset = UNSET + maximal_resolution: float | None | Unset = UNSET + screening_resolution: float | None | Unset = UNSET + radiation_sensitivity: float | None | Unset = UNSET + anomalous_scatterer: None | str | Unset = UNSET + preferred_beam_size_x: float | None | Unset = UNSET + preferred_beam_size_y: float | None | Unset = UNSET + preferred_beam_diameter: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + aimed_completeness: float | None | Unset = UNSET + aimed_i_over_sigma_at_highest_res: float | None | Unset = UNSET + aimed_multiplicity: float | None | Unset = UNSET + aimed_resolution: float | None | Unset = UNSET + anomalous_data: bool | None | Unset = UNSET + complexity: None | str | Unset = UNSET + estimate_radiation_damage: bool | None | Unset = UNSET + forced_space_group: None | str | Unset = UNSET + required_completeness: float | None | Unset = UNSET + required_multiplicity: float | None | Unset = UNSET + required_resolution: float | None | Unset = UNSET + kappa_strategy_option: None | str | Unset = UNSET + number_of_positions: int | None | Unset = UNSET + min_dim_accross_spindle_axis: float | None | Unset = UNSET + max_dim_accross_spindle_axis: float | None | Unset = UNSET + radiation_sensitivity_beta: float | None | Unset = UNSET + radiation_sensitivity_gamma: float | None | Unset = UNSET + min_osc_width: float | None | Unset = UNSET + detector_id: int | None | Unset = UNSET + distance: float | None | Unset = UNSET + orientation: float | None | Unset = UNSET + mono_bandwidth: float | None | Unset = UNSET + monochromator: None | str | Unset = UNSET + energy: float | None | Unset = UNSET + transmission: float | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + kappa_start: float | None | Unset = UNSET + axis_start: float | None | Unset = UNSET + axis_range: float | None | Unset = UNSET + number_of_images: int | None | Unset = UNSET + preset_for_proposal_id: int | None | Unset = UNSET + beam_line_name: None | str | Unset = UNSET + centring_method: CentringMethod | None | Unset = UNSET + user_path: None | str | Unset = UNSET + robot_plate_temperature: float | None | Unset = UNSET + exposure_temperature: float | None | Unset = UNSET + purification_column_id: int | None | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + collection_mode: CollectionMode | None | Unset = UNSET + priority: int | None | Unset = UNSET + q_min: float | None | Unset = UNSET + q_max: float | None | Unset = UNSET + reduction_parameters_averaging: None | ReductionParameters | Unset = UNSET + scan_parameters: DiffractionPlanOptionalScanParametersType0Type0 | None | str | Unset = UNSET + strategy_option: None | str | StringSerialisedStrategyOptionType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.diffraction_plan_optional_scan_parameters_type_0_type_0 import ( + DiffractionPlanOptionalScanParametersType0Type0, # noqa: PLC0415 + ) + from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + experiment_kind: None | str | Unset + if isinstance(self.experiment_kind, Unset): + experiment_kind = UNSET + elif isinstance(self.experiment_kind, DiffractionPlanExperimentType): + experiment_kind = self.experiment_kind.value + else: + experiment_kind = self.experiment_kind + + observed_resolution: float | None | Unset + if isinstance(self.observed_resolution, Unset): + observed_resolution = UNSET + else: + observed_resolution = self.observed_resolution + + minimal_resolution: float | None | Unset + if isinstance(self.minimal_resolution, Unset): + minimal_resolution = UNSET + else: + minimal_resolution = self.minimal_resolution + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + oscillation_range: float | None | Unset + if isinstance(self.oscillation_range, Unset): + oscillation_range = UNSET + else: + oscillation_range = self.oscillation_range + + maximal_resolution: float | None | Unset + if isinstance(self.maximal_resolution, Unset): + maximal_resolution = UNSET + else: + maximal_resolution = self.maximal_resolution + + screening_resolution: float | None | Unset + if isinstance(self.screening_resolution, Unset): + screening_resolution = UNSET + else: + screening_resolution = self.screening_resolution + + radiation_sensitivity: float | None | Unset + if isinstance(self.radiation_sensitivity, Unset): + radiation_sensitivity = UNSET + else: + radiation_sensitivity = self.radiation_sensitivity + + anomalous_scatterer: None | str | Unset + if isinstance(self.anomalous_scatterer, Unset): + anomalous_scatterer = UNSET + else: + anomalous_scatterer = self.anomalous_scatterer + + preferred_beam_size_x: float | None | Unset + if isinstance(self.preferred_beam_size_x, Unset): + preferred_beam_size_x = UNSET + else: + preferred_beam_size_x = self.preferred_beam_size_x + + preferred_beam_size_y: float | None | Unset + if isinstance(self.preferred_beam_size_y, Unset): + preferred_beam_size_y = UNSET + else: + preferred_beam_size_y = self.preferred_beam_size_y + + preferred_beam_diameter: float | None | Unset + if isinstance(self.preferred_beam_diameter, Unset): + preferred_beam_diameter = UNSET + else: + preferred_beam_diameter = self.preferred_beam_diameter + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + aimed_completeness: float | None | Unset + if isinstance(self.aimed_completeness, Unset): + aimed_completeness = UNSET + else: + aimed_completeness = self.aimed_completeness + + aimed_i_over_sigma_at_highest_res: float | None | Unset + if isinstance(self.aimed_i_over_sigma_at_highest_res, Unset): + aimed_i_over_sigma_at_highest_res = UNSET + else: + aimed_i_over_sigma_at_highest_res = self.aimed_i_over_sigma_at_highest_res + + aimed_multiplicity: float | None | Unset + if isinstance(self.aimed_multiplicity, Unset): + aimed_multiplicity = UNSET + else: + aimed_multiplicity = self.aimed_multiplicity + + aimed_resolution: float | None | Unset + if isinstance(self.aimed_resolution, Unset): + aimed_resolution = UNSET + else: + aimed_resolution = self.aimed_resolution + + anomalous_data: bool | None | Unset + if isinstance(self.anomalous_data, Unset): + anomalous_data = UNSET + else: + anomalous_data = self.anomalous_data + + complexity: None | str | Unset + if isinstance(self.complexity, Unset): + complexity = UNSET + else: + complexity = self.complexity + + estimate_radiation_damage: bool | None | Unset + if isinstance(self.estimate_radiation_damage, Unset): + estimate_radiation_damage = UNSET + else: + estimate_radiation_damage = self.estimate_radiation_damage + + forced_space_group: None | str | Unset + if isinstance(self.forced_space_group, Unset): + forced_space_group = UNSET + else: + forced_space_group = self.forced_space_group + + required_completeness: float | None | Unset + if isinstance(self.required_completeness, Unset): + required_completeness = UNSET + else: + required_completeness = self.required_completeness + + required_multiplicity: float | None | Unset + if isinstance(self.required_multiplicity, Unset): + required_multiplicity = UNSET + else: + required_multiplicity = self.required_multiplicity + + required_resolution: float | None | Unset + if isinstance(self.required_resolution, Unset): + required_resolution = UNSET + else: + required_resolution = self.required_resolution + + kappa_strategy_option: None | str | Unset + if isinstance(self.kappa_strategy_option, Unset): + kappa_strategy_option = UNSET + else: + kappa_strategy_option = self.kappa_strategy_option + + number_of_positions: int | None | Unset + if isinstance(self.number_of_positions, Unset): + number_of_positions = UNSET + else: + number_of_positions = self.number_of_positions + + min_dim_accross_spindle_axis: float | None | Unset + if isinstance(self.min_dim_accross_spindle_axis, Unset): + min_dim_accross_spindle_axis = UNSET + else: + min_dim_accross_spindle_axis = self.min_dim_accross_spindle_axis + + max_dim_accross_spindle_axis: float | None | Unset + if isinstance(self.max_dim_accross_spindle_axis, Unset): + max_dim_accross_spindle_axis = UNSET + else: + max_dim_accross_spindle_axis = self.max_dim_accross_spindle_axis + + radiation_sensitivity_beta: float | None | Unset + if isinstance(self.radiation_sensitivity_beta, Unset): + radiation_sensitivity_beta = UNSET + else: + radiation_sensitivity_beta = self.radiation_sensitivity_beta + + radiation_sensitivity_gamma: float | None | Unset + if isinstance(self.radiation_sensitivity_gamma, Unset): + radiation_sensitivity_gamma = UNSET + else: + radiation_sensitivity_gamma = self.radiation_sensitivity_gamma + + min_osc_width: float | None | Unset + if isinstance(self.min_osc_width, Unset): + min_osc_width = UNSET + else: + min_osc_width = self.min_osc_width + + detector_id: int | None | Unset + if isinstance(self.detector_id, Unset): + detector_id = UNSET + else: + detector_id = self.detector_id + + distance: float | None | Unset + if isinstance(self.distance, Unset): + distance = UNSET + else: + distance = self.distance + + orientation: float | None | Unset + if isinstance(self.orientation, Unset): + orientation = UNSET + else: + orientation = self.orientation + + mono_bandwidth: float | None | Unset + if isinstance(self.mono_bandwidth, Unset): + mono_bandwidth = UNSET + else: + mono_bandwidth = self.mono_bandwidth + + monochromator: None | str | Unset + if isinstance(self.monochromator, Unset): + monochromator = UNSET + else: + monochromator = self.monochromator + + energy: float | None | Unset + if isinstance(self.energy, Unset): + energy = UNSET + else: + energy = self.energy + + transmission: float | None | Unset + if isinstance(self.transmission, Unset): + transmission = UNSET + else: + transmission = self.transmission + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + kappa_start: float | None | Unset + if isinstance(self.kappa_start, Unset): + kappa_start = UNSET + else: + kappa_start = self.kappa_start + + axis_start: float | None | Unset + if isinstance(self.axis_start, Unset): + axis_start = UNSET + else: + axis_start = self.axis_start + + axis_range: float | None | Unset + if isinstance(self.axis_range, Unset): + axis_range = UNSET + else: + axis_range = self.axis_range + + number_of_images: int | None | Unset + if isinstance(self.number_of_images, Unset): + number_of_images = UNSET + else: + number_of_images = self.number_of_images + + preset_for_proposal_id: int | None | Unset + if isinstance(self.preset_for_proposal_id, Unset): + preset_for_proposal_id = UNSET + else: + preset_for_proposal_id = self.preset_for_proposal_id + + beam_line_name: None | str | Unset + if isinstance(self.beam_line_name, Unset): + beam_line_name = UNSET + else: + beam_line_name = self.beam_line_name + + centring_method: None | str | Unset + if isinstance(self.centring_method, Unset): + centring_method = UNSET + elif isinstance(self.centring_method, CentringMethod): + centring_method = self.centring_method.value + else: + centring_method = self.centring_method + + user_path: None | str | Unset + if isinstance(self.user_path, Unset): + user_path = UNSET + else: + user_path = self.user_path + + robot_plate_temperature: float | None | Unset + if isinstance(self.robot_plate_temperature, Unset): + robot_plate_temperature = UNSET + else: + robot_plate_temperature = self.robot_plate_temperature + + exposure_temperature: float | None | Unset + if isinstance(self.exposure_temperature, Unset): + exposure_temperature = UNSET + else: + exposure_temperature = self.exposure_temperature + + purification_column_id: int | None | Unset + if isinstance(self.purification_column_id, Unset): + purification_column_id = UNSET + else: + purification_column_id = self.purification_column_id + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + collection_mode: None | str | Unset + if isinstance(self.collection_mode, Unset): + collection_mode = UNSET + elif isinstance(self.collection_mode, CollectionMode): + collection_mode = self.collection_mode.value + else: + collection_mode = self.collection_mode + + priority: int | None | Unset + if isinstance(self.priority, Unset): + priority = UNSET + else: + priority = self.priority + + q_min: float | None | Unset + if isinstance(self.q_min, Unset): + q_min = UNSET + else: + q_min = self.q_min + + q_max: float | None | Unset + if isinstance(self.q_max, Unset): + q_max = UNSET + else: + q_max = self.q_max + + reduction_parameters_averaging: None | str | Unset + if isinstance(self.reduction_parameters_averaging, Unset): + reduction_parameters_averaging = UNSET + elif isinstance(self.reduction_parameters_averaging, ReductionParameters): + reduction_parameters_averaging = self.reduction_parameters_averaging.value + else: + reduction_parameters_averaging = self.reduction_parameters_averaging + + scan_parameters: dict[str, Any] | None | str | Unset + if isinstance(self.scan_parameters, Unset): + scan_parameters = UNSET + elif isinstance(self.scan_parameters, DiffractionPlanOptionalScanParametersType0Type0): + scan_parameters = self.scan_parameters.to_dict() + else: + scan_parameters = self.scan_parameters + + strategy_option: dict[str, Any] | None | str | Unset + if isinstance(self.strategy_option, Unset): + strategy_option = UNSET + elif isinstance(self.strategy_option, StringSerialisedStrategyOptionType0): + strategy_option = self.strategy_option.to_dict() + else: + strategy_option = self.strategy_option + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if experiment_kind is not UNSET: + field_dict["experimentKind"] = experiment_kind + if observed_resolution is not UNSET: + field_dict["observedResolution"] = observed_resolution + if minimal_resolution is not UNSET: + field_dict["minimalResolution"] = minimal_resolution + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if oscillation_range is not UNSET: + field_dict["oscillationRange"] = oscillation_range + if maximal_resolution is not UNSET: + field_dict["maximalResolution"] = maximal_resolution + if screening_resolution is not UNSET: + field_dict["screeningResolution"] = screening_resolution + if radiation_sensitivity is not UNSET: + field_dict["radiationSensitivity"] = radiation_sensitivity + if anomalous_scatterer is not UNSET: + field_dict["anomalousScatterer"] = anomalous_scatterer + if preferred_beam_size_x is not UNSET: + field_dict["preferredBeamSizeX"] = preferred_beam_size_x + if preferred_beam_size_y is not UNSET: + field_dict["preferredBeamSizeY"] = preferred_beam_size_y + if preferred_beam_diameter is not UNSET: + field_dict["preferredBeamDiameter"] = preferred_beam_diameter + if comments is not UNSET: + field_dict["comments"] = comments + if aimed_completeness is not UNSET: + field_dict["aimedCompleteness"] = aimed_completeness + if aimed_i_over_sigma_at_highest_res is not UNSET: + field_dict["aimedIOverSigmaAtHighestRes"] = aimed_i_over_sigma_at_highest_res + if aimed_multiplicity is not UNSET: + field_dict["aimedMultiplicity"] = aimed_multiplicity + if aimed_resolution is not UNSET: + field_dict["aimedResolution"] = aimed_resolution + if anomalous_data is not UNSET: + field_dict["anomalousData"] = anomalous_data + if complexity is not UNSET: + field_dict["complexity"] = complexity + if estimate_radiation_damage is not UNSET: + field_dict["estimateRadiationDamage"] = estimate_radiation_damage + if forced_space_group is not UNSET: + field_dict["forcedSpaceGroup"] = forced_space_group + if required_completeness is not UNSET: + field_dict["requiredCompleteness"] = required_completeness + if required_multiplicity is not UNSET: + field_dict["requiredMultiplicity"] = required_multiplicity + if required_resolution is not UNSET: + field_dict["requiredResolution"] = required_resolution + if kappa_strategy_option is not UNSET: + field_dict["kappaStrategyOption"] = kappa_strategy_option + if number_of_positions is not UNSET: + field_dict["numberOfPositions"] = number_of_positions + if min_dim_accross_spindle_axis is not UNSET: + field_dict["minDimAccrossSpindleAxis"] = min_dim_accross_spindle_axis + if max_dim_accross_spindle_axis is not UNSET: + field_dict["maxDimAccrossSpindleAxis"] = max_dim_accross_spindle_axis + if radiation_sensitivity_beta is not UNSET: + field_dict["radiationSensitivityBeta"] = radiation_sensitivity_beta + if radiation_sensitivity_gamma is not UNSET: + field_dict["radiationSensitivityGamma"] = radiation_sensitivity_gamma + if min_osc_width is not UNSET: + field_dict["minOscWidth"] = min_osc_width + if detector_id is not UNSET: + field_dict["detectorId"] = detector_id + if distance is not UNSET: + field_dict["distance"] = distance + if orientation is not UNSET: + field_dict["orientation"] = orientation + if mono_bandwidth is not UNSET: + field_dict["monoBandwidth"] = mono_bandwidth + if monochromator is not UNSET: + field_dict["monochromator"] = monochromator + if energy is not UNSET: + field_dict["energy"] = energy + if transmission is not UNSET: + field_dict["transmission"] = transmission + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if kappa_start is not UNSET: + field_dict["kappaStart"] = kappa_start + if axis_start is not UNSET: + field_dict["axisStart"] = axis_start + if axis_range is not UNSET: + field_dict["axisRange"] = axis_range + if number_of_images is not UNSET: + field_dict["numberOfImages"] = number_of_images + if preset_for_proposal_id is not UNSET: + field_dict["presetForProposalId"] = preset_for_proposal_id + if beam_line_name is not UNSET: + field_dict["beamLineName"] = beam_line_name + if centring_method is not UNSET: + field_dict["centringMethod"] = centring_method + if user_path is not UNSET: + field_dict["userPath"] = user_path + if robot_plate_temperature is not UNSET: + field_dict["robotPlateTemperature"] = robot_plate_temperature + if exposure_temperature is not UNSET: + field_dict["exposureTemperature"] = exposure_temperature + if purification_column_id is not UNSET: + field_dict["purificationColumnId"] = purification_column_id + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if collection_mode is not UNSET: + field_dict["collectionMode"] = collection_mode + if priority is not UNSET: + field_dict["priority"] = priority + if q_min is not UNSET: + field_dict["qMin"] = q_min + if q_max is not UNSET: + field_dict["qMax"] = q_max + if reduction_parameters_averaging is not UNSET: + field_dict["reductionParametersAveraging"] = reduction_parameters_averaging + if scan_parameters is not UNSET: + field_dict["scanParameters"] = scan_parameters + if strategy_option is not UNSET: + field_dict["strategyOption"] = strategy_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.diffraction_plan_optional_scan_parameters_type_0_type_0 import ( + DiffractionPlanOptionalScanParametersType0Type0, # noqa: PLC0415 + ) + from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_experiment_kind(data: object) -> DiffractionPlanExperimentType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_kind_type_0 = DiffractionPlanExperimentType(data) + + return experiment_kind_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanExperimentType | None | Unset, data) + + experiment_kind = _parse_experiment_kind(d.pop("experimentKind", UNSET)) + + def _parse_observed_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + observed_resolution = _parse_observed_resolution(d.pop("observedResolution", UNSET)) + + def _parse_minimal_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + minimal_resolution = _parse_minimal_resolution(d.pop("minimalResolution", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_oscillation_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + oscillation_range = _parse_oscillation_range(d.pop("oscillationRange", UNSET)) + + def _parse_maximal_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + maximal_resolution = _parse_maximal_resolution(d.pop("maximalResolution", UNSET)) + + def _parse_screening_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + screening_resolution = _parse_screening_resolution(d.pop("screeningResolution", UNSET)) + + def _parse_radiation_sensitivity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity = _parse_radiation_sensitivity(d.pop("radiationSensitivity", UNSET)) + + def _parse_anomalous_scatterer(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + anomalous_scatterer = _parse_anomalous_scatterer(d.pop("anomalousScatterer", UNSET)) + + def _parse_preferred_beam_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_size_x = _parse_preferred_beam_size_x(d.pop("preferredBeamSizeX", UNSET)) + + def _parse_preferred_beam_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_size_y = _parse_preferred_beam_size_y(d.pop("preferredBeamSizeY", UNSET)) + + def _parse_preferred_beam_diameter(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_diameter = _parse_preferred_beam_diameter(d.pop("preferredBeamDiameter", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_aimed_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_completeness = _parse_aimed_completeness(d.pop("aimedCompleteness", UNSET)) + + def _parse_aimed_i_over_sigma_at_highest_res(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_i_over_sigma_at_highest_res = _parse_aimed_i_over_sigma_at_highest_res( + d.pop("aimedIOverSigmaAtHighestRes", UNSET) + ) + + def _parse_aimed_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_multiplicity = _parse_aimed_multiplicity(d.pop("aimedMultiplicity", UNSET)) + + def _parse_aimed_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_resolution = _parse_aimed_resolution(d.pop("aimedResolution", UNSET)) + + def _parse_anomalous_data(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + anomalous_data = _parse_anomalous_data(d.pop("anomalousData", UNSET)) + + def _parse_complexity(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + complexity = _parse_complexity(d.pop("complexity", UNSET)) + + def _parse_estimate_radiation_damage(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + estimate_radiation_damage = _parse_estimate_radiation_damage(d.pop("estimateRadiationDamage", UNSET)) + + def _parse_forced_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + forced_space_group = _parse_forced_space_group(d.pop("forcedSpaceGroup", UNSET)) + + def _parse_required_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_completeness = _parse_required_completeness(d.pop("requiredCompleteness", UNSET)) + + def _parse_required_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_multiplicity = _parse_required_multiplicity(d.pop("requiredMultiplicity", UNSET)) + + def _parse_required_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_resolution = _parse_required_resolution(d.pop("requiredResolution", UNSET)) + + def _parse_kappa_strategy_option(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kappa_strategy_option = _parse_kappa_strategy_option(d.pop("kappaStrategyOption", UNSET)) + + def _parse_number_of_positions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_positions = _parse_number_of_positions(d.pop("numberOfPositions", UNSET)) + + def _parse_min_dim_accross_spindle_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_dim_accross_spindle_axis = _parse_min_dim_accross_spindle_axis(d.pop("minDimAccrossSpindleAxis", UNSET)) + + def _parse_max_dim_accross_spindle_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_dim_accross_spindle_axis = _parse_max_dim_accross_spindle_axis(d.pop("maxDimAccrossSpindleAxis", UNSET)) + + def _parse_radiation_sensitivity_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity_beta = _parse_radiation_sensitivity_beta(d.pop("radiationSensitivityBeta", UNSET)) + + def _parse_radiation_sensitivity_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity_gamma = _parse_radiation_sensitivity_gamma(d.pop("radiationSensitivityGamma", UNSET)) + + def _parse_min_osc_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_osc_width = _parse_min_osc_width(d.pop("minOscWidth", UNSET)) + + def _parse_detector_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + detector_id = _parse_detector_id(d.pop("detectorId", UNSET)) + + def _parse_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + distance = _parse_distance(d.pop("distance", UNSET)) + + def _parse_orientation(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + orientation = _parse_orientation(d.pop("orientation", UNSET)) + + def _parse_mono_bandwidth(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mono_bandwidth = _parse_mono_bandwidth(d.pop("monoBandwidth", UNSET)) + + def _parse_monochromator(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + monochromator = _parse_monochromator(d.pop("monochromator", UNSET)) + + def _parse_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + energy = _parse_energy(d.pop("energy", UNSET)) + + def _parse_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission = _parse_transmission(d.pop("transmission", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_kappa_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + kappa_start = _parse_kappa_start(d.pop("kappaStart", UNSET)) + + def _parse_axis_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_start = _parse_axis_start(d.pop("axisStart", UNSET)) + + def _parse_axis_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_range = _parse_axis_range(d.pop("axisRange", UNSET)) + + def _parse_number_of_images(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_images = _parse_number_of_images(d.pop("numberOfImages", UNSET)) + + def _parse_preset_for_proposal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + preset_for_proposal_id = _parse_preset_for_proposal_id(d.pop("presetForProposalId", UNSET)) + + def _parse_beam_line_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beam_line_name = _parse_beam_line_name(d.pop("beamLineName", UNSET)) + + def _parse_centring_method(data: object) -> CentringMethod | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + centring_method_type_0 = CentringMethod(data) + + return centring_method_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CentringMethod | None | Unset, data) + + centring_method = _parse_centring_method(d.pop("centringMethod", UNSET)) + + def _parse_user_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_path = _parse_user_path(d.pop("userPath", UNSET)) + + def _parse_robot_plate_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + robot_plate_temperature = _parse_robot_plate_temperature(d.pop("robotPlateTemperature", UNSET)) + + def _parse_exposure_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_temperature = _parse_exposure_temperature(d.pop("exposureTemperature", UNSET)) + + def _parse_purification_column_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + purification_column_id = _parse_purification_column_id(d.pop("purificationColumnId", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_collection_mode(data: object) -> CollectionMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + collection_mode_type_0 = CollectionMode(data) + + return collection_mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CollectionMode | None | Unset, data) + + collection_mode = _parse_collection_mode(d.pop("collectionMode", UNSET)) + + def _parse_priority(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + priority = _parse_priority(d.pop("priority", UNSET)) + + def _parse_q_min(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + q_min = _parse_q_min(d.pop("qMin", UNSET)) + + def _parse_q_max(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + q_max = _parse_q_max(d.pop("qMax", UNSET)) + + def _parse_reduction_parameters_averaging(data: object) -> None | ReductionParameters | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reduction_parameters_averaging_type_0 = ReductionParameters(data) + + return reduction_parameters_averaging_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ReductionParameters | Unset, data) + + reduction_parameters_averaging = _parse_reduction_parameters_averaging( + d.pop("reductionParametersAveraging", UNSET) + ) + + def _parse_scan_parameters( + data: object, + ) -> DiffractionPlanOptionalScanParametersType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + scan_parameters_type_0_type_0 = DiffractionPlanOptionalScanParametersType0Type0.from_dict(data) + + return scan_parameters_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanOptionalScanParametersType0Type0 | None | str | Unset, data) + + scan_parameters = _parse_scan_parameters(d.pop("scanParameters", UNSET)) + + def _parse_strategy_option(data: object) -> None | str | StringSerialisedStrategyOptionType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_string_serialised_strategy_option_type_0 = ( + StringSerialisedStrategyOptionType0.from_dict(data) + ) + + return componentsschemas_string_serialised_strategy_option_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | str | StringSerialisedStrategyOptionType0 | Unset, data) + + strategy_option = _parse_strategy_option(d.pop("strategyOption", UNSET)) + + diffraction_plan_optional = cls( + name=name, + experiment_kind=experiment_kind, + observed_resolution=observed_resolution, + minimal_resolution=minimal_resolution, + exposure_time=exposure_time, + oscillation_range=oscillation_range, + maximal_resolution=maximal_resolution, + screening_resolution=screening_resolution, + radiation_sensitivity=radiation_sensitivity, + anomalous_scatterer=anomalous_scatterer, + preferred_beam_size_x=preferred_beam_size_x, + preferred_beam_size_y=preferred_beam_size_y, + preferred_beam_diameter=preferred_beam_diameter, + comments=comments, + aimed_completeness=aimed_completeness, + aimed_i_over_sigma_at_highest_res=aimed_i_over_sigma_at_highest_res, + aimed_multiplicity=aimed_multiplicity, + aimed_resolution=aimed_resolution, + anomalous_data=anomalous_data, + complexity=complexity, + estimate_radiation_damage=estimate_radiation_damage, + forced_space_group=forced_space_group, + required_completeness=required_completeness, + required_multiplicity=required_multiplicity, + required_resolution=required_resolution, + kappa_strategy_option=kappa_strategy_option, + number_of_positions=number_of_positions, + min_dim_accross_spindle_axis=min_dim_accross_spindle_axis, + max_dim_accross_spindle_axis=max_dim_accross_spindle_axis, + radiation_sensitivity_beta=radiation_sensitivity_beta, + radiation_sensitivity_gamma=radiation_sensitivity_gamma, + min_osc_width=min_osc_width, + detector_id=detector_id, + distance=distance, + orientation=orientation, + mono_bandwidth=mono_bandwidth, + monochromator=monochromator, + energy=energy, + transmission=transmission, + box_size_x=box_size_x, + box_size_y=box_size_y, + kappa_start=kappa_start, + axis_start=axis_start, + axis_range=axis_range, + number_of_images=number_of_images, + preset_for_proposal_id=preset_for_proposal_id, + beam_line_name=beam_line_name, + centring_method=centring_method, + user_path=user_path, + robot_plate_temperature=robot_plate_temperature, + exposure_temperature=exposure_temperature, + purification_column_id=purification_column_id, + experiment_type_id=experiment_type_id, + collection_mode=collection_mode, + priority=priority, + q_min=q_min, + q_max=q_max, + reduction_parameters_averaging=reduction_parameters_averaging, + scan_parameters=scan_parameters, + strategy_option=strategy_option, + ) + + diffraction_plan_optional.additional_properties = d + return diffraction_plan_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_optional_scan_parameters_type_0_type_0.py b/src/lims_utils/expeye_client/models/diffraction_plan_optional_scan_parameters_type_0_type_0.py new file mode 100644 index 0000000..9471e1f --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_optional_scan_parameters_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DiffractionPlanOptionalScanParametersType0Type0") + + +@_attrs_define +class DiffractionPlanOptionalScanParametersType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + diffraction_plan_optional_scan_parameters_type_0_type_0 = cls() + + diffraction_plan_optional_scan_parameters_type_0_type_0.additional_properties = d + return diffraction_plan_optional_scan_parameters_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_out.py b/src/lims_utils/expeye_client/models/diffraction_plan_out.py new file mode 100644 index 0000000..d5a9622 --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_out.py @@ -0,0 +1,1355 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.centring_method import CentringMethod +from ..models.collection_mode import CollectionMode +from ..models.diffraction_plan_experiment_type import DiffractionPlanExperimentType +from ..models.reduction_parameters import ReductionParameters +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.diffraction_plan_out_scan_parameters_type_0_type_0 import DiffractionPlanOutScanParametersType0Type0 + from ..models.strategy_option import StrategyOption + + +T = TypeVar("T", bound="DiffractionPlanOut") + + +@_attrs_define +class DiffractionPlanOut: + """ + Attributes: + diffraction_plan_id (int): + record_time_stamp (datetime.datetime): + name (None | str | Unset): + experiment_kind (DiffractionPlanExperimentType | None | Unset): + observed_resolution (float | None | Unset): + minimal_resolution (float | None | Unset): + exposure_time (float | None | Unset): + oscillation_range (float | None | Unset): + maximal_resolution (float | None | Unset): + screening_resolution (float | None | Unset): + radiation_sensitivity (float | None | Unset): + anomalous_scatterer (None | str | Unset): + preferred_beam_size_x (float | None | Unset): + preferred_beam_size_y (float | None | Unset): + preferred_beam_diameter (float | None | Unset): + comments (None | str | Unset): + aimed_completeness (float | None | Unset): + aimed_i_over_sigma_at_highest_res (float | None | Unset): + aimed_multiplicity (float | None | Unset): + aimed_resolution (float | None | Unset): + anomalous_data (bool | None | Unset): + complexity (None | str | Unset): + estimate_radiation_damage (bool | None | Unset): + forced_space_group (None | str | Unset): + required_completeness (float | None | Unset): + required_multiplicity (float | None | Unset): + required_resolution (float | None | Unset): + kappa_strategy_option (None | str | Unset): + number_of_positions (int | None | Unset): + min_dim_accross_spindle_axis (float | None | Unset): + max_dim_accross_spindle_axis (float | None | Unset): + radiation_sensitivity_beta (float | None | Unset): + radiation_sensitivity_gamma (float | None | Unset): + min_osc_width (float | None | Unset): + detector_id (int | None | Unset): + distance (float | None | Unset): + orientation (float | None | Unset): + mono_bandwidth (float | None | Unset): + monochromator (None | str | Unset): + energy (float | None | Unset): + transmission (float | None | Unset): + box_size_x (float | None | Unset): + box_size_y (float | None | Unset): + kappa_start (float | None | Unset): + axis_start (float | None | Unset): + axis_range (float | None | Unset): + number_of_images (int | None | Unset): + preset_for_proposal_id (int | None | Unset): + beam_line_name (None | str | Unset): + centring_method (CentringMethod | None | Unset): + user_path (None | str | Unset): + robot_plate_temperature (float | None | Unset): + exposure_temperature (float | None | Unset): + purification_column_id (int | None | Unset): + experiment_type_id (int | None | Unset): + collection_mode (CollectionMode | None | Unset): + priority (int | None | Unset): + q_min (float | None | Unset): + q_max (float | None | Unset): + reduction_parameters_averaging (None | ReductionParameters | Unset): + scan_parameters (DiffractionPlanOutScanParametersType0Type0 | None | str | Unset): + strategy_option (None | StrategyOption | Unset): + """ + + diffraction_plan_id: int + record_time_stamp: datetime.datetime + name: None | str | Unset = UNSET + experiment_kind: DiffractionPlanExperimentType | None | Unset = UNSET + observed_resolution: float | None | Unset = UNSET + minimal_resolution: float | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + oscillation_range: float | None | Unset = UNSET + maximal_resolution: float | None | Unset = UNSET + screening_resolution: float | None | Unset = UNSET + radiation_sensitivity: float | None | Unset = UNSET + anomalous_scatterer: None | str | Unset = UNSET + preferred_beam_size_x: float | None | Unset = UNSET + preferred_beam_size_y: float | None | Unset = UNSET + preferred_beam_diameter: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + aimed_completeness: float | None | Unset = UNSET + aimed_i_over_sigma_at_highest_res: float | None | Unset = UNSET + aimed_multiplicity: float | None | Unset = UNSET + aimed_resolution: float | None | Unset = UNSET + anomalous_data: bool | None | Unset = UNSET + complexity: None | str | Unset = UNSET + estimate_radiation_damage: bool | None | Unset = UNSET + forced_space_group: None | str | Unset = UNSET + required_completeness: float | None | Unset = UNSET + required_multiplicity: float | None | Unset = UNSET + required_resolution: float | None | Unset = UNSET + kappa_strategy_option: None | str | Unset = UNSET + number_of_positions: int | None | Unset = UNSET + min_dim_accross_spindle_axis: float | None | Unset = UNSET + max_dim_accross_spindle_axis: float | None | Unset = UNSET + radiation_sensitivity_beta: float | None | Unset = UNSET + radiation_sensitivity_gamma: float | None | Unset = UNSET + min_osc_width: float | None | Unset = UNSET + detector_id: int | None | Unset = UNSET + distance: float | None | Unset = UNSET + orientation: float | None | Unset = UNSET + mono_bandwidth: float | None | Unset = UNSET + monochromator: None | str | Unset = UNSET + energy: float | None | Unset = UNSET + transmission: float | None | Unset = UNSET + box_size_x: float | None | Unset = UNSET + box_size_y: float | None | Unset = UNSET + kappa_start: float | None | Unset = UNSET + axis_start: float | None | Unset = UNSET + axis_range: float | None | Unset = UNSET + number_of_images: int | None | Unset = UNSET + preset_for_proposal_id: int | None | Unset = UNSET + beam_line_name: None | str | Unset = UNSET + centring_method: CentringMethod | None | Unset = UNSET + user_path: None | str | Unset = UNSET + robot_plate_temperature: float | None | Unset = UNSET + exposure_temperature: float | None | Unset = UNSET + purification_column_id: int | None | Unset = UNSET + experiment_type_id: int | None | Unset = UNSET + collection_mode: CollectionMode | None | Unset = UNSET + priority: int | None | Unset = UNSET + q_min: float | None | Unset = UNSET + q_max: float | None | Unset = UNSET + reduction_parameters_averaging: None | ReductionParameters | Unset = UNSET + scan_parameters: DiffractionPlanOutScanParametersType0Type0 | None | str | Unset = UNSET + strategy_option: None | StrategyOption | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.diffraction_plan_out_scan_parameters_type_0_type_0 import ( + DiffractionPlanOutScanParametersType0Type0, # noqa: PLC0415 + ) + from ..models.strategy_option import StrategyOption # noqa: PLC0415 + + diffraction_plan_id = self.diffraction_plan_id + + record_time_stamp = self.record_time_stamp.isoformat() + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + experiment_kind: None | str | Unset + if isinstance(self.experiment_kind, Unset): + experiment_kind = UNSET + elif isinstance(self.experiment_kind, DiffractionPlanExperimentType): + experiment_kind = self.experiment_kind.value + else: + experiment_kind = self.experiment_kind + + observed_resolution: float | None | Unset + if isinstance(self.observed_resolution, Unset): + observed_resolution = UNSET + else: + observed_resolution = self.observed_resolution + + minimal_resolution: float | None | Unset + if isinstance(self.minimal_resolution, Unset): + minimal_resolution = UNSET + else: + minimal_resolution = self.minimal_resolution + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + oscillation_range: float | None | Unset + if isinstance(self.oscillation_range, Unset): + oscillation_range = UNSET + else: + oscillation_range = self.oscillation_range + + maximal_resolution: float | None | Unset + if isinstance(self.maximal_resolution, Unset): + maximal_resolution = UNSET + else: + maximal_resolution = self.maximal_resolution + + screening_resolution: float | None | Unset + if isinstance(self.screening_resolution, Unset): + screening_resolution = UNSET + else: + screening_resolution = self.screening_resolution + + radiation_sensitivity: float | None | Unset + if isinstance(self.radiation_sensitivity, Unset): + radiation_sensitivity = UNSET + else: + radiation_sensitivity = self.radiation_sensitivity + + anomalous_scatterer: None | str | Unset + if isinstance(self.anomalous_scatterer, Unset): + anomalous_scatterer = UNSET + else: + anomalous_scatterer = self.anomalous_scatterer + + preferred_beam_size_x: float | None | Unset + if isinstance(self.preferred_beam_size_x, Unset): + preferred_beam_size_x = UNSET + else: + preferred_beam_size_x = self.preferred_beam_size_x + + preferred_beam_size_y: float | None | Unset + if isinstance(self.preferred_beam_size_y, Unset): + preferred_beam_size_y = UNSET + else: + preferred_beam_size_y = self.preferred_beam_size_y + + preferred_beam_diameter: float | None | Unset + if isinstance(self.preferred_beam_diameter, Unset): + preferred_beam_diameter = UNSET + else: + preferred_beam_diameter = self.preferred_beam_diameter + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + aimed_completeness: float | None | Unset + if isinstance(self.aimed_completeness, Unset): + aimed_completeness = UNSET + else: + aimed_completeness = self.aimed_completeness + + aimed_i_over_sigma_at_highest_res: float | None | Unset + if isinstance(self.aimed_i_over_sigma_at_highest_res, Unset): + aimed_i_over_sigma_at_highest_res = UNSET + else: + aimed_i_over_sigma_at_highest_res = self.aimed_i_over_sigma_at_highest_res + + aimed_multiplicity: float | None | Unset + if isinstance(self.aimed_multiplicity, Unset): + aimed_multiplicity = UNSET + else: + aimed_multiplicity = self.aimed_multiplicity + + aimed_resolution: float | None | Unset + if isinstance(self.aimed_resolution, Unset): + aimed_resolution = UNSET + else: + aimed_resolution = self.aimed_resolution + + anomalous_data: bool | None | Unset + if isinstance(self.anomalous_data, Unset): + anomalous_data = UNSET + else: + anomalous_data = self.anomalous_data + + complexity: None | str | Unset + if isinstance(self.complexity, Unset): + complexity = UNSET + else: + complexity = self.complexity + + estimate_radiation_damage: bool | None | Unset + if isinstance(self.estimate_radiation_damage, Unset): + estimate_radiation_damage = UNSET + else: + estimate_radiation_damage = self.estimate_radiation_damage + + forced_space_group: None | str | Unset + if isinstance(self.forced_space_group, Unset): + forced_space_group = UNSET + else: + forced_space_group = self.forced_space_group + + required_completeness: float | None | Unset + if isinstance(self.required_completeness, Unset): + required_completeness = UNSET + else: + required_completeness = self.required_completeness + + required_multiplicity: float | None | Unset + if isinstance(self.required_multiplicity, Unset): + required_multiplicity = UNSET + else: + required_multiplicity = self.required_multiplicity + + required_resolution: float | None | Unset + if isinstance(self.required_resolution, Unset): + required_resolution = UNSET + else: + required_resolution = self.required_resolution + + kappa_strategy_option: None | str | Unset + if isinstance(self.kappa_strategy_option, Unset): + kappa_strategy_option = UNSET + else: + kappa_strategy_option = self.kappa_strategy_option + + number_of_positions: int | None | Unset + if isinstance(self.number_of_positions, Unset): + number_of_positions = UNSET + else: + number_of_positions = self.number_of_positions + + min_dim_accross_spindle_axis: float | None | Unset + if isinstance(self.min_dim_accross_spindle_axis, Unset): + min_dim_accross_spindle_axis = UNSET + else: + min_dim_accross_spindle_axis = self.min_dim_accross_spindle_axis + + max_dim_accross_spindle_axis: float | None | Unset + if isinstance(self.max_dim_accross_spindle_axis, Unset): + max_dim_accross_spindle_axis = UNSET + else: + max_dim_accross_spindle_axis = self.max_dim_accross_spindle_axis + + radiation_sensitivity_beta: float | None | Unset + if isinstance(self.radiation_sensitivity_beta, Unset): + radiation_sensitivity_beta = UNSET + else: + radiation_sensitivity_beta = self.radiation_sensitivity_beta + + radiation_sensitivity_gamma: float | None | Unset + if isinstance(self.radiation_sensitivity_gamma, Unset): + radiation_sensitivity_gamma = UNSET + else: + radiation_sensitivity_gamma = self.radiation_sensitivity_gamma + + min_osc_width: float | None | Unset + if isinstance(self.min_osc_width, Unset): + min_osc_width = UNSET + else: + min_osc_width = self.min_osc_width + + detector_id: int | None | Unset + if isinstance(self.detector_id, Unset): + detector_id = UNSET + else: + detector_id = self.detector_id + + distance: float | None | Unset + if isinstance(self.distance, Unset): + distance = UNSET + else: + distance = self.distance + + orientation: float | None | Unset + if isinstance(self.orientation, Unset): + orientation = UNSET + else: + orientation = self.orientation + + mono_bandwidth: float | None | Unset + if isinstance(self.mono_bandwidth, Unset): + mono_bandwidth = UNSET + else: + mono_bandwidth = self.mono_bandwidth + + monochromator: None | str | Unset + if isinstance(self.monochromator, Unset): + monochromator = UNSET + else: + monochromator = self.monochromator + + energy: float | None | Unset + if isinstance(self.energy, Unset): + energy = UNSET + else: + energy = self.energy + + transmission: float | None | Unset + if isinstance(self.transmission, Unset): + transmission = UNSET + else: + transmission = self.transmission + + box_size_x: float | None | Unset + if isinstance(self.box_size_x, Unset): + box_size_x = UNSET + else: + box_size_x = self.box_size_x + + box_size_y: float | None | Unset + if isinstance(self.box_size_y, Unset): + box_size_y = UNSET + else: + box_size_y = self.box_size_y + + kappa_start: float | None | Unset + if isinstance(self.kappa_start, Unset): + kappa_start = UNSET + else: + kappa_start = self.kappa_start + + axis_start: float | None | Unset + if isinstance(self.axis_start, Unset): + axis_start = UNSET + else: + axis_start = self.axis_start + + axis_range: float | None | Unset + if isinstance(self.axis_range, Unset): + axis_range = UNSET + else: + axis_range = self.axis_range + + number_of_images: int | None | Unset + if isinstance(self.number_of_images, Unset): + number_of_images = UNSET + else: + number_of_images = self.number_of_images + + preset_for_proposal_id: int | None | Unset + if isinstance(self.preset_for_proposal_id, Unset): + preset_for_proposal_id = UNSET + else: + preset_for_proposal_id = self.preset_for_proposal_id + + beam_line_name: None | str | Unset + if isinstance(self.beam_line_name, Unset): + beam_line_name = UNSET + else: + beam_line_name = self.beam_line_name + + centring_method: None | str | Unset + if isinstance(self.centring_method, Unset): + centring_method = UNSET + elif isinstance(self.centring_method, CentringMethod): + centring_method = self.centring_method.value + else: + centring_method = self.centring_method + + user_path: None | str | Unset + if isinstance(self.user_path, Unset): + user_path = UNSET + else: + user_path = self.user_path + + robot_plate_temperature: float | None | Unset + if isinstance(self.robot_plate_temperature, Unset): + robot_plate_temperature = UNSET + else: + robot_plate_temperature = self.robot_plate_temperature + + exposure_temperature: float | None | Unset + if isinstance(self.exposure_temperature, Unset): + exposure_temperature = UNSET + else: + exposure_temperature = self.exposure_temperature + + purification_column_id: int | None | Unset + if isinstance(self.purification_column_id, Unset): + purification_column_id = UNSET + else: + purification_column_id = self.purification_column_id + + experiment_type_id: int | None | Unset + if isinstance(self.experiment_type_id, Unset): + experiment_type_id = UNSET + else: + experiment_type_id = self.experiment_type_id + + collection_mode: None | str | Unset + if isinstance(self.collection_mode, Unset): + collection_mode = UNSET + elif isinstance(self.collection_mode, CollectionMode): + collection_mode = self.collection_mode.value + else: + collection_mode = self.collection_mode + + priority: int | None | Unset + if isinstance(self.priority, Unset): + priority = UNSET + else: + priority = self.priority + + q_min: float | None | Unset + if isinstance(self.q_min, Unset): + q_min = UNSET + else: + q_min = self.q_min + + q_max: float | None | Unset + if isinstance(self.q_max, Unset): + q_max = UNSET + else: + q_max = self.q_max + + reduction_parameters_averaging: None | str | Unset + if isinstance(self.reduction_parameters_averaging, Unset): + reduction_parameters_averaging = UNSET + elif isinstance(self.reduction_parameters_averaging, ReductionParameters): + reduction_parameters_averaging = self.reduction_parameters_averaging.value + else: + reduction_parameters_averaging = self.reduction_parameters_averaging + + scan_parameters: dict[str, Any] | None | str | Unset + if isinstance(self.scan_parameters, Unset): + scan_parameters = UNSET + elif isinstance(self.scan_parameters, DiffractionPlanOutScanParametersType0Type0): + scan_parameters = self.scan_parameters.to_dict() + else: + scan_parameters = self.scan_parameters + + strategy_option: dict[str, Any] | None | Unset + if isinstance(self.strategy_option, Unset): + strategy_option = UNSET + elif isinstance(self.strategy_option, StrategyOption): + strategy_option = self.strategy_option.to_dict() + else: + strategy_option = self.strategy_option + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "diffractionPlanId": diffraction_plan_id, + "recordTimeStamp": record_time_stamp, + } + ) + if name is not UNSET: + field_dict["name"] = name + if experiment_kind is not UNSET: + field_dict["experimentKind"] = experiment_kind + if observed_resolution is not UNSET: + field_dict["observedResolution"] = observed_resolution + if minimal_resolution is not UNSET: + field_dict["minimalResolution"] = minimal_resolution + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if oscillation_range is not UNSET: + field_dict["oscillationRange"] = oscillation_range + if maximal_resolution is not UNSET: + field_dict["maximalResolution"] = maximal_resolution + if screening_resolution is not UNSET: + field_dict["screeningResolution"] = screening_resolution + if radiation_sensitivity is not UNSET: + field_dict["radiationSensitivity"] = radiation_sensitivity + if anomalous_scatterer is not UNSET: + field_dict["anomalousScatterer"] = anomalous_scatterer + if preferred_beam_size_x is not UNSET: + field_dict["preferredBeamSizeX"] = preferred_beam_size_x + if preferred_beam_size_y is not UNSET: + field_dict["preferredBeamSizeY"] = preferred_beam_size_y + if preferred_beam_diameter is not UNSET: + field_dict["preferredBeamDiameter"] = preferred_beam_diameter + if comments is not UNSET: + field_dict["comments"] = comments + if aimed_completeness is not UNSET: + field_dict["aimedCompleteness"] = aimed_completeness + if aimed_i_over_sigma_at_highest_res is not UNSET: + field_dict["aimedIOverSigmaAtHighestRes"] = aimed_i_over_sigma_at_highest_res + if aimed_multiplicity is not UNSET: + field_dict["aimedMultiplicity"] = aimed_multiplicity + if aimed_resolution is not UNSET: + field_dict["aimedResolution"] = aimed_resolution + if anomalous_data is not UNSET: + field_dict["anomalousData"] = anomalous_data + if complexity is not UNSET: + field_dict["complexity"] = complexity + if estimate_radiation_damage is not UNSET: + field_dict["estimateRadiationDamage"] = estimate_radiation_damage + if forced_space_group is not UNSET: + field_dict["forcedSpaceGroup"] = forced_space_group + if required_completeness is not UNSET: + field_dict["requiredCompleteness"] = required_completeness + if required_multiplicity is not UNSET: + field_dict["requiredMultiplicity"] = required_multiplicity + if required_resolution is not UNSET: + field_dict["requiredResolution"] = required_resolution + if kappa_strategy_option is not UNSET: + field_dict["kappaStrategyOption"] = kappa_strategy_option + if number_of_positions is not UNSET: + field_dict["numberOfPositions"] = number_of_positions + if min_dim_accross_spindle_axis is not UNSET: + field_dict["minDimAccrossSpindleAxis"] = min_dim_accross_spindle_axis + if max_dim_accross_spindle_axis is not UNSET: + field_dict["maxDimAccrossSpindleAxis"] = max_dim_accross_spindle_axis + if radiation_sensitivity_beta is not UNSET: + field_dict["radiationSensitivityBeta"] = radiation_sensitivity_beta + if radiation_sensitivity_gamma is not UNSET: + field_dict["radiationSensitivityGamma"] = radiation_sensitivity_gamma + if min_osc_width is not UNSET: + field_dict["minOscWidth"] = min_osc_width + if detector_id is not UNSET: + field_dict["detectorId"] = detector_id + if distance is not UNSET: + field_dict["distance"] = distance + if orientation is not UNSET: + field_dict["orientation"] = orientation + if mono_bandwidth is not UNSET: + field_dict["monoBandwidth"] = mono_bandwidth + if monochromator is not UNSET: + field_dict["monochromator"] = monochromator + if energy is not UNSET: + field_dict["energy"] = energy + if transmission is not UNSET: + field_dict["transmission"] = transmission + if box_size_x is not UNSET: + field_dict["boxSizeX"] = box_size_x + if box_size_y is not UNSET: + field_dict["boxSizeY"] = box_size_y + if kappa_start is not UNSET: + field_dict["kappaStart"] = kappa_start + if axis_start is not UNSET: + field_dict["axisStart"] = axis_start + if axis_range is not UNSET: + field_dict["axisRange"] = axis_range + if number_of_images is not UNSET: + field_dict["numberOfImages"] = number_of_images + if preset_for_proposal_id is not UNSET: + field_dict["presetForProposalId"] = preset_for_proposal_id + if beam_line_name is not UNSET: + field_dict["beamLineName"] = beam_line_name + if centring_method is not UNSET: + field_dict["centringMethod"] = centring_method + if user_path is not UNSET: + field_dict["userPath"] = user_path + if robot_plate_temperature is not UNSET: + field_dict["robotPlateTemperature"] = robot_plate_temperature + if exposure_temperature is not UNSET: + field_dict["exposureTemperature"] = exposure_temperature + if purification_column_id is not UNSET: + field_dict["purificationColumnId"] = purification_column_id + if experiment_type_id is not UNSET: + field_dict["experimentTypeId"] = experiment_type_id + if collection_mode is not UNSET: + field_dict["collectionMode"] = collection_mode + if priority is not UNSET: + field_dict["priority"] = priority + if q_min is not UNSET: + field_dict["qMin"] = q_min + if q_max is not UNSET: + field_dict["qMax"] = q_max + if reduction_parameters_averaging is not UNSET: + field_dict["reductionParametersAveraging"] = reduction_parameters_averaging + if scan_parameters is not UNSET: + field_dict["scanParameters"] = scan_parameters + if strategy_option is not UNSET: + field_dict["strategyOption"] = strategy_option + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.diffraction_plan_out_scan_parameters_type_0_type_0 import ( + DiffractionPlanOutScanParametersType0Type0, # noqa: PLC0415 + ) + from ..models.strategy_option import StrategyOption # noqa: PLC0415 + + d = dict(src_dict) + diffraction_plan_id = d.pop("diffractionPlanId") + + record_time_stamp = datetime.datetime.fromisoformat(d.pop("recordTimeStamp")) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_experiment_kind(data: object) -> DiffractionPlanExperimentType | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + experiment_kind_type_0 = DiffractionPlanExperimentType(data) + + return experiment_kind_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanExperimentType | None | Unset, data) + + experiment_kind = _parse_experiment_kind(d.pop("experimentKind", UNSET)) + + def _parse_observed_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + observed_resolution = _parse_observed_resolution(d.pop("observedResolution", UNSET)) + + def _parse_minimal_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + minimal_resolution = _parse_minimal_resolution(d.pop("minimalResolution", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_oscillation_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + oscillation_range = _parse_oscillation_range(d.pop("oscillationRange", UNSET)) + + def _parse_maximal_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + maximal_resolution = _parse_maximal_resolution(d.pop("maximalResolution", UNSET)) + + def _parse_screening_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + screening_resolution = _parse_screening_resolution(d.pop("screeningResolution", UNSET)) + + def _parse_radiation_sensitivity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity = _parse_radiation_sensitivity(d.pop("radiationSensitivity", UNSET)) + + def _parse_anomalous_scatterer(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + anomalous_scatterer = _parse_anomalous_scatterer(d.pop("anomalousScatterer", UNSET)) + + def _parse_preferred_beam_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_size_x = _parse_preferred_beam_size_x(d.pop("preferredBeamSizeX", UNSET)) + + def _parse_preferred_beam_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_size_y = _parse_preferred_beam_size_y(d.pop("preferredBeamSizeY", UNSET)) + + def _parse_preferred_beam_diameter(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + preferred_beam_diameter = _parse_preferred_beam_diameter(d.pop("preferredBeamDiameter", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_aimed_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_completeness = _parse_aimed_completeness(d.pop("aimedCompleteness", UNSET)) + + def _parse_aimed_i_over_sigma_at_highest_res(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_i_over_sigma_at_highest_res = _parse_aimed_i_over_sigma_at_highest_res( + d.pop("aimedIOverSigmaAtHighestRes", UNSET) + ) + + def _parse_aimed_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_multiplicity = _parse_aimed_multiplicity(d.pop("aimedMultiplicity", UNSET)) + + def _parse_aimed_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + aimed_resolution = _parse_aimed_resolution(d.pop("aimedResolution", UNSET)) + + def _parse_anomalous_data(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + anomalous_data = _parse_anomalous_data(d.pop("anomalousData", UNSET)) + + def _parse_complexity(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + complexity = _parse_complexity(d.pop("complexity", UNSET)) + + def _parse_estimate_radiation_damage(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + estimate_radiation_damage = _parse_estimate_radiation_damage(d.pop("estimateRadiationDamage", UNSET)) + + def _parse_forced_space_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + forced_space_group = _parse_forced_space_group(d.pop("forcedSpaceGroup", UNSET)) + + def _parse_required_completeness(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_completeness = _parse_required_completeness(d.pop("requiredCompleteness", UNSET)) + + def _parse_required_multiplicity(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_multiplicity = _parse_required_multiplicity(d.pop("requiredMultiplicity", UNSET)) + + def _parse_required_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + required_resolution = _parse_required_resolution(d.pop("requiredResolution", UNSET)) + + def _parse_kappa_strategy_option(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + kappa_strategy_option = _parse_kappa_strategy_option(d.pop("kappaStrategyOption", UNSET)) + + def _parse_number_of_positions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_positions = _parse_number_of_positions(d.pop("numberOfPositions", UNSET)) + + def _parse_min_dim_accross_spindle_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_dim_accross_spindle_axis = _parse_min_dim_accross_spindle_axis(d.pop("minDimAccrossSpindleAxis", UNSET)) + + def _parse_max_dim_accross_spindle_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + max_dim_accross_spindle_axis = _parse_max_dim_accross_spindle_axis(d.pop("maxDimAccrossSpindleAxis", UNSET)) + + def _parse_radiation_sensitivity_beta(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity_beta = _parse_radiation_sensitivity_beta(d.pop("radiationSensitivityBeta", UNSET)) + + def _parse_radiation_sensitivity_gamma(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + radiation_sensitivity_gamma = _parse_radiation_sensitivity_gamma(d.pop("radiationSensitivityGamma", UNSET)) + + def _parse_min_osc_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + min_osc_width = _parse_min_osc_width(d.pop("minOscWidth", UNSET)) + + def _parse_detector_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + detector_id = _parse_detector_id(d.pop("detectorId", UNSET)) + + def _parse_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + distance = _parse_distance(d.pop("distance", UNSET)) + + def _parse_orientation(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + orientation = _parse_orientation(d.pop("orientation", UNSET)) + + def _parse_mono_bandwidth(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mono_bandwidth = _parse_mono_bandwidth(d.pop("monoBandwidth", UNSET)) + + def _parse_monochromator(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + monochromator = _parse_monochromator(d.pop("monochromator", UNSET)) + + def _parse_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + energy = _parse_energy(d.pop("energy", UNSET)) + + def _parse_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission = _parse_transmission(d.pop("transmission", UNSET)) + + def _parse_box_size_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_x = _parse_box_size_x(d.pop("boxSizeX", UNSET)) + + def _parse_box_size_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + box_size_y = _parse_box_size_y(d.pop("boxSizeY", UNSET)) + + def _parse_kappa_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + kappa_start = _parse_kappa_start(d.pop("kappaStart", UNSET)) + + def _parse_axis_start(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_start = _parse_axis_start(d.pop("axisStart", UNSET)) + + def _parse_axis_range(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_range = _parse_axis_range(d.pop("axisRange", UNSET)) + + def _parse_number_of_images(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_images = _parse_number_of_images(d.pop("numberOfImages", UNSET)) + + def _parse_preset_for_proposal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + preset_for_proposal_id = _parse_preset_for_proposal_id(d.pop("presetForProposalId", UNSET)) + + def _parse_beam_line_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beam_line_name = _parse_beam_line_name(d.pop("beamLineName", UNSET)) + + def _parse_centring_method(data: object) -> CentringMethod | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + centring_method_type_0 = CentringMethod(data) + + return centring_method_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CentringMethod | None | Unset, data) + + centring_method = _parse_centring_method(d.pop("centringMethod", UNSET)) + + def _parse_user_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_path = _parse_user_path(d.pop("userPath", UNSET)) + + def _parse_robot_plate_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + robot_plate_temperature = _parse_robot_plate_temperature(d.pop("robotPlateTemperature", UNSET)) + + def _parse_exposure_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_temperature = _parse_exposure_temperature(d.pop("exposureTemperature", UNSET)) + + def _parse_purification_column_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + purification_column_id = _parse_purification_column_id(d.pop("purificationColumnId", UNSET)) + + def _parse_experiment_type_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + experiment_type_id = _parse_experiment_type_id(d.pop("experimentTypeId", UNSET)) + + def _parse_collection_mode(data: object) -> CollectionMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + collection_mode_type_0 = CollectionMode(data) + + return collection_mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CollectionMode | None | Unset, data) + + collection_mode = _parse_collection_mode(d.pop("collectionMode", UNSET)) + + def _parse_priority(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + priority = _parse_priority(d.pop("priority", UNSET)) + + def _parse_q_min(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + q_min = _parse_q_min(d.pop("qMin", UNSET)) + + def _parse_q_max(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + q_max = _parse_q_max(d.pop("qMax", UNSET)) + + def _parse_reduction_parameters_averaging(data: object) -> None | ReductionParameters | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + reduction_parameters_averaging_type_0 = ReductionParameters(data) + + return reduction_parameters_averaging_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ReductionParameters | Unset, data) + + reduction_parameters_averaging = _parse_reduction_parameters_averaging( + d.pop("reductionParametersAveraging", UNSET) + ) + + def _parse_scan_parameters(data: object) -> DiffractionPlanOutScanParametersType0Type0 | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + scan_parameters_type_0_type_0 = DiffractionPlanOutScanParametersType0Type0.from_dict(data) + + return scan_parameters_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanOutScanParametersType0Type0 | None | str | Unset, data) + + scan_parameters = _parse_scan_parameters(d.pop("scanParameters", UNSET)) + + def _parse_strategy_option(data: object) -> None | StrategyOption | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + strategy_option_type_0 = StrategyOption.from_dict(data) + + return strategy_option_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | StrategyOption | Unset, data) + + strategy_option = _parse_strategy_option(d.pop("strategyOption", UNSET)) + + diffraction_plan_out = cls( + diffraction_plan_id=diffraction_plan_id, + record_time_stamp=record_time_stamp, + name=name, + experiment_kind=experiment_kind, + observed_resolution=observed_resolution, + minimal_resolution=minimal_resolution, + exposure_time=exposure_time, + oscillation_range=oscillation_range, + maximal_resolution=maximal_resolution, + screening_resolution=screening_resolution, + radiation_sensitivity=radiation_sensitivity, + anomalous_scatterer=anomalous_scatterer, + preferred_beam_size_x=preferred_beam_size_x, + preferred_beam_size_y=preferred_beam_size_y, + preferred_beam_diameter=preferred_beam_diameter, + comments=comments, + aimed_completeness=aimed_completeness, + aimed_i_over_sigma_at_highest_res=aimed_i_over_sigma_at_highest_res, + aimed_multiplicity=aimed_multiplicity, + aimed_resolution=aimed_resolution, + anomalous_data=anomalous_data, + complexity=complexity, + estimate_radiation_damage=estimate_radiation_damage, + forced_space_group=forced_space_group, + required_completeness=required_completeness, + required_multiplicity=required_multiplicity, + required_resolution=required_resolution, + kappa_strategy_option=kappa_strategy_option, + number_of_positions=number_of_positions, + min_dim_accross_spindle_axis=min_dim_accross_spindle_axis, + max_dim_accross_spindle_axis=max_dim_accross_spindle_axis, + radiation_sensitivity_beta=radiation_sensitivity_beta, + radiation_sensitivity_gamma=radiation_sensitivity_gamma, + min_osc_width=min_osc_width, + detector_id=detector_id, + distance=distance, + orientation=orientation, + mono_bandwidth=mono_bandwidth, + monochromator=monochromator, + energy=energy, + transmission=transmission, + box_size_x=box_size_x, + box_size_y=box_size_y, + kappa_start=kappa_start, + axis_start=axis_start, + axis_range=axis_range, + number_of_images=number_of_images, + preset_for_proposal_id=preset_for_proposal_id, + beam_line_name=beam_line_name, + centring_method=centring_method, + user_path=user_path, + robot_plate_temperature=robot_plate_temperature, + exposure_temperature=exposure_temperature, + purification_column_id=purification_column_id, + experiment_type_id=experiment_type_id, + collection_mode=collection_mode, + priority=priority, + q_min=q_min, + q_max=q_max, + reduction_parameters_averaging=reduction_parameters_averaging, + scan_parameters=scan_parameters, + strategy_option=strategy_option, + ) + + diffraction_plan_out.additional_properties = d + return diffraction_plan_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_out_scan_parameters_type_0_type_0.py b/src/lims_utils/expeye_client/models/diffraction_plan_out_scan_parameters_type_0_type_0.py new file mode 100644 index 0000000..250d661 --- /dev/null +++ b/src/lims_utils/expeye_client/models/diffraction_plan_out_scan_parameters_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="DiffractionPlanOutScanParametersType0Type0") + + +@_attrs_define +class DiffractionPlanOutScanParametersType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + diffraction_plan_out_scan_parameters_type_0_type_0 = cls() + + diffraction_plan_out_scan_parameters_type_0_type_0.additional_properties = d + return diffraction_plan_out_scan_parameters_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/energy_scan_in.py b/src/lims_utils/expeye_client/models/energy_scan_in.py new file mode 100644 index 0000000..ccc6c82 --- /dev/null +++ b/src/lims_utils/expeye_client/models/energy_scan_in.py @@ -0,0 +1,574 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EnergyScanIn") + + +@_attrs_define +class EnergyScanIn: + """ + Attributes: + fluorescence_detector (None | str | Unset): + scan_file_full_path (None | str | Unset): + jpeg_chooch_file_full_path (None | str | Unset): + element (None | str | Unset): + start_energy (float | None | Unset): + end_energy (float | None | Unset): + transmission_factor (float | None | Unset): + exposure_time (float | None | Unset): + axis_postion (float | None | Unset): + synchrotron_current (float | None | Unset): + temperature (float | None | Unset): + peak_energy (float | None | Unset): + peak_f_prime (float | None | Unset): + peak_f_double_prime (float | None | Unset): + inflection_energy (float | None | Unset): + inflection_f_prime (float | None | Unset): + inflection_f_double_prime (float | None | Unset): + xray_dose (float | None | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + edge_energy (None | str | Unset): + beam_size_vertical (float | None | Unset): + beam_size_horizontal (float | None | Unset): + comments (None | str | Unset): + sample_id (int | None | Unset): + """ + + fluorescence_detector: None | str | Unset = UNSET + scan_file_full_path: None | str | Unset = UNSET + jpeg_chooch_file_full_path: None | str | Unset = UNSET + element: None | str | Unset = UNSET + start_energy: float | None | Unset = UNSET + end_energy: float | None | Unset = UNSET + transmission_factor: float | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + axis_postion: float | None | Unset = UNSET + synchrotron_current: float | None | Unset = UNSET + temperature: float | None | Unset = UNSET + peak_energy: float | None | Unset = UNSET + peak_f_prime: float | None | Unset = UNSET + peak_f_double_prime: float | None | Unset = UNSET + inflection_energy: float | None | Unset = UNSET + inflection_f_prime: float | None | Unset = UNSET + inflection_f_double_prime: float | None | Unset = UNSET + xray_dose: float | None | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + edge_energy: None | str | Unset = UNSET + beam_size_vertical: float | None | Unset = UNSET + beam_size_horizontal: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + sample_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + fluorescence_detector: None | str | Unset + if isinstance(self.fluorescence_detector, Unset): + fluorescence_detector = UNSET + else: + fluorescence_detector = self.fluorescence_detector + + scan_file_full_path: None | str | Unset + if isinstance(self.scan_file_full_path, Unset): + scan_file_full_path = UNSET + else: + scan_file_full_path = self.scan_file_full_path + + jpeg_chooch_file_full_path: None | str | Unset + if isinstance(self.jpeg_chooch_file_full_path, Unset): + jpeg_chooch_file_full_path = UNSET + else: + jpeg_chooch_file_full_path = self.jpeg_chooch_file_full_path + + element: None | str | Unset + if isinstance(self.element, Unset): + element = UNSET + else: + element = self.element + + start_energy: float | None | Unset + if isinstance(self.start_energy, Unset): + start_energy = UNSET + else: + start_energy = self.start_energy + + end_energy: float | None | Unset + if isinstance(self.end_energy, Unset): + end_energy = UNSET + else: + end_energy = self.end_energy + + transmission_factor: float | None | Unset + if isinstance(self.transmission_factor, Unset): + transmission_factor = UNSET + else: + transmission_factor = self.transmission_factor + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + axis_postion: float | None | Unset + if isinstance(self.axis_postion, Unset): + axis_postion = UNSET + else: + axis_postion = self.axis_postion + + synchrotron_current: float | None | Unset + if isinstance(self.synchrotron_current, Unset): + synchrotron_current = UNSET + else: + synchrotron_current = self.synchrotron_current + + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + peak_energy: float | None | Unset + if isinstance(self.peak_energy, Unset): + peak_energy = UNSET + else: + peak_energy = self.peak_energy + + peak_f_prime: float | None | Unset + if isinstance(self.peak_f_prime, Unset): + peak_f_prime = UNSET + else: + peak_f_prime = self.peak_f_prime + + peak_f_double_prime: float | None | Unset + if isinstance(self.peak_f_double_prime, Unset): + peak_f_double_prime = UNSET + else: + peak_f_double_prime = self.peak_f_double_prime + + inflection_energy: float | None | Unset + if isinstance(self.inflection_energy, Unset): + inflection_energy = UNSET + else: + inflection_energy = self.inflection_energy + + inflection_f_prime: float | None | Unset + if isinstance(self.inflection_f_prime, Unset): + inflection_f_prime = UNSET + else: + inflection_f_prime = self.inflection_f_prime + + inflection_f_double_prime: float | None | Unset + if isinstance(self.inflection_f_double_prime, Unset): + inflection_f_double_prime = UNSET + else: + inflection_f_double_prime = self.inflection_f_double_prime + + xray_dose: float | None | Unset + if isinstance(self.xray_dose, Unset): + xray_dose = UNSET + else: + xray_dose = self.xray_dose + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + edge_energy: None | str | Unset + if isinstance(self.edge_energy, Unset): + edge_energy = UNSET + else: + edge_energy = self.edge_energy + + beam_size_vertical: float | None | Unset + if isinstance(self.beam_size_vertical, Unset): + beam_size_vertical = UNSET + else: + beam_size_vertical = self.beam_size_vertical + + beam_size_horizontal: float | None | Unset + if isinstance(self.beam_size_horizontal, Unset): + beam_size_horizontal = UNSET + else: + beam_size_horizontal = self.beam_size_horizontal + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fluorescence_detector is not UNSET: + field_dict["fluorescenceDetector"] = fluorescence_detector + if scan_file_full_path is not UNSET: + field_dict["scanFileFullPath"] = scan_file_full_path + if jpeg_chooch_file_full_path is not UNSET: + field_dict["jpegChoochFileFullPath"] = jpeg_chooch_file_full_path + if element is not UNSET: + field_dict["element"] = element + if start_energy is not UNSET: + field_dict["startEnergy"] = start_energy + if end_energy is not UNSET: + field_dict["endEnergy"] = end_energy + if transmission_factor is not UNSET: + field_dict["transmissionFactor"] = transmission_factor + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if axis_postion is not UNSET: + field_dict["axisPostion"] = axis_postion + if synchrotron_current is not UNSET: + field_dict["synchrotronCurrent"] = synchrotron_current + if temperature is not UNSET: + field_dict["temperature"] = temperature + if peak_energy is not UNSET: + field_dict["peakEnergy"] = peak_energy + if peak_f_prime is not UNSET: + field_dict["peakFPrime"] = peak_f_prime + if peak_f_double_prime is not UNSET: + field_dict["peakFDoublePrime"] = peak_f_double_prime + if inflection_energy is not UNSET: + field_dict["inflectionEnergy"] = inflection_energy + if inflection_f_prime is not UNSET: + field_dict["inflectionFPrime"] = inflection_f_prime + if inflection_f_double_prime is not UNSET: + field_dict["inflectionFDoublePrime"] = inflection_f_double_prime + if xray_dose is not UNSET: + field_dict["xrayDose"] = xray_dose + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if edge_energy is not UNSET: + field_dict["edgeEnergy"] = edge_energy + if beam_size_vertical is not UNSET: + field_dict["beamSizeVertical"] = beam_size_vertical + if beam_size_horizontal is not UNSET: + field_dict["beamSizeHorizontal"] = beam_size_horizontal + if comments is not UNSET: + field_dict["comments"] = comments + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_fluorescence_detector(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fluorescence_detector = _parse_fluorescence_detector(d.pop("fluorescenceDetector", UNSET)) + + def _parse_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_file_full_path = _parse_scan_file_full_path(d.pop("scanFileFullPath", UNSET)) + + def _parse_jpeg_chooch_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + jpeg_chooch_file_full_path = _parse_jpeg_chooch_file_full_path(d.pop("jpegChoochFileFullPath", UNSET)) + + def _parse_element(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + element = _parse_element(d.pop("element", UNSET)) + + def _parse_start_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + start_energy = _parse_start_energy(d.pop("startEnergy", UNSET)) + + def _parse_end_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + end_energy = _parse_end_energy(d.pop("endEnergy", UNSET)) + + def _parse_transmission_factor(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission_factor = _parse_transmission_factor(d.pop("transmissionFactor", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_axis_postion(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_postion = _parse_axis_postion(d.pop("axisPostion", UNSET)) + + def _parse_synchrotron_current(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + synchrotron_current = _parse_synchrotron_current(d.pop("synchrotronCurrent", UNSET)) + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_peak_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_energy = _parse_peak_energy(d.pop("peakEnergy", UNSET)) + + def _parse_peak_f_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_f_prime = _parse_peak_f_prime(d.pop("peakFPrime", UNSET)) + + def _parse_peak_f_double_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_f_double_prime = _parse_peak_f_double_prime(d.pop("peakFDoublePrime", UNSET)) + + def _parse_inflection_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_energy = _parse_inflection_energy(d.pop("inflectionEnergy", UNSET)) + + def _parse_inflection_f_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_f_prime = _parse_inflection_f_prime(d.pop("inflectionFPrime", UNSET)) + + def _parse_inflection_f_double_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_f_double_prime = _parse_inflection_f_double_prime(d.pop("inflectionFDoublePrime", UNSET)) + + def _parse_xray_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + xray_dose = _parse_xray_dose(d.pop("xrayDose", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_edge_energy(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + edge_energy = _parse_edge_energy(d.pop("edgeEnergy", UNSET)) + + def _parse_beam_size_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_vertical = _parse_beam_size_vertical(d.pop("beamSizeVertical", UNSET)) + + def _parse_beam_size_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_horizontal = _parse_beam_size_horizontal(d.pop("beamSizeHorizontal", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + energy_scan_in = cls( + fluorescence_detector=fluorescence_detector, + scan_file_full_path=scan_file_full_path, + jpeg_chooch_file_full_path=jpeg_chooch_file_full_path, + element=element, + start_energy=start_energy, + end_energy=end_energy, + transmission_factor=transmission_factor, + exposure_time=exposure_time, + axis_postion=axis_postion, + synchrotron_current=synchrotron_current, + temperature=temperature, + peak_energy=peak_energy, + peak_f_prime=peak_f_prime, + peak_f_double_prime=peak_f_double_prime, + inflection_energy=inflection_energy, + inflection_f_prime=inflection_f_prime, + inflection_f_double_prime=inflection_f_double_prime, + xray_dose=xray_dose, + start_time=start_time, + end_time=end_time, + edge_energy=edge_energy, + beam_size_vertical=beam_size_vertical, + beam_size_horizontal=beam_size_horizontal, + comments=comments, + sample_id=sample_id, + ) + + energy_scan_in.additional_properties = d + return energy_scan_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/energy_scan_optional.py b/src/lims_utils/expeye_client/models/energy_scan_optional.py new file mode 100644 index 0000000..327a1fd --- /dev/null +++ b/src/lims_utils/expeye_client/models/energy_scan_optional.py @@ -0,0 +1,554 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EnergyScanOptional") + + +@_attrs_define +class EnergyScanOptional: + """ + Attributes: + fluorescence_detector (None | str | Unset): + scan_file_full_path (None | str | Unset): + jpeg_chooch_file_full_path (None | str | Unset): + element (None | str | Unset): + start_energy (float | None | Unset): + end_energy (float | None | Unset): + transmission_factor (float | None | Unset): + exposure_time (float | None | Unset): + axis_postion (float | None | Unset): + synchrotron_current (float | None | Unset): + temperature (float | None | Unset): + peak_energy (float | None | Unset): + peak_f_prime (float | None | Unset): + peak_f_double_prime (float | None | Unset): + inflection_energy (float | None | Unset): + inflection_f_prime (float | None | Unset): + inflection_f_double_prime (float | None | Unset): + xray_dose (float | None | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + edge_energy (None | str | Unset): + beam_size_vertical (float | None | Unset): + beam_size_horizontal (float | None | Unset): + comments (None | str | Unset): + """ + + fluorescence_detector: None | str | Unset = UNSET + scan_file_full_path: None | str | Unset = UNSET + jpeg_chooch_file_full_path: None | str | Unset = UNSET + element: None | str | Unset = UNSET + start_energy: float | None | Unset = UNSET + end_energy: float | None | Unset = UNSET + transmission_factor: float | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + axis_postion: float | None | Unset = UNSET + synchrotron_current: float | None | Unset = UNSET + temperature: float | None | Unset = UNSET + peak_energy: float | None | Unset = UNSET + peak_f_prime: float | None | Unset = UNSET + peak_f_double_prime: float | None | Unset = UNSET + inflection_energy: float | None | Unset = UNSET + inflection_f_prime: float | None | Unset = UNSET + inflection_f_double_prime: float | None | Unset = UNSET + xray_dose: float | None | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + edge_energy: None | str | Unset = UNSET + beam_size_vertical: float | None | Unset = UNSET + beam_size_horizontal: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + fluorescence_detector: None | str | Unset + if isinstance(self.fluorescence_detector, Unset): + fluorescence_detector = UNSET + else: + fluorescence_detector = self.fluorescence_detector + + scan_file_full_path: None | str | Unset + if isinstance(self.scan_file_full_path, Unset): + scan_file_full_path = UNSET + else: + scan_file_full_path = self.scan_file_full_path + + jpeg_chooch_file_full_path: None | str | Unset + if isinstance(self.jpeg_chooch_file_full_path, Unset): + jpeg_chooch_file_full_path = UNSET + else: + jpeg_chooch_file_full_path = self.jpeg_chooch_file_full_path + + element: None | str | Unset + if isinstance(self.element, Unset): + element = UNSET + else: + element = self.element + + start_energy: float | None | Unset + if isinstance(self.start_energy, Unset): + start_energy = UNSET + else: + start_energy = self.start_energy + + end_energy: float | None | Unset + if isinstance(self.end_energy, Unset): + end_energy = UNSET + else: + end_energy = self.end_energy + + transmission_factor: float | None | Unset + if isinstance(self.transmission_factor, Unset): + transmission_factor = UNSET + else: + transmission_factor = self.transmission_factor + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + axis_postion: float | None | Unset + if isinstance(self.axis_postion, Unset): + axis_postion = UNSET + else: + axis_postion = self.axis_postion + + synchrotron_current: float | None | Unset + if isinstance(self.synchrotron_current, Unset): + synchrotron_current = UNSET + else: + synchrotron_current = self.synchrotron_current + + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + peak_energy: float | None | Unset + if isinstance(self.peak_energy, Unset): + peak_energy = UNSET + else: + peak_energy = self.peak_energy + + peak_f_prime: float | None | Unset + if isinstance(self.peak_f_prime, Unset): + peak_f_prime = UNSET + else: + peak_f_prime = self.peak_f_prime + + peak_f_double_prime: float | None | Unset + if isinstance(self.peak_f_double_prime, Unset): + peak_f_double_prime = UNSET + else: + peak_f_double_prime = self.peak_f_double_prime + + inflection_energy: float | None | Unset + if isinstance(self.inflection_energy, Unset): + inflection_energy = UNSET + else: + inflection_energy = self.inflection_energy + + inflection_f_prime: float | None | Unset + if isinstance(self.inflection_f_prime, Unset): + inflection_f_prime = UNSET + else: + inflection_f_prime = self.inflection_f_prime + + inflection_f_double_prime: float | None | Unset + if isinstance(self.inflection_f_double_prime, Unset): + inflection_f_double_prime = UNSET + else: + inflection_f_double_prime = self.inflection_f_double_prime + + xray_dose: float | None | Unset + if isinstance(self.xray_dose, Unset): + xray_dose = UNSET + else: + xray_dose = self.xray_dose + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + edge_energy: None | str | Unset + if isinstance(self.edge_energy, Unset): + edge_energy = UNSET + else: + edge_energy = self.edge_energy + + beam_size_vertical: float | None | Unset + if isinstance(self.beam_size_vertical, Unset): + beam_size_vertical = UNSET + else: + beam_size_vertical = self.beam_size_vertical + + beam_size_horizontal: float | None | Unset + if isinstance(self.beam_size_horizontal, Unset): + beam_size_horizontal = UNSET + else: + beam_size_horizontal = self.beam_size_horizontal + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fluorescence_detector is not UNSET: + field_dict["fluorescenceDetector"] = fluorescence_detector + if scan_file_full_path is not UNSET: + field_dict["scanFileFullPath"] = scan_file_full_path + if jpeg_chooch_file_full_path is not UNSET: + field_dict["jpegChoochFileFullPath"] = jpeg_chooch_file_full_path + if element is not UNSET: + field_dict["element"] = element + if start_energy is not UNSET: + field_dict["startEnergy"] = start_energy + if end_energy is not UNSET: + field_dict["endEnergy"] = end_energy + if transmission_factor is not UNSET: + field_dict["transmissionFactor"] = transmission_factor + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if axis_postion is not UNSET: + field_dict["axisPostion"] = axis_postion + if synchrotron_current is not UNSET: + field_dict["synchrotronCurrent"] = synchrotron_current + if temperature is not UNSET: + field_dict["temperature"] = temperature + if peak_energy is not UNSET: + field_dict["peakEnergy"] = peak_energy + if peak_f_prime is not UNSET: + field_dict["peakFPrime"] = peak_f_prime + if peak_f_double_prime is not UNSET: + field_dict["peakFDoublePrime"] = peak_f_double_prime + if inflection_energy is not UNSET: + field_dict["inflectionEnergy"] = inflection_energy + if inflection_f_prime is not UNSET: + field_dict["inflectionFPrime"] = inflection_f_prime + if inflection_f_double_prime is not UNSET: + field_dict["inflectionFDoublePrime"] = inflection_f_double_prime + if xray_dose is not UNSET: + field_dict["xrayDose"] = xray_dose + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if edge_energy is not UNSET: + field_dict["edgeEnergy"] = edge_energy + if beam_size_vertical is not UNSET: + field_dict["beamSizeVertical"] = beam_size_vertical + if beam_size_horizontal is not UNSET: + field_dict["beamSizeHorizontal"] = beam_size_horizontal + if comments is not UNSET: + field_dict["comments"] = comments + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_fluorescence_detector(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fluorescence_detector = _parse_fluorescence_detector(d.pop("fluorescenceDetector", UNSET)) + + def _parse_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_file_full_path = _parse_scan_file_full_path(d.pop("scanFileFullPath", UNSET)) + + def _parse_jpeg_chooch_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + jpeg_chooch_file_full_path = _parse_jpeg_chooch_file_full_path(d.pop("jpegChoochFileFullPath", UNSET)) + + def _parse_element(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + element = _parse_element(d.pop("element", UNSET)) + + def _parse_start_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + start_energy = _parse_start_energy(d.pop("startEnergy", UNSET)) + + def _parse_end_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + end_energy = _parse_end_energy(d.pop("endEnergy", UNSET)) + + def _parse_transmission_factor(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission_factor = _parse_transmission_factor(d.pop("transmissionFactor", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_axis_postion(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_postion = _parse_axis_postion(d.pop("axisPostion", UNSET)) + + def _parse_synchrotron_current(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + synchrotron_current = _parse_synchrotron_current(d.pop("synchrotronCurrent", UNSET)) + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_peak_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_energy = _parse_peak_energy(d.pop("peakEnergy", UNSET)) + + def _parse_peak_f_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_f_prime = _parse_peak_f_prime(d.pop("peakFPrime", UNSET)) + + def _parse_peak_f_double_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_f_double_prime = _parse_peak_f_double_prime(d.pop("peakFDoublePrime", UNSET)) + + def _parse_inflection_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_energy = _parse_inflection_energy(d.pop("inflectionEnergy", UNSET)) + + def _parse_inflection_f_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_f_prime = _parse_inflection_f_prime(d.pop("inflectionFPrime", UNSET)) + + def _parse_inflection_f_double_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_f_double_prime = _parse_inflection_f_double_prime(d.pop("inflectionFDoublePrime", UNSET)) + + def _parse_xray_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + xray_dose = _parse_xray_dose(d.pop("xrayDose", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_edge_energy(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + edge_energy = _parse_edge_energy(d.pop("edgeEnergy", UNSET)) + + def _parse_beam_size_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_vertical = _parse_beam_size_vertical(d.pop("beamSizeVertical", UNSET)) + + def _parse_beam_size_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_horizontal = _parse_beam_size_horizontal(d.pop("beamSizeHorizontal", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + energy_scan_optional = cls( + fluorescence_detector=fluorescence_detector, + scan_file_full_path=scan_file_full_path, + jpeg_chooch_file_full_path=jpeg_chooch_file_full_path, + element=element, + start_energy=start_energy, + end_energy=end_energy, + transmission_factor=transmission_factor, + exposure_time=exposure_time, + axis_postion=axis_postion, + synchrotron_current=synchrotron_current, + temperature=temperature, + peak_energy=peak_energy, + peak_f_prime=peak_f_prime, + peak_f_double_prime=peak_f_double_prime, + inflection_energy=inflection_energy, + inflection_f_prime=inflection_f_prime, + inflection_f_double_prime=inflection_f_double_prime, + xray_dose=xray_dose, + start_time=start_time, + end_time=end_time, + edge_energy=edge_energy, + beam_size_vertical=beam_size_vertical, + beam_size_horizontal=beam_size_horizontal, + comments=comments, + ) + + energy_scan_optional.additional_properties = d + return energy_scan_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/energy_scan_out.py b/src/lims_utils/expeye_client/models/energy_scan_out.py new file mode 100644 index 0000000..8bf2509 --- /dev/null +++ b/src/lims_utils/expeye_client/models/energy_scan_out.py @@ -0,0 +1,572 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EnergyScanOut") + + +@_attrs_define +class EnergyScanOut: + """ + Attributes: + session_id (int): + energy_scan_id (int): + fluorescence_detector (None | str | Unset): + scan_file_full_path (None | str | Unset): + jpeg_chooch_file_full_path (None | str | Unset): + element (None | str | Unset): + start_energy (float | None | Unset): + end_energy (float | None | Unset): + transmission_factor (float | None | Unset): + exposure_time (float | None | Unset): + axis_postion (float | None | Unset): + synchrotron_current (float | None | Unset): + temperature (float | None | Unset): + peak_energy (float | None | Unset): + peak_f_prime (float | None | Unset): + peak_f_double_prime (float | None | Unset): + inflection_energy (float | None | Unset): + inflection_f_prime (float | None | Unset): + inflection_f_double_prime (float | None | Unset): + xray_dose (float | None | Unset): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + edge_energy (None | str | Unset): + beam_size_vertical (float | None | Unset): + beam_size_horizontal (float | None | Unset): + comments (None | str | Unset): + """ + + session_id: int + energy_scan_id: int + fluorescence_detector: None | str | Unset = UNSET + scan_file_full_path: None | str | Unset = UNSET + jpeg_chooch_file_full_path: None | str | Unset = UNSET + element: None | str | Unset = UNSET + start_energy: float | None | Unset = UNSET + end_energy: float | None | Unset = UNSET + transmission_factor: float | None | Unset = UNSET + exposure_time: float | None | Unset = UNSET + axis_postion: float | None | Unset = UNSET + synchrotron_current: float | None | Unset = UNSET + temperature: float | None | Unset = UNSET + peak_energy: float | None | Unset = UNSET + peak_f_prime: float | None | Unset = UNSET + peak_f_double_prime: float | None | Unset = UNSET + inflection_energy: float | None | Unset = UNSET + inflection_f_prime: float | None | Unset = UNSET + inflection_f_double_prime: float | None | Unset = UNSET + xray_dose: float | None | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + edge_energy: None | str | Unset = UNSET + beam_size_vertical: float | None | Unset = UNSET + beam_size_horizontal: float | None | Unset = UNSET + comments: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + session_id = self.session_id + + energy_scan_id = self.energy_scan_id + + fluorescence_detector: None | str | Unset + if isinstance(self.fluorescence_detector, Unset): + fluorescence_detector = UNSET + else: + fluorescence_detector = self.fluorescence_detector + + scan_file_full_path: None | str | Unset + if isinstance(self.scan_file_full_path, Unset): + scan_file_full_path = UNSET + else: + scan_file_full_path = self.scan_file_full_path + + jpeg_chooch_file_full_path: None | str | Unset + if isinstance(self.jpeg_chooch_file_full_path, Unset): + jpeg_chooch_file_full_path = UNSET + else: + jpeg_chooch_file_full_path = self.jpeg_chooch_file_full_path + + element: None | str | Unset + if isinstance(self.element, Unset): + element = UNSET + else: + element = self.element + + start_energy: float | None | Unset + if isinstance(self.start_energy, Unset): + start_energy = UNSET + else: + start_energy = self.start_energy + + end_energy: float | None | Unset + if isinstance(self.end_energy, Unset): + end_energy = UNSET + else: + end_energy = self.end_energy + + transmission_factor: float | None | Unset + if isinstance(self.transmission_factor, Unset): + transmission_factor = UNSET + else: + transmission_factor = self.transmission_factor + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + axis_postion: float | None | Unset + if isinstance(self.axis_postion, Unset): + axis_postion = UNSET + else: + axis_postion = self.axis_postion + + synchrotron_current: float | None | Unset + if isinstance(self.synchrotron_current, Unset): + synchrotron_current = UNSET + else: + synchrotron_current = self.synchrotron_current + + temperature: float | None | Unset + if isinstance(self.temperature, Unset): + temperature = UNSET + else: + temperature = self.temperature + + peak_energy: float | None | Unset + if isinstance(self.peak_energy, Unset): + peak_energy = UNSET + else: + peak_energy = self.peak_energy + + peak_f_prime: float | None | Unset + if isinstance(self.peak_f_prime, Unset): + peak_f_prime = UNSET + else: + peak_f_prime = self.peak_f_prime + + peak_f_double_prime: float | None | Unset + if isinstance(self.peak_f_double_prime, Unset): + peak_f_double_prime = UNSET + else: + peak_f_double_prime = self.peak_f_double_prime + + inflection_energy: float | None | Unset + if isinstance(self.inflection_energy, Unset): + inflection_energy = UNSET + else: + inflection_energy = self.inflection_energy + + inflection_f_prime: float | None | Unset + if isinstance(self.inflection_f_prime, Unset): + inflection_f_prime = UNSET + else: + inflection_f_prime = self.inflection_f_prime + + inflection_f_double_prime: float | None | Unset + if isinstance(self.inflection_f_double_prime, Unset): + inflection_f_double_prime = UNSET + else: + inflection_f_double_prime = self.inflection_f_double_prime + + xray_dose: float | None | Unset + if isinstance(self.xray_dose, Unset): + xray_dose = UNSET + else: + xray_dose = self.xray_dose + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + edge_energy: None | str | Unset + if isinstance(self.edge_energy, Unset): + edge_energy = UNSET + else: + edge_energy = self.edge_energy + + beam_size_vertical: float | None | Unset + if isinstance(self.beam_size_vertical, Unset): + beam_size_vertical = UNSET + else: + beam_size_vertical = self.beam_size_vertical + + beam_size_horizontal: float | None | Unset + if isinstance(self.beam_size_horizontal, Unset): + beam_size_horizontal = UNSET + else: + beam_size_horizontal = self.beam_size_horizontal + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "sessionId": session_id, + "energyScanId": energy_scan_id, + } + ) + if fluorescence_detector is not UNSET: + field_dict["fluorescenceDetector"] = fluorescence_detector + if scan_file_full_path is not UNSET: + field_dict["scanFileFullPath"] = scan_file_full_path + if jpeg_chooch_file_full_path is not UNSET: + field_dict["jpegChoochFileFullPath"] = jpeg_chooch_file_full_path + if element is not UNSET: + field_dict["element"] = element + if start_energy is not UNSET: + field_dict["startEnergy"] = start_energy + if end_energy is not UNSET: + field_dict["endEnergy"] = end_energy + if transmission_factor is not UNSET: + field_dict["transmissionFactor"] = transmission_factor + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if axis_postion is not UNSET: + field_dict["axisPostion"] = axis_postion + if synchrotron_current is not UNSET: + field_dict["synchrotronCurrent"] = synchrotron_current + if temperature is not UNSET: + field_dict["temperature"] = temperature + if peak_energy is not UNSET: + field_dict["peakEnergy"] = peak_energy + if peak_f_prime is not UNSET: + field_dict["peakFPrime"] = peak_f_prime + if peak_f_double_prime is not UNSET: + field_dict["peakFDoublePrime"] = peak_f_double_prime + if inflection_energy is not UNSET: + field_dict["inflectionEnergy"] = inflection_energy + if inflection_f_prime is not UNSET: + field_dict["inflectionFPrime"] = inflection_f_prime + if inflection_f_double_prime is not UNSET: + field_dict["inflectionFDoublePrime"] = inflection_f_double_prime + if xray_dose is not UNSET: + field_dict["xrayDose"] = xray_dose + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if edge_energy is not UNSET: + field_dict["edgeEnergy"] = edge_energy + if beam_size_vertical is not UNSET: + field_dict["beamSizeVertical"] = beam_size_vertical + if beam_size_horizontal is not UNSET: + field_dict["beamSizeHorizontal"] = beam_size_horizontal + if comments is not UNSET: + field_dict["comments"] = comments + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_id = d.pop("sessionId") + + energy_scan_id = d.pop("energyScanId") + + def _parse_fluorescence_detector(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fluorescence_detector = _parse_fluorescence_detector(d.pop("fluorescenceDetector", UNSET)) + + def _parse_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_file_full_path = _parse_scan_file_full_path(d.pop("scanFileFullPath", UNSET)) + + def _parse_jpeg_chooch_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + jpeg_chooch_file_full_path = _parse_jpeg_chooch_file_full_path(d.pop("jpegChoochFileFullPath", UNSET)) + + def _parse_element(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + element = _parse_element(d.pop("element", UNSET)) + + def _parse_start_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + start_energy = _parse_start_energy(d.pop("startEnergy", UNSET)) + + def _parse_end_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + end_energy = _parse_end_energy(d.pop("endEnergy", UNSET)) + + def _parse_transmission_factor(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + transmission_factor = _parse_transmission_factor(d.pop("transmissionFactor", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_axis_postion(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_postion = _parse_axis_postion(d.pop("axisPostion", UNSET)) + + def _parse_synchrotron_current(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + synchrotron_current = _parse_synchrotron_current(d.pop("synchrotronCurrent", UNSET)) + + def _parse_temperature(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + temperature = _parse_temperature(d.pop("temperature", UNSET)) + + def _parse_peak_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_energy = _parse_peak_energy(d.pop("peakEnergy", UNSET)) + + def _parse_peak_f_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_f_prime = _parse_peak_f_prime(d.pop("peakFPrime", UNSET)) + + def _parse_peak_f_double_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + peak_f_double_prime = _parse_peak_f_double_prime(d.pop("peakFDoublePrime", UNSET)) + + def _parse_inflection_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_energy = _parse_inflection_energy(d.pop("inflectionEnergy", UNSET)) + + def _parse_inflection_f_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_f_prime = _parse_inflection_f_prime(d.pop("inflectionFPrime", UNSET)) + + def _parse_inflection_f_double_prime(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + inflection_f_double_prime = _parse_inflection_f_double_prime(d.pop("inflectionFDoublePrime", UNSET)) + + def _parse_xray_dose(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + xray_dose = _parse_xray_dose(d.pop("xrayDose", UNSET)) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_edge_energy(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + edge_energy = _parse_edge_energy(d.pop("edgeEnergy", UNSET)) + + def _parse_beam_size_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_vertical = _parse_beam_size_vertical(d.pop("beamSizeVertical", UNSET)) + + def _parse_beam_size_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_horizontal = _parse_beam_size_horizontal(d.pop("beamSizeHorizontal", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + energy_scan_out = cls( + session_id=session_id, + energy_scan_id=energy_scan_id, + fluorescence_detector=fluorescence_detector, + scan_file_full_path=scan_file_full_path, + jpeg_chooch_file_full_path=jpeg_chooch_file_full_path, + element=element, + start_energy=start_energy, + end_energy=end_energy, + transmission_factor=transmission_factor, + exposure_time=exposure_time, + axis_postion=axis_postion, + synchrotron_current=synchrotron_current, + temperature=temperature, + peak_energy=peak_energy, + peak_f_prime=peak_f_prime, + peak_f_double_prime=peak_f_double_prime, + inflection_energy=inflection_energy, + inflection_f_prime=inflection_f_prime, + inflection_f_double_prime=inflection_f_double_prime, + xray_dose=xray_dose, + start_time=start_time, + end_time=end_time, + edge_energy=edge_energy, + beam_size_vertical=beam_size_vertical, + beam_size_horizontal=beam_size_horizontal, + comments=comments, + ) + + energy_scan_out.additional_properties = d + return energy_scan_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/file_attachment_type.py b/src/lims_utils/expeye_client/models/file_attachment_type.py new file mode 100644 index 0000000..68871e8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/file_attachment_type.py @@ -0,0 +1,14 @@ +from enum import StrEnum + + +class FileAttachmentType(StrEnum): + LOG = "log" + PARAMS = "params" + PIA = "pia" + RECIP = "recip" + SNAPSHOT = "snapshot" + WARNING = "warning" + XY = "xy" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/file_type.py b/src/lims_utils/expeye_client/models/file_type.py new file mode 100644 index 0000000..a506a73 --- /dev/null +++ b/src/lims_utils/expeye_client/models/file_type.py @@ -0,0 +1,12 @@ +from enum import StrEnum + + +class FileType(StrEnum): + DEBUG = "Debug" + GRAPH = "Graph" + INPUT = "Input" + LOG = "Log" + RESULT = "Result" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/fluorescence_spectrum_in.py b/src/lims_utils/expeye_client/models/fluorescence_spectrum_in.py new file mode 100644 index 0000000..054a94f --- /dev/null +++ b/src/lims_utils/expeye_client/models/fluorescence_spectrum_in.py @@ -0,0 +1,474 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FluorescenceSpectrumIn") + + +@_attrs_define +class FluorescenceSpectrumIn: + """ + Attributes: + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + sample_id (int | None | Unset): + jpeg_scan_file_full_path (None | str | Unset): + filename (None | str | Unset): + exposure_time (float | None | Unset): + axis_position (float | None | Unset): + beam_transmission (float | None | Unset): + annotated_pymca_xfe_spectrum (None | str | Unset): + fitted_data_file_full_path (None | str | Unset): + scan_file_full_path (None | str | Unset): + energy (float | None | Unset): + beam_size_vertical (float | None | Unset): + beam_size_horizontal (float | None | Unset): + crystal_class (None | str | Unset): + comments (None | str | Unset): + bl_sub_sample_id (int | None | Unset): + flux (float | None | Unset): + flux_end (float | None | Unset): + working_directory (None | str | Unset): + """ + + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + sample_id: int | None | Unset = UNSET + jpeg_scan_file_full_path: None | str | Unset = UNSET + filename: None | str | Unset = UNSET + exposure_time: float | None | Unset = UNSET + axis_position: float | None | Unset = UNSET + beam_transmission: float | None | Unset = UNSET + annotated_pymca_xfe_spectrum: None | str | Unset = UNSET + fitted_data_file_full_path: None | str | Unset = UNSET + scan_file_full_path: None | str | Unset = UNSET + energy: float | None | Unset = UNSET + beam_size_vertical: float | None | Unset = UNSET + beam_size_horizontal: float | None | Unset = UNSET + crystal_class: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + bl_sub_sample_id: int | None | Unset = UNSET + flux: float | None | Unset = UNSET + flux_end: float | None | Unset = UNSET + working_directory: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + jpeg_scan_file_full_path: None | str | Unset + if isinstance(self.jpeg_scan_file_full_path, Unset): + jpeg_scan_file_full_path = UNSET + else: + jpeg_scan_file_full_path = self.jpeg_scan_file_full_path + + filename: None | str | Unset + if isinstance(self.filename, Unset): + filename = UNSET + else: + filename = self.filename + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + axis_position: float | None | Unset + if isinstance(self.axis_position, Unset): + axis_position = UNSET + else: + axis_position = self.axis_position + + beam_transmission: float | None | Unset + if isinstance(self.beam_transmission, Unset): + beam_transmission = UNSET + else: + beam_transmission = self.beam_transmission + + annotated_pymca_xfe_spectrum: None | str | Unset + if isinstance(self.annotated_pymca_xfe_spectrum, Unset): + annotated_pymca_xfe_spectrum = UNSET + else: + annotated_pymca_xfe_spectrum = self.annotated_pymca_xfe_spectrum + + fitted_data_file_full_path: None | str | Unset + if isinstance(self.fitted_data_file_full_path, Unset): + fitted_data_file_full_path = UNSET + else: + fitted_data_file_full_path = self.fitted_data_file_full_path + + scan_file_full_path: None | str | Unset + if isinstance(self.scan_file_full_path, Unset): + scan_file_full_path = UNSET + else: + scan_file_full_path = self.scan_file_full_path + + energy: float | None | Unset + if isinstance(self.energy, Unset): + energy = UNSET + else: + energy = self.energy + + beam_size_vertical: float | None | Unset + if isinstance(self.beam_size_vertical, Unset): + beam_size_vertical = UNSET + else: + beam_size_vertical = self.beam_size_vertical + + beam_size_horizontal: float | None | Unset + if isinstance(self.beam_size_horizontal, Unset): + beam_size_horizontal = UNSET + else: + beam_size_horizontal = self.beam_size_horizontal + + crystal_class: None | str | Unset + if isinstance(self.crystal_class, Unset): + crystal_class = UNSET + else: + crystal_class = self.crystal_class + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + bl_sub_sample_id: int | None | Unset + if isinstance(self.bl_sub_sample_id, Unset): + bl_sub_sample_id = UNSET + else: + bl_sub_sample_id = self.bl_sub_sample_id + + flux: float | None | Unset + if isinstance(self.flux, Unset): + flux = UNSET + else: + flux = self.flux + + flux_end: float | None | Unset + if isinstance(self.flux_end, Unset): + flux_end = UNSET + else: + flux_end = self.flux_end + + working_directory: None | str | Unset + if isinstance(self.working_directory, Unset): + working_directory = UNSET + else: + working_directory = self.working_directory + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if jpeg_scan_file_full_path is not UNSET: + field_dict["jpegScanFileFullPath"] = jpeg_scan_file_full_path + if filename is not UNSET: + field_dict["filename"] = filename + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if axis_position is not UNSET: + field_dict["axisPosition"] = axis_position + if beam_transmission is not UNSET: + field_dict["beamTransmission"] = beam_transmission + if annotated_pymca_xfe_spectrum is not UNSET: + field_dict["annotatedPymcaXfeSpectrum"] = annotated_pymca_xfe_spectrum + if fitted_data_file_full_path is not UNSET: + field_dict["fittedDataFileFullPath"] = fitted_data_file_full_path + if scan_file_full_path is not UNSET: + field_dict["scanFileFullPath"] = scan_file_full_path + if energy is not UNSET: + field_dict["energy"] = energy + if beam_size_vertical is not UNSET: + field_dict["beamSizeVertical"] = beam_size_vertical + if beam_size_horizontal is not UNSET: + field_dict["beamSizeHorizontal"] = beam_size_horizontal + if crystal_class is not UNSET: + field_dict["crystalClass"] = crystal_class + if comments is not UNSET: + field_dict["comments"] = comments + if bl_sub_sample_id is not UNSET: + field_dict["blSubSampleId"] = bl_sub_sample_id + if flux is not UNSET: + field_dict["flux"] = flux + if flux_end is not UNSET: + field_dict["fluxEnd"] = flux_end + if working_directory is not UNSET: + field_dict["workingDirectory"] = working_directory + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_jpeg_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + jpeg_scan_file_full_path = _parse_jpeg_scan_file_full_path(d.pop("jpegScanFileFullPath", UNSET)) + + def _parse_filename(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + filename = _parse_filename(d.pop("filename", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_axis_position(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_position = _parse_axis_position(d.pop("axisPosition", UNSET)) + + def _parse_beam_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_transmission = _parse_beam_transmission(d.pop("beamTransmission", UNSET)) + + def _parse_annotated_pymca_xfe_spectrum(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + annotated_pymca_xfe_spectrum = _parse_annotated_pymca_xfe_spectrum(d.pop("annotatedPymcaXfeSpectrum", UNSET)) + + def _parse_fitted_data_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fitted_data_file_full_path = _parse_fitted_data_file_full_path(d.pop("fittedDataFileFullPath", UNSET)) + + def _parse_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_file_full_path = _parse_scan_file_full_path(d.pop("scanFileFullPath", UNSET)) + + def _parse_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + energy = _parse_energy(d.pop("energy", UNSET)) + + def _parse_beam_size_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_vertical = _parse_beam_size_vertical(d.pop("beamSizeVertical", UNSET)) + + def _parse_beam_size_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_horizontal = _parse_beam_size_horizontal(d.pop("beamSizeHorizontal", UNSET)) + + def _parse_crystal_class(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_class = _parse_crystal_class(d.pop("crystalClass", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_bl_sub_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sub_sample_id = _parse_bl_sub_sample_id(d.pop("blSubSampleId", UNSET)) + + def _parse_flux(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux = _parse_flux(d.pop("flux", UNSET)) + + def _parse_flux_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux_end = _parse_flux_end(d.pop("fluxEnd", UNSET)) + + def _parse_working_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + working_directory = _parse_working_directory(d.pop("workingDirectory", UNSET)) + + fluorescence_spectrum_in = cls( + start_time=start_time, + end_time=end_time, + sample_id=sample_id, + jpeg_scan_file_full_path=jpeg_scan_file_full_path, + filename=filename, + exposure_time=exposure_time, + axis_position=axis_position, + beam_transmission=beam_transmission, + annotated_pymca_xfe_spectrum=annotated_pymca_xfe_spectrum, + fitted_data_file_full_path=fitted_data_file_full_path, + scan_file_full_path=scan_file_full_path, + energy=energy, + beam_size_vertical=beam_size_vertical, + beam_size_horizontal=beam_size_horizontal, + crystal_class=crystal_class, + comments=comments, + bl_sub_sample_id=bl_sub_sample_id, + flux=flux, + flux_end=flux_end, + working_directory=working_directory, + ) + + fluorescence_spectrum_in.additional_properties = d + return fluorescence_spectrum_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/fluorescence_spectrum_optional.py b/src/lims_utils/expeye_client/models/fluorescence_spectrum_optional.py new file mode 100644 index 0000000..378eb2c --- /dev/null +++ b/src/lims_utils/expeye_client/models/fluorescence_spectrum_optional.py @@ -0,0 +1,494 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FluorescenceSpectrumOptional") + + +@_attrs_define +class FluorescenceSpectrumOptional: + """ + Attributes: + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + sample_id (int | None | Unset): + jpeg_scan_file_full_path (None | str | Unset): + filename (None | str | Unset): + exposure_time (float | None | Unset): + axis_position (float | None | Unset): + beam_transmission (float | None | Unset): + annotated_pymca_xfe_spectrum (None | str | Unset): + fitted_data_file_full_path (None | str | Unset): + scan_file_full_path (None | str | Unset): + energy (float | None | Unset): + beam_size_vertical (float | None | Unset): + beam_size_horizontal (float | None | Unset): + crystal_class (None | str | Unset): + comments (None | str | Unset): + bl_sub_sample_id (int | None | Unset): + flux (float | None | Unset): + flux_end (float | None | Unset): + working_directory (None | str | Unset): + session_id (int | None | Unset): + """ + + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + sample_id: int | None | Unset = UNSET + jpeg_scan_file_full_path: None | str | Unset = UNSET + filename: None | str | Unset = UNSET + exposure_time: float | None | Unset = UNSET + axis_position: float | None | Unset = UNSET + beam_transmission: float | None | Unset = UNSET + annotated_pymca_xfe_spectrum: None | str | Unset = UNSET + fitted_data_file_full_path: None | str | Unset = UNSET + scan_file_full_path: None | str | Unset = UNSET + energy: float | None | Unset = UNSET + beam_size_vertical: float | None | Unset = UNSET + beam_size_horizontal: float | None | Unset = UNSET + crystal_class: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + bl_sub_sample_id: int | None | Unset = UNSET + flux: float | None | Unset = UNSET + flux_end: float | None | Unset = UNSET + working_directory: None | str | Unset = UNSET + session_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + jpeg_scan_file_full_path: None | str | Unset + if isinstance(self.jpeg_scan_file_full_path, Unset): + jpeg_scan_file_full_path = UNSET + else: + jpeg_scan_file_full_path = self.jpeg_scan_file_full_path + + filename: None | str | Unset + if isinstance(self.filename, Unset): + filename = UNSET + else: + filename = self.filename + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + axis_position: float | None | Unset + if isinstance(self.axis_position, Unset): + axis_position = UNSET + else: + axis_position = self.axis_position + + beam_transmission: float | None | Unset + if isinstance(self.beam_transmission, Unset): + beam_transmission = UNSET + else: + beam_transmission = self.beam_transmission + + annotated_pymca_xfe_spectrum: None | str | Unset + if isinstance(self.annotated_pymca_xfe_spectrum, Unset): + annotated_pymca_xfe_spectrum = UNSET + else: + annotated_pymca_xfe_spectrum = self.annotated_pymca_xfe_spectrum + + fitted_data_file_full_path: None | str | Unset + if isinstance(self.fitted_data_file_full_path, Unset): + fitted_data_file_full_path = UNSET + else: + fitted_data_file_full_path = self.fitted_data_file_full_path + + scan_file_full_path: None | str | Unset + if isinstance(self.scan_file_full_path, Unset): + scan_file_full_path = UNSET + else: + scan_file_full_path = self.scan_file_full_path + + energy: float | None | Unset + if isinstance(self.energy, Unset): + energy = UNSET + else: + energy = self.energy + + beam_size_vertical: float | None | Unset + if isinstance(self.beam_size_vertical, Unset): + beam_size_vertical = UNSET + else: + beam_size_vertical = self.beam_size_vertical + + beam_size_horizontal: float | None | Unset + if isinstance(self.beam_size_horizontal, Unset): + beam_size_horizontal = UNSET + else: + beam_size_horizontal = self.beam_size_horizontal + + crystal_class: None | str | Unset + if isinstance(self.crystal_class, Unset): + crystal_class = UNSET + else: + crystal_class = self.crystal_class + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + bl_sub_sample_id: int | None | Unset + if isinstance(self.bl_sub_sample_id, Unset): + bl_sub_sample_id = UNSET + else: + bl_sub_sample_id = self.bl_sub_sample_id + + flux: float | None | Unset + if isinstance(self.flux, Unset): + flux = UNSET + else: + flux = self.flux + + flux_end: float | None | Unset + if isinstance(self.flux_end, Unset): + flux_end = UNSET + else: + flux_end = self.flux_end + + working_directory: None | str | Unset + if isinstance(self.working_directory, Unset): + working_directory = UNSET + else: + working_directory = self.working_directory + + session_id: int | None | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if jpeg_scan_file_full_path is not UNSET: + field_dict["jpegScanFileFullPath"] = jpeg_scan_file_full_path + if filename is not UNSET: + field_dict["filename"] = filename + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if axis_position is not UNSET: + field_dict["axisPosition"] = axis_position + if beam_transmission is not UNSET: + field_dict["beamTransmission"] = beam_transmission + if annotated_pymca_xfe_spectrum is not UNSET: + field_dict["annotatedPymcaXfeSpectrum"] = annotated_pymca_xfe_spectrum + if fitted_data_file_full_path is not UNSET: + field_dict["fittedDataFileFullPath"] = fitted_data_file_full_path + if scan_file_full_path is not UNSET: + field_dict["scanFileFullPath"] = scan_file_full_path + if energy is not UNSET: + field_dict["energy"] = energy + if beam_size_vertical is not UNSET: + field_dict["beamSizeVertical"] = beam_size_vertical + if beam_size_horizontal is not UNSET: + field_dict["beamSizeHorizontal"] = beam_size_horizontal + if crystal_class is not UNSET: + field_dict["crystalClass"] = crystal_class + if comments is not UNSET: + field_dict["comments"] = comments + if bl_sub_sample_id is not UNSET: + field_dict["blSubSampleId"] = bl_sub_sample_id + if flux is not UNSET: + field_dict["flux"] = flux + if flux_end is not UNSET: + field_dict["fluxEnd"] = flux_end + if working_directory is not UNSET: + field_dict["workingDirectory"] = working_directory + if session_id is not UNSET: + field_dict["sessionId"] = session_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_jpeg_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + jpeg_scan_file_full_path = _parse_jpeg_scan_file_full_path(d.pop("jpegScanFileFullPath", UNSET)) + + def _parse_filename(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + filename = _parse_filename(d.pop("filename", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_axis_position(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_position = _parse_axis_position(d.pop("axisPosition", UNSET)) + + def _parse_beam_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_transmission = _parse_beam_transmission(d.pop("beamTransmission", UNSET)) + + def _parse_annotated_pymca_xfe_spectrum(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + annotated_pymca_xfe_spectrum = _parse_annotated_pymca_xfe_spectrum(d.pop("annotatedPymcaXfeSpectrum", UNSET)) + + def _parse_fitted_data_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fitted_data_file_full_path = _parse_fitted_data_file_full_path(d.pop("fittedDataFileFullPath", UNSET)) + + def _parse_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_file_full_path = _parse_scan_file_full_path(d.pop("scanFileFullPath", UNSET)) + + def _parse_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + energy = _parse_energy(d.pop("energy", UNSET)) + + def _parse_beam_size_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_vertical = _parse_beam_size_vertical(d.pop("beamSizeVertical", UNSET)) + + def _parse_beam_size_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_horizontal = _parse_beam_size_horizontal(d.pop("beamSizeHorizontal", UNSET)) + + def _parse_crystal_class(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_class = _parse_crystal_class(d.pop("crystalClass", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_bl_sub_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sub_sample_id = _parse_bl_sub_sample_id(d.pop("blSubSampleId", UNSET)) + + def _parse_flux(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux = _parse_flux(d.pop("flux", UNSET)) + + def _parse_flux_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux_end = _parse_flux_end(d.pop("fluxEnd", UNSET)) + + def _parse_working_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + working_directory = _parse_working_directory(d.pop("workingDirectory", UNSET)) + + def _parse_session_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + session_id = _parse_session_id(d.pop("sessionId", UNSET)) + + fluorescence_spectrum_optional = cls( + start_time=start_time, + end_time=end_time, + sample_id=sample_id, + jpeg_scan_file_full_path=jpeg_scan_file_full_path, + filename=filename, + exposure_time=exposure_time, + axis_position=axis_position, + beam_transmission=beam_transmission, + annotated_pymca_xfe_spectrum=annotated_pymca_xfe_spectrum, + fitted_data_file_full_path=fitted_data_file_full_path, + scan_file_full_path=scan_file_full_path, + energy=energy, + beam_size_vertical=beam_size_vertical, + beam_size_horizontal=beam_size_horizontal, + crystal_class=crystal_class, + comments=comments, + bl_sub_sample_id=bl_sub_sample_id, + flux=flux, + flux_end=flux_end, + working_directory=working_directory, + session_id=session_id, + ) + + fluorescence_spectrum_optional.additional_properties = d + return fluorescence_spectrum_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/fluorescence_spectrum_out.py b/src/lims_utils/expeye_client/models/fluorescence_spectrum_out.py new file mode 100644 index 0000000..2e03f01 --- /dev/null +++ b/src/lims_utils/expeye_client/models/fluorescence_spectrum_out.py @@ -0,0 +1,492 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FluorescenceSpectrumOut") + + +@_attrs_define +class FluorescenceSpectrumOut: + """ + Attributes: + session_id (int): + xfe_fluorescence_spectrum_id (int): + start_time (datetime.datetime | None | Unset): + end_time (datetime.datetime | None | Unset): + sample_id (int | None | Unset): + jpeg_scan_file_full_path (None | str | Unset): + filename (None | str | Unset): + exposure_time (float | None | Unset): + axis_position (float | None | Unset): + beam_transmission (float | None | Unset): + annotated_pymca_xfe_spectrum (None | str | Unset): + fitted_data_file_full_path (None | str | Unset): + scan_file_full_path (None | str | Unset): + energy (float | None | Unset): + beam_size_vertical (float | None | Unset): + beam_size_horizontal (float | None | Unset): + crystal_class (None | str | Unset): + comments (None | str | Unset): + bl_sub_sample_id (int | None | Unset): + flux (float | None | Unset): + flux_end (float | None | Unset): + working_directory (None | str | Unset): + """ + + session_id: int + xfe_fluorescence_spectrum_id: int + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET + sample_id: int | None | Unset = UNSET + jpeg_scan_file_full_path: None | str | Unset = UNSET + filename: None | str | Unset = UNSET + exposure_time: float | None | Unset = UNSET + axis_position: float | None | Unset = UNSET + beam_transmission: float | None | Unset = UNSET + annotated_pymca_xfe_spectrum: None | str | Unset = UNSET + fitted_data_file_full_path: None | str | Unset = UNSET + scan_file_full_path: None | str | Unset = UNSET + energy: float | None | Unset = UNSET + beam_size_vertical: float | None | Unset = UNSET + beam_size_horizontal: float | None | Unset = UNSET + crystal_class: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + bl_sub_sample_id: int | None | Unset = UNSET + flux: float | None | Unset = UNSET + flux_end: float | None | Unset = UNSET + working_directory: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + session_id = self.session_id + + xfe_fluorescence_spectrum_id = self.xfe_fluorescence_spectrum_id + + start_time: None | str | Unset + if isinstance(self.start_time, Unset): + start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() + else: + start_time = self.start_time + + end_time: None | str | Unset + if isinstance(self.end_time, Unset): + end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() + else: + end_time = self.end_time + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + jpeg_scan_file_full_path: None | str | Unset + if isinstance(self.jpeg_scan_file_full_path, Unset): + jpeg_scan_file_full_path = UNSET + else: + jpeg_scan_file_full_path = self.jpeg_scan_file_full_path + + filename: None | str | Unset + if isinstance(self.filename, Unset): + filename = UNSET + else: + filename = self.filename + + exposure_time: float | None | Unset + if isinstance(self.exposure_time, Unset): + exposure_time = UNSET + else: + exposure_time = self.exposure_time + + axis_position: float | None | Unset + if isinstance(self.axis_position, Unset): + axis_position = UNSET + else: + axis_position = self.axis_position + + beam_transmission: float | None | Unset + if isinstance(self.beam_transmission, Unset): + beam_transmission = UNSET + else: + beam_transmission = self.beam_transmission + + annotated_pymca_xfe_spectrum: None | str | Unset + if isinstance(self.annotated_pymca_xfe_spectrum, Unset): + annotated_pymca_xfe_spectrum = UNSET + else: + annotated_pymca_xfe_spectrum = self.annotated_pymca_xfe_spectrum + + fitted_data_file_full_path: None | str | Unset + if isinstance(self.fitted_data_file_full_path, Unset): + fitted_data_file_full_path = UNSET + else: + fitted_data_file_full_path = self.fitted_data_file_full_path + + scan_file_full_path: None | str | Unset + if isinstance(self.scan_file_full_path, Unset): + scan_file_full_path = UNSET + else: + scan_file_full_path = self.scan_file_full_path + + energy: float | None | Unset + if isinstance(self.energy, Unset): + energy = UNSET + else: + energy = self.energy + + beam_size_vertical: float | None | Unset + if isinstance(self.beam_size_vertical, Unset): + beam_size_vertical = UNSET + else: + beam_size_vertical = self.beam_size_vertical + + beam_size_horizontal: float | None | Unset + if isinstance(self.beam_size_horizontal, Unset): + beam_size_horizontal = UNSET + else: + beam_size_horizontal = self.beam_size_horizontal + + crystal_class: None | str | Unset + if isinstance(self.crystal_class, Unset): + crystal_class = UNSET + else: + crystal_class = self.crystal_class + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + bl_sub_sample_id: int | None | Unset + if isinstance(self.bl_sub_sample_id, Unset): + bl_sub_sample_id = UNSET + else: + bl_sub_sample_id = self.bl_sub_sample_id + + flux: float | None | Unset + if isinstance(self.flux, Unset): + flux = UNSET + else: + flux = self.flux + + flux_end: float | None | Unset + if isinstance(self.flux_end, Unset): + flux_end = UNSET + else: + flux_end = self.flux_end + + working_directory: None | str | Unset + if isinstance(self.working_directory, Unset): + working_directory = UNSET + else: + working_directory = self.working_directory + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "sessionId": session_id, + "xfeFluorescenceSpectrumId": xfe_fluorescence_spectrum_id, + } + ) + if start_time is not UNSET: + field_dict["startTime"] = start_time + if end_time is not UNSET: + field_dict["endTime"] = end_time + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if jpeg_scan_file_full_path is not UNSET: + field_dict["jpegScanFileFullPath"] = jpeg_scan_file_full_path + if filename is not UNSET: + field_dict["filename"] = filename + if exposure_time is not UNSET: + field_dict["exposureTime"] = exposure_time + if axis_position is not UNSET: + field_dict["axisPosition"] = axis_position + if beam_transmission is not UNSET: + field_dict["beamTransmission"] = beam_transmission + if annotated_pymca_xfe_spectrum is not UNSET: + field_dict["annotatedPymcaXfeSpectrum"] = annotated_pymca_xfe_spectrum + if fitted_data_file_full_path is not UNSET: + field_dict["fittedDataFileFullPath"] = fitted_data_file_full_path + if scan_file_full_path is not UNSET: + field_dict["scanFileFullPath"] = scan_file_full_path + if energy is not UNSET: + field_dict["energy"] = energy + if beam_size_vertical is not UNSET: + field_dict["beamSizeVertical"] = beam_size_vertical + if beam_size_horizontal is not UNSET: + field_dict["beamSizeHorizontal"] = beam_size_horizontal + if crystal_class is not UNSET: + field_dict["crystalClass"] = crystal_class + if comments is not UNSET: + field_dict["comments"] = comments + if bl_sub_sample_id is not UNSET: + field_dict["blSubSampleId"] = bl_sub_sample_id + if flux is not UNSET: + field_dict["flux"] = flux + if flux_end is not UNSET: + field_dict["fluxEnd"] = flux_end + if working_directory is not UNSET: + field_dict["workingDirectory"] = working_directory + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_id = d.pop("sessionId") + + xfe_fluorescence_spectrum_id = d.pop("xfeFluorescenceSpectrumId") + + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = datetime.datetime.fromisoformat(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_time = _parse_start_time(d.pop("startTime", UNSET)) + + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = datetime.datetime.fromisoformat(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_time = _parse_end_time(d.pop("endTime", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_jpeg_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + jpeg_scan_file_full_path = _parse_jpeg_scan_file_full_path(d.pop("jpegScanFileFullPath", UNSET)) + + def _parse_filename(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + filename = _parse_filename(d.pop("filename", UNSET)) + + def _parse_exposure_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + exposure_time = _parse_exposure_time(d.pop("exposureTime", UNSET)) + + def _parse_axis_position(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + axis_position = _parse_axis_position(d.pop("axisPosition", UNSET)) + + def _parse_beam_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_transmission = _parse_beam_transmission(d.pop("beamTransmission", UNSET)) + + def _parse_annotated_pymca_xfe_spectrum(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + annotated_pymca_xfe_spectrum = _parse_annotated_pymca_xfe_spectrum(d.pop("annotatedPymcaXfeSpectrum", UNSET)) + + def _parse_fitted_data_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fitted_data_file_full_path = _parse_fitted_data_file_full_path(d.pop("fittedDataFileFullPath", UNSET)) + + def _parse_scan_file_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + scan_file_full_path = _parse_scan_file_full_path(d.pop("scanFileFullPath", UNSET)) + + def _parse_energy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + energy = _parse_energy(d.pop("energy", UNSET)) + + def _parse_beam_size_vertical(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_vertical = _parse_beam_size_vertical(d.pop("beamSizeVertical", UNSET)) + + def _parse_beam_size_horizontal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_size_horizontal = _parse_beam_size_horizontal(d.pop("beamSizeHorizontal", UNSET)) + + def _parse_crystal_class(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + crystal_class = _parse_crystal_class(d.pop("crystalClass", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_bl_sub_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sub_sample_id = _parse_bl_sub_sample_id(d.pop("blSubSampleId", UNSET)) + + def _parse_flux(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux = _parse_flux(d.pop("flux", UNSET)) + + def _parse_flux_end(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + flux_end = _parse_flux_end(d.pop("fluxEnd", UNSET)) + + def _parse_working_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + working_directory = _parse_working_directory(d.pop("workingDirectory", UNSET)) + + fluorescence_spectrum_out = cls( + session_id=session_id, + xfe_fluorescence_spectrum_id=xfe_fluorescence_spectrum_id, + start_time=start_time, + end_time=end_time, + sample_id=sample_id, + jpeg_scan_file_full_path=jpeg_scan_file_full_path, + filename=filename, + exposure_time=exposure_time, + axis_position=axis_position, + beam_transmission=beam_transmission, + annotated_pymca_xfe_spectrum=annotated_pymca_xfe_spectrum, + fitted_data_file_full_path=fitted_data_file_full_path, + scan_file_full_path=scan_file_full_path, + energy=energy, + beam_size_vertical=beam_size_vertical, + beam_size_horizontal=beam_size_horizontal, + crystal_class=crystal_class, + comments=comments, + bl_sub_sample_id=bl_sub_sample_id, + flux=flux, + flux_end=flux_end, + working_directory=working_directory, + ) + + fluorescence_spectrum_out.additional_properties = d + return fluorescence_spectrum_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/foil_hole_in.py b/src/lims_utils/expeye_client/models/foil_hole_in.py new file mode 100644 index 0000000..c5f9b3e --- /dev/null +++ b/src/lims_utils/expeye_client/models/foil_hole_in.py @@ -0,0 +1,204 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FoilHoleIn") + + +@_attrs_define +class FoilHoleIn: + """ + Attributes: + foil_hole_label (str): + foil_hole_image (None | str | Unset): + pixel_location_x (int | None | Unset): + pixel_location_y (int | None | Unset): + diameter (int | None | Unset): + stage_location_x (float | None | Unset): + stage_location_y (float | None | Unset): + quality_indicator (float | None | Unset): + pixel_size (float | None | Unset): + """ + + foil_hole_label: str + foil_hole_image: None | str | Unset = UNSET + pixel_location_x: int | None | Unset = UNSET + pixel_location_y: int | None | Unset = UNSET + diameter: int | None | Unset = UNSET + stage_location_x: float | None | Unset = UNSET + stage_location_y: float | None | Unset = UNSET + quality_indicator: float | None | Unset = UNSET + pixel_size: float | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + foil_hole_label = self.foil_hole_label + + foil_hole_image: None | str | Unset + if isinstance(self.foil_hole_image, Unset): + foil_hole_image = UNSET + else: + foil_hole_image = self.foil_hole_image + + pixel_location_x: int | None | Unset + if isinstance(self.pixel_location_x, Unset): + pixel_location_x = UNSET + else: + pixel_location_x = self.pixel_location_x + + pixel_location_y: int | None | Unset + if isinstance(self.pixel_location_y, Unset): + pixel_location_y = UNSET + else: + pixel_location_y = self.pixel_location_y + + diameter: int | None | Unset + if isinstance(self.diameter, Unset): + diameter = UNSET + else: + diameter = self.diameter + + stage_location_x: float | None | Unset + if isinstance(self.stage_location_x, Unset): + stage_location_x = UNSET + else: + stage_location_x = self.stage_location_x + + stage_location_y: float | None | Unset + if isinstance(self.stage_location_y, Unset): + stage_location_y = UNSET + else: + stage_location_y = self.stage_location_y + + quality_indicator: float | None | Unset + if isinstance(self.quality_indicator, Unset): + quality_indicator = UNSET + else: + quality_indicator = self.quality_indicator + + pixel_size: float | None | Unset + if isinstance(self.pixel_size, Unset): + pixel_size = UNSET + else: + pixel_size = self.pixel_size + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "foilHoleLabel": foil_hole_label, + } + ) + if foil_hole_image is not UNSET: + field_dict["foilHoleImage"] = foil_hole_image + if pixel_location_x is not UNSET: + field_dict["pixelLocationX"] = pixel_location_x + if pixel_location_y is not UNSET: + field_dict["pixelLocationY"] = pixel_location_y + if diameter is not UNSET: + field_dict["diameter"] = diameter + if stage_location_x is not UNSET: + field_dict["stageLocationX"] = stage_location_x + if stage_location_y is not UNSET: + field_dict["stageLocationY"] = stage_location_y + if quality_indicator is not UNSET: + field_dict["qualityIndicator"] = quality_indicator + if pixel_size is not UNSET: + field_dict["pixelSize"] = pixel_size + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + foil_hole_label = d.pop("foilHoleLabel") + + def _parse_foil_hole_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + foil_hole_image = _parse_foil_hole_image(d.pop("foilHoleImage", UNSET)) + + def _parse_pixel_location_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_x = _parse_pixel_location_x(d.pop("pixelLocationX", UNSET)) + + def _parse_pixel_location_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_y = _parse_pixel_location_y(d.pop("pixelLocationY", UNSET)) + + def _parse_diameter(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diameter = _parse_diameter(d.pop("diameter", UNSET)) + + def _parse_stage_location_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_location_x = _parse_stage_location_x(d.pop("stageLocationX", UNSET)) + + def _parse_stage_location_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_location_y = _parse_stage_location_y(d.pop("stageLocationY", UNSET)) + + def _parse_quality_indicator(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + quality_indicator = _parse_quality_indicator(d.pop("qualityIndicator", UNSET)) + + def _parse_pixel_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size = _parse_pixel_size(d.pop("pixelSize", UNSET)) + + foil_hole_in = cls( + foil_hole_label=foil_hole_label, + foil_hole_image=foil_hole_image, + pixel_location_x=pixel_location_x, + pixel_location_y=pixel_location_y, + diameter=diameter, + stage_location_x=stage_location_x, + stage_location_y=stage_location_y, + quality_indicator=quality_indicator, + pixel_size=pixel_size, + ) + + return foil_hole_in diff --git a/src/lims_utils/expeye_client/models/foil_hole_optional_with_id.py b/src/lims_utils/expeye_client/models/foil_hole_optional_with_id.py new file mode 100644 index 0000000..b016294 --- /dev/null +++ b/src/lims_utils/expeye_client/models/foil_hole_optional_with_id.py @@ -0,0 +1,224 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FoilHoleOptionalWithId") + + +@_attrs_define +class FoilHoleOptionalWithId: + """ + Attributes: + foil_hole_id (int): + foil_hole_image (None | str | Unset): + pixel_location_x (int | None | Unset): + pixel_location_y (int | None | Unset): + diameter (int | None | Unset): + stage_location_x (float | None | Unset): + stage_location_y (float | None | Unset): + quality_indicator (float | None | Unset): + pixel_size (float | None | Unset): + foil_hole_label (None | str | Unset): + """ + + foil_hole_id: int + foil_hole_image: None | str | Unset = UNSET + pixel_location_x: int | None | Unset = UNSET + pixel_location_y: int | None | Unset = UNSET + diameter: int | None | Unset = UNSET + stage_location_x: float | None | Unset = UNSET + stage_location_y: float | None | Unset = UNSET + quality_indicator: float | None | Unset = UNSET + pixel_size: float | None | Unset = UNSET + foil_hole_label: None | str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + foil_hole_id = self.foil_hole_id + + foil_hole_image: None | str | Unset + if isinstance(self.foil_hole_image, Unset): + foil_hole_image = UNSET + else: + foil_hole_image = self.foil_hole_image + + pixel_location_x: int | None | Unset + if isinstance(self.pixel_location_x, Unset): + pixel_location_x = UNSET + else: + pixel_location_x = self.pixel_location_x + + pixel_location_y: int | None | Unset + if isinstance(self.pixel_location_y, Unset): + pixel_location_y = UNSET + else: + pixel_location_y = self.pixel_location_y + + diameter: int | None | Unset + if isinstance(self.diameter, Unset): + diameter = UNSET + else: + diameter = self.diameter + + stage_location_x: float | None | Unset + if isinstance(self.stage_location_x, Unset): + stage_location_x = UNSET + else: + stage_location_x = self.stage_location_x + + stage_location_y: float | None | Unset + if isinstance(self.stage_location_y, Unset): + stage_location_y = UNSET + else: + stage_location_y = self.stage_location_y + + quality_indicator: float | None | Unset + if isinstance(self.quality_indicator, Unset): + quality_indicator = UNSET + else: + quality_indicator = self.quality_indicator + + pixel_size: float | None | Unset + if isinstance(self.pixel_size, Unset): + pixel_size = UNSET + else: + pixel_size = self.pixel_size + + foil_hole_label: None | str | Unset + if isinstance(self.foil_hole_label, Unset): + foil_hole_label = UNSET + else: + foil_hole_label = self.foil_hole_label + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "foilHoleId": foil_hole_id, + } + ) + if foil_hole_image is not UNSET: + field_dict["foilHoleImage"] = foil_hole_image + if pixel_location_x is not UNSET: + field_dict["pixelLocationX"] = pixel_location_x + if pixel_location_y is not UNSET: + field_dict["pixelLocationY"] = pixel_location_y + if diameter is not UNSET: + field_dict["diameter"] = diameter + if stage_location_x is not UNSET: + field_dict["stageLocationX"] = stage_location_x + if stage_location_y is not UNSET: + field_dict["stageLocationY"] = stage_location_y + if quality_indicator is not UNSET: + field_dict["qualityIndicator"] = quality_indicator + if pixel_size is not UNSET: + field_dict["pixelSize"] = pixel_size + if foil_hole_label is not UNSET: + field_dict["foilHoleLabel"] = foil_hole_label + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + foil_hole_id = d.pop("foilHoleId") + + def _parse_foil_hole_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + foil_hole_image = _parse_foil_hole_image(d.pop("foilHoleImage", UNSET)) + + def _parse_pixel_location_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_x = _parse_pixel_location_x(d.pop("pixelLocationX", UNSET)) + + def _parse_pixel_location_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_y = _parse_pixel_location_y(d.pop("pixelLocationY", UNSET)) + + def _parse_diameter(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diameter = _parse_diameter(d.pop("diameter", UNSET)) + + def _parse_stage_location_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_location_x = _parse_stage_location_x(d.pop("stageLocationX", UNSET)) + + def _parse_stage_location_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_location_y = _parse_stage_location_y(d.pop("stageLocationY", UNSET)) + + def _parse_quality_indicator(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + quality_indicator = _parse_quality_indicator(d.pop("qualityIndicator", UNSET)) + + def _parse_pixel_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size = _parse_pixel_size(d.pop("pixelSize", UNSET)) + + def _parse_foil_hole_label(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + foil_hole_label = _parse_foil_hole_label(d.pop("foilHoleLabel", UNSET)) + + foil_hole_optional_with_id = cls( + foil_hole_id=foil_hole_id, + foil_hole_image=foil_hole_image, + pixel_location_x=pixel_location_x, + pixel_location_y=pixel_location_y, + diameter=diameter, + stage_location_x=stage_location_x, + stage_location_y=stage_location_y, + quality_indicator=quality_indicator, + pixel_size=pixel_size, + foil_hole_label=foil_hole_label, + ) + + return foil_hole_optional_with_id diff --git a/src/lims_utils/expeye_client/models/foil_hole_out.py b/src/lims_utils/expeye_client/models/foil_hole_out.py new file mode 100644 index 0000000..4bf33a7 --- /dev/null +++ b/src/lims_utils/expeye_client/models/foil_hole_out.py @@ -0,0 +1,324 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FoilHoleOut") + + +@_attrs_define +class FoilHoleOut: + """ + Attributes: + foil_hole_label (str): + foil_hole_image (None | str | Unset): + pixel_location_x (int | None | Unset): + pixel_location_y (int | None | Unset): + diameter (int | None | Unset): + stage_location_x (float | None | Unset): + stage_location_y (float | None | Unset): + quality_indicator (float | None | Unset): + pixel_size (float | None | Unset): + foil_hole_id (int | None | Unset): + grid_square_id (int | None | Unset): + movie_count (int | None | Unset): Default: 0. + particle_count (float | None | Unset): + resolution (float | None | Unset): + astigmatism (float | None | Unset): + """ + + foil_hole_label: str + foil_hole_image: None | str | Unset = UNSET + pixel_location_x: int | None | Unset = UNSET + pixel_location_y: int | None | Unset = UNSET + diameter: int | None | Unset = UNSET + stage_location_x: float | None | Unset = UNSET + stage_location_y: float | None | Unset = UNSET + quality_indicator: float | None | Unset = UNSET + pixel_size: float | None | Unset = UNSET + foil_hole_id: int | None | Unset = UNSET + grid_square_id: int | None | Unset = UNSET + movie_count: int | None | Unset = 0 + particle_count: float | None | Unset = UNSET + resolution: float | None | Unset = UNSET + astigmatism: float | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + foil_hole_label = self.foil_hole_label + + foil_hole_image: None | str | Unset + if isinstance(self.foil_hole_image, Unset): + foil_hole_image = UNSET + else: + foil_hole_image = self.foil_hole_image + + pixel_location_x: int | None | Unset + if isinstance(self.pixel_location_x, Unset): + pixel_location_x = UNSET + else: + pixel_location_x = self.pixel_location_x + + pixel_location_y: int | None | Unset + if isinstance(self.pixel_location_y, Unset): + pixel_location_y = UNSET + else: + pixel_location_y = self.pixel_location_y + + diameter: int | None | Unset + if isinstance(self.diameter, Unset): + diameter = UNSET + else: + diameter = self.diameter + + stage_location_x: float | None | Unset + if isinstance(self.stage_location_x, Unset): + stage_location_x = UNSET + else: + stage_location_x = self.stage_location_x + + stage_location_y: float | None | Unset + if isinstance(self.stage_location_y, Unset): + stage_location_y = UNSET + else: + stage_location_y = self.stage_location_y + + quality_indicator: float | None | Unset + if isinstance(self.quality_indicator, Unset): + quality_indicator = UNSET + else: + quality_indicator = self.quality_indicator + + pixel_size: float | None | Unset + if isinstance(self.pixel_size, Unset): + pixel_size = UNSET + else: + pixel_size = self.pixel_size + + foil_hole_id: int | None | Unset + if isinstance(self.foil_hole_id, Unset): + foil_hole_id = UNSET + else: + foil_hole_id = self.foil_hole_id + + grid_square_id: int | None | Unset + if isinstance(self.grid_square_id, Unset): + grid_square_id = UNSET + else: + grid_square_id = self.grid_square_id + + movie_count: int | None | Unset + if isinstance(self.movie_count, Unset): + movie_count = UNSET + else: + movie_count = self.movie_count + + particle_count: float | None | Unset + if isinstance(self.particle_count, Unset): + particle_count = UNSET + else: + particle_count = self.particle_count + + resolution: float | None | Unset + if isinstance(self.resolution, Unset): + resolution = UNSET + else: + resolution = self.resolution + + astigmatism: float | None | Unset + if isinstance(self.astigmatism, Unset): + astigmatism = UNSET + else: + astigmatism = self.astigmatism + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "foilHoleLabel": foil_hole_label, + } + ) + if foil_hole_image is not UNSET: + field_dict["foilHoleImage"] = foil_hole_image + if pixel_location_x is not UNSET: + field_dict["pixelLocationX"] = pixel_location_x + if pixel_location_y is not UNSET: + field_dict["pixelLocationY"] = pixel_location_y + if diameter is not UNSET: + field_dict["diameter"] = diameter + if stage_location_x is not UNSET: + field_dict["stageLocationX"] = stage_location_x + if stage_location_y is not UNSET: + field_dict["stageLocationY"] = stage_location_y + if quality_indicator is not UNSET: + field_dict["qualityIndicator"] = quality_indicator + if pixel_size is not UNSET: + field_dict["pixelSize"] = pixel_size + if foil_hole_id is not UNSET: + field_dict["foilHoleId"] = foil_hole_id + if grid_square_id is not UNSET: + field_dict["gridSquareId"] = grid_square_id + if movie_count is not UNSET: + field_dict["movieCount"] = movie_count + if particle_count is not UNSET: + field_dict["particleCount"] = particle_count + if resolution is not UNSET: + field_dict["resolution"] = resolution + if astigmatism is not UNSET: + field_dict["astigmatism"] = astigmatism + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + foil_hole_label = d.pop("foilHoleLabel") + + def _parse_foil_hole_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + foil_hole_image = _parse_foil_hole_image(d.pop("foilHoleImage", UNSET)) + + def _parse_pixel_location_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_x = _parse_pixel_location_x(d.pop("pixelLocationX", UNSET)) + + def _parse_pixel_location_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_y = _parse_pixel_location_y(d.pop("pixelLocationY", UNSET)) + + def _parse_diameter(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diameter = _parse_diameter(d.pop("diameter", UNSET)) + + def _parse_stage_location_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_location_x = _parse_stage_location_x(d.pop("stageLocationX", UNSET)) + + def _parse_stage_location_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_location_y = _parse_stage_location_y(d.pop("stageLocationY", UNSET)) + + def _parse_quality_indicator(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + quality_indicator = _parse_quality_indicator(d.pop("qualityIndicator", UNSET)) + + def _parse_pixel_size(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_size = _parse_pixel_size(d.pop("pixelSize", UNSET)) + + def _parse_foil_hole_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + foil_hole_id = _parse_foil_hole_id(d.pop("foilHoleId", UNSET)) + + def _parse_grid_square_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + grid_square_id = _parse_grid_square_id(d.pop("gridSquareId", UNSET)) + + def _parse_movie_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + movie_count = _parse_movie_count(d.pop("movieCount", UNSET)) + + def _parse_particle_count(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + particle_count = _parse_particle_count(d.pop("particleCount", UNSET)) + + def _parse_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution = _parse_resolution(d.pop("resolution", UNSET)) + + def _parse_astigmatism(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + astigmatism = _parse_astigmatism(d.pop("astigmatism", UNSET)) + + foil_hole_out = cls( + foil_hole_label=foil_hole_label, + foil_hole_image=foil_hole_image, + pixel_location_x=pixel_location_x, + pixel_location_y=pixel_location_y, + diameter=diameter, + stage_location_x=stage_location_x, + stage_location_y=stage_location_y, + quality_indicator=quality_indicator, + pixel_size=pixel_size, + foil_hole_id=foil_hole_id, + grid_square_id=grid_square_id, + movie_count=movie_count, + particle_count=particle_count, + resolution=resolution, + astigmatism=astigmatism, + ) + + return foil_hole_out diff --git a/src/lims_utils/expeye_client/models/full_movie_optional.py b/src/lims_utils/expeye_client/models/full_movie_optional.py new file mode 100644 index 0000000..82cdf93 --- /dev/null +++ b/src/lims_utils/expeye_client/models/full_movie_optional.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.ctf_base import CTFBase + from ..models.motion_correction_optional import MotionCorrectionOptional + from ..models.movie_optional import MovieOptional + from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional + + +T = TypeVar("T", bound="FullMovieOptional") + + +@_attrs_define +class FullMovieOptional: + """ + Attributes: + movie (MovieOptional | Unset): + motion_correction (MotionCorrectionOptional | Unset): + ctf (CTFBase | Unset): + tilt_image_alignment (None | TiltImageAlignmentOptional | Unset): + """ + + movie: MovieOptional | Unset = UNSET + motion_correction: MotionCorrectionOptional | Unset = UNSET + ctf: CTFBase | Unset = UNSET + tilt_image_alignment: None | TiltImageAlignmentOptional | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional # noqa: PLC0415 + + movie: dict[str, Any] | Unset = UNSET + if not isinstance(self.movie, Unset): + movie = self.movie.to_dict() + + motion_correction: dict[str, Any] | Unset = UNSET + if not isinstance(self.motion_correction, Unset): + motion_correction = self.motion_correction.to_dict() + + ctf: dict[str, Any] | Unset = UNSET + if not isinstance(self.ctf, Unset): + ctf = self.ctf.to_dict() + + tilt_image_alignment: dict[str, Any] | None | Unset + if isinstance(self.tilt_image_alignment, Unset): + tilt_image_alignment = UNSET + elif isinstance(self.tilt_image_alignment, TiltImageAlignmentOptional): + tilt_image_alignment = self.tilt_image_alignment.to_dict() + else: + tilt_image_alignment = self.tilt_image_alignment + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if movie is not UNSET: + field_dict["movie"] = movie + if motion_correction is not UNSET: + field_dict["motionCorrection"] = motion_correction + if ctf is not UNSET: + field_dict["CTF"] = ctf + if tilt_image_alignment is not UNSET: + field_dict["tiltImageAlignment"] = tilt_image_alignment + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ctf_base import CTFBase # noqa: PLC0415 + from ..models.motion_correction_optional import MotionCorrectionOptional # noqa: PLC0415 + from ..models.movie_optional import MovieOptional # noqa: PLC0415 + from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional # noqa: PLC0415 + + d = dict(src_dict) + _movie = d.pop("movie", UNSET) + movie: MovieOptional | Unset + if isinstance(_movie, Unset): + movie = UNSET + else: + movie = MovieOptional.from_dict(_movie) + + _motion_correction = d.pop("motionCorrection", UNSET) + motion_correction: MotionCorrectionOptional | Unset + if isinstance(_motion_correction, Unset): + motion_correction = UNSET + else: + motion_correction = MotionCorrectionOptional.from_dict(_motion_correction) + + _ctf = d.pop("CTF", UNSET) + ctf: CTFBase | Unset + if isinstance(_ctf, Unset): + ctf = UNSET + else: + ctf = CTFBase.from_dict(_ctf) + + def _parse_tilt_image_alignment(data: object) -> None | TiltImageAlignmentOptional | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + tilt_image_alignment_type_0 = TiltImageAlignmentOptional.from_dict(data) + + return tilt_image_alignment_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | TiltImageAlignmentOptional | Unset, data) + + tilt_image_alignment = _parse_tilt_image_alignment(d.pop("tiltImageAlignment", UNSET)) + + full_movie_optional = cls( + movie=movie, + motion_correction=motion_correction, + ctf=ctf, + tilt_image_alignment=tilt_image_alignment, + ) + + return full_movie_optional diff --git a/src/lims_utils/expeye_client/models/full_movie_out.py b/src/lims_utils/expeye_client/models/full_movie_out.py new file mode 100644 index 0000000..0633adc --- /dev/null +++ b/src/lims_utils/expeye_client/models/full_movie_out.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define + +if TYPE_CHECKING: + from ..models.ctf_out import CTFOut + from ..models.motion_correction_out import MotionCorrectionOut + from ..models.movie_out import MovieOut + from ..models.tilt_image_alignment_out import TiltImageAlignmentOut + + +T = TypeVar("T", bound="FullMovieOut") + + +@_attrs_define +class FullMovieOut: + """ + Attributes: + ctf (CTFOut): + movie (MovieOut): + motion_correction (MotionCorrectionOut): + tilt_image_alignment (None | TiltImageAlignmentOut): + """ + + ctf: CTFOut + movie: MovieOut + motion_correction: MotionCorrectionOut + tilt_image_alignment: None | TiltImageAlignmentOut + + def to_dict(self) -> dict[str, Any]: + from ..models.tilt_image_alignment_out import TiltImageAlignmentOut # noqa: PLC0415 + + ctf = self.ctf.to_dict() + + movie = self.movie.to_dict() + + motion_correction = self.motion_correction.to_dict() + + tilt_image_alignment: dict[str, Any] | None + if isinstance(self.tilt_image_alignment, TiltImageAlignmentOut): + tilt_image_alignment = self.tilt_image_alignment.to_dict() + else: + tilt_image_alignment = self.tilt_image_alignment + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "CTF": ctf, + "movie": movie, + "motionCorrection": motion_correction, + "tiltImageAlignment": tilt_image_alignment, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ctf_out import CTFOut # noqa: PLC0415 + from ..models.motion_correction_out import MotionCorrectionOut # noqa: PLC0415 + from ..models.movie_out import MovieOut # noqa: PLC0415 + from ..models.tilt_image_alignment_out import TiltImageAlignmentOut # noqa: PLC0415 + + d = dict(src_dict) + ctf = CTFOut.from_dict(d.pop("CTF")) + + movie = MovieOut.from_dict(d.pop("movie")) + + motion_correction = MotionCorrectionOut.from_dict(d.pop("motionCorrection")) + + def _parse_tilt_image_alignment(data: object) -> None | TiltImageAlignmentOut: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + tilt_image_alignment_type_0 = TiltImageAlignmentOut.from_dict(data) + + return tilt_image_alignment_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | TiltImageAlignmentOut, data) + + tilt_image_alignment = _parse_tilt_image_alignment(d.pop("tiltImageAlignment")) + + full_movie_out = cls( + ctf=ctf, + movie=movie, + motion_correction=motion_correction, + tilt_image_alignment=tilt_image_alignment, + ) + + return full_movie_out diff --git a/src/lims_utils/expeye_client/models/get_tomograms_for_dcg_data_groups_group_id_tomograms_get_sort_by_type_0.py b/src/lims_utils/expeye_client/models/get_tomograms_for_dcg_data_groups_group_id_tomograms_get_sort_by_type_0.py new file mode 100644 index 0000000..a03c427 --- /dev/null +++ b/src/lims_utils/expeye_client/models/get_tomograms_for_dcg_data_groups_group_id_tomograms_get_sort_by_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class GetTomogramsForDcgDataGroupsGroupIdTomogramsGetSortByType0(StrEnum): + DATE = "date" + GLOBALALIGNMENTQUALITY = "globalAlignmentQuality" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/grid_info_in.py b/src/lims_utils/expeye_client/models/grid_info_in.py new file mode 100644 index 0000000..a7fcdbc --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_info_in.py @@ -0,0 +1,435 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.grid_info_in_orientation_type_0 import GridInfoInOrientationType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GridInfoIn") + + +@_attrs_define +class GridInfoIn: + """ + Attributes: + x_offset (float | None | Unset): + y_offset (float | None | Unset): + snapshot_offset_x_pixel (float | None | Unset): + snapshot_offset_y_pixel (float | None | Unset): + dx (float | None | Unset): + dy (float | None | Unset): + steps_x (float | None | Unset): + steps_y (float | None | Unset): + mesh_angle (float | None | Unset): + record_time_stamp (datetime.datetime | None | Unset): + workflow_mesh_id (int | None | Unset): + orientation (GridInfoInOrientationType0 | None | Unset): + data_collection_group_id (int | None | Unset): + microns_per_pixel_x (float | None | Unset): + microns_per_pixel_y (float | None | Unset): + snaked (bool | None | Unset): + patches_x (int | None | Unset): + patches_y (int | None | Unset): + """ + + x_offset: float | None | Unset = UNSET + y_offset: float | None | Unset = UNSET + snapshot_offset_x_pixel: float | None | Unset = UNSET + snapshot_offset_y_pixel: float | None | Unset = UNSET + dx: float | None | Unset = UNSET + dy: float | None | Unset = UNSET + steps_x: float | None | Unset = UNSET + steps_y: float | None | Unset = UNSET + mesh_angle: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + workflow_mesh_id: int | None | Unset = UNSET + orientation: GridInfoInOrientationType0 | None | Unset = UNSET + data_collection_group_id: int | None | Unset = UNSET + microns_per_pixel_x: float | None | Unset = UNSET + microns_per_pixel_y: float | None | Unset = UNSET + snaked: bool | None | Unset = UNSET + patches_x: int | None | Unset = UNSET + patches_y: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + x_offset: float | None | Unset + if isinstance(self.x_offset, Unset): + x_offset = UNSET + else: + x_offset = self.x_offset + + y_offset: float | None | Unset + if isinstance(self.y_offset, Unset): + y_offset = UNSET + else: + y_offset = self.y_offset + + snapshot_offset_x_pixel: float | None | Unset + if isinstance(self.snapshot_offset_x_pixel, Unset): + snapshot_offset_x_pixel = UNSET + else: + snapshot_offset_x_pixel = self.snapshot_offset_x_pixel + + snapshot_offset_y_pixel: float | None | Unset + if isinstance(self.snapshot_offset_y_pixel, Unset): + snapshot_offset_y_pixel = UNSET + else: + snapshot_offset_y_pixel = self.snapshot_offset_y_pixel + + dx: float | None | Unset + if isinstance(self.dx, Unset): + dx = UNSET + else: + dx = self.dx + + dy: float | None | Unset + if isinstance(self.dy, Unset): + dy = UNSET + else: + dy = self.dy + + steps_x: float | None | Unset + if isinstance(self.steps_x, Unset): + steps_x = UNSET + else: + steps_x = self.steps_x + + steps_y: float | None | Unset + if isinstance(self.steps_y, Unset): + steps_y = UNSET + else: + steps_y = self.steps_y + + mesh_angle: float | None | Unset + if isinstance(self.mesh_angle, Unset): + mesh_angle = UNSET + else: + mesh_angle = self.mesh_angle + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + workflow_mesh_id: int | None | Unset + if isinstance(self.workflow_mesh_id, Unset): + workflow_mesh_id = UNSET + else: + workflow_mesh_id = self.workflow_mesh_id + + orientation: None | str | Unset + if isinstance(self.orientation, Unset): + orientation = UNSET + elif isinstance(self.orientation, GridInfoInOrientationType0): + orientation = self.orientation.value + else: + orientation = self.orientation + + data_collection_group_id: int | None | Unset + if isinstance(self.data_collection_group_id, Unset): + data_collection_group_id = UNSET + else: + data_collection_group_id = self.data_collection_group_id + + microns_per_pixel_x: float | None | Unset + if isinstance(self.microns_per_pixel_x, Unset): + microns_per_pixel_x = UNSET + else: + microns_per_pixel_x = self.microns_per_pixel_x + + microns_per_pixel_y: float | None | Unset + if isinstance(self.microns_per_pixel_y, Unset): + microns_per_pixel_y = UNSET + else: + microns_per_pixel_y = self.microns_per_pixel_y + + snaked: bool | None | Unset + if isinstance(self.snaked, Unset): + snaked = UNSET + else: + snaked = self.snaked + + patches_x: int | None | Unset + if isinstance(self.patches_x, Unset): + patches_x = UNSET + else: + patches_x = self.patches_x + + patches_y: int | None | Unset + if isinstance(self.patches_y, Unset): + patches_y = UNSET + else: + patches_y = self.patches_y + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x_offset is not UNSET: + field_dict["xOffset"] = x_offset + if y_offset is not UNSET: + field_dict["yOffset"] = y_offset + if snapshot_offset_x_pixel is not UNSET: + field_dict["snapshotOffsetXPixel"] = snapshot_offset_x_pixel + if snapshot_offset_y_pixel is not UNSET: + field_dict["snapshotOffsetYPixel"] = snapshot_offset_y_pixel + if dx is not UNSET: + field_dict["dx"] = dx + if dy is not UNSET: + field_dict["dy"] = dy + if steps_x is not UNSET: + field_dict["stepsX"] = steps_x + if steps_y is not UNSET: + field_dict["stepsY"] = steps_y + if mesh_angle is not UNSET: + field_dict["meshAngle"] = mesh_angle + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if workflow_mesh_id is not UNSET: + field_dict["workflowMeshId"] = workflow_mesh_id + if orientation is not UNSET: + field_dict["orientation"] = orientation + if data_collection_group_id is not UNSET: + field_dict["dataCollectionGroupId"] = data_collection_group_id + if microns_per_pixel_x is not UNSET: + field_dict["micronsPerPixelX"] = microns_per_pixel_x + if microns_per_pixel_y is not UNSET: + field_dict["micronsPerPixelY"] = microns_per_pixel_y + if snaked is not UNSET: + field_dict["snaked"] = snaked + if patches_x is not UNSET: + field_dict["patchesX"] = patches_x + if patches_y is not UNSET: + field_dict["patchesY"] = patches_y + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_x_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_offset = _parse_x_offset(d.pop("xOffset", UNSET)) + + def _parse_y_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y_offset = _parse_y_offset(d.pop("yOffset", UNSET)) + + def _parse_snapshot_offset_x_pixel(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + snapshot_offset_x_pixel = _parse_snapshot_offset_x_pixel(d.pop("snapshotOffsetXPixel", UNSET)) + + def _parse_snapshot_offset_y_pixel(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + snapshot_offset_y_pixel = _parse_snapshot_offset_y_pixel(d.pop("snapshotOffsetYPixel", UNSET)) + + def _parse_dx(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dx = _parse_dx(d.pop("dx", UNSET)) + + def _parse_dy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dy = _parse_dy(d.pop("dy", UNSET)) + + def _parse_steps_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + steps_x = _parse_steps_x(d.pop("stepsX", UNSET)) + + def _parse_steps_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + steps_y = _parse_steps_y(d.pop("stepsY", UNSET)) + + def _parse_mesh_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mesh_angle = _parse_mesh_angle(d.pop("meshAngle", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_workflow_mesh_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + workflow_mesh_id = _parse_workflow_mesh_id(d.pop("workflowMeshId", UNSET)) + + def _parse_orientation(data: object) -> GridInfoInOrientationType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + orientation_type_0 = GridInfoInOrientationType0(data) + + return orientation_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridInfoInOrientationType0 | None | Unset, data) + + orientation = _parse_orientation(d.pop("orientation", UNSET)) + + def _parse_data_collection_group_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_group_id = _parse_data_collection_group_id(d.pop("dataCollectionGroupId", UNSET)) + + def _parse_microns_per_pixel_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_x = _parse_microns_per_pixel_x(d.pop("micronsPerPixelX", UNSET)) + + def _parse_microns_per_pixel_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_y = _parse_microns_per_pixel_y(d.pop("micronsPerPixelY", UNSET)) + + def _parse_snaked(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + snaked = _parse_snaked(d.pop("snaked", UNSET)) + + def _parse_patches_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_x = _parse_patches_x(d.pop("patchesX", UNSET)) + + def _parse_patches_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_y = _parse_patches_y(d.pop("patchesY", UNSET)) + + grid_info_in = cls( + x_offset=x_offset, + y_offset=y_offset, + snapshot_offset_x_pixel=snapshot_offset_x_pixel, + snapshot_offset_y_pixel=snapshot_offset_y_pixel, + dx=dx, + dy=dy, + steps_x=steps_x, + steps_y=steps_y, + mesh_angle=mesh_angle, + record_time_stamp=record_time_stamp, + workflow_mesh_id=workflow_mesh_id, + orientation=orientation, + data_collection_group_id=data_collection_group_id, + microns_per_pixel_x=microns_per_pixel_x, + microns_per_pixel_y=microns_per_pixel_y, + snaked=snaked, + patches_x=patches_x, + patches_y=patches_y, + ) + + grid_info_in.additional_properties = d + return grid_info_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/grid_info_in_orientation_type_0.py b/src/lims_utils/expeye_client/models/grid_info_in_orientation_type_0.py new file mode 100644 index 0000000..a06b82c --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_info_in_orientation_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class GridInfoInOrientationType0(StrEnum): + HORIZONTAL = "horizontal" + VERTICAL = "vertical" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/grid_info_optional.py b/src/lims_utils/expeye_client/models/grid_info_optional.py new file mode 100644 index 0000000..2e93c2a --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_info_optional.py @@ -0,0 +1,455 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.grid_info_optional_orientation_type_0 import GridInfoOptionalOrientationType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GridInfoOptional") + + +@_attrs_define +class GridInfoOptional: + """ + Attributes: + x_offset (float | None | Unset): + y_offset (float | None | Unset): + snapshot_offset_x_pixel (float | None | Unset): + snapshot_offset_y_pixel (float | None | Unset): + dx (float | None | Unset): + dy (float | None | Unset): + steps_x (float | None | Unset): + steps_y (float | None | Unset): + mesh_angle (float | None | Unset): + record_time_stamp (datetime.datetime | None | Unset): + workflow_mesh_id (int | None | Unset): + orientation (GridInfoOptionalOrientationType0 | None | Unset): + data_collection_group_id (int | None | Unset): + microns_per_pixel_x (float | None | Unset): + microns_per_pixel_y (float | None | Unset): + snaked (bool | None | Unset): + patches_x (int | None | Unset): + patches_y (int | None | Unset): + data_collection_id (int | None | Unset): + """ + + x_offset: float | None | Unset = UNSET + y_offset: float | None | Unset = UNSET + snapshot_offset_x_pixel: float | None | Unset = UNSET + snapshot_offset_y_pixel: float | None | Unset = UNSET + dx: float | None | Unset = UNSET + dy: float | None | Unset = UNSET + steps_x: float | None | Unset = UNSET + steps_y: float | None | Unset = UNSET + mesh_angle: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + workflow_mesh_id: int | None | Unset = UNSET + orientation: GridInfoOptionalOrientationType0 | None | Unset = UNSET + data_collection_group_id: int | None | Unset = UNSET + microns_per_pixel_x: float | None | Unset = UNSET + microns_per_pixel_y: float | None | Unset = UNSET + snaked: bool | None | Unset = UNSET + patches_x: int | None | Unset = UNSET + patches_y: int | None | Unset = UNSET + data_collection_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + x_offset: float | None | Unset + if isinstance(self.x_offset, Unset): + x_offset = UNSET + else: + x_offset = self.x_offset + + y_offset: float | None | Unset + if isinstance(self.y_offset, Unset): + y_offset = UNSET + else: + y_offset = self.y_offset + + snapshot_offset_x_pixel: float | None | Unset + if isinstance(self.snapshot_offset_x_pixel, Unset): + snapshot_offset_x_pixel = UNSET + else: + snapshot_offset_x_pixel = self.snapshot_offset_x_pixel + + snapshot_offset_y_pixel: float | None | Unset + if isinstance(self.snapshot_offset_y_pixel, Unset): + snapshot_offset_y_pixel = UNSET + else: + snapshot_offset_y_pixel = self.snapshot_offset_y_pixel + + dx: float | None | Unset + if isinstance(self.dx, Unset): + dx = UNSET + else: + dx = self.dx + + dy: float | None | Unset + if isinstance(self.dy, Unset): + dy = UNSET + else: + dy = self.dy + + steps_x: float | None | Unset + if isinstance(self.steps_x, Unset): + steps_x = UNSET + else: + steps_x = self.steps_x + + steps_y: float | None | Unset + if isinstance(self.steps_y, Unset): + steps_y = UNSET + else: + steps_y = self.steps_y + + mesh_angle: float | None | Unset + if isinstance(self.mesh_angle, Unset): + mesh_angle = UNSET + else: + mesh_angle = self.mesh_angle + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + workflow_mesh_id: int | None | Unset + if isinstance(self.workflow_mesh_id, Unset): + workflow_mesh_id = UNSET + else: + workflow_mesh_id = self.workflow_mesh_id + + orientation: None | str | Unset + if isinstance(self.orientation, Unset): + orientation = UNSET + elif isinstance(self.orientation, GridInfoOptionalOrientationType0): + orientation = self.orientation.value + else: + orientation = self.orientation + + data_collection_group_id: int | None | Unset + if isinstance(self.data_collection_group_id, Unset): + data_collection_group_id = UNSET + else: + data_collection_group_id = self.data_collection_group_id + + microns_per_pixel_x: float | None | Unset + if isinstance(self.microns_per_pixel_x, Unset): + microns_per_pixel_x = UNSET + else: + microns_per_pixel_x = self.microns_per_pixel_x + + microns_per_pixel_y: float | None | Unset + if isinstance(self.microns_per_pixel_y, Unset): + microns_per_pixel_y = UNSET + else: + microns_per_pixel_y = self.microns_per_pixel_y + + snaked: bool | None | Unset + if isinstance(self.snaked, Unset): + snaked = UNSET + else: + snaked = self.snaked + + patches_x: int | None | Unset + if isinstance(self.patches_x, Unset): + patches_x = UNSET + else: + patches_x = self.patches_x + + patches_y: int | None | Unset + if isinstance(self.patches_y, Unset): + patches_y = UNSET + else: + patches_y = self.patches_y + + data_collection_id: int | None | Unset + if isinstance(self.data_collection_id, Unset): + data_collection_id = UNSET + else: + data_collection_id = self.data_collection_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x_offset is not UNSET: + field_dict["xOffset"] = x_offset + if y_offset is not UNSET: + field_dict["yOffset"] = y_offset + if snapshot_offset_x_pixel is not UNSET: + field_dict["snapshotOffsetXPixel"] = snapshot_offset_x_pixel + if snapshot_offset_y_pixel is not UNSET: + field_dict["snapshotOffsetYPixel"] = snapshot_offset_y_pixel + if dx is not UNSET: + field_dict["dx"] = dx + if dy is not UNSET: + field_dict["dy"] = dy + if steps_x is not UNSET: + field_dict["stepsX"] = steps_x + if steps_y is not UNSET: + field_dict["stepsY"] = steps_y + if mesh_angle is not UNSET: + field_dict["meshAngle"] = mesh_angle + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if workflow_mesh_id is not UNSET: + field_dict["workflowMeshId"] = workflow_mesh_id + if orientation is not UNSET: + field_dict["orientation"] = orientation + if data_collection_group_id is not UNSET: + field_dict["dataCollectionGroupId"] = data_collection_group_id + if microns_per_pixel_x is not UNSET: + field_dict["micronsPerPixelX"] = microns_per_pixel_x + if microns_per_pixel_y is not UNSET: + field_dict["micronsPerPixelY"] = microns_per_pixel_y + if snaked is not UNSET: + field_dict["snaked"] = snaked + if patches_x is not UNSET: + field_dict["patchesX"] = patches_x + if patches_y is not UNSET: + field_dict["patchesY"] = patches_y + if data_collection_id is not UNSET: + field_dict["dataCollectionId"] = data_collection_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_x_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_offset = _parse_x_offset(d.pop("xOffset", UNSET)) + + def _parse_y_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y_offset = _parse_y_offset(d.pop("yOffset", UNSET)) + + def _parse_snapshot_offset_x_pixel(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + snapshot_offset_x_pixel = _parse_snapshot_offset_x_pixel(d.pop("snapshotOffsetXPixel", UNSET)) + + def _parse_snapshot_offset_y_pixel(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + snapshot_offset_y_pixel = _parse_snapshot_offset_y_pixel(d.pop("snapshotOffsetYPixel", UNSET)) + + def _parse_dx(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dx = _parse_dx(d.pop("dx", UNSET)) + + def _parse_dy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dy = _parse_dy(d.pop("dy", UNSET)) + + def _parse_steps_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + steps_x = _parse_steps_x(d.pop("stepsX", UNSET)) + + def _parse_steps_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + steps_y = _parse_steps_y(d.pop("stepsY", UNSET)) + + def _parse_mesh_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mesh_angle = _parse_mesh_angle(d.pop("meshAngle", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_workflow_mesh_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + workflow_mesh_id = _parse_workflow_mesh_id(d.pop("workflowMeshId", UNSET)) + + def _parse_orientation(data: object) -> GridInfoOptionalOrientationType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + orientation_type_0 = GridInfoOptionalOrientationType0(data) + + return orientation_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridInfoOptionalOrientationType0 | None | Unset, data) + + orientation = _parse_orientation(d.pop("orientation", UNSET)) + + def _parse_data_collection_group_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_group_id = _parse_data_collection_group_id(d.pop("dataCollectionGroupId", UNSET)) + + def _parse_microns_per_pixel_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_x = _parse_microns_per_pixel_x(d.pop("micronsPerPixelX", UNSET)) + + def _parse_microns_per_pixel_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_y = _parse_microns_per_pixel_y(d.pop("micronsPerPixelY", UNSET)) + + def _parse_snaked(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + snaked = _parse_snaked(d.pop("snaked", UNSET)) + + def _parse_patches_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_x = _parse_patches_x(d.pop("patchesX", UNSET)) + + def _parse_patches_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_y = _parse_patches_y(d.pop("patchesY", UNSET)) + + def _parse_data_collection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_id = _parse_data_collection_id(d.pop("dataCollectionId", UNSET)) + + grid_info_optional = cls( + x_offset=x_offset, + y_offset=y_offset, + snapshot_offset_x_pixel=snapshot_offset_x_pixel, + snapshot_offset_y_pixel=snapshot_offset_y_pixel, + dx=dx, + dy=dy, + steps_x=steps_x, + steps_y=steps_y, + mesh_angle=mesh_angle, + record_time_stamp=record_time_stamp, + workflow_mesh_id=workflow_mesh_id, + orientation=orientation, + data_collection_group_id=data_collection_group_id, + microns_per_pixel_x=microns_per_pixel_x, + microns_per_pixel_y=microns_per_pixel_y, + snaked=snaked, + patches_x=patches_x, + patches_y=patches_y, + data_collection_id=data_collection_id, + ) + + grid_info_optional.additional_properties = d + return grid_info_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/grid_info_optional_orientation_type_0.py b/src/lims_utils/expeye_client/models/grid_info_optional_orientation_type_0.py new file mode 100644 index 0000000..83b1eeb --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_info_optional_orientation_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class GridInfoOptionalOrientationType0(StrEnum): + HORIZONTAL = "horizontal" + VERTICAL = "vertical" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/grid_info_out.py b/src/lims_utils/expeye_client/models/grid_info_out.py new file mode 100644 index 0000000..e373234 --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_info_out.py @@ -0,0 +1,445 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.grid_info_out_orientation_type_0 import GridInfoOutOrientationType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GridInfoOut") + + +@_attrs_define +class GridInfoOut: + """ + Attributes: + grid_info_id (int): + x_offset (float | None | Unset): + y_offset (float | None | Unset): + snapshot_offset_x_pixel (float | None | Unset): + snapshot_offset_y_pixel (float | None | Unset): + dx (float | None | Unset): + dy (float | None | Unset): + steps_x (float | None | Unset): + steps_y (float | None | Unset): + mesh_angle (float | None | Unset): + record_time_stamp (datetime.datetime | None | Unset): + workflow_mesh_id (int | None | Unset): + orientation (GridInfoOutOrientationType0 | None | Unset): + data_collection_group_id (int | None | Unset): + microns_per_pixel_x (float | None | Unset): + microns_per_pixel_y (float | None | Unset): + snaked (bool | None | Unset): + patches_x (int | None | Unset): + patches_y (int | None | Unset): + """ + + grid_info_id: int + x_offset: float | None | Unset = UNSET + y_offset: float | None | Unset = UNSET + snapshot_offset_x_pixel: float | None | Unset = UNSET + snapshot_offset_y_pixel: float | None | Unset = UNSET + dx: float | None | Unset = UNSET + dy: float | None | Unset = UNSET + steps_x: float | None | Unset = UNSET + steps_y: float | None | Unset = UNSET + mesh_angle: float | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + workflow_mesh_id: int | None | Unset = UNSET + orientation: GridInfoOutOrientationType0 | None | Unset = UNSET + data_collection_group_id: int | None | Unset = UNSET + microns_per_pixel_x: float | None | Unset = UNSET + microns_per_pixel_y: float | None | Unset = UNSET + snaked: bool | None | Unset = UNSET + patches_x: int | None | Unset = UNSET + patches_y: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + grid_info_id = self.grid_info_id + + x_offset: float | None | Unset + if isinstance(self.x_offset, Unset): + x_offset = UNSET + else: + x_offset = self.x_offset + + y_offset: float | None | Unset + if isinstance(self.y_offset, Unset): + y_offset = UNSET + else: + y_offset = self.y_offset + + snapshot_offset_x_pixel: float | None | Unset + if isinstance(self.snapshot_offset_x_pixel, Unset): + snapshot_offset_x_pixel = UNSET + else: + snapshot_offset_x_pixel = self.snapshot_offset_x_pixel + + snapshot_offset_y_pixel: float | None | Unset + if isinstance(self.snapshot_offset_y_pixel, Unset): + snapshot_offset_y_pixel = UNSET + else: + snapshot_offset_y_pixel = self.snapshot_offset_y_pixel + + dx: float | None | Unset + if isinstance(self.dx, Unset): + dx = UNSET + else: + dx = self.dx + + dy: float | None | Unset + if isinstance(self.dy, Unset): + dy = UNSET + else: + dy = self.dy + + steps_x: float | None | Unset + if isinstance(self.steps_x, Unset): + steps_x = UNSET + else: + steps_x = self.steps_x + + steps_y: float | None | Unset + if isinstance(self.steps_y, Unset): + steps_y = UNSET + else: + steps_y = self.steps_y + + mesh_angle: float | None | Unset + if isinstance(self.mesh_angle, Unset): + mesh_angle = UNSET + else: + mesh_angle = self.mesh_angle + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + workflow_mesh_id: int | None | Unset + if isinstance(self.workflow_mesh_id, Unset): + workflow_mesh_id = UNSET + else: + workflow_mesh_id = self.workflow_mesh_id + + orientation: None | str | Unset + if isinstance(self.orientation, Unset): + orientation = UNSET + elif isinstance(self.orientation, GridInfoOutOrientationType0): + orientation = self.orientation.value + else: + orientation = self.orientation + + data_collection_group_id: int | None | Unset + if isinstance(self.data_collection_group_id, Unset): + data_collection_group_id = UNSET + else: + data_collection_group_id = self.data_collection_group_id + + microns_per_pixel_x: float | None | Unset + if isinstance(self.microns_per_pixel_x, Unset): + microns_per_pixel_x = UNSET + else: + microns_per_pixel_x = self.microns_per_pixel_x + + microns_per_pixel_y: float | None | Unset + if isinstance(self.microns_per_pixel_y, Unset): + microns_per_pixel_y = UNSET + else: + microns_per_pixel_y = self.microns_per_pixel_y + + snaked: bool | None | Unset + if isinstance(self.snaked, Unset): + snaked = UNSET + else: + snaked = self.snaked + + patches_x: int | None | Unset + if isinstance(self.patches_x, Unset): + patches_x = UNSET + else: + patches_x = self.patches_x + + patches_y: int | None | Unset + if isinstance(self.patches_y, Unset): + patches_y = UNSET + else: + patches_y = self.patches_y + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "gridInfoId": grid_info_id, + } + ) + if x_offset is not UNSET: + field_dict["xOffset"] = x_offset + if y_offset is not UNSET: + field_dict["yOffset"] = y_offset + if snapshot_offset_x_pixel is not UNSET: + field_dict["snapshotOffsetXPixel"] = snapshot_offset_x_pixel + if snapshot_offset_y_pixel is not UNSET: + field_dict["snapshotOffsetYPixel"] = snapshot_offset_y_pixel + if dx is not UNSET: + field_dict["dx"] = dx + if dy is not UNSET: + field_dict["dy"] = dy + if steps_x is not UNSET: + field_dict["stepsX"] = steps_x + if steps_y is not UNSET: + field_dict["stepsY"] = steps_y + if mesh_angle is not UNSET: + field_dict["meshAngle"] = mesh_angle + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + if workflow_mesh_id is not UNSET: + field_dict["workflowMeshId"] = workflow_mesh_id + if orientation is not UNSET: + field_dict["orientation"] = orientation + if data_collection_group_id is not UNSET: + field_dict["dataCollectionGroupId"] = data_collection_group_id + if microns_per_pixel_x is not UNSET: + field_dict["micronsPerPixelX"] = microns_per_pixel_x + if microns_per_pixel_y is not UNSET: + field_dict["micronsPerPixelY"] = microns_per_pixel_y + if snaked is not UNSET: + field_dict["snaked"] = snaked + if patches_x is not UNSET: + field_dict["patchesX"] = patches_x + if patches_y is not UNSET: + field_dict["patchesY"] = patches_y + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + grid_info_id = d.pop("gridInfoId") + + def _parse_x_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_offset = _parse_x_offset(d.pop("xOffset", UNSET)) + + def _parse_y_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y_offset = _parse_y_offset(d.pop("yOffset", UNSET)) + + def _parse_snapshot_offset_x_pixel(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + snapshot_offset_x_pixel = _parse_snapshot_offset_x_pixel(d.pop("snapshotOffsetXPixel", UNSET)) + + def _parse_snapshot_offset_y_pixel(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + snapshot_offset_y_pixel = _parse_snapshot_offset_y_pixel(d.pop("snapshotOffsetYPixel", UNSET)) + + def _parse_dx(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dx = _parse_dx(d.pop("dx", UNSET)) + + def _parse_dy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dy = _parse_dy(d.pop("dy", UNSET)) + + def _parse_steps_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + steps_x = _parse_steps_x(d.pop("stepsX", UNSET)) + + def _parse_steps_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + steps_y = _parse_steps_y(d.pop("stepsY", UNSET)) + + def _parse_mesh_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + mesh_angle = _parse_mesh_angle(d.pop("meshAngle", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + def _parse_workflow_mesh_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + workflow_mesh_id = _parse_workflow_mesh_id(d.pop("workflowMeshId", UNSET)) + + def _parse_orientation(data: object) -> GridInfoOutOrientationType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + orientation_type_0 = GridInfoOutOrientationType0(data) + + return orientation_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridInfoOutOrientationType0 | None | Unset, data) + + orientation = _parse_orientation(d.pop("orientation", UNSET)) + + def _parse_data_collection_group_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_group_id = _parse_data_collection_group_id(d.pop("dataCollectionGroupId", UNSET)) + + def _parse_microns_per_pixel_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_x = _parse_microns_per_pixel_x(d.pop("micronsPerPixelX", UNSET)) + + def _parse_microns_per_pixel_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_y = _parse_microns_per_pixel_y(d.pop("micronsPerPixelY", UNSET)) + + def _parse_snaked(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + snaked = _parse_snaked(d.pop("snaked", UNSET)) + + def _parse_patches_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_x = _parse_patches_x(d.pop("patchesX", UNSET)) + + def _parse_patches_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_y = _parse_patches_y(d.pop("patchesY", UNSET)) + + grid_info_out = cls( + grid_info_id=grid_info_id, + x_offset=x_offset, + y_offset=y_offset, + snapshot_offset_x_pixel=snapshot_offset_x_pixel, + snapshot_offset_y_pixel=snapshot_offset_y_pixel, + dx=dx, + dy=dy, + steps_x=steps_x, + steps_y=steps_y, + mesh_angle=mesh_angle, + record_time_stamp=record_time_stamp, + workflow_mesh_id=workflow_mesh_id, + orientation=orientation, + data_collection_group_id=data_collection_group_id, + microns_per_pixel_x=microns_per_pixel_x, + microns_per_pixel_y=microns_per_pixel_y, + snaked=snaked, + patches_x=patches_x, + patches_y=patches_y, + ) + + grid_info_out.additional_properties = d + return grid_info_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/grid_info_out_orientation_type_0.py b/src/lims_utils/expeye_client/models/grid_info_out_orientation_type_0.py new file mode 100644 index 0000000..ab3e9e6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_info_out_orientation_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class GridInfoOutOrientationType0(StrEnum): + HORIZONTAL = "horizontal" + VERTICAL = "vertical" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/grid_square_in.py b/src/lims_utils/expeye_client/models/grid_square_in.py new file mode 100644 index 0000000..69752b4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_square_in.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.grid_square_mode import GridSquareMode +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GridSquareIn") + + +@_attrs_define +class GridSquareIn: + """ + Attributes: + pixel_location_x (int): + pixel_location_y (int): + height (int): + width (int): + angle (float): + mode (GridSquareMode): + grid_square_image (None | str | Unset): + has_red (bool | Unset): Default: False. + has_green (bool | Unset): Default: False. + has_blue (bool | Unset): Default: False. + has_cyan (bool | Unset): Default: False. + has_magenta (bool | Unset): Default: False. + has_yellow (bool | Unset): Default: False. + has_grey (bool | Unset): Default: False. + """ + + pixel_location_x: int + pixel_location_y: int + height: int + width: int + angle: float + mode: GridSquareMode + grid_square_image: None | str | Unset = UNSET + has_red: bool | Unset = False + has_green: bool | Unset = False + has_blue: bool | Unset = False + has_cyan: bool | Unset = False + has_magenta: bool | Unset = False + has_yellow: bool | Unset = False + has_grey: bool | Unset = False + + def to_dict(self) -> dict[str, Any]: + pixel_location_x = self.pixel_location_x + + pixel_location_y = self.pixel_location_y + + height = self.height + + width = self.width + + angle = self.angle + + mode = self.mode.value + + grid_square_image: None | str | Unset + if isinstance(self.grid_square_image, Unset): + grid_square_image = UNSET + else: + grid_square_image = self.grid_square_image + + has_red = self.has_red + + has_green = self.has_green + + has_blue = self.has_blue + + has_cyan = self.has_cyan + + has_magenta = self.has_magenta + + has_yellow = self.has_yellow + + has_grey = self.has_grey + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "pixelLocationX": pixel_location_x, + "pixelLocationY": pixel_location_y, + "height": height, + "width": width, + "angle": angle, + "mode": mode, + } + ) + if grid_square_image is not UNSET: + field_dict["gridSquareImage"] = grid_square_image + if has_red is not UNSET: + field_dict["hasRed"] = has_red + if has_green is not UNSET: + field_dict["hasGreen"] = has_green + if has_blue is not UNSET: + field_dict["hasBlue"] = has_blue + if has_cyan is not UNSET: + field_dict["hasCyan"] = has_cyan + if has_magenta is not UNSET: + field_dict["hasMagenta"] = has_magenta + if has_yellow is not UNSET: + field_dict["hasYellow"] = has_yellow + if has_grey is not UNSET: + field_dict["hasGrey"] = has_grey + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + pixel_location_x = d.pop("pixelLocationX") + + pixel_location_y = d.pop("pixelLocationY") + + height = d.pop("height") + + width = d.pop("width") + + angle = d.pop("angle") + + mode = GridSquareMode(d.pop("mode")) + + def _parse_grid_square_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + grid_square_image = _parse_grid_square_image(d.pop("gridSquareImage", UNSET)) + + has_red = d.pop("hasRed", UNSET) + + has_green = d.pop("hasGreen", UNSET) + + has_blue = d.pop("hasBlue", UNSET) + + has_cyan = d.pop("hasCyan", UNSET) + + has_magenta = d.pop("hasMagenta", UNSET) + + has_yellow = d.pop("hasYellow", UNSET) + + has_grey = d.pop("hasGrey", UNSET) + + grid_square_in = cls( + pixel_location_x=pixel_location_x, + pixel_location_y=pixel_location_y, + height=height, + width=width, + angle=angle, + mode=mode, + grid_square_image=grid_square_image, + has_red=has_red, + has_green=has_green, + has_blue=has_blue, + has_cyan=has_cyan, + has_magenta=has_magenta, + has_yellow=has_yellow, + has_grey=has_grey, + ) + + return grid_square_in diff --git a/src/lims_utils/expeye_client/models/grid_square_mode.py b/src/lims_utils/expeye_client/models/grid_square_mode.py new file mode 100644 index 0000000..abaa28d --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_square_mode.py @@ -0,0 +1,12 @@ +from enum import StrEnum + + +class GridSquareMode(StrEnum): + BRIGHT_FIELD = "Bright Field" + BRIGHT_FIELD_AND_FLUORESCENT = "Bright Field and Fluorescent" + FLUORESCENT = "Fluorescent" + SINGLE_PARTICLE = "Single Particle" + TOMOGRAPHY = "Tomography" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/grid_square_out.py b/src/lims_utils/expeye_client/models/grid_square_out.py new file mode 100644 index 0000000..5fe382b --- /dev/null +++ b/src/lims_utils/expeye_client/models/grid_square_out.py @@ -0,0 +1,230 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.grid_square_mode import GridSquareMode +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GridSquareOut") + + +@_attrs_define +class GridSquareOut: + """ + Attributes: + pixel_location_x (int): + pixel_location_y (int): + height (int): + width (int): + angle (float): + grid_square_image (None | str | Unset): + has_red (bool | Unset): Default: False. + has_green (bool | Unset): Default: False. + has_blue (bool | Unset): Default: False. + has_cyan (bool | Unset): Default: False. + has_magenta (bool | Unset): Default: False. + has_yellow (bool | Unset): Default: False. + has_grey (bool | Unset): Default: False. + mode (GridSquareMode | None | Unset): + grid_square_id (int | None | Unset): + atlas_id (int | None | Unset): + """ + + pixel_location_x: int + pixel_location_y: int + height: int + width: int + angle: float + grid_square_image: None | str | Unset = UNSET + has_red: bool | Unset = False + has_green: bool | Unset = False + has_blue: bool | Unset = False + has_cyan: bool | Unset = False + has_magenta: bool | Unset = False + has_yellow: bool | Unset = False + has_grey: bool | Unset = False + mode: GridSquareMode | None | Unset = UNSET + grid_square_id: int | None | Unset = UNSET + atlas_id: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + pixel_location_x = self.pixel_location_x + + pixel_location_y = self.pixel_location_y + + height = self.height + + width = self.width + + angle = self.angle + + grid_square_image: None | str | Unset + if isinstance(self.grid_square_image, Unset): + grid_square_image = UNSET + else: + grid_square_image = self.grid_square_image + + has_red = self.has_red + + has_green = self.has_green + + has_blue = self.has_blue + + has_cyan = self.has_cyan + + has_magenta = self.has_magenta + + has_yellow = self.has_yellow + + has_grey = self.has_grey + + mode: None | str | Unset + if isinstance(self.mode, Unset): + mode = UNSET + elif isinstance(self.mode, GridSquareMode): + mode = self.mode.value + else: + mode = self.mode + + grid_square_id: int | None | Unset + if isinstance(self.grid_square_id, Unset): + grid_square_id = UNSET + else: + grid_square_id = self.grid_square_id + + atlas_id: int | None | Unset + if isinstance(self.atlas_id, Unset): + atlas_id = UNSET + else: + atlas_id = self.atlas_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "pixelLocationX": pixel_location_x, + "pixelLocationY": pixel_location_y, + "height": height, + "width": width, + "angle": angle, + } + ) + if grid_square_image is not UNSET: + field_dict["gridSquareImage"] = grid_square_image + if has_red is not UNSET: + field_dict["hasRed"] = has_red + if has_green is not UNSET: + field_dict["hasGreen"] = has_green + if has_blue is not UNSET: + field_dict["hasBlue"] = has_blue + if has_cyan is not UNSET: + field_dict["hasCyan"] = has_cyan + if has_magenta is not UNSET: + field_dict["hasMagenta"] = has_magenta + if has_yellow is not UNSET: + field_dict["hasYellow"] = has_yellow + if has_grey is not UNSET: + field_dict["hasGrey"] = has_grey + if mode is not UNSET: + field_dict["mode"] = mode + if grid_square_id is not UNSET: + field_dict["gridSquareId"] = grid_square_id + if atlas_id is not UNSET: + field_dict["atlasId"] = atlas_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + pixel_location_x = d.pop("pixelLocationX") + + pixel_location_y = d.pop("pixelLocationY") + + height = d.pop("height") + + width = d.pop("width") + + angle = d.pop("angle") + + def _parse_grid_square_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + grid_square_image = _parse_grid_square_image(d.pop("gridSquareImage", UNSET)) + + has_red = d.pop("hasRed", UNSET) + + has_green = d.pop("hasGreen", UNSET) + + has_blue = d.pop("hasBlue", UNSET) + + has_cyan = d.pop("hasCyan", UNSET) + + has_magenta = d.pop("hasMagenta", UNSET) + + has_yellow = d.pop("hasYellow", UNSET) + + has_grey = d.pop("hasGrey", UNSET) + + def _parse_mode(data: object) -> GridSquareMode | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + mode_type_0 = GridSquareMode(data) + + return mode_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(GridSquareMode | None | Unset, data) + + mode = _parse_mode(d.pop("mode", UNSET)) + + def _parse_grid_square_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + grid_square_id = _parse_grid_square_id(d.pop("gridSquareId", UNSET)) + + def _parse_atlas_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + atlas_id = _parse_atlas_id(d.pop("atlasId", UNSET)) + + grid_square_out = cls( + pixel_location_x=pixel_location_x, + pixel_location_y=pixel_location_y, + height=height, + width=width, + angle=angle, + grid_square_image=grid_square_image, + has_red=has_red, + has_green=has_green, + has_blue=has_blue, + has_cyan=has_cyan, + has_magenta=has_magenta, + has_yellow=has_yellow, + has_grey=has_grey, + mode=mode, + grid_square_id=grid_square_id, + atlas_id=atlas_id, + ) + + return grid_square_out diff --git a/src/lims_utils/expeye_client/models/http_validation_error.py b/src/lims_utils/expeye_client/models/http_validation_error.py new file mode 100644 index 0000000..3275f36 --- /dev/null +++ b/src/lims_utils/expeye_client/models/http_validation_error.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.validation_error import ValidationError + + +T = TypeVar("T", bound="HTTPValidationError") + + +@_attrs_define +class HTTPValidationError: + """ + Attributes: + detail (list[ValidationError] | Unset): + """ + + detail: list[ValidationError] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + detail: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.detail, Unset): + detail = [] + for detail_item_data in self.detail: + detail_item = detail_item_data.to_dict() + detail.append(detail_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if detail is not UNSET: + field_dict["detail"] = detail + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.validation_error import ValidationError # noqa: PLC0415 + + d = dict(src_dict) + _detail = d.pop("detail", UNSET) + detail: list[ValidationError] | Unset = UNSET + if _detail is not UNSET: + detail = [] + for detail_item_data in _detail: + detail_item = ValidationError.from_dict(detail_item_data) + + detail.append(detail_item) + + http_validation_error = cls( + detail=detail, + ) + + http_validation_error.additional_properties = d + return http_validation_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/image_quality_indicator_out.py b/src/lims_utils/expeye_client/models/image_quality_indicator_out.py new file mode 100644 index 0000000..8d12f76 --- /dev/null +++ b/src/lims_utils/expeye_client/models/image_quality_indicator_out.py @@ -0,0 +1,163 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ImageQualityIndicatorOut") + + +@_attrs_define +class ImageQualityIndicatorOut: + """ + Attributes: + image (int): + res (float | None | Unset): Estimated resolution + spots (int | None | Unset): Total number of spots + bragg (int | None | Unset): Number of good bragg candidates + signal (float | None | Unset): Total integrated signal + dozor (float | None | Unset): Dozor score + """ + + image: int + res: float | None | Unset = UNSET + spots: int | None | Unset = UNSET + bragg: int | None | Unset = UNSET + signal: float | None | Unset = UNSET + dozor: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + image = self.image + + res: float | None | Unset + if isinstance(self.res, Unset): + res = UNSET + else: + res = self.res + + spots: int | None | Unset + if isinstance(self.spots, Unset): + spots = UNSET + else: + spots = self.spots + + bragg: int | None | Unset + if isinstance(self.bragg, Unset): + bragg = UNSET + else: + bragg = self.bragg + + signal: float | None | Unset + if isinstance(self.signal, Unset): + signal = UNSET + else: + signal = self.signal + + dozor: float | None | Unset + if isinstance(self.dozor, Unset): + dozor = UNSET + else: + dozor = self.dozor + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "image": image, + } + ) + if res is not UNSET: + field_dict["res"] = res + if spots is not UNSET: + field_dict["spots"] = spots + if bragg is not UNSET: + field_dict["bragg"] = bragg + if signal is not UNSET: + field_dict["signal"] = signal + if dozor is not UNSET: + field_dict["dozor"] = dozor + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + image = d.pop("image") + + def _parse_res(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + res = _parse_res(d.pop("res", UNSET)) + + def _parse_spots(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + spots = _parse_spots(d.pop("spots", UNSET)) + + def _parse_bragg(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bragg = _parse_bragg(d.pop("bragg", UNSET)) + + def _parse_signal(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + signal = _parse_signal(d.pop("signal", UNSET)) + + def _parse_dozor(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dozor = _parse_dozor(d.pop("dozor", UNSET)) + + image_quality_indicator_out = cls( + image=image, + res=res, + spots=spots, + bragg=bragg, + signal=signal, + dozor=dozor, + ) + + image_quality_indicator_out.additional_properties = d + return image_quality_indicator_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/lab_contact_out.py b/src/lims_utils/expeye_client/models/lab_contact_out.py new file mode 100644 index 0000000..017e9ab --- /dev/null +++ b/src/lims_utils/expeye_client/models/lab_contact_out.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LabContactOut") + + +@_attrs_define +class LabContactOut: + """ + Attributes: + lab_contact_id (int): + card_name (str): + """ + + lab_contact_id: int + card_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + lab_contact_id = self.lab_contact_id + + card_name = self.card_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "labContactId": lab_contact_id, + "cardName": card_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + lab_contact_id = d.pop("labContactId") + + card_name = d.pop("cardName") + + lab_contact_out = cls( + lab_contact_id=lab_contact_id, + card_name=card_name, + ) + + lab_contact_out.additional_properties = d + return lab_contact_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_action_in.py b/src/lims_utils/expeye_client/models/laser_action_in.py new file mode 100644 index 0000000..884e1b5 --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_action_in.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.laser_parameters_in import LaserParametersIn + from ..models.laser_point_in import LaserPointIn + + +T = TypeVar("T", bound="LaserActionIn") + + +@_attrs_define +class LaserActionIn: + """ + Attributes: + parameters (LaserParametersIn): + points (list[LaserPointIn]): + """ + + parameters: LaserParametersIn + points: list[LaserPointIn] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + parameters = self.parameters.to_dict() + + points = [] + for points_item_data in self.points: + points_item = points_item_data.to_dict() + points.append(points_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "parameters": parameters, + "points": points, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.laser_parameters_in import LaserParametersIn # noqa: PLC0415 + from ..models.laser_point_in import LaserPointIn # noqa: PLC0415 + + d = dict(src_dict) + parameters = LaserParametersIn.from_dict(d.pop("parameters")) + + points = [] + _points = d.pop("points") + for points_item_data in _points: + points_item = LaserPointIn.from_dict(points_item_data) + + points.append(points_item) + + laser_action_in = cls( + parameters=parameters, + points=points, + ) + + laser_action_in.additional_properties = d + return laser_action_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_action_out.py b/src/lims_utils/expeye_client/models/laser_action_out.py new file mode 100644 index 0000000..b507bbd --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_action_out.py @@ -0,0 +1,85 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.laser_parameters_out import LaserParametersOut + from ..models.laser_point_out import LaserPointOut + + +T = TypeVar("T", bound="LaserActionOut") + + +@_attrs_define +class LaserActionOut: + """ + Attributes: + parameters (LaserParametersOut): + points (list[LaserPointOut]): + """ + + parameters: LaserParametersOut + points: list[LaserPointOut] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + parameters = self.parameters.to_dict() + + points = [] + for points_item_data in self.points: + points_item = points_item_data.to_dict() + points.append(points_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "parameters": parameters, + "points": points, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.laser_parameters_out import LaserParametersOut # noqa: PLC0415 + from ..models.laser_point_out import LaserPointOut # noqa: PLC0415 + + d = dict(src_dict) + parameters = LaserParametersOut.from_dict(d.pop("parameters")) + + points = [] + _points = d.pop("points") + for points_item_data in _points: + points_item = LaserPointOut.from_dict(points_item_data) + + points.append(points_item) + + laser_action_out = cls( + parameters=parameters, + points=points, + ) + + laser_action_out.additional_properties = d + return laser_action_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_parameters_in.py b/src/lims_utils/expeye_client/models/laser_parameters_in.py new file mode 100644 index 0000000..7a76ac6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_parameters_in.py @@ -0,0 +1,173 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LaserParametersIn") + + +@_attrs_define +class LaserParametersIn: + """ + Attributes: + laser_repetition_rate (float | None | Unset): Laser repetition rate in kHz + scanhead_move_speed (float | None | Unset): Scanhead move speed in m/s + number_of_passes (int | None | Unset): + gonio_rotation_speed (int | None | Unset): Goniometer rotation speed in degrees/s + total_marking_time (float | None | Unset): Total marking time in seconds + laser_transmission (float | None | Unset): Laser transmission in % + """ + + laser_repetition_rate: float | None | Unset = UNSET + scanhead_move_speed: float | None | Unset = UNSET + number_of_passes: int | None | Unset = UNSET + gonio_rotation_speed: int | None | Unset = UNSET + total_marking_time: float | None | Unset = UNSET + laser_transmission: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + laser_repetition_rate: float | None | Unset + if isinstance(self.laser_repetition_rate, Unset): + laser_repetition_rate = UNSET + else: + laser_repetition_rate = self.laser_repetition_rate + + scanhead_move_speed: float | None | Unset + if isinstance(self.scanhead_move_speed, Unset): + scanhead_move_speed = UNSET + else: + scanhead_move_speed = self.scanhead_move_speed + + number_of_passes: int | None | Unset + if isinstance(self.number_of_passes, Unset): + number_of_passes = UNSET + else: + number_of_passes = self.number_of_passes + + gonio_rotation_speed: int | None | Unset + if isinstance(self.gonio_rotation_speed, Unset): + gonio_rotation_speed = UNSET + else: + gonio_rotation_speed = self.gonio_rotation_speed + + total_marking_time: float | None | Unset + if isinstance(self.total_marking_time, Unset): + total_marking_time = UNSET + else: + total_marking_time = self.total_marking_time + + laser_transmission: float | None | Unset + if isinstance(self.laser_transmission, Unset): + laser_transmission = UNSET + else: + laser_transmission = self.laser_transmission + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if laser_repetition_rate is not UNSET: + field_dict["laserRepetitionRate"] = laser_repetition_rate + if scanhead_move_speed is not UNSET: + field_dict["scanheadMoveSpeed"] = scanhead_move_speed + if number_of_passes is not UNSET: + field_dict["numberOfPasses"] = number_of_passes + if gonio_rotation_speed is not UNSET: + field_dict["gonioRotationSpeed"] = gonio_rotation_speed + if total_marking_time is not UNSET: + field_dict["totalMarkingTime"] = total_marking_time + if laser_transmission is not UNSET: + field_dict["laserTransmission"] = laser_transmission + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_laser_repetition_rate(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + laser_repetition_rate = _parse_laser_repetition_rate(d.pop("laserRepetitionRate", UNSET)) + + def _parse_scanhead_move_speed(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + scanhead_move_speed = _parse_scanhead_move_speed(d.pop("scanheadMoveSpeed", UNSET)) + + def _parse_number_of_passes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_passes = _parse_number_of_passes(d.pop("numberOfPasses", UNSET)) + + def _parse_gonio_rotation_speed(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + gonio_rotation_speed = _parse_gonio_rotation_speed(d.pop("gonioRotationSpeed", UNSET)) + + def _parse_total_marking_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_marking_time = _parse_total_marking_time(d.pop("totalMarkingTime", UNSET)) + + def _parse_laser_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + laser_transmission = _parse_laser_transmission(d.pop("laserTransmission", UNSET)) + + laser_parameters_in = cls( + laser_repetition_rate=laser_repetition_rate, + scanhead_move_speed=scanhead_move_speed, + number_of_passes=number_of_passes, + gonio_rotation_speed=gonio_rotation_speed, + total_marking_time=total_marking_time, + laser_transmission=laser_transmission, + ) + + laser_parameters_in.additional_properties = d + return laser_parameters_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_parameters_out.py b/src/lims_utils/expeye_client/models/laser_parameters_out.py new file mode 100644 index 0000000..dcb8919 --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_parameters_out.py @@ -0,0 +1,183 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LaserParametersOut") + + +@_attrs_define +class LaserParametersOut: + """ + Attributes: + laser_parameters_id (int): + laser_repetition_rate (float | None | Unset): Laser repetition rate in kHz + scanhead_move_speed (float | None | Unset): Scanhead move speed in m/s + number_of_passes (int | None | Unset): + gonio_rotation_speed (int | None | Unset): Goniometer rotation speed in degrees/s + total_marking_time (float | None | Unset): Total marking time in seconds + laser_transmission (float | None | Unset): Laser transmission in % + """ + + laser_parameters_id: int + laser_repetition_rate: float | None | Unset = UNSET + scanhead_move_speed: float | None | Unset = UNSET + number_of_passes: int | None | Unset = UNSET + gonio_rotation_speed: int | None | Unset = UNSET + total_marking_time: float | None | Unset = UNSET + laser_transmission: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + laser_parameters_id = self.laser_parameters_id + + laser_repetition_rate: float | None | Unset + if isinstance(self.laser_repetition_rate, Unset): + laser_repetition_rate = UNSET + else: + laser_repetition_rate = self.laser_repetition_rate + + scanhead_move_speed: float | None | Unset + if isinstance(self.scanhead_move_speed, Unset): + scanhead_move_speed = UNSET + else: + scanhead_move_speed = self.scanhead_move_speed + + number_of_passes: int | None | Unset + if isinstance(self.number_of_passes, Unset): + number_of_passes = UNSET + else: + number_of_passes = self.number_of_passes + + gonio_rotation_speed: int | None | Unset + if isinstance(self.gonio_rotation_speed, Unset): + gonio_rotation_speed = UNSET + else: + gonio_rotation_speed = self.gonio_rotation_speed + + total_marking_time: float | None | Unset + if isinstance(self.total_marking_time, Unset): + total_marking_time = UNSET + else: + total_marking_time = self.total_marking_time + + laser_transmission: float | None | Unset + if isinstance(self.laser_transmission, Unset): + laser_transmission = UNSET + else: + laser_transmission = self.laser_transmission + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "laserParametersId": laser_parameters_id, + } + ) + if laser_repetition_rate is not UNSET: + field_dict["laserRepetitionRate"] = laser_repetition_rate + if scanhead_move_speed is not UNSET: + field_dict["scanheadMoveSpeed"] = scanhead_move_speed + if number_of_passes is not UNSET: + field_dict["numberOfPasses"] = number_of_passes + if gonio_rotation_speed is not UNSET: + field_dict["gonioRotationSpeed"] = gonio_rotation_speed + if total_marking_time is not UNSET: + field_dict["totalMarkingTime"] = total_marking_time + if laser_transmission is not UNSET: + field_dict["laserTransmission"] = laser_transmission + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + laser_parameters_id = d.pop("laserParametersId") + + def _parse_laser_repetition_rate(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + laser_repetition_rate = _parse_laser_repetition_rate(d.pop("laserRepetitionRate", UNSET)) + + def _parse_scanhead_move_speed(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + scanhead_move_speed = _parse_scanhead_move_speed(d.pop("scanheadMoveSpeed", UNSET)) + + def _parse_number_of_passes(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_passes = _parse_number_of_passes(d.pop("numberOfPasses", UNSET)) + + def _parse_gonio_rotation_speed(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + gonio_rotation_speed = _parse_gonio_rotation_speed(d.pop("gonioRotationSpeed", UNSET)) + + def _parse_total_marking_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_marking_time = _parse_total_marking_time(d.pop("totalMarkingTime", UNSET)) + + def _parse_laser_transmission(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + laser_transmission = _parse_laser_transmission(d.pop("laserTransmission", UNSET)) + + laser_parameters_out = cls( + laser_parameters_id=laser_parameters_id, + laser_repetition_rate=laser_repetition_rate, + scanhead_move_speed=scanhead_move_speed, + number_of_passes=number_of_passes, + gonio_rotation_speed=gonio_rotation_speed, + total_marking_time=total_marking_time, + laser_transmission=laser_transmission, + ) + + laser_parameters_out.additional_properties = d + return laser_parameters_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_point_in.py b/src/lims_utils/expeye_client/models/laser_point_in.py new file mode 100644 index 0000000..c9d5a4e --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_point_in.py @@ -0,0 +1,107 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LaserPointIn") + + +@_attrs_define +class LaserPointIn: + """ + Attributes: + radius (int): Radius of point, in microns + x (int): X coordinate of point, in microns + y (int): Y coordinate of point, in microns + point_index (int): Index of point, expresses ordinality + laser_on (bool | None | Unset): Whether the laser is on for this point + """ + + radius: int + x: int + y: int + point_index: int + laser_on: bool | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + radius = self.radius + + x = self.x + + y = self.y + + point_index = self.point_index + + laser_on: bool | None | Unset + if isinstance(self.laser_on, Unset): + laser_on = UNSET + else: + laser_on = self.laser_on + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "radius": radius, + "x": x, + "y": y, + "pointIndex": point_index, + } + ) + if laser_on is not UNSET: + field_dict["laserOn"] = laser_on + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + radius = d.pop("radius") + + x = d.pop("x") + + y = d.pop("y") + + point_index = d.pop("pointIndex") + + def _parse_laser_on(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + laser_on = _parse_laser_on(d.pop("laserOn", UNSET)) + + laser_point_in = cls( + radius=radius, + x=x, + y=y, + point_index=point_index, + laser_on=laser_on, + ) + + laser_point_in.additional_properties = d + return laser_point_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_point_list_in.py b/src/lims_utils/expeye_client/models/laser_point_list_in.py new file mode 100644 index 0000000..edf9e41 --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_point_list_in.py @@ -0,0 +1,75 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.laser_point_in import LaserPointIn + + +T = TypeVar("T", bound="LaserPointListIn") + + +@_attrs_define +class LaserPointListIn: + """ + Attributes: + points (list[LaserPointIn]): + """ + + points: list[LaserPointIn] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + points = [] + for points_item_data in self.points: + points_item = points_item_data.to_dict() + points.append(points_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "points": points, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.laser_point_in import LaserPointIn # noqa: PLC0415 + + d = dict(src_dict) + points = [] + _points = d.pop("points") + for points_item_data in _points: + points_item = LaserPointIn.from_dict(points_item_data) + + points.append(points_item) + + laser_point_list_in = cls( + points=points, + ) + + laser_point_list_in.additional_properties = d + return laser_point_list_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/laser_point_out.py b/src/lims_utils/expeye_client/models/laser_point_out.py new file mode 100644 index 0000000..e1c099b --- /dev/null +++ b/src/lims_utils/expeye_client/models/laser_point_out.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LaserPointOut") + + +@_attrs_define +class LaserPointOut: + """ + Attributes: + radius (int): Radius of point, in microns + x (int): X coordinate of point, in microns + y (int): Y coordinate of point, in microns + point_index (int): Index of point, expresses ordinality + laser_point_id (int): + laser_on (bool | None | Unset): Whether the laser is on for this point + """ + + radius: int + x: int + y: int + point_index: int + laser_point_id: int + laser_on: bool | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + radius = self.radius + + x = self.x + + y = self.y + + point_index = self.point_index + + laser_point_id = self.laser_point_id + + laser_on: bool | None | Unset + if isinstance(self.laser_on, Unset): + laser_on = UNSET + else: + laser_on = self.laser_on + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "radius": radius, + "x": x, + "y": y, + "pointIndex": point_index, + "laserPointId": laser_point_id, + } + ) + if laser_on is not UNSET: + field_dict["laserOn"] = laser_on + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + radius = d.pop("radius") + + x = d.pop("x") + + y = d.pop("y") + + point_index = d.pop("pointIndex") + + laser_point_id = d.pop("laserPointId") + + def _parse_laser_on(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + laser_on = _parse_laser_on(d.pop("laserOn", UNSET)) + + laser_point_out = cls( + radius=radius, + x=x, + y=y, + point_index=point_index, + laser_point_id=laser_point_id, + laser_on=laser_on, + ) + + laser_point_out.additional_properties = d + return laser_point_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/ldap_search_params.py b/src/lims_utils/expeye_client/models/ldap_search_params.py new file mode 100644 index 0000000..41d4ace --- /dev/null +++ b/src/lims_utils/expeye_client/models/ldap_search_params.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="LDAPSearchParams") + + +@_attrs_define +class LDAPSearchParams: + """ + Attributes: + name (str): + host_url (str): + filter_ (str): + attributes (str): + sequence_number (int): + search_base (str): + """ + + name: str + host_url: str + filter_: str + attributes: str + sequence_number: int + search_base: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + host_url = self.host_url + + filter_ = self.filter_ + + attributes = self.attributes + + sequence_number = self.sequence_number + + search_base = self.search_base + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "hostURL": host_url, + "filter": filter_, + "attributes": attributes, + "sequenceNumber": sequence_number, + "searchBase": search_base, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + host_url = d.pop("hostURL") + + filter_ = d.pop("filter") + + attributes = d.pop("attributes") + + sequence_number = d.pop("sequenceNumber") + + search_base = d.pop("searchBase") + + ldap_search_params = cls( + name=name, + host_url=host_url, + filter_=filter_, + attributes=attributes, + sequence_number=sequence_number, + search_base=search_base, + ) + + ldap_search_params.additional_properties = d + return ldap_search_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/ligand_in.py b/src/lims_utils/expeye_client/models/ligand_in.py new file mode 100644 index 0000000..2c3bda9 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ligand_in.py @@ -0,0 +1,173 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LigandIn") + + +@_attrs_define +class LigandIn: + """ + Attributes: + name (None | str | Unset): + smiles (None | str | Unset): + library_name (None | str | Unset): + library_batch_number (None | str | Unset): + plate_barcode (None | str | Unset): + source_well (None | str | Unset): + """ + + name: None | str | Unset = UNSET + smiles: None | str | Unset = UNSET + library_name: None | str | Unset = UNSET + library_batch_number: None | str | Unset = UNSET + plate_barcode: None | str | Unset = UNSET + source_well: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + smiles: None | str | Unset + if isinstance(self.smiles, Unset): + smiles = UNSET + else: + smiles = self.smiles + + library_name: None | str | Unset + if isinstance(self.library_name, Unset): + library_name = UNSET + else: + library_name = self.library_name + + library_batch_number: None | str | Unset + if isinstance(self.library_batch_number, Unset): + library_batch_number = UNSET + else: + library_batch_number = self.library_batch_number + + plate_barcode: None | str | Unset + if isinstance(self.plate_barcode, Unset): + plate_barcode = UNSET + else: + plate_barcode = self.plate_barcode + + source_well: None | str | Unset + if isinstance(self.source_well, Unset): + source_well = UNSET + else: + source_well = self.source_well + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if smiles is not UNSET: + field_dict["SMILES"] = smiles + if library_name is not UNSET: + field_dict["libraryName"] = library_name + if library_batch_number is not UNSET: + field_dict["libraryBatchNumber"] = library_batch_number + if plate_barcode is not UNSET: + field_dict["plateBarcode"] = plate_barcode + if source_well is not UNSET: + field_dict["sourceWell"] = source_well + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_smiles(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + smiles = _parse_smiles(d.pop("SMILES", UNSET)) + + def _parse_library_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + library_name = _parse_library_name(d.pop("libraryName", UNSET)) + + def _parse_library_batch_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + library_batch_number = _parse_library_batch_number(d.pop("libraryBatchNumber", UNSET)) + + def _parse_plate_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + plate_barcode = _parse_plate_barcode(d.pop("plateBarcode", UNSET)) + + def _parse_source_well(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_well = _parse_source_well(d.pop("sourceWell", UNSET)) + + ligand_in = cls( + name=name, + smiles=smiles, + library_name=library_name, + library_batch_number=library_batch_number, + plate_barcode=plate_barcode, + source_well=source_well, + ) + + ligand_in.additional_properties = d + return ligand_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/ligand_optional.py b/src/lims_utils/expeye_client/models/ligand_optional.py new file mode 100644 index 0000000..3f5de34 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ligand_optional.py @@ -0,0 +1,173 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LigandOptional") + + +@_attrs_define +class LigandOptional: + """ + Attributes: + name (None | str | Unset): + smiles (None | str | Unset): + library_name (None | str | Unset): + library_batch_number (None | str | Unset): + plate_barcode (None | str | Unset): + source_well (None | str | Unset): + """ + + name: None | str | Unset = UNSET + smiles: None | str | Unset = UNSET + library_name: None | str | Unset = UNSET + library_batch_number: None | str | Unset = UNSET + plate_barcode: None | str | Unset = UNSET + source_well: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + smiles: None | str | Unset + if isinstance(self.smiles, Unset): + smiles = UNSET + else: + smiles = self.smiles + + library_name: None | str | Unset + if isinstance(self.library_name, Unset): + library_name = UNSET + else: + library_name = self.library_name + + library_batch_number: None | str | Unset + if isinstance(self.library_batch_number, Unset): + library_batch_number = UNSET + else: + library_batch_number = self.library_batch_number + + plate_barcode: None | str | Unset + if isinstance(self.plate_barcode, Unset): + plate_barcode = UNSET + else: + plate_barcode = self.plate_barcode + + source_well: None | str | Unset + if isinstance(self.source_well, Unset): + source_well = UNSET + else: + source_well = self.source_well + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if smiles is not UNSET: + field_dict["SMILES"] = smiles + if library_name is not UNSET: + field_dict["libraryName"] = library_name + if library_batch_number is not UNSET: + field_dict["libraryBatchNumber"] = library_batch_number + if plate_barcode is not UNSET: + field_dict["plateBarcode"] = plate_barcode + if source_well is not UNSET: + field_dict["sourceWell"] = source_well + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_smiles(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + smiles = _parse_smiles(d.pop("SMILES", UNSET)) + + def _parse_library_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + library_name = _parse_library_name(d.pop("libraryName", UNSET)) + + def _parse_library_batch_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + library_batch_number = _parse_library_batch_number(d.pop("libraryBatchNumber", UNSET)) + + def _parse_plate_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + plate_barcode = _parse_plate_barcode(d.pop("plateBarcode", UNSET)) + + def _parse_source_well(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_well = _parse_source_well(d.pop("sourceWell", UNSET)) + + ligand_optional = cls( + name=name, + smiles=smiles, + library_name=library_name, + library_batch_number=library_batch_number, + plate_barcode=plate_barcode, + source_well=source_well, + ) + + ligand_optional.additional_properties = d + return ligand_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/ligand_out.py b/src/lims_utils/expeye_client/models/ligand_out.py new file mode 100644 index 0000000..1657da0 --- /dev/null +++ b/src/lims_utils/expeye_client/models/ligand_out.py @@ -0,0 +1,203 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LigandOut") + + +@_attrs_define +class LigandOut: + """ + Attributes: + ligand_id (int): + name (None | str | Unset): + smiles (None | str | Unset): + library_name (None | str | Unset): + library_batch_number (None | str | Unset): + plate_barcode (None | str | Unset): + source_well (None | str | Unset): + proposal_id (int | None | Unset): + """ + + ligand_id: int + name: None | str | Unset = UNSET + smiles: None | str | Unset = UNSET + library_name: None | str | Unset = UNSET + library_batch_number: None | str | Unset = UNSET + plate_barcode: None | str | Unset = UNSET + source_well: None | str | Unset = UNSET + proposal_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + ligand_id = self.ligand_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + smiles: None | str | Unset + if isinstance(self.smiles, Unset): + smiles = UNSET + else: + smiles = self.smiles + + library_name: None | str | Unset + if isinstance(self.library_name, Unset): + library_name = UNSET + else: + library_name = self.library_name + + library_batch_number: None | str | Unset + if isinstance(self.library_batch_number, Unset): + library_batch_number = UNSET + else: + library_batch_number = self.library_batch_number + + plate_barcode: None | str | Unset + if isinstance(self.plate_barcode, Unset): + plate_barcode = UNSET + else: + plate_barcode = self.plate_barcode + + source_well: None | str | Unset + if isinstance(self.source_well, Unset): + source_well = UNSET + else: + source_well = self.source_well + + proposal_id: int | None | Unset + if isinstance(self.proposal_id, Unset): + proposal_id = UNSET + else: + proposal_id = self.proposal_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "ligandId": ligand_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if smiles is not UNSET: + field_dict["SMILES"] = smiles + if library_name is not UNSET: + field_dict["libraryName"] = library_name + if library_batch_number is not UNSET: + field_dict["libraryBatchNumber"] = library_batch_number + if plate_barcode is not UNSET: + field_dict["plateBarcode"] = plate_barcode + if source_well is not UNSET: + field_dict["sourceWell"] = source_well + if proposal_id is not UNSET: + field_dict["proposalId"] = proposal_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ligand_id = d.pop("ligandId") + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_smiles(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + smiles = _parse_smiles(d.pop("SMILES", UNSET)) + + def _parse_library_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + library_name = _parse_library_name(d.pop("libraryName", UNSET)) + + def _parse_library_batch_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + library_batch_number = _parse_library_batch_number(d.pop("libraryBatchNumber", UNSET)) + + def _parse_plate_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + plate_barcode = _parse_plate_barcode(d.pop("plateBarcode", UNSET)) + + def _parse_source_well(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source_well = _parse_source_well(d.pop("sourceWell", UNSET)) + + def _parse_proposal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + proposal_id = _parse_proposal_id(d.pop("proposalId", UNSET)) + + ligand_out = cls( + ligand_id=ligand_id, + name=name, + smiles=smiles, + library_name=library_name, + library_batch_number=library_batch_number, + plate_barcode=plate_barcode, + source_well=source_well, + proposal_id=proposal_id, + ) + + ligand_out.additional_properties = d + return ligand_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/milling_step_in.py b/src/lims_utils/expeye_client/models/milling_step_in.py new file mode 100644 index 0000000..7940242 --- /dev/null +++ b/src/lims_utils/expeye_client/models/milling_step_in.py @@ -0,0 +1,496 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.milling_step_in_beam_type_type_0 import MillingStepInBeamTypeType0 +from ..models.milling_step_in_status_type_0 import MillingStepInStatusType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MillingStepIn") + + +@_attrs_define +class MillingStepIn: + """ + Attributes: + milling_step_name_id (int | None | Unset): + is_enabled (int | None | Unset): + status (MillingStepInStatusType0 | None | Unset): + execution_time (float | None | Unset): + stage_x (float | None | Unset): + stage_y (float | None | Unset): + stage_z (float | None | Unset): + rotation (float | None | Unset): + alpha_tilt (float | None | Unset): + beam_type (MillingStepInBeamTypeType0 | None | Unset): + beam_voltage (float | None | Unset): + beam_current (float | None | Unset): + milling_angle (float | None | Unset): + depth_correction (float | None | Unset): + lamella_offset (float | None | Unset): + trench_height_front (float | None | Unset): + trench_height_rear (float | None | Unset): + width_overlap_front_left (float | None | Unset): + width_overlap_front_right (float | None | Unset): + width_overlap_rear_left (float | None | Unset): + width_overlap_rear_right (float | None | Unset): + step (None | str | Unset): + """ + + milling_step_name_id: int | None | Unset = UNSET + is_enabled: int | None | Unset = UNSET + status: MillingStepInStatusType0 | None | Unset = UNSET + execution_time: float | None | Unset = UNSET + stage_x: float | None | Unset = UNSET + stage_y: float | None | Unset = UNSET + stage_z: float | None | Unset = UNSET + rotation: float | None | Unset = UNSET + alpha_tilt: float | None | Unset = UNSET + beam_type: MillingStepInBeamTypeType0 | None | Unset = UNSET + beam_voltage: float | None | Unset = UNSET + beam_current: float | None | Unset = UNSET + milling_angle: float | None | Unset = UNSET + depth_correction: float | None | Unset = UNSET + lamella_offset: float | None | Unset = UNSET + trench_height_front: float | None | Unset = UNSET + trench_height_rear: float | None | Unset = UNSET + width_overlap_front_left: float | None | Unset = UNSET + width_overlap_front_right: float | None | Unset = UNSET + width_overlap_rear_left: float | None | Unset = UNSET + width_overlap_rear_right: float | None | Unset = UNSET + step: None | str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + milling_step_name_id: int | None | Unset + if isinstance(self.milling_step_name_id, Unset): + milling_step_name_id = UNSET + else: + milling_step_name_id = self.milling_step_name_id + + is_enabled: int | None | Unset + if isinstance(self.is_enabled, Unset): + is_enabled = UNSET + else: + is_enabled = self.is_enabled + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + elif isinstance(self.status, MillingStepInStatusType0): + status = self.status.value + else: + status = self.status + + execution_time: float | None | Unset + if isinstance(self.execution_time, Unset): + execution_time = UNSET + else: + execution_time = self.execution_time + + stage_x: float | None | Unset + if isinstance(self.stage_x, Unset): + stage_x = UNSET + else: + stage_x = self.stage_x + + stage_y: float | None | Unset + if isinstance(self.stage_y, Unset): + stage_y = UNSET + else: + stage_y = self.stage_y + + stage_z: float | None | Unset + if isinstance(self.stage_z, Unset): + stage_z = UNSET + else: + stage_z = self.stage_z + + rotation: float | None | Unset + if isinstance(self.rotation, Unset): + rotation = UNSET + else: + rotation = self.rotation + + alpha_tilt: float | None | Unset + if isinstance(self.alpha_tilt, Unset): + alpha_tilt = UNSET + else: + alpha_tilt = self.alpha_tilt + + beam_type: None | str | Unset + if isinstance(self.beam_type, Unset): + beam_type = UNSET + elif isinstance(self.beam_type, MillingStepInBeamTypeType0): + beam_type = self.beam_type.value + else: + beam_type = self.beam_type + + beam_voltage: float | None | Unset + if isinstance(self.beam_voltage, Unset): + beam_voltage = UNSET + else: + beam_voltage = self.beam_voltage + + beam_current: float | None | Unset + if isinstance(self.beam_current, Unset): + beam_current = UNSET + else: + beam_current = self.beam_current + + milling_angle: float | None | Unset + if isinstance(self.milling_angle, Unset): + milling_angle = UNSET + else: + milling_angle = self.milling_angle + + depth_correction: float | None | Unset + if isinstance(self.depth_correction, Unset): + depth_correction = UNSET + else: + depth_correction = self.depth_correction + + lamella_offset: float | None | Unset + if isinstance(self.lamella_offset, Unset): + lamella_offset = UNSET + else: + lamella_offset = self.lamella_offset + + trench_height_front: float | None | Unset + if isinstance(self.trench_height_front, Unset): + trench_height_front = UNSET + else: + trench_height_front = self.trench_height_front + + trench_height_rear: float | None | Unset + if isinstance(self.trench_height_rear, Unset): + trench_height_rear = UNSET + else: + trench_height_rear = self.trench_height_rear + + width_overlap_front_left: float | None | Unset + if isinstance(self.width_overlap_front_left, Unset): + width_overlap_front_left = UNSET + else: + width_overlap_front_left = self.width_overlap_front_left + + width_overlap_front_right: float | None | Unset + if isinstance(self.width_overlap_front_right, Unset): + width_overlap_front_right = UNSET + else: + width_overlap_front_right = self.width_overlap_front_right + + width_overlap_rear_left: float | None | Unset + if isinstance(self.width_overlap_rear_left, Unset): + width_overlap_rear_left = UNSET + else: + width_overlap_rear_left = self.width_overlap_rear_left + + width_overlap_rear_right: float | None | Unset + if isinstance(self.width_overlap_rear_right, Unset): + width_overlap_rear_right = UNSET + else: + width_overlap_rear_right = self.width_overlap_rear_right + + step: None | str | Unset + if isinstance(self.step, Unset): + step = UNSET + else: + step = self.step + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if milling_step_name_id is not UNSET: + field_dict["millingStepNameId"] = milling_step_name_id + if is_enabled is not UNSET: + field_dict["isEnabled"] = is_enabled + if status is not UNSET: + field_dict["status"] = status + if execution_time is not UNSET: + field_dict["executionTime"] = execution_time + if stage_x is not UNSET: + field_dict["stageX"] = stage_x + if stage_y is not UNSET: + field_dict["stageY"] = stage_y + if stage_z is not UNSET: + field_dict["stageZ"] = stage_z + if rotation is not UNSET: + field_dict["rotation"] = rotation + if alpha_tilt is not UNSET: + field_dict["alphaTilt"] = alpha_tilt + if beam_type is not UNSET: + field_dict["beamType"] = beam_type + if beam_voltage is not UNSET: + field_dict["beamVoltage"] = beam_voltage + if beam_current is not UNSET: + field_dict["beamCurrent"] = beam_current + if milling_angle is not UNSET: + field_dict["millingAngle"] = milling_angle + if depth_correction is not UNSET: + field_dict["depthCorrection"] = depth_correction + if lamella_offset is not UNSET: + field_dict["lamellaOffset"] = lamella_offset + if trench_height_front is not UNSET: + field_dict["trenchHeightFront"] = trench_height_front + if trench_height_rear is not UNSET: + field_dict["trenchHeightRear"] = trench_height_rear + if width_overlap_front_left is not UNSET: + field_dict["widthOverlapFrontLeft"] = width_overlap_front_left + if width_overlap_front_right is not UNSET: + field_dict["widthOverlapFrontRight"] = width_overlap_front_right + if width_overlap_rear_left is not UNSET: + field_dict["widthOverlapRearLeft"] = width_overlap_rear_left + if width_overlap_rear_right is not UNSET: + field_dict["widthOverlapRearRight"] = width_overlap_rear_right + if step is not UNSET: + field_dict["step"] = step + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_milling_step_name_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + milling_step_name_id = _parse_milling_step_name_id(d.pop("millingStepNameId", UNSET)) + + def _parse_is_enabled(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_enabled = _parse_is_enabled(d.pop("isEnabled", UNSET)) + + def _parse_status(data: object) -> MillingStepInStatusType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + status_type_0 = MillingStepInStatusType0(data) + + return status_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MillingStepInStatusType0 | None | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_execution_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + execution_time = _parse_execution_time(d.pop("executionTime", UNSET)) + + def _parse_stage_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_x = _parse_stage_x(d.pop("stageX", UNSET)) + + def _parse_stage_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_y = _parse_stage_y(d.pop("stageY", UNSET)) + + def _parse_stage_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_z = _parse_stage_z(d.pop("stageZ", UNSET)) + + def _parse_rotation(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + rotation = _parse_rotation(d.pop("rotation", UNSET)) + + def _parse_alpha_tilt(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + alpha_tilt = _parse_alpha_tilt(d.pop("alphaTilt", UNSET)) + + def _parse_beam_type(data: object) -> MillingStepInBeamTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + beam_type_type_0 = MillingStepInBeamTypeType0(data) + + return beam_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MillingStepInBeamTypeType0 | None | Unset, data) + + beam_type = _parse_beam_type(d.pop("beamType", UNSET)) + + def _parse_beam_voltage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_voltage = _parse_beam_voltage(d.pop("beamVoltage", UNSET)) + + def _parse_beam_current(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_current = _parse_beam_current(d.pop("beamCurrent", UNSET)) + + def _parse_milling_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + milling_angle = _parse_milling_angle(d.pop("millingAngle", UNSET)) + + def _parse_depth_correction(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + depth_correction = _parse_depth_correction(d.pop("depthCorrection", UNSET)) + + def _parse_lamella_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + lamella_offset = _parse_lamella_offset(d.pop("lamellaOffset", UNSET)) + + def _parse_trench_height_front(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + trench_height_front = _parse_trench_height_front(d.pop("trenchHeightFront", UNSET)) + + def _parse_trench_height_rear(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + trench_height_rear = _parse_trench_height_rear(d.pop("trenchHeightRear", UNSET)) + + def _parse_width_overlap_front_left(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_front_left = _parse_width_overlap_front_left(d.pop("widthOverlapFrontLeft", UNSET)) + + def _parse_width_overlap_front_right(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_front_right = _parse_width_overlap_front_right(d.pop("widthOverlapFrontRight", UNSET)) + + def _parse_width_overlap_rear_left(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_rear_left = _parse_width_overlap_rear_left(d.pop("widthOverlapRearLeft", UNSET)) + + def _parse_width_overlap_rear_right(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_rear_right = _parse_width_overlap_rear_right(d.pop("widthOverlapRearRight", UNSET)) + + def _parse_step(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + step = _parse_step(d.pop("step", UNSET)) + + milling_step_in = cls( + milling_step_name_id=milling_step_name_id, + is_enabled=is_enabled, + status=status, + execution_time=execution_time, + stage_x=stage_x, + stage_y=stage_y, + stage_z=stage_z, + rotation=rotation, + alpha_tilt=alpha_tilt, + beam_type=beam_type, + beam_voltage=beam_voltage, + beam_current=beam_current, + milling_angle=milling_angle, + depth_correction=depth_correction, + lamella_offset=lamella_offset, + trench_height_front=trench_height_front, + trench_height_rear=trench_height_rear, + width_overlap_front_left=width_overlap_front_left, + width_overlap_front_right=width_overlap_front_right, + width_overlap_rear_left=width_overlap_rear_left, + width_overlap_rear_right=width_overlap_rear_right, + step=step, + ) + + return milling_step_in diff --git a/src/lims_utils/expeye_client/models/milling_step_in_beam_type_type_0.py b/src/lims_utils/expeye_client/models/milling_step_in_beam_type_type_0.py new file mode 100644 index 0000000..8d26b63 --- /dev/null +++ b/src/lims_utils/expeye_client/models/milling_step_in_beam_type_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class MillingStepInBeamTypeType0(StrEnum): + ELECTRON = "Electron" + ION = "Ion" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/milling_step_in_status_type_0.py b/src/lims_utils/expeye_client/models/milling_step_in_status_type_0.py new file mode 100644 index 0000000..ce59b4e --- /dev/null +++ b/src/lims_utils/expeye_client/models/milling_step_in_status_type_0.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class MillingStepInStatusType0(StrEnum): + ABORTED = "Aborted" + FAILED = "Failed" + FINISHED = "Finished" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/milling_step_out.py b/src/lims_utils/expeye_client/models/milling_step_out.py new file mode 100644 index 0000000..fc00901 --- /dev/null +++ b/src/lims_utils/expeye_client/models/milling_step_out.py @@ -0,0 +1,546 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..models.milling_step_out_beam_type_type_0 import MillingStepOutBeamTypeType0 +from ..models.milling_step_out_status_type_0 import MillingStepOutStatusType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MillingStepOut") + + +@_attrs_define +class MillingStepOut: + """ + Attributes: + milling_step_id (int): + milling_step_name_id (int | None | Unset): + is_enabled (int | None | Unset): + status (MillingStepOutStatusType0 | None | Unset): + execution_time (float | None | Unset): + stage_x (float | None | Unset): + stage_y (float | None | Unset): + stage_z (float | None | Unset): + rotation (float | None | Unset): + alpha_tilt (float | None | Unset): + beam_type (MillingStepOutBeamTypeType0 | None | Unset): + beam_voltage (float | None | Unset): + beam_current (float | None | Unset): + milling_angle (float | None | Unset): + depth_correction (float | None | Unset): + lamella_offset (float | None | Unset): + trench_height_front (float | None | Unset): + trench_height_rear (float | None | Unset): + width_overlap_front_left (float | None | Unset): + width_overlap_front_right (float | None | Unset): + width_overlap_rear_left (float | None | Unset): + width_overlap_rear_right (float | None | Unset): + step (None | str | Unset): + recipe (None | str | Unset): + grid_square_id (int | None | Unset): + """ + + milling_step_id: int + milling_step_name_id: int | None | Unset = UNSET + is_enabled: int | None | Unset = UNSET + status: MillingStepOutStatusType0 | None | Unset = UNSET + execution_time: float | None | Unset = UNSET + stage_x: float | None | Unset = UNSET + stage_y: float | None | Unset = UNSET + stage_z: float | None | Unset = UNSET + rotation: float | None | Unset = UNSET + alpha_tilt: float | None | Unset = UNSET + beam_type: MillingStepOutBeamTypeType0 | None | Unset = UNSET + beam_voltage: float | None | Unset = UNSET + beam_current: float | None | Unset = UNSET + milling_angle: float | None | Unset = UNSET + depth_correction: float | None | Unset = UNSET + lamella_offset: float | None | Unset = UNSET + trench_height_front: float | None | Unset = UNSET + trench_height_rear: float | None | Unset = UNSET + width_overlap_front_left: float | None | Unset = UNSET + width_overlap_front_right: float | None | Unset = UNSET + width_overlap_rear_left: float | None | Unset = UNSET + width_overlap_rear_right: float | None | Unset = UNSET + step: None | str | Unset = UNSET + recipe: None | str | Unset = UNSET + grid_square_id: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + milling_step_id = self.milling_step_id + + milling_step_name_id: int | None | Unset + if isinstance(self.milling_step_name_id, Unset): + milling_step_name_id = UNSET + else: + milling_step_name_id = self.milling_step_name_id + + is_enabled: int | None | Unset + if isinstance(self.is_enabled, Unset): + is_enabled = UNSET + else: + is_enabled = self.is_enabled + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + elif isinstance(self.status, MillingStepOutStatusType0): + status = self.status.value + else: + status = self.status + + execution_time: float | None | Unset + if isinstance(self.execution_time, Unset): + execution_time = UNSET + else: + execution_time = self.execution_time + + stage_x: float | None | Unset + if isinstance(self.stage_x, Unset): + stage_x = UNSET + else: + stage_x = self.stage_x + + stage_y: float | None | Unset + if isinstance(self.stage_y, Unset): + stage_y = UNSET + else: + stage_y = self.stage_y + + stage_z: float | None | Unset + if isinstance(self.stage_z, Unset): + stage_z = UNSET + else: + stage_z = self.stage_z + + rotation: float | None | Unset + if isinstance(self.rotation, Unset): + rotation = UNSET + else: + rotation = self.rotation + + alpha_tilt: float | None | Unset + if isinstance(self.alpha_tilt, Unset): + alpha_tilt = UNSET + else: + alpha_tilt = self.alpha_tilt + + beam_type: None | str | Unset + if isinstance(self.beam_type, Unset): + beam_type = UNSET + elif isinstance(self.beam_type, MillingStepOutBeamTypeType0): + beam_type = self.beam_type.value + else: + beam_type = self.beam_type + + beam_voltage: float | None | Unset + if isinstance(self.beam_voltage, Unset): + beam_voltage = UNSET + else: + beam_voltage = self.beam_voltage + + beam_current: float | None | Unset + if isinstance(self.beam_current, Unset): + beam_current = UNSET + else: + beam_current = self.beam_current + + milling_angle: float | None | Unset + if isinstance(self.milling_angle, Unset): + milling_angle = UNSET + else: + milling_angle = self.milling_angle + + depth_correction: float | None | Unset + if isinstance(self.depth_correction, Unset): + depth_correction = UNSET + else: + depth_correction = self.depth_correction + + lamella_offset: float | None | Unset + if isinstance(self.lamella_offset, Unset): + lamella_offset = UNSET + else: + lamella_offset = self.lamella_offset + + trench_height_front: float | None | Unset + if isinstance(self.trench_height_front, Unset): + trench_height_front = UNSET + else: + trench_height_front = self.trench_height_front + + trench_height_rear: float | None | Unset + if isinstance(self.trench_height_rear, Unset): + trench_height_rear = UNSET + else: + trench_height_rear = self.trench_height_rear + + width_overlap_front_left: float | None | Unset + if isinstance(self.width_overlap_front_left, Unset): + width_overlap_front_left = UNSET + else: + width_overlap_front_left = self.width_overlap_front_left + + width_overlap_front_right: float | None | Unset + if isinstance(self.width_overlap_front_right, Unset): + width_overlap_front_right = UNSET + else: + width_overlap_front_right = self.width_overlap_front_right + + width_overlap_rear_left: float | None | Unset + if isinstance(self.width_overlap_rear_left, Unset): + width_overlap_rear_left = UNSET + else: + width_overlap_rear_left = self.width_overlap_rear_left + + width_overlap_rear_right: float | None | Unset + if isinstance(self.width_overlap_rear_right, Unset): + width_overlap_rear_right = UNSET + else: + width_overlap_rear_right = self.width_overlap_rear_right + + step: None | str | Unset + if isinstance(self.step, Unset): + step = UNSET + else: + step = self.step + + recipe: None | str | Unset + if isinstance(self.recipe, Unset): + recipe = UNSET + else: + recipe = self.recipe + + grid_square_id: int | None | Unset + if isinstance(self.grid_square_id, Unset): + grid_square_id = UNSET + else: + grid_square_id = self.grid_square_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "millingStepId": milling_step_id, + } + ) + if milling_step_name_id is not UNSET: + field_dict["millingStepNameId"] = milling_step_name_id + if is_enabled is not UNSET: + field_dict["isEnabled"] = is_enabled + if status is not UNSET: + field_dict["status"] = status + if execution_time is not UNSET: + field_dict["executionTime"] = execution_time + if stage_x is not UNSET: + field_dict["stageX"] = stage_x + if stage_y is not UNSET: + field_dict["stageY"] = stage_y + if stage_z is not UNSET: + field_dict["stageZ"] = stage_z + if rotation is not UNSET: + field_dict["rotation"] = rotation + if alpha_tilt is not UNSET: + field_dict["alphaTilt"] = alpha_tilt + if beam_type is not UNSET: + field_dict["beamType"] = beam_type + if beam_voltage is not UNSET: + field_dict["beamVoltage"] = beam_voltage + if beam_current is not UNSET: + field_dict["beamCurrent"] = beam_current + if milling_angle is not UNSET: + field_dict["millingAngle"] = milling_angle + if depth_correction is not UNSET: + field_dict["depthCorrection"] = depth_correction + if lamella_offset is not UNSET: + field_dict["lamellaOffset"] = lamella_offset + if trench_height_front is not UNSET: + field_dict["trenchHeightFront"] = trench_height_front + if trench_height_rear is not UNSET: + field_dict["trenchHeightRear"] = trench_height_rear + if width_overlap_front_left is not UNSET: + field_dict["widthOverlapFrontLeft"] = width_overlap_front_left + if width_overlap_front_right is not UNSET: + field_dict["widthOverlapFrontRight"] = width_overlap_front_right + if width_overlap_rear_left is not UNSET: + field_dict["widthOverlapRearLeft"] = width_overlap_rear_left + if width_overlap_rear_right is not UNSET: + field_dict["widthOverlapRearRight"] = width_overlap_rear_right + if step is not UNSET: + field_dict["step"] = step + if recipe is not UNSET: + field_dict["recipe"] = recipe + if grid_square_id is not UNSET: + field_dict["gridSquareId"] = grid_square_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + milling_step_id = d.pop("millingStepId") + + def _parse_milling_step_name_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + milling_step_name_id = _parse_milling_step_name_id(d.pop("millingStepNameId", UNSET)) + + def _parse_is_enabled(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_enabled = _parse_is_enabled(d.pop("isEnabled", UNSET)) + + def _parse_status(data: object) -> MillingStepOutStatusType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + status_type_0 = MillingStepOutStatusType0(data) + + return status_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MillingStepOutStatusType0 | None | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_execution_time(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + execution_time = _parse_execution_time(d.pop("executionTime", UNSET)) + + def _parse_stage_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_x = _parse_stage_x(d.pop("stageX", UNSET)) + + def _parse_stage_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_y = _parse_stage_y(d.pop("stageY", UNSET)) + + def _parse_stage_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + stage_z = _parse_stage_z(d.pop("stageZ", UNSET)) + + def _parse_rotation(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + rotation = _parse_rotation(d.pop("rotation", UNSET)) + + def _parse_alpha_tilt(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + alpha_tilt = _parse_alpha_tilt(d.pop("alphaTilt", UNSET)) + + def _parse_beam_type(data: object) -> MillingStepOutBeamTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + beam_type_type_0 = MillingStepOutBeamTypeType0(data) + + return beam_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MillingStepOutBeamTypeType0 | None | Unset, data) + + beam_type = _parse_beam_type(d.pop("beamType", UNSET)) + + def _parse_beam_voltage(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_voltage = _parse_beam_voltage(d.pop("beamVoltage", UNSET)) + + def _parse_beam_current(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + beam_current = _parse_beam_current(d.pop("beamCurrent", UNSET)) + + def _parse_milling_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + milling_angle = _parse_milling_angle(d.pop("millingAngle", UNSET)) + + def _parse_depth_correction(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + depth_correction = _parse_depth_correction(d.pop("depthCorrection", UNSET)) + + def _parse_lamella_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + lamella_offset = _parse_lamella_offset(d.pop("lamellaOffset", UNSET)) + + def _parse_trench_height_front(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + trench_height_front = _parse_trench_height_front(d.pop("trenchHeightFront", UNSET)) + + def _parse_trench_height_rear(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + trench_height_rear = _parse_trench_height_rear(d.pop("trenchHeightRear", UNSET)) + + def _parse_width_overlap_front_left(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_front_left = _parse_width_overlap_front_left(d.pop("widthOverlapFrontLeft", UNSET)) + + def _parse_width_overlap_front_right(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_front_right = _parse_width_overlap_front_right(d.pop("widthOverlapFrontRight", UNSET)) + + def _parse_width_overlap_rear_left(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_rear_left = _parse_width_overlap_rear_left(d.pop("widthOverlapRearLeft", UNSET)) + + def _parse_width_overlap_rear_right(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + width_overlap_rear_right = _parse_width_overlap_rear_right(d.pop("widthOverlapRearRight", UNSET)) + + def _parse_step(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + step = _parse_step(d.pop("step", UNSET)) + + def _parse_recipe(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recipe = _parse_recipe(d.pop("recipe", UNSET)) + + def _parse_grid_square_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + grid_square_id = _parse_grid_square_id(d.pop("gridSquareId", UNSET)) + + milling_step_out = cls( + milling_step_id=milling_step_id, + milling_step_name_id=milling_step_name_id, + is_enabled=is_enabled, + status=status, + execution_time=execution_time, + stage_x=stage_x, + stage_y=stage_y, + stage_z=stage_z, + rotation=rotation, + alpha_tilt=alpha_tilt, + beam_type=beam_type, + beam_voltage=beam_voltage, + beam_current=beam_current, + milling_angle=milling_angle, + depth_correction=depth_correction, + lamella_offset=lamella_offset, + trench_height_front=trench_height_front, + trench_height_rear=trench_height_rear, + width_overlap_front_left=width_overlap_front_left, + width_overlap_front_right=width_overlap_front_right, + width_overlap_rear_left=width_overlap_rear_left, + width_overlap_rear_right=width_overlap_rear_right, + step=step, + recipe=recipe, + grid_square_id=grid_square_id, + ) + + return milling_step_out diff --git a/src/lims_utils/expeye_client/models/milling_step_out_beam_type_type_0.py b/src/lims_utils/expeye_client/models/milling_step_out_beam_type_type_0.py new file mode 100644 index 0000000..bc485c6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/milling_step_out_beam_type_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class MillingStepOutBeamTypeType0(StrEnum): + ELECTRON = "Electron" + ION = "Ion" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/milling_step_out_status_type_0.py b/src/lims_utils/expeye_client/models/milling_step_out_status_type_0.py new file mode 100644 index 0000000..7ff4fb3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/milling_step_out_status_type_0.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class MillingStepOutStatusType0(StrEnum): + ABORTED = "Aborted" + FAILED = "Failed" + FINISHED = "Finished" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/motion_correction_optional.py b/src/lims_utils/expeye_client/models/motion_correction_optional.py new file mode 100644 index 0000000..58bcb46 --- /dev/null +++ b/src/lims_utils/expeye_client/models/motion_correction_optional.py @@ -0,0 +1,354 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MotionCorrectionOptional") + + +@_attrs_define +class MotionCorrectionOptional: + """ + Attributes: + auto_proc_program_id (int | None | Unset): + image_number (int | None | Unset): + first_frame (int | None | Unset): + last_frame (int | None | Unset): + dose_per_frame (float | None | Unset): + dose_weight (float | None | Unset): + total_motion (float | None | Unset): + average_motion_per_frame (float | None | Unset): + drift_plot_full_path (None | str | Unset): + micrograph_full_path (None | str | Unset): + micrograph_snapshot_full_path (None | str | Unset): + patches_used_x (int | None | Unset): + patches_used_y (int | None | Unset): + fft_full_path (None | str | Unset): + fft_corrected_full_path (None | str | Unset): + comments (None | str | Unset): + """ + + auto_proc_program_id: int | None | Unset = UNSET + image_number: int | None | Unset = UNSET + first_frame: int | None | Unset = UNSET + last_frame: int | None | Unset = UNSET + dose_per_frame: float | None | Unset = UNSET + dose_weight: float | None | Unset = UNSET + total_motion: float | None | Unset = UNSET + average_motion_per_frame: float | None | Unset = UNSET + drift_plot_full_path: None | str | Unset = UNSET + micrograph_full_path: None | str | Unset = UNSET + micrograph_snapshot_full_path: None | str | Unset = UNSET + patches_used_x: int | None | Unset = UNSET + patches_used_y: int | None | Unset = UNSET + fft_full_path: None | str | Unset = UNSET + fft_corrected_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + auto_proc_program_id: int | None | Unset + if isinstance(self.auto_proc_program_id, Unset): + auto_proc_program_id = UNSET + else: + auto_proc_program_id = self.auto_proc_program_id + + image_number: int | None | Unset + if isinstance(self.image_number, Unset): + image_number = UNSET + else: + image_number = self.image_number + + first_frame: int | None | Unset + if isinstance(self.first_frame, Unset): + first_frame = UNSET + else: + first_frame = self.first_frame + + last_frame: int | None | Unset + if isinstance(self.last_frame, Unset): + last_frame = UNSET + else: + last_frame = self.last_frame + + dose_per_frame: float | None | Unset + if isinstance(self.dose_per_frame, Unset): + dose_per_frame = UNSET + else: + dose_per_frame = self.dose_per_frame + + dose_weight: float | None | Unset + if isinstance(self.dose_weight, Unset): + dose_weight = UNSET + else: + dose_weight = self.dose_weight + + total_motion: float | None | Unset + if isinstance(self.total_motion, Unset): + total_motion = UNSET + else: + total_motion = self.total_motion + + average_motion_per_frame: float | None | Unset + if isinstance(self.average_motion_per_frame, Unset): + average_motion_per_frame = UNSET + else: + average_motion_per_frame = self.average_motion_per_frame + + drift_plot_full_path: None | str | Unset + if isinstance(self.drift_plot_full_path, Unset): + drift_plot_full_path = UNSET + else: + drift_plot_full_path = self.drift_plot_full_path + + micrograph_full_path: None | str | Unset + if isinstance(self.micrograph_full_path, Unset): + micrograph_full_path = UNSET + else: + micrograph_full_path = self.micrograph_full_path + + micrograph_snapshot_full_path: None | str | Unset + if isinstance(self.micrograph_snapshot_full_path, Unset): + micrograph_snapshot_full_path = UNSET + else: + micrograph_snapshot_full_path = self.micrograph_snapshot_full_path + + patches_used_x: int | None | Unset + if isinstance(self.patches_used_x, Unset): + patches_used_x = UNSET + else: + patches_used_x = self.patches_used_x + + patches_used_y: int | None | Unset + if isinstance(self.patches_used_y, Unset): + patches_used_y = UNSET + else: + patches_used_y = self.patches_used_y + + fft_full_path: None | str | Unset + if isinstance(self.fft_full_path, Unset): + fft_full_path = UNSET + else: + fft_full_path = self.fft_full_path + + fft_corrected_full_path: None | str | Unset + if isinstance(self.fft_corrected_full_path, Unset): + fft_corrected_full_path = UNSET + else: + fft_corrected_full_path = self.fft_corrected_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if auto_proc_program_id is not UNSET: + field_dict["autoProcProgramId"] = auto_proc_program_id + if image_number is not UNSET: + field_dict["imageNumber"] = image_number + if first_frame is not UNSET: + field_dict["firstFrame"] = first_frame + if last_frame is not UNSET: + field_dict["lastFrame"] = last_frame + if dose_per_frame is not UNSET: + field_dict["dosePerFrame"] = dose_per_frame + if dose_weight is not UNSET: + field_dict["doseWeight"] = dose_weight + if total_motion is not UNSET: + field_dict["totalMotion"] = total_motion + if average_motion_per_frame is not UNSET: + field_dict["averageMotionPerFrame"] = average_motion_per_frame + if drift_plot_full_path is not UNSET: + field_dict["driftPlotFullPath"] = drift_plot_full_path + if micrograph_full_path is not UNSET: + field_dict["micrographFullPath"] = micrograph_full_path + if micrograph_snapshot_full_path is not UNSET: + field_dict["micrographSnapshotFullPath"] = micrograph_snapshot_full_path + if patches_used_x is not UNSET: + field_dict["patchesUsedX"] = patches_used_x + if patches_used_y is not UNSET: + field_dict["patchesUsedY"] = patches_used_y + if fft_full_path is not UNSET: + field_dict["fftFullPath"] = fft_full_path + if fft_corrected_full_path is not UNSET: + field_dict["fftCorrectedFullPath"] = fft_corrected_full_path + if comments is not UNSET: + field_dict["comments"] = comments + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_proc_program_id = _parse_auto_proc_program_id(d.pop("autoProcProgramId", UNSET)) + + def _parse_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_number = _parse_image_number(d.pop("imageNumber", UNSET)) + + def _parse_first_frame(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_frame = _parse_first_frame(d.pop("firstFrame", UNSET)) + + def _parse_last_frame(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + last_frame = _parse_last_frame(d.pop("lastFrame", UNSET)) + + def _parse_dose_per_frame(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dose_per_frame = _parse_dose_per_frame(d.pop("dosePerFrame", UNSET)) + + def _parse_dose_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dose_weight = _parse_dose_weight(d.pop("doseWeight", UNSET)) + + def _parse_total_motion(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_motion = _parse_total_motion(d.pop("totalMotion", UNSET)) + + def _parse_average_motion_per_frame(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + average_motion_per_frame = _parse_average_motion_per_frame(d.pop("averageMotionPerFrame", UNSET)) + + def _parse_drift_plot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + drift_plot_full_path = _parse_drift_plot_full_path(d.pop("driftPlotFullPath", UNSET)) + + def _parse_micrograph_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + micrograph_full_path = _parse_micrograph_full_path(d.pop("micrographFullPath", UNSET)) + + def _parse_micrograph_snapshot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + micrograph_snapshot_full_path = _parse_micrograph_snapshot_full_path(d.pop("micrographSnapshotFullPath", UNSET)) + + def _parse_patches_used_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_used_x = _parse_patches_used_x(d.pop("patchesUsedX", UNSET)) + + def _parse_patches_used_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_used_y = _parse_patches_used_y(d.pop("patchesUsedY", UNSET)) + + def _parse_fft_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_full_path = _parse_fft_full_path(d.pop("fftFullPath", UNSET)) + + def _parse_fft_corrected_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_corrected_full_path = _parse_fft_corrected_full_path(d.pop("fftCorrectedFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + motion_correction_optional = cls( + auto_proc_program_id=auto_proc_program_id, + image_number=image_number, + first_frame=first_frame, + last_frame=last_frame, + dose_per_frame=dose_per_frame, + dose_weight=dose_weight, + total_motion=total_motion, + average_motion_per_frame=average_motion_per_frame, + drift_plot_full_path=drift_plot_full_path, + micrograph_full_path=micrograph_full_path, + micrograph_snapshot_full_path=micrograph_snapshot_full_path, + patches_used_x=patches_used_x, + patches_used_y=patches_used_y, + fft_full_path=fft_full_path, + fft_corrected_full_path=fft_corrected_full_path, + comments=comments, + ) + + return motion_correction_optional diff --git a/src/lims_utils/expeye_client/models/motion_correction_out.py b/src/lims_utils/expeye_client/models/motion_correction_out.py new file mode 100644 index 0000000..5e721f8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/motion_correction_out.py @@ -0,0 +1,404 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MotionCorrectionOut") + + +@_attrs_define +class MotionCorrectionOut: + """ + Attributes: + motion_correction_id (int): + auto_proc_program_id (int | None | Unset): + image_number (int | None | Unset): + first_frame (int | None | Unset): + last_frame (int | None | Unset): + dose_per_frame (float | None | Unset): + dose_weight (float | None | Unset): + total_motion (float | None | Unset): + average_motion_per_frame (float | None | Unset): + drift_plot_full_path (None | str | Unset): + micrograph_full_path (None | str | Unset): + micrograph_snapshot_full_path (None | str | Unset): + patches_used_x (int | None | Unset): + patches_used_y (int | None | Unset): + fft_full_path (None | str | Unset): + fft_corrected_full_path (None | str | Unset): + comments (None | str | Unset): + movie_id (int | None | Unset): + data_collection_id (int | None | Unset): + """ + + motion_correction_id: int + auto_proc_program_id: int | None | Unset = UNSET + image_number: int | None | Unset = UNSET + first_frame: int | None | Unset = UNSET + last_frame: int | None | Unset = UNSET + dose_per_frame: float | None | Unset = UNSET + dose_weight: float | None | Unset = UNSET + total_motion: float | None | Unset = UNSET + average_motion_per_frame: float | None | Unset = UNSET + drift_plot_full_path: None | str | Unset = UNSET + micrograph_full_path: None | str | Unset = UNSET + micrograph_snapshot_full_path: None | str | Unset = UNSET + patches_used_x: int | None | Unset = UNSET + patches_used_y: int | None | Unset = UNSET + fft_full_path: None | str | Unset = UNSET + fft_corrected_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + movie_id: int | None | Unset = UNSET + data_collection_id: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + motion_correction_id = self.motion_correction_id + + auto_proc_program_id: int | None | Unset + if isinstance(self.auto_proc_program_id, Unset): + auto_proc_program_id = UNSET + else: + auto_proc_program_id = self.auto_proc_program_id + + image_number: int | None | Unset + if isinstance(self.image_number, Unset): + image_number = UNSET + else: + image_number = self.image_number + + first_frame: int | None | Unset + if isinstance(self.first_frame, Unset): + first_frame = UNSET + else: + first_frame = self.first_frame + + last_frame: int | None | Unset + if isinstance(self.last_frame, Unset): + last_frame = UNSET + else: + last_frame = self.last_frame + + dose_per_frame: float | None | Unset + if isinstance(self.dose_per_frame, Unset): + dose_per_frame = UNSET + else: + dose_per_frame = self.dose_per_frame + + dose_weight: float | None | Unset + if isinstance(self.dose_weight, Unset): + dose_weight = UNSET + else: + dose_weight = self.dose_weight + + total_motion: float | None | Unset + if isinstance(self.total_motion, Unset): + total_motion = UNSET + else: + total_motion = self.total_motion + + average_motion_per_frame: float | None | Unset + if isinstance(self.average_motion_per_frame, Unset): + average_motion_per_frame = UNSET + else: + average_motion_per_frame = self.average_motion_per_frame + + drift_plot_full_path: None | str | Unset + if isinstance(self.drift_plot_full_path, Unset): + drift_plot_full_path = UNSET + else: + drift_plot_full_path = self.drift_plot_full_path + + micrograph_full_path: None | str | Unset + if isinstance(self.micrograph_full_path, Unset): + micrograph_full_path = UNSET + else: + micrograph_full_path = self.micrograph_full_path + + micrograph_snapshot_full_path: None | str | Unset + if isinstance(self.micrograph_snapshot_full_path, Unset): + micrograph_snapshot_full_path = UNSET + else: + micrograph_snapshot_full_path = self.micrograph_snapshot_full_path + + patches_used_x: int | None | Unset + if isinstance(self.patches_used_x, Unset): + patches_used_x = UNSET + else: + patches_used_x = self.patches_used_x + + patches_used_y: int | None | Unset + if isinstance(self.patches_used_y, Unset): + patches_used_y = UNSET + else: + patches_used_y = self.patches_used_y + + fft_full_path: None | str | Unset + if isinstance(self.fft_full_path, Unset): + fft_full_path = UNSET + else: + fft_full_path = self.fft_full_path + + fft_corrected_full_path: None | str | Unset + if isinstance(self.fft_corrected_full_path, Unset): + fft_corrected_full_path = UNSET + else: + fft_corrected_full_path = self.fft_corrected_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + movie_id: int | None | Unset + if isinstance(self.movie_id, Unset): + movie_id = UNSET + else: + movie_id = self.movie_id + + data_collection_id: int | None | Unset + if isinstance(self.data_collection_id, Unset): + data_collection_id = UNSET + else: + data_collection_id = self.data_collection_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "motionCorrectionId": motion_correction_id, + } + ) + if auto_proc_program_id is not UNSET: + field_dict["autoProcProgramId"] = auto_proc_program_id + if image_number is not UNSET: + field_dict["imageNumber"] = image_number + if first_frame is not UNSET: + field_dict["firstFrame"] = first_frame + if last_frame is not UNSET: + field_dict["lastFrame"] = last_frame + if dose_per_frame is not UNSET: + field_dict["dosePerFrame"] = dose_per_frame + if dose_weight is not UNSET: + field_dict["doseWeight"] = dose_weight + if total_motion is not UNSET: + field_dict["totalMotion"] = total_motion + if average_motion_per_frame is not UNSET: + field_dict["averageMotionPerFrame"] = average_motion_per_frame + if drift_plot_full_path is not UNSET: + field_dict["driftPlotFullPath"] = drift_plot_full_path + if micrograph_full_path is not UNSET: + field_dict["micrographFullPath"] = micrograph_full_path + if micrograph_snapshot_full_path is not UNSET: + field_dict["micrographSnapshotFullPath"] = micrograph_snapshot_full_path + if patches_used_x is not UNSET: + field_dict["patchesUsedX"] = patches_used_x + if patches_used_y is not UNSET: + field_dict["patchesUsedY"] = patches_used_y + if fft_full_path is not UNSET: + field_dict["fftFullPath"] = fft_full_path + if fft_corrected_full_path is not UNSET: + field_dict["fftCorrectedFullPath"] = fft_corrected_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if movie_id is not UNSET: + field_dict["movieId"] = movie_id + if data_collection_id is not UNSET: + field_dict["dataCollectionId"] = data_collection_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + motion_correction_id = d.pop("motionCorrectionId") + + def _parse_auto_proc_program_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + auto_proc_program_id = _parse_auto_proc_program_id(d.pop("autoProcProgramId", UNSET)) + + def _parse_image_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + image_number = _parse_image_number(d.pop("imageNumber", UNSET)) + + def _parse_first_frame(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + first_frame = _parse_first_frame(d.pop("firstFrame", UNSET)) + + def _parse_last_frame(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + last_frame = _parse_last_frame(d.pop("lastFrame", UNSET)) + + def _parse_dose_per_frame(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dose_per_frame = _parse_dose_per_frame(d.pop("dosePerFrame", UNSET)) + + def _parse_dose_weight(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + dose_weight = _parse_dose_weight(d.pop("doseWeight", UNSET)) + + def _parse_total_motion(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + total_motion = _parse_total_motion(d.pop("totalMotion", UNSET)) + + def _parse_average_motion_per_frame(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + average_motion_per_frame = _parse_average_motion_per_frame(d.pop("averageMotionPerFrame", UNSET)) + + def _parse_drift_plot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + drift_plot_full_path = _parse_drift_plot_full_path(d.pop("driftPlotFullPath", UNSET)) + + def _parse_micrograph_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + micrograph_full_path = _parse_micrograph_full_path(d.pop("micrographFullPath", UNSET)) + + def _parse_micrograph_snapshot_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + micrograph_snapshot_full_path = _parse_micrograph_snapshot_full_path(d.pop("micrographSnapshotFullPath", UNSET)) + + def _parse_patches_used_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_used_x = _parse_patches_used_x(d.pop("patchesUsedX", UNSET)) + + def _parse_patches_used_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + patches_used_y = _parse_patches_used_y(d.pop("patchesUsedY", UNSET)) + + def _parse_fft_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_full_path = _parse_fft_full_path(d.pop("fftFullPath", UNSET)) + + def _parse_fft_corrected_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fft_corrected_full_path = _parse_fft_corrected_full_path(d.pop("fftCorrectedFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_movie_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + movie_id = _parse_movie_id(d.pop("movieId", UNSET)) + + def _parse_data_collection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_id = _parse_data_collection_id(d.pop("dataCollectionId", UNSET)) + + motion_correction_out = cls( + motion_correction_id=motion_correction_id, + auto_proc_program_id=auto_proc_program_id, + image_number=image_number, + first_frame=first_frame, + last_frame=last_frame, + dose_per_frame=dose_per_frame, + dose_weight=dose_weight, + total_motion=total_motion, + average_motion_per_frame=average_motion_per_frame, + drift_plot_full_path=drift_plot_full_path, + micrograph_full_path=micrograph_full_path, + micrograph_snapshot_full_path=micrograph_snapshot_full_path, + patches_used_x=patches_used_x, + patches_used_y=patches_used_y, + fft_full_path=fft_full_path, + fft_corrected_full_path=fft_corrected_full_path, + comments=comments, + movie_id=movie_id, + data_collection_id=data_collection_id, + ) + + return motion_correction_out diff --git a/src/lims_utils/expeye_client/models/movie_optional.py b/src/lims_utils/expeye_client/models/movie_optional.py new file mode 100644 index 0000000..fd65c8c --- /dev/null +++ b/src/lims_utils/expeye_client/models/movie_optional.py @@ -0,0 +1,231 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MovieOptional") + + +@_attrs_define +class MovieOptional: + """ + Attributes: + movie_number (int | None | Unset): + movie_full_path (None | str | Unset): + created_time_stamp (datetime.datetime | Unset): + position_x (float | None | Unset): + position_y (float | None | Unset): + nominal_defocus (float | None | Unset): + angle (float | None | Unset): + fluence (float | None | Unset): + number_of_frames (int | None | Unset): + foil_hole_id (int | None | Unset): + """ + + movie_number: int | None | Unset = UNSET + movie_full_path: None | str | Unset = UNSET + created_time_stamp: datetime.datetime | Unset = UNSET + position_x: float | None | Unset = UNSET + position_y: float | None | Unset = UNSET + nominal_defocus: float | None | Unset = UNSET + angle: float | None | Unset = UNSET + fluence: float | None | Unset = UNSET + number_of_frames: int | None | Unset = UNSET + foil_hole_id: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + movie_number: int | None | Unset + if isinstance(self.movie_number, Unset): + movie_number = UNSET + else: + movie_number = self.movie_number + + movie_full_path: None | str | Unset + if isinstance(self.movie_full_path, Unset): + movie_full_path = UNSET + else: + movie_full_path = self.movie_full_path + + created_time_stamp: str | Unset = UNSET + if not isinstance(self.created_time_stamp, Unset): + created_time_stamp = self.created_time_stamp.isoformat() + + position_x: float | None | Unset + if isinstance(self.position_x, Unset): + position_x = UNSET + else: + position_x = self.position_x + + position_y: float | None | Unset + if isinstance(self.position_y, Unset): + position_y = UNSET + else: + position_y = self.position_y + + nominal_defocus: float | None | Unset + if isinstance(self.nominal_defocus, Unset): + nominal_defocus = UNSET + else: + nominal_defocus = self.nominal_defocus + + angle: float | None | Unset + if isinstance(self.angle, Unset): + angle = UNSET + else: + angle = self.angle + + fluence: float | None | Unset + if isinstance(self.fluence, Unset): + fluence = UNSET + else: + fluence = self.fluence + + number_of_frames: int | None | Unset + if isinstance(self.number_of_frames, Unset): + number_of_frames = UNSET + else: + number_of_frames = self.number_of_frames + + foil_hole_id: int | None | Unset + if isinstance(self.foil_hole_id, Unset): + foil_hole_id = UNSET + else: + foil_hole_id = self.foil_hole_id + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if movie_number is not UNSET: + field_dict["movieNumber"] = movie_number + if movie_full_path is not UNSET: + field_dict["movieFullPath"] = movie_full_path + if created_time_stamp is not UNSET: + field_dict["createdTimeStamp"] = created_time_stamp + if position_x is not UNSET: + field_dict["positionX"] = position_x + if position_y is not UNSET: + field_dict["positionY"] = position_y + if nominal_defocus is not UNSET: + field_dict["nominalDefocus"] = nominal_defocus + if angle is not UNSET: + field_dict["angle"] = angle + if fluence is not UNSET: + field_dict["fluence"] = fluence + if number_of_frames is not UNSET: + field_dict["numberOfFrames"] = number_of_frames + if foil_hole_id is not UNSET: + field_dict["foilHoleId"] = foil_hole_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_movie_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + movie_number = _parse_movie_number(d.pop("movieNumber", UNSET)) + + def _parse_movie_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + movie_full_path = _parse_movie_full_path(d.pop("movieFullPath", UNSET)) + + _created_time_stamp = d.pop("createdTimeStamp", UNSET) + created_time_stamp: datetime.datetime | Unset + if isinstance(_created_time_stamp, Unset): + created_time_stamp = UNSET + else: + created_time_stamp = datetime.datetime.fromisoformat(_created_time_stamp) + + def _parse_position_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + position_x = _parse_position_x(d.pop("positionX", UNSET)) + + def _parse_position_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + position_y = _parse_position_y(d.pop("positionY", UNSET)) + + def _parse_nominal_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + nominal_defocus = _parse_nominal_defocus(d.pop("nominalDefocus", UNSET)) + + def _parse_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + angle = _parse_angle(d.pop("angle", UNSET)) + + def _parse_fluence(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + fluence = _parse_fluence(d.pop("fluence", UNSET)) + + def _parse_number_of_frames(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_frames = _parse_number_of_frames(d.pop("numberOfFrames", UNSET)) + + def _parse_foil_hole_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + foil_hole_id = _parse_foil_hole_id(d.pop("foilHoleId", UNSET)) + + movie_optional = cls( + movie_number=movie_number, + movie_full_path=movie_full_path, + created_time_stamp=created_time_stamp, + position_x=position_x, + position_y=position_y, + nominal_defocus=nominal_defocus, + angle=angle, + fluence=fluence, + number_of_frames=number_of_frames, + foil_hole_id=foil_hole_id, + ) + + return movie_optional diff --git a/src/lims_utils/expeye_client/models/movie_out.py b/src/lims_utils/expeye_client/models/movie_out.py new file mode 100644 index 0000000..c60f8b2 --- /dev/null +++ b/src/lims_utils/expeye_client/models/movie_out.py @@ -0,0 +1,241 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MovieOut") + + +@_attrs_define +class MovieOut: + """ + Attributes: + movie_id (int): + movie_number (int | None | Unset): + movie_full_path (None | str | Unset): + created_time_stamp (datetime.datetime | Unset): + position_x (float | None | Unset): + position_y (float | None | Unset): + nominal_defocus (float | None | Unset): + angle (float | None | Unset): + fluence (float | None | Unset): + number_of_frames (int | None | Unset): + foil_hole_id (int | None | Unset): + """ + + movie_id: int + movie_number: int | None | Unset = UNSET + movie_full_path: None | str | Unset = UNSET + created_time_stamp: datetime.datetime | Unset = UNSET + position_x: float | None | Unset = UNSET + position_y: float | None | Unset = UNSET + nominal_defocus: float | None | Unset = UNSET + angle: float | None | Unset = UNSET + fluence: float | None | Unset = UNSET + number_of_frames: int | None | Unset = UNSET + foil_hole_id: int | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + movie_id = self.movie_id + + movie_number: int | None | Unset + if isinstance(self.movie_number, Unset): + movie_number = UNSET + else: + movie_number = self.movie_number + + movie_full_path: None | str | Unset + if isinstance(self.movie_full_path, Unset): + movie_full_path = UNSET + else: + movie_full_path = self.movie_full_path + + created_time_stamp: str | Unset = UNSET + if not isinstance(self.created_time_stamp, Unset): + created_time_stamp = self.created_time_stamp.isoformat() + + position_x: float | None | Unset + if isinstance(self.position_x, Unset): + position_x = UNSET + else: + position_x = self.position_x + + position_y: float | None | Unset + if isinstance(self.position_y, Unset): + position_y = UNSET + else: + position_y = self.position_y + + nominal_defocus: float | None | Unset + if isinstance(self.nominal_defocus, Unset): + nominal_defocus = UNSET + else: + nominal_defocus = self.nominal_defocus + + angle: float | None | Unset + if isinstance(self.angle, Unset): + angle = UNSET + else: + angle = self.angle + + fluence: float | None | Unset + if isinstance(self.fluence, Unset): + fluence = UNSET + else: + fluence = self.fluence + + number_of_frames: int | None | Unset + if isinstance(self.number_of_frames, Unset): + number_of_frames = UNSET + else: + number_of_frames = self.number_of_frames + + foil_hole_id: int | None | Unset + if isinstance(self.foil_hole_id, Unset): + foil_hole_id = UNSET + else: + foil_hole_id = self.foil_hole_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "movieId": movie_id, + } + ) + if movie_number is not UNSET: + field_dict["movieNumber"] = movie_number + if movie_full_path is not UNSET: + field_dict["movieFullPath"] = movie_full_path + if created_time_stamp is not UNSET: + field_dict["createdTimeStamp"] = created_time_stamp + if position_x is not UNSET: + field_dict["positionX"] = position_x + if position_y is not UNSET: + field_dict["positionY"] = position_y + if nominal_defocus is not UNSET: + field_dict["nominalDefocus"] = nominal_defocus + if angle is not UNSET: + field_dict["angle"] = angle + if fluence is not UNSET: + field_dict["fluence"] = fluence + if number_of_frames is not UNSET: + field_dict["numberOfFrames"] = number_of_frames + if foil_hole_id is not UNSET: + field_dict["foilHoleId"] = foil_hole_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + movie_id = d.pop("movieId") + + def _parse_movie_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + movie_number = _parse_movie_number(d.pop("movieNumber", UNSET)) + + def _parse_movie_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + movie_full_path = _parse_movie_full_path(d.pop("movieFullPath", UNSET)) + + _created_time_stamp = d.pop("createdTimeStamp", UNSET) + created_time_stamp: datetime.datetime | Unset + if isinstance(_created_time_stamp, Unset): + created_time_stamp = UNSET + else: + created_time_stamp = datetime.datetime.fromisoformat(_created_time_stamp) + + def _parse_position_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + position_x = _parse_position_x(d.pop("positionX", UNSET)) + + def _parse_position_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + position_y = _parse_position_y(d.pop("positionY", UNSET)) + + def _parse_nominal_defocus(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + nominal_defocus = _parse_nominal_defocus(d.pop("nominalDefocus", UNSET)) + + def _parse_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + angle = _parse_angle(d.pop("angle", UNSET)) + + def _parse_fluence(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + fluence = _parse_fluence(d.pop("fluence", UNSET)) + + def _parse_number_of_frames(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + number_of_frames = _parse_number_of_frames(d.pop("numberOfFrames", UNSET)) + + def _parse_foil_hole_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + foil_hole_id = _parse_foil_hole_id(d.pop("foilHoleId", UNSET)) + + movie_out = cls( + movie_id=movie_id, + movie_number=movie_number, + movie_full_path=movie_full_path, + created_time_stamp=created_time_stamp, + position_x=position_x, + position_y=position_y, + nominal_defocus=nominal_defocus, + angle=angle, + fluence=fluence, + number_of_frames=number_of_frames, + foil_hole_id=foil_hole_id, + ) + + return movie_out diff --git a/src/lims_utils/expeye_client/models/mx_lims_contact.py b/src/lims_utils/expeye_client/models/mx_lims_contact.py new file mode 100644 index 0000000..28bb4d9 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_contact.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsContact") + + +@_attrs_define +class MxLimsContact: + """ + Attributes: + name (str): + email_address (str): + """ + + name: str + email_address: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name = self.name + + email_address = self.email_address + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "emailAddress": email_address, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + email_address = d.pop("emailAddress") + + mx_lims_contact = cls( + name=name, + email_address=email_address, + ) + + mx_lims_contact.additional_properties = d + return mx_lims_contact + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_dewar.py b/src/lims_utils/expeye_client/models/mx_lims_dewar.py new file mode 100644 index 0000000..6bcbe87 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_dewar.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mx_lims_dewar_containerref import MxLimsDewarContainerref + from ..models.mx_lims_dewar_identifiers import MxLimsDewarIdentifiers + from ..models.mx_lims_dewar_urls import MxLimsDewarUrls + + +T = TypeVar("T", bound="MxLimsDewar") + + +@_attrs_define +class MxLimsDewar: + """ + Attributes: + mxlims_type (str): + uuid (UUID): + barcode (str): + container_ref (MxLimsDewarContainerref): + urls (MxLimsDewarUrls | Unset): + identifiers (MxLimsDewarIdentifiers | Unset): + """ + + mxlims_type: str + uuid: UUID + barcode: str + container_ref: MxLimsDewarContainerref + urls: MxLimsDewarUrls | Unset = UNSET + identifiers: MxLimsDewarIdentifiers | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mxlims_type = self.mxlims_type + + uuid = str(self.uuid) + + barcode = self.barcode + + container_ref = self.container_ref.to_dict() + + urls: dict[str, Any] | Unset = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls.to_dict() + + identifiers: dict[str, Any] | Unset = UNSET + if not isinstance(self.identifiers, Unset): + identifiers = self.identifiers.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mxlimsType": mxlims_type, + "uuid": uuid, + "barcode": barcode, + "containerRef": container_ref, + } + ) + if urls is not UNSET: + field_dict["urls"] = urls + if identifiers is not UNSET: + field_dict["identifiers"] = identifiers + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_dewar_containerref import MxLimsDewarContainerref # noqa: PLC0415 + from ..models.mx_lims_dewar_identifiers import MxLimsDewarIdentifiers # noqa: PLC0415 + from ..models.mx_lims_dewar_urls import MxLimsDewarUrls # noqa: PLC0415 + + d = dict(src_dict) + mxlims_type = d.pop("mxlimsType") + + uuid = UUID(d.pop("uuid")) + + barcode = d.pop("barcode") + + container_ref = MxLimsDewarContainerref.from_dict(d.pop("containerRef")) + + _urls = d.pop("urls", UNSET) + urls: MxLimsDewarUrls | Unset + if isinstance(_urls, Unset): + urls = UNSET + else: + urls = MxLimsDewarUrls.from_dict(_urls) + + _identifiers = d.pop("identifiers", UNSET) + identifiers: MxLimsDewarIdentifiers | Unset + if isinstance(_identifiers, Unset): + identifiers = UNSET + else: + identifiers = MxLimsDewarIdentifiers.from_dict(_identifiers) + + mx_lims_dewar = cls( + mxlims_type=mxlims_type, + uuid=uuid, + barcode=barcode, + container_ref=container_ref, + urls=urls, + identifiers=identifiers, + ) + + mx_lims_dewar.additional_properties = d + return mx_lims_dewar + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_dewar_containerref.py b/src/lims_utils/expeye_client/models/mx_lims_dewar_containerref.py new file mode 100644 index 0000000..2c5aef4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_dewar_containerref.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsDewarContainerref") + + +@_attrs_define +class MxLimsDewarContainerref: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_dewar_containerref = cls() + + mx_lims_dewar_containerref.additional_properties = d + return mx_lims_dewar_containerref + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_dewar_identifiers.py b/src/lims_utils/expeye_client/models/mx_lims_dewar_identifiers.py new file mode 100644 index 0000000..303ca0e --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_dewar_identifiers.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsDewarIdentifiers") + + +@_attrs_define +class MxLimsDewarIdentifiers: + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_dewar_identifiers = cls() + + mx_lims_dewar_identifiers.additional_properties = d + return mx_lims_dewar_identifiers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_dewar_urls.py b/src/lims_utils/expeye_client/models/mx_lims_dewar_urls.py new file mode 100644 index 0000000..fead559 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_dewar_urls.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsDewarUrls") + + +@_attrs_define +class MxLimsDewarUrls: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_dewar_urls = cls() + + mx_lims_dewar_urls.additional_properties = d + return mx_lims_dewar_urls + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py new file mode 100644 index 0000000..4453aa2 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.mx_lims_full_shipment_version import MxLimsFullShipmentVersion + +if TYPE_CHECKING: + from ..models.mx_lims_full_shipment_dewar import MxLimsFullShipmentDewar + from ..models.mx_lims_full_shipment_macromolecule import MxLimsFullShipmentMacromolecule + from ..models.mx_lims_full_shipment_macromoleculesample import MxLimsFullShipmentMacromoleculesample + from ..models.mx_lims_full_shipment_pin import MxLimsFullShipmentPin + from ..models.mx_lims_full_shipment_puck import MxLimsFullShipmentPuck + from ..models.mx_lims_full_shipment_shipment import MxLimsFullShipmentShipment + + +T = TypeVar("T", bound="MxLimsFullShipment") + + +@_attrs_define +class MxLimsFullShipment: + """ + Attributes: + version (MxLimsFullShipmentVersion): + shipment (MxLimsFullShipmentShipment): + dewar (MxLimsFullShipmentDewar): + puck (MxLimsFullShipmentPuck): + macromolecule (MxLimsFullShipmentMacromolecule): + macromolecule_sample (MxLimsFullShipmentMacromoleculesample): + pin (MxLimsFullShipmentPin): + """ + + version: MxLimsFullShipmentVersion + shipment: MxLimsFullShipmentShipment + dewar: MxLimsFullShipmentDewar + puck: MxLimsFullShipmentPuck + macromolecule: MxLimsFullShipmentMacromolecule + macromolecule_sample: MxLimsFullShipmentMacromoleculesample + pin: MxLimsFullShipmentPin + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + version = self.version.value + + shipment = self.shipment.to_dict() + + dewar = self.dewar.to_dict() + + puck = self.puck.to_dict() + + macromolecule = self.macromolecule.to_dict() + + macromolecule_sample = self.macromolecule_sample.to_dict() + + pin = self.pin.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "version": version, + "Shipment": shipment, + "Dewar": dewar, + "Puck": puck, + "Macromolecule": macromolecule, + "MacromoleculeSample": macromolecule_sample, + "Pin": pin, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_full_shipment_dewar import MxLimsFullShipmentDewar # noqa: PLC0415 + from ..models.mx_lims_full_shipment_macromolecule import MxLimsFullShipmentMacromolecule # noqa: PLC0415 + from ..models.mx_lims_full_shipment_macromoleculesample import MxLimsFullShipmentMacromoleculesample # noqa: PLC0415 + from ..models.mx_lims_full_shipment_pin import MxLimsFullShipmentPin # noqa: PLC0415 + from ..models.mx_lims_full_shipment_puck import MxLimsFullShipmentPuck # noqa: PLC0415 + from ..models.mx_lims_full_shipment_shipment import MxLimsFullShipmentShipment # noqa: PLC0415 + + d = dict(src_dict) + version = MxLimsFullShipmentVersion(d.pop("version")) + + shipment = MxLimsFullShipmentShipment.from_dict(d.pop("Shipment")) + + dewar = MxLimsFullShipmentDewar.from_dict(d.pop("Dewar")) + + puck = MxLimsFullShipmentPuck.from_dict(d.pop("Puck")) + + macromolecule = MxLimsFullShipmentMacromolecule.from_dict(d.pop("Macromolecule")) + + macromolecule_sample = MxLimsFullShipmentMacromoleculesample.from_dict(d.pop("MacromoleculeSample")) + + pin = MxLimsFullShipmentPin.from_dict(d.pop("Pin")) + + mx_lims_full_shipment = cls( + version=version, + shipment=shipment, + dewar=dewar, + puck=puck, + macromolecule=macromolecule, + macromolecule_sample=macromolecule_sample, + pin=pin, + ) + + mx_lims_full_shipment.additional_properties = d + return mx_lims_full_shipment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py new file mode 100644 index 0000000..28ef44f --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mx_lims_dewar import MxLimsDewar + + +T = TypeVar("T", bound="MxLimsFullShipmentDewar") + + +@_attrs_define +class MxLimsFullShipmentDewar: + additional_properties: dict[str, MxLimsDewar] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_dewar import MxLimsDewar # noqa: PLC0415 + + d = dict(src_dict) + mx_lims_full_shipment_dewar = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = MxLimsDewar.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + mx_lims_full_shipment_dewar.additional_properties = additional_properties + return mx_lims_full_shipment_dewar + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> MxLimsDewar: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: MxLimsDewar) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py new file mode 100644 index 0000000..0056346 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mx_lims_macromolecule import MxLimsMacromolecule + + +T = TypeVar("T", bound="MxLimsFullShipmentMacromolecule") + + +@_attrs_define +class MxLimsFullShipmentMacromolecule: + additional_properties: dict[str, MxLimsMacromolecule] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_macromolecule import MxLimsMacromolecule # noqa: PLC0415 + + d = dict(src_dict) + mx_lims_full_shipment_macromolecule = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = MxLimsMacromolecule.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + mx_lims_full_shipment_macromolecule.additional_properties = additional_properties + return mx_lims_full_shipment_macromolecule + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> MxLimsMacromolecule: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: MxLimsMacromolecule) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py new file mode 100644 index 0000000..4197158 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mx_lims_macromolecule_sample import MxLimsMacromoleculeSample + + +T = TypeVar("T", bound="MxLimsFullShipmentMacromoleculesample") + + +@_attrs_define +class MxLimsFullShipmentMacromoleculesample: + additional_properties: dict[str, MxLimsMacromoleculeSample] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_macromolecule_sample import MxLimsMacromoleculeSample # noqa: PLC0415 + + d = dict(src_dict) + mx_lims_full_shipment_macromoleculesample = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = MxLimsMacromoleculeSample.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + mx_lims_full_shipment_macromoleculesample.additional_properties = additional_properties + return mx_lims_full_shipment_macromoleculesample + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> MxLimsMacromoleculeSample: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: MxLimsMacromoleculeSample) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py new file mode 100644 index 0000000..b4791e8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mx_lims_pin import MxLimsPin + + +T = TypeVar("T", bound="MxLimsFullShipmentPin") + + +@_attrs_define +class MxLimsFullShipmentPin: + additional_properties: dict[str, MxLimsPin] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_pin import MxLimsPin # noqa: PLC0415 + + d = dict(src_dict) + mx_lims_full_shipment_pin = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = MxLimsPin.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + mx_lims_full_shipment_pin.additional_properties = additional_properties + return mx_lims_full_shipment_pin + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> MxLimsPin: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: MxLimsPin) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py new file mode 100644 index 0000000..c3da6d1 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mx_lims_puck import MxLimsPuck + + +T = TypeVar("T", bound="MxLimsFullShipmentPuck") + + +@_attrs_define +class MxLimsFullShipmentPuck: + additional_properties: dict[str, MxLimsPuck] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_puck import MxLimsPuck # noqa: PLC0415 + + d = dict(src_dict) + mx_lims_full_shipment_puck = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = MxLimsPuck.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + mx_lims_full_shipment_puck.additional_properties = additional_properties + return mx_lims_full_shipment_puck + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> MxLimsPuck: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: MxLimsPuck) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py new file mode 100644 index 0000000..68da14a --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py @@ -0,0 +1,58 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mx_lims_shipment import MxLimsShipment + + +T = TypeVar("T", bound="MxLimsFullShipmentShipment") + + +@_attrs_define +class MxLimsFullShipmentShipment: + additional_properties: dict[str, MxLimsShipment] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_shipment import MxLimsShipment # noqa: PLC0415 + + d = dict(src_dict) + mx_lims_full_shipment_shipment = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = MxLimsShipment.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + mx_lims_full_shipment_shipment.additional_properties = additional_properties + return mx_lims_full_shipment_shipment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> MxLimsShipment: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: MxLimsShipment) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_version.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_version.py new file mode 100644 index 0000000..44d0f85 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_version.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class MxLimsFullShipmentVersion(StrEnum): + VALUE_0 = "0.6.12" + VALUE_1 = "0.6.13" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py new file mode 100644 index 0000000..544f159 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mx_lims_macromolecule_identifiers import MxLimsMacromoleculeIdentifiers + from ..models.mx_lims_macromolecule_urls import MxLimsMacromoleculeUrls + + +T = TypeVar("T", bound="MxLimsMacromolecule") + + +@_attrs_define +class MxLimsMacromolecule: + """ + Attributes: + mxlims_type (str): + uuid (UUID): + acronym (str): + urls (MxLimsMacromoleculeUrls | Unset): + identifiers (MxLimsMacromoleculeIdentifiers | Unset): + """ + + mxlims_type: str + uuid: UUID + acronym: str + urls: MxLimsMacromoleculeUrls | Unset = UNSET + identifiers: MxLimsMacromoleculeIdentifiers | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mxlims_type = self.mxlims_type + + uuid = str(self.uuid) + + acronym = self.acronym + + urls: dict[str, Any] | Unset = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls.to_dict() + + identifiers: dict[str, Any] | Unset = UNSET + if not isinstance(self.identifiers, Unset): + identifiers = self.identifiers.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mxlimsType": mxlims_type, + "uuid": uuid, + "acronym": acronym, + } + ) + if urls is not UNSET: + field_dict["urls"] = urls + if identifiers is not UNSET: + field_dict["identifiers"] = identifiers + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_macromolecule_identifiers import MxLimsMacromoleculeIdentifiers # noqa: PLC0415 + from ..models.mx_lims_macromolecule_urls import MxLimsMacromoleculeUrls # noqa: PLC0415 + + d = dict(src_dict) + mxlims_type = d.pop("mxlimsType") + + uuid = UUID(d.pop("uuid")) + + acronym = d.pop("acronym") + + _urls = d.pop("urls", UNSET) + urls: MxLimsMacromoleculeUrls | Unset + if isinstance(_urls, Unset): + urls = UNSET + else: + urls = MxLimsMacromoleculeUrls.from_dict(_urls) + + _identifiers = d.pop("identifiers", UNSET) + identifiers: MxLimsMacromoleculeIdentifiers | Unset + if isinstance(_identifiers, Unset): + identifiers = UNSET + else: + identifiers = MxLimsMacromoleculeIdentifiers.from_dict(_identifiers) + + mx_lims_macromolecule = cls( + mxlims_type=mxlims_type, + uuid=uuid, + acronym=acronym, + urls=urls, + identifiers=identifiers, + ) + + mx_lims_macromolecule.additional_properties = d + return mx_lims_macromolecule + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_identifiers.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_identifiers.py new file mode 100644 index 0000000..dc1e9c7 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_identifiers.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsMacromoleculeIdentifiers") + + +@_attrs_define +class MxLimsMacromoleculeIdentifiers: + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_macromolecule_identifiers = cls() + + mx_lims_macromolecule_identifiers.additional_properties = d + return mx_lims_macromolecule_identifiers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py new file mode 100644 index 0000000..8245484 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mx_lims_macromolecule_sample_identifiers import MxLimsMacromoleculeSampleIdentifiers + from ..models.mx_lims_macromolecule_sample_parentsampleref import MxLimsMacromoleculeSampleParentsampleref + from ..models.mx_lims_macromolecule_sample_urls import MxLimsMacromoleculeSampleUrls + + +T = TypeVar("T", bound="MxLimsMacromoleculeSample") + + +@_attrs_define +class MxLimsMacromoleculeSample: + """ + Attributes: + mxlims_type (str): + uuid (UUID): + name (str): + parent_sample_ref (MxLimsMacromoleculeSampleParentsampleref): + urls (MxLimsMacromoleculeSampleUrls | Unset): + identifiers (MxLimsMacromoleculeSampleIdentifiers | Unset): + """ + + mxlims_type: str + uuid: UUID + name: str + parent_sample_ref: MxLimsMacromoleculeSampleParentsampleref + urls: MxLimsMacromoleculeSampleUrls | Unset = UNSET + identifiers: MxLimsMacromoleculeSampleIdentifiers | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mxlims_type = self.mxlims_type + + uuid = str(self.uuid) + + name = self.name + + parent_sample_ref = self.parent_sample_ref.to_dict() + + urls: dict[str, Any] | Unset = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls.to_dict() + + identifiers: dict[str, Any] | Unset = UNSET + if not isinstance(self.identifiers, Unset): + identifiers = self.identifiers.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mxlimsType": mxlims_type, + "uuid": uuid, + "name": name, + "parentSampleRef": parent_sample_ref, + } + ) + if urls is not UNSET: + field_dict["urls"] = urls + if identifiers is not UNSET: + field_dict["identifiers"] = identifiers + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_macromolecule_sample_identifiers import MxLimsMacromoleculeSampleIdentifiers # noqa: PLC0415 + from ..models.mx_lims_macromolecule_sample_parentsampleref import MxLimsMacromoleculeSampleParentsampleref # noqa: PLC0415 + from ..models.mx_lims_macromolecule_sample_urls import MxLimsMacromoleculeSampleUrls # noqa: PLC0415 + + d = dict(src_dict) + mxlims_type = d.pop("mxlimsType") + + uuid = UUID(d.pop("uuid")) + + name = d.pop("name") + + parent_sample_ref = MxLimsMacromoleculeSampleParentsampleref.from_dict(d.pop("parentSampleRef")) + + _urls = d.pop("urls", UNSET) + urls: MxLimsMacromoleculeSampleUrls | Unset + if isinstance(_urls, Unset): + urls = UNSET + else: + urls = MxLimsMacromoleculeSampleUrls.from_dict(_urls) + + _identifiers = d.pop("identifiers", UNSET) + identifiers: MxLimsMacromoleculeSampleIdentifiers | Unset + if isinstance(_identifiers, Unset): + identifiers = UNSET + else: + identifiers = MxLimsMacromoleculeSampleIdentifiers.from_dict(_identifiers) + + mx_lims_macromolecule_sample = cls( + mxlims_type=mxlims_type, + uuid=uuid, + name=name, + parent_sample_ref=parent_sample_ref, + urls=urls, + identifiers=identifiers, + ) + + mx_lims_macromolecule_sample.additional_properties = d + return mx_lims_macromolecule_sample + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_identifiers.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_identifiers.py new file mode 100644 index 0000000..30751d4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_identifiers.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsMacromoleculeSampleIdentifiers") + + +@_attrs_define +class MxLimsMacromoleculeSampleIdentifiers: + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_macromolecule_sample_identifiers = cls() + + mx_lims_macromolecule_sample_identifiers.additional_properties = d + return mx_lims_macromolecule_sample_identifiers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_parentsampleref.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_parentsampleref.py new file mode 100644 index 0000000..b435126 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_parentsampleref.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsMacromoleculeSampleParentsampleref") + + +@_attrs_define +class MxLimsMacromoleculeSampleParentsampleref: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_macromolecule_sample_parentsampleref = cls() + + mx_lims_macromolecule_sample_parentsampleref.additional_properties = d + return mx_lims_macromolecule_sample_parentsampleref + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_urls.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_urls.py new file mode 100644 index 0000000..60fe8af --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample_urls.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsMacromoleculeSampleUrls") + + +@_attrs_define +class MxLimsMacromoleculeSampleUrls: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_macromolecule_sample_urls = cls() + + mx_lims_macromolecule_sample_urls.additional_properties = d + return mx_lims_macromolecule_sample_urls + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_urls.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_urls.py new file mode 100644 index 0000000..5ffd3c7 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_urls.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsMacromoleculeUrls") + + +@_attrs_define +class MxLimsMacromoleculeUrls: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_macromolecule_urls = cls() + + mx_lims_macromolecule_urls.additional_properties = d + return mx_lims_macromolecule_urls + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_pin.py b/src/lims_utils/expeye_client/models/mx_lims_pin.py new file mode 100644 index 0000000..b2a7618 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_pin.py @@ -0,0 +1,161 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mx_lims_pin_containerref import MxLimsPinContainerref + from ..models.mx_lims_pin_identifiers import MxLimsPinIdentifiers + from ..models.mx_lims_pin_sampleref import MxLimsPinSampleref + from ..models.mx_lims_pin_urls import MxLimsPinUrls + + +T = TypeVar("T", bound="MxLimsPin") + + +@_attrs_define +class MxLimsPin: + """ + Attributes: + uuid (UUID): + position_in_puck (int): + container_ref (MxLimsPinContainerref): + sample_ref (MxLimsPinSampleref): + mxlims_type (str | Unset): Default: 'Pin'. + urls (MxLimsPinUrls | Unset): + identifiers (MxLimsPinIdentifiers | Unset): + barcode (None | str | Unset): + """ + + uuid: UUID + position_in_puck: int + container_ref: MxLimsPinContainerref + sample_ref: MxLimsPinSampleref + mxlims_type: str | Unset = "Pin" + urls: MxLimsPinUrls | Unset = UNSET + identifiers: MxLimsPinIdentifiers | Unset = UNSET + barcode: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + uuid = str(self.uuid) + + position_in_puck = self.position_in_puck + + container_ref = self.container_ref.to_dict() + + sample_ref = self.sample_ref.to_dict() + + mxlims_type = self.mxlims_type + + urls: dict[str, Any] | Unset = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls.to_dict() + + identifiers: dict[str, Any] | Unset = UNSET + if not isinstance(self.identifiers, Unset): + identifiers = self.identifiers.to_dict() + + barcode: None | str | Unset + if isinstance(self.barcode, Unset): + barcode = UNSET + else: + barcode = self.barcode + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "uuid": uuid, + "positionInPuck": position_in_puck, + "containerRef": container_ref, + "sampleRef": sample_ref, + } + ) + if mxlims_type is not UNSET: + field_dict["mxlimsType"] = mxlims_type + if urls is not UNSET: + field_dict["urls"] = urls + if identifiers is not UNSET: + field_dict["identifiers"] = identifiers + if barcode is not UNSET: + field_dict["barcode"] = barcode + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_pin_containerref import MxLimsPinContainerref # noqa: PLC0415 + from ..models.mx_lims_pin_identifiers import MxLimsPinIdentifiers # noqa: PLC0415 + from ..models.mx_lims_pin_sampleref import MxLimsPinSampleref # noqa: PLC0415 + from ..models.mx_lims_pin_urls import MxLimsPinUrls # noqa: PLC0415 + + d = dict(src_dict) + uuid = UUID(d.pop("uuid")) + + position_in_puck = d.pop("positionInPuck") + + container_ref = MxLimsPinContainerref.from_dict(d.pop("containerRef")) + + sample_ref = MxLimsPinSampleref.from_dict(d.pop("sampleRef")) + + mxlims_type = d.pop("mxlimsType", UNSET) + + _urls = d.pop("urls", UNSET) + urls: MxLimsPinUrls | Unset + if isinstance(_urls, Unset): + urls = UNSET + else: + urls = MxLimsPinUrls.from_dict(_urls) + + _identifiers = d.pop("identifiers", UNSET) + identifiers: MxLimsPinIdentifiers | Unset + if isinstance(_identifiers, Unset): + identifiers = UNSET + else: + identifiers = MxLimsPinIdentifiers.from_dict(_identifiers) + + def _parse_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + barcode = _parse_barcode(d.pop("barcode", UNSET)) + + mx_lims_pin = cls( + uuid=uuid, + position_in_puck=position_in_puck, + container_ref=container_ref, + sample_ref=sample_ref, + mxlims_type=mxlims_type, + urls=urls, + identifiers=identifiers, + barcode=barcode, + ) + + mx_lims_pin.additional_properties = d + return mx_lims_pin + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_pin_containerref.py b/src/lims_utils/expeye_client/models/mx_lims_pin_containerref.py new file mode 100644 index 0000000..4e2df0c --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_pin_containerref.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPinContainerref") + + +@_attrs_define +class MxLimsPinContainerref: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_pin_containerref = cls() + + mx_lims_pin_containerref.additional_properties = d + return mx_lims_pin_containerref + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_pin_identifiers.py b/src/lims_utils/expeye_client/models/mx_lims_pin_identifiers.py new file mode 100644 index 0000000..90286be --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_pin_identifiers.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPinIdentifiers") + + +@_attrs_define +class MxLimsPinIdentifiers: + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_pin_identifiers = cls() + + mx_lims_pin_identifiers.additional_properties = d + return mx_lims_pin_identifiers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_pin_sampleref.py b/src/lims_utils/expeye_client/models/mx_lims_pin_sampleref.py new file mode 100644 index 0000000..b702b2c --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_pin_sampleref.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPinSampleref") + + +@_attrs_define +class MxLimsPinSampleref: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_pin_sampleref = cls() + + mx_lims_pin_sampleref.additional_properties = d + return mx_lims_pin_sampleref + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_pin_urls.py b/src/lims_utils/expeye_client/models/mx_lims_pin_urls.py new file mode 100644 index 0000000..63eb679 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_pin_urls.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPinUrls") + + +@_attrs_define +class MxLimsPinUrls: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_pin_urls = cls() + + mx_lims_pin_urls.additional_properties = d + return mx_lims_pin_urls + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_puck.py b/src/lims_utils/expeye_client/models/mx_lims_puck.py new file mode 100644 index 0000000..c4a7b6b --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_puck.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mx_lims_puck_containerref import MxLimsPuckContainerref + from ..models.mx_lims_puck_identifiers import MxLimsPuckIdentifiers + from ..models.mx_lims_puck_urls import MxLimsPuckUrls + + +T = TypeVar("T", bound="MxLimsPuck") + + +@_attrs_define +class MxLimsPuck: + """ + Attributes: + mxlims_type (str): + uuid (UUID): + number_positions (int): + barcode (str): + container_ref (MxLimsPuckContainerref): + urls (MxLimsPuckUrls | Unset): + identifiers (MxLimsPuckIdentifiers | Unset): + """ + + mxlims_type: str + uuid: UUID + number_positions: int + barcode: str + container_ref: MxLimsPuckContainerref + urls: MxLimsPuckUrls | Unset = UNSET + identifiers: MxLimsPuckIdentifiers | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mxlims_type = self.mxlims_type + + uuid = str(self.uuid) + + number_positions = self.number_positions + + barcode = self.barcode + + container_ref = self.container_ref.to_dict() + + urls: dict[str, Any] | Unset = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls.to_dict() + + identifiers: dict[str, Any] | Unset = UNSET + if not isinstance(self.identifiers, Unset): + identifiers = self.identifiers.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mxlimsType": mxlims_type, + "uuid": uuid, + "numberPositions": number_positions, + "barcode": barcode, + "containerRef": container_ref, + } + ) + if urls is not UNSET: + field_dict["urls"] = urls + if identifiers is not UNSET: + field_dict["identifiers"] = identifiers + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_puck_containerref import MxLimsPuckContainerref # noqa: PLC0415 + from ..models.mx_lims_puck_identifiers import MxLimsPuckIdentifiers # noqa: PLC0415 + from ..models.mx_lims_puck_urls import MxLimsPuckUrls # noqa: PLC0415 + + d = dict(src_dict) + mxlims_type = d.pop("mxlimsType") + + uuid = UUID(d.pop("uuid")) + + number_positions = d.pop("numberPositions") + + barcode = d.pop("barcode") + + container_ref = MxLimsPuckContainerref.from_dict(d.pop("containerRef")) + + _urls = d.pop("urls", UNSET) + urls: MxLimsPuckUrls | Unset + if isinstance(_urls, Unset): + urls = UNSET + else: + urls = MxLimsPuckUrls.from_dict(_urls) + + _identifiers = d.pop("identifiers", UNSET) + identifiers: MxLimsPuckIdentifiers | Unset + if isinstance(_identifiers, Unset): + identifiers = UNSET + else: + identifiers = MxLimsPuckIdentifiers.from_dict(_identifiers) + + mx_lims_puck = cls( + mxlims_type=mxlims_type, + uuid=uuid, + number_positions=number_positions, + barcode=barcode, + container_ref=container_ref, + urls=urls, + identifiers=identifiers, + ) + + mx_lims_puck.additional_properties = d + return mx_lims_puck + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_puck_containerref.py b/src/lims_utils/expeye_client/models/mx_lims_puck_containerref.py new file mode 100644 index 0000000..b7077d6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_puck_containerref.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPuckContainerref") + + +@_attrs_define +class MxLimsPuckContainerref: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_puck_containerref = cls() + + mx_lims_puck_containerref.additional_properties = d + return mx_lims_puck_containerref + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_puck_identifiers.py b/src/lims_utils/expeye_client/models/mx_lims_puck_identifiers.py new file mode 100644 index 0000000..33fc726 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_puck_identifiers.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPuckIdentifiers") + + +@_attrs_define +class MxLimsPuckIdentifiers: + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_puck_identifiers = cls() + + mx_lims_puck_identifiers.additional_properties = d + return mx_lims_puck_identifiers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_puck_urls.py b/src/lims_utils/expeye_client/models/mx_lims_puck_urls.py new file mode 100644 index 0000000..c043d4a --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_puck_urls.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsPuckUrls") + + +@_attrs_define +class MxLimsPuckUrls: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_puck_urls = cls() + + mx_lims_puck_urls.additional_properties = d + return mx_lims_puck_urls + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_shipment.py b/src/lims_utils/expeye_client/models/mx_lims_shipment.py new file mode 100644 index 0000000..b9cac75 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_shipment.py @@ -0,0 +1,138 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.mx_lims_contact import MxLimsContact + from ..models.mx_lims_shipment_identifiers import MxLimsShipmentIdentifiers + from ..models.mx_lims_shipment_urls import MxLimsShipmentUrls + + +T = TypeVar("T", bound="MxLimsShipment") + + +@_attrs_define +class MxLimsShipment: + """ + Attributes: + mxlims_type (str): + uuid (UUID): + proposal_code (str): + lab_contact_outbound (MxLimsContact): + lab_contact_return (MxLimsContact): + urls (MxLimsShipmentUrls | Unset): + identifiers (MxLimsShipmentIdentifiers | Unset): + """ + + mxlims_type: str + uuid: UUID + proposal_code: str + lab_contact_outbound: MxLimsContact + lab_contact_return: MxLimsContact + urls: MxLimsShipmentUrls | Unset = UNSET + identifiers: MxLimsShipmentIdentifiers | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mxlims_type = self.mxlims_type + + uuid = str(self.uuid) + + proposal_code = self.proposal_code + + lab_contact_outbound = self.lab_contact_outbound.to_dict() + + lab_contact_return = self.lab_contact_return.to_dict() + + urls: dict[str, Any] | Unset = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls.to_dict() + + identifiers: dict[str, Any] | Unset = UNSET + if not isinstance(self.identifiers, Unset): + identifiers = self.identifiers.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mxlimsType": mxlims_type, + "uuid": uuid, + "proposalCode": proposal_code, + "labContactOutbound": lab_contact_outbound, + "labContactReturn": lab_contact_return, + } + ) + if urls is not UNSET: + field_dict["urls"] = urls + if identifiers is not UNSET: + field_dict["identifiers"] = identifiers + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mx_lims_contact import MxLimsContact # noqa: PLC0415 + from ..models.mx_lims_shipment_identifiers import MxLimsShipmentIdentifiers # noqa: PLC0415 + from ..models.mx_lims_shipment_urls import MxLimsShipmentUrls # noqa: PLC0415 + + d = dict(src_dict) + mxlims_type = d.pop("mxlimsType") + + uuid = UUID(d.pop("uuid")) + + proposal_code = d.pop("proposalCode") + + lab_contact_outbound = MxLimsContact.from_dict(d.pop("labContactOutbound")) + + lab_contact_return = MxLimsContact.from_dict(d.pop("labContactReturn")) + + _urls = d.pop("urls", UNSET) + urls: MxLimsShipmentUrls | Unset + if isinstance(_urls, Unset): + urls = UNSET + else: + urls = MxLimsShipmentUrls.from_dict(_urls) + + _identifiers = d.pop("identifiers", UNSET) + identifiers: MxLimsShipmentIdentifiers | Unset + if isinstance(_identifiers, Unset): + identifiers = UNSET + else: + identifiers = MxLimsShipmentIdentifiers.from_dict(_identifiers) + + mx_lims_shipment = cls( + mxlims_type=mxlims_type, + uuid=uuid, + proposal_code=proposal_code, + lab_contact_outbound=lab_contact_outbound, + lab_contact_return=lab_contact_return, + urls=urls, + identifiers=identifiers, + ) + + mx_lims_shipment.additional_properties = d + return mx_lims_shipment + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_shipment_identifiers.py b/src/lims_utils/expeye_client/models/mx_lims_shipment_identifiers.py new file mode 100644 index 0000000..3840ea4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_shipment_identifiers.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsShipmentIdentifiers") + + +@_attrs_define +class MxLimsShipmentIdentifiers: + additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_shipment_identifiers = cls() + + mx_lims_shipment_identifiers.additional_properties = d + return mx_lims_shipment_identifiers + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> int: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: int) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mx_lims_shipment_urls.py b/src/lims_utils/expeye_client/models/mx_lims_shipment_urls.py new file mode 100644 index 0000000..0e0f9ea --- /dev/null +++ b/src/lims_utils/expeye_client/models/mx_lims_shipment_urls.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="MxLimsShipmentUrls") + + +@_attrs_define +class MxLimsShipmentUrls: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_lims_shipment_urls = cls() + + mx_lims_shipment_urls.additional_properties = d + return mx_lims_shipment_urls + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mxmr_run_blob_optional.py b/src/lims_utils/expeye_client/models/mxmr_run_blob_optional.py new file mode 100644 index 0000000..dd3f07f --- /dev/null +++ b/src/lims_utils/expeye_client/models/mxmr_run_blob_optional.py @@ -0,0 +1,364 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.mxmr_run_blob_optional_map_type_type_0 import MXMRRunBlobOptionalMapTypeType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MXMRRunBlobOptional") + + +@_attrs_define +class MXMRRunBlobOptional: + """ + Attributes: + file_path (None | str | Unset): + view1 (None | str | Unset): + view2 (None | str | Unset): + view3 (None | str | Unset): + x (float | None | Unset): + y (float | None | Unset): + z (float | None | Unset): + height (float | None | Unset): + occupancy (float | None | Unset): + nearest_atom_name (None | str | Unset): + nearest_atom_chain_id (None | str | Unset): + nearest_atom_res_name (None | str | Unset): + nearest_atom_res_seq (int | None | Unset): + nearest_atom_distance (float | None | Unset): + map_type (MXMRRunBlobOptionalMapTypeType0 | None | Unset): + """ + + file_path: None | str | Unset = UNSET + view1: None | str | Unset = UNSET + view2: None | str | Unset = UNSET + view3: None | str | Unset = UNSET + x: float | None | Unset = UNSET + y: float | None | Unset = UNSET + z: float | None | Unset = UNSET + height: float | None | Unset = UNSET + occupancy: float | None | Unset = UNSET + nearest_atom_name: None | str | Unset = UNSET + nearest_atom_chain_id: None | str | Unset = UNSET + nearest_atom_res_name: None | str | Unset = UNSET + nearest_atom_res_seq: int | None | Unset = UNSET + nearest_atom_distance: float | None | Unset = UNSET + map_type: MXMRRunBlobOptionalMapTypeType0 | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + file_path: None | str | Unset + if isinstance(self.file_path, Unset): + file_path = UNSET + else: + file_path = self.file_path + + view1: None | str | Unset + if isinstance(self.view1, Unset): + view1 = UNSET + else: + view1 = self.view1 + + view2: None | str | Unset + if isinstance(self.view2, Unset): + view2 = UNSET + else: + view2 = self.view2 + + view3: None | str | Unset + if isinstance(self.view3, Unset): + view3 = UNSET + else: + view3 = self.view3 + + x: float | None | Unset + if isinstance(self.x, Unset): + x = UNSET + else: + x = self.x + + y: float | None | Unset + if isinstance(self.y, Unset): + y = UNSET + else: + y = self.y + + z: float | None | Unset + if isinstance(self.z, Unset): + z = UNSET + else: + z = self.z + + height: float | None | Unset + if isinstance(self.height, Unset): + height = UNSET + else: + height = self.height + + occupancy: float | None | Unset + if isinstance(self.occupancy, Unset): + occupancy = UNSET + else: + occupancy = self.occupancy + + nearest_atom_name: None | str | Unset + if isinstance(self.nearest_atom_name, Unset): + nearest_atom_name = UNSET + else: + nearest_atom_name = self.nearest_atom_name + + nearest_atom_chain_id: None | str | Unset + if isinstance(self.nearest_atom_chain_id, Unset): + nearest_atom_chain_id = UNSET + else: + nearest_atom_chain_id = self.nearest_atom_chain_id + + nearest_atom_res_name: None | str | Unset + if isinstance(self.nearest_atom_res_name, Unset): + nearest_atom_res_name = UNSET + else: + nearest_atom_res_name = self.nearest_atom_res_name + + nearest_atom_res_seq: int | None | Unset + if isinstance(self.nearest_atom_res_seq, Unset): + nearest_atom_res_seq = UNSET + else: + nearest_atom_res_seq = self.nearest_atom_res_seq + + nearest_atom_distance: float | None | Unset + if isinstance(self.nearest_atom_distance, Unset): + nearest_atom_distance = UNSET + else: + nearest_atom_distance = self.nearest_atom_distance + + map_type: None | str | Unset + if isinstance(self.map_type, Unset): + map_type = UNSET + elif isinstance(self.map_type, MXMRRunBlobOptionalMapTypeType0): + map_type = self.map_type.value + else: + map_type = self.map_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if file_path is not UNSET: + field_dict["filePath"] = file_path + if view1 is not UNSET: + field_dict["view1"] = view1 + if view2 is not UNSET: + field_dict["view2"] = view2 + if view3 is not UNSET: + field_dict["view3"] = view3 + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + if z is not UNSET: + field_dict["z"] = z + if height is not UNSET: + field_dict["height"] = height + if occupancy is not UNSET: + field_dict["occupancy"] = occupancy + if nearest_atom_name is not UNSET: + field_dict["nearestAtomName"] = nearest_atom_name + if nearest_atom_chain_id is not UNSET: + field_dict["nearestAtomChainId"] = nearest_atom_chain_id + if nearest_atom_res_name is not UNSET: + field_dict["nearestAtomResName"] = nearest_atom_res_name + if nearest_atom_res_seq is not UNSET: + field_dict["nearestAtomResSeq"] = nearest_atom_res_seq + if nearest_atom_distance is not UNSET: + field_dict["nearestAtomDistance"] = nearest_atom_distance + if map_type is not UNSET: + field_dict["mapType"] = map_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_path = _parse_file_path(d.pop("filePath", UNSET)) + + def _parse_view1(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + view1 = _parse_view1(d.pop("view1", UNSET)) + + def _parse_view2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + view2 = _parse_view2(d.pop("view2", UNSET)) + + def _parse_view3(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + view3 = _parse_view3(d.pop("view3", UNSET)) + + def _parse_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x = _parse_x(d.pop("x", UNSET)) + + def _parse_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y = _parse_y(d.pop("y", UNSET)) + + def _parse_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + z = _parse_z(d.pop("z", UNSET)) + + def _parse_height(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + height = _parse_height(d.pop("height", UNSET)) + + def _parse_occupancy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + occupancy = _parse_occupancy(d.pop("occupancy", UNSET)) + + def _parse_nearest_atom_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + nearest_atom_name = _parse_nearest_atom_name(d.pop("nearestAtomName", UNSET)) + + def _parse_nearest_atom_chain_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + nearest_atom_chain_id = _parse_nearest_atom_chain_id(d.pop("nearestAtomChainId", UNSET)) + + def _parse_nearest_atom_res_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + nearest_atom_res_name = _parse_nearest_atom_res_name(d.pop("nearestAtomResName", UNSET)) + + def _parse_nearest_atom_res_seq(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + nearest_atom_res_seq = _parse_nearest_atom_res_seq(d.pop("nearestAtomResSeq", UNSET)) + + def _parse_nearest_atom_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + nearest_atom_distance = _parse_nearest_atom_distance(d.pop("nearestAtomDistance", UNSET)) + + def _parse_map_type(data: object) -> MXMRRunBlobOptionalMapTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + map_type_type_0 = MXMRRunBlobOptionalMapTypeType0(data) + + return map_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MXMRRunBlobOptionalMapTypeType0 | None | Unset, data) + + map_type = _parse_map_type(d.pop("mapType", UNSET)) + + mxmr_run_blob_optional = cls( + file_path=file_path, + view1=view1, + view2=view2, + view3=view3, + x=x, + y=y, + z=z, + height=height, + occupancy=occupancy, + nearest_atom_name=nearest_atom_name, + nearest_atom_chain_id=nearest_atom_chain_id, + nearest_atom_res_name=nearest_atom_res_name, + nearest_atom_res_seq=nearest_atom_res_seq, + nearest_atom_distance=nearest_atom_distance, + map_type=map_type, + ) + + mxmr_run_blob_optional.additional_properties = d + return mxmr_run_blob_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mxmr_run_blob_optional_map_type_type_0.py b/src/lims_utils/expeye_client/models/mxmr_run_blob_optional_map_type_type_0.py new file mode 100644 index 0000000..5ae7537 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mxmr_run_blob_optional_map_type_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class MXMRRunBlobOptionalMapTypeType0(StrEnum): + ANOMALOUS = "anomalous" + DIFFERENCE = "difference" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/mxmr_run_blob_out.py b/src/lims_utils/expeye_client/models/mxmr_run_blob_out.py new file mode 100644 index 0000000..45e2166 --- /dev/null +++ b/src/lims_utils/expeye_client/models/mxmr_run_blob_out.py @@ -0,0 +1,382 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.mxmr_run_blob_out_map_type_type_0 import MXMRRunBlobOutMapTypeType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MXMRRunBlobOut") + + +@_attrs_define +class MXMRRunBlobOut: + """ + Attributes: + mx_mr_run_blob_id (int): + mx_mr_run_id (int): + file_path (None | str | Unset): + view1 (None | str | Unset): + view2 (None | str | Unset): + view3 (None | str | Unset): + x (float | None | Unset): + y (float | None | Unset): + z (float | None | Unset): + height (float | None | Unset): + occupancy (float | None | Unset): + nearest_atom_name (None | str | Unset): + nearest_atom_chain_id (None | str | Unset): + nearest_atom_res_name (None | str | Unset): + nearest_atom_res_seq (int | None | Unset): + nearest_atom_distance (float | None | Unset): + map_type (MXMRRunBlobOutMapTypeType0 | None | Unset): + """ + + mx_mr_run_blob_id: int + mx_mr_run_id: int + file_path: None | str | Unset = UNSET + view1: None | str | Unset = UNSET + view2: None | str | Unset = UNSET + view3: None | str | Unset = UNSET + x: float | None | Unset = UNSET + y: float | None | Unset = UNSET + z: float | None | Unset = UNSET + height: float | None | Unset = UNSET + occupancy: float | None | Unset = UNSET + nearest_atom_name: None | str | Unset = UNSET + nearest_atom_chain_id: None | str | Unset = UNSET + nearest_atom_res_name: None | str | Unset = UNSET + nearest_atom_res_seq: int | None | Unset = UNSET + nearest_atom_distance: float | None | Unset = UNSET + map_type: MXMRRunBlobOutMapTypeType0 | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + mx_mr_run_blob_id = self.mx_mr_run_blob_id + + mx_mr_run_id = self.mx_mr_run_id + + file_path: None | str | Unset + if isinstance(self.file_path, Unset): + file_path = UNSET + else: + file_path = self.file_path + + view1: None | str | Unset + if isinstance(self.view1, Unset): + view1 = UNSET + else: + view1 = self.view1 + + view2: None | str | Unset + if isinstance(self.view2, Unset): + view2 = UNSET + else: + view2 = self.view2 + + view3: None | str | Unset + if isinstance(self.view3, Unset): + view3 = UNSET + else: + view3 = self.view3 + + x: float | None | Unset + if isinstance(self.x, Unset): + x = UNSET + else: + x = self.x + + y: float | None | Unset + if isinstance(self.y, Unset): + y = UNSET + else: + y = self.y + + z: float | None | Unset + if isinstance(self.z, Unset): + z = UNSET + else: + z = self.z + + height: float | None | Unset + if isinstance(self.height, Unset): + height = UNSET + else: + height = self.height + + occupancy: float | None | Unset + if isinstance(self.occupancy, Unset): + occupancy = UNSET + else: + occupancy = self.occupancy + + nearest_atom_name: None | str | Unset + if isinstance(self.nearest_atom_name, Unset): + nearest_atom_name = UNSET + else: + nearest_atom_name = self.nearest_atom_name + + nearest_atom_chain_id: None | str | Unset + if isinstance(self.nearest_atom_chain_id, Unset): + nearest_atom_chain_id = UNSET + else: + nearest_atom_chain_id = self.nearest_atom_chain_id + + nearest_atom_res_name: None | str | Unset + if isinstance(self.nearest_atom_res_name, Unset): + nearest_atom_res_name = UNSET + else: + nearest_atom_res_name = self.nearest_atom_res_name + + nearest_atom_res_seq: int | None | Unset + if isinstance(self.nearest_atom_res_seq, Unset): + nearest_atom_res_seq = UNSET + else: + nearest_atom_res_seq = self.nearest_atom_res_seq + + nearest_atom_distance: float | None | Unset + if isinstance(self.nearest_atom_distance, Unset): + nearest_atom_distance = UNSET + else: + nearest_atom_distance = self.nearest_atom_distance + + map_type: None | str | Unset + if isinstance(self.map_type, Unset): + map_type = UNSET + elif isinstance(self.map_type, MXMRRunBlobOutMapTypeType0): + map_type = self.map_type.value + else: + map_type = self.map_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "mxMRRunBlobId": mx_mr_run_blob_id, + "mxMRRunId": mx_mr_run_id, + } + ) + if file_path is not UNSET: + field_dict["filePath"] = file_path + if view1 is not UNSET: + field_dict["view1"] = view1 + if view2 is not UNSET: + field_dict["view2"] = view2 + if view3 is not UNSET: + field_dict["view3"] = view3 + if x is not UNSET: + field_dict["x"] = x + if y is not UNSET: + field_dict["y"] = y + if z is not UNSET: + field_dict["z"] = z + if height is not UNSET: + field_dict["height"] = height + if occupancy is not UNSET: + field_dict["occupancy"] = occupancy + if nearest_atom_name is not UNSET: + field_dict["nearestAtomName"] = nearest_atom_name + if nearest_atom_chain_id is not UNSET: + field_dict["nearestAtomChainId"] = nearest_atom_chain_id + if nearest_atom_res_name is not UNSET: + field_dict["nearestAtomResName"] = nearest_atom_res_name + if nearest_atom_res_seq is not UNSET: + field_dict["nearestAtomResSeq"] = nearest_atom_res_seq + if nearest_atom_distance is not UNSET: + field_dict["nearestAtomDistance"] = nearest_atom_distance + if map_type is not UNSET: + field_dict["mapType"] = map_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + mx_mr_run_blob_id = d.pop("mxMRRunBlobId") + + mx_mr_run_id = d.pop("mxMRRunId") + + def _parse_file_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_path = _parse_file_path(d.pop("filePath", UNSET)) + + def _parse_view1(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + view1 = _parse_view1(d.pop("view1", UNSET)) + + def _parse_view2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + view2 = _parse_view2(d.pop("view2", UNSET)) + + def _parse_view3(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + view3 = _parse_view3(d.pop("view3", UNSET)) + + def _parse_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x = _parse_x(d.pop("x", UNSET)) + + def _parse_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + y = _parse_y(d.pop("y", UNSET)) + + def _parse_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + z = _parse_z(d.pop("z", UNSET)) + + def _parse_height(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + height = _parse_height(d.pop("height", UNSET)) + + def _parse_occupancy(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + occupancy = _parse_occupancy(d.pop("occupancy", UNSET)) + + def _parse_nearest_atom_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + nearest_atom_name = _parse_nearest_atom_name(d.pop("nearestAtomName", UNSET)) + + def _parse_nearest_atom_chain_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + nearest_atom_chain_id = _parse_nearest_atom_chain_id(d.pop("nearestAtomChainId", UNSET)) + + def _parse_nearest_atom_res_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + nearest_atom_res_name = _parse_nearest_atom_res_name(d.pop("nearestAtomResName", UNSET)) + + def _parse_nearest_atom_res_seq(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + nearest_atom_res_seq = _parse_nearest_atom_res_seq(d.pop("nearestAtomResSeq", UNSET)) + + def _parse_nearest_atom_distance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + nearest_atom_distance = _parse_nearest_atom_distance(d.pop("nearestAtomDistance", UNSET)) + + def _parse_map_type(data: object) -> MXMRRunBlobOutMapTypeType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + map_type_type_0 = MXMRRunBlobOutMapTypeType0(data) + + return map_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(MXMRRunBlobOutMapTypeType0 | None | Unset, data) + + map_type = _parse_map_type(d.pop("mapType", UNSET)) + + mxmr_run_blob_out = cls( + mx_mr_run_blob_id=mx_mr_run_blob_id, + mx_mr_run_id=mx_mr_run_id, + file_path=file_path, + view1=view1, + view2=view2, + view3=view3, + x=x, + y=y, + z=z, + height=height, + occupancy=occupancy, + nearest_atom_name=nearest_atom_name, + nearest_atom_chain_id=nearest_atom_chain_id, + nearest_atom_res_name=nearest_atom_res_name, + nearest_atom_res_seq=nearest_atom_res_seq, + nearest_atom_distance=nearest_atom_distance, + map_type=map_type, + ) + + mxmr_run_blob_out.additional_properties = d + return mxmr_run_blob_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/mxmr_run_blob_out_map_type_type_0.py b/src/lims_utils/expeye_client/models/mxmr_run_blob_out_map_type_type_0.py new file mode 100644 index 0000000..4e9f7ae --- /dev/null +++ b/src/lims_utils/expeye_client/models/mxmr_run_blob_out_map_type_type_0.py @@ -0,0 +1,9 @@ +from enum import StrEnum + + +class MXMRRunBlobOutMapTypeType0(StrEnum): + ANOMALOUS = "anomalous" + DIFFERENCE = "difference" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py b/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py new file mode 100644 index 0000000..8e5c225 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut + + +T = TypeVar("T", bound="PagedAutoProcProgramAttachmentOut") + + +@_attrs_define +class PagedAutoProcProgramAttachmentOut: + """ + Attributes: + items (list[AutoProcProgramAttachmentOut]): + total (int): + page (int): + limit (int): + """ + + items: list[AutoProcProgramAttachmentOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = AutoProcProgramAttachmentOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_auto_proc_program_attachment_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_auto_proc_program_attachment_out.additional_properties = d + return paged_auto_proc_program_attachment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py b/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py new file mode 100644 index 0000000..66a8d9d --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.auto_proc_program_out import AutoProcProgramOut + + +T = TypeVar("T", bound="PagedAutoProcProgramOut") + + +@_attrs_define +class PagedAutoProcProgramOut: + """ + Attributes: + items (list[AutoProcProgramOut]): + total (int): + page (int): + limit (int): + """ + + items: list[AutoProcProgramOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.auto_proc_program_out import AutoProcProgramOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = AutoProcProgramOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_auto_proc_program_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_auto_proc_program_out.additional_properties = d + return paged_auto_proc_program_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_container_history_out.py b/src/lims_utils/expeye_client/models/paged_container_history_out.py new file mode 100644 index 0000000..14c372c --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_container_history_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.container_history_out import ContainerHistoryOut + + +T = TypeVar("T", bound="PagedContainerHistoryOut") + + +@_attrs_define +class PagedContainerHistoryOut: + """ + Attributes: + items (list[ContainerHistoryOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ContainerHistoryOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.container_history_out import ContainerHistoryOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ContainerHistoryOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_container_history_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_container_history_out.additional_properties = d + return paged_container_history_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_container_inspection_out.py b/src/lims_utils/expeye_client/models/paged_container_inspection_out.py new file mode 100644 index 0000000..d53bf52 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_container_inspection_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.container_inspection_out import ContainerInspectionOut + + +T = TypeVar("T", bound="PagedContainerInspectionOut") + + +@_attrs_define +class PagedContainerInspectionOut: + """ + Attributes: + items (list[ContainerInspectionOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ContainerInspectionOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.container_inspection_out import ContainerInspectionOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ContainerInspectionOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_container_inspection_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_container_inspection_out.additional_properties = d + return paged_container_inspection_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_container_out.py b/src/lims_utils/expeye_client/models/paged_container_out.py new file mode 100644 index 0000000..b63f5d5 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_container_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.container_out import ContainerOut + + +T = TypeVar("T", bound="PagedContainerOut") + + +@_attrs_define +class PagedContainerOut: + """ + Attributes: + items (list[ContainerOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ContainerOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.container_out import ContainerOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ContainerOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_container_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_container_out.additional_properties = d + return paged_container_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_container_queue_out.py b/src/lims_utils/expeye_client/models/paged_container_queue_out.py new file mode 100644 index 0000000..f96dbf0 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_container_queue_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.container_queue_out import ContainerQueueOut + + +T = TypeVar("T", bound="PagedContainerQueueOut") + + +@_attrs_define +class PagedContainerQueueOut: + """ + Attributes: + items (list[ContainerQueueOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ContainerQueueOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.container_queue_out import ContainerQueueOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ContainerQueueOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_container_queue_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_container_queue_out.additional_properties = d + return paged_container_queue_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_crystal_out.py b/src/lims_utils/expeye_client/models/paged_crystal_out.py new file mode 100644 index 0000000..c42810c --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_crystal_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.crystal_out import CrystalOut + + +T = TypeVar("T", bound="PagedCrystalOut") + + +@_attrs_define +class PagedCrystalOut: + """ + Attributes: + items (list[CrystalOut]): + total (int): + page (int): + limit (int): + """ + + items: list[CrystalOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.crystal_out import CrystalOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = CrystalOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_crystal_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_crystal_out.additional_properties = d + return paged_crystal_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py new file mode 100644 index 0000000..f14b8a2 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.data_collection_comment_out import DataCollectionCommentOut + + +T = TypeVar("T", bound="PagedDataCollectionCommentOut") + + +@_attrs_define +class PagedDataCollectionCommentOut: + """ + Attributes: + items (list[DataCollectionCommentOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DataCollectionCommentOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.data_collection_comment_out import DataCollectionCommentOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DataCollectionCommentOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_data_collection_comment_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_data_collection_comment_out.additional_properties = d + return paged_data_collection_comment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py new file mode 100644 index 0000000..eb2a709 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut + + +T = TypeVar("T", bound="PagedDataCollectionFileAttachmentOut") + + +@_attrs_define +class PagedDataCollectionFileAttachmentOut: + """ + Attributes: + items (list[DataCollectionFileAttachmentOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DataCollectionFileAttachmentOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DataCollectionFileAttachmentOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_data_collection_file_attachment_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_data_collection_file_attachment_out.additional_properties = d + return paged_data_collection_file_attachment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py new file mode 100644 index 0000000..7505b64 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.data_collection_group_out import DataCollectionGroupOut + + +T = TypeVar("T", bound="PagedDataCollectionGroupOut") + + +@_attrs_define +class PagedDataCollectionGroupOut: + """ + Attributes: + items (list[DataCollectionGroupOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DataCollectionGroupOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.data_collection_group_out import DataCollectionGroupOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DataCollectionGroupOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_data_collection_group_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_data_collection_group_out.additional_properties = d + return paged_data_collection_group_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_out.py new file mode 100644 index 0000000..a5148b6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_data_collection_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.data_collection_out import DataCollectionOut + + +T = TypeVar("T", bound="PagedDataCollectionOut") + + +@_attrs_define +class PagedDataCollectionOut: + """ + Attributes: + items (list[DataCollectionOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DataCollectionOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.data_collection_out import DataCollectionOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DataCollectionOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_data_collection_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_data_collection_out.additional_properties = d + return paged_data_collection_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_dewar_out.py b/src/lims_utils/expeye_client/models/paged_dewar_out.py new file mode 100644 index 0000000..ea8f38d --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_dewar_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dewar_out import DewarOut + + +T = TypeVar("T", bound="PagedDewarOut") + + +@_attrs_define +class PagedDewarOut: + """ + Attributes: + items (list[DewarOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DewarOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_out import DewarOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DewarOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_dewar_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_dewar_out.additional_properties = d + return paged_dewar_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py b/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py new file mode 100644 index 0000000..856050c --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.dewar_transport_history_out import DewarTransportHistoryOut + + +T = TypeVar("T", bound="PagedDewarTransportHistoryOut") + + +@_attrs_define +class PagedDewarTransportHistoryOut: + """ + Attributes: + items (list[DewarTransportHistoryOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DewarTransportHistoryOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_transport_history_out import DewarTransportHistoryOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DewarTransportHistoryOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_dewar_transport_history_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_dewar_transport_history_out.additional_properties = d + return paged_dewar_transport_history_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py b/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py new file mode 100644 index 0000000..7300a43 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.diffraction_plan_out import DiffractionPlanOut + + +T = TypeVar("T", bound="PagedDiffractionPlanOut") + + +@_attrs_define +class PagedDiffractionPlanOut: + """ + Attributes: + items (list[DiffractionPlanOut]): + total (int): + page (int): + limit (int): + """ + + items: list[DiffractionPlanOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.diffraction_plan_out import DiffractionPlanOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = DiffractionPlanOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_diffraction_plan_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_diffraction_plan_out.additional_properties = d + return paged_diffraction_plan_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_energy_scan_out.py b/src/lims_utils/expeye_client/models/paged_energy_scan_out.py new file mode 100644 index 0000000..1066d6d --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_energy_scan_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.energy_scan_out import EnergyScanOut + + +T = TypeVar("T", bound="PagedEnergyScanOut") + + +@_attrs_define +class PagedEnergyScanOut: + """ + Attributes: + items (list[EnergyScanOut]): + total (int): + page (int): + limit (int): + """ + + items: list[EnergyScanOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.energy_scan_out import EnergyScanOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = EnergyScanOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_energy_scan_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_energy_scan_out.additional_properties = d + return paged_energy_scan_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py b/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py new file mode 100644 index 0000000..47dda15 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.fluorescence_spectrum_out import FluorescenceSpectrumOut + + +T = TypeVar("T", bound="PagedFluorescenceSpectrumOut") + + +@_attrs_define +class PagedFluorescenceSpectrumOut: + """ + Attributes: + items (list[FluorescenceSpectrumOut]): + total (int): + page (int): + limit (int): + """ + + items: list[FluorescenceSpectrumOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.fluorescence_spectrum_out import FluorescenceSpectrumOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = FluorescenceSpectrumOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_fluorescence_spectrum_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_fluorescence_spectrum_out.additional_properties = d + return paged_fluorescence_spectrum_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_foil_hole_out.py b/src/lims_utils/expeye_client/models/paged_foil_hole_out.py new file mode 100644 index 0000000..eedfbaa --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_foil_hole_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.foil_hole_out import FoilHoleOut + + +T = TypeVar("T", bound="PagedFoilHoleOut") + + +@_attrs_define +class PagedFoilHoleOut: + """ + Attributes: + items (list[FoilHoleOut]): + total (int): + page (int): + limit (int): + """ + + items: list[FoilHoleOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.foil_hole_out import FoilHoleOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = FoilHoleOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_foil_hole_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_foil_hole_out.additional_properties = d + return paged_foil_hole_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_full_movie_out.py b/src/lims_utils/expeye_client/models/paged_full_movie_out.py new file mode 100644 index 0000000..26b9d4b --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_full_movie_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.full_movie_out import FullMovieOut + + +T = TypeVar("T", bound="PagedFullMovieOut") + + +@_attrs_define +class PagedFullMovieOut: + """ + Attributes: + items (list[FullMovieOut]): + total (int): + page (int): + limit (int): + """ + + items: list[FullMovieOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.full_movie_out import FullMovieOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = FullMovieOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_full_movie_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_full_movie_out.additional_properties = d + return paged_full_movie_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_grid_info_out.py b/src/lims_utils/expeye_client/models/paged_grid_info_out.py new file mode 100644 index 0000000..6b32050 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_grid_info_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.grid_info_out import GridInfoOut + + +T = TypeVar("T", bound="PagedGridInfoOut") + + +@_attrs_define +class PagedGridInfoOut: + """ + Attributes: + items (list[GridInfoOut]): + total (int): + page (int): + limit (int): + """ + + items: list[GridInfoOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.grid_info_out import GridInfoOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = GridInfoOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_grid_info_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_grid_info_out.additional_properties = d + return paged_grid_info_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_grid_square_out.py b/src/lims_utils/expeye_client/models/paged_grid_square_out.py new file mode 100644 index 0000000..daad3d9 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_grid_square_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.grid_square_out import GridSquareOut + + +T = TypeVar("T", bound="PagedGridSquareOut") + + +@_attrs_define +class PagedGridSquareOut: + """ + Attributes: + items (list[GridSquareOut]): + total (int): + page (int): + limit (int): + """ + + items: list[GridSquareOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.grid_square_out import GridSquareOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = GridSquareOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_grid_square_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_grid_square_out.additional_properties = d + return paged_grid_square_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py b/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py new file mode 100644 index 0000000..4a78e98 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.image_quality_indicator_out import ImageQualityIndicatorOut + + +T = TypeVar("T", bound="PagedImageQualityIndicatorOut") + + +@_attrs_define +class PagedImageQualityIndicatorOut: + """ + Attributes: + items (list[ImageQualityIndicatorOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ImageQualityIndicatorOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.image_quality_indicator_out import ImageQualityIndicatorOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ImageQualityIndicatorOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_image_quality_indicator_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_image_quality_indicator_out.additional_properties = d + return paged_image_quality_indicator_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_ligand_out.py b/src/lims_utils/expeye_client/models/paged_ligand_out.py new file mode 100644 index 0000000..0d027cf --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_ligand_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ligand_out import LigandOut + + +T = TypeVar("T", bound="PagedLigandOut") + + +@_attrs_define +class PagedLigandOut: + """ + Attributes: + items (list[LigandOut]): + total (int): + page (int): + limit (int): + """ + + items: list[LigandOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ligand_out import LigandOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = LigandOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_ligand_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_ligand_out.additional_properties = d + return paged_ligand_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_milling_step_out.py b/src/lims_utils/expeye_client/models/paged_milling_step_out.py new file mode 100644 index 0000000..fbcb7ce --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_milling_step_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.milling_step_out import MillingStepOut + + +T = TypeVar("T", bound="PagedMillingStepOut") + + +@_attrs_define +class PagedMillingStepOut: + """ + Attributes: + items (list[MillingStepOut]): + total (int): + page (int): + limit (int): + """ + + items: list[MillingStepOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.milling_step_out import MillingStepOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = MillingStepOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_milling_step_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_milling_step_out.additional_properties = d + return paged_milling_step_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py b/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py new file mode 100644 index 0000000..5b41f85 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.mxmr_run_blob_out import MXMRRunBlobOut + + +T = TypeVar("T", bound="PagedMXMRRunBlobOut") + + +@_attrs_define +class PagedMXMRRunBlobOut: + """ + Attributes: + items (list[MXMRRunBlobOut]): + total (int): + page (int): + limit (int): + """ + + items: list[MXMRRunBlobOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.mxmr_run_blob_out import MXMRRunBlobOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = MXMRRunBlobOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_mxmr_run_blob_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_mxmr_run_blob_out.additional_properties = d + return paged_mxmr_run_blob_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_pdb_out.py b/src/lims_utils/expeye_client/models/paged_pdb_out.py new file mode 100644 index 0000000..e3159ee --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_pdb_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.pdb_out import PDBOut + + +T = TypeVar("T", bound="PagedPDBOut") + + +@_attrs_define +class PagedPDBOut: + """ + Attributes: + items (list[PDBOut]): + total (int): + page (int): + limit (int): + """ + + items: list[PDBOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.pdb_out import PDBOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = PDBOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_pdb_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_pdb_out.additional_properties = d + return paged_pdb_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_person_out.py b/src/lims_utils/expeye_client/models/paged_person_out.py new file mode 100644 index 0000000..ef42aa5 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_person_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.person_out import PersonOut + + +T = TypeVar("T", bound="PagedPersonOut") + + +@_attrs_define +class PagedPersonOut: + """ + Attributes: + items (list[PersonOut]): + total (int): + page (int): + limit (int): + """ + + items: list[PersonOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.person_out import PersonOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = PersonOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_person_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_person_out.additional_properties = d + return paged_person_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py b/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py new file mode 100644 index 0000000..950547b --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.processing_job_with_auto_proc_program_out import ProcessingJobWithAutoProcProgramOut + + +T = TypeVar("T", bound="PagedProcessingJobWithAutoProcProgramOut") + + +@_attrs_define +class PagedProcessingJobWithAutoProcProgramOut: + """ + Attributes: + items (list[ProcessingJobWithAutoProcProgramOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ProcessingJobWithAutoProcProgramOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.processing_job_with_auto_proc_program_out import ProcessingJobWithAutoProcProgramOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ProcessingJobWithAutoProcProgramOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_processing_job_with_auto_proc_program_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_processing_job_with_auto_proc_program_out.additional_properties = d + return paged_processing_job_with_auto_proc_program_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_proposal_out.py b/src/lims_utils/expeye_client/models/paged_proposal_out.py new file mode 100644 index 0000000..fbe97ae --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_proposal_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.proposal_out import ProposalOut + + +T = TypeVar("T", bound="PagedProposalOut") + + +@_attrs_define +class PagedProposalOut: + """ + Attributes: + items (list[ProposalOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ProposalOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.proposal_out import ProposalOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ProposalOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_proposal_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_proposal_out.additional_properties = d + return paged_proposal_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_protein_out.py b/src/lims_utils/expeye_client/models/paged_protein_out.py new file mode 100644 index 0000000..ff86b50 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_protein_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.protein_out import ProteinOut + + +T = TypeVar("T", bound="PagedProteinOut") + + +@_attrs_define +class PagedProteinOut: + """ + Attributes: + items (list[ProteinOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ProteinOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.protein_out import ProteinOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ProteinOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_protein_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_protein_out.additional_properties = d + return paged_protein_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_registered_container_out.py b/src/lims_utils/expeye_client/models/paged_registered_container_out.py new file mode 100644 index 0000000..3becd7c --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_registered_container_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.registered_container_out import RegisteredContainerOut + + +T = TypeVar("T", bound="PagedRegisteredContainerOut") + + +@_attrs_define +class PagedRegisteredContainerOut: + """ + Attributes: + items (list[RegisteredContainerOut]): + total (int): + page (int): + limit (int): + """ + + items: list[RegisteredContainerOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.registered_container_out import RegisteredContainerOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = RegisteredContainerOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_registered_container_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_registered_container_out.additional_properties = d + return paged_registered_container_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py b/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py new file mode 100644 index 0000000..6d27ee3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.registered_dewar_out import RegisteredDewarOut + + +T = TypeVar("T", bound="PagedRegisteredDewarOut") + + +@_attrs_define +class PagedRegisteredDewarOut: + """ + Attributes: + items (list[RegisteredDewarOut]): + total (int): + page (int): + limit (int): + """ + + items: list[RegisteredDewarOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.registered_dewar_out import RegisteredDewarOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = RegisteredDewarOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_registered_dewar_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_registered_dewar_out.additional_properties = d + return paged_registered_dewar_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_robot_action_out.py b/src/lims_utils/expeye_client/models/paged_robot_action_out.py new file mode 100644 index 0000000..647bb76 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_robot_action_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.robot_action_out import RobotActionOut + + +T = TypeVar("T", bound="PagedRobotActionOut") + + +@_attrs_define +class PagedRobotActionOut: + """ + Attributes: + items (list[RobotActionOut]): + total (int): + page (int): + limit (int): + """ + + items: list[RobotActionOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.robot_action_out import RobotActionOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = RobotActionOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_robot_action_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_robot_action_out.additional_properties = d + return paged_robot_action_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_sample_image_out.py b/src/lims_utils/expeye_client/models/paged_sample_image_out.py new file mode 100644 index 0000000..4b34e08 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_sample_image_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sample_image_out import SampleImageOut + + +T = TypeVar("T", bound="PagedSampleImageOut") + + +@_attrs_define +class PagedSampleImageOut: + """ + Attributes: + items (list[SampleImageOut]): + total (int): + page (int): + limit (int): + """ + + items: list[SampleImageOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sample_image_out import SampleImageOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = SampleImageOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_sample_image_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_sample_image_out.additional_properties = d + return paged_sample_image_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_sample_out.py b/src/lims_utils/expeye_client/models/paged_sample_out.py new file mode 100644 index 0000000..ec6ff34 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_sample_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sample_out import SampleOut + + +T = TypeVar("T", bound="PagedSampleOut") + + +@_attrs_define +class PagedSampleOut: + """ + Attributes: + items (list[SampleOut]): + total (int): + page (int): + limit (int): + """ + + items: list[SampleOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sample_out import SampleOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = SampleOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_sample_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_sample_out.additional_properties = d + return paged_sample_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_sample_position_out.py b/src/lims_utils/expeye_client/models/paged_sample_position_out.py new file mode 100644 index 0000000..11d12fe --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_sample_position_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.sample_position_out import SamplePositionOut + + +T = TypeVar("T", bound="PagedSamplePositionOut") + + +@_attrs_define +class PagedSamplePositionOut: + """ + Attributes: + items (list[SamplePositionOut]): + total (int): + page (int): + limit (int): + """ + + items: list[SamplePositionOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sample_position_out import SamplePositionOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = SamplePositionOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_sample_position_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_sample_position_out.additional_properties = d + return paged_sample_position_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py b/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py new file mode 100644 index 0000000..459ffcd --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.session_event_with_children_out import SessionEventWithChildrenOut + + +T = TypeVar("T", bound="PagedSessionEventWithChildrenOut") + + +@_attrs_define +class PagedSessionEventWithChildrenOut: + """ + Attributes: + items (list[SessionEventWithChildrenOut]): + total (int): + page (int): + limit (int): + """ + + items: list[SessionEventWithChildrenOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.session_event_with_children_out import SessionEventWithChildrenOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = SessionEventWithChildrenOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_session_event_with_children_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_session_event_with_children_out.additional_properties = d + return paged_session_event_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_session_out.py b/src/lims_utils/expeye_client/models/paged_session_out.py new file mode 100644 index 0000000..fb1d691 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_session_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.session_out import SessionOut + + +T = TypeVar("T", bound="PagedSessionOut") + + +@_attrs_define +class PagedSessionOut: + """ + Attributes: + items (list[SessionOut]): + total (int): + page (int): + limit (int): + """ + + items: list[SessionOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.session_out import SessionOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = SessionOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_session_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_session_out.additional_properties = d + return paged_session_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_shipment_out.py b/src/lims_utils/expeye_client/models/paged_shipment_out.py new file mode 100644 index 0000000..140404a --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_shipment_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.shipment_out import ShipmentOut + + +T = TypeVar("T", bound="PagedShipmentOut") + + +@_attrs_define +class PagedShipmentOut: + """ + Attributes: + items (list[ShipmentOut]): + total (int): + page (int): + limit (int): + """ + + items: list[ShipmentOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shipment_out import ShipmentOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = ShipmentOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_shipment_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_shipment_out.additional_properties = d + return paged_shipment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_tomogram_out.py b/src/lims_utils/expeye_client/models/paged_tomogram_out.py new file mode 100644 index 0000000..3755d83 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_tomogram_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.tomogram_out import TomogramOut + + +T = TypeVar("T", bound="PagedTomogramOut") + + +@_attrs_define +class PagedTomogramOut: + """ + Attributes: + items (list[TomogramOut]): + total (int): + page (int): + limit (int): + """ + + items: list[TomogramOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.tomogram_out import TomogramOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = TomogramOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_tomogram_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_tomogram_out.additional_properties = d + return paged_tomogram_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py b/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py new file mode 100644 index 0000000..a095681 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.session_event_out import SessionEventOut + from ..models.session_event_with_children_out import SessionEventWithChildrenOut + + +T = TypeVar("T", bound="PagedUnionSessionEventOutSessionEventWithChildrenOut") + + +@_attrs_define +class PagedUnionSessionEventOutSessionEventWithChildrenOut: + """ + Attributes: + items (list[SessionEventOut | SessionEventWithChildrenOut]): + total (int): + page (int): + limit (int): + """ + + items: list[SessionEventOut | SessionEventWithChildrenOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.session_event_out import SessionEventOut # noqa: PLC0415 + + items = [] + for items_item_data in self.items: + items_item: dict[str, Any] + if isinstance(items_item_data, SessionEventOut): + items_item = items_item_data.to_dict() + else: + items_item = items_item_data.to_dict() + + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.session_event_out import SessionEventOut # noqa: PLC0415 + from ..models.session_event_with_children_out import SessionEventWithChildrenOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + + def _parse_items_item(data: object) -> SessionEventOut | SessionEventWithChildrenOut: + try: + if not isinstance(data, dict): + raise TypeError() + items_item_type_0 = SessionEventOut.from_dict(data) + + return items_item_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + items_item_type_1 = SessionEventWithChildrenOut.from_dict(data) + + return items_item_type_1 + + items_item = _parse_items_item(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_union_session_event_out_session_event_with_children_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_union_session_event_out_session_event_with_children_out.additional_properties = d + return paged_union_session_event_out_session_event_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py b/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py new file mode 100644 index 0000000..688b9e4 --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.user_group_has_person_out import UserGroupHasPersonOut + + +T = TypeVar("T", bound="PagedUserGroupHasPersonOut") + + +@_attrs_define +class PagedUserGroupHasPersonOut: + """ + Attributes: + items (list[UserGroupHasPersonOut]): + total (int): + page (int): + limit (int): + """ + + items: list[UserGroupHasPersonOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_group_has_person_out import UserGroupHasPersonOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = UserGroupHasPersonOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_user_group_has_person_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_user_group_has_person_out.additional_properties = d + return paged_user_group_has_person_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py b/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py new file mode 100644 index 0000000..de2c16e --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.user_group_ldap_search_params import UserGroupLDAPSearchParams + + +T = TypeVar("T", bound="PagedUserGroupLDAPSearchParams") + + +@_attrs_define +class PagedUserGroupLDAPSearchParams: + """ + Attributes: + items (list[UserGroupLDAPSearchParams]): + total (int): + page (int): + limit (int): + """ + + items: list[UserGroupLDAPSearchParams] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_group_ldap_search_params import UserGroupLDAPSearchParams # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = UserGroupLDAPSearchParams.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_user_group_ldap_search_params = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_user_group_ldap_search_params.additional_properties = d + return paged_user_group_ldap_search_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/paged_user_group_out.py b/src/lims_utils/expeye_client/models/paged_user_group_out.py new file mode 100644 index 0000000..6a818cb --- /dev/null +++ b/src/lims_utils/expeye_client/models/paged_user_group_out.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.user_group_out import UserGroupOut + + +T = TypeVar("T", bound="PagedUserGroupOut") + + +@_attrs_define +class PagedUserGroupOut: + """ + Attributes: + items (list[UserGroupOut]): + total (int): + page (int): + limit (int): + """ + + items: list[UserGroupOut] + total: int + page: int + limit: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = [] + for items_item_data in self.items: + items_item = items_item_data.to_dict() + items.append(items_item) + + total = self.total + + page = self.page + + limit = self.limit + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + "total": total, + "page": page, + "limit": limit, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.user_group_out import UserGroupOut # noqa: PLC0415 + + d = dict(src_dict) + items = [] + _items = d.pop("items") + for items_item_data in _items: + items_item = UserGroupOut.from_dict(items_item_data) + + items.append(items_item) + + total = d.pop("total") + + page = d.pop("page") + + limit = d.pop("limit") + + paged_user_group_out = cls( + items=items, + total=total, + page=page, + limit=limit, + ) + + paged_user_group_out.additional_properties = d + return paged_user_group_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/pdb_ligand_out.py b/src/lims_utils/expeye_client/models/pdb_ligand_out.py new file mode 100644 index 0000000..f4b7b49 --- /dev/null +++ b/src/lims_utils/expeye_client/models/pdb_ligand_out.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PDBLigandOut") + + +@_attrs_define +class PDBLigandOut: + """ + Attributes: + ligand_id (int): + pdb_id (int): + """ + + ligand_id: int + pdb_id: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + ligand_id = self.ligand_id + + pdb_id = self.pdb_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "ligandId": ligand_id, + "pdbId": pdb_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ligand_id = d.pop("ligandId") + + pdb_id = d.pop("pdbId") + + pdb_ligand_out = cls( + ligand_id=ligand_id, + pdb_id=pdb_id, + ) + + pdb_ligand_out.additional_properties = d + return pdb_ligand_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/pdb_out.py b/src/lims_utils/expeye_client/models/pdb_out.py new file mode 100644 index 0000000..efe1d18 --- /dev/null +++ b/src/lims_utils/expeye_client/models/pdb_out.py @@ -0,0 +1,143 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PDBOut") + + +@_attrs_define +class PDBOut: + """ + Attributes: + pdb_id (int): + name (None | str | Unset): + code (None | str | Unset): + source (None | str | Unset): + contents (None | str | Unset): + """ + + pdb_id: int + name: None | str | Unset = UNSET + code: None | str | Unset = UNSET + source: None | str | Unset = UNSET + contents: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + pdb_id = self.pdb_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + contents: None | str | Unset + if isinstance(self.contents, Unset): + contents = UNSET + else: + contents = self.contents + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "pdbId": pdb_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if code is not UNSET: + field_dict["code"] = code + if source is not UNSET: + field_dict["source"] = source + if contents is not UNSET: + field_dict["contents"] = contents + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + pdb_id = d.pop("pdbId") + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_contents(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + contents = _parse_contents(d.pop("contents", UNSET)) + + pdb_out = cls( + pdb_id=pdb_id, + name=name, + code=code, + source=source, + contents=contents, + ) + + pdb_out.additional_properties = d + return pdb_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_id_with_role.py b/src/lims_utils/expeye_client/models/person_id_with_role.py new file mode 100644 index 0000000..e23a7f3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_id_with_role.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.person_id_with_role_role_type_0 import PersonIdWithRoleRoleType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonIdWithRole") + + +@_attrs_define +class PersonIdWithRole: + """ + Attributes: + person (int): + role (None | PersonIdWithRoleRoleType0 | Unset): + is_remote (bool | Unset): Default: False. + """ + + person: int + role: None | PersonIdWithRoleRoleType0 | Unset = UNSET + is_remote: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person = self.person + + role: None | str | Unset + if isinstance(self.role, Unset): + role = UNSET + elif isinstance(self.role, PersonIdWithRoleRoleType0): + role = self.role.value + else: + role = self.role + + is_remote = self.is_remote + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "person": person, + } + ) + if role is not UNSET: + field_dict["role"] = role + if is_remote is not UNSET: + field_dict["isRemote"] = is_remote + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + person = d.pop("person") + + def _parse_role(data: object) -> None | PersonIdWithRoleRoleType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + role_type_0 = PersonIdWithRoleRoleType0(data) + + return role_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PersonIdWithRoleRoleType0 | Unset, data) + + role = _parse_role(d.pop("role", UNSET)) + + is_remote = d.pop("isRemote", UNSET) + + person_id_with_role = cls( + person=person, + role=role, + is_remote=is_remote, + ) + + person_id_with_role.additional_properties = d + return person_id_with_role + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_id_with_role_role_type_0.py b/src/lims_utils/expeye_client/models/person_id_with_role_role_type_0.py new file mode 100644 index 0000000..e4c4441 --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_id_with_role_role_type_0.py @@ -0,0 +1,18 @@ +from enum import StrEnum + + +class PersonIdWithRoleRoleType0(StrEnum): + ALTERNATE_CONTACT = "Alternate Contact" + ASSOCIATE = "Associate" + CO_INVESTIGATOR = "Co-Investigator" + DATA_ACCESS = "Data Access" + ERA_ADMIN = "ERA Admin" + LOCAL_CONTACT = "Local Contact" + LOCAL_CONTACT_2 = "Local Contact 2" + PRINCIPAL_INVESTIGATOR = "Principal Investigator" + STAFF = "Staff" + TEAM_LEADER = "Team Leader" + TEAM_MEMBER = "Team Member" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/person_in.py b/src/lims_utils/expeye_client/models/person_in.py new file mode 100644 index 0000000..0021fdc --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_in.py @@ -0,0 +1,284 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonIn") + + +@_attrs_define +class PersonIn: + """ + Attributes: + laboratory_id (int | None | Unset): + site_id (int | None | Unset): + person_uuid (None | str | Unset): + family_name (None | str | Unset): + given_name (None | str | Unset): + title (None | str | Unset): + email_address (None | str | Unset): + phone_number (None | str | Unset): + login (None | str | Unset): + fax_number (None | str | Unset): + external_id (None | Unset | UUID): + """ + + laboratory_id: int | None | Unset = UNSET + site_id: int | None | Unset = UNSET + person_uuid: None | str | Unset = UNSET + family_name: None | str | Unset = UNSET + given_name: None | str | Unset = UNSET + title: None | str | Unset = UNSET + email_address: None | str | Unset = UNSET + phone_number: None | str | Unset = UNSET + login: None | str | Unset = UNSET + fax_number: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + laboratory_id: int | None | Unset + if isinstance(self.laboratory_id, Unset): + laboratory_id = UNSET + else: + laboratory_id = self.laboratory_id + + site_id: int | None | Unset + if isinstance(self.site_id, Unset): + site_id = UNSET + else: + site_id = self.site_id + + person_uuid: None | str | Unset + if isinstance(self.person_uuid, Unset): + person_uuid = UNSET + else: + person_uuid = self.person_uuid + + family_name: None | str | Unset + if isinstance(self.family_name, Unset): + family_name = UNSET + else: + family_name = self.family_name + + given_name: None | str | Unset + if isinstance(self.given_name, Unset): + given_name = UNSET + else: + given_name = self.given_name + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + email_address: None | str | Unset + if isinstance(self.email_address, Unset): + email_address = UNSET + else: + email_address = self.email_address + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + login: None | str | Unset + if isinstance(self.login, Unset): + login = UNSET + else: + login = self.login + + fax_number: None | str | Unset + if isinstance(self.fax_number, Unset): + fax_number = UNSET + else: + fax_number = self.fax_number + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if laboratory_id is not UNSET: + field_dict["laboratoryId"] = laboratory_id + if site_id is not UNSET: + field_dict["siteId"] = site_id + if person_uuid is not UNSET: + field_dict["personUUID"] = person_uuid + if family_name is not UNSET: + field_dict["familyName"] = family_name + if given_name is not UNSET: + field_dict["givenName"] = given_name + if title is not UNSET: + field_dict["title"] = title + if email_address is not UNSET: + field_dict["emailAddress"] = email_address + if phone_number is not UNSET: + field_dict["phoneNumber"] = phone_number + if login is not UNSET: + field_dict["login"] = login + if fax_number is not UNSET: + field_dict["faxNumber"] = fax_number + if external_id is not UNSET: + field_dict["externalId"] = external_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_laboratory_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + laboratory_id = _parse_laboratory_id(d.pop("laboratoryId", UNSET)) + + def _parse_site_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + site_id = _parse_site_id(d.pop("siteId", UNSET)) + + def _parse_person_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + person_uuid = _parse_person_uuid(d.pop("personUUID", UNSET)) + + def _parse_family_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + family_name = _parse_family_name(d.pop("familyName", UNSET)) + + def _parse_given_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + given_name = _parse_given_name(d.pop("givenName", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_email_address(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + email_address = _parse_email_address(d.pop("emailAddress", UNSET)) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phoneNumber", UNSET)) + + def _parse_login(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + login = _parse_login(d.pop("login", UNSET)) + + def _parse_fax_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fax_number = _parse_fax_number(d.pop("faxNumber", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + person_in = cls( + laboratory_id=laboratory_id, + site_id=site_id, + person_uuid=person_uuid, + family_name=family_name, + given_name=given_name, + title=title, + email_address=email_address, + phone_number=phone_number, + login=login, + fax_number=fax_number, + external_id=external_id, + ) + + person_in.additional_properties = d + return person_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_list_numeric.py b/src/lims_utils/expeye_client/models/person_list_numeric.py new file mode 100644 index 0000000..bbc022b --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_list_numeric.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonListNumeric") + + +@_attrs_define +class PersonListNumeric: + """ + Attributes: + persons (list[int]): + person_as (Literal['numericId']): + """ + + persons: list[int] + person_as: Literal["numericId"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + persons = self.persons + + person_as = self.person_as + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "persons": persons, + "personAs": person_as, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persons = cast(list[int], d.pop("persons")) + + person_as = cast(Literal["numericId"], d.pop("personAs")) + if person_as != "numericId": + raise ValueError(f"personAs must match const 'numericId', got '{person_as}'") + + person_list_numeric = cls( + persons=persons, + person_as=person_as, + ) + + person_list_numeric.additional_properties = d + return person_list_numeric + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_list_str.py b/src/lims_utils/expeye_client/models/person_list_str.py new file mode 100644 index 0000000..aed0809 --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_list_str.py @@ -0,0 +1,71 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonListStr") + + +@_attrs_define +class PersonListStr: + """ + Attributes: + persons (list[str]): + person_as (Literal['fedId']): + """ + + persons: list[str] + person_as: Literal["fedId"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + persons = self.persons + + person_as = self.person_as + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "persons": persons, + "personAs": person_as, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persons = cast(list[str], d.pop("persons")) + + person_as = cast(Literal["fedId"], d.pop("personAs")) + if person_as != "fedId": + raise ValueError(f"personAs must match const 'fedId', got '{person_as}'") + + person_list_str = cls( + persons=persons, + person_as=person_as, + ) + + person_list_str.additional_properties = d + return person_list_str + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_list_uuid.py b/src/lims_utils/expeye_client/models/person_list_uuid.py new file mode 100644 index 0000000..420577b --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_list_uuid.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="PersonListUuid") + + +@_attrs_define +class PersonListUuid: + """ + Attributes: + persons (list[UUID]): + person_as (Literal['uuid']): + """ + + persons: list[UUID] + person_as: Literal["uuid"] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + persons = [] + for persons_item_data in self.persons: + persons_item = str(persons_item_data) + persons.append(persons_item) + + person_as = self.person_as + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "persons": persons, + "personAs": person_as, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + persons = [] + _persons = d.pop("persons") + for persons_item_data in _persons: + persons_item = UUID(persons_item_data) + + persons.append(persons_item) + + person_as = cast(Literal["uuid"], d.pop("personAs")) + if person_as != "uuid": + raise ValueError(f"personAs must match const 'uuid', got '{person_as}'") + + person_list_uuid = cls( + persons=persons, + person_as=person_as, + ) + + person_list_uuid.additional_properties = d + return person_list_uuid + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_optional.py b/src/lims_utils/expeye_client/models/person_optional.py new file mode 100644 index 0000000..799509a --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_optional.py @@ -0,0 +1,284 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonOptional") + + +@_attrs_define +class PersonOptional: + """ + Attributes: + laboratory_id (int | None | Unset): + site_id (int | None | Unset): + person_uuid (None | str | Unset): + family_name (None | str | Unset): + given_name (None | str | Unset): + title (None | str | Unset): + email_address (None | str | Unset): + phone_number (None | str | Unset): + login (None | str | Unset): + fax_number (None | str | Unset): + external_id (None | Unset | UUID): + """ + + laboratory_id: int | None | Unset = UNSET + site_id: int | None | Unset = UNSET + person_uuid: None | str | Unset = UNSET + family_name: None | str | Unset = UNSET + given_name: None | str | Unset = UNSET + title: None | str | Unset = UNSET + email_address: None | str | Unset = UNSET + phone_number: None | str | Unset = UNSET + login: None | str | Unset = UNSET + fax_number: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + laboratory_id: int | None | Unset + if isinstance(self.laboratory_id, Unset): + laboratory_id = UNSET + else: + laboratory_id = self.laboratory_id + + site_id: int | None | Unset + if isinstance(self.site_id, Unset): + site_id = UNSET + else: + site_id = self.site_id + + person_uuid: None | str | Unset + if isinstance(self.person_uuid, Unset): + person_uuid = UNSET + else: + person_uuid = self.person_uuid + + family_name: None | str | Unset + if isinstance(self.family_name, Unset): + family_name = UNSET + else: + family_name = self.family_name + + given_name: None | str | Unset + if isinstance(self.given_name, Unset): + given_name = UNSET + else: + given_name = self.given_name + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + email_address: None | str | Unset + if isinstance(self.email_address, Unset): + email_address = UNSET + else: + email_address = self.email_address + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + login: None | str | Unset + if isinstance(self.login, Unset): + login = UNSET + else: + login = self.login + + fax_number: None | str | Unset + if isinstance(self.fax_number, Unset): + fax_number = UNSET + else: + fax_number = self.fax_number + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if laboratory_id is not UNSET: + field_dict["laboratoryId"] = laboratory_id + if site_id is not UNSET: + field_dict["siteId"] = site_id + if person_uuid is not UNSET: + field_dict["personUUID"] = person_uuid + if family_name is not UNSET: + field_dict["familyName"] = family_name + if given_name is not UNSET: + field_dict["givenName"] = given_name + if title is not UNSET: + field_dict["title"] = title + if email_address is not UNSET: + field_dict["emailAddress"] = email_address + if phone_number is not UNSET: + field_dict["phoneNumber"] = phone_number + if login is not UNSET: + field_dict["login"] = login + if fax_number is not UNSET: + field_dict["faxNumber"] = fax_number + if external_id is not UNSET: + field_dict["externalId"] = external_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_laboratory_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + laboratory_id = _parse_laboratory_id(d.pop("laboratoryId", UNSET)) + + def _parse_site_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + site_id = _parse_site_id(d.pop("siteId", UNSET)) + + def _parse_person_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + person_uuid = _parse_person_uuid(d.pop("personUUID", UNSET)) + + def _parse_family_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + family_name = _parse_family_name(d.pop("familyName", UNSET)) + + def _parse_given_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + given_name = _parse_given_name(d.pop("givenName", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_email_address(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + email_address = _parse_email_address(d.pop("emailAddress", UNSET)) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phoneNumber", UNSET)) + + def _parse_login(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + login = _parse_login(d.pop("login", UNSET)) + + def _parse_fax_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fax_number = _parse_fax_number(d.pop("faxNumber", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + person_optional = cls( + laboratory_id=laboratory_id, + site_id=site_id, + person_uuid=person_uuid, + family_name=family_name, + given_name=given_name, + title=title, + email_address=email_address, + phone_number=phone_number, + login=login, + fax_number=fax_number, + external_id=external_id, + ) + + person_optional.additional_properties = d + return person_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_out.py b/src/lims_utils/expeye_client/models/person_out.py new file mode 100644 index 0000000..41adb53 --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_out.py @@ -0,0 +1,303 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonOut") + + +@_attrs_define +class PersonOut: + """ + Attributes: + person_id (int): + record_time_stamp (datetime.datetime): + laboratory_id (int | None | Unset): + site_id (int | None | Unset): + person_uuid (None | str | Unset): + family_name (None | str | Unset): + given_name (None | str | Unset): + title (None | str | Unset): + email_address (None | str | Unset): + phone_number (None | str | Unset): + login (None | str | Unset): + fax_number (None | str | Unset): + external_id (None | Unset | UUID): + """ + + person_id: int + record_time_stamp: datetime.datetime + laboratory_id: int | None | Unset = UNSET + site_id: int | None | Unset = UNSET + person_uuid: None | str | Unset = UNSET + family_name: None | str | Unset = UNSET + given_name: None | str | Unset = UNSET + title: None | str | Unset = UNSET + email_address: None | str | Unset = UNSET + phone_number: None | str | Unset = UNSET + login: None | str | Unset = UNSET + fax_number: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id = self.person_id + + record_time_stamp = self.record_time_stamp.isoformat() + + laboratory_id: int | None | Unset + if isinstance(self.laboratory_id, Unset): + laboratory_id = UNSET + else: + laboratory_id = self.laboratory_id + + site_id: int | None | Unset + if isinstance(self.site_id, Unset): + site_id = UNSET + else: + site_id = self.site_id + + person_uuid: None | str | Unset + if isinstance(self.person_uuid, Unset): + person_uuid = UNSET + else: + person_uuid = self.person_uuid + + family_name: None | str | Unset + if isinstance(self.family_name, Unset): + family_name = UNSET + else: + family_name = self.family_name + + given_name: None | str | Unset + if isinstance(self.given_name, Unset): + given_name = UNSET + else: + given_name = self.given_name + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + email_address: None | str | Unset + if isinstance(self.email_address, Unset): + email_address = UNSET + else: + email_address = self.email_address + + phone_number: None | str | Unset + if isinstance(self.phone_number, Unset): + phone_number = UNSET + else: + phone_number = self.phone_number + + login: None | str | Unset + if isinstance(self.login, Unset): + login = UNSET + else: + login = self.login + + fax_number: None | str | Unset + if isinstance(self.fax_number, Unset): + fax_number = UNSET + else: + fax_number = self.fax_number + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "personId": person_id, + "recordTimeStamp": record_time_stamp, + } + ) + if laboratory_id is not UNSET: + field_dict["laboratoryId"] = laboratory_id + if site_id is not UNSET: + field_dict["siteId"] = site_id + if person_uuid is not UNSET: + field_dict["personUUID"] = person_uuid + if family_name is not UNSET: + field_dict["familyName"] = family_name + if given_name is not UNSET: + field_dict["givenName"] = given_name + if title is not UNSET: + field_dict["title"] = title + if email_address is not UNSET: + field_dict["emailAddress"] = email_address + if phone_number is not UNSET: + field_dict["phoneNumber"] = phone_number + if login is not UNSET: + field_dict["login"] = login + if fax_number is not UNSET: + field_dict["faxNumber"] = fax_number + if external_id is not UNSET: + field_dict["externalId"] = external_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + person_id = d.pop("personId") + + record_time_stamp = datetime.datetime.fromisoformat(d.pop("recordTimeStamp")) + + def _parse_laboratory_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + laboratory_id = _parse_laboratory_id(d.pop("laboratoryId", UNSET)) + + def _parse_site_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + site_id = _parse_site_id(d.pop("siteId", UNSET)) + + def _parse_person_uuid(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + person_uuid = _parse_person_uuid(d.pop("personUUID", UNSET)) + + def _parse_family_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + family_name = _parse_family_name(d.pop("familyName", UNSET)) + + def _parse_given_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + given_name = _parse_given_name(d.pop("givenName", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_email_address(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + email_address = _parse_email_address(d.pop("emailAddress", UNSET)) + + def _parse_phone_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_number = _parse_phone_number(d.pop("phoneNumber", UNSET)) + + def _parse_login(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + login = _parse_login(d.pop("login", UNSET)) + + def _parse_fax_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + fax_number = _parse_fax_number(d.pop("faxNumber", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + person_out = cls( + person_id=person_id, + record_time_stamp=record_time_stamp, + laboratory_id=laboratory_id, + site_id=site_id, + person_uuid=person_uuid, + family_name=family_name, + given_name=given_name, + title=title, + email_address=email_address, + phone_number=phone_number, + login=login, + fax_number=fax_number, + external_id=external_id, + ) + + person_out.additional_properties = d + return person_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_with_role.py b/src/lims_utils/expeye_client/models/person_with_role.py new file mode 100644 index 0000000..4b90880 --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_with_role.py @@ -0,0 +1,109 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.person_with_role_role_type_0 import PersonWithRoleRoleType0 +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.person_in import PersonIn + + +T = TypeVar("T", bound="PersonWithRole") + + +@_attrs_define +class PersonWithRole: + """ + Attributes: + person (PersonIn): + role (None | PersonWithRoleRoleType0 | Unset): + is_remote (bool | Unset): Default: False. + """ + + person: PersonIn + role: None | PersonWithRoleRoleType0 | Unset = UNSET + is_remote: bool | Unset = False + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person = self.person.to_dict() + + role: None | str | Unset + if isinstance(self.role, Unset): + role = UNSET + elif isinstance(self.role, PersonWithRoleRoleType0): + role = self.role.value + else: + role = self.role + + is_remote = self.is_remote + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "person": person, + } + ) + if role is not UNSET: + field_dict["role"] = role + if is_remote is not UNSET: + field_dict["isRemote"] = is_remote + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.person_in import PersonIn # noqa: PLC0415 + + d = dict(src_dict) + person = PersonIn.from_dict(d.pop("person")) + + def _parse_role(data: object) -> None | PersonWithRoleRoleType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + role_type_0 = PersonWithRoleRoleType0(data) + + return role_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | PersonWithRoleRoleType0 | Unset, data) + + role = _parse_role(d.pop("role", UNSET)) + + is_remote = d.pop("isRemote", UNSET) + + person_with_role = cls( + person=person, + role=role, + is_remote=is_remote, + ) + + person_with_role.additional_properties = d + return person_with_role + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/person_with_role_role_type_0.py b/src/lims_utils/expeye_client/models/person_with_role_role_type_0.py new file mode 100644 index 0000000..b122313 --- /dev/null +++ b/src/lims_utils/expeye_client/models/person_with_role_role_type_0.py @@ -0,0 +1,18 @@ +from enum import StrEnum + + +class PersonWithRoleRoleType0(StrEnum): + ALTERNATE_CONTACT = "Alternate Contact" + ASSOCIATE = "Associate" + CO_INVESTIGATOR = "Co-Investigator" + DATA_ACCESS = "Data Access" + ERA_ADMIN = "ERA Admin" + LOCAL_CONTACT = "Local Contact" + LOCAL_CONTACT_2 = "Local Contact 2" + PRINCIPAL_INVESTIGATOR = "Principal Investigator" + STAFF = "Staff" + TEAM_LEADER = "Team Leader" + TEAM_MEMBER = "Team Member" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/position_in.py b/src/lims_utils/expeye_client/models/position_in.py new file mode 100644 index 0000000..d3fd2ee --- /dev/null +++ b/src/lims_utils/expeye_client/models/position_in.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PositionIn") + + +@_attrs_define +class PositionIn: + """ + Attributes: + relative_position_id (int | None | Unset): Relative position, pointing to another existing position + pos_x (float | None | Unset): + pos_y (float | None | Unset): + pos_z (float | None | Unset): + scale (float | None | Unset): + """ + + relative_position_id: int | None | Unset = UNSET + pos_x: float | None | Unset = UNSET + pos_y: float | None | Unset = UNSET + pos_z: float | None | Unset = UNSET + scale: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + relative_position_id: int | None | Unset + if isinstance(self.relative_position_id, Unset): + relative_position_id = UNSET + else: + relative_position_id = self.relative_position_id + + pos_x: float | None | Unset + if isinstance(self.pos_x, Unset): + pos_x = UNSET + else: + pos_x = self.pos_x + + pos_y: float | None | Unset + if isinstance(self.pos_y, Unset): + pos_y = UNSET + else: + pos_y = self.pos_y + + pos_z: float | None | Unset + if isinstance(self.pos_z, Unset): + pos_z = UNSET + else: + pos_z = self.pos_z + + scale: float | None | Unset + if isinstance(self.scale, Unset): + scale = UNSET + else: + scale = self.scale + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if relative_position_id is not UNSET: + field_dict["relativePositionId"] = relative_position_id + if pos_x is not UNSET: + field_dict["posX"] = pos_x + if pos_y is not UNSET: + field_dict["posY"] = pos_y + if pos_z is not UNSET: + field_dict["posZ"] = pos_z + if scale is not UNSET: + field_dict["scale"] = scale + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_relative_position_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + relative_position_id = _parse_relative_position_id(d.pop("relativePositionId", UNSET)) + + def _parse_pos_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_x = _parse_pos_x(d.pop("posX", UNSET)) + + def _parse_pos_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_y = _parse_pos_y(d.pop("posY", UNSET)) + + def _parse_pos_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_z = _parse_pos_z(d.pop("posZ", UNSET)) + + def _parse_scale(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + scale = _parse_scale(d.pop("scale", UNSET)) + + position_in = cls( + relative_position_id=relative_position_id, + pos_x=pos_x, + pos_y=pos_y, + pos_z=pos_z, + scale=scale, + ) + + position_in.additional_properties = d + return position_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/position_optional.py b/src/lims_utils/expeye_client/models/position_optional.py new file mode 100644 index 0000000..676fd75 --- /dev/null +++ b/src/lims_utils/expeye_client/models/position_optional.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PositionOptional") + + +@_attrs_define +class PositionOptional: + """ + Attributes: + relative_position_id (int | None | Unset): Relative position, pointing to another existing position + pos_x (float | None | Unset): + pos_y (float | None | Unset): + pos_z (float | None | Unset): + scale (float | None | Unset): + """ + + relative_position_id: int | None | Unset = UNSET + pos_x: float | None | Unset = UNSET + pos_y: float | None | Unset = UNSET + pos_z: float | None | Unset = UNSET + scale: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + relative_position_id: int | None | Unset + if isinstance(self.relative_position_id, Unset): + relative_position_id = UNSET + else: + relative_position_id = self.relative_position_id + + pos_x: float | None | Unset + if isinstance(self.pos_x, Unset): + pos_x = UNSET + else: + pos_x = self.pos_x + + pos_y: float | None | Unset + if isinstance(self.pos_y, Unset): + pos_y = UNSET + else: + pos_y = self.pos_y + + pos_z: float | None | Unset + if isinstance(self.pos_z, Unset): + pos_z = UNSET + else: + pos_z = self.pos_z + + scale: float | None | Unset + if isinstance(self.scale, Unset): + scale = UNSET + else: + scale = self.scale + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if relative_position_id is not UNSET: + field_dict["relativePositionId"] = relative_position_id + if pos_x is not UNSET: + field_dict["posX"] = pos_x + if pos_y is not UNSET: + field_dict["posY"] = pos_y + if pos_z is not UNSET: + field_dict["posZ"] = pos_z + if scale is not UNSET: + field_dict["scale"] = scale + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_relative_position_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + relative_position_id = _parse_relative_position_id(d.pop("relativePositionId", UNSET)) + + def _parse_pos_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_x = _parse_pos_x(d.pop("posX", UNSET)) + + def _parse_pos_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_y = _parse_pos_y(d.pop("posY", UNSET)) + + def _parse_pos_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_z = _parse_pos_z(d.pop("posZ", UNSET)) + + def _parse_scale(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + scale = _parse_scale(d.pop("scale", UNSET)) + + position_optional = cls( + relative_position_id=relative_position_id, + pos_x=pos_x, + pos_y=pos_y, + pos_z=pos_z, + scale=scale, + ) + + position_optional.additional_properties = d + return position_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/position_out.py b/src/lims_utils/expeye_client/models/position_out.py new file mode 100644 index 0000000..0d83411 --- /dev/null +++ b/src/lims_utils/expeye_client/models/position_out.py @@ -0,0 +1,189 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PositionOut") + + +@_attrs_define +class PositionOut: + """ + Attributes: + position_id (int): + record_time_stamp (datetime.datetime | None): + relative_position_id (int | None | Unset): Relative position, pointing to another existing position + pos_x (float | None | Unset): + pos_y (float | None | Unset): + pos_z (float | None | Unset): + scale (float | None | Unset): + """ + + position_id: int + record_time_stamp: datetime.datetime | None + relative_position_id: int | None | Unset = UNSET + pos_x: float | None | Unset = UNSET + pos_y: float | None | Unset = UNSET + pos_z: float | None | Unset = UNSET + scale: float | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + position_id = self.position_id + + record_time_stamp: None | str + if isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + relative_position_id: int | None | Unset + if isinstance(self.relative_position_id, Unset): + relative_position_id = UNSET + else: + relative_position_id = self.relative_position_id + + pos_x: float | None | Unset + if isinstance(self.pos_x, Unset): + pos_x = UNSET + else: + pos_x = self.pos_x + + pos_y: float | None | Unset + if isinstance(self.pos_y, Unset): + pos_y = UNSET + else: + pos_y = self.pos_y + + pos_z: float | None | Unset + if isinstance(self.pos_z, Unset): + pos_z = UNSET + else: + pos_z = self.pos_z + + scale: float | None | Unset + if isinstance(self.scale, Unset): + scale = UNSET + else: + scale = self.scale + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "positionId": position_id, + "recordTimeStamp": record_time_stamp, + } + ) + if relative_position_id is not UNSET: + field_dict["relativePositionId"] = relative_position_id + if pos_x is not UNSET: + field_dict["posX"] = pos_x + if pos_y is not UNSET: + field_dict["posY"] = pos_y + if pos_z is not UNSET: + field_dict["posZ"] = pos_z + if scale is not UNSET: + field_dict["scale"] = scale + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + position_id = d.pop("positionId") + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp")) + + def _parse_relative_position_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + relative_position_id = _parse_relative_position_id(d.pop("relativePositionId", UNSET)) + + def _parse_pos_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_x = _parse_pos_x(d.pop("posX", UNSET)) + + def _parse_pos_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_y = _parse_pos_y(d.pop("posY", UNSET)) + + def _parse_pos_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_z = _parse_pos_z(d.pop("posZ", UNSET)) + + def _parse_scale(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + scale = _parse_scale(d.pop("scale", UNSET)) + + position_out = cls( + position_id=position_id, + record_time_stamp=record_time_stamp, + relative_position_id=relative_position_id, + pos_x=pos_x, + pos_y=pos_y, + pos_z=pos_z, + scale=scale, + ) + + position_out.additional_properties = d + return position_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/processing_job_parameters_in.py b/src/lims_utils/expeye_client/models/processing_job_parameters_in.py new file mode 100644 index 0000000..fb5d9ca --- /dev/null +++ b/src/lims_utils/expeye_client/models/processing_job_parameters_in.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.processing_job_parameters_in_items import ProcessingJobParametersInItems + + +T = TypeVar("T", bound="ProcessingJobParametersIn") + + +@_attrs_define +class ProcessingJobParametersIn: + """ + Attributes: + items (ProcessingJobParametersInItems): + """ + + items: ProcessingJobParametersInItems + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = self.items.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.processing_job_parameters_in_items import ProcessingJobParametersInItems # noqa: PLC0415 + + d = dict(src_dict) + items = ProcessingJobParametersInItems.from_dict(d.pop("items")) + + processing_job_parameters_in = cls( + items=items, + ) + + processing_job_parameters_in.additional_properties = d + return processing_job_parameters_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/processing_job_parameters_in_items.py b/src/lims_utils/expeye_client/models/processing_job_parameters_in_items.py new file mode 100644 index 0000000..388b4ed --- /dev/null +++ b/src/lims_utils/expeye_client/models/processing_job_parameters_in_items.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProcessingJobParametersInItems") + + +@_attrs_define +class ProcessingJobParametersInItems: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + processing_job_parameters_in_items = cls() + + processing_job_parameters_in_items.additional_properties = d + return processing_job_parameters_in_items + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/processing_job_parameters_out.py b/src/lims_utils/expeye_client/models/processing_job_parameters_out.py new file mode 100644 index 0000000..5bcbb84 --- /dev/null +++ b/src/lims_utils/expeye_client/models/processing_job_parameters_out.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.processing_job_parameters_out_items import ProcessingJobParametersOutItems + + +T = TypeVar("T", bound="ProcessingJobParametersOut") + + +@_attrs_define +class ProcessingJobParametersOut: + """ + Attributes: + items (ProcessingJobParametersOutItems): + """ + + items: ProcessingJobParametersOutItems + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + items = self.items.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "items": items, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.processing_job_parameters_out_items import ProcessingJobParametersOutItems # noqa: PLC0415 + + d = dict(src_dict) + items = ProcessingJobParametersOutItems.from_dict(d.pop("items")) + + processing_job_parameters_out = cls( + items=items, + ) + + processing_job_parameters_out.additional_properties = d + return processing_job_parameters_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/processing_job_parameters_out_items.py b/src/lims_utils/expeye_client/models/processing_job_parameters_out_items.py new file mode 100644 index 0000000..3a8ca76 --- /dev/null +++ b/src/lims_utils/expeye_client/models/processing_job_parameters_out_items.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ProcessingJobParametersOutItems") + + +@_attrs_define +class ProcessingJobParametersOutItems: + additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + processing_job_parameters_out_items = cls() + + processing_job_parameters_out_items.additional_properties = d + return processing_job_parameters_out_items + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> str: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: str) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py b/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py new file mode 100644 index 0000000..58f0c95 --- /dev/null +++ b/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py @@ -0,0 +1,198 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.processing_status import ProcessingStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.auto_proc_program_with_auto_proc_out import AutoProcProgramWithAutoProcOut + + +T = TypeVar("T", bound="ProcessingJobWithAutoProcProgramOut") + + +@_attrs_define +class ProcessingJobWithAutoProcProgramOut: + """ + Attributes: + processing_job_id (int): + display_name (None | str): + recipe (None | str): + status (ProcessingStatus): + comments (None | str | Unset): + record_timestamp (datetime.datetime | None | Unset): + automatic (int | None | Unset): + auto_proc_program (list[AutoProcProgramWithAutoProcOut] | Unset): + """ + + processing_job_id: int + display_name: None | str + recipe: None | str + status: ProcessingStatus + comments: None | str | Unset = UNSET + record_timestamp: datetime.datetime | None | Unset = UNSET + automatic: int | None | Unset = UNSET + auto_proc_program: list[AutoProcProgramWithAutoProcOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + processing_job_id = self.processing_job_id + + display_name: None | str + display_name = self.display_name + + recipe: None | str + recipe = self.recipe + + status = self.status.value + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + record_timestamp: None | str | Unset + if isinstance(self.record_timestamp, Unset): + record_timestamp = UNSET + elif isinstance(self.record_timestamp, datetime.datetime): + record_timestamp = self.record_timestamp.isoformat() + else: + record_timestamp = self.record_timestamp + + automatic: int | None | Unset + if isinstance(self.automatic, Unset): + automatic = UNSET + else: + automatic = self.automatic + + auto_proc_program: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.auto_proc_program, Unset): + auto_proc_program = [] + for auto_proc_program_item_data in self.auto_proc_program: + auto_proc_program_item = auto_proc_program_item_data.to_dict() + auto_proc_program.append(auto_proc_program_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "processingJobId": processing_job_id, + "displayName": display_name, + "recipe": recipe, + "status": status, + } + ) + if comments is not UNSET: + field_dict["comments"] = comments + if record_timestamp is not UNSET: + field_dict["recordTimestamp"] = record_timestamp + if automatic is not UNSET: + field_dict["automatic"] = automatic + if auto_proc_program is not UNSET: + field_dict["autoProcProgram"] = auto_proc_program + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.auto_proc_program_with_auto_proc_out import AutoProcProgramWithAutoProcOut # noqa: PLC0415 + + d = dict(src_dict) + processing_job_id = d.pop("processingJobId") + + def _parse_display_name(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + display_name = _parse_display_name(d.pop("displayName")) + + def _parse_recipe(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + recipe = _parse_recipe(d.pop("recipe")) + + status = ProcessingStatus(d.pop("status")) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_record_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_timestamp = _parse_record_timestamp(d.pop("recordTimestamp", UNSET)) + + def _parse_automatic(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + automatic = _parse_automatic(d.pop("automatic", UNSET)) + + _auto_proc_program = d.pop("autoProcProgram", UNSET) + auto_proc_program: list[AutoProcProgramWithAutoProcOut] | Unset = UNSET + if _auto_proc_program is not UNSET: + auto_proc_program = [] + for auto_proc_program_item_data in _auto_proc_program: + auto_proc_program_item = AutoProcProgramWithAutoProcOut.from_dict(auto_proc_program_item_data) + + auto_proc_program.append(auto_proc_program_item) + + processing_job_with_auto_proc_program_out = cls( + processing_job_id=processing_job_id, + display_name=display_name, + recipe=recipe, + status=status, + comments=comments, + record_timestamp=record_timestamp, + automatic=automatic, + auto_proc_program=auto_proc_program, + ) + + processing_job_with_auto_proc_program_out.additional_properties = d + return processing_job_with_auto_proc_program_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/processing_status.py b/src/lims_utils/expeye_client/models/processing_status.py new file mode 100644 index 0000000..24df5bc --- /dev/null +++ b/src/lims_utils/expeye_client/models/processing_status.py @@ -0,0 +1,13 @@ +from enum import StrEnum + + +class ProcessingStatus(StrEnum): + FAIL = "Fail" + QUEUED = "Queued" + RUNNING = "Running" + SUBMITTED = "Submitted" + SUCCESS = "Success" + UNKNOWN = "Unknown" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/proposal_in.py b/src/lims_utils/expeye_client/models/proposal_in.py new file mode 100644 index 0000000..7a77799 --- /dev/null +++ b/src/lims_utils/expeye_client/models/proposal_in.py @@ -0,0 +1,180 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProposalIn") + + +@_attrs_define +class ProposalIn: + """ + Attributes: + person_id (int): + proposal_code (str): + proposal_number (str): + title (None | str | Unset): + proposal_type (None | str | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + """ + + person_id: int + proposal_code: str + proposal_number: str + title: None | str | Unset = UNSET + proposal_type: None | str | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id = self.person_id + + proposal_code = self.proposal_code + + proposal_number = self.proposal_number + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + proposal_type: None | str | Unset + if isinstance(self.proposal_type, Unset): + proposal_type = UNSET + else: + proposal_type = self.proposal_type + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "personId": person_id, + "proposalCode": proposal_code, + "proposalNumber": proposal_number, + } + ) + if title is not UNSET: + field_dict["title"] = title + if proposal_type is not UNSET: + field_dict["proposalType"] = proposal_type + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + person_id = d.pop("personId") + + proposal_code = d.pop("proposalCode") + + proposal_number = d.pop("proposalNumber") + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_proposal_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + proposal_type = _parse_proposal_type(d.pop("proposalType", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + proposal_in = cls( + person_id=person_id, + proposal_code=proposal_code, + proposal_number=proposal_number, + title=title, + proposal_type=proposal_type, + start_date=start_date, + end_date=end_date, + ) + + proposal_in.additional_properties = d + return proposal_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/proposal_optional.py b/src/lims_utils/expeye_client/models/proposal_optional.py new file mode 100644 index 0000000..6dff1b6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/proposal_optional.py @@ -0,0 +1,235 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.state_enum import StateEnum +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProposalOptional") + + +@_attrs_define +class ProposalOptional: + """ + Attributes: + title (None | str | Unset): + proposal_type (None | str | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + person_id (int | None | Unset): + bltime_stamp (datetime.datetime | None | Unset): + state (None | StateEnum | Unset): + """ + + title: None | str | Unset = UNSET + proposal_type: None | str | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + person_id: int | None | Unset = UNSET + bltime_stamp: datetime.datetime | None | Unset = UNSET + state: None | StateEnum | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + proposal_type: None | str | Unset + if isinstance(self.proposal_type, Unset): + proposal_type = UNSET + else: + proposal_type = self.proposal_type + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + bltime_stamp: None | str | Unset + if isinstance(self.bltime_stamp, Unset): + bltime_stamp = UNSET + elif isinstance(self.bltime_stamp, datetime.datetime): + bltime_stamp = self.bltime_stamp.isoformat() + else: + bltime_stamp = self.bltime_stamp + + state: None | str | Unset + if isinstance(self.state, Unset): + state = UNSET + elif isinstance(self.state, StateEnum): + state = self.state.value + else: + state = self.state + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if title is not UNSET: + field_dict["title"] = title + if proposal_type is not UNSET: + field_dict["proposalType"] = proposal_type + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + if person_id is not UNSET: + field_dict["personId"] = person_id + if bltime_stamp is not UNSET: + field_dict["bltimeStamp"] = bltime_stamp + if state is not UNSET: + field_dict["state"] = state + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_proposal_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + proposal_type = _parse_proposal_type(d.pop("proposalType", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_bltime_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bltime_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bltime_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bltime_stamp = _parse_bltime_stamp(d.pop("bltimeStamp", UNSET)) + + def _parse_state(data: object) -> None | StateEnum | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + state_type_0 = StateEnum(data) + + return state_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | StateEnum | Unset, data) + + state = _parse_state(d.pop("state", UNSET)) + + proposal_optional = cls( + title=title, + proposal_type=proposal_type, + start_date=start_date, + end_date=end_date, + person_id=person_id, + bltime_stamp=bltime_stamp, + state=state, + ) + + proposal_optional.additional_properties = d + return proposal_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/proposal_out.py b/src/lims_utils/expeye_client/models/proposal_out.py new file mode 100644 index 0000000..9f23f05 --- /dev/null +++ b/src/lims_utils/expeye_client/models/proposal_out.py @@ -0,0 +1,296 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.state_enum import StateEnum +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProposalOut") + + +@_attrs_define +class ProposalOut: + """ + Attributes: + proposal_id (int): Proposal ID + person_id (int): + bltime_stamp (datetime.datetime): + state (StateEnum): + proposal_code (str): + proposal_number (str): + title (None | str | Unset): + proposal_type (None | str | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + sessions (int | None | Unset): + beamlines (list[str] | None | Unset): + principal_investigator (None | str | Unset): + uas_link (None | str | Unset): + """ + + proposal_id: int + person_id: int + bltime_stamp: datetime.datetime + state: StateEnum + proposal_code: str + proposal_number: str + title: None | str | Unset = UNSET + proposal_type: None | str | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + sessions: int | None | Unset = UNSET + beamlines: list[str] | None | Unset = UNSET + principal_investigator: None | str | Unset = UNSET + uas_link: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + proposal_id = self.proposal_id + + person_id = self.person_id + + bltime_stamp = self.bltime_stamp.isoformat() + + state = self.state.value + + proposal_code = self.proposal_code + + proposal_number = self.proposal_number + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + proposal_type: None | str | Unset + if isinstance(self.proposal_type, Unset): + proposal_type = UNSET + else: + proposal_type = self.proposal_type + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + sessions: int | None | Unset + if isinstance(self.sessions, Unset): + sessions = UNSET + else: + sessions = self.sessions + + beamlines: list[str] | None | Unset + if isinstance(self.beamlines, Unset): + beamlines = UNSET + elif isinstance(self.beamlines, list): + beamlines = self.beamlines + + else: + beamlines = self.beamlines + + principal_investigator: None | str | Unset + if isinstance(self.principal_investigator, Unset): + principal_investigator = UNSET + else: + principal_investigator = self.principal_investigator + + uas_link: None | str | Unset + if isinstance(self.uas_link, Unset): + uas_link = UNSET + else: + uas_link = self.uas_link + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "proposalId": proposal_id, + "personId": person_id, + "bltimeStamp": bltime_stamp, + "state": state, + "proposalCode": proposal_code, + "proposalNumber": proposal_number, + } + ) + if title is not UNSET: + field_dict["title"] = title + if proposal_type is not UNSET: + field_dict["proposalType"] = proposal_type + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + if sessions is not UNSET: + field_dict["sessions"] = sessions + if beamlines is not UNSET: + field_dict["beamlines"] = beamlines + if principal_investigator is not UNSET: + field_dict["principalInvestigator"] = principal_investigator + if uas_link is not UNSET: + field_dict["uasLink"] = uas_link + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + proposal_id = d.pop("proposalId") + + person_id = d.pop("personId") + + bltime_stamp = datetime.datetime.fromisoformat(d.pop("bltimeStamp")) + + state = StateEnum(d.pop("state")) + + proposal_code = d.pop("proposalCode") + + proposal_number = d.pop("proposalNumber") + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_proposal_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + proposal_type = _parse_proposal_type(d.pop("proposalType", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + def _parse_sessions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sessions = _parse_sessions(d.pop("sessions", UNSET)) + + def _parse_beamlines(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + beamlines_type_0 = cast(list[str], data) + + return beamlines_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + beamlines = _parse_beamlines(d.pop("beamlines", UNSET)) + + def _parse_principal_investigator(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + principal_investigator = _parse_principal_investigator(d.pop("principalInvestigator", UNSET)) + + def _parse_uas_link(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + uas_link = _parse_uas_link(d.pop("uasLink", UNSET)) + + proposal_out = cls( + proposal_id=proposal_id, + person_id=person_id, + bltime_stamp=bltime_stamp, + state=state, + proposal_code=proposal_code, + proposal_number=proposal_number, + title=title, + proposal_type=proposal_type, + start_date=start_date, + end_date=end_date, + sessions=sessions, + beamlines=beamlines, + principal_investigator=principal_investigator, + uas_link=uas_link, + ) + + proposal_out.additional_properties = d + return proposal_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/proposal_with_children_out.py b/src/lims_utils/expeye_client/models/proposal_with_children_out.py new file mode 100644 index 0000000..bfbeddb --- /dev/null +++ b/src/lims_utils/expeye_client/models/proposal_with_children_out.py @@ -0,0 +1,323 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.state_enum import StateEnum +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.shipment_with_children_out import ShipmentWithChildrenOut + + +T = TypeVar("T", bound="ProposalWithChildrenOut") + + +@_attrs_define +class ProposalWithChildrenOut: + """ + Attributes: + proposal_id (int): Proposal ID + person_id (int): + bltime_stamp (datetime.datetime): + state (StateEnum): + proposal_code (str): + proposal_number (str): + title (None | str | Unset): + proposal_type (None | str | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + sessions (int | None | Unset): + beamlines (list[str] | None | Unset): + principal_investigator (None | str | Unset): + uas_link (None | str | Unset): + children (list[ShipmentWithChildrenOut] | Unset): + """ + + proposal_id: int + person_id: int + bltime_stamp: datetime.datetime + state: StateEnum + proposal_code: str + proposal_number: str + title: None | str | Unset = UNSET + proposal_type: None | str | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + sessions: int | None | Unset = UNSET + beamlines: list[str] | None | Unset = UNSET + principal_investigator: None | str | Unset = UNSET + uas_link: None | str | Unset = UNSET + children: list[ShipmentWithChildrenOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + proposal_id = self.proposal_id + + person_id = self.person_id + + bltime_stamp = self.bltime_stamp.isoformat() + + state = self.state.value + + proposal_code = self.proposal_code + + proposal_number = self.proposal_number + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + proposal_type: None | str | Unset + if isinstance(self.proposal_type, Unset): + proposal_type = UNSET + else: + proposal_type = self.proposal_type + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + sessions: int | None | Unset + if isinstance(self.sessions, Unset): + sessions = UNSET + else: + sessions = self.sessions + + beamlines: list[str] | None | Unset + if isinstance(self.beamlines, Unset): + beamlines = UNSET + elif isinstance(self.beamlines, list): + beamlines = self.beamlines + + else: + beamlines = self.beamlines + + principal_investigator: None | str | Unset + if isinstance(self.principal_investigator, Unset): + principal_investigator = UNSET + else: + principal_investigator = self.principal_investigator + + uas_link: None | str | Unset + if isinstance(self.uas_link, Unset): + uas_link = UNSET + else: + uas_link = self.uas_link + + children: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.children, Unset): + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "proposalId": proposal_id, + "personId": person_id, + "bltimeStamp": bltime_stamp, + "state": state, + "proposalCode": proposal_code, + "proposalNumber": proposal_number, + } + ) + if title is not UNSET: + field_dict["title"] = title + if proposal_type is not UNSET: + field_dict["proposalType"] = proposal_type + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + if sessions is not UNSET: + field_dict["sessions"] = sessions + if beamlines is not UNSET: + field_dict["beamlines"] = beamlines + if principal_investigator is not UNSET: + field_dict["principalInvestigator"] = principal_investigator + if uas_link is not UNSET: + field_dict["uasLink"] = uas_link + if children is not UNSET: + field_dict["children"] = children + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shipment_with_children_out import ShipmentWithChildrenOut # noqa: PLC0415 + + d = dict(src_dict) + proposal_id = d.pop("proposalId") + + person_id = d.pop("personId") + + bltime_stamp = datetime.datetime.fromisoformat(d.pop("bltimeStamp")) + + state = StateEnum(d.pop("state")) + + proposal_code = d.pop("proposalCode") + + proposal_number = d.pop("proposalNumber") + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + def _parse_proposal_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + proposal_type = _parse_proposal_type(d.pop("proposalType", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + def _parse_sessions(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sessions = _parse_sessions(d.pop("sessions", UNSET)) + + def _parse_beamlines(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + beamlines_type_0 = cast(list[str], data) + + return beamlines_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + beamlines = _parse_beamlines(d.pop("beamlines", UNSET)) + + def _parse_principal_investigator(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + principal_investigator = _parse_principal_investigator(d.pop("principalInvestigator", UNSET)) + + def _parse_uas_link(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + uas_link = _parse_uas_link(d.pop("uasLink", UNSET)) + + _children = d.pop("children", UNSET) + children: list[ShipmentWithChildrenOut] | Unset = UNSET + if _children is not UNSET: + children = [] + for children_item_data in _children: + children_item = ShipmentWithChildrenOut.from_dict(children_item_data) + + children.append(children_item) + + proposal_with_children_out = cls( + proposal_id=proposal_id, + person_id=person_id, + bltime_stamp=bltime_stamp, + state=state, + proposal_code=proposal_code, + proposal_number=proposal_number, + title=title, + proposal_type=proposal_type, + start_date=start_date, + end_date=end_date, + sessions=sessions, + beamlines=beamlines, + principal_investigator=principal_investigator, + uas_link=uas_link, + children=children, + ) + + proposal_with_children_out.additional_properties = d + return proposal_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/protein_in.py b/src/lims_utils/expeye_client/models/protein_in.py new file mode 100644 index 0000000..948064c --- /dev/null +++ b/src/lims_utils/expeye_client/models/protein_in.py @@ -0,0 +1,295 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProteinIn") + + +@_attrs_define +class ProteinIn: + """ + Attributes: + name (None | str | Unset): + acronym (None | str | Unset): + description (None | str | Unset): + hazard_group (int | None | Unset): + containment_level (int | None | Unset): + safety_level (None | SafetyLevels | Unset): + protein_type (None | str | Unset): + abundance (float | None | Unset): + density (float | None | Unset): + sequence (None | str | Unset): + external_id (None | Unset | UUID): + """ + + name: None | str | Unset = UNSET + acronym: None | str | Unset = UNSET + description: None | str | Unset = UNSET + hazard_group: int | None | Unset = UNSET + containment_level: int | None | Unset = UNSET + safety_level: None | SafetyLevels | Unset = UNSET + protein_type: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + density: float | None | Unset = UNSET + sequence: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + acronym: None | str | Unset + if isinstance(self.acronym, Unset): + acronym = UNSET + else: + acronym = self.acronym + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + hazard_group: int | None | Unset + if isinstance(self.hazard_group, Unset): + hazard_group = UNSET + else: + hazard_group = self.hazard_group + + containment_level: int | None | Unset + if isinstance(self.containment_level, Unset): + containment_level = UNSET + else: + containment_level = self.containment_level + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + protein_type: None | str | Unset + if isinstance(self.protein_type, Unset): + protein_type = UNSET + else: + protein_type = self.protein_type + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + density: float | None | Unset + if isinstance(self.density, Unset): + density = UNSET + else: + density = self.density + + sequence: None | str | Unset + if isinstance(self.sequence, Unset): + sequence = UNSET + else: + sequence = self.sequence + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if acronym is not UNSET: + field_dict["acronym"] = acronym + if description is not UNSET: + field_dict["description"] = description + if hazard_group is not UNSET: + field_dict["hazardGroup"] = hazard_group + if containment_level is not UNSET: + field_dict["containmentLevel"] = containment_level + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + if protein_type is not UNSET: + field_dict["proteinType"] = protein_type + if abundance is not UNSET: + field_dict["abundance"] = abundance + if density is not UNSET: + field_dict["density"] = density + if sequence is not UNSET: + field_dict["sequence"] = sequence + if external_id is not UNSET: + field_dict["externalId"] = external_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_acronym(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + acronym = _parse_acronym(d.pop("acronym", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_hazard_group(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + hazard_group = _parse_hazard_group(d.pop("hazardGroup", UNSET)) + + def _parse_containment_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + containment_level = _parse_containment_level(d.pop("containmentLevel", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + def _parse_protein_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + protein_type = _parse_protein_type(d.pop("proteinType", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + density = _parse_density(d.pop("density", UNSET)) + + def _parse_sequence(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sequence = _parse_sequence(d.pop("sequence", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + protein_in = cls( + name=name, + acronym=acronym, + description=description, + hazard_group=hazard_group, + containment_level=containment_level, + safety_level=safety_level, + protein_type=protein_type, + abundance=abundance, + density=density, + sequence=sequence, + external_id=external_id, + ) + + protein_in.additional_properties = d + return protein_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/protein_optional.py b/src/lims_utils/expeye_client/models/protein_optional.py new file mode 100644 index 0000000..5459380 --- /dev/null +++ b/src/lims_utils/expeye_client/models/protein_optional.py @@ -0,0 +1,295 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProteinOptional") + + +@_attrs_define +class ProteinOptional: + """ + Attributes: + name (None | str | Unset): + acronym (None | str | Unset): + description (None | str | Unset): + hazard_group (int | None | Unset): + containment_level (int | None | Unset): + safety_level (None | SafetyLevels | Unset): + protein_type (None | str | Unset): + abundance (float | None | Unset): + density (float | None | Unset): + sequence (None | str | Unset): + external_id (None | Unset | UUID): + """ + + name: None | str | Unset = UNSET + acronym: None | str | Unset = UNSET + description: None | str | Unset = UNSET + hazard_group: int | None | Unset = UNSET + containment_level: int | None | Unset = UNSET + safety_level: None | SafetyLevels | Unset = UNSET + protein_type: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + density: float | None | Unset = UNSET + sequence: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + acronym: None | str | Unset + if isinstance(self.acronym, Unset): + acronym = UNSET + else: + acronym = self.acronym + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + hazard_group: int | None | Unset + if isinstance(self.hazard_group, Unset): + hazard_group = UNSET + else: + hazard_group = self.hazard_group + + containment_level: int | None | Unset + if isinstance(self.containment_level, Unset): + containment_level = UNSET + else: + containment_level = self.containment_level + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + protein_type: None | str | Unset + if isinstance(self.protein_type, Unset): + protein_type = UNSET + else: + protein_type = self.protein_type + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + density: float | None | Unset + if isinstance(self.density, Unset): + density = UNSET + else: + density = self.density + + sequence: None | str | Unset + if isinstance(self.sequence, Unset): + sequence = UNSET + else: + sequence = self.sequence + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if acronym is not UNSET: + field_dict["acronym"] = acronym + if description is not UNSET: + field_dict["description"] = description + if hazard_group is not UNSET: + field_dict["hazardGroup"] = hazard_group + if containment_level is not UNSET: + field_dict["containmentLevel"] = containment_level + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + if protein_type is not UNSET: + field_dict["proteinType"] = protein_type + if abundance is not UNSET: + field_dict["abundance"] = abundance + if density is not UNSET: + field_dict["density"] = density + if sequence is not UNSET: + field_dict["sequence"] = sequence + if external_id is not UNSET: + field_dict["externalId"] = external_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_acronym(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + acronym = _parse_acronym(d.pop("acronym", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_hazard_group(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + hazard_group = _parse_hazard_group(d.pop("hazardGroup", UNSET)) + + def _parse_containment_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + containment_level = _parse_containment_level(d.pop("containmentLevel", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + def _parse_protein_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + protein_type = _parse_protein_type(d.pop("proteinType", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + density = _parse_density(d.pop("density", UNSET)) + + def _parse_sequence(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sequence = _parse_sequence(d.pop("sequence", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + protein_optional = cls( + name=name, + acronym=acronym, + description=description, + hazard_group=hazard_group, + containment_level=containment_level, + safety_level=safety_level, + protein_type=protein_type, + abundance=abundance, + density=density, + sequence=sequence, + external_id=external_id, + ) + + protein_optional.additional_properties = d + return protein_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/protein_out.py b/src/lims_utils/expeye_client/models/protein_out.py new file mode 100644 index 0000000..d4a1419 --- /dev/null +++ b/src/lims_utils/expeye_client/models/protein_out.py @@ -0,0 +1,315 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ProteinOut") + + +@_attrs_define +class ProteinOut: + """ + Attributes: + name (None | str | Unset): + acronym (None | str | Unset): + description (None | str | Unset): + hazard_group (int | None | Unset): + containment_level (int | None | Unset): + safety_level (None | SafetyLevels | Unset): + protein_type (None | str | Unset): + abundance (float | None | Unset): + density (float | None | Unset): + sequence (None | str | Unset): + external_id (None | Unset | UUID): + protein_id (int | None | Unset): + """ + + name: None | str | Unset = UNSET + acronym: None | str | Unset = UNSET + description: None | str | Unset = UNSET + hazard_group: int | None | Unset = UNSET + containment_level: int | None | Unset = UNSET + safety_level: None | SafetyLevels | Unset = UNSET + protein_type: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + density: float | None | Unset = UNSET + sequence: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + protein_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + acronym: None | str | Unset + if isinstance(self.acronym, Unset): + acronym = UNSET + else: + acronym = self.acronym + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + hazard_group: int | None | Unset + if isinstance(self.hazard_group, Unset): + hazard_group = UNSET + else: + hazard_group = self.hazard_group + + containment_level: int | None | Unset + if isinstance(self.containment_level, Unset): + containment_level = UNSET + else: + containment_level = self.containment_level + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + protein_type: None | str | Unset + if isinstance(self.protein_type, Unset): + protein_type = UNSET + else: + protein_type = self.protein_type + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + density: float | None | Unset + if isinstance(self.density, Unset): + density = UNSET + else: + density = self.density + + sequence: None | str | Unset + if isinstance(self.sequence, Unset): + sequence = UNSET + else: + sequence = self.sequence + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + protein_id: int | None | Unset + if isinstance(self.protein_id, Unset): + protein_id = UNSET + else: + protein_id = self.protein_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if acronym is not UNSET: + field_dict["acronym"] = acronym + if description is not UNSET: + field_dict["description"] = description + if hazard_group is not UNSET: + field_dict["hazardGroup"] = hazard_group + if containment_level is not UNSET: + field_dict["containmentLevel"] = containment_level + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + if protein_type is not UNSET: + field_dict["proteinType"] = protein_type + if abundance is not UNSET: + field_dict["abundance"] = abundance + if density is not UNSET: + field_dict["density"] = density + if sequence is not UNSET: + field_dict["sequence"] = sequence + if external_id is not UNSET: + field_dict["externalId"] = external_id + if protein_id is not UNSET: + field_dict["proteinId"] = protein_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_acronym(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + acronym = _parse_acronym(d.pop("acronym", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_hazard_group(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + hazard_group = _parse_hazard_group(d.pop("hazardGroup", UNSET)) + + def _parse_containment_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + containment_level = _parse_containment_level(d.pop("containmentLevel", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + def _parse_protein_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + protein_type = _parse_protein_type(d.pop("proteinType", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + density = _parse_density(d.pop("density", UNSET)) + + def _parse_sequence(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sequence = _parse_sequence(d.pop("sequence", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + def _parse_protein_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + protein_id = _parse_protein_id(d.pop("proteinId", UNSET)) + + protein_out = cls( + name=name, + acronym=acronym, + description=description, + hazard_group=hazard_group, + containment_level=containment_level, + safety_level=safety_level, + protein_type=protein_type, + abundance=abundance, + density=density, + sequence=sequence, + external_id=external_id, + protein_id=protein_id, + ) + + protein_out.additional_properties = d + return protein_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/protein_with_crystals_in.py b/src/lims_utils/expeye_client/models/protein_with_crystals_in.py new file mode 100644 index 0000000..8b1ba85 --- /dev/null +++ b/src/lims_utils/expeye_client/models/protein_with_crystals_in.py @@ -0,0 +1,88 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.crystal_in import CrystalIn + + +T = TypeVar("T", bound="ProteinWithCrystalsIn") + + +@_attrs_define +class ProteinWithCrystalsIn: + """ + Attributes: + protein (int | str): + crystals (list[CrystalIn]): + """ + + protein: int | str + crystals: list[CrystalIn] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + protein: int | str + protein = self.protein + + crystals = [] + for crystals_item_data in self.crystals: + crystals_item = crystals_item_data.to_dict() + crystals.append(crystals_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "protein": protein, + "crystals": crystals, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.crystal_in import CrystalIn # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_protein(data: object) -> int | str: + return cast(int | str, data) + + protein = _parse_protein(d.pop("protein")) + + crystals = [] + _crystals = d.pop("crystals") + for crystals_item_data in _crystals: + crystals_item = CrystalIn.from_dict(crystals_item_data) + + crystals.append(crystals_item) + + protein_with_crystals_in = cls( + protein=protein, + crystals=crystals, + ) + + protein_with_crystals_in.additional_properties = d + return protein_with_crystals_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/protein_with_crystals_out.py b/src/lims_utils/expeye_client/models/protein_with_crystals_out.py new file mode 100644 index 0000000..0db8a13 --- /dev/null +++ b/src/lims_utils/expeye_client/models/protein_with_crystals_out.py @@ -0,0 +1,342 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.crystal_out import CrystalOut + + +T = TypeVar("T", bound="ProteinWithCrystalsOut") + + +@_attrs_define +class ProteinWithCrystalsOut: + """ + Attributes: + name (None | str | Unset): + acronym (None | str | Unset): + description (None | str | Unset): + hazard_group (int | None | Unset): + containment_level (int | None | Unset): + safety_level (None | SafetyLevels | Unset): + protein_type (None | str | Unset): + abundance (float | None | Unset): + density (float | None | Unset): + sequence (None | str | Unset): + external_id (None | Unset | UUID): + protein_id (int | None | Unset): + crystals (list[CrystalOut] | Unset): + """ + + name: None | str | Unset = UNSET + acronym: None | str | Unset = UNSET + description: None | str | Unset = UNSET + hazard_group: int | None | Unset = UNSET + containment_level: int | None | Unset = UNSET + safety_level: None | SafetyLevels | Unset = UNSET + protein_type: None | str | Unset = UNSET + abundance: float | None | Unset = UNSET + density: float | None | Unset = UNSET + sequence: None | str | Unset = UNSET + external_id: None | Unset | UUID = UNSET + protein_id: int | None | Unset = UNSET + crystals: list[CrystalOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + acronym: None | str | Unset + if isinstance(self.acronym, Unset): + acronym = UNSET + else: + acronym = self.acronym + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + hazard_group: int | None | Unset + if isinstance(self.hazard_group, Unset): + hazard_group = UNSET + else: + hazard_group = self.hazard_group + + containment_level: int | None | Unset + if isinstance(self.containment_level, Unset): + containment_level = UNSET + else: + containment_level = self.containment_level + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + protein_type: None | str | Unset + if isinstance(self.protein_type, Unset): + protein_type = UNSET + else: + protein_type = self.protein_type + + abundance: float | None | Unset + if isinstance(self.abundance, Unset): + abundance = UNSET + else: + abundance = self.abundance + + density: float | None | Unset + if isinstance(self.density, Unset): + density = UNSET + else: + density = self.density + + sequence: None | str | Unset + if isinstance(self.sequence, Unset): + sequence = UNSET + else: + sequence = self.sequence + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + protein_id: int | None | Unset + if isinstance(self.protein_id, Unset): + protein_id = UNSET + else: + protein_id = self.protein_id + + crystals: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.crystals, Unset): + crystals = [] + for crystals_item_data in self.crystals: + crystals_item = crystals_item_data.to_dict() + crystals.append(crystals_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if acronym is not UNSET: + field_dict["acronym"] = acronym + if description is not UNSET: + field_dict["description"] = description + if hazard_group is not UNSET: + field_dict["hazardGroup"] = hazard_group + if containment_level is not UNSET: + field_dict["containmentLevel"] = containment_level + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + if protein_type is not UNSET: + field_dict["proteinType"] = protein_type + if abundance is not UNSET: + field_dict["abundance"] = abundance + if density is not UNSET: + field_dict["density"] = density + if sequence is not UNSET: + field_dict["sequence"] = sequence + if external_id is not UNSET: + field_dict["externalId"] = external_id + if protein_id is not UNSET: + field_dict["proteinId"] = protein_id + if crystals is not UNSET: + field_dict["crystals"] = crystals + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.crystal_out import CrystalOut # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_acronym(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + acronym = _parse_acronym(d.pop("acronym", UNSET)) + + def _parse_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + description = _parse_description(d.pop("description", UNSET)) + + def _parse_hazard_group(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + hazard_group = _parse_hazard_group(d.pop("hazardGroup", UNSET)) + + def _parse_containment_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + containment_level = _parse_containment_level(d.pop("containmentLevel", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + def _parse_protein_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + protein_type = _parse_protein_type(d.pop("proteinType", UNSET)) + + def _parse_abundance(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + abundance = _parse_abundance(d.pop("abundance", UNSET)) + + def _parse_density(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + density = _parse_density(d.pop("density", UNSET)) + + def _parse_sequence(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sequence = _parse_sequence(d.pop("sequence", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + def _parse_protein_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + protein_id = _parse_protein_id(d.pop("proteinId", UNSET)) + + _crystals = d.pop("crystals", UNSET) + crystals: list[CrystalOut] | Unset = UNSET + if _crystals is not UNSET: + crystals = [] + for crystals_item_data in _crystals: + crystals_item = CrystalOut.from_dict(crystals_item_data) + + crystals.append(crystals_item) + + protein_with_crystals_out = cls( + name=name, + acronym=acronym, + description=description, + hazard_group=hazard_group, + containment_level=containment_level, + safety_level=safety_level, + protein_type=protein_type, + abundance=abundance, + density=density, + sequence=sequence, + external_id=external_id, + protein_id=protein_id, + crystals=crystals, + ) + + protein_with_crystals_out.additional_properties = d + return protein_with_crystals_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/reduction_parameters.py b/src/lims_utils/expeye_client/models/reduction_parameters.py new file mode 100644 index 0000000..359eec0 --- /dev/null +++ b/src/lims_utils/expeye_client/models/reduction_parameters.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class ReductionParameters(StrEnum): + ALL = "All" + FASTEST_DIMENSION = "Fastest Dimension" + VALUE_2 = "1D" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/registered_container_has_proposal_in.py b/src/lims_utils/expeye_client/models/registered_container_has_proposal_in.py new file mode 100644 index 0000000..6f94d67 --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_container_has_proposal_in.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredContainerHasProposalIn") + + +@_attrs_define +class RegisteredContainerHasProposalIn: + """ + Attributes: + person_id (int | None | Unset): + record_timestamp (datetime.datetime | None | Unset): + """ + + person_id: int | None | Unset = UNSET + record_timestamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + record_timestamp: None | str | Unset + if isinstance(self.record_timestamp, Unset): + record_timestamp = UNSET + elif isinstance(self.record_timestamp, datetime.datetime): + record_timestamp = self.record_timestamp.isoformat() + else: + record_timestamp = self.record_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if person_id is not UNSET: + field_dict["personId"] = person_id + if record_timestamp is not UNSET: + field_dict["recordTimestamp"] = record_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_record_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_timestamp = _parse_record_timestamp(d.pop("recordTimestamp", UNSET)) + + registered_container_has_proposal_in = cls( + person_id=person_id, + record_timestamp=record_timestamp, + ) + + registered_container_has_proposal_in.additional_properties = d + return registered_container_has_proposal_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_container_has_proposal_out.py b/src/lims_utils/expeye_client/models/registered_container_has_proposal_out.py new file mode 100644 index 0000000..9054592 --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_container_has_proposal_out.py @@ -0,0 +1,130 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredContainerHasProposalOut") + + +@_attrs_define +class RegisteredContainerHasProposalOut: + """ + Attributes: + container_registry_has_proposal_id (int): + container_registry_id (int): + proposal_id (int): + person_id (int | None | Unset): + record_timestamp (datetime.datetime | None | Unset): + """ + + container_registry_has_proposal_id: int + container_registry_id: int + proposal_id: int + person_id: int | None | Unset = UNSET + record_timestamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_registry_has_proposal_id = self.container_registry_has_proposal_id + + container_registry_id = self.container_registry_id + + proposal_id = self.proposal_id + + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + record_timestamp: None | str | Unset + if isinstance(self.record_timestamp, Unset): + record_timestamp = UNSET + elif isinstance(self.record_timestamp, datetime.datetime): + record_timestamp = self.record_timestamp.isoformat() + else: + record_timestamp = self.record_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "containerRegistryHasProposalId": container_registry_has_proposal_id, + "containerRegistryId": container_registry_id, + "proposalId": proposal_id, + } + ) + if person_id is not UNSET: + field_dict["personId"] = person_id + if record_timestamp is not UNSET: + field_dict["recordTimestamp"] = record_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + container_registry_has_proposal_id = d.pop("containerRegistryHasProposalId") + + container_registry_id = d.pop("containerRegistryId") + + proposal_id = d.pop("proposalId") + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_record_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_timestamp = _parse_record_timestamp(d.pop("recordTimestamp", UNSET)) + + registered_container_has_proposal_out = cls( + container_registry_has_proposal_id=container_registry_has_proposal_id, + container_registry_id=container_registry_id, + proposal_id=proposal_id, + person_id=person_id, + record_timestamp=record_timestamp, + ) + + registered_container_has_proposal_out.additional_properties = d + return registered_container_has_proposal_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_container_in.py b/src/lims_utils/expeye_client/models/registered_container_in.py new file mode 100644 index 0000000..3d636dd --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_container_in.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredContainerIn") + + +@_attrs_define +class RegisteredContainerIn: + """ + Attributes: + bar_code (str): + comments (None | str | Unset): + """ + + bar_code: str + comments: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + bar_code = self.bar_code + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "barCode": bar_code, + } + ) + if comments is not UNSET: + field_dict["comments"] = comments + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + bar_code = d.pop("barCode") + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + registered_container_in = cls( + bar_code=bar_code, + comments=comments, + ) + + registered_container_in.additional_properties = d + return registered_container_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_container_optional.py b/src/lims_utils/expeye_client/models/registered_container_optional.py new file mode 100644 index 0000000..a1fcd61 --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_container_optional.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredContainerOptional") + + +@_attrs_define +class RegisteredContainerOptional: + """ + Attributes: + comments (None | str | Unset): + bar_code (None | str | Unset): + """ + + comments: None | str | Unset = UNSET + bar_code: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + bar_code: None | str | Unset + if isinstance(self.bar_code, Unset): + bar_code = UNSET + else: + bar_code = self.bar_code + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if comments is not UNSET: + field_dict["comments"] = comments + if bar_code is not UNSET: + field_dict["barCode"] = bar_code + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_bar_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + bar_code = _parse_bar_code(d.pop("barCode", UNSET)) + + registered_container_optional = cls( + comments=comments, + bar_code=bar_code, + ) + + registered_container_optional.additional_properties = d + return registered_container_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_container_out.py b/src/lims_utils/expeye_client/models/registered_container_out.py new file mode 100644 index 0000000..54addf8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_container_out.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredContainerOut") + + +@_attrs_define +class RegisteredContainerOut: + """ + Attributes: + container_registry_id (int): + barcode (str): + comments (None | str | Unset): + """ + + container_registry_id: int + barcode: str + comments: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_registry_id = self.container_registry_id + + barcode = self.barcode + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "containerRegistryId": container_registry_id, + "barcode": barcode, + } + ) + if comments is not UNSET: + field_dict["comments"] = comments + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + container_registry_id = d.pop("containerRegistryId") + + barcode = d.pop("barcode") + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + registered_container_out = cls( + container_registry_id=container_registry_id, + barcode=barcode, + comments=comments, + ) + + registered_container_out.additional_properties = d + return registered_container_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_dewar_has_proposal_in.py b/src/lims_utils/expeye_client/models/registered_dewar_has_proposal_in.py new file mode 100644 index 0000000..0ba9cae --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_dewar_has_proposal_in.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredDewarHasProposalIn") + + +@_attrs_define +class RegisteredDewarHasProposalIn: + """ + Attributes: + person_id (int | None | Unset): + lab_contact_id (int | None | Unset): + record_timestamp (datetime.datetime | None | Unset): + """ + + person_id: int | None | Unset = UNSET + lab_contact_id: int | None | Unset = UNSET + record_timestamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + lab_contact_id: int | None | Unset + if isinstance(self.lab_contact_id, Unset): + lab_contact_id = UNSET + else: + lab_contact_id = self.lab_contact_id + + record_timestamp: None | str | Unset + if isinstance(self.record_timestamp, Unset): + record_timestamp = UNSET + elif isinstance(self.record_timestamp, datetime.datetime): + record_timestamp = self.record_timestamp.isoformat() + else: + record_timestamp = self.record_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if person_id is not UNSET: + field_dict["personId"] = person_id + if lab_contact_id is not UNSET: + field_dict["labContactId"] = lab_contact_id + if record_timestamp is not UNSET: + field_dict["recordTimestamp"] = record_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_lab_contact_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + lab_contact_id = _parse_lab_contact_id(d.pop("labContactId", UNSET)) + + def _parse_record_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_timestamp = _parse_record_timestamp(d.pop("recordTimestamp", UNSET)) + + registered_dewar_has_proposal_in = cls( + person_id=person_id, + lab_contact_id=lab_contact_id, + record_timestamp=record_timestamp, + ) + + registered_dewar_has_proposal_in.additional_properties = d + return registered_dewar_has_proposal_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_dewar_has_proposal_out.py b/src/lims_utils/expeye_client/models/registered_dewar_has_proposal_out.py new file mode 100644 index 0000000..3613a2f --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_dewar_has_proposal_out.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredDewarHasProposalOut") + + +@_attrs_define +class RegisteredDewarHasProposalOut: + """ + Attributes: + person_id (int | None | Unset): + lab_contact_id (int | None | Unset): + record_timestamp (datetime.datetime | None | Unset): + """ + + person_id: int | None | Unset = UNSET + lab_contact_id: int | None | Unset = UNSET + record_timestamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + person_id: int | None | Unset + if isinstance(self.person_id, Unset): + person_id = UNSET + else: + person_id = self.person_id + + lab_contact_id: int | None | Unset + if isinstance(self.lab_contact_id, Unset): + lab_contact_id = UNSET + else: + lab_contact_id = self.lab_contact_id + + record_timestamp: None | str | Unset + if isinstance(self.record_timestamp, Unset): + record_timestamp = UNSET + elif isinstance(self.record_timestamp, datetime.datetime): + record_timestamp = self.record_timestamp.isoformat() + else: + record_timestamp = self.record_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if person_id is not UNSET: + field_dict["personId"] = person_id + if lab_contact_id is not UNSET: + field_dict["labContactId"] = lab_contact_id + if record_timestamp is not UNSET: + field_dict["recordTimestamp"] = record_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_person_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + person_id = _parse_person_id(d.pop("personId", UNSET)) + + def _parse_lab_contact_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + lab_contact_id = _parse_lab_contact_id(d.pop("labContactId", UNSET)) + + def _parse_record_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_timestamp = _parse_record_timestamp(d.pop("recordTimestamp", UNSET)) + + registered_dewar_has_proposal_out = cls( + person_id=person_id, + lab_contact_id=lab_contact_id, + record_timestamp=record_timestamp, + ) + + registered_dewar_has_proposal_out.additional_properties = d + return registered_dewar_has_proposal_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_dewar_in.py b/src/lims_utils/expeye_client/models/registered_dewar_in.py new file mode 100644 index 0000000..4e32b4a --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_dewar_in.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredDewarIn") + + +@_attrs_define +class RegisteredDewarIn: + """ + Attributes: + facility_code (str): + lab_contact_id (int | None | Unset): + purchase_date (datetime.datetime | None | Unset): + manufacturer_serial_number (None | str | Unset): + """ + + facility_code: str + lab_contact_id: int | None | Unset = UNSET + purchase_date: datetime.datetime | None | Unset = UNSET + manufacturer_serial_number: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + facility_code = self.facility_code + + lab_contact_id: int | None | Unset + if isinstance(self.lab_contact_id, Unset): + lab_contact_id = UNSET + else: + lab_contact_id = self.lab_contact_id + + purchase_date: None | str | Unset + if isinstance(self.purchase_date, Unset): + purchase_date = UNSET + elif isinstance(self.purchase_date, datetime.datetime): + purchase_date = self.purchase_date.isoformat() + else: + purchase_date = self.purchase_date + + manufacturer_serial_number: None | str | Unset + if isinstance(self.manufacturer_serial_number, Unset): + manufacturer_serial_number = UNSET + else: + manufacturer_serial_number = self.manufacturer_serial_number + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "facilityCode": facility_code, + } + ) + if lab_contact_id is not UNSET: + field_dict["labContactId"] = lab_contact_id + if purchase_date is not UNSET: + field_dict["purchaseDate"] = purchase_date + if manufacturer_serial_number is not UNSET: + field_dict["manufacturerSerialNumber"] = manufacturer_serial_number + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + facility_code = d.pop("facilityCode") + + def _parse_lab_contact_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + lab_contact_id = _parse_lab_contact_id(d.pop("labContactId", UNSET)) + + def _parse_purchase_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + purchase_date_type_0 = datetime.datetime.fromisoformat(data) + + return purchase_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + purchase_date = _parse_purchase_date(d.pop("purchaseDate", UNSET)) + + def _parse_manufacturer_serial_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + manufacturer_serial_number = _parse_manufacturer_serial_number(d.pop("manufacturerSerialNumber", UNSET)) + + registered_dewar_in = cls( + facility_code=facility_code, + lab_contact_id=lab_contact_id, + purchase_date=purchase_date, + manufacturer_serial_number=manufacturer_serial_number, + ) + + registered_dewar_in.additional_properties = d + return registered_dewar_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_dewar_optional.py b/src/lims_utils/expeye_client/models/registered_dewar_optional.py new file mode 100644 index 0000000..1465160 --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_dewar_optional.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RegisteredDewarOptional") + + +@_attrs_define +class RegisteredDewarOptional: + """ + Attributes: + lab_contact_id (int | None | Unset): + purchase_date (datetime.datetime | None | Unset): + manufacturer_serial_number (None | str | Unset): + """ + + lab_contact_id: int | None | Unset = UNSET + purchase_date: datetime.datetime | None | Unset = UNSET + manufacturer_serial_number: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + lab_contact_id: int | None | Unset + if isinstance(self.lab_contact_id, Unset): + lab_contact_id = UNSET + else: + lab_contact_id = self.lab_contact_id + + purchase_date: None | str | Unset + if isinstance(self.purchase_date, Unset): + purchase_date = UNSET + elif isinstance(self.purchase_date, datetime.datetime): + purchase_date = self.purchase_date.isoformat() + else: + purchase_date = self.purchase_date + + manufacturer_serial_number: None | str | Unset + if isinstance(self.manufacturer_serial_number, Unset): + manufacturer_serial_number = UNSET + else: + manufacturer_serial_number = self.manufacturer_serial_number + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if lab_contact_id is not UNSET: + field_dict["labContactId"] = lab_contact_id + if purchase_date is not UNSET: + field_dict["purchaseDate"] = purchase_date + if manufacturer_serial_number is not UNSET: + field_dict["manufacturerSerialNumber"] = manufacturer_serial_number + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_lab_contact_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + lab_contact_id = _parse_lab_contact_id(d.pop("labContactId", UNSET)) + + def _parse_purchase_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + purchase_date_type_0 = datetime.datetime.fromisoformat(data) + + return purchase_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + purchase_date = _parse_purchase_date(d.pop("purchaseDate", UNSET)) + + def _parse_manufacturer_serial_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + manufacturer_serial_number = _parse_manufacturer_serial_number(d.pop("manufacturerSerialNumber", UNSET)) + + registered_dewar_optional = cls( + lab_contact_id=lab_contact_id, + purchase_date=purchase_date, + manufacturer_serial_number=manufacturer_serial_number, + ) + + registered_dewar_optional.additional_properties = d + return registered_dewar_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/registered_dewar_out.py b/src/lims_utils/expeye_client/models/registered_dewar_out.py new file mode 100644 index 0000000..fadcfff --- /dev/null +++ b/src/lims_utils/expeye_client/models/registered_dewar_out.py @@ -0,0 +1,169 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.proposal_out import ProposalOut + + +T = TypeVar("T", bound="RegisteredDewarOut") + + +@_attrs_define +class RegisteredDewarOut: + """ + Attributes: + facility_code (str): + dewar_registry_id (int): + lab_contact_id (int | None | Unset): + purchase_date (datetime.datetime | None | Unset): + manufacturer_serial_number (None | str | Unset): + proposals (list[ProposalOut] | Unset): + """ + + facility_code: str + dewar_registry_id: int + lab_contact_id: int | None | Unset = UNSET + purchase_date: datetime.datetime | None | Unset = UNSET + manufacturer_serial_number: None | str | Unset = UNSET + proposals: list[ProposalOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + facility_code = self.facility_code + + dewar_registry_id = self.dewar_registry_id + + lab_contact_id: int | None | Unset + if isinstance(self.lab_contact_id, Unset): + lab_contact_id = UNSET + else: + lab_contact_id = self.lab_contact_id + + purchase_date: None | str | Unset + if isinstance(self.purchase_date, Unset): + purchase_date = UNSET + elif isinstance(self.purchase_date, datetime.datetime): + purchase_date = self.purchase_date.isoformat() + else: + purchase_date = self.purchase_date + + manufacturer_serial_number: None | str | Unset + if isinstance(self.manufacturer_serial_number, Unset): + manufacturer_serial_number = UNSET + else: + manufacturer_serial_number = self.manufacturer_serial_number + + proposals: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.proposals, Unset): + proposals = [] + for proposals_item_data in self.proposals: + proposals_item = proposals_item_data.to_dict() + proposals.append(proposals_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "facilityCode": facility_code, + "dewarRegistryId": dewar_registry_id, + } + ) + if lab_contact_id is not UNSET: + field_dict["labContactId"] = lab_contact_id + if purchase_date is not UNSET: + field_dict["purchaseDate"] = purchase_date + if manufacturer_serial_number is not UNSET: + field_dict["manufacturerSerialNumber"] = manufacturer_serial_number + if proposals is not UNSET: + field_dict["proposals"] = proposals + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.proposal_out import ProposalOut # noqa: PLC0415 + + d = dict(src_dict) + facility_code = d.pop("facilityCode") + + dewar_registry_id = d.pop("dewarRegistryId") + + def _parse_lab_contact_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + lab_contact_id = _parse_lab_contact_id(d.pop("labContactId", UNSET)) + + def _parse_purchase_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + purchase_date_type_0 = datetime.datetime.fromisoformat(data) + + return purchase_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + purchase_date = _parse_purchase_date(d.pop("purchaseDate", UNSET)) + + def _parse_manufacturer_serial_number(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + manufacturer_serial_number = _parse_manufacturer_serial_number(d.pop("manufacturerSerialNumber", UNSET)) + + _proposals = d.pop("proposals", UNSET) + proposals: list[ProposalOut] | Unset = UNSET + if _proposals is not UNSET: + proposals = [] + for proposals_item_data in _proposals: + proposals_item = ProposalOut.from_dict(proposals_item_data) + + proposals.append(proposals_item) + + registered_dewar_out = cls( + facility_code=facility_code, + dewar_registry_id=dewar_registry_id, + lab_contact_id=lab_contact_id, + purchase_date=purchase_date, + manufacturer_serial_number=manufacturer_serial_number, + proposals=proposals, + ) + + registered_dewar_out.additional_properties = d + return registered_dewar_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete_personas.py b/src/lims_utils/expeye_client/models/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete_personas.py new file mode 100644 index 0000000..deb6900 --- /dev/null +++ b/src/lims_utils/expeye_client/models/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete_personas.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas(StrEnum): + FEDID = "fedId" + NUMERICID = "numericId" + UUID = "uuid" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/robot_action_in.py b/src/lims_utils/expeye_client/models/robot_action_in.py new file mode 100644 index 0000000..2071241 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_in.py @@ -0,0 +1,316 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.robot_action_in_action_type_type_0 import RobotActionInActionTypeType0 +from ..models.robot_action_in_status_type_0 import RobotActionInStatusType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RobotActionIn") + + +@_attrs_define +class RobotActionIn: + """ + Attributes: + start_timestamp (datetime.datetime | None | Unset): + end_timestamp (datetime.datetime | None | Unset): + sample_id (int | None | Unset): + action_type (None | RobotActionInActionTypeType0 | Unset): + status (None | RobotActionInStatusType0 | Unset): + message (None | str | Unset): + container_location (int | None | Unset): + dewar_location (int | None | Unset): + sample_barcode (None | str | Unset): + xtal_snapshot_before (None | str | Unset): + xtal_snapshot_after (None | str | Unset): + """ + + start_timestamp: datetime.datetime | None | Unset = UNSET + end_timestamp: datetime.datetime | None | Unset = UNSET + sample_id: int | None | Unset = UNSET + action_type: None | RobotActionInActionTypeType0 | Unset = UNSET + status: None | RobotActionInStatusType0 | Unset = UNSET + message: None | str | Unset = UNSET + container_location: int | None | Unset = UNSET + dewar_location: int | None | Unset = UNSET + sample_barcode: None | str | Unset = UNSET + xtal_snapshot_before: None | str | Unset = UNSET + xtal_snapshot_after: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + start_timestamp: None | str | Unset + if isinstance(self.start_timestamp, Unset): + start_timestamp = UNSET + elif isinstance(self.start_timestamp, datetime.datetime): + start_timestamp = self.start_timestamp.isoformat() + else: + start_timestamp = self.start_timestamp + + end_timestamp: None | str | Unset + if isinstance(self.end_timestamp, Unset): + end_timestamp = UNSET + elif isinstance(self.end_timestamp, datetime.datetime): + end_timestamp = self.end_timestamp.isoformat() + else: + end_timestamp = self.end_timestamp + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + action_type: None | str | Unset + if isinstance(self.action_type, Unset): + action_type = UNSET + elif isinstance(self.action_type, RobotActionInActionTypeType0): + action_type = self.action_type.value + else: + action_type = self.action_type + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + elif isinstance(self.status, RobotActionInStatusType0): + status = self.status.value + else: + status = self.status + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + container_location: int | None | Unset + if isinstance(self.container_location, Unset): + container_location = UNSET + else: + container_location = self.container_location + + dewar_location: int | None | Unset + if isinstance(self.dewar_location, Unset): + dewar_location = UNSET + else: + dewar_location = self.dewar_location + + sample_barcode: None | str | Unset + if isinstance(self.sample_barcode, Unset): + sample_barcode = UNSET + else: + sample_barcode = self.sample_barcode + + xtal_snapshot_before: None | str | Unset + if isinstance(self.xtal_snapshot_before, Unset): + xtal_snapshot_before = UNSET + else: + xtal_snapshot_before = self.xtal_snapshot_before + + xtal_snapshot_after: None | str | Unset + if isinstance(self.xtal_snapshot_after, Unset): + xtal_snapshot_after = UNSET + else: + xtal_snapshot_after = self.xtal_snapshot_after + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if start_timestamp is not UNSET: + field_dict["startTimestamp"] = start_timestamp + if end_timestamp is not UNSET: + field_dict["endTimestamp"] = end_timestamp + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if action_type is not UNSET: + field_dict["actionType"] = action_type + if status is not UNSET: + field_dict["status"] = status + if message is not UNSET: + field_dict["message"] = message + if container_location is not UNSET: + field_dict["containerLocation"] = container_location + if dewar_location is not UNSET: + field_dict["dewarLocation"] = dewar_location + if sample_barcode is not UNSET: + field_dict["sampleBarcode"] = sample_barcode + if xtal_snapshot_before is not UNSET: + field_dict["xtalSnapshotBefore"] = xtal_snapshot_before + if xtal_snapshot_after is not UNSET: + field_dict["xtalSnapshotAfter"] = xtal_snapshot_after + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_start_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return start_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_timestamp = _parse_start_timestamp(d.pop("startTimestamp", UNSET)) + + def _parse_end_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return end_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_timestamp = _parse_end_timestamp(d.pop("endTimestamp", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_action_type(data: object) -> None | RobotActionInActionTypeType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + action_type_type_0 = RobotActionInActionTypeType0(data) + + return action_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RobotActionInActionTypeType0 | Unset, data) + + action_type = _parse_action_type(d.pop("actionType", UNSET)) + + def _parse_status(data: object) -> None | RobotActionInStatusType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + status_type_0 = RobotActionInStatusType0(data) + + return status_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RobotActionInStatusType0 | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_container_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_location = _parse_container_location(d.pop("containerLocation", UNSET)) + + def _parse_dewar_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_location = _parse_dewar_location(d.pop("dewarLocation", UNSET)) + + def _parse_sample_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_barcode = _parse_sample_barcode(d.pop("sampleBarcode", UNSET)) + + def _parse_xtal_snapshot_before(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_before = _parse_xtal_snapshot_before(d.pop("xtalSnapshotBefore", UNSET)) + + def _parse_xtal_snapshot_after(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_after = _parse_xtal_snapshot_after(d.pop("xtalSnapshotAfter", UNSET)) + + robot_action_in = cls( + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + sample_id=sample_id, + action_type=action_type, + status=status, + message=message, + container_location=container_location, + dewar_location=dewar_location, + sample_barcode=sample_barcode, + xtal_snapshot_before=xtal_snapshot_before, + xtal_snapshot_after=xtal_snapshot_after, + ) + + robot_action_in.additional_properties = d + return robot_action_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/robot_action_in_action_type_type_0.py b/src/lims_utils/expeye_client/models/robot_action_in_action_type_type_0.py new file mode 100644 index 0000000..6c4ee50 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_in_action_type_type_0.py @@ -0,0 +1,15 @@ +from enum import StrEnum + + +class RobotActionInActionTypeType0(StrEnum): + ANNEAL = "ANNEAL" + DISPOSE = "DISPOSE" + LASER = "LASER" + LOAD = "LOAD" + MOSAIC = "MOSAIC" + STORE = "STORE" + UNLOAD = "UNLOAD" + WASH = "WASH" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/robot_action_in_status_type_0.py b/src/lims_utils/expeye_client/models/robot_action_in_status_type_0.py new file mode 100644 index 0000000..901c5ff --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_in_status_type_0.py @@ -0,0 +1,13 @@ +from enum import StrEnum + + +class RobotActionInStatusType0(StrEnum): + COMMANDNOTSENT = "COMMANDNOTSENT" + CRITICAL = "CRITICAL" + EPICSFAIL = "EPICSFAIL" + ERROR = "ERROR" + SUCCESS = "SUCCESS" + WARNING = "WARNING" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/robot_action_optional.py b/src/lims_utils/expeye_client/models/robot_action_optional.py new file mode 100644 index 0000000..ea9b2f9 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_optional.py @@ -0,0 +1,316 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.robot_action_optional_action_type_type_0 import RobotActionOptionalActionTypeType0 +from ..models.robot_action_optional_status_type_0 import RobotActionOptionalStatusType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RobotActionOptional") + + +@_attrs_define +class RobotActionOptional: + """ + Attributes: + start_timestamp (datetime.datetime | None | Unset): + end_timestamp (datetime.datetime | None | Unset): + sample_id (int | None | Unset): + action_type (None | RobotActionOptionalActionTypeType0 | Unset): + status (None | RobotActionOptionalStatusType0 | Unset): + message (None | str | Unset): + container_location (int | None | Unset): + dewar_location (int | None | Unset): + sample_barcode (None | str | Unset): + xtal_snapshot_before (None | str | Unset): + xtal_snapshot_after (None | str | Unset): + """ + + start_timestamp: datetime.datetime | None | Unset = UNSET + end_timestamp: datetime.datetime | None | Unset = UNSET + sample_id: int | None | Unset = UNSET + action_type: None | RobotActionOptionalActionTypeType0 | Unset = UNSET + status: None | RobotActionOptionalStatusType0 | Unset = UNSET + message: None | str | Unset = UNSET + container_location: int | None | Unset = UNSET + dewar_location: int | None | Unset = UNSET + sample_barcode: None | str | Unset = UNSET + xtal_snapshot_before: None | str | Unset = UNSET + xtal_snapshot_after: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + start_timestamp: None | str | Unset + if isinstance(self.start_timestamp, Unset): + start_timestamp = UNSET + elif isinstance(self.start_timestamp, datetime.datetime): + start_timestamp = self.start_timestamp.isoformat() + else: + start_timestamp = self.start_timestamp + + end_timestamp: None | str | Unset + if isinstance(self.end_timestamp, Unset): + end_timestamp = UNSET + elif isinstance(self.end_timestamp, datetime.datetime): + end_timestamp = self.end_timestamp.isoformat() + else: + end_timestamp = self.end_timestamp + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + action_type: None | str | Unset + if isinstance(self.action_type, Unset): + action_type = UNSET + elif isinstance(self.action_type, RobotActionOptionalActionTypeType0): + action_type = self.action_type.value + else: + action_type = self.action_type + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + elif isinstance(self.status, RobotActionOptionalStatusType0): + status = self.status.value + else: + status = self.status + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + container_location: int | None | Unset + if isinstance(self.container_location, Unset): + container_location = UNSET + else: + container_location = self.container_location + + dewar_location: int | None | Unset + if isinstance(self.dewar_location, Unset): + dewar_location = UNSET + else: + dewar_location = self.dewar_location + + sample_barcode: None | str | Unset + if isinstance(self.sample_barcode, Unset): + sample_barcode = UNSET + else: + sample_barcode = self.sample_barcode + + xtal_snapshot_before: None | str | Unset + if isinstance(self.xtal_snapshot_before, Unset): + xtal_snapshot_before = UNSET + else: + xtal_snapshot_before = self.xtal_snapshot_before + + xtal_snapshot_after: None | str | Unset + if isinstance(self.xtal_snapshot_after, Unset): + xtal_snapshot_after = UNSET + else: + xtal_snapshot_after = self.xtal_snapshot_after + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if start_timestamp is not UNSET: + field_dict["startTimestamp"] = start_timestamp + if end_timestamp is not UNSET: + field_dict["endTimestamp"] = end_timestamp + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if action_type is not UNSET: + field_dict["actionType"] = action_type + if status is not UNSET: + field_dict["status"] = status + if message is not UNSET: + field_dict["message"] = message + if container_location is not UNSET: + field_dict["containerLocation"] = container_location + if dewar_location is not UNSET: + field_dict["dewarLocation"] = dewar_location + if sample_barcode is not UNSET: + field_dict["sampleBarcode"] = sample_barcode + if xtal_snapshot_before is not UNSET: + field_dict["xtalSnapshotBefore"] = xtal_snapshot_before + if xtal_snapshot_after is not UNSET: + field_dict["xtalSnapshotAfter"] = xtal_snapshot_after + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_start_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return start_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_timestamp = _parse_start_timestamp(d.pop("startTimestamp", UNSET)) + + def _parse_end_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return end_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_timestamp = _parse_end_timestamp(d.pop("endTimestamp", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_action_type(data: object) -> None | RobotActionOptionalActionTypeType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + action_type_type_0 = RobotActionOptionalActionTypeType0(data) + + return action_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RobotActionOptionalActionTypeType0 | Unset, data) + + action_type = _parse_action_type(d.pop("actionType", UNSET)) + + def _parse_status(data: object) -> None | RobotActionOptionalStatusType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + status_type_0 = RobotActionOptionalStatusType0(data) + + return status_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RobotActionOptionalStatusType0 | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_container_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_location = _parse_container_location(d.pop("containerLocation", UNSET)) + + def _parse_dewar_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_location = _parse_dewar_location(d.pop("dewarLocation", UNSET)) + + def _parse_sample_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_barcode = _parse_sample_barcode(d.pop("sampleBarcode", UNSET)) + + def _parse_xtal_snapshot_before(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_before = _parse_xtal_snapshot_before(d.pop("xtalSnapshotBefore", UNSET)) + + def _parse_xtal_snapshot_after(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_after = _parse_xtal_snapshot_after(d.pop("xtalSnapshotAfter", UNSET)) + + robot_action_optional = cls( + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + sample_id=sample_id, + action_type=action_type, + status=status, + message=message, + container_location=container_location, + dewar_location=dewar_location, + sample_barcode=sample_barcode, + xtal_snapshot_before=xtal_snapshot_before, + xtal_snapshot_after=xtal_snapshot_after, + ) + + robot_action_optional.additional_properties = d + return robot_action_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/robot_action_optional_action_type_type_0.py b/src/lims_utils/expeye_client/models/robot_action_optional_action_type_type_0.py new file mode 100644 index 0000000..6915cbe --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_optional_action_type_type_0.py @@ -0,0 +1,15 @@ +from enum import StrEnum + + +class RobotActionOptionalActionTypeType0(StrEnum): + ANNEAL = "ANNEAL" + DISPOSE = "DISPOSE" + LASER = "LASER" + LOAD = "LOAD" + MOSAIC = "MOSAIC" + STORE = "STORE" + UNLOAD = "UNLOAD" + WASH = "WASH" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/robot_action_optional_status_type_0.py b/src/lims_utils/expeye_client/models/robot_action_optional_status_type_0.py new file mode 100644 index 0000000..a951773 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_optional_status_type_0.py @@ -0,0 +1,13 @@ +from enum import StrEnum + + +class RobotActionOptionalStatusType0(StrEnum): + COMMANDNOTSENT = "COMMANDNOTSENT" + CRITICAL = "CRITICAL" + EPICSFAIL = "EPICSFAIL" + ERROR = "ERROR" + SUCCESS = "SUCCESS" + WARNING = "WARNING" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/robot_action_out.py b/src/lims_utils/expeye_client/models/robot_action_out.py new file mode 100644 index 0000000..92448c2 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_out.py @@ -0,0 +1,334 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.robot_action_out_action_type_type_0 import RobotActionOutActionTypeType0 +from ..models.robot_action_out_status_type_0 import RobotActionOutStatusType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RobotActionOut") + + +@_attrs_define +class RobotActionOut: + """ + Attributes: + robot_action_id (int): + session_id (int): + start_timestamp (datetime.datetime | None | Unset): + end_timestamp (datetime.datetime | None | Unset): + sample_id (int | None | Unset): + action_type (None | RobotActionOutActionTypeType0 | Unset): + status (None | RobotActionOutStatusType0 | Unset): + message (None | str | Unset): + container_location (int | None | Unset): + dewar_location (int | None | Unset): + sample_barcode (None | str | Unset): + xtal_snapshot_before (None | str | Unset): + xtal_snapshot_after (None | str | Unset): + """ + + robot_action_id: int + session_id: int + start_timestamp: datetime.datetime | None | Unset = UNSET + end_timestamp: datetime.datetime | None | Unset = UNSET + sample_id: int | None | Unset = UNSET + action_type: None | RobotActionOutActionTypeType0 | Unset = UNSET + status: None | RobotActionOutStatusType0 | Unset = UNSET + message: None | str | Unset = UNSET + container_location: int | None | Unset = UNSET + dewar_location: int | None | Unset = UNSET + sample_barcode: None | str | Unset = UNSET + xtal_snapshot_before: None | str | Unset = UNSET + xtal_snapshot_after: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + robot_action_id = self.robot_action_id + + session_id = self.session_id + + start_timestamp: None | str | Unset + if isinstance(self.start_timestamp, Unset): + start_timestamp = UNSET + elif isinstance(self.start_timestamp, datetime.datetime): + start_timestamp = self.start_timestamp.isoformat() + else: + start_timestamp = self.start_timestamp + + end_timestamp: None | str | Unset + if isinstance(self.end_timestamp, Unset): + end_timestamp = UNSET + elif isinstance(self.end_timestamp, datetime.datetime): + end_timestamp = self.end_timestamp.isoformat() + else: + end_timestamp = self.end_timestamp + + sample_id: int | None | Unset + if isinstance(self.sample_id, Unset): + sample_id = UNSET + else: + sample_id = self.sample_id + + action_type: None | str | Unset + if isinstance(self.action_type, Unset): + action_type = UNSET + elif isinstance(self.action_type, RobotActionOutActionTypeType0): + action_type = self.action_type.value + else: + action_type = self.action_type + + status: None | str | Unset + if isinstance(self.status, Unset): + status = UNSET + elif isinstance(self.status, RobotActionOutStatusType0): + status = self.status.value + else: + status = self.status + + message: None | str | Unset + if isinstance(self.message, Unset): + message = UNSET + else: + message = self.message + + container_location: int | None | Unset + if isinstance(self.container_location, Unset): + container_location = UNSET + else: + container_location = self.container_location + + dewar_location: int | None | Unset + if isinstance(self.dewar_location, Unset): + dewar_location = UNSET + else: + dewar_location = self.dewar_location + + sample_barcode: None | str | Unset + if isinstance(self.sample_barcode, Unset): + sample_barcode = UNSET + else: + sample_barcode = self.sample_barcode + + xtal_snapshot_before: None | str | Unset + if isinstance(self.xtal_snapshot_before, Unset): + xtal_snapshot_before = UNSET + else: + xtal_snapshot_before = self.xtal_snapshot_before + + xtal_snapshot_after: None | str | Unset + if isinstance(self.xtal_snapshot_after, Unset): + xtal_snapshot_after = UNSET + else: + xtal_snapshot_after = self.xtal_snapshot_after + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "robotActionId": robot_action_id, + "sessionId": session_id, + } + ) + if start_timestamp is not UNSET: + field_dict["startTimestamp"] = start_timestamp + if end_timestamp is not UNSET: + field_dict["endTimestamp"] = end_timestamp + if sample_id is not UNSET: + field_dict["sampleId"] = sample_id + if action_type is not UNSET: + field_dict["actionType"] = action_type + if status is not UNSET: + field_dict["status"] = status + if message is not UNSET: + field_dict["message"] = message + if container_location is not UNSET: + field_dict["containerLocation"] = container_location + if dewar_location is not UNSET: + field_dict["dewarLocation"] = dewar_location + if sample_barcode is not UNSET: + field_dict["sampleBarcode"] = sample_barcode + if xtal_snapshot_before is not UNSET: + field_dict["xtalSnapshotBefore"] = xtal_snapshot_before + if xtal_snapshot_after is not UNSET: + field_dict["xtalSnapshotAfter"] = xtal_snapshot_after + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + robot_action_id = d.pop("robotActionId") + + session_id = d.pop("sessionId") + + def _parse_start_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return start_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_timestamp = _parse_start_timestamp(d.pop("startTimestamp", UNSET)) + + def _parse_end_timestamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return end_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_timestamp = _parse_end_timestamp(d.pop("endTimestamp", UNSET)) + + def _parse_sample_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sample_id = _parse_sample_id(d.pop("sampleId", UNSET)) + + def _parse_action_type(data: object) -> None | RobotActionOutActionTypeType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + action_type_type_0 = RobotActionOutActionTypeType0(data) + + return action_type_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RobotActionOutActionTypeType0 | Unset, data) + + action_type = _parse_action_type(d.pop("actionType", UNSET)) + + def _parse_status(data: object) -> None | RobotActionOutStatusType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + status_type_0 = RobotActionOutStatusType0(data) + + return status_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | RobotActionOutStatusType0 | Unset, data) + + status = _parse_status(d.pop("status", UNSET)) + + def _parse_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + message = _parse_message(d.pop("message", UNSET)) + + def _parse_container_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_location = _parse_container_location(d.pop("containerLocation", UNSET)) + + def _parse_dewar_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + dewar_location = _parse_dewar_location(d.pop("dewarLocation", UNSET)) + + def _parse_sample_barcode(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_barcode = _parse_sample_barcode(d.pop("sampleBarcode", UNSET)) + + def _parse_xtal_snapshot_before(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_before = _parse_xtal_snapshot_before(d.pop("xtalSnapshotBefore", UNSET)) + + def _parse_xtal_snapshot_after(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + xtal_snapshot_after = _parse_xtal_snapshot_after(d.pop("xtalSnapshotAfter", UNSET)) + + robot_action_out = cls( + robot_action_id=robot_action_id, + session_id=session_id, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + sample_id=sample_id, + action_type=action_type, + status=status, + message=message, + container_location=container_location, + dewar_location=dewar_location, + sample_barcode=sample_barcode, + xtal_snapshot_before=xtal_snapshot_before, + xtal_snapshot_after=xtal_snapshot_after, + ) + + robot_action_out.additional_properties = d + return robot_action_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/robot_action_out_action_type_type_0.py b/src/lims_utils/expeye_client/models/robot_action_out_action_type_type_0.py new file mode 100644 index 0000000..65f6c63 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_out_action_type_type_0.py @@ -0,0 +1,15 @@ +from enum import StrEnum + + +class RobotActionOutActionTypeType0(StrEnum): + ANNEAL = "ANNEAL" + DISPOSE = "DISPOSE" + LASER = "LASER" + LOAD = "LOAD" + MOSAIC = "MOSAIC" + STORE = "STORE" + UNLOAD = "UNLOAD" + WASH = "WASH" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/robot_action_out_status_type_0.py b/src/lims_utils/expeye_client/models/robot_action_out_status_type_0.py new file mode 100644 index 0000000..be99ce5 --- /dev/null +++ b/src/lims_utils/expeye_client/models/robot_action_out_status_type_0.py @@ -0,0 +1,13 @@ +from enum import StrEnum + + +class RobotActionOutStatusType0(StrEnum): + COMMANDNOTSENT = "COMMANDNOTSENT" + CRITICAL = "CRITICAL" + EPICSFAIL = "EPICSFAIL" + ERROR = "ERROR" + SUCCESS = "SUCCESS" + WARNING = "WARNING" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/rotation_axis_enum.py b/src/lims_utils/expeye_client/models/rotation_axis_enum.py new file mode 100644 index 0000000..2284fcf --- /dev/null +++ b/src/lims_utils/expeye_client/models/rotation_axis_enum.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class RotationAxisEnum(StrEnum): + KAPPA = "Kappa" + OMEGA = "Omega" + PHI = "Phi" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/safety_levels.py b/src/lims_utils/expeye_client/models/safety_levels.py new file mode 100644 index 0000000..3982d34 --- /dev/null +++ b/src/lims_utils/expeye_client/models/safety_levels.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class SafetyLevels(StrEnum): + GREEN = "GREEN" + RED = "RED" + YELLOW = "YELLOW" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/sample_image_in.py b/src/lims_utils/expeye_client/models/sample_image_in.py new file mode 100644 index 0000000..4a71edf --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_image_in.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SampleImageIn") + + +@_attrs_define +class SampleImageIn: + """ + Attributes: + container_inspection_id (int | None | Unset): + bl_sample_image_score_id (int | None | Unset): + microns_per_pixel_x (float | None | Unset): + microns_per_pixel_y (float | None | Unset): + image_full_path (None | str | Unset): + comments (None | str | Unset): + modified_time_stamp (datetime.datetime | None | Unset): + offset_x (int | Unset): Default: 0. + offset_y (int | Unset): Default: 0. + """ + + container_inspection_id: int | None | Unset = UNSET + bl_sample_image_score_id: int | None | Unset = UNSET + microns_per_pixel_x: float | None | Unset = UNSET + microns_per_pixel_y: float | None | Unset = UNSET + image_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + modified_time_stamp: datetime.datetime | None | Unset = UNSET + offset_x: int | Unset = 0 + offset_y: int | Unset = 0 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_inspection_id: int | None | Unset + if isinstance(self.container_inspection_id, Unset): + container_inspection_id = UNSET + else: + container_inspection_id = self.container_inspection_id + + bl_sample_image_score_id: int | None | Unset + if isinstance(self.bl_sample_image_score_id, Unset): + bl_sample_image_score_id = UNSET + else: + bl_sample_image_score_id = self.bl_sample_image_score_id + + microns_per_pixel_x: float | None | Unset + if isinstance(self.microns_per_pixel_x, Unset): + microns_per_pixel_x = UNSET + else: + microns_per_pixel_x = self.microns_per_pixel_x + + microns_per_pixel_y: float | None | Unset + if isinstance(self.microns_per_pixel_y, Unset): + microns_per_pixel_y = UNSET + else: + microns_per_pixel_y = self.microns_per_pixel_y + + image_full_path: None | str | Unset + if isinstance(self.image_full_path, Unset): + image_full_path = UNSET + else: + image_full_path = self.image_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + modified_time_stamp: None | str | Unset + if isinstance(self.modified_time_stamp, Unset): + modified_time_stamp = UNSET + elif isinstance(self.modified_time_stamp, datetime.datetime): + modified_time_stamp = self.modified_time_stamp.isoformat() + else: + modified_time_stamp = self.modified_time_stamp + + offset_x = self.offset_x + + offset_y = self.offset_y + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if container_inspection_id is not UNSET: + field_dict["containerInspectionId"] = container_inspection_id + if bl_sample_image_score_id is not UNSET: + field_dict["blSampleImageScoreId"] = bl_sample_image_score_id + if microns_per_pixel_x is not UNSET: + field_dict["micronsPerPixelX"] = microns_per_pixel_x + if microns_per_pixel_y is not UNSET: + field_dict["micronsPerPixelY"] = microns_per_pixel_y + if image_full_path is not UNSET: + field_dict["imageFullPath"] = image_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if modified_time_stamp is not UNSET: + field_dict["modifiedTimeStamp"] = modified_time_stamp + if offset_x is not UNSET: + field_dict["offsetX"] = offset_x + if offset_y is not UNSET: + field_dict["offsetY"] = offset_y + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_container_inspection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_inspection_id = _parse_container_inspection_id(d.pop("containerInspectionId", UNSET)) + + def _parse_bl_sample_image_score_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sample_image_score_id = _parse_bl_sample_image_score_id(d.pop("blSampleImageScoreId", UNSET)) + + def _parse_microns_per_pixel_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_x = _parse_microns_per_pixel_x(d.pop("micronsPerPixelX", UNSET)) + + def _parse_microns_per_pixel_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_y = _parse_microns_per_pixel_y(d.pop("micronsPerPixelY", UNSET)) + + def _parse_image_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_full_path = _parse_image_full_path(d.pop("imageFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_modified_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + modified_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return modified_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + modified_time_stamp = _parse_modified_time_stamp(d.pop("modifiedTimeStamp", UNSET)) + + offset_x = d.pop("offsetX", UNSET) + + offset_y = d.pop("offsetY", UNSET) + + sample_image_in = cls( + container_inspection_id=container_inspection_id, + bl_sample_image_score_id=bl_sample_image_score_id, + microns_per_pixel_x=microns_per_pixel_x, + microns_per_pixel_y=microns_per_pixel_y, + image_full_path=image_full_path, + comments=comments, + modified_time_stamp=modified_time_stamp, + offset_x=offset_x, + offset_y=offset_y, + ) + + sample_image_in.additional_properties = d + return sample_image_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_image_optional.py b/src/lims_utils/expeye_client/models/sample_image_optional.py new file mode 100644 index 0000000..66d7dca --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_image_optional.py @@ -0,0 +1,222 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SampleImageOptional") + + +@_attrs_define +class SampleImageOptional: + """ + Attributes: + container_inspection_id (int | None | Unset): + bl_sample_image_score_id (int | None | Unset): + microns_per_pixel_x (float | None | Unset): + microns_per_pixel_y (float | None | Unset): + image_full_path (None | str | Unset): + comments (None | str | Unset): + modified_time_stamp (datetime.datetime | None | Unset): + offset_x (int | Unset): Default: 0. + offset_y (int | Unset): Default: 0. + """ + + container_inspection_id: int | None | Unset = UNSET + bl_sample_image_score_id: int | None | Unset = UNSET + microns_per_pixel_x: float | None | Unset = UNSET + microns_per_pixel_y: float | None | Unset = UNSET + image_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + modified_time_stamp: datetime.datetime | None | Unset = UNSET + offset_x: int | Unset = 0 + offset_y: int | Unset = 0 + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + container_inspection_id: int | None | Unset + if isinstance(self.container_inspection_id, Unset): + container_inspection_id = UNSET + else: + container_inspection_id = self.container_inspection_id + + bl_sample_image_score_id: int | None | Unset + if isinstance(self.bl_sample_image_score_id, Unset): + bl_sample_image_score_id = UNSET + else: + bl_sample_image_score_id = self.bl_sample_image_score_id + + microns_per_pixel_x: float | None | Unset + if isinstance(self.microns_per_pixel_x, Unset): + microns_per_pixel_x = UNSET + else: + microns_per_pixel_x = self.microns_per_pixel_x + + microns_per_pixel_y: float | None | Unset + if isinstance(self.microns_per_pixel_y, Unset): + microns_per_pixel_y = UNSET + else: + microns_per_pixel_y = self.microns_per_pixel_y + + image_full_path: None | str | Unset + if isinstance(self.image_full_path, Unset): + image_full_path = UNSET + else: + image_full_path = self.image_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + modified_time_stamp: None | str | Unset + if isinstance(self.modified_time_stamp, Unset): + modified_time_stamp = UNSET + elif isinstance(self.modified_time_stamp, datetime.datetime): + modified_time_stamp = self.modified_time_stamp.isoformat() + else: + modified_time_stamp = self.modified_time_stamp + + offset_x = self.offset_x + + offset_y = self.offset_y + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if container_inspection_id is not UNSET: + field_dict["containerInspectionId"] = container_inspection_id + if bl_sample_image_score_id is not UNSET: + field_dict["blSampleImageScoreId"] = bl_sample_image_score_id + if microns_per_pixel_x is not UNSET: + field_dict["micronsPerPixelX"] = microns_per_pixel_x + if microns_per_pixel_y is not UNSET: + field_dict["micronsPerPixelY"] = microns_per_pixel_y + if image_full_path is not UNSET: + field_dict["imageFullPath"] = image_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if modified_time_stamp is not UNSET: + field_dict["modifiedTimeStamp"] = modified_time_stamp + if offset_x is not UNSET: + field_dict["offsetX"] = offset_x + if offset_y is not UNSET: + field_dict["offsetY"] = offset_y + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_container_inspection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_inspection_id = _parse_container_inspection_id(d.pop("containerInspectionId", UNSET)) + + def _parse_bl_sample_image_score_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sample_image_score_id = _parse_bl_sample_image_score_id(d.pop("blSampleImageScoreId", UNSET)) + + def _parse_microns_per_pixel_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_x = _parse_microns_per_pixel_x(d.pop("micronsPerPixelX", UNSET)) + + def _parse_microns_per_pixel_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_y = _parse_microns_per_pixel_y(d.pop("micronsPerPixelY", UNSET)) + + def _parse_image_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_full_path = _parse_image_full_path(d.pop("imageFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_modified_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + modified_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return modified_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + modified_time_stamp = _parse_modified_time_stamp(d.pop("modifiedTimeStamp", UNSET)) + + offset_x = d.pop("offsetX", UNSET) + + offset_y = d.pop("offsetY", UNSET) + + sample_image_optional = cls( + container_inspection_id=container_inspection_id, + bl_sample_image_score_id=bl_sample_image_score_id, + microns_per_pixel_x=microns_per_pixel_x, + microns_per_pixel_y=microns_per_pixel_y, + image_full_path=image_full_path, + comments=comments, + modified_time_stamp=modified_time_stamp, + offset_x=offset_x, + offset_y=offset_y, + ) + + sample_image_optional.additional_properties = d + return sample_image_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_image_out.py b/src/lims_utils/expeye_client/models/sample_image_out.py new file mode 100644 index 0000000..8785be8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_image_out.py @@ -0,0 +1,238 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SampleImageOut") + + +@_attrs_define +class SampleImageOut: + """ + Attributes: + bl_sample_id (int): + bl_sample_image_id (int): + offset_x (int): + offset_y (int): + container_inspection_id (int | None | Unset): + bl_sample_image_score_id (int | None | Unset): + microns_per_pixel_x (float | None | Unset): + microns_per_pixel_y (float | None | Unset): + image_full_path (None | str | Unset): + comments (None | str | Unset): + modified_time_stamp (datetime.datetime | None | Unset): + """ + + bl_sample_id: int + bl_sample_image_id: int + offset_x: int + offset_y: int + container_inspection_id: int | None | Unset = UNSET + bl_sample_image_score_id: int | None | Unset = UNSET + microns_per_pixel_x: float | None | Unset = UNSET + microns_per_pixel_y: float | None | Unset = UNSET + image_full_path: None | str | Unset = UNSET + comments: None | str | Unset = UNSET + modified_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + bl_sample_id = self.bl_sample_id + + bl_sample_image_id = self.bl_sample_image_id + + offset_x = self.offset_x + + offset_y = self.offset_y + + container_inspection_id: int | None | Unset + if isinstance(self.container_inspection_id, Unset): + container_inspection_id = UNSET + else: + container_inspection_id = self.container_inspection_id + + bl_sample_image_score_id: int | None | Unset + if isinstance(self.bl_sample_image_score_id, Unset): + bl_sample_image_score_id = UNSET + else: + bl_sample_image_score_id = self.bl_sample_image_score_id + + microns_per_pixel_x: float | None | Unset + if isinstance(self.microns_per_pixel_x, Unset): + microns_per_pixel_x = UNSET + else: + microns_per_pixel_x = self.microns_per_pixel_x + + microns_per_pixel_y: float | None | Unset + if isinstance(self.microns_per_pixel_y, Unset): + microns_per_pixel_y = UNSET + else: + microns_per_pixel_y = self.microns_per_pixel_y + + image_full_path: None | str | Unset + if isinstance(self.image_full_path, Unset): + image_full_path = UNSET + else: + image_full_path = self.image_full_path + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + modified_time_stamp: None | str | Unset + if isinstance(self.modified_time_stamp, Unset): + modified_time_stamp = UNSET + elif isinstance(self.modified_time_stamp, datetime.datetime): + modified_time_stamp = self.modified_time_stamp.isoformat() + else: + modified_time_stamp = self.modified_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "blSampleId": bl_sample_id, + "blSampleImageId": bl_sample_image_id, + "offsetX": offset_x, + "offsetY": offset_y, + } + ) + if container_inspection_id is not UNSET: + field_dict["containerInspectionId"] = container_inspection_id + if bl_sample_image_score_id is not UNSET: + field_dict["blSampleImageScoreId"] = bl_sample_image_score_id + if microns_per_pixel_x is not UNSET: + field_dict["micronsPerPixelX"] = microns_per_pixel_x + if microns_per_pixel_y is not UNSET: + field_dict["micronsPerPixelY"] = microns_per_pixel_y + if image_full_path is not UNSET: + field_dict["imageFullPath"] = image_full_path + if comments is not UNSET: + field_dict["comments"] = comments + if modified_time_stamp is not UNSET: + field_dict["modifiedTimeStamp"] = modified_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + bl_sample_id = d.pop("blSampleId") + + bl_sample_image_id = d.pop("blSampleImageId") + + offset_x = d.pop("offsetX") + + offset_y = d.pop("offsetY") + + def _parse_container_inspection_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_inspection_id = _parse_container_inspection_id(d.pop("containerInspectionId", UNSET)) + + def _parse_bl_sample_image_score_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + bl_sample_image_score_id = _parse_bl_sample_image_score_id(d.pop("blSampleImageScoreId", UNSET)) + + def _parse_microns_per_pixel_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_x = _parse_microns_per_pixel_x(d.pop("micronsPerPixelX", UNSET)) + + def _parse_microns_per_pixel_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + microns_per_pixel_y = _parse_microns_per_pixel_y(d.pop("micronsPerPixelY", UNSET)) + + def _parse_image_full_path(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + image_full_path = _parse_image_full_path(d.pop("imageFullPath", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_modified_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + modified_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return modified_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + modified_time_stamp = _parse_modified_time_stamp(d.pop("modifiedTimeStamp", UNSET)) + + sample_image_out = cls( + bl_sample_id=bl_sample_id, + bl_sample_image_id=bl_sample_image_id, + offset_x=offset_x, + offset_y=offset_y, + container_inspection_id=container_inspection_id, + bl_sample_image_score_id=bl_sample_image_score_id, + microns_per_pixel_x=microns_per_pixel_x, + microns_per_pixel_y=microns_per_pixel_y, + image_full_path=image_full_path, + comments=comments, + modified_time_stamp=modified_time_stamp, + ) + + sample_image_out.additional_properties = d + return sample_image_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_in.py b/src/lims_utils/expeye_client/models/sample_in.py new file mode 100644 index 0000000..7f23d4e --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_in.py @@ -0,0 +1,378 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.sample_image_in import SampleImageIn + + +T = TypeVar("T", bound="SampleIn") + + +@_attrs_define +class SampleIn: + """ + Attributes: + diffraction_plan_id (int | None | Unset): + name (None | str | Unset): + code (None | str | Unset): + location (int | None | Unset): + comments (None | str | Unset): + sub_location (int | None | Unset): + bl_sample_status (None | str | Unset): + holder_length (float | None | Unset): + loop_length (float | None | Unset): + loop_type (None | str | Unset): + wire_width (float | None | Unset): + source (None | str | Unset): Default: 'Expeye'. + is_in_sample_changer (int | None | Unset): + crystal_id (int | None | Unset): + sample_images (list[SampleImageIn] | None | Unset): + """ + + diffraction_plan_id: int | None | Unset = UNSET + name: None | str | Unset = UNSET + code: None | str | Unset = UNSET + location: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + sub_location: int | None | Unset = UNSET + bl_sample_status: None | str | Unset = UNSET + holder_length: float | None | Unset = UNSET + loop_length: float | None | Unset = UNSET + loop_type: None | str | Unset = UNSET + wire_width: float | None | Unset = UNSET + source: None | str | Unset = "Expeye" + is_in_sample_changer: int | None | Unset = UNSET + crystal_id: int | None | Unset = UNSET + sample_images: list[SampleImageIn] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + location: int | None | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + sub_location: int | None | Unset + if isinstance(self.sub_location, Unset): + sub_location = UNSET + else: + sub_location = self.sub_location + + bl_sample_status: None | str | Unset + if isinstance(self.bl_sample_status, Unset): + bl_sample_status = UNSET + else: + bl_sample_status = self.bl_sample_status + + holder_length: float | None | Unset + if isinstance(self.holder_length, Unset): + holder_length = UNSET + else: + holder_length = self.holder_length + + loop_length: float | None | Unset + if isinstance(self.loop_length, Unset): + loop_length = UNSET + else: + loop_length = self.loop_length + + loop_type: None | str | Unset + if isinstance(self.loop_type, Unset): + loop_type = UNSET + else: + loop_type = self.loop_type + + wire_width: float | None | Unset + if isinstance(self.wire_width, Unset): + wire_width = UNSET + else: + wire_width = self.wire_width + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + is_in_sample_changer: int | None | Unset + if isinstance(self.is_in_sample_changer, Unset): + is_in_sample_changer = UNSET + else: + is_in_sample_changer = self.is_in_sample_changer + + crystal_id: int | None | Unset + if isinstance(self.crystal_id, Unset): + crystal_id = UNSET + else: + crystal_id = self.crystal_id + + sample_images: list[dict[str, Any]] | None | Unset + if isinstance(self.sample_images, Unset): + sample_images = UNSET + elif isinstance(self.sample_images, list): + sample_images = [] + for sample_images_type_0_item_data in self.sample_images: + sample_images_type_0_item = sample_images_type_0_item_data.to_dict() + sample_images.append(sample_images_type_0_item) + + else: + sample_images = self.sample_images + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if name is not UNSET: + field_dict["name"] = name + if code is not UNSET: + field_dict["code"] = code + if location is not UNSET: + field_dict["location"] = location + if comments is not UNSET: + field_dict["comments"] = comments + if sub_location is not UNSET: + field_dict["subLocation"] = sub_location + if bl_sample_status is not UNSET: + field_dict["blSampleStatus"] = bl_sample_status + if holder_length is not UNSET: + field_dict["holderLength"] = holder_length + if loop_length is not UNSET: + field_dict["loopLength"] = loop_length + if loop_type is not UNSET: + field_dict["loopType"] = loop_type + if wire_width is not UNSET: + field_dict["wireWidth"] = wire_width + if source is not UNSET: + field_dict["source"] = source + if is_in_sample_changer is not UNSET: + field_dict["isInSampleChanger"] = is_in_sample_changer + if crystal_id is not UNSET: + field_dict["crystalId"] = crystal_id + if sample_images is not UNSET: + field_dict["sampleImages"] = sample_images + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.sample_image_in import SampleImageIn # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_sub_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sub_location = _parse_sub_location(d.pop("subLocation", UNSET)) + + def _parse_bl_sample_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + bl_sample_status = _parse_bl_sample_status(d.pop("blSampleStatus", UNSET)) + + def _parse_holder_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + holder_length = _parse_holder_length(d.pop("holderLength", UNSET)) + + def _parse_loop_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + loop_length = _parse_loop_length(d.pop("loopLength", UNSET)) + + def _parse_loop_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + loop_type = _parse_loop_type(d.pop("loopType", UNSET)) + + def _parse_wire_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wire_width = _parse_wire_width(d.pop("wireWidth", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_is_in_sample_changer(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_in_sample_changer = _parse_is_in_sample_changer(d.pop("isInSampleChanger", UNSET)) + + def _parse_crystal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + crystal_id = _parse_crystal_id(d.pop("crystalId", UNSET)) + + def _parse_sample_images(data: object) -> list[SampleImageIn] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + sample_images_type_0 = [] + _sample_images_type_0 = data + for sample_images_type_0_item_data in _sample_images_type_0: + sample_images_type_0_item = SampleImageIn.from_dict(sample_images_type_0_item_data) + + sample_images_type_0.append(sample_images_type_0_item) + + return sample_images_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[SampleImageIn] | None | Unset, data) + + sample_images = _parse_sample_images(d.pop("sampleImages", UNSET)) + + sample_in = cls( + diffraction_plan_id=diffraction_plan_id, + name=name, + code=code, + location=location, + comments=comments, + sub_location=sub_location, + bl_sample_status=bl_sample_status, + holder_length=holder_length, + loop_length=loop_length, + loop_type=loop_type, + wire_width=wire_width, + source=source, + is_in_sample_changer=is_in_sample_changer, + crystal_id=crystal_id, + sample_images=sample_images, + ) + + sample_in.additional_properties = d + return sample_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py b/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py new file mode 100644 index 0000000..50647e6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py @@ -0,0 +1,445 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.crystal_with_protein import CrystalWithProtein + from ..models.diffraction_plan_in import DiffractionPlanIn + from ..models.sample_image_in import SampleImageIn + + +T = TypeVar("T", bound="SampleInWithCrystalAndDiffractionPlan") + + +@_attrs_define +class SampleInWithCrystalAndDiffractionPlan: + """ + Attributes: + diffraction_plan_id (int | None | Unset): + name (None | str | Unset): + code (None | str | Unset): + location (int | None | Unset): + comments (None | str | Unset): + sub_location (int | None | Unset): + bl_sample_status (None | str | Unset): + holder_length (float | None | Unset): + loop_length (float | None | Unset): + loop_type (None | str | Unset): + wire_width (float | None | Unset): + source (None | str | Unset): Default: 'Expeye'. + is_in_sample_changer (int | None | Unset): + crystal_id (int | None | Unset): + sample_images (list[SampleImageIn] | None | Unset): + diffraction_plan (DiffractionPlanIn | None | Unset): + crystal (CrystalWithProtein | None | Unset): + """ + + diffraction_plan_id: int | None | Unset = UNSET + name: None | str | Unset = UNSET + code: None | str | Unset = UNSET + location: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + sub_location: int | None | Unset = UNSET + bl_sample_status: None | str | Unset = UNSET + holder_length: float | None | Unset = UNSET + loop_length: float | None | Unset = UNSET + loop_type: None | str | Unset = UNSET + wire_width: float | None | Unset = UNSET + source: None | str | Unset = "Expeye" + is_in_sample_changer: int | None | Unset = UNSET + crystal_id: int | None | Unset = UNSET + sample_images: list[SampleImageIn] | None | Unset = UNSET + diffraction_plan: DiffractionPlanIn | None | Unset = UNSET + crystal: CrystalWithProtein | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 + from ..models.diffraction_plan_in import DiffractionPlanIn # noqa: PLC0415 + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + location: int | None | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + sub_location: int | None | Unset + if isinstance(self.sub_location, Unset): + sub_location = UNSET + else: + sub_location = self.sub_location + + bl_sample_status: None | str | Unset + if isinstance(self.bl_sample_status, Unset): + bl_sample_status = UNSET + else: + bl_sample_status = self.bl_sample_status + + holder_length: float | None | Unset + if isinstance(self.holder_length, Unset): + holder_length = UNSET + else: + holder_length = self.holder_length + + loop_length: float | None | Unset + if isinstance(self.loop_length, Unset): + loop_length = UNSET + else: + loop_length = self.loop_length + + loop_type: None | str | Unset + if isinstance(self.loop_type, Unset): + loop_type = UNSET + else: + loop_type = self.loop_type + + wire_width: float | None | Unset + if isinstance(self.wire_width, Unset): + wire_width = UNSET + else: + wire_width = self.wire_width + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + is_in_sample_changer: int | None | Unset + if isinstance(self.is_in_sample_changer, Unset): + is_in_sample_changer = UNSET + else: + is_in_sample_changer = self.is_in_sample_changer + + crystal_id: int | None | Unset + if isinstance(self.crystal_id, Unset): + crystal_id = UNSET + else: + crystal_id = self.crystal_id + + sample_images: list[dict[str, Any]] | None | Unset + if isinstance(self.sample_images, Unset): + sample_images = UNSET + elif isinstance(self.sample_images, list): + sample_images = [] + for sample_images_type_0_item_data in self.sample_images: + sample_images_type_0_item = sample_images_type_0_item_data.to_dict() + sample_images.append(sample_images_type_0_item) + + else: + sample_images = self.sample_images + + diffraction_plan: dict[str, Any] | None | Unset + if isinstance(self.diffraction_plan, Unset): + diffraction_plan = UNSET + elif isinstance(self.diffraction_plan, DiffractionPlanIn): + diffraction_plan = self.diffraction_plan.to_dict() + else: + diffraction_plan = self.diffraction_plan + + crystal: dict[str, Any] | None | Unset + if isinstance(self.crystal, Unset): + crystal = UNSET + elif isinstance(self.crystal, CrystalWithProtein): + crystal = self.crystal.to_dict() + else: + crystal = self.crystal + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if name is not UNSET: + field_dict["name"] = name + if code is not UNSET: + field_dict["code"] = code + if location is not UNSET: + field_dict["location"] = location + if comments is not UNSET: + field_dict["comments"] = comments + if sub_location is not UNSET: + field_dict["subLocation"] = sub_location + if bl_sample_status is not UNSET: + field_dict["blSampleStatus"] = bl_sample_status + if holder_length is not UNSET: + field_dict["holderLength"] = holder_length + if loop_length is not UNSET: + field_dict["loopLength"] = loop_length + if loop_type is not UNSET: + field_dict["loopType"] = loop_type + if wire_width is not UNSET: + field_dict["wireWidth"] = wire_width + if source is not UNSET: + field_dict["source"] = source + if is_in_sample_changer is not UNSET: + field_dict["isInSampleChanger"] = is_in_sample_changer + if crystal_id is not UNSET: + field_dict["crystalId"] = crystal_id + if sample_images is not UNSET: + field_dict["sampleImages"] = sample_images + if diffraction_plan is not UNSET: + field_dict["diffractionPlan"] = diffraction_plan + if crystal is not UNSET: + field_dict["crystal"] = crystal + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 + from ..models.diffraction_plan_in import DiffractionPlanIn # noqa: PLC0415 + from ..models.sample_image_in import SampleImageIn # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_sub_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sub_location = _parse_sub_location(d.pop("subLocation", UNSET)) + + def _parse_bl_sample_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + bl_sample_status = _parse_bl_sample_status(d.pop("blSampleStatus", UNSET)) + + def _parse_holder_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + holder_length = _parse_holder_length(d.pop("holderLength", UNSET)) + + def _parse_loop_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + loop_length = _parse_loop_length(d.pop("loopLength", UNSET)) + + def _parse_loop_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + loop_type = _parse_loop_type(d.pop("loopType", UNSET)) + + def _parse_wire_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wire_width = _parse_wire_width(d.pop("wireWidth", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_is_in_sample_changer(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_in_sample_changer = _parse_is_in_sample_changer(d.pop("isInSampleChanger", UNSET)) + + def _parse_crystal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + crystal_id = _parse_crystal_id(d.pop("crystalId", UNSET)) + + def _parse_sample_images(data: object) -> list[SampleImageIn] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + sample_images_type_0 = [] + _sample_images_type_0 = data + for sample_images_type_0_item_data in _sample_images_type_0: + sample_images_type_0_item = SampleImageIn.from_dict(sample_images_type_0_item_data) + + sample_images_type_0.append(sample_images_type_0_item) + + return sample_images_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[SampleImageIn] | None | Unset, data) + + sample_images = _parse_sample_images(d.pop("sampleImages", UNSET)) + + def _parse_diffraction_plan(data: object) -> DiffractionPlanIn | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + diffraction_plan_type_0 = DiffractionPlanIn.from_dict(data) + + return diffraction_plan_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanIn | None | Unset, data) + + diffraction_plan = _parse_diffraction_plan(d.pop("diffractionPlan", UNSET)) + + def _parse_crystal(data: object) -> CrystalWithProtein | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + crystal_type_0 = CrystalWithProtein.from_dict(data) + + return crystal_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CrystalWithProtein | None | Unset, data) + + crystal = _parse_crystal(d.pop("crystal", UNSET)) + + sample_in_with_crystal_and_diffraction_plan = cls( + diffraction_plan_id=diffraction_plan_id, + name=name, + code=code, + location=location, + comments=comments, + sub_location=sub_location, + bl_sample_status=bl_sample_status, + holder_length=holder_length, + loop_length=loop_length, + loop_type=loop_type, + wire_width=wire_width, + source=source, + is_in_sample_changer=is_in_sample_changer, + crystal_id=crystal_id, + sample_images=sample_images, + diffraction_plan=diffraction_plan, + crystal=crystal, + ) + + sample_in_with_crystal_and_diffraction_plan.additional_properties = d + return sample_in_with_crystal_and_diffraction_plan + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_ligand_out.py b/src/lims_utils/expeye_client/models/sample_ligand_out.py new file mode 100644 index 0000000..04ad301 --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_ligand_out.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SampleLigandOut") + + +@_attrs_define +class SampleLigandOut: + """ + Attributes: + ligand_id (int): + bl_sample_id (int): + """ + + ligand_id: int + bl_sample_id: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + ligand_id = self.ligand_id + + bl_sample_id = self.bl_sample_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "ligandId": ligand_id, + "blSampleId": bl_sample_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + ligand_id = d.pop("ligandId") + + bl_sample_id = d.pop("blSampleId") + + sample_ligand_out = cls( + ligand_id=ligand_id, + bl_sample_id=bl_sample_id, + ) + + sample_ligand_out.additional_properties = d + return sample_ligand_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_optional.py b/src/lims_utils/expeye_client/models/sample_optional.py new file mode 100644 index 0000000..13a93f9 --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_optional.py @@ -0,0 +1,353 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SampleOptional") + + +@_attrs_define +class SampleOptional: + """ + Attributes: + diffraction_plan_id (int | None | Unset): + name (None | str | Unset): + code (None | str | Unset): + location (int | None | Unset): + comments (None | str | Unset): + sub_location (int | None | Unset): + bl_sample_status (None | str | Unset): + holder_length (float | None | Unset): + loop_length (float | None | Unset): + loop_type (None | str | Unset): + wire_width (float | None | Unset): + source (None | str | Unset): + is_in_sample_changer (int | None | Unset): + container_id (int | None | Unset): + crystal_id (int | None | Unset): + """ + + diffraction_plan_id: int | None | Unset = UNSET + name: None | str | Unset = UNSET + code: None | str | Unset = UNSET + location: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + sub_location: int | None | Unset = UNSET + bl_sample_status: None | str | Unset = UNSET + holder_length: float | None | Unset = UNSET + loop_length: float | None | Unset = UNSET + loop_type: None | str | Unset = UNSET + wire_width: float | None | Unset = UNSET + source: None | str | Unset = UNSET + is_in_sample_changer: int | None | Unset = UNSET + container_id: int | None | Unset = UNSET + crystal_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + location: int | None | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + sub_location: int | None | Unset + if isinstance(self.sub_location, Unset): + sub_location = UNSET + else: + sub_location = self.sub_location + + bl_sample_status: None | str | Unset + if isinstance(self.bl_sample_status, Unset): + bl_sample_status = UNSET + else: + bl_sample_status = self.bl_sample_status + + holder_length: float | None | Unset + if isinstance(self.holder_length, Unset): + holder_length = UNSET + else: + holder_length = self.holder_length + + loop_length: float | None | Unset + if isinstance(self.loop_length, Unset): + loop_length = UNSET + else: + loop_length = self.loop_length + + loop_type: None | str | Unset + if isinstance(self.loop_type, Unset): + loop_type = UNSET + else: + loop_type = self.loop_type + + wire_width: float | None | Unset + if isinstance(self.wire_width, Unset): + wire_width = UNSET + else: + wire_width = self.wire_width + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + is_in_sample_changer: int | None | Unset + if isinstance(self.is_in_sample_changer, Unset): + is_in_sample_changer = UNSET + else: + is_in_sample_changer = self.is_in_sample_changer + + container_id: int | None | Unset + if isinstance(self.container_id, Unset): + container_id = UNSET + else: + container_id = self.container_id + + crystal_id: int | None | Unset + if isinstance(self.crystal_id, Unset): + crystal_id = UNSET + else: + crystal_id = self.crystal_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if name is not UNSET: + field_dict["name"] = name + if code is not UNSET: + field_dict["code"] = code + if location is not UNSET: + field_dict["location"] = location + if comments is not UNSET: + field_dict["comments"] = comments + if sub_location is not UNSET: + field_dict["subLocation"] = sub_location + if bl_sample_status is not UNSET: + field_dict["blSampleStatus"] = bl_sample_status + if holder_length is not UNSET: + field_dict["holderLength"] = holder_length + if loop_length is not UNSET: + field_dict["loopLength"] = loop_length + if loop_type is not UNSET: + field_dict["loopType"] = loop_type + if wire_width is not UNSET: + field_dict["wireWidth"] = wire_width + if source is not UNSET: + field_dict["source"] = source + if is_in_sample_changer is not UNSET: + field_dict["isInSampleChanger"] = is_in_sample_changer + if container_id is not UNSET: + field_dict["containerId"] = container_id + if crystal_id is not UNSET: + field_dict["crystalId"] = crystal_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_sub_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sub_location = _parse_sub_location(d.pop("subLocation", UNSET)) + + def _parse_bl_sample_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + bl_sample_status = _parse_bl_sample_status(d.pop("blSampleStatus", UNSET)) + + def _parse_holder_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + holder_length = _parse_holder_length(d.pop("holderLength", UNSET)) + + def _parse_loop_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + loop_length = _parse_loop_length(d.pop("loopLength", UNSET)) + + def _parse_loop_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + loop_type = _parse_loop_type(d.pop("loopType", UNSET)) + + def _parse_wire_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wire_width = _parse_wire_width(d.pop("wireWidth", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_is_in_sample_changer(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_in_sample_changer = _parse_is_in_sample_changer(d.pop("isInSampleChanger", UNSET)) + + def _parse_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_id = _parse_container_id(d.pop("containerId", UNSET)) + + def _parse_crystal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + crystal_id = _parse_crystal_id(d.pop("crystalId", UNSET)) + + sample_optional = cls( + diffraction_plan_id=diffraction_plan_id, + name=name, + code=code, + location=location, + comments=comments, + sub_location=sub_location, + bl_sample_status=bl_sample_status, + holder_length=holder_length, + loop_length=loop_length, + loop_type=loop_type, + wire_width=wire_width, + source=source, + is_in_sample_changer=is_in_sample_changer, + container_id=container_id, + crystal_id=crystal_id, + ) + + sample_optional.additional_properties = d + return sample_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_out.py b/src/lims_utils/expeye_client/models/sample_out.py new file mode 100644 index 0000000..51a0292 --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_out.py @@ -0,0 +1,504 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.crystal_out import CrystalOut + from ..models.diffraction_plan_out import DiffractionPlanOut + from ..models.sample_image_in import SampleImageIn + + +T = TypeVar("T", bound="SampleOut") + + +@_attrs_define +class SampleOut: + """ + Attributes: + bl_sample_id (int): + record_time_stamp (datetime.datetime): + diffraction_plan_id (int | None | Unset): + name (None | str | Unset): + code (None | str | Unset): + location (int | None | Unset): + comments (None | str | Unset): + sub_location (int | None | Unset): + bl_sample_status (None | str | Unset): + holder_length (float | None | Unset): + loop_length (float | None | Unset): + loop_type (None | str | Unset): + wire_width (float | None | Unset): + source (None | str | Unset): + is_in_sample_changer (int | None | Unset): + container_id (int | None | Unset): + crystal_id (int | None | Unset): + data_collection_group_id (int | None | Unset): + sample_images (list[SampleImageIn] | None | Unset): + crystal (CrystalOut | None | Unset): + diffraction_plan (DiffractionPlanOut | None | Unset): + """ + + bl_sample_id: int + record_time_stamp: datetime.datetime + diffraction_plan_id: int | None | Unset = UNSET + name: None | str | Unset = UNSET + code: None | str | Unset = UNSET + location: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + sub_location: int | None | Unset = UNSET + bl_sample_status: None | str | Unset = UNSET + holder_length: float | None | Unset = UNSET + loop_length: float | None | Unset = UNSET + loop_type: None | str | Unset = UNSET + wire_width: float | None | Unset = UNSET + source: None | str | Unset = UNSET + is_in_sample_changer: int | None | Unset = UNSET + container_id: int | None | Unset = UNSET + crystal_id: int | None | Unset = UNSET + data_collection_group_id: int | None | Unset = UNSET + sample_images: list[SampleImageIn] | None | Unset = UNSET + crystal: CrystalOut | None | Unset = UNSET + diffraction_plan: DiffractionPlanOut | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.crystal_out import CrystalOut # noqa: PLC0415 + from ..models.diffraction_plan_out import DiffractionPlanOut # noqa: PLC0415 + + bl_sample_id = self.bl_sample_id + + record_time_stamp = self.record_time_stamp.isoformat() + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + location: int | None | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + sub_location: int | None | Unset + if isinstance(self.sub_location, Unset): + sub_location = UNSET + else: + sub_location = self.sub_location + + bl_sample_status: None | str | Unset + if isinstance(self.bl_sample_status, Unset): + bl_sample_status = UNSET + else: + bl_sample_status = self.bl_sample_status + + holder_length: float | None | Unset + if isinstance(self.holder_length, Unset): + holder_length = UNSET + else: + holder_length = self.holder_length + + loop_length: float | None | Unset + if isinstance(self.loop_length, Unset): + loop_length = UNSET + else: + loop_length = self.loop_length + + loop_type: None | str | Unset + if isinstance(self.loop_type, Unset): + loop_type = UNSET + else: + loop_type = self.loop_type + + wire_width: float | None | Unset + if isinstance(self.wire_width, Unset): + wire_width = UNSET + else: + wire_width = self.wire_width + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + is_in_sample_changer: int | None | Unset + if isinstance(self.is_in_sample_changer, Unset): + is_in_sample_changer = UNSET + else: + is_in_sample_changer = self.is_in_sample_changer + + container_id: int | None | Unset + if isinstance(self.container_id, Unset): + container_id = UNSET + else: + container_id = self.container_id + + crystal_id: int | None | Unset + if isinstance(self.crystal_id, Unset): + crystal_id = UNSET + else: + crystal_id = self.crystal_id + + data_collection_group_id: int | None | Unset + if isinstance(self.data_collection_group_id, Unset): + data_collection_group_id = UNSET + else: + data_collection_group_id = self.data_collection_group_id + + sample_images: list[dict[str, Any]] | None | Unset + if isinstance(self.sample_images, Unset): + sample_images = UNSET + elif isinstance(self.sample_images, list): + sample_images = [] + for sample_images_type_0_item_data in self.sample_images: + sample_images_type_0_item = sample_images_type_0_item_data.to_dict() + sample_images.append(sample_images_type_0_item) + + else: + sample_images = self.sample_images + + crystal: dict[str, Any] | None | Unset + if isinstance(self.crystal, Unset): + crystal = UNSET + elif isinstance(self.crystal, CrystalOut): + crystal = self.crystal.to_dict() + else: + crystal = self.crystal + + diffraction_plan: dict[str, Any] | None | Unset + if isinstance(self.diffraction_plan, Unset): + diffraction_plan = UNSET + elif isinstance(self.diffraction_plan, DiffractionPlanOut): + diffraction_plan = self.diffraction_plan.to_dict() + else: + diffraction_plan = self.diffraction_plan + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "blSampleId": bl_sample_id, + "recordTimeStamp": record_time_stamp, + } + ) + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if name is not UNSET: + field_dict["name"] = name + if code is not UNSET: + field_dict["code"] = code + if location is not UNSET: + field_dict["location"] = location + if comments is not UNSET: + field_dict["comments"] = comments + if sub_location is not UNSET: + field_dict["subLocation"] = sub_location + if bl_sample_status is not UNSET: + field_dict["blSampleStatus"] = bl_sample_status + if holder_length is not UNSET: + field_dict["holderLength"] = holder_length + if loop_length is not UNSET: + field_dict["loopLength"] = loop_length + if loop_type is not UNSET: + field_dict["loopType"] = loop_type + if wire_width is not UNSET: + field_dict["wireWidth"] = wire_width + if source is not UNSET: + field_dict["source"] = source + if is_in_sample_changer is not UNSET: + field_dict["isInSampleChanger"] = is_in_sample_changer + if container_id is not UNSET: + field_dict["containerId"] = container_id + if crystal_id is not UNSET: + field_dict["crystalId"] = crystal_id + if data_collection_group_id is not UNSET: + field_dict["dataCollectionGroupId"] = data_collection_group_id + if sample_images is not UNSET: + field_dict["sampleImages"] = sample_images + if crystal is not UNSET: + field_dict["crystal"] = crystal + if diffraction_plan is not UNSET: + field_dict["diffractionPlan"] = diffraction_plan + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.crystal_out import CrystalOut # noqa: PLC0415 + from ..models.diffraction_plan_out import DiffractionPlanOut # noqa: PLC0415 + from ..models.sample_image_in import SampleImageIn # noqa: PLC0415 + + d = dict(src_dict) + bl_sample_id = d.pop("blSampleId") + + record_time_stamp = datetime.datetime.fromisoformat(d.pop("recordTimeStamp")) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_sub_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sub_location = _parse_sub_location(d.pop("subLocation", UNSET)) + + def _parse_bl_sample_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + bl_sample_status = _parse_bl_sample_status(d.pop("blSampleStatus", UNSET)) + + def _parse_holder_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + holder_length = _parse_holder_length(d.pop("holderLength", UNSET)) + + def _parse_loop_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + loop_length = _parse_loop_length(d.pop("loopLength", UNSET)) + + def _parse_loop_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + loop_type = _parse_loop_type(d.pop("loopType", UNSET)) + + def _parse_wire_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wire_width = _parse_wire_width(d.pop("wireWidth", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_is_in_sample_changer(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_in_sample_changer = _parse_is_in_sample_changer(d.pop("isInSampleChanger", UNSET)) + + def _parse_container_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + container_id = _parse_container_id(d.pop("containerId", UNSET)) + + def _parse_crystal_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + crystal_id = _parse_crystal_id(d.pop("crystalId", UNSET)) + + def _parse_data_collection_group_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + data_collection_group_id = _parse_data_collection_group_id(d.pop("dataCollectionGroupId", UNSET)) + + def _parse_sample_images(data: object) -> list[SampleImageIn] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + sample_images_type_0 = [] + _sample_images_type_0 = data + for sample_images_type_0_item_data in _sample_images_type_0: + sample_images_type_0_item = SampleImageIn.from_dict(sample_images_type_0_item_data) + + sample_images_type_0.append(sample_images_type_0_item) + + return sample_images_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[SampleImageIn] | None | Unset, data) + + sample_images = _parse_sample_images(d.pop("sampleImages", UNSET)) + + def _parse_crystal(data: object) -> CrystalOut | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + crystal_type_0 = CrystalOut.from_dict(data) + + return crystal_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CrystalOut | None | Unset, data) + + crystal = _parse_crystal(d.pop("crystal", UNSET)) + + def _parse_diffraction_plan(data: object) -> DiffractionPlanOut | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + diffraction_plan_type_0 = DiffractionPlanOut.from_dict(data) + + return diffraction_plan_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(DiffractionPlanOut | None | Unset, data) + + diffraction_plan = _parse_diffraction_plan(d.pop("diffractionPlan", UNSET)) + + sample_out = cls( + bl_sample_id=bl_sample_id, + record_time_stamp=record_time_stamp, + diffraction_plan_id=diffraction_plan_id, + name=name, + code=code, + location=location, + comments=comments, + sub_location=sub_location, + bl_sample_status=bl_sample_status, + holder_length=holder_length, + loop_length=loop_length, + loop_type=loop_type, + wire_width=wire_width, + source=source, + is_in_sample_changer=is_in_sample_changer, + container_id=container_id, + crystal_id=crystal_id, + data_collection_group_id=data_collection_group_id, + sample_images=sample_images, + crystal=crystal, + diffraction_plan=diffraction_plan, + ) + + sample_out.additional_properties = d + return sample_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_position_in.py b/src/lims_utils/expeye_client/models/sample_position_in.py new file mode 100644 index 0000000..54c530a --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_position_in.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SamplePositionIn") + + +@_attrs_define +class SamplePositionIn: + """ + Attributes: + pos_x (float | None | Unset): + pos_y (float | None | Unset): + pos_z (float | None | Unset): + position_type (Literal['dispensing'] | None | Unset): Type of marked position (e.g.: dispensing location) + record_time_stamp (datetime.datetime | None | Unset): + """ + + pos_x: float | None | Unset = UNSET + pos_y: float | None | Unset = UNSET + pos_z: float | None | Unset = UNSET + position_type: Literal["dispensing"] | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + pos_x: float | None | Unset + if isinstance(self.pos_x, Unset): + pos_x = UNSET + else: + pos_x = self.pos_x + + pos_y: float | None | Unset + if isinstance(self.pos_y, Unset): + pos_y = UNSET + else: + pos_y = self.pos_y + + pos_z: float | None | Unset + if isinstance(self.pos_z, Unset): + pos_z = UNSET + else: + pos_z = self.pos_z + + position_type: Literal["dispensing"] | None | Unset + if isinstance(self.position_type, Unset): + position_type = UNSET + else: + position_type = self.position_type + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pos_x is not UNSET: + field_dict["posX"] = pos_x + if pos_y is not UNSET: + field_dict["posY"] = pos_y + if pos_z is not UNSET: + field_dict["posZ"] = pos_z + if position_type is not UNSET: + field_dict["positionType"] = position_type + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_pos_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_x = _parse_pos_x(d.pop("posX", UNSET)) + + def _parse_pos_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_y = _parse_pos_y(d.pop("posY", UNSET)) + + def _parse_pos_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_z = _parse_pos_z(d.pop("posZ", UNSET)) + + def _parse_position_type(data: object) -> Literal["dispensing"] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + position_type_type_0 = cast(Literal["dispensing"], data) + if position_type_type_0 != "dispensing": + raise ValueError(f"positionType_type_0 must match const 'dispensing', got '{position_type_type_0}'") + return position_type_type_0 + return cast(Literal["dispensing"] | None | Unset, data) + + position_type = _parse_position_type(d.pop("positionType", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + sample_position_in = cls( + pos_x=pos_x, + pos_y=pos_y, + pos_z=pos_z, + position_type=position_type, + record_time_stamp=record_time_stamp, + ) + + sample_position_in.additional_properties = d + return sample_position_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_position_optional.py b/src/lims_utils/expeye_client/models/sample_position_optional.py new file mode 100644 index 0000000..d5825da --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_position_optional.py @@ -0,0 +1,168 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SamplePositionOptional") + + +@_attrs_define +class SamplePositionOptional: + """ + Attributes: + pos_x (float | None | Unset): + pos_y (float | None | Unset): + pos_z (float | None | Unset): + position_type (Literal['dispensing'] | None | Unset): Type of marked position (e.g.: dispensing location) + record_time_stamp (datetime.datetime | None | Unset): + """ + + pos_x: float | None | Unset = UNSET + pos_y: float | None | Unset = UNSET + pos_z: float | None | Unset = UNSET + position_type: Literal["dispensing"] | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + pos_x: float | None | Unset + if isinstance(self.pos_x, Unset): + pos_x = UNSET + else: + pos_x = self.pos_x + + pos_y: float | None | Unset + if isinstance(self.pos_y, Unset): + pos_y = UNSET + else: + pos_y = self.pos_y + + pos_z: float | None | Unset + if isinstance(self.pos_z, Unset): + pos_z = UNSET + else: + pos_z = self.pos_z + + position_type: Literal["dispensing"] | None | Unset + if isinstance(self.position_type, Unset): + position_type = UNSET + else: + position_type = self.position_type + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if pos_x is not UNSET: + field_dict["posX"] = pos_x + if pos_y is not UNSET: + field_dict["posY"] = pos_y + if pos_z is not UNSET: + field_dict["posZ"] = pos_z + if position_type is not UNSET: + field_dict["positionType"] = position_type + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_pos_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_x = _parse_pos_x(d.pop("posX", UNSET)) + + def _parse_pos_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_y = _parse_pos_y(d.pop("posY", UNSET)) + + def _parse_pos_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_z = _parse_pos_z(d.pop("posZ", UNSET)) + + def _parse_position_type(data: object) -> Literal["dispensing"] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + position_type_type_0 = cast(Literal["dispensing"], data) + if position_type_type_0 != "dispensing": + raise ValueError(f"positionType_type_0 must match const 'dispensing', got '{position_type_type_0}'") + return position_type_type_0 + return cast(Literal["dispensing"] | None | Unset, data) + + position_type = _parse_position_type(d.pop("positionType", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + sample_position_optional = cls( + pos_x=pos_x, + pos_y=pos_y, + pos_z=pos_z, + position_type=position_type, + record_time_stamp=record_time_stamp, + ) + + sample_position_optional.additional_properties = d + return sample_position_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_position_out.py b/src/lims_utils/expeye_client/models/sample_position_out.py new file mode 100644 index 0000000..49631ca --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_position_out.py @@ -0,0 +1,186 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, Literal, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SamplePositionOut") + + +@_attrs_define +class SamplePositionOut: + """ + Attributes: + bl_sample_id (int): + bl_sample_position_id (int): + pos_x (float | None | Unset): + pos_y (float | None | Unset): + pos_z (float | None | Unset): + position_type (Literal['dispensing'] | None | Unset): Type of marked position (e.g.: dispensing location) + record_time_stamp (datetime.datetime | None | Unset): + """ + + bl_sample_id: int + bl_sample_position_id: int + pos_x: float | None | Unset = UNSET + pos_y: float | None | Unset = UNSET + pos_z: float | None | Unset = UNSET + position_type: Literal["dispensing"] | None | Unset = UNSET + record_time_stamp: datetime.datetime | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + bl_sample_id = self.bl_sample_id + + bl_sample_position_id = self.bl_sample_position_id + + pos_x: float | None | Unset + if isinstance(self.pos_x, Unset): + pos_x = UNSET + else: + pos_x = self.pos_x + + pos_y: float | None | Unset + if isinstance(self.pos_y, Unset): + pos_y = UNSET + else: + pos_y = self.pos_y + + pos_z: float | None | Unset + if isinstance(self.pos_z, Unset): + pos_z = UNSET + else: + pos_z = self.pos_z + + position_type: Literal["dispensing"] | None | Unset + if isinstance(self.position_type, Unset): + position_type = UNSET + else: + position_type = self.position_type + + record_time_stamp: None | str | Unset + if isinstance(self.record_time_stamp, Unset): + record_time_stamp = UNSET + elif isinstance(self.record_time_stamp, datetime.datetime): + record_time_stamp = self.record_time_stamp.isoformat() + else: + record_time_stamp = self.record_time_stamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "blSampleId": bl_sample_id, + "blSamplePositionId": bl_sample_position_id, + } + ) + if pos_x is not UNSET: + field_dict["posX"] = pos_x + if pos_y is not UNSET: + field_dict["posY"] = pos_y + if pos_z is not UNSET: + field_dict["posZ"] = pos_z + if position_type is not UNSET: + field_dict["positionType"] = position_type + if record_time_stamp is not UNSET: + field_dict["recordTimeStamp"] = record_time_stamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + bl_sample_id = d.pop("blSampleId") + + bl_sample_position_id = d.pop("blSamplePositionId") + + def _parse_pos_x(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_x = _parse_pos_x(d.pop("posX", UNSET)) + + def _parse_pos_y(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_y = _parse_pos_y(d.pop("posY", UNSET)) + + def _parse_pos_z(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pos_z = _parse_pos_z(d.pop("posZ", UNSET)) + + def _parse_position_type(data: object) -> Literal["dispensing"] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + position_type_type_0 = cast(Literal["dispensing"], data) + if position_type_type_0 != "dispensing": + raise ValueError(f"positionType_type_0 must match const 'dispensing', got '{position_type_type_0}'") + return position_type_type_0 + return cast(Literal["dispensing"] | None | Unset, data) + + position_type = _parse_position_type(d.pop("positionType", UNSET)) + + def _parse_record_time_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + record_time_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return record_time_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + record_time_stamp = _parse_record_time_stamp(d.pop("recordTimeStamp", UNSET)) + + sample_position_out = cls( + bl_sample_id=bl_sample_id, + bl_sample_position_id=bl_sample_position_id, + pos_x=pos_x, + pos_y=pos_y, + pos_z=pos_z, + position_type=position_type, + record_time_stamp=record_time_stamp, + ) + + sample_position_out.additional_properties = d + return sample_position_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/sample_with_crystal_in.py b/src/lims_utils/expeye_client/models/sample_with_crystal_in.py new file mode 100644 index 0000000..cb393e8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/sample_with_crystal_in.py @@ -0,0 +1,351 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.crystal_with_protein import CrystalWithProtein + + +T = TypeVar("T", bound="SampleWithCrystalIn") + + +@_attrs_define +class SampleWithCrystalIn: + """ + Attributes: + diffraction_plan_id (int | None | Unset): + name (None | str | Unset): + code (None | str | Unset): + location (int | None | Unset): + comments (None | str | Unset): + sub_location (int | None | Unset): + bl_sample_status (None | str | Unset): + holder_length (float | None | Unset): + loop_length (float | None | Unset): + loop_type (None | str | Unset): + wire_width (float | None | Unset): + source (None | str | Unset): + is_in_sample_changer (int | None | Unset): + crystal (CrystalWithProtein | None | Unset): + """ + + diffraction_plan_id: int | None | Unset = UNSET + name: None | str | Unset = UNSET + code: None | str | Unset = UNSET + location: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + sub_location: int | None | Unset = UNSET + bl_sample_status: None | str | Unset = UNSET + holder_length: float | None | Unset = UNSET + loop_length: float | None | Unset = UNSET + loop_type: None | str | Unset = UNSET + wire_width: float | None | Unset = UNSET + source: None | str | Unset = UNSET + is_in_sample_changer: int | None | Unset = UNSET + crystal: CrystalWithProtein | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 + + diffraction_plan_id: int | None | Unset + if isinstance(self.diffraction_plan_id, Unset): + diffraction_plan_id = UNSET + else: + diffraction_plan_id = self.diffraction_plan_id + + name: None | str | Unset + if isinstance(self.name, Unset): + name = UNSET + else: + name = self.name + + code: None | str | Unset + if isinstance(self.code, Unset): + code = UNSET + else: + code = self.code + + location: int | None | Unset + if isinstance(self.location, Unset): + location = UNSET + else: + location = self.location + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + sub_location: int | None | Unset + if isinstance(self.sub_location, Unset): + sub_location = UNSET + else: + sub_location = self.sub_location + + bl_sample_status: None | str | Unset + if isinstance(self.bl_sample_status, Unset): + bl_sample_status = UNSET + else: + bl_sample_status = self.bl_sample_status + + holder_length: float | None | Unset + if isinstance(self.holder_length, Unset): + holder_length = UNSET + else: + holder_length = self.holder_length + + loop_length: float | None | Unset + if isinstance(self.loop_length, Unset): + loop_length = UNSET + else: + loop_length = self.loop_length + + loop_type: None | str | Unset + if isinstance(self.loop_type, Unset): + loop_type = UNSET + else: + loop_type = self.loop_type + + wire_width: float | None | Unset + if isinstance(self.wire_width, Unset): + wire_width = UNSET + else: + wire_width = self.wire_width + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + is_in_sample_changer: int | None | Unset + if isinstance(self.is_in_sample_changer, Unset): + is_in_sample_changer = UNSET + else: + is_in_sample_changer = self.is_in_sample_changer + + crystal: dict[str, Any] | None | Unset + if isinstance(self.crystal, Unset): + crystal = UNSET + elif isinstance(self.crystal, CrystalWithProtein): + crystal = self.crystal.to_dict() + else: + crystal = self.crystal + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if diffraction_plan_id is not UNSET: + field_dict["diffractionPlanId"] = diffraction_plan_id + if name is not UNSET: + field_dict["name"] = name + if code is not UNSET: + field_dict["code"] = code + if location is not UNSET: + field_dict["location"] = location + if comments is not UNSET: + field_dict["comments"] = comments + if sub_location is not UNSET: + field_dict["subLocation"] = sub_location + if bl_sample_status is not UNSET: + field_dict["blSampleStatus"] = bl_sample_status + if holder_length is not UNSET: + field_dict["holderLength"] = holder_length + if loop_length is not UNSET: + field_dict["loopLength"] = loop_length + if loop_type is not UNSET: + field_dict["loopType"] = loop_type + if wire_width is not UNSET: + field_dict["wireWidth"] = wire_width + if source is not UNSET: + field_dict["source"] = source + if is_in_sample_changer is not UNSET: + field_dict["isInSampleChanger"] = is_in_sample_changer + if crystal is not UNSET: + field_dict["crystal"] = crystal + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_diffraction_plan_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + diffraction_plan_id = _parse_diffraction_plan_id(d.pop("diffractionPlanId", UNSET)) + + def _parse_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + name = _parse_name(d.pop("name", UNSET)) + + def _parse_code(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + code = _parse_code(d.pop("code", UNSET)) + + def _parse_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + location = _parse_location(d.pop("location", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_sub_location(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sub_location = _parse_sub_location(d.pop("subLocation", UNSET)) + + def _parse_bl_sample_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + bl_sample_status = _parse_bl_sample_status(d.pop("blSampleStatus", UNSET)) + + def _parse_holder_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + holder_length = _parse_holder_length(d.pop("holderLength", UNSET)) + + def _parse_loop_length(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + loop_length = _parse_loop_length(d.pop("loopLength", UNSET)) + + def _parse_loop_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + loop_type = _parse_loop_type(d.pop("loopType", UNSET)) + + def _parse_wire_width(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + wire_width = _parse_wire_width(d.pop("wireWidth", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_is_in_sample_changer(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + is_in_sample_changer = _parse_is_in_sample_changer(d.pop("isInSampleChanger", UNSET)) + + def _parse_crystal(data: object) -> CrystalWithProtein | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + crystal_type_0 = CrystalWithProtein.from_dict(data) + + return crystal_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(CrystalWithProtein | None | Unset, data) + + crystal = _parse_crystal(d.pop("crystal", UNSET)) + + sample_with_crystal_in = cls( + diffraction_plan_id=diffraction_plan_id, + name=name, + code=code, + location=location, + comments=comments, + sub_location=sub_location, + bl_sample_status=bl_sample_status, + holder_length=holder_length, + loop_length=loop_length, + loop_type=loop_type, + wire_width=wire_width, + source=source, + is_in_sample_changer=is_in_sample_changer, + crystal=crystal, + ) + + sample_with_crystal_in.additional_properties = d + return sample_with_crystal_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_event_out.py b/src/lims_utils/expeye_client/models/session_event_out.py new file mode 100644 index 0000000..adf1948 --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_event_out.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SessionEventOut") + + +@_attrs_define +class SessionEventOut: + """ + Attributes: + type_ (str): + start_timestamp (datetime.datetime | None): + end_timestamp (datetime.datetime | None): + id (int): + """ + + type_: str + start_timestamp: datetime.datetime | None + end_timestamp: datetime.datetime | None + id: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_ = self.type_ + + start_timestamp: None | str + if isinstance(self.start_timestamp, datetime.datetime): + start_timestamp = self.start_timestamp.isoformat() + else: + start_timestamp = self.start_timestamp + + end_timestamp: None | str + if isinstance(self.end_timestamp, datetime.datetime): + end_timestamp = self.end_timestamp.isoformat() + else: + end_timestamp = self.end_timestamp + + id = self.id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "startTimestamp": start_timestamp, + "endTimestamp": end_timestamp, + "id": id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = d.pop("type") + + def _parse_start_timestamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + start_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return start_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + start_timestamp = _parse_start_timestamp(d.pop("startTimestamp")) + + def _parse_end_timestamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + end_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return end_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + end_timestamp = _parse_end_timestamp(d.pop("endTimestamp")) + + id = d.pop("id") + + session_event_out = cls( + type_=type_, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + id=id, + ) + + session_event_out.additional_properties = d + return session_event_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_event_with_children_out.py b/src/lims_utils/expeye_client/models/session_event_with_children_out.py new file mode 100644 index 0000000..9a07fc6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_event_with_children_out.py @@ -0,0 +1,172 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.auto_proc_program_scaling_out import AutoProcProgramScalingOut + from ..models.session_event_out import SessionEventOut + + +T = TypeVar("T", bound="SessionEventWithChildrenOut") + + +@_attrs_define +class SessionEventWithChildrenOut: + """ + Attributes: + type_ (str): + start_timestamp (datetime.datetime | None): + end_timestamp (datetime.datetime | None): + id (int): + events (list[SessionEventOut] | Unset): + scaling (list[AutoProcProgramScalingOut] | Unset): + """ + + type_: str + start_timestamp: datetime.datetime | None + end_timestamp: datetime.datetime | None + id: int + events: list[SessionEventOut] | Unset = UNSET + scaling: list[AutoProcProgramScalingOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_ = self.type_ + + start_timestamp: None | str + if isinstance(self.start_timestamp, datetime.datetime): + start_timestamp = self.start_timestamp.isoformat() + else: + start_timestamp = self.start_timestamp + + end_timestamp: None | str + if isinstance(self.end_timestamp, datetime.datetime): + end_timestamp = self.end_timestamp.isoformat() + else: + end_timestamp = self.end_timestamp + + id = self.id + + events: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.events, Unset): + events = [] + for events_item_data in self.events: + events_item = events_item_data.to_dict() + events.append(events_item) + + scaling: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.scaling, Unset): + scaling = [] + for scaling_item_data in self.scaling: + scaling_item = scaling_item_data.to_dict() + scaling.append(scaling_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type_, + "startTimestamp": start_timestamp, + "endTimestamp": end_timestamp, + "id": id, + } + ) + if events is not UNSET: + field_dict["events"] = events + if scaling is not UNSET: + field_dict["scaling"] = scaling + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.auto_proc_program_scaling_out import AutoProcProgramScalingOut # noqa: PLC0415 + from ..models.session_event_out import SessionEventOut # noqa: PLC0415 + + d = dict(src_dict) + type_ = d.pop("type") + + def _parse_start_timestamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + start_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return start_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + start_timestamp = _parse_start_timestamp(d.pop("startTimestamp")) + + def _parse_end_timestamp(data: object) -> datetime.datetime | None: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + end_timestamp_type_0 = datetime.datetime.fromisoformat(data) + + return end_timestamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None, data) + + end_timestamp = _parse_end_timestamp(d.pop("endTimestamp")) + + id = d.pop("id") + + _events = d.pop("events", UNSET) + events: list[SessionEventOut] | Unset = UNSET + if _events is not UNSET: + events = [] + for events_item_data in _events: + events_item = SessionEventOut.from_dict(events_item_data) + + events.append(events_item) + + _scaling = d.pop("scaling", UNSET) + scaling: list[AutoProcProgramScalingOut] | Unset = UNSET + if _scaling is not UNSET: + scaling = [] + for scaling_item_data in _scaling: + scaling_item = AutoProcProgramScalingOut.from_dict(scaling_item_data) + + scaling.append(scaling_item) + + session_event_with_children_out = cls( + type_=type_, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + id=id, + events=events, + scaling=scaling, + ) + + session_event_with_children_out.additional_properties = d + return session_event_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_in.py b/src/lims_utils/expeye_client/models/session_in.py new file mode 100644 index 0000000..b1c6cf3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_in.py @@ -0,0 +1,437 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast +from uuid import UUID + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SessionIn") + + +@_attrs_define +class SessionIn: + """ + Attributes: + beam_line_setup_id (int | None | Unset): + beam_calendar_id (int | None | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + beam_line_name (None | str | Unset): + scheduled (int | None | Unset): + nb_shifts (int | None | Unset): + comments (None | str | Unset): + visit_number (int | None | Unset): + used_flag (int | None | Unset): Indicates if session has Datacollections or XFE or EnergyScans attached + last_update (datetime.datetime | None | Unset): Last update timestamp: by default the end of the session, the + last collect + bltime_stamp (datetime.datetime | None | Unset): + purged_processed_data (bool | None | Unset): + archived (int | None | Unset): The data for the session is archived and no longer available on disk + external_id (None | Unset | UUID): + beam_line_operator (list[str] | None | Unset): + """ + + beam_line_setup_id: int | None | Unset = UNSET + beam_calendar_id: int | None | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + beam_line_name: None | str | Unset = UNSET + scheduled: int | None | Unset = UNSET + nb_shifts: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + visit_number: int | None | Unset = UNSET + used_flag: int | None | Unset = UNSET + last_update: datetime.datetime | None | Unset = UNSET + bltime_stamp: datetime.datetime | None | Unset = UNSET + purged_processed_data: bool | None | Unset = UNSET + archived: int | None | Unset = UNSET + external_id: None | Unset | UUID = UNSET + beam_line_operator: list[str] | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + beam_line_setup_id: int | None | Unset + if isinstance(self.beam_line_setup_id, Unset): + beam_line_setup_id = UNSET + else: + beam_line_setup_id = self.beam_line_setup_id + + beam_calendar_id: int | None | Unset + if isinstance(self.beam_calendar_id, Unset): + beam_calendar_id = UNSET + else: + beam_calendar_id = self.beam_calendar_id + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + beam_line_name: None | str | Unset + if isinstance(self.beam_line_name, Unset): + beam_line_name = UNSET + else: + beam_line_name = self.beam_line_name + + scheduled: int | None | Unset + if isinstance(self.scheduled, Unset): + scheduled = UNSET + else: + scheduled = self.scheduled + + nb_shifts: int | None | Unset + if isinstance(self.nb_shifts, Unset): + nb_shifts = UNSET + else: + nb_shifts = self.nb_shifts + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + visit_number: int | None | Unset + if isinstance(self.visit_number, Unset): + visit_number = UNSET + else: + visit_number = self.visit_number + + used_flag: int | None | Unset + if isinstance(self.used_flag, Unset): + used_flag = UNSET + else: + used_flag = self.used_flag + + last_update: None | str | Unset + if isinstance(self.last_update, Unset): + last_update = UNSET + elif isinstance(self.last_update, datetime.datetime): + last_update = self.last_update.isoformat() + else: + last_update = self.last_update + + bltime_stamp: None | str | Unset + if isinstance(self.bltime_stamp, Unset): + bltime_stamp = UNSET + elif isinstance(self.bltime_stamp, datetime.datetime): + bltime_stamp = self.bltime_stamp.isoformat() + else: + bltime_stamp = self.bltime_stamp + + purged_processed_data: bool | None | Unset + if isinstance(self.purged_processed_data, Unset): + purged_processed_data = UNSET + else: + purged_processed_data = self.purged_processed_data + + archived: int | None | Unset + if isinstance(self.archived, Unset): + archived = UNSET + else: + archived = self.archived + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + elif isinstance(self.external_id, UUID): + external_id = str(self.external_id) + else: + external_id = self.external_id + + beam_line_operator: list[str] | None | Unset + if isinstance(self.beam_line_operator, Unset): + beam_line_operator = UNSET + elif isinstance(self.beam_line_operator, list): + beam_line_operator = self.beam_line_operator + + else: + beam_line_operator = self.beam_line_operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if beam_line_setup_id is not UNSET: + field_dict["beamLineSetupId"] = beam_line_setup_id + if beam_calendar_id is not UNSET: + field_dict["beamCalendarId"] = beam_calendar_id + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + if beam_line_name is not UNSET: + field_dict["beamLineName"] = beam_line_name + if scheduled is not UNSET: + field_dict["scheduled"] = scheduled + if nb_shifts is not UNSET: + field_dict["nbShifts"] = nb_shifts + if comments is not UNSET: + field_dict["comments"] = comments + if visit_number is not UNSET: + field_dict["visitNumber"] = visit_number + if used_flag is not UNSET: + field_dict["usedFlag"] = used_flag + if last_update is not UNSET: + field_dict["lastUpdate"] = last_update + if bltime_stamp is not UNSET: + field_dict["bltimeStamp"] = bltime_stamp + if purged_processed_data is not UNSET: + field_dict["purgedProcessedData"] = purged_processed_data + if archived is not UNSET: + field_dict["archived"] = archived + if external_id is not UNSET: + field_dict["externalId"] = external_id + if beam_line_operator is not UNSET: + field_dict["beamLineOperator"] = beam_line_operator + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_beam_line_setup_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + beam_line_setup_id = _parse_beam_line_setup_id(d.pop("beamLineSetupId", UNSET)) + + def _parse_beam_calendar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + beam_calendar_id = _parse_beam_calendar_id(d.pop("beamCalendarId", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + def _parse_beam_line_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beam_line_name = _parse_beam_line_name(d.pop("beamLineName", UNSET)) + + def _parse_scheduled(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + scheduled = _parse_scheduled(d.pop("scheduled", UNSET)) + + def _parse_nb_shifts(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + nb_shifts = _parse_nb_shifts(d.pop("nbShifts", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_visit_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + visit_number = _parse_visit_number(d.pop("visitNumber", UNSET)) + + def _parse_used_flag(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + used_flag = _parse_used_flag(d.pop("usedFlag", UNSET)) + + def _parse_last_update(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_update_type_0 = datetime.datetime.fromisoformat(data) + + return last_update_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_update = _parse_last_update(d.pop("lastUpdate", UNSET)) + + def _parse_bltime_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bltime_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bltime_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bltime_stamp = _parse_bltime_stamp(d.pop("bltimeStamp", UNSET)) + + def _parse_purged_processed_data(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + purged_processed_data = _parse_purged_processed_data(d.pop("purgedProcessedData", UNSET)) + + def _parse_archived(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + archived = _parse_archived(d.pop("archived", UNSET)) + + def _parse_external_id(data: object) -> None | Unset | UUID: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + external_id_type_0 = UUID(data) + + return external_id_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | Unset | UUID, data) + + external_id = _parse_external_id(d.pop("externalId", UNSET)) + + def _parse_beam_line_operator(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + beam_line_operator_type_0 = cast(list[str], data) + + return beam_line_operator_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + beam_line_operator = _parse_beam_line_operator(d.pop("beamLineOperator", UNSET)) + + session_in = cls( + beam_line_setup_id=beam_line_setup_id, + beam_calendar_id=beam_calendar_id, + start_date=start_date, + end_date=end_date, + beam_line_name=beam_line_name, + scheduled=scheduled, + nb_shifts=nb_shifts, + comments=comments, + visit_number=visit_number, + used_flag=used_flag, + last_update=last_update, + bltime_stamp=bltime_stamp, + purged_processed_data=purged_processed_data, + archived=archived, + external_id=external_id, + beam_line_operator=beam_line_operator, + ) + + session_in.additional_properties = d + return session_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_optional.py b/src/lims_utils/expeye_client/models/session_optional.py new file mode 100644 index 0000000..1879d3c --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_optional.py @@ -0,0 +1,426 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="SessionOptional") + + +@_attrs_define +class SessionOptional: + """ + Attributes: + beam_line_setup_id (int | None | Unset): + beam_calendar_id (int | None | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + beam_line_name (None | str | Unset): + scheduled (int | None | Unset): + nb_shifts (int | None | Unset): + comments (None | str | Unset): + visit_number (int | None | Unset): + used_flag (int | None | Unset): Indicates if session has Datacollections or XFE or EnergyScans attached + last_update (datetime.datetime | None | Unset): Last update timestamp: by default the end of the session, the + last collect + parent_proposal (None | str | Unset): + bltime_stamp (datetime.datetime | None | Unset): + purged_processed_data (bool | None | Unset): + beam_line_operator (list[str] | None | Unset): + archived (int | None | Unset): The data for the session is archived and no longer available on disk + """ + + beam_line_setup_id: int | None | Unset = UNSET + beam_calendar_id: int | None | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + beam_line_name: None | str | Unset = UNSET + scheduled: int | None | Unset = UNSET + nb_shifts: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + visit_number: int | None | Unset = UNSET + used_flag: int | None | Unset = UNSET + last_update: datetime.datetime | None | Unset = UNSET + parent_proposal: None | str | Unset = UNSET + bltime_stamp: datetime.datetime | None | Unset = UNSET + purged_processed_data: bool | None | Unset = UNSET + beam_line_operator: list[str] | None | Unset = UNSET + archived: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + beam_line_setup_id: int | None | Unset + if isinstance(self.beam_line_setup_id, Unset): + beam_line_setup_id = UNSET + else: + beam_line_setup_id = self.beam_line_setup_id + + beam_calendar_id: int | None | Unset + if isinstance(self.beam_calendar_id, Unset): + beam_calendar_id = UNSET + else: + beam_calendar_id = self.beam_calendar_id + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + beam_line_name: None | str | Unset + if isinstance(self.beam_line_name, Unset): + beam_line_name = UNSET + else: + beam_line_name = self.beam_line_name + + scheduled: int | None | Unset + if isinstance(self.scheduled, Unset): + scheduled = UNSET + else: + scheduled = self.scheduled + + nb_shifts: int | None | Unset + if isinstance(self.nb_shifts, Unset): + nb_shifts = UNSET + else: + nb_shifts = self.nb_shifts + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + visit_number: int | None | Unset + if isinstance(self.visit_number, Unset): + visit_number = UNSET + else: + visit_number = self.visit_number + + used_flag: int | None | Unset + if isinstance(self.used_flag, Unset): + used_flag = UNSET + else: + used_flag = self.used_flag + + last_update: None | str | Unset + if isinstance(self.last_update, Unset): + last_update = UNSET + elif isinstance(self.last_update, datetime.datetime): + last_update = self.last_update.isoformat() + else: + last_update = self.last_update + + parent_proposal: None | str | Unset + if isinstance(self.parent_proposal, Unset): + parent_proposal = UNSET + else: + parent_proposal = self.parent_proposal + + bltime_stamp: None | str | Unset + if isinstance(self.bltime_stamp, Unset): + bltime_stamp = UNSET + elif isinstance(self.bltime_stamp, datetime.datetime): + bltime_stamp = self.bltime_stamp.isoformat() + else: + bltime_stamp = self.bltime_stamp + + purged_processed_data: bool | None | Unset + if isinstance(self.purged_processed_data, Unset): + purged_processed_data = UNSET + else: + purged_processed_data = self.purged_processed_data + + beam_line_operator: list[str] | None | Unset + if isinstance(self.beam_line_operator, Unset): + beam_line_operator = UNSET + elif isinstance(self.beam_line_operator, list): + beam_line_operator = self.beam_line_operator + + else: + beam_line_operator = self.beam_line_operator + + archived: int | None | Unset + if isinstance(self.archived, Unset): + archived = UNSET + else: + archived = self.archived + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if beam_line_setup_id is not UNSET: + field_dict["beamLineSetupId"] = beam_line_setup_id + if beam_calendar_id is not UNSET: + field_dict["beamCalendarId"] = beam_calendar_id + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + if beam_line_name is not UNSET: + field_dict["beamLineName"] = beam_line_name + if scheduled is not UNSET: + field_dict["scheduled"] = scheduled + if nb_shifts is not UNSET: + field_dict["nbShifts"] = nb_shifts + if comments is not UNSET: + field_dict["comments"] = comments + if visit_number is not UNSET: + field_dict["visitNumber"] = visit_number + if used_flag is not UNSET: + field_dict["usedFlag"] = used_flag + if last_update is not UNSET: + field_dict["lastUpdate"] = last_update + if parent_proposal is not UNSET: + field_dict["parentProposal"] = parent_proposal + if bltime_stamp is not UNSET: + field_dict["bltimeStamp"] = bltime_stamp + if purged_processed_data is not UNSET: + field_dict["purgedProcessedData"] = purged_processed_data + if beam_line_operator is not UNSET: + field_dict["beamLineOperator"] = beam_line_operator + if archived is not UNSET: + field_dict["archived"] = archived + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_beam_line_setup_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + beam_line_setup_id = _parse_beam_line_setup_id(d.pop("beamLineSetupId", UNSET)) + + def _parse_beam_calendar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + beam_calendar_id = _parse_beam_calendar_id(d.pop("beamCalendarId", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + def _parse_beam_line_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beam_line_name = _parse_beam_line_name(d.pop("beamLineName", UNSET)) + + def _parse_scheduled(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + scheduled = _parse_scheduled(d.pop("scheduled", UNSET)) + + def _parse_nb_shifts(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + nb_shifts = _parse_nb_shifts(d.pop("nbShifts", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_visit_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + visit_number = _parse_visit_number(d.pop("visitNumber", UNSET)) + + def _parse_used_flag(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + used_flag = _parse_used_flag(d.pop("usedFlag", UNSET)) + + def _parse_last_update(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_update_type_0 = datetime.datetime.fromisoformat(data) + + return last_update_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_update = _parse_last_update(d.pop("lastUpdate", UNSET)) + + def _parse_parent_proposal(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + parent_proposal = _parse_parent_proposal(d.pop("parentProposal", UNSET)) + + def _parse_bltime_stamp(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + bltime_stamp_type_0 = datetime.datetime.fromisoformat(data) + + return bltime_stamp_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + bltime_stamp = _parse_bltime_stamp(d.pop("bltimeStamp", UNSET)) + + def _parse_purged_processed_data(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + purged_processed_data = _parse_purged_processed_data(d.pop("purgedProcessedData", UNSET)) + + def _parse_beam_line_operator(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + beam_line_operator_type_0 = cast(list[str], data) + + return beam_line_operator_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + beam_line_operator = _parse_beam_line_operator(d.pop("beamLineOperator", UNSET)) + + def _parse_archived(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + archived = _parse_archived(d.pop("archived", UNSET)) + + session_optional = cls( + beam_line_setup_id=beam_line_setup_id, + beam_calendar_id=beam_calendar_id, + start_date=start_date, + end_date=end_date, + beam_line_name=beam_line_name, + scheduled=scheduled, + nb_shifts=nb_shifts, + comments=comments, + visit_number=visit_number, + used_flag=used_flag, + last_update=last_update, + parent_proposal=parent_proposal, + bltime_stamp=bltime_stamp, + purged_processed_data=purged_processed_data, + beam_line_operator=beam_line_operator, + archived=archived, + ) + + session_optional.additional_properties = d + return session_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_out.py b/src/lims_utils/expeye_client/models/session_out.py new file mode 100644 index 0000000..a843fec --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_out.py @@ -0,0 +1,453 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.person_out import PersonOut + + +T = TypeVar("T", bound="SessionOut") + + +@_attrs_define +class SessionOut: + """ + Attributes: + proposal_id (int): Proposal ID + session_id (int): Session ID + bltime_stamp (datetime.datetime): + purged_processed_data (bool): + archived (int): The data for the session is archived and no longer available on disk + active (bool): Whether the session is currently running + beam_line_setup_id (int | None | Unset): + beam_calendar_id (int | None | Unset): + start_date (datetime.datetime | None | Unset): + end_date (datetime.datetime | None | Unset): + beam_line_name (None | str | Unset): + scheduled (int | None | Unset): + nb_shifts (int | None | Unset): + comments (None | str | Unset): + visit_number (int | None | Unset): + used_flag (int | None | Unset): Indicates if session has Datacollections or XFE or EnergyScans attached + last_update (datetime.datetime | None | Unset): Last update timestamp: by default the end of the session, the + last collect + parent_proposal (None | str | Unset): + beam_line_operator (list[str] | None | Unset): + collection_groups (int | None | Unset): + users (list[PersonOut] | Unset): + """ + + proposal_id: int + session_id: int + bltime_stamp: datetime.datetime + purged_processed_data: bool + archived: int + active: bool + beam_line_setup_id: int | None | Unset = UNSET + beam_calendar_id: int | None | Unset = UNSET + start_date: datetime.datetime | None | Unset = UNSET + end_date: datetime.datetime | None | Unset = UNSET + beam_line_name: None | str | Unset = UNSET + scheduled: int | None | Unset = UNSET + nb_shifts: int | None | Unset = UNSET + comments: None | str | Unset = UNSET + visit_number: int | None | Unset = UNSET + used_flag: int | None | Unset = UNSET + last_update: datetime.datetime | None | Unset = UNSET + parent_proposal: None | str | Unset = UNSET + beam_line_operator: list[str] | None | Unset = UNSET + collection_groups: int | None | Unset = UNSET + users: list[PersonOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + proposal_id = self.proposal_id + + session_id = self.session_id + + bltime_stamp = self.bltime_stamp.isoformat() + + purged_processed_data = self.purged_processed_data + + archived = self.archived + + active = self.active + + beam_line_setup_id: int | None | Unset + if isinstance(self.beam_line_setup_id, Unset): + beam_line_setup_id = UNSET + else: + beam_line_setup_id = self.beam_line_setup_id + + beam_calendar_id: int | None | Unset + if isinstance(self.beam_calendar_id, Unset): + beam_calendar_id = UNSET + else: + beam_calendar_id = self.beam_calendar_id + + start_date: None | str | Unset + if isinstance(self.start_date, Unset): + start_date = UNSET + elif isinstance(self.start_date, datetime.datetime): + start_date = self.start_date.isoformat() + else: + start_date = self.start_date + + end_date: None | str | Unset + if isinstance(self.end_date, Unset): + end_date = UNSET + elif isinstance(self.end_date, datetime.datetime): + end_date = self.end_date.isoformat() + else: + end_date = self.end_date + + beam_line_name: None | str | Unset + if isinstance(self.beam_line_name, Unset): + beam_line_name = UNSET + else: + beam_line_name = self.beam_line_name + + scheduled: int | None | Unset + if isinstance(self.scheduled, Unset): + scheduled = UNSET + else: + scheduled = self.scheduled + + nb_shifts: int | None | Unset + if isinstance(self.nb_shifts, Unset): + nb_shifts = UNSET + else: + nb_shifts = self.nb_shifts + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + visit_number: int | None | Unset + if isinstance(self.visit_number, Unset): + visit_number = UNSET + else: + visit_number = self.visit_number + + used_flag: int | None | Unset + if isinstance(self.used_flag, Unset): + used_flag = UNSET + else: + used_flag = self.used_flag + + last_update: None | str | Unset + if isinstance(self.last_update, Unset): + last_update = UNSET + elif isinstance(self.last_update, datetime.datetime): + last_update = self.last_update.isoformat() + else: + last_update = self.last_update + + parent_proposal: None | str | Unset + if isinstance(self.parent_proposal, Unset): + parent_proposal = UNSET + else: + parent_proposal = self.parent_proposal + + beam_line_operator: list[str] | None | Unset + if isinstance(self.beam_line_operator, Unset): + beam_line_operator = UNSET + elif isinstance(self.beam_line_operator, list): + beam_line_operator = self.beam_line_operator + + else: + beam_line_operator = self.beam_line_operator + + collection_groups: int | None | Unset + if isinstance(self.collection_groups, Unset): + collection_groups = UNSET + else: + collection_groups = self.collection_groups + + users: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.users, Unset): + users = [] + for users_item_data in self.users: + users_item = users_item_data.to_dict() + users.append(users_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "proposalId": proposal_id, + "sessionId": session_id, + "bltimeStamp": bltime_stamp, + "purgedProcessedData": purged_processed_data, + "archived": archived, + "active": active, + } + ) + if beam_line_setup_id is not UNSET: + field_dict["beamLineSetupId"] = beam_line_setup_id + if beam_calendar_id is not UNSET: + field_dict["beamCalendarId"] = beam_calendar_id + if start_date is not UNSET: + field_dict["startDate"] = start_date + if end_date is not UNSET: + field_dict["endDate"] = end_date + if beam_line_name is not UNSET: + field_dict["beamLineName"] = beam_line_name + if scheduled is not UNSET: + field_dict["scheduled"] = scheduled + if nb_shifts is not UNSET: + field_dict["nbShifts"] = nb_shifts + if comments is not UNSET: + field_dict["comments"] = comments + if visit_number is not UNSET: + field_dict["visitNumber"] = visit_number + if used_flag is not UNSET: + field_dict["usedFlag"] = used_flag + if last_update is not UNSET: + field_dict["lastUpdate"] = last_update + if parent_proposal is not UNSET: + field_dict["parentProposal"] = parent_proposal + if beam_line_operator is not UNSET: + field_dict["beamLineOperator"] = beam_line_operator + if collection_groups is not UNSET: + field_dict["collectionGroups"] = collection_groups + if users is not UNSET: + field_dict["users"] = users + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.person_out import PersonOut # noqa: PLC0415 + + d = dict(src_dict) + proposal_id = d.pop("proposalId") + + session_id = d.pop("sessionId") + + bltime_stamp = datetime.datetime.fromisoformat(d.pop("bltimeStamp")) + + purged_processed_data = d.pop("purgedProcessedData") + + archived = d.pop("archived") + + active = d.pop("active") + + def _parse_beam_line_setup_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + beam_line_setup_id = _parse_beam_line_setup_id(d.pop("beamLineSetupId", UNSET)) + + def _parse_beam_calendar_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + beam_calendar_id = _parse_beam_calendar_id(d.pop("beamCalendarId", UNSET)) + + def _parse_start_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + start_date_type_0 = datetime.datetime.fromisoformat(data) + + return start_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + start_date = _parse_start_date(d.pop("startDate", UNSET)) + + def _parse_end_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + end_date_type_0 = datetime.datetime.fromisoformat(data) + + return end_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + end_date = _parse_end_date(d.pop("endDate", UNSET)) + + def _parse_beam_line_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + beam_line_name = _parse_beam_line_name(d.pop("beamLineName", UNSET)) + + def _parse_scheduled(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + scheduled = _parse_scheduled(d.pop("scheduled", UNSET)) + + def _parse_nb_shifts(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + nb_shifts = _parse_nb_shifts(d.pop("nbShifts", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_visit_number(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + visit_number = _parse_visit_number(d.pop("visitNumber", UNSET)) + + def _parse_used_flag(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + used_flag = _parse_used_flag(d.pop("usedFlag", UNSET)) + + def _parse_last_update(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + last_update_type_0 = datetime.datetime.fromisoformat(data) + + return last_update_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + last_update = _parse_last_update(d.pop("lastUpdate", UNSET)) + + def _parse_parent_proposal(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + parent_proposal = _parse_parent_proposal(d.pop("parentProposal", UNSET)) + + def _parse_beam_line_operator(data: object) -> list[str] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + beam_line_operator_type_0 = cast(list[str], data) + + return beam_line_operator_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + beam_line_operator = _parse_beam_line_operator(d.pop("beamLineOperator", UNSET)) + + def _parse_collection_groups(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + collection_groups = _parse_collection_groups(d.pop("collectionGroups", UNSET)) + + _users = d.pop("users", UNSET) + users: list[PersonOut] | Unset = UNSET + if _users is not UNSET: + users = [] + for users_item_data in _users: + users_item = PersonOut.from_dict(users_item_data) + + users.append(users_item) + + session_out = cls( + proposal_id=proposal_id, + session_id=session_id, + bltime_stamp=bltime_stamp, + purged_processed_data=purged_processed_data, + archived=archived, + active=active, + beam_line_setup_id=beam_line_setup_id, + beam_calendar_id=beam_calendar_id, + start_date=start_date, + end_date=end_date, + beam_line_name=beam_line_name, + scheduled=scheduled, + nb_shifts=nb_shifts, + comments=comments, + visit_number=visit_number, + used_flag=used_flag, + last_update=last_update, + parent_proposal=parent_proposal, + beam_line_operator=beam_line_operator, + collection_groups=collection_groups, + users=users, + ) + + session_out.additional_properties = d + return session_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_type_in.py b/src/lims_utils/expeye_client/models/session_type_in.py new file mode 100644 index 0000000..d4920f6 --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_type_in.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SessionTypeIn") + + +@_attrs_define +class SessionTypeIn: + """ + Attributes: + type_name (str): + """ + + type_name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_name = self.type_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "typeName": type_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_name = d.pop("typeName") + + session_type_in = cls( + type_name=type_name, + ) + + session_type_in.additional_properties = d + return session_type_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/session_type_out.py b/src/lims_utils/expeye_client/models/session_type_out.py new file mode 100644 index 0000000..4147574 --- /dev/null +++ b/src/lims_utils/expeye_client/models/session_type_out.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="SessionTypeOut") + + +@_attrs_define +class SessionTypeOut: + """ + Attributes: + type_name (str): + session_id (int): + session_type_id (int): + """ + + type_name: str + session_id: int + session_type_id: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + type_name = self.type_name + + session_id = self.session_id + + session_type_id = self.session_type_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "typeName": type_name, + "sessionId": session_id, + "sessionTypeId": session_type_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_name = d.pop("typeName") + + session_id = d.pop("sessionId") + + session_type_id = d.pop("sessionTypeId") + + session_type_out = cls( + type_name=type_name, + session_id=session_id, + session_type_id=session_type_id, + ) + + session_type_out.additional_properties = d + return session_type_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_in.py b/src/lims_utils/expeye_client/models/shipment_in.py new file mode 100644 index 0000000..9373159 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_in.py @@ -0,0 +1,244 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..models.shipment_safety_levels import ShipmentSafetyLevels +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 + + +T = TypeVar("T", bound="ShipmentIn") + + +@_attrs_define +class ShipmentIn: + """ + Attributes: + creation_date (datetime.datetime | None | Unset): + shipping_name (None | str | Unset): + extra (None | ShipmentInExtraType0Type0 | str | Unset): + comments (None | str | Unset): + shipping_status (None | str | Unset): + source (None | str | Unset): + safety_level (None | SafetyLevels | ShipmentSafetyLevels | Unset): + """ + + creation_date: datetime.datetime | None | Unset = UNSET + shipping_name: None | str | Unset = UNSET + extra: None | ShipmentInExtraType0Type0 | str | Unset = UNSET + comments: None | str | Unset = UNSET + shipping_status: None | str | Unset = UNSET + source: None | str | Unset = UNSET + safety_level: None | SafetyLevels | ShipmentSafetyLevels | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 # noqa: PLC0415 + + creation_date: None | str | Unset + if isinstance(self.creation_date, Unset): + creation_date = UNSET + elif isinstance(self.creation_date, datetime.datetime): + creation_date = self.creation_date.isoformat() + else: + creation_date = self.creation_date + + shipping_name: None | str | Unset + if isinstance(self.shipping_name, Unset): + shipping_name = UNSET + else: + shipping_name = self.shipping_name + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, ShipmentInExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + shipping_status: None | str | Unset + if isinstance(self.shipping_status, Unset): + shipping_status = UNSET + else: + shipping_status = self.shipping_status + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + elif isinstance(self.safety_level, ShipmentSafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if creation_date is not UNSET: + field_dict["creationDate"] = creation_date + if shipping_name is not UNSET: + field_dict["shippingName"] = shipping_name + if extra is not UNSET: + field_dict["extra"] = extra + if comments is not UNSET: + field_dict["comments"] = comments + if shipping_status is not UNSET: + field_dict["shippingStatus"] = shipping_status + if source is not UNSET: + field_dict["source"] = source + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_creation_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + creation_date_type_0 = datetime.datetime.fromisoformat(data) + + return creation_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + creation_date = _parse_creation_date(d.pop("creationDate", UNSET)) + + def _parse_shipping_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_name = _parse_shipping_name(d.pop("shippingName", UNSET)) + + def _parse_extra(data: object) -> None | ShipmentInExtraType0Type0 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = ShipmentInExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ShipmentInExtraType0Type0 | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_shipping_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_status = _parse_shipping_status(d.pop("shippingStatus", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | ShipmentSafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_1 = ShipmentSafetyLevels(data) + + return safety_level_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | ShipmentSafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + shipment_in = cls( + creation_date=creation_date, + shipping_name=shipping_name, + extra=extra, + comments=comments, + shipping_status=shipping_status, + source=source, + safety_level=safety_level, + ) + + shipment_in.additional_properties = d + return shipment_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_in_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/shipment_in_extra_type_0_type_0.py new file mode 100644 index 0000000..f8be990 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_in_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ShipmentInExtraType0Type0") + + +@_attrs_define +class ShipmentInExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + shipment_in_extra_type_0_type_0 = cls() + + shipment_in_extra_type_0_type_0.additional_properties = d + return shipment_in_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_optional.py b/src/lims_utils/expeye_client/models/shipment_optional.py new file mode 100644 index 0000000..67678bb --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_optional.py @@ -0,0 +1,244 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..models.shipment_safety_levels import ShipmentSafetyLevels +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 + + +T = TypeVar("T", bound="ShipmentOptional") + + +@_attrs_define +class ShipmentOptional: + """ + Attributes: + creation_date (datetime.datetime | None | Unset): + shipping_name (None | str | Unset): + extra (None | ShipmentOptionalExtraType0Type0 | str | Unset): + comments (None | str | Unset): + shipping_status (None | str | Unset): + source (None | str | Unset): + safety_level (None | SafetyLevels | ShipmentSafetyLevels | Unset): + """ + + creation_date: datetime.datetime | None | Unset = UNSET + shipping_name: None | str | Unset = UNSET + extra: None | ShipmentOptionalExtraType0Type0 | str | Unset = UNSET + comments: None | str | Unset = UNSET + shipping_status: None | str | Unset = UNSET + source: None | str | Unset = UNSET + safety_level: None | SafetyLevels | ShipmentSafetyLevels | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 # noqa: PLC0415 + + creation_date: None | str | Unset + if isinstance(self.creation_date, Unset): + creation_date = UNSET + elif isinstance(self.creation_date, datetime.datetime): + creation_date = self.creation_date.isoformat() + else: + creation_date = self.creation_date + + shipping_name: None | str | Unset + if isinstance(self.shipping_name, Unset): + shipping_name = UNSET + else: + shipping_name = self.shipping_name + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, ShipmentOptionalExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + shipping_status: None | str | Unset + if isinstance(self.shipping_status, Unset): + shipping_status = UNSET + else: + shipping_status = self.shipping_status + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + elif isinstance(self.safety_level, ShipmentSafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if creation_date is not UNSET: + field_dict["creationDate"] = creation_date + if shipping_name is not UNSET: + field_dict["shippingName"] = shipping_name + if extra is not UNSET: + field_dict["extra"] = extra + if comments is not UNSET: + field_dict["comments"] = comments + if shipping_status is not UNSET: + field_dict["shippingStatus"] = shipping_status + if source is not UNSET: + field_dict["source"] = source + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + + def _parse_creation_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + creation_date_type_0 = datetime.datetime.fromisoformat(data) + + return creation_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + creation_date = _parse_creation_date(d.pop("creationDate", UNSET)) + + def _parse_shipping_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_name = _parse_shipping_name(d.pop("shippingName", UNSET)) + + def _parse_extra(data: object) -> None | ShipmentOptionalExtraType0Type0 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = ShipmentOptionalExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ShipmentOptionalExtraType0Type0 | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_shipping_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_status = _parse_shipping_status(d.pop("shippingStatus", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | ShipmentSafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_1 = ShipmentSafetyLevels(data) + + return safety_level_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | ShipmentSafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + shipment_optional = cls( + creation_date=creation_date, + shipping_name=shipping_name, + extra=extra, + comments=comments, + shipping_status=shipping_status, + source=source, + safety_level=safety_level, + ) + + shipment_optional.additional_properties = d + return shipment_optional + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_optional_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/shipment_optional_extra_type_0_type_0.py new file mode 100644 index 0000000..65de5cb --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_optional_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ShipmentOptionalExtraType0Type0") + + +@_attrs_define +class ShipmentOptionalExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + shipment_optional_extra_type_0_type_0 = cls() + + shipment_optional_extra_type_0_type_0.additional_properties = d + return shipment_optional_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_out.py b/src/lims_utils/expeye_client/models/shipment_out.py new file mode 100644 index 0000000..95286a8 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_out.py @@ -0,0 +1,274 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..models.shipment_safety_levels import ShipmentSafetyLevels +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 + + +T = TypeVar("T", bound="ShipmentOut") + + +@_attrs_define +class ShipmentOut: + """ + Attributes: + shipping_id (int): + creation_date (datetime.datetime | None | Unset): + shipping_name (None | str | Unset): + extra (None | ShipmentOutExtraType0Type0 | str | Unset): + comments (None | str | Unset): + shipping_status (None | str | Unset): + source (None | str | Unset): + safety_level (None | SafetyLevels | ShipmentSafetyLevels | Unset): + protein_id (int | None | Unset): + """ + + shipping_id: int + creation_date: datetime.datetime | None | Unset = UNSET + shipping_name: None | str | Unset = UNSET + extra: None | ShipmentOutExtraType0Type0 | str | Unset = UNSET + comments: None | str | Unset = UNSET + shipping_status: None | str | Unset = UNSET + source: None | str | Unset = UNSET + safety_level: None | SafetyLevels | ShipmentSafetyLevels | Unset = UNSET + protein_id: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 # noqa: PLC0415 + + shipping_id = self.shipping_id + + creation_date: None | str | Unset + if isinstance(self.creation_date, Unset): + creation_date = UNSET + elif isinstance(self.creation_date, datetime.datetime): + creation_date = self.creation_date.isoformat() + else: + creation_date = self.creation_date + + shipping_name: None | str | Unset + if isinstance(self.shipping_name, Unset): + shipping_name = UNSET + else: + shipping_name = self.shipping_name + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, ShipmentOutExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + shipping_status: None | str | Unset + if isinstance(self.shipping_status, Unset): + shipping_status = UNSET + else: + shipping_status = self.shipping_status + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + elif isinstance(self.safety_level, ShipmentSafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + protein_id: int | None | Unset + if isinstance(self.protein_id, Unset): + protein_id = UNSET + else: + protein_id = self.protein_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "shippingId": shipping_id, + } + ) + if creation_date is not UNSET: + field_dict["creationDate"] = creation_date + if shipping_name is not UNSET: + field_dict["shippingName"] = shipping_name + if extra is not UNSET: + field_dict["extra"] = extra + if comments is not UNSET: + field_dict["comments"] = comments + if shipping_status is not UNSET: + field_dict["shippingStatus"] = shipping_status + if source is not UNSET: + field_dict["source"] = source + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + if protein_id is not UNSET: + field_dict["proteinId"] = protein_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + shipping_id = d.pop("shippingId") + + def _parse_creation_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + creation_date_type_0 = datetime.datetime.fromisoformat(data) + + return creation_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + creation_date = _parse_creation_date(d.pop("creationDate", UNSET)) + + def _parse_shipping_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_name = _parse_shipping_name(d.pop("shippingName", UNSET)) + + def _parse_extra(data: object) -> None | ShipmentOutExtraType0Type0 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = ShipmentOutExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ShipmentOutExtraType0Type0 | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_shipping_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_status = _parse_shipping_status(d.pop("shippingStatus", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | ShipmentSafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_1 = ShipmentSafetyLevels(data) + + return safety_level_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | ShipmentSafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + def _parse_protein_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + protein_id = _parse_protein_id(d.pop("proteinId", UNSET)) + + shipment_out = cls( + shipping_id=shipping_id, + creation_date=creation_date, + shipping_name=shipping_name, + extra=extra, + comments=comments, + shipping_status=shipping_status, + source=source, + safety_level=safety_level, + protein_id=protein_id, + ) + + shipment_out.additional_properties = d + return shipment_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_out_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/shipment_out_extra_type_0_type_0.py new file mode 100644 index 0000000..3dd5af1 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_out_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ShipmentOutExtraType0Type0") + + +@_attrs_define +class ShipmentOutExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + shipment_out_extra_type_0_type_0 = cls() + + shipment_out_extra_type_0_type_0.additional_properties = d + return shipment_out_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_safety_levels.py b/src/lims_utils/expeye_client/models/shipment_safety_levels.py new file mode 100644 index 0000000..b3467fe --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_safety_levels.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class ShipmentSafetyLevels(StrEnum): + GREEN = "Green" + RED = "Red" + YELLOW = "Yellow" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/shipment_with_children_in.py b/src/lims_utils/expeye_client/models/shipment_with_children_in.py new file mode 100644 index 0000000..5b570a1 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_with_children_in.py @@ -0,0 +1,264 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..models.shipment_safety_levels import ShipmentSafetyLevels +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dewar_with_children_in import DewarWithChildrenIn + from ..models.shipment_with_children_in_extra_type_0_type_0 import ShipmentWithChildrenInExtraType0Type0 + + +T = TypeVar("T", bound="ShipmentWithChildrenIn") + + +@_attrs_define +class ShipmentWithChildrenIn: + """ + Attributes: + children (list[DewarWithChildrenIn]): + creation_date (datetime.datetime | None | Unset): + shipping_name (None | str | Unset): + extra (None | ShipmentWithChildrenInExtraType0Type0 | str | Unset): + comments (None | str | Unset): + shipping_status (None | str | Unset): + source (None | str | Unset): + safety_level (None | SafetyLevels | ShipmentSafetyLevels | Unset): + """ + + children: list[DewarWithChildrenIn] + creation_date: datetime.datetime | None | Unset = UNSET + shipping_name: None | str | Unset = UNSET + extra: None | ShipmentWithChildrenInExtraType0Type0 | str | Unset = UNSET + comments: None | str | Unset = UNSET + shipping_status: None | str | Unset = UNSET + source: None | str | Unset = UNSET + safety_level: None | SafetyLevels | ShipmentSafetyLevels | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shipment_with_children_in_extra_type_0_type_0 import ShipmentWithChildrenInExtraType0Type0 # noqa: PLC0415 + + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + creation_date: None | str | Unset + if isinstance(self.creation_date, Unset): + creation_date = UNSET + elif isinstance(self.creation_date, datetime.datetime): + creation_date = self.creation_date.isoformat() + else: + creation_date = self.creation_date + + shipping_name: None | str | Unset + if isinstance(self.shipping_name, Unset): + shipping_name = UNSET + else: + shipping_name = self.shipping_name + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, ShipmentWithChildrenInExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + shipping_status: None | str | Unset + if isinstance(self.shipping_status, Unset): + shipping_status = UNSET + else: + shipping_status = self.shipping_status + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + elif isinstance(self.safety_level, ShipmentSafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "children": children, + } + ) + if creation_date is not UNSET: + field_dict["creationDate"] = creation_date + if shipping_name is not UNSET: + field_dict["shippingName"] = shipping_name + if extra is not UNSET: + field_dict["extra"] = extra + if comments is not UNSET: + field_dict["comments"] = comments + if shipping_status is not UNSET: + field_dict["shippingStatus"] = shipping_status + if source is not UNSET: + field_dict["source"] = source + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_with_children_in import DewarWithChildrenIn # noqa: PLC0415 + from ..models.shipment_with_children_in_extra_type_0_type_0 import ShipmentWithChildrenInExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + children = [] + _children = d.pop("children") + for children_item_data in _children: + children_item = DewarWithChildrenIn.from_dict(children_item_data) + + children.append(children_item) + + def _parse_creation_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + creation_date_type_0 = datetime.datetime.fromisoformat(data) + + return creation_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + creation_date = _parse_creation_date(d.pop("creationDate", UNSET)) + + def _parse_shipping_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_name = _parse_shipping_name(d.pop("shippingName", UNSET)) + + def _parse_extra(data: object) -> None | ShipmentWithChildrenInExtraType0Type0 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = ShipmentWithChildrenInExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ShipmentWithChildrenInExtraType0Type0 | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_shipping_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_status = _parse_shipping_status(d.pop("shippingStatus", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | ShipmentSafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_1 = ShipmentSafetyLevels(data) + + return safety_level_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | ShipmentSafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + shipment_with_children_in = cls( + children=children, + creation_date=creation_date, + shipping_name=shipping_name, + extra=extra, + comments=comments, + shipping_status=shipping_status, + source=source, + safety_level=safety_level, + ) + + shipment_with_children_in.additional_properties = d + return shipment_with_children_in + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_with_children_in_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/shipment_with_children_in_extra_type_0_type_0.py new file mode 100644 index 0000000..9d86422 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_with_children_in_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ShipmentWithChildrenInExtraType0Type0") + + +@_attrs_define +class ShipmentWithChildrenInExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + shipment_with_children_in_extra_type_0_type_0 = cls() + + shipment_with_children_in_extra_type_0_type_0.additional_properties = d + return shipment_with_children_in_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_with_children_out.py b/src/lims_utils/expeye_client/models/shipment_with_children_out.py new file mode 100644 index 0000000..5a85d5b --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_with_children_out.py @@ -0,0 +1,297 @@ +from __future__ import annotations + +import datetime +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.safety_levels import SafetyLevels +from ..models.shipment_safety_levels import ShipmentSafetyLevels +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dewar_with_children_out import DewarWithChildrenOut + from ..models.shipment_with_children_out_extra_type_0_type_0 import ShipmentWithChildrenOutExtraType0Type0 + + +T = TypeVar("T", bound="ShipmentWithChildrenOut") + + +@_attrs_define +class ShipmentWithChildrenOut: + """ + Attributes: + shipping_id (int): + creation_date (datetime.datetime | None | Unset): + shipping_name (None | str | Unset): + extra (None | ShipmentWithChildrenOutExtraType0Type0 | str | Unset): + comments (None | str | Unset): + shipping_status (None | str | Unset): + source (None | str | Unset): + safety_level (None | SafetyLevels | ShipmentSafetyLevels | Unset): + protein_id (int | None | Unset): + children (list[DewarWithChildrenOut] | Unset): + """ + + shipping_id: int + creation_date: datetime.datetime | None | Unset = UNSET + shipping_name: None | str | Unset = UNSET + extra: None | ShipmentWithChildrenOutExtraType0Type0 | str | Unset = UNSET + comments: None | str | Unset = UNSET + shipping_status: None | str | Unset = UNSET + source: None | str | Unset = UNSET + safety_level: None | SafetyLevels | ShipmentSafetyLevels | Unset = UNSET + protein_id: int | None | Unset = UNSET + children: list[DewarWithChildrenOut] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shipment_with_children_out_extra_type_0_type_0 import ShipmentWithChildrenOutExtraType0Type0 # noqa: PLC0415 + + shipping_id = self.shipping_id + + creation_date: None | str | Unset + if isinstance(self.creation_date, Unset): + creation_date = UNSET + elif isinstance(self.creation_date, datetime.datetime): + creation_date = self.creation_date.isoformat() + else: + creation_date = self.creation_date + + shipping_name: None | str | Unset + if isinstance(self.shipping_name, Unset): + shipping_name = UNSET + else: + shipping_name = self.shipping_name + + extra: dict[str, Any] | None | str | Unset + if isinstance(self.extra, Unset): + extra = UNSET + elif isinstance(self.extra, ShipmentWithChildrenOutExtraType0Type0): + extra = self.extra.to_dict() + else: + extra = self.extra + + comments: None | str | Unset + if isinstance(self.comments, Unset): + comments = UNSET + else: + comments = self.comments + + shipping_status: None | str | Unset + if isinstance(self.shipping_status, Unset): + shipping_status = UNSET + else: + shipping_status = self.shipping_status + + source: None | str | Unset + if isinstance(self.source, Unset): + source = UNSET + else: + source = self.source + + safety_level: None | str | Unset + if isinstance(self.safety_level, Unset): + safety_level = UNSET + elif isinstance(self.safety_level, SafetyLevels): + safety_level = self.safety_level.value + elif isinstance(self.safety_level, ShipmentSafetyLevels): + safety_level = self.safety_level.value + else: + safety_level = self.safety_level + + protein_id: int | None | Unset + if isinstance(self.protein_id, Unset): + protein_id = UNSET + else: + protein_id = self.protein_id + + children: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.children, Unset): + children = [] + for children_item_data in self.children: + children_item = children_item_data.to_dict() + children.append(children_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "shippingId": shipping_id, + } + ) + if creation_date is not UNSET: + field_dict["creationDate"] = creation_date + if shipping_name is not UNSET: + field_dict["shippingName"] = shipping_name + if extra is not UNSET: + field_dict["extra"] = extra + if comments is not UNSET: + field_dict["comments"] = comments + if shipping_status is not UNSET: + field_dict["shippingStatus"] = shipping_status + if source is not UNSET: + field_dict["source"] = source + if safety_level is not UNSET: + field_dict["safetyLevel"] = safety_level + if protein_id is not UNSET: + field_dict["proteinId"] = protein_id + if children is not UNSET: + field_dict["children"] = children + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.dewar_with_children_out import DewarWithChildrenOut # noqa: PLC0415 + from ..models.shipment_with_children_out_extra_type_0_type_0 import ShipmentWithChildrenOutExtraType0Type0 # noqa: PLC0415 + + d = dict(src_dict) + shipping_id = d.pop("shippingId") + + def _parse_creation_date(data: object) -> datetime.datetime | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + creation_date_type_0 = datetime.datetime.fromisoformat(data) + + return creation_date_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) + + creation_date = _parse_creation_date(d.pop("creationDate", UNSET)) + + def _parse_shipping_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_name = _parse_shipping_name(d.pop("shippingName", UNSET)) + + def _parse_extra(data: object) -> None | ShipmentWithChildrenOutExtraType0Type0 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + extra_type_0_type_0 = ShipmentWithChildrenOutExtraType0Type0.from_dict(data) + + return extra_type_0_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | ShipmentWithChildrenOutExtraType0Type0 | str | Unset, data) + + extra = _parse_extra(d.pop("extra", UNSET)) + + def _parse_comments(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + comments = _parse_comments(d.pop("comments", UNSET)) + + def _parse_shipping_status(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shipping_status = _parse_shipping_status(d.pop("shippingStatus", UNSET)) + + def _parse_source(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + source = _parse_source(d.pop("source", UNSET)) + + def _parse_safety_level(data: object) -> None | SafetyLevels | ShipmentSafetyLevels | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_0 = SafetyLevels(data) + + return safety_level_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, str): + raise TypeError() + safety_level_type_1 = ShipmentSafetyLevels(data) + + return safety_level_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | SafetyLevels | ShipmentSafetyLevels | Unset, data) + + safety_level = _parse_safety_level(d.pop("safetyLevel", UNSET)) + + def _parse_protein_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + protein_id = _parse_protein_id(d.pop("proteinId", UNSET)) + + _children = d.pop("children", UNSET) + children: list[DewarWithChildrenOut] | Unset = UNSET + if _children is not UNSET: + children = [] + for children_item_data in _children: + children_item = DewarWithChildrenOut.from_dict(children_item_data) + + children.append(children_item) + + shipment_with_children_out = cls( + shipping_id=shipping_id, + creation_date=creation_date, + shipping_name=shipping_name, + extra=extra, + comments=comments, + shipping_status=shipping_status, + source=source, + safety_level=safety_level, + protein_id=protein_id, + children=children, + ) + + shipment_with_children_out.additional_properties = d + return shipment_with_children_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipment_with_children_out_extra_type_0_type_0.py b/src/lims_utils/expeye_client/models/shipment_with_children_out_extra_type_0_type_0.py new file mode 100644 index 0000000..7754b76 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipment_with_children_out_extra_type_0_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ShipmentWithChildrenOutExtraType0Type0") + + +@_attrs_define +class ShipmentWithChildrenOutExtraType0Type0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + shipment_with_children_out_extra_type_0_type_0 = cls() + + shipment_with_children_out_extra_type_0_type_0.additional_properties = d + return shipment_with_children_out_extra_type_0_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/shipping_data_out.py b/src/lims_utils/expeye_client/models/shipping_data_out.py new file mode 100644 index 0000000..b16ff94 --- /dev/null +++ b/src/lims_utils/expeye_client/models/shipping_data_out.py @@ -0,0 +1,129 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.lab_contact_out import LabContactOut + from ..models.protein_out import ProteinOut + from ..models.registered_container_out import RegisteredContainerOut + from ..models.registered_dewar_out import RegisteredDewarOut + + +T = TypeVar("T", bound="ShippingDataOut") + + +@_attrs_define +class ShippingDataOut: + """ + Attributes: + lab_contacts (list[LabContactOut]): + proteins (list[ProteinOut]): + containers (list[RegisteredContainerOut]): + dewars (list[RegisteredDewarOut]): + """ + + lab_contacts: list[LabContactOut] + proteins: list[ProteinOut] + containers: list[RegisteredContainerOut] + dewars: list[RegisteredDewarOut] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + lab_contacts = [] + for lab_contacts_item_data in self.lab_contacts: + lab_contacts_item = lab_contacts_item_data.to_dict() + lab_contacts.append(lab_contacts_item) + + proteins = [] + for proteins_item_data in self.proteins: + proteins_item = proteins_item_data.to_dict() + proteins.append(proteins_item) + + containers = [] + for containers_item_data in self.containers: + containers_item = containers_item_data.to_dict() + containers.append(containers_item) + + dewars = [] + for dewars_item_data in self.dewars: + dewars_item = dewars_item_data.to_dict() + dewars.append(dewars_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "labContacts": lab_contacts, + "proteins": proteins, + "containers": containers, + "dewars": dewars, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.lab_contact_out import LabContactOut # noqa: PLC0415 + from ..models.protein_out import ProteinOut # noqa: PLC0415 + from ..models.registered_container_out import RegisteredContainerOut # noqa: PLC0415 + from ..models.registered_dewar_out import RegisteredDewarOut # noqa: PLC0415 + + d = dict(src_dict) + lab_contacts = [] + _lab_contacts = d.pop("labContacts") + for lab_contacts_item_data in _lab_contacts: + lab_contacts_item = LabContactOut.from_dict(lab_contacts_item_data) + + lab_contacts.append(lab_contacts_item) + + proteins = [] + _proteins = d.pop("proteins") + for proteins_item_data in _proteins: + proteins_item = ProteinOut.from_dict(proteins_item_data) + + proteins.append(proteins_item) + + containers = [] + _containers = d.pop("containers") + for containers_item_data in _containers: + containers_item = RegisteredContainerOut.from_dict(containers_item_data) + + containers.append(containers_item) + + dewars = [] + _dewars = d.pop("dewars") + for dewars_item_data in _dewars: + dewars_item = RegisteredDewarOut.from_dict(dewars_item_data) + + dewars.append(dewars_item) + + shipping_data_out = cls( + lab_contacts=lab_contacts, + proteins=proteins, + containers=containers, + dewars=dewars, + ) + + shipping_data_out.additional_properties = d + return shipping_data_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/state_enum.py b/src/lims_utils/expeye_client/models/state_enum.py new file mode 100644 index 0000000..ae80310 --- /dev/null +++ b/src/lims_utils/expeye_client/models/state_enum.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class StateEnum(StrEnum): + CANCELLED = "Cancelled" + CLOSED = "Closed" + OPEN = "Open" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/strategy_option.py b/src/lims_utils/expeye_client/models/strategy_option.py new file mode 100644 index 0000000..956b0d1 --- /dev/null +++ b/src/lims_utils/expeye_client/models/strategy_option.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.strategy_option_screen_type_0 import StrategyOptionScreenType0 +from ..types import UNSET, Unset + +T = TypeVar("T", bound="StrategyOption") + + +@_attrs_define +class StrategyOption: + """ + Attributes: + screen (None | StrategyOptionScreenType0 | Unset): + collect_samples (int | None | Unset): + sample_group (None | str | Unset): + """ + + screen: None | StrategyOptionScreenType0 | Unset = UNSET + collect_samples: int | None | Unset = UNSET + sample_group: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + screen: None | str | Unset + if isinstance(self.screen, Unset): + screen = UNSET + elif isinstance(self.screen, StrategyOptionScreenType0): + screen = self.screen.value + else: + screen = self.screen + + collect_samples: int | None | Unset + if isinstance(self.collect_samples, Unset): + collect_samples = UNSET + else: + collect_samples = self.collect_samples + + sample_group: None | str | Unset + if isinstance(self.sample_group, Unset): + sample_group = UNSET + else: + sample_group = self.sample_group + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if screen is not UNSET: + field_dict["screen"] = screen + if collect_samples is not UNSET: + field_dict["collect_samples"] = collect_samples + if sample_group is not UNSET: + field_dict["sample_group"] = sample_group + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_screen(data: object) -> None | StrategyOptionScreenType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + screen_type_0 = StrategyOptionScreenType0(data) + + return screen_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | StrategyOptionScreenType0 | Unset, data) + + screen = _parse_screen(d.pop("screen", UNSET)) + + def _parse_collect_samples(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + collect_samples = _parse_collect_samples(d.pop("collect_samples", UNSET)) + + def _parse_sample_group(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + sample_group = _parse_sample_group(d.pop("sample_group", UNSET)) + + strategy_option = cls( + screen=screen, + collect_samples=collect_samples, + sample_group=sample_group, + ) + + strategy_option.additional_properties = d + return strategy_option + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/strategy_option_screen_type_0.py b/src/lims_utils/expeye_client/models/strategy_option_screen_type_0.py new file mode 100644 index 0000000..521fc89 --- /dev/null +++ b/src/lims_utils/expeye_client/models/strategy_option_screen_type_0.py @@ -0,0 +1,10 @@ +from enum import StrEnum + + +class StrategyOptionScreenType0(StrEnum): + ALL = "all" + BEST = "best" + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/src/lims_utils/expeye_client/models/string_serialised_strategy_option_type_0.py b/src/lims_utils/expeye_client/models/string_serialised_strategy_option_type_0.py new file mode 100644 index 0000000..ac7aa03 --- /dev/null +++ b/src/lims_utils/expeye_client/models/string_serialised_strategy_option_type_0.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="StringSerialisedStrategyOptionType0") + + +@_attrs_define +class StringSerialisedStrategyOptionType0: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + string_serialised_strategy_option_type_0 = cls() + + string_serialised_strategy_option_type_0.additional_properties = d + return string_serialised_strategy_option_type_0 + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/tilt_image_alignment_optional.py b/src/lims_utils/expeye_client/models/tilt_image_alignment_optional.py new file mode 100644 index 0000000..2b94d97 --- /dev/null +++ b/src/lims_utils/expeye_client/models/tilt_image_alignment_optional.py @@ -0,0 +1,234 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TiltImageAlignmentOptional") + + +@_attrs_define +class TiltImageAlignmentOptional: + """ + Attributes: + tomogram_id (int | None | Unset): + defocus_u (float | None | Unset): + defocus_v (float | None | Unset): + psd_file (None | str | Unset): + resolution (float | None | Unset): + fit_quality (float | None | Unset): + refined_magnification (float | None | Unset): + refined_tilt_angle (float | None | Unset): + refined_tilt_axis (float | None | Unset): + residual_error (float | None | Unset): + """ + + tomogram_id: int | None | Unset = UNSET + defocus_u: float | None | Unset = UNSET + defocus_v: float | None | Unset = UNSET + psd_file: None | str | Unset = UNSET + resolution: float | None | Unset = UNSET + fit_quality: float | None | Unset = UNSET + refined_magnification: float | None | Unset = UNSET + refined_tilt_angle: float | None | Unset = UNSET + refined_tilt_axis: float | None | Unset = UNSET + residual_error: float | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + tomogram_id: int | None | Unset + if isinstance(self.tomogram_id, Unset): + tomogram_id = UNSET + else: + tomogram_id = self.tomogram_id + + defocus_u: float | None | Unset + if isinstance(self.defocus_u, Unset): + defocus_u = UNSET + else: + defocus_u = self.defocus_u + + defocus_v: float | None | Unset + if isinstance(self.defocus_v, Unset): + defocus_v = UNSET + else: + defocus_v = self.defocus_v + + psd_file: None | str | Unset + if isinstance(self.psd_file, Unset): + psd_file = UNSET + else: + psd_file = self.psd_file + + resolution: float | None | Unset + if isinstance(self.resolution, Unset): + resolution = UNSET + else: + resolution = self.resolution + + fit_quality: float | None | Unset + if isinstance(self.fit_quality, Unset): + fit_quality = UNSET + else: + fit_quality = self.fit_quality + + refined_magnification: float | None | Unset + if isinstance(self.refined_magnification, Unset): + refined_magnification = UNSET + else: + refined_magnification = self.refined_magnification + + refined_tilt_angle: float | None | Unset + if isinstance(self.refined_tilt_angle, Unset): + refined_tilt_angle = UNSET + else: + refined_tilt_angle = self.refined_tilt_angle + + refined_tilt_axis: float | None | Unset + if isinstance(self.refined_tilt_axis, Unset): + refined_tilt_axis = UNSET + else: + refined_tilt_axis = self.refined_tilt_axis + + residual_error: float | None | Unset + if isinstance(self.residual_error, Unset): + residual_error = UNSET + else: + residual_error = self.residual_error + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if tomogram_id is not UNSET: + field_dict["tomogramId"] = tomogram_id + if defocus_u is not UNSET: + field_dict["defocusU"] = defocus_u + if defocus_v is not UNSET: + field_dict["defocusV"] = defocus_v + if psd_file is not UNSET: + field_dict["psdFile"] = psd_file + if resolution is not UNSET: + field_dict["resolution"] = resolution + if fit_quality is not UNSET: + field_dict["fitQuality"] = fit_quality + if refined_magnification is not UNSET: + field_dict["refinedMagnification"] = refined_magnification + if refined_tilt_angle is not UNSET: + field_dict["refinedTiltAngle"] = refined_tilt_angle + if refined_tilt_axis is not UNSET: + field_dict["refinedTiltAxis"] = refined_tilt_axis + if residual_error is not UNSET: + field_dict["residualError"] = residual_error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_tomogram_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + tomogram_id = _parse_tomogram_id(d.pop("tomogramId", UNSET)) + + def _parse_defocus_u(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_u = _parse_defocus_u(d.pop("defocusU", UNSET)) + + def _parse_defocus_v(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_v = _parse_defocus_v(d.pop("defocusV", UNSET)) + + def _parse_psd_file(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + psd_file = _parse_psd_file(d.pop("psdFile", UNSET)) + + def _parse_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution = _parse_resolution(d.pop("resolution", UNSET)) + + def _parse_fit_quality(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + fit_quality = _parse_fit_quality(d.pop("fitQuality", UNSET)) + + def _parse_refined_magnification(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_magnification = _parse_refined_magnification(d.pop("refinedMagnification", UNSET)) + + def _parse_refined_tilt_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_tilt_angle = _parse_refined_tilt_angle(d.pop("refinedTiltAngle", UNSET)) + + def _parse_refined_tilt_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_tilt_axis = _parse_refined_tilt_axis(d.pop("refinedTiltAxis", UNSET)) + + def _parse_residual_error(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + residual_error = _parse_residual_error(d.pop("residualError", UNSET)) + + tilt_image_alignment_optional = cls( + tomogram_id=tomogram_id, + defocus_u=defocus_u, + defocus_v=defocus_v, + psd_file=psd_file, + resolution=resolution, + fit_quality=fit_quality, + refined_magnification=refined_magnification, + refined_tilt_angle=refined_tilt_angle, + refined_tilt_axis=refined_tilt_axis, + residual_error=residual_error, + ) + + return tilt_image_alignment_optional diff --git a/src/lims_utils/expeye_client/models/tilt_image_alignment_out.py b/src/lims_utils/expeye_client/models/tilt_image_alignment_out.py new file mode 100644 index 0000000..18119ae --- /dev/null +++ b/src/lims_utils/expeye_client/models/tilt_image_alignment_out.py @@ -0,0 +1,232 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TiltImageAlignmentOut") + + +@_attrs_define +class TiltImageAlignmentOut: + """ + Attributes: + tomogram_id (int): + movie_id (int): + defocus_u (float | None | Unset): + defocus_v (float | None | Unset): + psd_file (None | str | Unset): + resolution (float | None | Unset): + fit_quality (float | None | Unset): + refined_magnification (float | None | Unset): + refined_tilt_angle (float | None | Unset): + refined_tilt_axis (float | None | Unset): + residual_error (float | None | Unset): + """ + + tomogram_id: int + movie_id: int + defocus_u: float | None | Unset = UNSET + defocus_v: float | None | Unset = UNSET + psd_file: None | str | Unset = UNSET + resolution: float | None | Unset = UNSET + fit_quality: float | None | Unset = UNSET + refined_magnification: float | None | Unset = UNSET + refined_tilt_angle: float | None | Unset = UNSET + refined_tilt_axis: float | None | Unset = UNSET + residual_error: float | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + tomogram_id = self.tomogram_id + + movie_id = self.movie_id + + defocus_u: float | None | Unset + if isinstance(self.defocus_u, Unset): + defocus_u = UNSET + else: + defocus_u = self.defocus_u + + defocus_v: float | None | Unset + if isinstance(self.defocus_v, Unset): + defocus_v = UNSET + else: + defocus_v = self.defocus_v + + psd_file: None | str | Unset + if isinstance(self.psd_file, Unset): + psd_file = UNSET + else: + psd_file = self.psd_file + + resolution: float | None | Unset + if isinstance(self.resolution, Unset): + resolution = UNSET + else: + resolution = self.resolution + + fit_quality: float | None | Unset + if isinstance(self.fit_quality, Unset): + fit_quality = UNSET + else: + fit_quality = self.fit_quality + + refined_magnification: float | None | Unset + if isinstance(self.refined_magnification, Unset): + refined_magnification = UNSET + else: + refined_magnification = self.refined_magnification + + refined_tilt_angle: float | None | Unset + if isinstance(self.refined_tilt_angle, Unset): + refined_tilt_angle = UNSET + else: + refined_tilt_angle = self.refined_tilt_angle + + refined_tilt_axis: float | None | Unset + if isinstance(self.refined_tilt_axis, Unset): + refined_tilt_axis = UNSET + else: + refined_tilt_axis = self.refined_tilt_axis + + residual_error: float | None | Unset + if isinstance(self.residual_error, Unset): + residual_error = UNSET + else: + residual_error = self.residual_error + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "tomogramId": tomogram_id, + "movieId": movie_id, + } + ) + if defocus_u is not UNSET: + field_dict["defocusU"] = defocus_u + if defocus_v is not UNSET: + field_dict["defocusV"] = defocus_v + if psd_file is not UNSET: + field_dict["psdFile"] = psd_file + if resolution is not UNSET: + field_dict["resolution"] = resolution + if fit_quality is not UNSET: + field_dict["fitQuality"] = fit_quality + if refined_magnification is not UNSET: + field_dict["refinedMagnification"] = refined_magnification + if refined_tilt_angle is not UNSET: + field_dict["refinedTiltAngle"] = refined_tilt_angle + if refined_tilt_axis is not UNSET: + field_dict["refinedTiltAxis"] = refined_tilt_axis + if residual_error is not UNSET: + field_dict["residualError"] = residual_error + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + tomogram_id = d.pop("tomogramId") + + movie_id = d.pop("movieId") + + def _parse_defocus_u(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_u = _parse_defocus_u(d.pop("defocusU", UNSET)) + + def _parse_defocus_v(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + defocus_v = _parse_defocus_v(d.pop("defocusV", UNSET)) + + def _parse_psd_file(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + psd_file = _parse_psd_file(d.pop("psdFile", UNSET)) + + def _parse_resolution(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + resolution = _parse_resolution(d.pop("resolution", UNSET)) + + def _parse_fit_quality(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + fit_quality = _parse_fit_quality(d.pop("fitQuality", UNSET)) + + def _parse_refined_magnification(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_magnification = _parse_refined_magnification(d.pop("refinedMagnification", UNSET)) + + def _parse_refined_tilt_angle(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_tilt_angle = _parse_refined_tilt_angle(d.pop("refinedTiltAngle", UNSET)) + + def _parse_refined_tilt_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_tilt_axis = _parse_refined_tilt_axis(d.pop("refinedTiltAxis", UNSET)) + + def _parse_residual_error(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + residual_error = _parse_residual_error(d.pop("residualError", UNSET)) + + tilt_image_alignment_out = cls( + tomogram_id=tomogram_id, + movie_id=movie_id, + defocus_u=defocus_u, + defocus_v=defocus_v, + psd_file=psd_file, + resolution=resolution, + fit_quality=fit_quality, + refined_magnification=refined_magnification, + refined_tilt_angle=refined_tilt_angle, + refined_tilt_axis=refined_tilt_axis, + residual_error=residual_error, + ) + + return tilt_image_alignment_out diff --git a/src/lims_utils/expeye_client/models/tomogram_out.py b/src/lims_utils/expeye_client/models/tomogram_out.py new file mode 100644 index 0000000..dbe7471 --- /dev/null +++ b/src/lims_utils/expeye_client/models/tomogram_out.py @@ -0,0 +1,432 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, cast + +from attrs import define as _attrs_define + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TomogramOut") + + +@_attrs_define +class TomogramOut: + """ + Attributes: + data_collection_id (int): + tomogram_id (int): + grid_square_id (int | None | Unset): + volume_file (None | str | Unset): + stack_file (None | str | Unset): + file_directory (None | str | Unset): + central_slice_image (None | str | Unset): + size_x (int | None | Unset): + size_y (int | None | Unset): + size_z (int | None | Unset): + pixel_location_x (int | None | Unset): + pixel_location_y (int | None | Unset): + pixel_spacing (float | None | Unset): + residual_error_mean (float | None | Unset): + residual_error_sd (float | None | Unset): + x_axis_correction (float | None | Unset): + tilt_angle_offset (float | None | Unset): + z_shift (float | None | Unset): + refined_tilt_axis (float | None | Unset): + global_alignment_quality (float | None | Unset): + title (None | str | Unset): + """ + + data_collection_id: int + tomogram_id: int + grid_square_id: int | None | Unset = UNSET + volume_file: None | str | Unset = UNSET + stack_file: None | str | Unset = UNSET + file_directory: None | str | Unset = UNSET + central_slice_image: None | str | Unset = UNSET + size_x: int | None | Unset = UNSET + size_y: int | None | Unset = UNSET + size_z: int | None | Unset = UNSET + pixel_location_x: int | None | Unset = UNSET + pixel_location_y: int | None | Unset = UNSET + pixel_spacing: float | None | Unset = UNSET + residual_error_mean: float | None | Unset = UNSET + residual_error_sd: float | None | Unset = UNSET + x_axis_correction: float | None | Unset = UNSET + tilt_angle_offset: float | None | Unset = UNSET + z_shift: float | None | Unset = UNSET + refined_tilt_axis: float | None | Unset = UNSET + global_alignment_quality: float | None | Unset = UNSET + title: None | str | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + data_collection_id = self.data_collection_id + + tomogram_id = self.tomogram_id + + grid_square_id: int | None | Unset + if isinstance(self.grid_square_id, Unset): + grid_square_id = UNSET + else: + grid_square_id = self.grid_square_id + + volume_file: None | str | Unset + if isinstance(self.volume_file, Unset): + volume_file = UNSET + else: + volume_file = self.volume_file + + stack_file: None | str | Unset + if isinstance(self.stack_file, Unset): + stack_file = UNSET + else: + stack_file = self.stack_file + + file_directory: None | str | Unset + if isinstance(self.file_directory, Unset): + file_directory = UNSET + else: + file_directory = self.file_directory + + central_slice_image: None | str | Unset + if isinstance(self.central_slice_image, Unset): + central_slice_image = UNSET + else: + central_slice_image = self.central_slice_image + + size_x: int | None | Unset + if isinstance(self.size_x, Unset): + size_x = UNSET + else: + size_x = self.size_x + + size_y: int | None | Unset + if isinstance(self.size_y, Unset): + size_y = UNSET + else: + size_y = self.size_y + + size_z: int | None | Unset + if isinstance(self.size_z, Unset): + size_z = UNSET + else: + size_z = self.size_z + + pixel_location_x: int | None | Unset + if isinstance(self.pixel_location_x, Unset): + pixel_location_x = UNSET + else: + pixel_location_x = self.pixel_location_x + + pixel_location_y: int | None | Unset + if isinstance(self.pixel_location_y, Unset): + pixel_location_y = UNSET + else: + pixel_location_y = self.pixel_location_y + + pixel_spacing: float | None | Unset + if isinstance(self.pixel_spacing, Unset): + pixel_spacing = UNSET + else: + pixel_spacing = self.pixel_spacing + + residual_error_mean: float | None | Unset + if isinstance(self.residual_error_mean, Unset): + residual_error_mean = UNSET + else: + residual_error_mean = self.residual_error_mean + + residual_error_sd: float | None | Unset + if isinstance(self.residual_error_sd, Unset): + residual_error_sd = UNSET + else: + residual_error_sd = self.residual_error_sd + + x_axis_correction: float | None | Unset + if isinstance(self.x_axis_correction, Unset): + x_axis_correction = UNSET + else: + x_axis_correction = self.x_axis_correction + + tilt_angle_offset: float | None | Unset + if isinstance(self.tilt_angle_offset, Unset): + tilt_angle_offset = UNSET + else: + tilt_angle_offset = self.tilt_angle_offset + + z_shift: float | None | Unset + if isinstance(self.z_shift, Unset): + z_shift = UNSET + else: + z_shift = self.z_shift + + refined_tilt_axis: float | None | Unset + if isinstance(self.refined_tilt_axis, Unset): + refined_tilt_axis = UNSET + else: + refined_tilt_axis = self.refined_tilt_axis + + global_alignment_quality: float | None | Unset + if isinstance(self.global_alignment_quality, Unset): + global_alignment_quality = UNSET + else: + global_alignment_quality = self.global_alignment_quality + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "dataCollectionId": data_collection_id, + "tomogramId": tomogram_id, + } + ) + if grid_square_id is not UNSET: + field_dict["gridSquareId"] = grid_square_id + if volume_file is not UNSET: + field_dict["volumeFile"] = volume_file + if stack_file is not UNSET: + field_dict["stackFile"] = stack_file + if file_directory is not UNSET: + field_dict["fileDirectory"] = file_directory + if central_slice_image is not UNSET: + field_dict["centralSliceImage"] = central_slice_image + if size_x is not UNSET: + field_dict["sizeX"] = size_x + if size_y is not UNSET: + field_dict["sizeY"] = size_y + if size_z is not UNSET: + field_dict["sizeZ"] = size_z + if pixel_location_x is not UNSET: + field_dict["pixelLocationX"] = pixel_location_x + if pixel_location_y is not UNSET: + field_dict["pixelLocationY"] = pixel_location_y + if pixel_spacing is not UNSET: + field_dict["pixelSpacing"] = pixel_spacing + if residual_error_mean is not UNSET: + field_dict["residualErrorMean"] = residual_error_mean + if residual_error_sd is not UNSET: + field_dict["residualErrorSD"] = residual_error_sd + if x_axis_correction is not UNSET: + field_dict["xAxisCorrection"] = x_axis_correction + if tilt_angle_offset is not UNSET: + field_dict["tiltAngleOffset"] = tilt_angle_offset + if z_shift is not UNSET: + field_dict["zShift"] = z_shift + if refined_tilt_axis is not UNSET: + field_dict["refinedTiltAxis"] = refined_tilt_axis + if global_alignment_quality is not UNSET: + field_dict["globalAlignmentQuality"] = global_alignment_quality + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + data_collection_id = d.pop("dataCollectionId") + + tomogram_id = d.pop("tomogramId") + + def _parse_grid_square_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + grid_square_id = _parse_grid_square_id(d.pop("gridSquareId", UNSET)) + + def _parse_volume_file(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + volume_file = _parse_volume_file(d.pop("volumeFile", UNSET)) + + def _parse_stack_file(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + stack_file = _parse_stack_file(d.pop("stackFile", UNSET)) + + def _parse_file_directory(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + file_directory = _parse_file_directory(d.pop("fileDirectory", UNSET)) + + def _parse_central_slice_image(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + central_slice_image = _parse_central_slice_image(d.pop("centralSliceImage", UNSET)) + + def _parse_size_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + size_x = _parse_size_x(d.pop("sizeX", UNSET)) + + def _parse_size_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + size_y = _parse_size_y(d.pop("sizeY", UNSET)) + + def _parse_size_z(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + size_z = _parse_size_z(d.pop("sizeZ", UNSET)) + + def _parse_pixel_location_x(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_x = _parse_pixel_location_x(d.pop("pixelLocationX", UNSET)) + + def _parse_pixel_location_y(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + pixel_location_y = _parse_pixel_location_y(d.pop("pixelLocationY", UNSET)) + + def _parse_pixel_spacing(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + pixel_spacing = _parse_pixel_spacing(d.pop("pixelSpacing", UNSET)) + + def _parse_residual_error_mean(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + residual_error_mean = _parse_residual_error_mean(d.pop("residualErrorMean", UNSET)) + + def _parse_residual_error_sd(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + residual_error_sd = _parse_residual_error_sd(d.pop("residualErrorSD", UNSET)) + + def _parse_x_axis_correction(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + x_axis_correction = _parse_x_axis_correction(d.pop("xAxisCorrection", UNSET)) + + def _parse_tilt_angle_offset(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + tilt_angle_offset = _parse_tilt_angle_offset(d.pop("tiltAngleOffset", UNSET)) + + def _parse_z_shift(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + z_shift = _parse_z_shift(d.pop("zShift", UNSET)) + + def _parse_refined_tilt_axis(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + refined_tilt_axis = _parse_refined_tilt_axis(d.pop("refinedTiltAxis", UNSET)) + + def _parse_global_alignment_quality(data: object) -> float | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(float | None | Unset, data) + + global_alignment_quality = _parse_global_alignment_quality(d.pop("globalAlignmentQuality", UNSET)) + + def _parse_title(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + title = _parse_title(d.pop("title", UNSET)) + + tomogram_out = cls( + data_collection_id=data_collection_id, + tomogram_id=tomogram_id, + grid_square_id=grid_square_id, + volume_file=volume_file, + stack_file=stack_file, + file_directory=file_directory, + central_slice_image=central_slice_image, + size_x=size_x, + size_y=size_y, + size_z=size_z, + pixel_location_x=pixel_location_x, + pixel_location_y=pixel_location_y, + pixel_spacing=pixel_spacing, + residual_error_mean=residual_error_mean, + residual_error_sd=residual_error_sd, + x_axis_correction=x_axis_correction, + tilt_angle_offset=tilt_angle_offset, + z_shift=z_shift, + refined_tilt_axis=refined_tilt_axis, + global_alignment_quality=global_alignment_quality, + title=title, + ) + + return tomogram_out diff --git a/src/lims_utils/expeye_client/models/user_group_has_person_out.py b/src/lims_utils/expeye_client/models/user_group_has_person_out.py new file mode 100644 index 0000000..0bf4024 --- /dev/null +++ b/src/lims_utils/expeye_client/models/user_group_has_person_out.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserGroupHasPersonOut") + + +@_attrs_define +class UserGroupHasPersonOut: + """ + Attributes: + user_group_id (int): + person_id (int): + """ + + user_group_id: int + person_id: int + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_group_id = self.user_group_id + + person_id = self.person_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "userGroupId": user_group_id, + "personId": person_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_group_id = d.pop("userGroupId") + + person_id = d.pop("personId") + + user_group_has_person_out = cls( + user_group_id=user_group_id, + person_id=person_id, + ) + + user_group_has_person_out.additional_properties = d + return user_group_has_person_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py b/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py new file mode 100644 index 0000000..d14bbc3 --- /dev/null +++ b/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +if TYPE_CHECKING: + from ..models.ldap_search_params import LDAPSearchParams + + +T = TypeVar("T", bound="UserGroupLDAPSearchParams") + + +@_attrs_define +class UserGroupLDAPSearchParams: + """ + Attributes: + user_group_id (int): + name (str): + parameters (list[LDAPSearchParams]): + """ + + user_group_id: int + name: str + parameters: list[LDAPSearchParams] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_group_id = self.user_group_id + + name = self.name + + parameters = [] + for parameters_item_data in self.parameters: + parameters_item = parameters_item_data.to_dict() + parameters.append(parameters_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "userGroupId": user_group_id, + "name": name, + "parameters": parameters, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ldap_search_params import LDAPSearchParams # noqa: PLC0415 + + d = dict(src_dict) + user_group_id = d.pop("userGroupId") + + name = d.pop("name") + + parameters = [] + _parameters = d.pop("parameters") + for parameters_item_data in _parameters: + parameters_item = LDAPSearchParams.from_dict(parameters_item_data) + + parameters.append(parameters_item) + + user_group_ldap_search_params = cls( + user_group_id=user_group_id, + name=name, + parameters=parameters, + ) + + user_group_ldap_search_params.additional_properties = d + return user_group_ldap_search_params + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/user_group_out.py b/src/lims_utils/expeye_client/models/user_group_out.py new file mode 100644 index 0000000..3f02f76 --- /dev/null +++ b/src/lims_utils/expeye_client/models/user_group_out.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="UserGroupOut") + + +@_attrs_define +class UserGroupOut: + """ + Attributes: + user_group_id (int): + name (str): + """ + + user_group_id: int + name: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + user_group_id = self.user_group_id + + name = self.name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "userGroupId": user_group_id, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + user_group_id = d.pop("userGroupId") + + name = d.pop("name") + + user_group_out = cls( + user_group_id=user_group_id, + name=name, + ) + + user_group_out.additional_properties = d + return user_group_out + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/validation_error.py b/src/lims_utils/expeye_client/models/validation_error.py new file mode 100644 index 0000000..1d3f539 --- /dev/null +++ b/src/lims_utils/expeye_client/models/validation_error.py @@ -0,0 +1,123 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import TYPE_CHECKING, Any, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.validation_error_context import ValidationErrorContext + + +T = TypeVar("T", bound="ValidationError") + + +@_attrs_define +class ValidationError: + """ + Attributes: + loc (list[int | str]): + msg (str): + type_ (str): + input_ (Any | Unset): + ctx (ValidationErrorContext | Unset): + """ + + loc: list[int | str] + msg: str + type_: str + input_: Any | Unset = UNSET + ctx: ValidationErrorContext | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + loc = [] + for loc_item_data in self.loc: + loc_item: int | str + loc_item = loc_item_data + loc.append(loc_item) + + msg = self.msg + + type_ = self.type_ + + input_ = self.input_ + + ctx: dict[str, Any] | Unset = UNSET + if not isinstance(self.ctx, Unset): + ctx = self.ctx.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "loc": loc, + "msg": msg, + "type": type_, + } + ) + if input_ is not UNSET: + field_dict["input"] = input_ + if ctx is not UNSET: + field_dict["ctx"] = ctx + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.validation_error_context import ValidationErrorContext # noqa: PLC0415 + + d = dict(src_dict) + loc = [] + _loc = d.pop("loc") + for loc_item_data in _loc: + + def _parse_loc_item(data: object) -> int | str: + return cast(int | str, data) + + loc_item = _parse_loc_item(loc_item_data) + + loc.append(loc_item) + + msg = d.pop("msg") + + type_ = d.pop("type") + + input_ = d.pop("input", UNSET) + + _ctx = d.pop("ctx", UNSET) + ctx: ValidationErrorContext | Unset + if isinstance(_ctx, Unset): + ctx = UNSET + else: + ctx = ValidationErrorContext.from_dict(_ctx) + + validation_error = cls( + loc=loc, + msg=msg, + type_=type_, + input_=input_, + ctx=ctx, + ) + + validation_error.additional_properties = d + return validation_error + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/models/validation_error_context.py b/src/lims_utils/expeye_client/models/validation_error_context.py new file mode 100644 index 0000000..124b115 --- /dev/null +++ b/src/lims_utils/expeye_client/models/validation_error_context.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ValidationErrorContext") + + +@_attrs_define +class ValidationErrorContext: + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + validation_error_context = cls() + + validation_error_context.additional_properties = d + return validation_error_context + + @property + def additional_keys(self) -> list[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/src/lims_utils/expeye_client/py.typed b/src/lims_utils/expeye_client/py.typed new file mode 100644 index 0000000..1aad327 --- /dev/null +++ b/src/lims_utils/expeye_client/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561 \ No newline at end of file diff --git a/src/lims_utils/expeye_client/types.py b/src/lims_utils/expeye_client/types.py new file mode 100644 index 0000000..9090a26 --- /dev/null +++ b/src/lims_utils/expeye_client/types.py @@ -0,0 +1,54 @@ +"""Contains some shared types for properties""" + +from collections.abc import Mapping, MutableMapping +from http import HTTPStatus +from typing import IO, BinaryIO, Generic, Literal, TypeVar + +from attrs import define + + +class Unset: + def __bool__(self) -> Literal[False]: + return False + + +UNSET: Unset = Unset() + +# The types that `httpx2.Client(files=)` can accept, copied from that library. +FileContent = IO[bytes] | bytes | str +FileTypes = ( + # (filename, file (or bytes), content_type) + tuple[str | None, FileContent, str | None] + # (filename, file (or bytes), content_type, headers) + | tuple[str | None, FileContent, str | None, Mapping[str, str]] +) +RequestFiles = list[tuple[str, FileTypes]] + + +@define +class File: + """Contains information for file uploads""" + + payload: BinaryIO + file_name: str | None = None + mime_type: str | None = None + + def to_tuple(self) -> FileTypes: + """Return a tuple representation that httpx2 will accept for multipart/form-data""" + return self.file_name, self.payload, self.mime_type + + +T = TypeVar("T") + + +@define +class Response(Generic[T]): + """A response from an endpoint""" + + status_code: HTTPStatus + content: bytes + headers: MutableMapping[str, str] + parsed: T | None + + +__all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] From 8165e25ee85b39b6c91279646cbfed5a02453f13 Mon Sep 17 00:00:00 2001 From: Manishi Barosee Date: Tue, 17 Nov 2026 11:53:54 +0000 Subject: [PATCH 3/6] LIMS-2498: mark api module as unstable --- src/lims_utils/expeye_client/{api => UNSTABLE_api}/__init__.py | 0 .../expeye_client/{api => UNSTABLE_api}/admin_vars/__init__.py | 0 .../admin_vars/get_admin_var_admin_vars_admin_var_name_get.py | 0 .../update_admin_var_admin_vars_admin_var_name_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/atlas/__init__.py | 0 .../atlas/create_atlas_data_groups_group_id_atlas_post.py | 0 .../atlas/get_atlas_data_groups_group_id_atlas_get.py | 0 .../get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py | 0 .../post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py | 0 .../atlas/update_atlas_atlas_atlas_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/contacts/__init__.py | 0 .../contacts/get_lab_contact_contacts_lab_contact_id_get.py | 0 .../{api => UNSTABLE_api}/container_inspections/__init__.py | 0 ...ection_container_inspections_container_inspection_id_delete.py | 0 ...ainer_inspections_container_inspection_id_sample_images_get.py | 0 ...pection_container_inspections_container_inspection_id_patch.py | 0 .../{api => UNSTABLE_api}/container_registry/__init__.py | 0 .../get_container_registry_entries_container_registry_get.py | 0 ...ntainer_registry_entry_container_registry_barcode_or_id_get.py | 0 ..._containers_container_registry_barcode_or_id_containers_get.py | 0 ...ainer_registry_entry_container_registry_barcode_or_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/containers/__init__.py | 0 .../create_container_containers_container_id_containers_post.py | 0 ...eate_container_history_containers_container_id_history_post.py | 0 ...ntainer_inspection_containers_container_id_inspections_post.py | 0 ...er_queue_entry_containers_container_id_container_queue_post.py | 0 .../create_sample_containers_container_id_samples_post.py | 0 ..._queue_entry_containers_container_id_container_queue_delete.py | 0 .../containers/edit_container_containers_container_id_patch.py | 0 .../containers/get_container_containers_container_id_get.py | 0 .../get_container_history_containers_container_id_history_get.py | 0 ...ntainer_inspections_containers_container_id_inspections_get.py | 0 ...r_queue_entries_containers_container_id_container_queue_get.py | 0 ...raction_plans_containers_container_id_diffraction_plans_get.py | 0 .../containers/get_samples_containers_container_id_samples_get.py | 0 .../load_or_unload_puck_containers_container_id_assign_post.py | 0 ...iners_container_id_container_queue_container_queue_id_patch.py | 0 ...ction_plans_containers_container_id_diffraction_plans_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/crystals/__init__.py | 0 .../crystals/get_crystal_crystals_crystal_id_get.py | 0 .../crystals/update_crystal_crystals_crystal_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/ctf/__init__.py | 0 .../{api => UNSTABLE_api}/ctf/delete_ctf_ctf_ctf_id_delete.py | 0 .../ctf/get_ctf_data_collections_data_collection_id_ctf_get.py | 0 .../{api => UNSTABLE_api}/ctf/update_ctf_ctf_ctf_id_patch.py | 0 .../{api => UNSTABLE_api}/data_collection_groups/__init__.py | 0 ...reate_collection_data_groups_group_id_data_collections_post.py | 0 .../get_collections_data_groups_group_id_data_collections_get.py | 0 .../get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py | 0 .../update_data_collection_group_data_groups_group_id_patch.py | 0 .../{api => UNSTABLE_api}/data_collections/__init__.py | 0 ...aperture_data_collections_data_collection_id_apertures_post.py | 0 ...chment_data_collections_data_collection_id_attachments_post.py | 0 ...e_comment_data_collections_data_collection_id_comments_post.py | 0 .../create_grid_data_collections_data_collection_id_grids_post.py | 0 ..._position_data_collections_data_collection_id_position_post.py | 0 ...lections_data_collection_id_attachments_attachment_id_patch.py | 0 ...ollections_data_collection_id_attachments_attachment_id_get.py | 0 ...chments_data_collections_data_collection_id_attachments_get.py | 0 ...t_comments_data_collections_data_collection_id_comments_get.py | 0 ...get_data_collection_data_collections_data_collection_id_get.py | 0 .../get_grids_data_collections_data_collection_id_grids_get.py | 0 ...collections_data_collection_id_image_quality_indicators_get.py | 0 ...t_position_data_collections_data_collection_id_position_get.py | 0 ...obs_data_collections_data_collection_id_processing_jobs_get.py | 0 ...ta_collections_data_collection_id_comments_comment_id_patch.py | 0 ...e_data_collection_data_collections_data_collection_id_patch.py | 0 ...position_data_collections_data_collection_id_position_patch.py | 0 .../{api => UNSTABLE_api}/dewar_registry/__init__.py | 0 .../create_dewar_registry_entry_dewar_registry_post.py | 0 .../get_dewar_registry_entries_dewar_registry_get.py | 0 .../get_dewar_registry_entry_dewar_registry_facility_code_get.py | 0 ...ate_dewar_registry_entry_dewar_registry_facility_code_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/dewars/__init__.py | 0 .../dewars/create_container_dewars_dewar_id_containers_post.py | 0 .../create_dewar_history_entry_dewars_dewar_id_history_post.py | 0 .../dewars/edit_dewar_dewars_dewar_id_patch.py | 0 .../{api => UNSTABLE_api}/dewars/get_dewar_dewars_dewar_id_get.py | 0 .../dewars/get_dewar_history_dewars_dewar_id_history_get.py | 0 ...get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py | 0 ...e_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py | 0 .../{api => UNSTABLE_api}/diffraction_plans/__init__.py | 0 ...iffraction_plan_diffraction_plans_diffraction_plan_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/energy_scans/__init__.py | 0 .../get_energy_scan_energy_scans_energy_scan_id_get.py | 0 .../update_energy_scan_energy_scans_energy_scan_id_patch.py | 0 .../{api => UNSTABLE_api}/fluorescence_spectrums/__init__.py | 0 ...pectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py | 0 ...ctrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/grid_squares/__init__.py | 0 ...quare_foil_holes_grid_squares_grid_square_id_foil_holes_get.py | 0 .../get_grid_square_grid_squares_grid_square_id_get.py | 0 ...milling_steps_grid_squares_grid_square_id_milling_steps_get.py | 0 .../get_tomograms_grid_squares_grid_square_id_tomograms_get.py | 0 ...uare_foil_holes_grid_squares_grid_square_id_foil_holes_post.py | 0 ...illing_steps_grid_squares_grid_square_id_milling_steps_post.py | 0 ...in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/grids/__init__.py | 0 .../grids/update_grid_grids_grid_info_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/ligands/__init__.py | 0 ...create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py | 0 ...eate_sample_ligand_ligands_ligand_id_samples_sample_id_post.py | 0 .../ligands/edit_ligand_ligands_ligand_id_patch.py | 0 .../ligands/get_ligand_ligands_ligand_id_get.py | 0 .../ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py | 0 .../expeye_client/{api => UNSTABLE_api}/meta/__init__.py | 0 .../{api => UNSTABLE_api}/meta/get_version_version_get.py | 0 .../expeye_client/{api => UNSTABLE_api}/motion/__init__.py | 0 .../create_ctf_motion_correction_motion_correction_id_ctf_post.py | 0 ...on_correction_motion_correction_motion_correction_id_delete.py | 0 ...n_data_collections_data_collection_id_motion_correction_get.py | 0 ...ion_correction_motion_correction_motion_correction_id_patch.py | 0 .../{api => UNSTABLE_api}/mx_lims_shipments/__init__.py | 0 .../create_auto_proc_attachment_mxlims_shipments_post.py | 0 .../expeye_client/{api => UNSTABLE_api}/pdb_entries/__init__.py | 0 ...create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py | 0 .../pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py | 0 .../expeye_client/{api => UNSTABLE_api}/persons/__init__.py | 0 .../{api => UNSTABLE_api}/persons/create_person_persons_post.py | 0 .../persons/delete_person_persons_person_id_delete.py | 0 .../persons/get_person_persons_person_id_get.py | 0 .../{api => UNSTABLE_api}/persons/get_persons_persons_get.py | 0 .../persons/get_usergroups_persons_person_id_user_groups_get.py | 0 .../persons/update_person_persons_person_id_patch.py | 0 .../{api => UNSTABLE_api}/processing_jobs/__init__.py | 0 ..._processing_jobs_processing_job_id_processing_programs_post.py | 0 ...s_processing_jobs_processing_job_id_processing_programs_get.py | 0 ...parameters_processing_jobs_processing_job_id_parameters_get.py | 0 ...parameters_processing_jobs_processing_job_id_parameters_put.py | 0 .../{api => UNSTABLE_api}/processing_programs/__init__.py | 0 ...t_processing_programs_auto_proc_program_id_attachments_post.py | 0 ..._program_id_attachments_auto_proc_program_attachment_id_get.py | 0 ...ts_processing_programs_auto_proc_program_id_attachments_get.py | 0 ...cessing_programs_auto_proc_program_id_motion_correction_get.py | 0 ..._programs_attachments_auto_proc_program_attachment_id_patch.py | 0 ...sing_program_processing_programs_auto_proc_program_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/proposals/__init__.py | 0 ..._entry_proposals_proposal_reference_container_registry_post.py | 0 ...ls_proposal_reference_container_registry_barcode_or_id_post.py | 0 .../create_crystals_proposals_proposal_reference_crystals_post.py | 0 ...stry_entry_proposals_proposal_reference_dewar_registry_post.py | 0 ...oposals_proposal_reference_dewar_registry_barcode_or_id_put.py | 0 ...rom_json_proposals_proposal_reference_shipments_upload_post.py | 0 ...e_proposal_ligand_proposals_proposal_reference_ligands_post.py | 0 .../proposals/create_proposal_proposals_post.py | 0 .../create_protein_proposals_proposal_reference_proteins_post.py | 0 .../create_session_proposals_proposal_reference_sessions_post.py | 0 ...create_shipment_proposals_proposal_reference_shipments_post.py | 0 ..._proposal_reference_container_registry_barcode_or_id_delete.py | 0 ...sals_proposal_reference_dewar_registry_barcode_or_id_delete.py | 0 .../delete_proposal_proposals_proposal_reference_delete.py | 0 ...entries_proposals_proposal_reference_container_registry_get.py | 0 ...als_proposal_reference_container_registry_barcode_or_id_get.py | 0 ...try_entries_proposals_proposal_reference_dewar_registry_get.py | 0 ...oposals_proposal_reference_dewar_registry_facility_code_get.py | 0 .../get_events_proposals_proposal_reference_sample_events_get.py | 0 ..._for_proposal_proposals_proposal_reference_lab_contacts_get.py | 0 ...ssing_jobs_proposals_proposal_reference_processing_jobs_get.py | 0 .../get_proposal_data_proposals_proposal_reference_data_get.py | 0 .../proposals/get_proposal_proposals_proposal_reference_get.py | 0 ...t_proposal_samples_proposals_proposal_reference_samples_get.py | 0 ...oposal_shipments_proposals_proposal_reference_shipments_get.py | 0 .../proposals/get_proposals_proposals_get.py | 0 .../get_proteins_proposals_proposal_reference_proteins_get.py | 0 .../get_sessions_proposals_proposal_reference_sessions_get.py | 0 ...t_staff_for_proposal_proposals_proposal_reference_staff_get.py | 0 ...s_proposal_reference_container_registry_barcode_or_id_patch.py | 0 .../update_proposal_proposals_proposal_reference_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/proteins/__init__.py | 0 .../proteins/create_crystal_proteins_protein_id_crystals_post.py | 0 .../proteins/edit_protein_proteins_protein_id_patch.py | 0 .../proteins/get_crystals_proteins_protein_id_crystals_get.py | 0 .../proteins/get_protein_proteins_protein_id_get.py | 0 .../expeye_client/{api => UNSTABLE_api}/robot_actions/__init__.py | 0 ...aser_points_robot_actions_robot_action_id_laser_points_post.py | 0 ...reate_laser_action_robot_actions_robot_action_id_laser_post.py | 0 .../get_laser_action_robot_actions_robot_action_id_laser_get.py | 0 .../get_robot_action_robot_actions_robot_action_id_get.py | 0 ...meters_robot_actions_robot_action_id_laser_parameters_patch.py | 0 .../update_robot_action_robot_actions_robot_action_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/sample_images/__init__.py | 0 .../delete_sample_image_sample_images_sample_image_id_delete.py | 0 .../get_sample_image_sample_images_sample_image_id_get.py | 0 .../update_sample_image_sample_images_sample_image_id_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/samples/__init__.py | 0 ...te_diffraction_plan_samples_sample_id_diffraction_plan_post.py | 0 .../samples/create_sample_image_samples_sample_id_images_post.py | 0 ...eate_sample_ligand_samples_sample_id_ligands_ligand_id_post.py | 0 .../create_sample_position_samples_sample_id_positions_post.py | 0 .../{api => UNSTABLE_api}/samples/create_sample_samples_post.py | 0 ...mple_position_samples_sample_id_positions_position_id_patch.py | 0 .../edit_sample_positions_samples_sample_id_positions_patch.py | 0 .../samples/edit_sample_samples_sample_id_patch.py | 0 ...et_diffraction_plans_samples_sample_id_diffraction_plan_get.py | 0 .../get_energy_scans_samples_sample_id_energy_scans_get.py | 0 .../samples/get_sample_images_samples_sample_id_images_get.py | 0 .../samples/get_sample_ligands_samples_sample_id_ligands_get.py | 0 .../get_sample_positions_samples_sample_id_positions_get.py | 0 .../samples/get_sample_samples_sample_id_get.py | 0 ...e_diffraction_plan_samples_sample_id_diffraction_plan_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/sessions/__init__.py | 0 ...s_proposal_reference_sessions_visit_number_data_groups_post.py | 0 ..._proposal_reference_sessions_visit_number_energy_scans_post.py | 0 ...reference_sessions_visit_number_fluorescence_spectrums_post.py | 0 ...osals_proposal_reference_sessions_visit_number_persons_post.py | 0 ...proposal_reference_sessions_visit_number_robot_actions_post.py | 0 ...proposal_reference_sessions_visit_number_session_types_post.py | 0 ..._type_through_uuid_sessions_session_uuid_session_types_post.py | 0 ...n_proposals_proposal_reference_sessions_visit_number_delete.py | 0 .../{api => UNSTABLE_api}/sessions/get_beamlines_beamlines_get.py | 0 ...ls_proposal_reference_sessions_visit_number_data_groups_get.py | 0 ...s_proposal_reference_sessions_visit_number_energy_scans_get.py | 0 ..._reference_sessions_visit_number_fluorescence_spectrums_get.py | 0 ...roposals_proposal_reference_sessions_visit_number_blobs_get.py | 0 ...e_sessions_visit_number_processing_programs_attachments_get.py | 0 ..._proposal_reference_sessions_visit_number_robot_actions_get.py | 0 ...oposals_proposal_reference_sessions_visit_number_events_get.py | 0 ...s_proposal_reference_sessions_visit_number_group_events_get.py | 0 ...sion_proposals_proposal_reference_sessions_visit_number_get.py | 0 .../{api => UNSTABLE_api}/sessions/get_sessions_sessions_get.py | 0 ...sals_proposal_reference_sessions_visit_number_persons_patch.py | 0 ...roposal_reference_sessions_visit_number_blobs_blob_id_patch.py | 0 ...sessions_visit_number_processing_programs_attachments_patch.py | 0 ...on_proposals_proposal_reference_sessions_visit_number_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/shipments/__init__.py | 0 .../shipments/create_dewar_shipments_shipment_id_dewars_post.py | 0 .../create_full_shipment_from_file_shipments_upload_post.py | 0 .../shipments/edit_shipment_shipments_shipment_id_patch.py | 0 .../shipments/get_dewars_shipments_shipment_id_dewars_get.py | 0 ...ffraction_plans_shipments_shipment_id_diffraction_plans_get.py | 0 .../shipments/get_samples_shipments_shipment_id_samples_get.py | 0 .../shipments/get_shipment_shipments_shipment_id_get.py | 0 ...raction_plans_shipments_shipment_id_diffraction_plans_patch.py | 0 .../expeye_client/{api => UNSTABLE_api}/tomograms/__init__.py | 0 .../tomograms/get_tomogram_tomograms_tomogram_id_get.py | 0 .../expeye_client/{api => UNSTABLE_api}/user_groups/__init__.py | 0 .../get_ldap_search_params_user_groups_search_params_get.py | 0 ...ap_search_params_user_groups_usergroup_id_search_params_get.py | 0 .../user_groups/get_usergroup_user_groups_usergroup_id_get.py | 0 .../user_groups/get_usergroups_user_groups_get.py | 0 ..._persons_in_usergroup_user_groups_usergroup_id_persons_post.py | 0 ...om_usergroup_user_groups_usergroup_id_persons_person_delete.py | 0 242 files changed, 0 insertions(+), 0 deletions(-) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/admin_vars/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/atlas/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/atlas/create_atlas_data_groups_group_id_atlas_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/atlas/get_atlas_data_groups_group_id_atlas_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/atlas/update_atlas_atlas_atlas_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/contacts/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/contacts/get_lab_contact_contacts_lab_contact_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_inspections/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_registry/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_registry/get_container_registry_entries_container_registry_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/create_container_containers_container_id_containers_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/create_container_history_containers_container_id_history_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/create_container_inspection_containers_container_id_inspections_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/create_container_queue_entry_containers_container_id_container_queue_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/create_sample_containers_container_id_samples_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/edit_container_containers_container_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/get_container_containers_container_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/get_container_history_containers_container_id_history_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/get_container_inspections_containers_container_id_inspections_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/get_container_queue_entries_containers_container_id_container_queue_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/get_samples_containers_container_id_samples_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/load_or_unload_puck_containers_container_id_assign_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/crystals/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/crystals/get_crystal_crystals_crystal_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/crystals/update_crystal_crystals_crystal_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ctf/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ctf/delete_ctf_ctf_ctf_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ctf/update_ctf_ctf_ctf_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collection_groups/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/create_comment_data_collections_data_collection_id_comments_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/create_grid_data_collections_data_collection_id_grids_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/create_position_data_collections_data_collection_id_position_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_comments_data_collections_data_collection_id_comments_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_data_collection_data_collections_data_collection_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_grids_data_collections_data_collection_id_grids_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_position_data_collections_data_collection_id_position_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/update_data_collection_data_collections_data_collection_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/data_collections/update_position_data_collections_data_collection_id_position_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewar_registry/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/create_container_dewars_dewar_id_containers_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/edit_dewar_dewars_dewar_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/get_dewar_dewars_dewar_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/get_dewar_history_dewars_dewar_id_history_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/diffraction_plans/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/energy_scans/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/fluorescence_spectrums/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grids/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/grids/update_grid_grids_grid_info_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ligands/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ligands/edit_ligand_ligands_ligand_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ligands/get_ligand_ligands_ligand_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/meta/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/meta/get_version_version_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/motion/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/mx_lims_shipments/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/pdb_entries/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/create_person_persons_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/delete_person_persons_person_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/get_person_persons_person_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/get_persons_persons_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/get_usergroups_persons_person_id_user_groups_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/persons/update_person_persons_person_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_jobs/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_crystals_proposals_proposal_reference_crystals_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_proposal_proposals_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_protein_proposals_proposal_reference_proteins_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_session_proposals_proposal_reference_sessions_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/create_shipment_proposals_proposal_reference_shipments_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/delete_proposal_proposals_proposal_reference_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_events_proposals_proposal_reference_sample_events_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_proposal_data_proposals_proposal_reference_data_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_proposal_proposals_proposal_reference_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_proposals_proposals_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_proteins_proposals_proposal_reference_proteins_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_sessions_proposals_proposal_reference_sessions_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proposals/update_proposal_proposals_proposal_reference_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proteins/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proteins/create_crystal_proteins_protein_id_crystals_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proteins/edit_protein_proteins_protein_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proteins/get_crystals_proteins_protein_id_crystals_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/proteins/get_protein_proteins_protein_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sample_images/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sample_images/get_sample_image_sample_images_sample_image_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sample_images/update_sample_image_sample_images_sample_image_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/create_sample_image_samples_sample_id_images_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/create_sample_position_samples_sample_id_positions_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/create_sample_samples_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/edit_sample_positions_samples_sample_id_positions_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/edit_sample_samples_sample_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/get_energy_scans_samples_sample_id_energy_scans_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/get_sample_images_samples_sample_id_images_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/get_sample_ligands_samples_sample_id_ligands_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/get_sample_positions_samples_sample_id_positions_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/get_sample_samples_sample_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_beamlines_beamlines_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/get_sessions_sessions_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/create_dewar_shipments_shipment_id_dewars_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/create_full_shipment_from_file_shipments_upload_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/edit_shipment_shipments_shipment_id_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/get_dewars_shipments_shipment_id_dewars_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/get_samples_shipments_shipment_id_samples_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/get_shipment_shipments_shipment_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/tomograms/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/tomograms/get_tomogram_tomograms_tomogram_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/__init__.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/get_ldap_search_params_user_groups_search_params_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/get_usergroup_user_groups_usergroup_id_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/get_usergroups_user_groups_get.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py (100%) rename src/lims_utils/expeye_client/{api => UNSTABLE_api}/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py (100%) diff --git a/src/lims_utils/expeye_client/api/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/__init__.py diff --git a/src/lims_utils/expeye_client/api/admin_vars/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/admin_vars/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/__init__.py diff --git a/src/lims_utils/expeye_client/api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py diff --git a/src/lims_utils/expeye_client/api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py diff --git a/src/lims_utils/expeye_client/api/atlas/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/atlas/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/atlas/__init__.py diff --git a/src/lims_utils/expeye_client/api/atlas/create_atlas_data_groups_group_id_atlas_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/create_atlas_data_groups_group_id_atlas_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/atlas/create_atlas_data_groups_group_id_atlas_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/atlas/create_atlas_data_groups_group_id_atlas_post.py diff --git a/src/lims_utils/expeye_client/api/atlas/get_atlas_data_groups_group_id_atlas_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_data_groups_group_id_atlas_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/atlas/get_atlas_data_groups_group_id_atlas_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_data_groups_group_id_atlas_get.py diff --git a/src/lims_utils/expeye_client/api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py diff --git a/src/lims_utils/expeye_client/api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py diff --git a/src/lims_utils/expeye_client/api/atlas/update_atlas_atlas_atlas_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/update_atlas_atlas_atlas_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/atlas/update_atlas_atlas_atlas_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/atlas/update_atlas_atlas_atlas_id_patch.py diff --git a/src/lims_utils/expeye_client/api/contacts/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/contacts/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/contacts/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/contacts/__init__.py diff --git a/src/lims_utils/expeye_client/api/contacts/get_lab_contact_contacts_lab_contact_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/contacts/get_lab_contact_contacts_lab_contact_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/contacts/get_lab_contact_contacts_lab_contact_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/contacts/get_lab_contact_contacts_lab_contact_id_get.py diff --git a/src/lims_utils/expeye_client/api/container_inspections/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_inspections/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/__init__.py diff --git a/src/lims_utils/expeye_client/api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py diff --git a/src/lims_utils/expeye_client/api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py diff --git a/src/lims_utils/expeye_client/api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py diff --git a/src/lims_utils/expeye_client/api/container_registry/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_registry/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_registry/__init__.py diff --git a/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entries_container_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entries_container_registry_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_registry/get_container_registry_entries_container_registry_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entries_container_registry_get.py diff --git a/src/lims_utils/expeye_client/api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py diff --git a/src/lims_utils/expeye_client/api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py diff --git a/src/lims_utils/expeye_client/api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py diff --git a/src/lims_utils/expeye_client/api/containers/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/__init__.py diff --git a/src/lims_utils/expeye_client/api/containers/create_container_containers_container_id_containers_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_containers_container_id_containers_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/create_container_containers_container_id_containers_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_containers_container_id_containers_post.py diff --git a/src/lims_utils/expeye_client/api/containers/create_container_history_containers_container_id_history_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_history_containers_container_id_history_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/create_container_history_containers_container_id_history_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_history_containers_container_id_history_post.py diff --git a/src/lims_utils/expeye_client/api/containers/create_container_inspection_containers_container_id_inspections_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_inspection_containers_container_id_inspections_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/create_container_inspection_containers_container_id_inspections_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_inspection_containers_container_id_inspections_post.py diff --git a/src/lims_utils/expeye_client/api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py diff --git a/src/lims_utils/expeye_client/api/containers/create_sample_containers_container_id_samples_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_sample_containers_container_id_samples_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/create_sample_containers_container_id_samples_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/create_sample_containers_container_id_samples_post.py diff --git a/src/lims_utils/expeye_client/api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py diff --git a/src/lims_utils/expeye_client/api/containers/edit_container_containers_container_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/edit_container_containers_container_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/edit_container_containers_container_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/edit_container_containers_container_id_patch.py diff --git a/src/lims_utils/expeye_client/api/containers/get_container_containers_container_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_containers_container_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/get_container_containers_container_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_containers_container_id_get.py diff --git a/src/lims_utils/expeye_client/api/containers/get_container_history_containers_container_id_history_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_history_containers_container_id_history_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/get_container_history_containers_container_id_history_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_history_containers_container_id_history_get.py diff --git a/src/lims_utils/expeye_client/api/containers/get_container_inspections_containers_container_id_inspections_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_inspections_containers_container_id_inspections_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/get_container_inspections_containers_container_id_inspections_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_inspections_containers_container_id_inspections_get.py diff --git a/src/lims_utils/expeye_client/api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py diff --git a/src/lims_utils/expeye_client/api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py diff --git a/src/lims_utils/expeye_client/api/containers/get_samples_containers_container_id_samples_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_samples_containers_container_id_samples_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/get_samples_containers_container_id_samples_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/get_samples_containers_container_id_samples_get.py diff --git a/src/lims_utils/expeye_client/api/containers/load_or_unload_puck_containers_container_id_assign_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/load_or_unload_puck_containers_container_id_assign_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/load_or_unload_puck_containers_container_id_assign_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/load_or_unload_puck_containers_container_id_assign_post.py diff --git a/src/lims_utils/expeye_client/api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py diff --git a/src/lims_utils/expeye_client/api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py diff --git a/src/lims_utils/expeye_client/api/crystals/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/crystals/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/crystals/__init__.py diff --git a/src/lims_utils/expeye_client/api/crystals/get_crystal_crystals_crystal_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/get_crystal_crystals_crystal_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/crystals/get_crystal_crystals_crystal_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/crystals/get_crystal_crystals_crystal_id_get.py diff --git a/src/lims_utils/expeye_client/api/crystals/update_crystal_crystals_crystal_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/update_crystal_crystals_crystal_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/crystals/update_crystal_crystals_crystal_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/crystals/update_crystal_crystals_crystal_id_patch.py diff --git a/src/lims_utils/expeye_client/api/ctf/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/ctf/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ctf/__init__.py diff --git a/src/lims_utils/expeye_client/api/ctf/delete_ctf_ctf_ctf_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/delete_ctf_ctf_ctf_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/ctf/delete_ctf_ctf_ctf_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ctf/delete_ctf_ctf_ctf_id_delete.py diff --git a/src/lims_utils/expeye_client/api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py diff --git a/src/lims_utils/expeye_client/api/ctf/update_ctf_ctf_ctf_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/update_ctf_ctf_ctf_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/ctf/update_ctf_ctf_ctf_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ctf/update_ctf_ctf_ctf_id_patch.py diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collection_groups/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/__init__.py diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py diff --git a/src/lims_utils/expeye_client/api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py diff --git a/src/lims_utils/expeye_client/api/data_collections/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/__init__.py diff --git a/src/lims_utils/expeye_client/api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py diff --git a/src/lims_utils/expeye_client/api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py diff --git a/src/lims_utils/expeye_client/api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py diff --git a/src/lims_utils/expeye_client/api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py diff --git a/src/lims_utils/expeye_client/api/data_collections/create_position_data_collections_data_collection_id_position_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_position_data_collections_data_collection_id_position_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/create_position_data_collections_data_collection_id_position_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_position_data_collections_data_collection_id_position_post.py diff --git a/src/lims_utils/expeye_client/api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_data_collection_data_collections_data_collection_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_data_collection_data_collections_data_collection_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_data_collection_data_collections_data_collection_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_data_collection_data_collections_data_collection_id_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_position_data_collections_data_collection_id_position_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_position_data_collections_data_collection_id_position_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_position_data_collections_data_collection_id_position_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_position_data_collections_data_collection_id_position_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py diff --git a/src/lims_utils/expeye_client/api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py diff --git a/src/lims_utils/expeye_client/api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py diff --git a/src/lims_utils/expeye_client/api/data_collections/update_position_data_collections_data_collection_id_position_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_position_data_collections_data_collection_id_position_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/data_collections/update_position_data_collections_data_collection_id_position_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_position_data_collections_data_collection_id_position_patch.py diff --git a/src/lims_utils/expeye_client/api/dewar_registry/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewar_registry/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/__init__.py diff --git a/src/lims_utils/expeye_client/api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py diff --git a/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py diff --git a/src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py diff --git a/src/lims_utils/expeye_client/api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py diff --git a/src/lims_utils/expeye_client/api/dewars/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/__init__.py diff --git a/src/lims_utils/expeye_client/api/dewars/create_container_dewars_dewar_id_containers_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_container_dewars_dewar_id_containers_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/create_container_dewars_dewar_id_containers_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_container_dewars_dewar_id_containers_post.py diff --git a/src/lims_utils/expeye_client/api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py diff --git a/src/lims_utils/expeye_client/api/dewars/edit_dewar_dewars_dewar_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/edit_dewar_dewars_dewar_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/edit_dewar_dewars_dewar_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/edit_dewar_dewars_dewar_id_patch.py diff --git a/src/lims_utils/expeye_client/api/dewars/get_dewar_dewars_dewar_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_dewars_dewar_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/get_dewar_dewars_dewar_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_dewars_dewar_id_get.py diff --git a/src/lims_utils/expeye_client/api/dewars/get_dewar_history_dewars_dewar_id_history_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_history_dewars_dewar_id_history_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/get_dewar_history_dewars_dewar_id_history_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_history_dewars_dewar_id_history_get.py diff --git a/src/lims_utils/expeye_client/api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py diff --git a/src/lims_utils/expeye_client/api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py diff --git a/src/lims_utils/expeye_client/api/diffraction_plans/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/diffraction_plans/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/__init__.py diff --git a/src/lims_utils/expeye_client/api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py diff --git a/src/lims_utils/expeye_client/api/energy_scans/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/energy_scans/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/__init__.py diff --git a/src/lims_utils/expeye_client/api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py diff --git a/src/lims_utils/expeye_client/api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py diff --git a/src/lims_utils/expeye_client/api/fluorescence_spectrums/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/fluorescence_spectrums/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/__init__.py diff --git a/src/lims_utils/expeye_client/api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py diff --git a/src/lims_utils/expeye_client/api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/__init__.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py diff --git a/src/lims_utils/expeye_client/api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py diff --git a/src/lims_utils/expeye_client/api/grids/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/grids/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/grids/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grids/__init__.py diff --git a/src/lims_utils/expeye_client/api/grids/update_grid_grids_grid_info_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/grids/update_grid_grids_grid_info_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/grids/update_grid_grids_grid_info_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/grids/update_grid_grids_grid_info_id_patch.py diff --git a/src/lims_utils/expeye_client/api/ligands/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/ligands/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ligands/__init__.py diff --git a/src/lims_utils/expeye_client/api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py diff --git a/src/lims_utils/expeye_client/api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py diff --git a/src/lims_utils/expeye_client/api/ligands/edit_ligand_ligands_ligand_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/edit_ligand_ligands_ligand_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/ligands/edit_ligand_ligands_ligand_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ligands/edit_ligand_ligands_ligand_id_patch.py diff --git a/src/lims_utils/expeye_client/api/ligands/get_ligand_ligands_ligand_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_ligands_ligand_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/ligands/get_ligand_ligands_ligand_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_ligands_ligand_id_get.py diff --git a/src/lims_utils/expeye_client/api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py diff --git a/src/lims_utils/expeye_client/api/meta/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/meta/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/meta/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/meta/__init__.py diff --git a/src/lims_utils/expeye_client/api/meta/get_version_version_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/meta/get_version_version_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/meta/get_version_version_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/meta/get_version_version_get.py diff --git a/src/lims_utils/expeye_client/api/motion/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/motion/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/motion/__init__.py diff --git a/src/lims_utils/expeye_client/api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py diff --git a/src/lims_utils/expeye_client/api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py diff --git a/src/lims_utils/expeye_client/api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py diff --git a/src/lims_utils/expeye_client/api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py diff --git a/src/lims_utils/expeye_client/api/mx_lims_shipments/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/mx_lims_shipments/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/__init__.py diff --git a/src/lims_utils/expeye_client/api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py diff --git a/src/lims_utils/expeye_client/api/pdb_entries/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/pdb_entries/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/__init__.py diff --git a/src/lims_utils/expeye_client/api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py diff --git a/src/lims_utils/expeye_client/api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py diff --git a/src/lims_utils/expeye_client/api/persons/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/__init__.py diff --git a/src/lims_utils/expeye_client/api/persons/create_person_persons_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/create_person_persons_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/create_person_persons_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/create_person_persons_post.py diff --git a/src/lims_utils/expeye_client/api/persons/delete_person_persons_person_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/delete_person_persons_person_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/delete_person_persons_person_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/delete_person_persons_person_id_delete.py diff --git a/src/lims_utils/expeye_client/api/persons/get_person_persons_person_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_person_persons_person_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/get_person_persons_person_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/get_person_persons_person_id_get.py diff --git a/src/lims_utils/expeye_client/api/persons/get_persons_persons_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_persons_persons_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/get_persons_persons_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/get_persons_persons_get.py diff --git a/src/lims_utils/expeye_client/api/persons/get_usergroups_persons_person_id_user_groups_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_usergroups_persons_person_id_user_groups_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/get_usergroups_persons_person_id_user_groups_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/get_usergroups_persons_person_id_user_groups_get.py diff --git a/src/lims_utils/expeye_client/api/persons/update_person_persons_person_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/update_person_persons_person_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/persons/update_person_persons_person_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/persons/update_person_persons_person_id_patch.py diff --git a/src/lims_utils/expeye_client/api/processing_jobs/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_jobs/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/__init__.py diff --git a/src/lims_utils/expeye_client/api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py diff --git a/src/lims_utils/expeye_client/api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py diff --git a/src/lims_utils/expeye_client/api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py diff --git a/src/lims_utils/expeye_client/api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/__init__.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py diff --git a/src/lims_utils/expeye_client/api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py diff --git a/src/lims_utils/expeye_client/api/proposals/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/__init__.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_proposal_proposals_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_proposals_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_proposal_proposals_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_proposals_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_protein_proposals_proposal_reference_proteins_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_protein_proposals_proposal_reference_proteins_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_protein_proposals_proposal_reference_proteins_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_protein_proposals_proposal_reference_proteins_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_session_proposals_proposal_reference_sessions_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_session_proposals_proposal_reference_sessions_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_session_proposals_proposal_reference_sessions_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_session_proposals_proposal_reference_sessions_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py diff --git a/src/lims_utils/expeye_client/api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py diff --git a/src/lims_utils/expeye_client/api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py diff --git a/src/lims_utils/expeye_client/api/proposals/delete_proposal_proposals_proposal_reference_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_proposal_proposals_proposal_reference_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/delete_proposal_proposals_proposal_reference_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_proposal_proposals_proposal_reference_delete.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_events_proposals_proposal_reference_sample_events_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_events_proposals_proposal_reference_sample_events_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_events_proposals_proposal_reference_sample_events_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_events_proposals_proposal_reference_sample_events_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_proposals_proposal_reference_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_proposals_proposal_reference_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_proposal_proposals_proposal_reference_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_proposals_proposal_reference_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_proposals_proposals_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposals_proposals_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_proposals_proposals_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposals_proposals_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py diff --git a/src/lims_utils/expeye_client/api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py diff --git a/src/lims_utils/expeye_client/api/proposals/update_proposal_proposals_proposal_reference_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_proposal_proposals_proposal_reference_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/proposals/update_proposal_proposals_proposal_reference_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_proposal_proposals_proposal_reference_patch.py diff --git a/src/lims_utils/expeye_client/api/proteins/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/proteins/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proteins/__init__.py diff --git a/src/lims_utils/expeye_client/api/proteins/create_crystal_proteins_protein_id_crystals_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/create_crystal_proteins_protein_id_crystals_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/proteins/create_crystal_proteins_protein_id_crystals_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proteins/create_crystal_proteins_protein_id_crystals_post.py diff --git a/src/lims_utils/expeye_client/api/proteins/edit_protein_proteins_protein_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/edit_protein_proteins_protein_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/proteins/edit_protein_proteins_protein_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proteins/edit_protein_proteins_protein_id_patch.py diff --git a/src/lims_utils/expeye_client/api/proteins/get_crystals_proteins_protein_id_crystals_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_crystals_proteins_protein_id_crystals_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proteins/get_crystals_proteins_protein_id_crystals_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_crystals_proteins_protein_id_crystals_get.py diff --git a/src/lims_utils/expeye_client/api/proteins/get_protein_proteins_protein_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_protein_proteins_protein_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/proteins/get_protein_proteins_protein_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_protein_proteins_protein_id_get.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/__init__.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py diff --git a/src/lims_utils/expeye_client/api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py diff --git a/src/lims_utils/expeye_client/api/sample_images/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/sample_images/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sample_images/__init__.py diff --git a/src/lims_utils/expeye_client/api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py diff --git a/src/lims_utils/expeye_client/api/sample_images/get_sample_image_sample_images_sample_image_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/get_sample_image_sample_images_sample_image_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sample_images/get_sample_image_sample_images_sample_image_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sample_images/get_sample_image_sample_images_sample_image_id_get.py diff --git a/src/lims_utils/expeye_client/api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py diff --git a/src/lims_utils/expeye_client/api/samples/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/__init__.py diff --git a/src/lims_utils/expeye_client/api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_image_samples_sample_id_images_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_image_samples_sample_id_images_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/create_sample_image_samples_sample_id_images_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_image_samples_sample_id_images_post.py diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_position_samples_sample_id_positions_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_position_samples_sample_id_positions_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/create_sample_position_samples_sample_id_positions_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_position_samples_sample_id_positions_post.py diff --git a/src/lims_utils/expeye_client/api/samples/create_sample_samples_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_samples_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/create_sample_samples_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_samples_post.py diff --git a/src/lims_utils/expeye_client/api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py diff --git a/src/lims_utils/expeye_client/api/samples/edit_sample_positions_samples_sample_id_positions_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_positions_samples_sample_id_positions_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/edit_sample_positions_samples_sample_id_positions_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_positions_samples_sample_id_positions_patch.py diff --git a/src/lims_utils/expeye_client/api/samples/edit_sample_samples_sample_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_samples_sample_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/edit_sample_samples_sample_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_samples_sample_id_patch.py diff --git a/src/lims_utils/expeye_client/api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py diff --git a/src/lims_utils/expeye_client/api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_images_samples_sample_id_images_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_images_samples_sample_id_images_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/get_sample_images_samples_sample_id_images_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_images_samples_sample_id_images_get.py diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_ligands_samples_sample_id_ligands_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_ligands_samples_sample_id_ligands_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/get_sample_ligands_samples_sample_id_ligands_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_ligands_samples_sample_id_ligands_get.py diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_positions_samples_sample_id_positions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_positions_samples_sample_id_positions_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/get_sample_positions_samples_sample_id_positions_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_positions_samples_sample_id_positions_get.py diff --git a/src/lims_utils/expeye_client/api/samples/get_sample_samples_sample_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_samples_sample_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/get_sample_samples_sample_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_samples_sample_id_get.py diff --git a/src/lims_utils/expeye_client/api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py diff --git a/src/lims_utils/expeye_client/api/sessions/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/__init__.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py diff --git a/src/lims_utils/expeye_client/api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_beamlines_beamlines_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_beamlines_beamlines_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_beamlines_beamlines_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_beamlines_beamlines_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/get_sessions_sessions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_sessions_sessions_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/get_sessions_sessions_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_sessions_sessions_get.py diff --git a/src/lims_utils/expeye_client/api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py diff --git a/src/lims_utils/expeye_client/api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py diff --git a/src/lims_utils/expeye_client/api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py diff --git a/src/lims_utils/expeye_client/api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py diff --git a/src/lims_utils/expeye_client/api/shipments/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/__init__.py diff --git a/src/lims_utils/expeye_client/api/shipments/create_dewar_shipments_shipment_id_dewars_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_dewar_shipments_shipment_id_dewars_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/create_dewar_shipments_shipment_id_dewars_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_dewar_shipments_shipment_id_dewars_post.py diff --git a/src/lims_utils/expeye_client/api/shipments/create_full_shipment_from_file_shipments_upload_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_full_shipment_from_file_shipments_upload_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/create_full_shipment_from_file_shipments_upload_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_full_shipment_from_file_shipments_upload_post.py diff --git a/src/lims_utils/expeye_client/api/shipments/edit_shipment_shipments_shipment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/edit_shipment_shipments_shipment_id_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/edit_shipment_shipments_shipment_id_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/edit_shipment_shipments_shipment_id_patch.py diff --git a/src/lims_utils/expeye_client/api/shipments/get_dewars_shipments_shipment_id_dewars_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_dewars_shipments_shipment_id_dewars_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/get_dewars_shipments_shipment_id_dewars_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_dewars_shipments_shipment_id_dewars_get.py diff --git a/src/lims_utils/expeye_client/api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py diff --git a/src/lims_utils/expeye_client/api/shipments/get_samples_shipments_shipment_id_samples_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_samples_shipments_shipment_id_samples_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/get_samples_shipments_shipment_id_samples_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_samples_shipments_shipment_id_samples_get.py diff --git a/src/lims_utils/expeye_client/api/shipments/get_shipment_shipments_shipment_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_shipment_shipments_shipment_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/get_shipment_shipments_shipment_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_shipment_shipments_shipment_id_get.py diff --git a/src/lims_utils/expeye_client/api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py similarity index 100% rename from src/lims_utils/expeye_client/api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py rename to src/lims_utils/expeye_client/UNSTABLE_api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py diff --git a/src/lims_utils/expeye_client/api/tomograms/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/tomograms/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/tomograms/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/tomograms/__init__.py diff --git a/src/lims_utils/expeye_client/api/tomograms/get_tomogram_tomograms_tomogram_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/tomograms/get_tomogram_tomograms_tomogram_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/tomograms/get_tomogram_tomograms_tomogram_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/tomograms/get_tomogram_tomograms_tomogram_id_get.py diff --git a/src/lims_utils/expeye_client/api/user_groups/__init__.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/__init__.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/__init__.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/__init__.py diff --git a/src/lims_utils/expeye_client/api/user_groups/get_ldap_search_params_user_groups_search_params_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_ldap_search_params_user_groups_search_params_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/get_ldap_search_params_user_groups_search_params_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_ldap_search_params_user_groups_search_params_get.py diff --git a/src/lims_utils/expeye_client/api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py diff --git a/src/lims_utils/expeye_client/api/user_groups/get_usergroup_user_groups_usergroup_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_user_groups_usergroup_id_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/get_usergroup_user_groups_usergroup_id_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_user_groups_usergroup_id_get.py diff --git a/src/lims_utils/expeye_client/api/user_groups/get_usergroups_user_groups_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroups_user_groups_get.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/get_usergroups_user_groups_get.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroups_user_groups_get.py diff --git a/src/lims_utils/expeye_client/api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py diff --git a/src/lims_utils/expeye_client/api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py similarity index 100% rename from src/lims_utils/expeye_client/api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py rename to src/lims_utils/expeye_client/UNSTABLE_api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py From 0810bc213b58eeac658e1fc802cac12bf21bde90 Mon Sep 17 00:00:00 2001 From: Manishi Barosee Date: Tue, 17 Nov 2026 13:01:09 +0000 Subject: [PATCH 4/6] LIMS-2498: lint fixes --- ...et_admin_var_admin_vars_admin_var_name_get.py | 12 ++++++++---- ..._admin_var_admin_vars_admin_var_name_patch.py | 12 ++++++++---- ...eate_atlas_data_groups_group_id_atlas_post.py | 12 ++++++++---- .../get_atlas_data_groups_group_id_atlas_get.py | 12 ++++++++---- ...id_squares_atlas_atlas_id_grid_squares_get.py | 12 ++++++++---- ...d_squares_atlas_atlas_id_grid_squares_post.py | 12 ++++++++---- .../atlas/update_atlas_atlas_atlas_id_patch.py | 12 ++++++++---- ...et_lab_contact_contacts_lab_contact_id_get.py | 12 ++++++++---- ...inspections_container_inspection_id_delete.py | 12 ++++++++---- ..._container_inspection_id_sample_images_get.py | 12 ++++++++---- ..._inspections_container_inspection_id_patch.py | 12 ++++++++---- ...er_registry_entries_container_registry_get.py | 12 ++++++++---- ...entry_container_registry_barcode_or_id_get.py | 12 ++++++++---- ...iner_registry_barcode_or_id_containers_get.py | 12 ++++++++---- ...try_container_registry_barcode_or_id_patch.py | 12 ++++++++---- ...er_containers_container_id_containers_post.py | 12 ++++++++---- ...story_containers_container_id_history_post.py | 12 ++++++++---- ...n_containers_container_id_inspections_post.py | 12 ++++++++---- ...ntainers_container_id_container_queue_post.py | 12 ++++++++---- ...ample_containers_container_id_samples_post.py | 12 ++++++++---- ...ainers_container_id_container_queue_delete.py | 12 ++++++++---- ...it_container_containers_container_id_patch.py | 12 ++++++++---- .../get_container_containers_container_id_get.py | 12 ++++++++---- ...istory_containers_container_id_history_get.py | 12 ++++++++---- ...ns_containers_container_id_inspections_get.py | 12 ++++++++---- ...ontainers_container_id_container_queue_get.py | 12 ++++++++---- ...tainers_container_id_diffraction_plans_get.py | 12 ++++++++---- ...amples_containers_container_id_samples_get.py | 12 ++++++++---- ...d_puck_containers_container_id_assign_post.py | 12 ++++++++---- ...d_container_queue_container_queue_id_patch.py | 12 ++++++++---- ...iners_container_id_diffraction_plans_patch.py | 12 ++++++++---- .../get_crystal_crystals_crystal_id_get.py | 12 ++++++++---- .../update_crystal_crystals_crystal_id_patch.py | 12 ++++++++---- .../ctf/delete_ctf_ctf_ctf_id_delete.py | 12 ++++++++---- ...ata_collections_data_collection_id_ctf_get.py | 12 ++++++++---- .../ctf/update_ctf_ctf_ctf_id_patch.py | 12 ++++++++---- ...data_groups_group_id_data_collections_post.py | 12 ++++++++---- ..._data_groups_group_id_data_collections_get.py | 12 ++++++++---- ...for_dcg_data_groups_group_id_tomograms_get.py | 12 ++++++++---- ...ollection_group_data_groups_group_id_patch.py | 12 ++++++++---- ...lections_data_collection_id_apertures_post.py | 12 ++++++++---- ...ctions_data_collection_id_attachments_post.py | 12 ++++++++---- ...llections_data_collection_id_comments_post.py | 12 ++++++++---- ..._collections_data_collection_id_grids_post.py | 12 ++++++++---- ...llections_data_collection_id_position_post.py | 12 ++++++++---- ...lection_id_attachments_attachment_id_patch.py | 12 ++++++++---- ...ollection_id_attachments_attachment_id_get.py | 12 ++++++++---- ...ections_data_collection_id_attachments_get.py | 12 ++++++++---- ...ollections_data_collection_id_comments_get.py | 12 ++++++++---- ...on_data_collections_data_collection_id_get.py | 12 ++++++++---- ...a_collections_data_collection_id_grids_get.py | 12 ++++++++---- ...collection_id_image_quality_indicators_get.py | 12 ++++++++---- ...ollections_data_collection_id_position_get.py | 12 ++++++++---- ...ons_data_collection_id_processing_jobs_get.py | 12 ++++++++---- ...ta_collection_id_comments_comment_id_patch.py | 12 ++++++++---- ..._data_collections_data_collection_id_patch.py | 12 ++++++++---- ...lections_data_collection_id_position_patch.py | 12 ++++++++---- ...e_dewar_registry_entry_dewar_registry_post.py | 12 ++++++++---- ..._dewar_registry_entries_dewar_registry_get.py | 12 ++++++++---- ...try_entry_dewar_registry_facility_code_get.py | 12 ++++++++---- ...y_entry_dewar_registry_facility_code_patch.py | 12 ++++++++---- ..._container_dewars_dewar_id_containers_post.py | 12 ++++++++---- ...history_entry_dewars_dewar_id_history_post.py | 12 ++++++++---- .../dewars/edit_dewar_dewars_dewar_id_patch.py | 12 ++++++++---- .../dewars/get_dewar_dewars_dewar_id_get.py | 12 ++++++++---- ..._dewar_history_dewars_dewar_id_history_get.py | 12 ++++++++---- ...lans_dewars_dewar_id_diffraction_plans_get.py | 12 ++++++++---- ...ns_dewars_dewar_id_diffraction_plans_patch.py | 12 ++++++++---- ...iffraction_plans_diffraction_plan_id_patch.py | 12 ++++++++---- ...nergy_scan_energy_scans_energy_scan_id_get.py | 12 ++++++++---- ...rgy_scan_energy_scans_energy_scan_id_patch.py | 12 ++++++++---- ...nce_spectrums_fluorescence_spectrum_id_get.py | 12 ++++++++---- ...e_spectrums_fluorescence_spectrum_id_patch.py | 12 ++++++++---- ...grid_squares_grid_square_id_foil_holes_get.py | 12 ++++++++---- ...rid_square_grid_squares_grid_square_id_get.py | 12 ++++++++---- ...d_squares_grid_square_id_milling_steps_get.py | 12 ++++++++---- ..._grid_squares_grid_square_id_tomograms_get.py | 12 ++++++++---- ...rid_squares_grid_square_id_foil_holes_post.py | 12 ++++++++---- ..._squares_grid_square_id_milling_steps_post.py | 12 ++++++++---- ...id_squares_grid_square_id_foil_holes_patch.py | 12 ++++++++---- .../update_grid_grids_grid_info_id_patch.py | 12 ++++++++---- ..._ligands_ligand_id_pdb_entries_pdb_id_post.py | 12 ++++++++---- ...d_ligands_ligand_id_samples_sample_id_post.py | 12 ++++++++---- .../edit_ligand_ligands_ligand_id_patch.py | 12 ++++++++---- .../ligands/get_ligand_ligands_ligand_id_get.py | 12 ++++++++---- ...and_pdbs_ligands_ligand_id_pdb_entries_get.py | 12 ++++++++---- .../UNSTABLE_api/meta/get_version_version_get.py | 6 ++++-- ...n_correction_motion_correction_id_ctf_post.py | 12 ++++++++---- ...ion_correction_motion_correction_id_delete.py | 12 ++++++++---- ...s_data_collection_id_motion_correction_get.py | 12 ++++++++---- ...tion_correction_motion_correction_id_patch.py | 12 ++++++++---- ...auto_proc_attachment_mxlims_shipments_post.py | 12 ++++++++---- ..._pdb_entries_pdb_id_ligands_ligand_id_post.py | 12 ++++++++---- ...pdb_ligands_pdb_entries_pdb_id_ligands_get.py | 12 ++++++++---- .../persons/create_person_persons_post.py | 12 ++++++++---- .../delete_person_persons_person_id_delete.py | 12 ++++++++---- .../persons/get_person_persons_person_id_get.py | 12 ++++++++---- .../persons/get_persons_persons_get.py | 12 ++++++++---- ...ergroups_persons_person_id_user_groups_get.py | 12 ++++++++---- .../update_person_persons_person_id_patch.py | 12 ++++++++---- ...processing_job_id_processing_programs_post.py | 12 ++++++++---- ..._processing_job_id_processing_programs_get.py | 12 ++++++++---- ...sing_jobs_processing_job_id_parameters_get.py | 12 ++++++++---- ...sing_jobs_processing_job_id_parameters_put.py | 12 ++++++++---- ...rams_auto_proc_program_id_attachments_post.py | 12 ++++++++---- ...hments_auto_proc_program_attachment_id_get.py | 12 ++++++++---- ...grams_auto_proc_program_id_attachments_get.py | 12 ++++++++---- ...auto_proc_program_id_motion_correction_get.py | 12 ++++++++---- ...ents_auto_proc_program_attachment_id_patch.py | 12 ++++++++---- ...essing_programs_auto_proc_program_id_patch.py | 12 ++++++++---- ...proposal_reference_container_registry_post.py | 12 ++++++++---- ...ence_container_registry_barcode_or_id_post.py | 12 ++++++++---- ...proposals_proposal_reference_crystals_post.py | 12 ++++++++---- ...als_proposal_reference_dewar_registry_post.py | 12 ++++++++---- ...reference_dewar_registry_barcode_or_id_put.py | 12 ++++++++---- ...s_proposal_reference_shipments_upload_post.py | 12 ++++++++---- ..._proposals_proposal_reference_ligands_post.py | 12 ++++++++---- .../proposals/create_proposal_proposals_post.py | 12 ++++++++---- ...proposals_proposal_reference_proteins_post.py | 12 ++++++++---- ...proposals_proposal_reference_sessions_post.py | 12 ++++++++---- ...roposals_proposal_reference_shipments_post.py | 12 ++++++++---- ...ce_container_registry_barcode_or_id_delete.py | 12 ++++++++---- ...erence_dewar_registry_barcode_or_id_delete.py | 12 ++++++++---- ...oposal_proposals_proposal_reference_delete.py | 12 ++++++++---- ..._proposal_reference_container_registry_get.py | 12 ++++++++---- ...rence_container_registry_barcode_or_id_get.py | 12 ++++++++---- ...sals_proposal_reference_dewar_registry_get.py | 12 ++++++++---- ...reference_dewar_registry_facility_code_get.py | 12 ++++++++---- ...osals_proposal_reference_sample_events_get.py | 12 ++++++++---- ...posals_proposal_reference_lab_contacts_get.py | 12 ++++++++---- ...als_proposal_reference_processing_jobs_get.py | 12 ++++++++---- ...data_proposals_proposal_reference_data_get.py | 12 ++++++++---- ..._proposal_proposals_proposal_reference_get.py | 12 ++++++++---- ...s_proposals_proposal_reference_samples_get.py | 12 ++++++++---- ...proposals_proposal_reference_shipments_get.py | 12 ++++++++---- .../proposals/get_proposals_proposals_get.py | 12 ++++++++---- ..._proposals_proposal_reference_proteins_get.py | 12 ++++++++---- ..._proposals_proposal_reference_sessions_get.py | 12 ++++++++---- ...sal_proposals_proposal_reference_staff_get.py | 12 ++++++++---- ...nce_container_registry_barcode_or_id_patch.py | 12 ++++++++---- ...roposal_proposals_proposal_reference_patch.py | 12 ++++++++---- ..._crystal_proteins_protein_id_crystals_post.py | 12 ++++++++---- .../edit_protein_proteins_protein_id_patch.py | 12 ++++++++---- ..._crystals_proteins_protein_id_crystals_get.py | 12 ++++++++---- .../get_protein_proteins_protein_id_get.py | 12 ++++++++---- ..._actions_robot_action_id_laser_points_post.py | 12 ++++++++---- ...n_robot_actions_robot_action_id_laser_post.py | 12 ++++++++---- ...on_robot_actions_robot_action_id_laser_get.py | 12 ++++++++---- ...t_action_robot_actions_robot_action_id_get.py | 12 ++++++++---- ...ons_robot_action_id_laser_parameters_patch.py | 12 ++++++++---- ...action_robot_actions_robot_action_id_patch.py | 12 ++++++++---- ...image_sample_images_sample_image_id_delete.py | 12 ++++++++---- ...le_image_sample_images_sample_image_id_get.py | 12 ++++++++---- ..._image_sample_images_sample_image_id_patch.py | 12 ++++++++---- ...an_samples_sample_id_diffraction_plan_post.py | 12 ++++++++---- ...sample_image_samples_sample_id_images_post.py | 12 ++++++++---- ...d_samples_sample_id_ligands_ligand_id_post.py | 12 ++++++++---- ..._position_samples_sample_id_positions_post.py | 12 ++++++++---- .../samples/create_sample_samples_post.py | 12 ++++++++---- ...ples_sample_id_positions_position_id_patch.py | 12 ++++++++---- ...ositions_samples_sample_id_positions_patch.py | 12 ++++++++---- .../edit_sample_samples_sample_id_patch.py | 12 ++++++++---- ...ans_samples_sample_id_diffraction_plan_get.py | 12 ++++++++---- ...y_scans_samples_sample_id_energy_scans_get.py | 12 ++++++++---- ...sample_images_samples_sample_id_images_get.py | 12 ++++++++---- ...mple_ligands_samples_sample_id_ligands_get.py | 12 ++++++++---- ..._positions_samples_sample_id_positions_get.py | 12 ++++++++---- .../samples/get_sample_samples_sample_id_get.py | 12 ++++++++---- ...n_samples_sample_id_diffraction_plan_patch.py | 12 ++++++++---- ...nce_sessions_visit_number_data_groups_post.py | 12 ++++++++---- ...ce_sessions_visit_number_energy_scans_post.py | 12 ++++++++---- ...s_visit_number_fluorescence_spectrums_post.py | 12 ++++++++---- ...ference_sessions_visit_number_persons_post.py | 12 ++++++++---- ...e_sessions_visit_number_robot_actions_post.py | 12 ++++++++---- ...e_sessions_visit_number_session_types_post.py | 12 ++++++++---- ...d_sessions_session_uuid_session_types_post.py | 12 ++++++++---- ...sal_reference_sessions_visit_number_delete.py | 12 ++++++++---- .../sessions/get_beamlines_beamlines_get.py | 12 ++++++++---- ...ence_sessions_visit_number_data_groups_get.py | 12 ++++++++---- ...nce_sessions_visit_number_energy_scans_get.py | 12 ++++++++---- ...ns_visit_number_fluorescence_spectrums_get.py | 12 ++++++++---- ..._reference_sessions_visit_number_blobs_get.py | 12 ++++++++---- ...number_processing_programs_attachments_get.py | 12 ++++++++---- ...ce_sessions_visit_number_robot_actions_get.py | 12 ++++++++---- ...reference_sessions_visit_number_events_get.py | 12 ++++++++---- ...nce_sessions_visit_number_group_events_get.py | 12 ++++++++---- ...oposal_reference_sessions_visit_number_get.py | 12 ++++++++---- .../sessions/get_sessions_sessions_get.py | 12 ++++++++---- ...erence_sessions_visit_number_persons_patch.py | 12 ++++++++---- ..._sessions_visit_number_blobs_blob_id_patch.py | 12 ++++++++---- ...mber_processing_programs_attachments_patch.py | 12 ++++++++---- ...osal_reference_sessions_visit_number_patch.py | 12 ++++++++---- ...te_dewar_shipments_shipment_id_dewars_post.py | 12 ++++++++---- ...l_shipment_from_file_shipments_upload_post.py | 12 ++++++++---- .../edit_shipment_shipments_shipment_id_patch.py | 12 ++++++++---- ...et_dewars_shipments_shipment_id_dewars_get.py | 12 ++++++++---- ...hipments_shipment_id_diffraction_plans_get.py | 12 ++++++++---- ..._samples_shipments_shipment_id_samples_get.py | 12 ++++++++---- .../get_shipment_shipments_shipment_id_get.py | 12 ++++++++---- ...pments_shipment_id_diffraction_plans_patch.py | 12 ++++++++---- .../get_tomogram_tomograms_tomogram_id_get.py | 12 ++++++++---- ...earch_params_user_groups_search_params_get.py | 12 ++++++++---- ...user_groups_usergroup_id_search_params_get.py | 12 ++++++++---- ...get_usergroup_user_groups_usergroup_id_get.py | 12 ++++++++---- .../get_usergroups_user_groups_get.py | 12 ++++++++---- ...roup_user_groups_usergroup_id_persons_post.py | 12 ++++++++---- ..._groups_usergroup_id_persons_person_delete.py | 12 ++++++++---- src/lims_utils/expeye_client/client.py | 14 ++++++++------ src/lims_utils/expeye_client/errors.py | 3 ++- .../auto_proc_program_with_auto_proc_out.py | 4 ++-- .../models/auto_proc_with_scaling_out.py | 4 ++-- .../models/container_with_children_in.py | 2 +- .../models/container_with_children_out.py | 2 +- src/lims_utils/expeye_client/models/dewar_in.py | 4 ++-- .../expeye_client/models/dewar_optional.py | 4 ++-- src/lims_utils/expeye_client/models/dewar_out.py | 4 ++-- .../models/dewar_with_children_in.py | 10 +++++++--- .../models/dewar_with_children_out.py | 10 +++++++--- .../expeye_client/models/diffraction_plan_in.py | 16 ++++++++++++---- .../models/diffraction_plan_optional.py | 12 ++++++++---- .../expeye_client/models/diffraction_plan_out.py | 8 ++++---- .../expeye_client/models/full_movie_optional.py | 10 +++++----- .../expeye_client/models/full_movie_out.py | 10 +++++----- .../models/http_validation_error.py | 2 +- .../expeye_client/models/laser_action_in.py | 4 ++-- .../expeye_client/models/laser_action_out.py | 4 ++-- .../expeye_client/models/laser_point_list_in.py | 2 +- .../expeye_client/models/mx_lims_dewar.py | 6 +++--- .../models/mx_lims_full_shipment.py | 14 ++++++++------ .../models/mx_lims_full_shipment_dewar.py | 2 +- .../mx_lims_full_shipment_macromolecule.py | 2 +- .../mx_lims_full_shipment_macromoleculesample.py | 2 +- .../models/mx_lims_full_shipment_pin.py | 2 +- .../models/mx_lims_full_shipment_puck.py | 2 +- .../models/mx_lims_full_shipment_shipment.py | 2 +- .../models/mx_lims_macromolecule.py | 4 ++-- .../models/mx_lims_macromolecule_sample.py | 10 +++++++--- .../expeye_client/models/mx_lims_pin.py | 8 ++++---- .../expeye_client/models/mx_lims_puck.py | 6 +++--- .../expeye_client/models/mx_lims_shipment.py | 6 +++--- .../paged_auto_proc_program_attachment_out.py | 2 +- .../models/paged_auto_proc_program_out.py | 2 +- .../models/paged_container_history_out.py | 2 +- .../models/paged_container_inspection_out.py | 2 +- .../expeye_client/models/paged_container_out.py | 2 +- .../models/paged_container_queue_out.py | 2 +- .../expeye_client/models/paged_crystal_out.py | 2 +- .../models/paged_data_collection_comment_out.py | 2 +- .../paged_data_collection_file_attachment_out.py | 2 +- .../models/paged_data_collection_group_out.py | 2 +- .../models/paged_data_collection_out.py | 2 +- .../expeye_client/models/paged_dewar_out.py | 2 +- .../models/paged_dewar_transport_history_out.py | 2 +- .../models/paged_diffraction_plan_out.py | 2 +- .../models/paged_energy_scan_out.py | 2 +- .../models/paged_fluorescence_spectrum_out.py | 2 +- .../expeye_client/models/paged_foil_hole_out.py | 2 +- .../expeye_client/models/paged_full_movie_out.py | 2 +- .../expeye_client/models/paged_grid_info_out.py | 2 +- .../models/paged_grid_square_out.py | 2 +- .../models/paged_image_quality_indicator_out.py | 2 +- .../expeye_client/models/paged_ligand_out.py | 2 +- .../models/paged_milling_step_out.py | 2 +- .../models/paged_mxmr_run_blob_out.py | 2 +- .../expeye_client/models/paged_pdb_out.py | 2 +- .../expeye_client/models/paged_person_out.py | 2 +- ..._processing_job_with_auto_proc_program_out.py | 4 +++- .../expeye_client/models/paged_proposal_out.py | 2 +- .../expeye_client/models/paged_protein_out.py | 2 +- .../models/paged_registered_container_out.py | 2 +- .../models/paged_registered_dewar_out.py | 2 +- .../models/paged_robot_action_out.py | 2 +- .../models/paged_sample_image_out.py | 2 +- .../expeye_client/models/paged_sample_out.py | 2 +- .../models/paged_sample_position_out.py | 2 +- .../paged_session_event_with_children_out.py | 2 +- .../expeye_client/models/paged_session_out.py | 2 +- .../expeye_client/models/paged_shipment_out.py | 2 +- .../expeye_client/models/paged_tomogram_out.py | 2 +- ..._event_out_session_event_with_children_out.py | 6 +++--- .../models/paged_user_group_has_person_out.py | 2 +- .../paged_user_group_ldap_search_params.py | 2 +- .../expeye_client/models/paged_user_group_out.py | 2 +- .../expeye_client/models/person_with_role.py | 2 +- .../models/processing_job_parameters_in.py | 2 +- .../models/processing_job_parameters_out.py | 2 +- .../processing_job_with_auto_proc_program_out.py | 2 +- .../models/proposal_with_children_out.py | 2 +- .../models/protein_with_crystals_in.py | 2 +- .../models/protein_with_crystals_out.py | 2 +- .../expeye_client/models/registered_dewar_out.py | 2 +- src/lims_utils/expeye_client/models/sample_in.py | 2 +- ...ample_in_with_crystal_and_diffraction_plan.py | 10 +++++----- .../expeye_client/models/sample_out.py | 10 +++++----- .../models/sample_with_crystal_in.py | 4 ++-- .../models/session_event_with_children_out.py | 4 ++-- .../expeye_client/models/session_out.py | 2 +- .../expeye_client/models/shipment_in.py | 4 ++-- .../expeye_client/models/shipment_optional.py | 4 ++-- .../expeye_client/models/shipment_out.py | 4 ++-- .../models/shipment_with_children_in.py | 10 +++++++--- .../models/shipment_with_children_out.py | 10 +++++++--- .../expeye_client/models/shipping_data_out.py | 8 ++++---- .../models/user_group_ldap_search_params.py | 2 +- .../expeye_client/models/validation_error.py | 2 +- 305 files changed, 1861 insertions(+), 996 deletions(-) diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py index ac64c9d..244ed10 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/get_admin_var_admin_vars_admin_var_name_get.py @@ -68,7 +68,8 @@ def sync_detailed( admin_var_name (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( admin_var_name (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( admin_var_name (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( admin_var_name (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py index 0b643a9..b7c479b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/admin_vars/update_admin_var_admin_vars_admin_var_name_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (AdminVarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AdminVarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AdminVarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AdminVarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/create_atlas_data_groups_group_id_atlas_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/create_atlas_data_groups_group_id_atlas_post.py index 917f57b..0dad855 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/create_atlas_data_groups_group_id_atlas_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/create_atlas_data_groups_group_id_atlas_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (AtlasIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AtlasIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AtlasIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AtlasIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_data_groups_group_id_atlas_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_data_groups_group_id_atlas_get.py index a38090c..af4f89a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_data_groups_group_id_atlas_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_data_groups_group_id_atlas_get.py @@ -68,7 +68,8 @@ def sync_detailed( group_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( group_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( group_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( group_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py index ffc125e..3280f26 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/get_atlas_grid_squares_atlas_atlas_id_grid_squares_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -139,7 +140,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -178,7 +180,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -220,7 +223,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py index d9f9483..c998503 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/post_atlas_grid_squares_atlas_atlas_id_grid_squares_post.py @@ -87,7 +87,8 @@ def sync_detailed( body (list[GridSquareIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -121,7 +122,8 @@ def sync( body (list[GridSquareIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -150,7 +152,8 @@ async def asyncio_detailed( body (list[GridSquareIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +185,8 @@ async def asyncio( body (list[GridSquareIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/update_atlas_atlas_atlas_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/update_atlas_atlas_atlas_id_patch.py index e72612d..84f27a7 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/atlas/update_atlas_atlas_atlas_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/atlas/update_atlas_atlas_atlas_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (AtlasOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AtlasOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AtlasOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AtlasOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/contacts/get_lab_contact_contacts_lab_contact_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/contacts/get_lab_contact_contacts_lab_contact_id_get.py index 0f17101..fd04eb6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/contacts/get_lab_contact_contacts_lab_contact_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/contacts/get_lab_contact_contacts_lab_contact_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( lab_contact_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( lab_contact_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( lab_contact_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( lab_contact_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py index 4a2fb98..932db89 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/delete_container_inspection_container_inspections_container_inspection_id_delete.py @@ -66,7 +66,8 @@ def sync_detailed( container_inspection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( container_inspection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( container_inspection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( container_inspection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py index cde5a3b..6b7dcd5 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/get_sample_images_container_inspections_container_inspection_id_sample_images_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py index a136fa0..ad0d93b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_inspections/update_container_inspection_container_inspections_container_inspection_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerInspectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerInspectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerInspectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerInspectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entries_container_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entries_container_registry_get.py index 16c836e..456eff3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entries_container_registry_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entries_container_registry_get.py @@ -89,7 +89,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -127,7 +128,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -160,7 +162,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -196,7 +199,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py index 433450a..2c54963 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_container_registry_entry_container_registry_barcode_or_id_get.py @@ -79,7 +79,8 @@ def sync_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py index 26877e6..e7750a4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/get_containers_container_registry_barcode_or_id_containers_get.py @@ -90,7 +90,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -131,7 +132,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +169,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -206,7 +209,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py index 72a0375..063ff37 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/container_registry/update_container_registry_entry_container_registry_barcode_or_id_patch.py @@ -89,7 +89,8 @@ def sync_detailed( body (RegisteredContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -126,7 +127,8 @@ def sync( body (RegisteredContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -158,7 +160,8 @@ async def asyncio_detailed( body (RegisteredContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -193,7 +196,8 @@ async def asyncio( body (RegisteredContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_containers_container_id_containers_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_containers_container_id_containers_post.py index 14d6ed8..c16928b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_containers_container_id_containers_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_containers_container_id_containers_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_history_containers_container_id_history_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_history_containers_container_id_history_post.py index 7614e87..c2b8112 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_history_containers_container_id_history_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_history_containers_container_id_history_post.py @@ -89,7 +89,8 @@ def sync_detailed( body (ContainerHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -126,7 +127,8 @@ def sync( body (ContainerHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -158,7 +160,8 @@ async def asyncio_detailed( body (ContainerHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -193,7 +196,8 @@ async def asyncio( body (ContainerHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_inspection_containers_container_id_inspections_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_inspection_containers_container_id_inspections_post.py index e5aa2dd..884c34e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_inspection_containers_container_id_inspections_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_inspection_containers_container_id_inspections_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerInspectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerInspectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerInspectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerInspectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py index c790803..6c1f273 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_container_queue_entry_containers_container_id_container_queue_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_sample_containers_container_id_samples_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_sample_containers_container_id_samples_post.py index 58f419a..3b94c88 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_sample_containers_container_id_samples_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/create_sample_containers_container_id_samples_post.py @@ -107,7 +107,8 @@ def sync_detailed( SampleInWithCrystalAndDiffractionPlan): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +143,8 @@ def sync( SampleInWithCrystalAndDiffractionPlan): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( SampleInWithCrystalAndDiffractionPlan): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -205,7 +208,8 @@ async def asyncio( SampleInWithCrystalAndDiffractionPlan): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py index 4f2fe4a..b2142c8 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/delete_container_queue_entry_containers_container_id_container_queue_delete.py @@ -66,7 +66,8 @@ def sync_detailed( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/edit_container_containers_container_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/edit_container_containers_container_id_patch.py index 55ce137..5affebb 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/edit_container_containers_container_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/edit_container_containers_container_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_containers_container_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_containers_container_id_get.py index c02d0d8..1c2c866 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_containers_container_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_containers_container_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( container_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_history_containers_container_id_history_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_history_containers_container_id_history_get.py index a38f9e8..381aa47 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_history_containers_container_id_history_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_history_containers_container_id_history_get.py @@ -110,7 +110,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +155,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -193,7 +195,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -235,7 +238,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_inspections_containers_container_id_inspections_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_inspections_containers_container_id_inspections_get.py index 6e0031a..2c2b004 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_inspections_containers_container_id_inspections_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_inspections_containers_container_id_inspections_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py index 1a56cb6..46b805c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_container_queue_entries_containers_container_id_container_queue_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py index 96b4264..b956690 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_diffraction_plans_containers_container_id_diffraction_plans_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_samples_containers_container_id_samples_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_samples_containers_container_id_samples_get.py index 5d62af1..f84b80a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_samples_containers_container_id_samples_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/get_samples_containers_container_id_samples_get.py @@ -106,7 +106,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -151,7 +152,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -191,7 +193,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -234,7 +237,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/load_or_unload_puck_containers_container_id_assign_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/load_or_unload_puck_containers_container_id_assign_post.py index a3ff127..fe83083 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/load_or_unload_puck_containers_container_id_assign_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/load_or_unload_puck_containers_container_id_assign_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerLoad): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerLoad): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerLoad): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerLoad): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py index 50d190e..a52253b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_container_queue_entry_containers_container_id_container_queue_container_queue_id_patch.py @@ -83,7 +83,8 @@ def sync_detailed( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (ContainerQueueIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py index 4511b7e..1b7be20 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/containers/update_diffraction_plans_containers_container_id_diffraction_plans_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/crystals/get_crystal_crystals_crystal_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/get_crystal_crystals_crystal_id_get.py index 9cfd5f0..eaa57b6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/crystals/get_crystal_crystals_crystal_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/get_crystal_crystals_crystal_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( crystal_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( crystal_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( crystal_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( crystal_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/crystals/update_crystal_crystals_crystal_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/update_crystal_crystals_crystal_id_patch.py index 1a65985..fd83adc 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/crystals/update_crystal_crystals_crystal_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/crystals/update_crystal_crystals_crystal_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (CrystalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (CrystalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (CrystalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (CrystalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ctf/delete_ctf_ctf_ctf_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/delete_ctf_ctf_ctf_id_delete.py index af584c5..8bf1333 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ctf/delete_ctf_ctf_ctf_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/delete_ctf_ctf_ctf_id_delete.py @@ -66,7 +66,8 @@ def sync_detailed( ctf_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( ctf_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( ctf_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( ctf_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py index 8ce831e..41ec918 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/get_ctf_data_collections_data_collection_id_ctf_get.py @@ -73,7 +73,8 @@ def sync_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -104,7 +105,8 @@ def sync( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -130,7 +132,8 @@ async def asyncio_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -159,7 +162,8 @@ async def asyncio( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ctf/update_ctf_ctf_ctf_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/update_ctf_ctf_ctf_id_patch.py index 79b45ee..519fbac 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ctf/update_ctf_ctf_ctf_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ctf/update_ctf_ctf_ctf_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (CTFOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (CTFOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (CTFOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (CTFOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py index c9bd4b9..3820fdb 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/create_collection_data_groups_group_id_data_collections_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (DataCollectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DataCollectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DataCollectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DataCollectionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py index 21a51cf..f3bf20f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_collections_data_groups_group_id_data_collections_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -211,7 +214,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py index c4caad5..35df69c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/get_tomograms_for_dcg_data_groups_group_id_tomograms_get.py @@ -115,7 +115,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -162,7 +163,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -204,7 +206,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -249,7 +252,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py index 833d83b..eaa99c5 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collection_groups/update_data_collection_group_data_groups_group_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (DataCollectionGroupOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DataCollectionGroupOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DataCollectionGroupOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DataCollectionGroupOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py index f1468fb..390391a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_aperture_data_collections_data_collection_id_apertures_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ApertureIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ApertureIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ApertureIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ApertureIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py index 123fe57..8a7527b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_attachment_data_collections_data_collection_id_attachments_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (DataCollectionFileAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DataCollectionFileAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DataCollectionFileAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DataCollectionFileAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py index f00c58f..002fdc8 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_comment_data_collections_data_collection_id_comments_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (DataCollectionCommentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DataCollectionCommentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DataCollectionCommentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DataCollectionCommentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py index 2dfaeb9..78eb808 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_grid_data_collections_data_collection_id_grids_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (GridInfoIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (GridInfoIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (GridInfoIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (GridInfoIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_position_data_collections_data_collection_id_position_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_position_data_collections_data_collection_id_position_post.py index a324ad9..abc28c3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_position_data_collections_data_collection_id_position_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/create_position_data_collections_data_collection_id_position_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (PositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (PositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (PositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (PositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py index 46feb05..1cdd521 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/edit_attachment_data_collections_data_collection_id_attachments_attachment_id_patch.py @@ -83,7 +83,8 @@ def sync_detailed( body (DataCollectionFileAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (DataCollectionFileAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (DataCollectionFileAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (DataCollectionFileAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py index 472683e..167fcae 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachment_data_collections_data_collection_id_attachments_attachment_id_get.py @@ -72,7 +72,8 @@ def sync_detailed( attachment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( attachment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( attachment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( attachment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py index 48b9eea..dbc6799 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_attachments_data_collections_data_collection_id_attachments_get.py @@ -108,7 +108,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +153,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -191,7 +193,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -233,7 +236,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py index 2ce2afa..d2d17a2 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_comments_data_collections_data_collection_id_comments_get.py @@ -68,7 +68,8 @@ def sync_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_data_collection_data_collections_data_collection_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_data_collection_data_collections_data_collection_id_get.py index a3378a8..e8ac0d6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_data_collection_data_collections_data_collection_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_data_collection_data_collections_data_collection_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py index 33ef7c0..4f5168e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_grids_data_collections_data_collection_id_grids_get.py @@ -90,7 +90,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -131,7 +132,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +169,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -206,7 +209,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py index 65c47a2..f54f2b6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_image_quality_indicators_data_collections_data_collection_id_image_quality_indicators_get.py @@ -68,7 +68,8 @@ def sync_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_position_data_collections_data_collection_id_position_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_position_data_collections_data_collection_id_position_get.py index 4a6da7a..016ab9f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_position_data_collections_data_collection_id_position_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_position_data_collections_data_collection_id_position_get.py @@ -68,7 +68,8 @@ def sync_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( data_collection_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py index 7cabb7e..626e6b4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/get_processing_jobs_data_collections_data_collection_id_processing_jobs_get.py @@ -219,7 +219,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -298,7 +299,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -372,7 +374,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -449,7 +452,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py index a64f915..f7b4452 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_comment_data_collections_data_collection_id_comments_comment_id_patch.py @@ -83,7 +83,8 @@ def sync_detailed( body (DataCollectionCommentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (DataCollectionCommentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (DataCollectionCommentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (DataCollectionCommentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py index 3495bd0..c89eca3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_data_collection_data_collections_data_collection_id_patch.py @@ -89,7 +89,8 @@ def sync_detailed( body (DataCollectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -126,7 +127,8 @@ def sync( body (DataCollectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -158,7 +160,8 @@ async def asyncio_detailed( body (DataCollectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -193,7 +196,8 @@ async def asyncio( body (DataCollectionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_position_data_collections_data_collection_id_position_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_position_data_collections_data_collection_id_position_patch.py index 7ba2fec..40f9fea 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_position_data_collections_data_collection_id_position_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/data_collections/update_position_data_collections_data_collection_id_position_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (PositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (PositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (PositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (PositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py index de26267..38f2739 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/create_dewar_registry_entry_dewar_registry_post.py @@ -73,7 +73,8 @@ def sync_detailed( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -104,7 +105,8 @@ def sync( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -130,7 +132,8 @@ async def asyncio_detailed( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -159,7 +162,8 @@ async def asyncio( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py index 68d59bb..1bee84c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entries_dewar_registry_get.py @@ -89,7 +89,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -127,7 +128,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -160,7 +162,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -196,7 +199,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py index c01bb2e..7ab6d6c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/get_dewar_registry_entry_dewar_registry_facility_code_get.py @@ -68,7 +68,8 @@ def sync_detailed( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py index 000f256..6949b87 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewar_registry/update_dewar_registry_entry_dewar_registry_facility_code_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (RegisteredDewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (RegisteredDewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (RegisteredDewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (RegisteredDewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_container_dewars_dewar_id_containers_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_container_dewars_dewar_id_containers_post.py index cf07701..bf69703 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_container_dewars_dewar_id_containers_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_container_dewars_dewar_id_containers_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py index f5bb9b7..e79c26d 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/create_dewar_history_entry_dewars_dewar_id_history_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (DewarTransportHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DewarTransportHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DewarTransportHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DewarTransportHistoryIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/edit_dewar_dewars_dewar_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/edit_dewar_dewars_dewar_id_patch.py index 928df4e..355da47 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/edit_dewar_dewars_dewar_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/edit_dewar_dewars_dewar_id_patch.py @@ -90,7 +90,8 @@ def sync_detailed( body (DewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -128,7 +129,8 @@ def sync( body (DewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -161,7 +163,8 @@ async def asyncio_detailed( body (DewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -197,7 +200,8 @@ async def asyncio( body (DewarOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_dewars_dewar_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_dewars_dewar_id_get.py index dbd2c54..ecafc0d 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_dewars_dewar_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_dewars_dewar_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( dewar_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( dewar_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( dewar_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( dewar_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_history_dewars_dewar_id_history_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_history_dewars_dewar_id_history_get.py index bb9d9d8..7856775 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_history_dewars_dewar_id_history_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_dewar_history_dewars_dewar_id_history_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py index 09da8e1..de47733 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/get_diffraction_plans_dewars_dewar_id_diffraction_plans_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py index b79ea79..86e43fa 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/dewars/update_diffraction_plans_dewars_dewar_id_diffraction_plans_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py index f1b6054..7431ce2 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/diffraction_plans/update_diffraction_plan_diffraction_plans_diffraction_plan_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py index b488f04..c14245c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/get_energy_scan_energy_scans_energy_scan_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( energy_scan_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( energy_scan_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( energy_scan_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( energy_scan_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py index e0c6553..d2a4b28 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/energy_scans/update_energy_scan_energy_scans_energy_scan_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (EnergyScanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (EnergyScanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (EnergyScanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (EnergyScanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py index 622d7c4..ce86dd6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/get_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( fluorescence_spectrum_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( fluorescence_spectrum_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( fluorescence_spectrum_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( fluorescence_spectrum_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py index abf9c5b..7081d93 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/fluorescence_spectrums/update_fluorescence_spectrum_fluorescence_spectrums_fluorescence_spectrum_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (FluorescenceSpectrumOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (FluorescenceSpectrumOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (FluorescenceSpectrumOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (FluorescenceSpectrumOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py index 91bfbf6..625c62b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py index d104967..333b228 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_grid_squares_grid_square_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( grid_square_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( grid_square_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( grid_square_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( grid_square_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py index 0ae2be5..b8a9916 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py index 2a6a458..9d49c0a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/get_tomograms_grid_squares_grid_square_id_tomograms_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py index 985e8d3..619573f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_foil_holes_grid_squares_grid_square_id_foil_holes_post.py @@ -87,7 +87,8 @@ def sync_detailed( body (list[FoilHoleIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -121,7 +122,8 @@ def sync( body (list[FoilHoleIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -150,7 +152,8 @@ async def asyncio_detailed( body (list[FoilHoleIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +185,8 @@ async def asyncio( body (list[FoilHoleIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py index 0d5b061..779a1e4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/post_grid_square_milling_steps_grid_squares_grid_square_id_milling_steps_post.py @@ -87,7 +87,8 @@ def sync_detailed( body (list[MillingStepIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -121,7 +122,8 @@ def sync( body (list[MillingStepIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -150,7 +152,8 @@ async def asyncio_detailed( body (list[MillingStepIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +185,8 @@ async def asyncio( body (list[MillingStepIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py index f7a558d..22c8d9e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grid_squares/update_foil_holes_in_grid_square_grid_squares_grid_square_id_foil_holes_patch.py @@ -82,7 +82,8 @@ def sync_detailed( body (list[FoilHoleOptionalWithId]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -116,7 +117,8 @@ def sync( body (list[FoilHoleOptionalWithId]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -145,7 +147,8 @@ async def asyncio_detailed( body (list[FoilHoleOptionalWithId]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -177,7 +180,8 @@ async def asyncio( body (list[FoilHoleOptionalWithId]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/grids/update_grid_grids_grid_info_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/grids/update_grid_grids_grid_info_id_patch.py index a266a83..0d20208 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/grids/update_grid_grids_grid_info_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/grids/update_grid_grids_grid_info_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (GridInfoOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (GridInfoOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (GridInfoOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (GridInfoOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py index 8f3062f..f5a1415 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_pdb_ligand_ligands_ligand_id_pdb_entries_pdb_id_post.py @@ -72,7 +72,8 @@ def sync_detailed( pdb_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( pdb_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( pdb_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( pdb_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py index 5d5ab1a..6bafefa 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/create_sample_ligand_ligands_ligand_id_samples_sample_id_post.py @@ -72,7 +72,8 @@ def sync_detailed( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/edit_ligand_ligands_ligand_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/edit_ligand_ligands_ligand_id_patch.py index 03b3897..3b0d47d 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/edit_ligand_ligands_ligand_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/edit_ligand_ligands_ligand_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (LigandOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (LigandOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (LigandOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (LigandOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_ligands_ligand_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_ligands_ligand_id_get.py index 2145e74..7d36322 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_ligands_ligand_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_ligands_ligand_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py index f7ebffc..0830403 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/ligands/get_ligand_pdbs_ligands_ligand_id_pdb_entries_get.py @@ -105,7 +105,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -149,7 +150,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -188,7 +190,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -230,7 +233,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/meta/get_version_version_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/meta/get_version_version_get.py index 57d6f40..0a62873 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/meta/get_version_version_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/meta/get_version_version_get.py @@ -46,7 +46,8 @@ def sync_detailed( Get the current version of the API Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -71,7 +72,8 @@ async def asyncio_detailed( Get the current version of the API Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py index 8fd2d08..61876c8 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/motion/create_ctf_motion_correction_motion_correction_id_ctf_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (CTFIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (CTFIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (CTFIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (CTFIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py index bccc5de..13ef2ba 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/motion/delete_motion_correction_motion_correction_motion_correction_id_delete.py @@ -66,7 +66,8 @@ def sync_detailed( motion_correction_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( motion_correction_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( motion_correction_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( motion_correction_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py index 20aced9..28bba21 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/motion/get_motion_correction_data_collections_data_collection_id_motion_correction_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py index 8b2ca43..f058ed3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/motion/update_motion_correction_motion_correction_motion_correction_id_patch.py @@ -81,7 +81,8 @@ def sync_detailed( body (FullMovieOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -117,7 +118,8 @@ def sync( body (FullMovieOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -148,7 +150,8 @@ async def asyncio_detailed( body (FullMovieOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +185,8 @@ async def asyncio( body (FullMovieOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py index d04ec35..8c47aa2 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/mx_lims_shipments/create_auto_proc_attachment_mxlims_shipments_post.py @@ -71,7 +71,8 @@ def sync_detailed( body (MxLimsFullShipment): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -102,7 +103,8 @@ def sync( body (MxLimsFullShipment): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -128,7 +130,8 @@ async def asyncio_detailed( body (MxLimsFullShipment): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -157,7 +160,8 @@ async def asyncio( body (MxLimsFullShipment): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py index aa87549..af1a359 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/create_pdb_ligand_pdb_entries_pdb_id_ligands_ligand_id_post.py @@ -72,7 +72,8 @@ def sync_detailed( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py index 99d909b..a45632a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/pdb_entries/get_pdb_ligands_pdb_entries_pdb_id_ligands_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -211,7 +214,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/persons/create_person_persons_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/create_person_persons_post.py index e539dfc..5726f66 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/persons/create_person_persons_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/persons/create_person_persons_post.py @@ -73,7 +73,8 @@ def sync_detailed( body (PersonIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -104,7 +105,8 @@ def sync( body (PersonIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -130,7 +132,8 @@ async def asyncio_detailed( body (PersonIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -159,7 +162,8 @@ async def asyncio( body (PersonIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/persons/delete_person_persons_person_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/delete_person_persons_person_id_delete.py index 8fe367a..97d0c6e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/persons/delete_person_persons_person_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/persons/delete_person_persons_person_id_delete.py @@ -66,7 +66,8 @@ def sync_detailed( person_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( person_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( person_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( person_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_person_persons_person_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_person_persons_person_id_get.py index ec34991..5c15e68 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_person_persons_person_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_person_persons_person_id_get.py @@ -69,7 +69,8 @@ def sync_detailed( person_id (int | UUID): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -100,7 +101,8 @@ def sync( person_id (int | UUID): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -126,7 +128,8 @@ async def asyncio_detailed( person_id (int | UUID): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -155,7 +158,8 @@ async def asyncio( person_id (int | UUID): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_persons_persons_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_persons_persons_get.py index 5ae9659..ff0c376 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_persons_persons_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_persons_persons_get.py @@ -89,7 +89,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -130,7 +131,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -166,7 +168,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -205,7 +208,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_usergroups_persons_person_id_user_groups_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_usergroups_persons_person_id_user_groups_get.py index 7af643e..9186646 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_usergroups_persons_person_id_user_groups_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/persons/get_usergroups_persons_person_id_user_groups_get.py @@ -86,7 +86,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -124,7 +125,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -157,7 +159,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -193,7 +196,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/persons/update_person_persons_person_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/persons/update_person_persons_person_id_patch.py index 29bc8d8..01e1a07 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/persons/update_person_persons_person_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/persons/update_person_persons_person_id_patch.py @@ -80,7 +80,8 @@ def sync_detailed( body (PersonOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -114,7 +115,8 @@ def sync( body (PersonOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -143,7 +145,8 @@ async def asyncio_detailed( body (PersonOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -175,7 +178,8 @@ async def asyncio( body (PersonOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py index 612e56f..7abc070 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/create_auto_processing_program_processing_jobs_processing_job_id_processing_programs_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (AutoProcProgramIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AutoProcProgramIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AutoProcProgramIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AutoProcProgramIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py index 5d36124..3584505 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_auto_processing_programs_processing_jobs_processing_job_id_processing_programs_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py index 54c23c6..05ba394 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/get_processing_job_parameters_processing_jobs_processing_job_id_parameters_get.py @@ -68,7 +68,8 @@ def sync_detailed( processing_job_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( processing_job_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( processing_job_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( processing_job_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py index 08b43e9..a98d30b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_jobs/upsert_processing_job_parameters_processing_jobs_processing_job_id_parameters_put.py @@ -79,7 +79,8 @@ def sync_detailed( body (ProcessingJobParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ProcessingJobParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ProcessingJobParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ProcessingJobParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py index fdd94ca..53f6075 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/create_auto_proc_attachment_processing_programs_auto_proc_program_id_attachments_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (AutoProcProgramAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AutoProcProgramAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AutoProcProgramAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AutoProcProgramAttachmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py index 5744644..5f0c502 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachment_processing_programs_auto_proc_program_id_attachments_auto_proc_program_attachment_id_get.py @@ -72,7 +72,8 @@ def sync_detailed( auto_proc_program_attachment_id (Any): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( auto_proc_program_attachment_id (Any): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( auto_proc_program_attachment_id (Any): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( auto_proc_program_attachment_id (Any): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py index 58a320f..a44e6a4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_auto_proc_program_attachments_processing_programs_auto_proc_program_id_attachments_get.py @@ -135,7 +135,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -188,7 +189,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -236,7 +238,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -287,7 +290,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py index 68d4940..fe7ddcc 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/get_motion_correction_processing_programs_auto_proc_program_id_motion_correction_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py index 5549263..cd7a375 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_proc_attachment_processing_programs_attachments_auto_proc_program_attachment_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py index 59b6d19..437651d 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/processing_programs/update_auto_processing_program_processing_programs_auto_proc_program_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (AutoProcProgramOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (AutoProcProgramOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (AutoProcProgramOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (AutoProcProgramOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py index 4792982..f4c275a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_entry_proposals_proposal_reference_container_registry_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (RegisteredContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (RegisteredContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (RegisteredContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (RegisteredContainerIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py index 25434f1..f515741 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_post.py @@ -93,7 +93,8 @@ def sync_detailed( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -133,7 +134,8 @@ def sync( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -168,7 +170,8 @@ async def asyncio_detailed( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -206,7 +209,8 @@ async def asyncio( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py index 3d5ea1e..622f6de 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_crystals_proposals_proposal_reference_crystals_post.py @@ -98,7 +98,8 @@ def sync_detailed( body (list[ProteinWithCrystalsIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( body (list[ProteinWithCrystalsIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -169,7 +171,8 @@ async def asyncio_detailed( body (list[ProteinWithCrystalsIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -205,7 +208,8 @@ async def asyncio( body (list[ProteinWithCrystalsIn]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py index e627566..efd4cd4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_entry_proposals_proposal_reference_dewar_registry_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (RegisteredDewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py index 6a4b060..e03477b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_put.py @@ -93,7 +93,8 @@ def sync_detailed( body (RegisteredDewarHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -133,7 +134,8 @@ def sync( body (RegisteredDewarHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -168,7 +170,8 @@ async def asyncio_detailed( body (RegisteredDewarHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -206,7 +209,8 @@ async def asyncio( body (RegisteredDewarHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py index 81085b7..b29154b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_full_shipment_from_json_proposals_proposal_reference_shipments_upload_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ShipmentWithChildrenIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ShipmentWithChildrenIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ShipmentWithChildrenIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ShipmentWithChildrenIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py index 68d37bf..439105f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_ligand_proposals_proposal_reference_ligands_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (LigandIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (LigandIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (LigandIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (LigandIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_proposals_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_proposals_post.py index 0e6be11..a09f2fb 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_proposals_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_proposal_proposals_post.py @@ -73,7 +73,8 @@ def sync_detailed( body (ProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -104,7 +105,8 @@ def sync( body (ProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -130,7 +132,8 @@ async def asyncio_detailed( body (ProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -159,7 +162,8 @@ async def asyncio( body (ProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_protein_proposals_proposal_reference_proteins_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_protein_proposals_proposal_reference_proteins_post.py index f983ae2..aa22c8e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_protein_proposals_proposal_reference_proteins_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_protein_proposals_proposal_reference_proteins_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ProteinIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ProteinIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ProteinIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ProteinIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_session_proposals_proposal_reference_sessions_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_session_proposals_proposal_reference_sessions_post.py index 221036a..0969c28 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_session_proposals_proposal_reference_sessions_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_session_proposals_proposal_reference_sessions_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (SessionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (SessionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (SessionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (SessionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py index 13e869b..e80ae1e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/create_shipment_proposals_proposal_reference_shipments_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (ShipmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ShipmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ShipmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ShipmentIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py index 6291140..0441372 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_container_registry_has_proposal_entry_proposals_proposal_reference_container_registry_barcode_or_id_delete.py @@ -81,7 +81,8 @@ def sync_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -118,7 +119,8 @@ def sync( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -150,7 +152,8 @@ async def asyncio_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -185,7 +188,8 @@ async def asyncio( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py index 593c76f..6d2d668 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_dewar_registry_has_proposal_entry_proposals_proposal_reference_dewar_registry_barcode_or_id_delete.py @@ -81,7 +81,8 @@ def sync_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -118,7 +119,8 @@ def sync( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -150,7 +152,8 @@ async def asyncio_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -185,7 +188,8 @@ async def asyncio( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_proposal_proposals_proposal_reference_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_proposal_proposals_proposal_reference_delete.py index 6d251e2..4eeec98 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_proposal_proposals_proposal_reference_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/delete_proposal_proposals_proposal_reference_delete.py @@ -66,7 +66,8 @@ def sync_detailed( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py index 3bfb133..432dea3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entries_proposals_proposal_reference_container_registry_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -211,7 +214,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py index a4be86d..1295dd9 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_get.py @@ -83,7 +83,8 @@ def sync_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( is_barcode (bool | Unset): Default: True. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py index f7bc973..01cd442 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entries_proposals_proposal_reference_dewar_registry_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -211,7 +214,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py index 6cd6416..a1f7f87 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_dewar_registry_entry_proposals_proposal_reference_dewar_registry_facility_code_get.py @@ -72,7 +72,8 @@ def sync_detailed( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( facility_code (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_events_proposals_proposal_reference_sample_events_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_events_proposals_proposal_reference_sample_events_get.py index 17a26f2..eae9db9 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_events_proposals_proposal_reference_sample_events_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_events_proposals_proposal_reference_sample_events_get.py @@ -120,7 +120,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +168,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -209,7 +211,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -254,7 +257,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py index 0797de2..7be2b62 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_lab_contacts_for_proposal_proposals_proposal_reference_lab_contacts_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py index ff51dfd..5e694e2 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_processing_jobs_proposals_proposal_reference_processing_jobs_get.py @@ -232,7 +232,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -314,7 +315,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -391,7 +393,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -471,7 +474,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py index 41749e0..30a3a56 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_data_proposals_proposal_reference_data_get.py @@ -68,7 +68,8 @@ def sync_detailed( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_proposals_proposal_reference_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_proposals_proposal_reference_get.py index 0750c29..a236f37 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_proposals_proposal_reference_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_proposals_proposal_reference_get.py @@ -68,7 +68,8 @@ def sync_detailed( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( proposal_reference (str): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py index 07b6d01..da4dddd 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_samples_proposals_proposal_reference_samples_get.py @@ -106,7 +106,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -151,7 +152,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -191,7 +193,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -234,7 +237,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py index 38945b2..fe032bc 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposal_shipments_proposals_proposal_reference_shipments_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposals_proposals_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposals_proposals_get.py index 25a9f76..f4e3423 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposals_proposals_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proposals_proposals_get.py @@ -104,7 +104,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +155,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -199,7 +201,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -247,7 +250,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py index 94e4bce..762e5fe 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_proteins_proposals_proposal_reference_proteins_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py index 0ee07f8..83888a6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_sessions_proposals_proposal_reference_sessions_get.py @@ -118,7 +118,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -171,7 +172,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -219,7 +221,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -270,7 +273,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py index 789c810..0c4fe1b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/get_staff_for_proposal_proposals_proposal_reference_staff_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py index f1d7dad..2ccef40 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_container_registry_entry_proposals_proposal_reference_container_registry_barcode_or_id_patch.py @@ -93,7 +93,8 @@ def sync_detailed( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -133,7 +134,8 @@ def sync( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -168,7 +170,8 @@ async def asyncio_detailed( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -206,7 +209,8 @@ async def asyncio( body (RegisteredContainerHasProposalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_proposal_proposals_proposal_reference_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_proposal_proposals_proposal_reference_patch.py index d188093..f6de579 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_proposal_proposals_proposal_reference_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proposals/update_proposal_proposals_proposal_reference_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (ProposalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ProposalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ProposalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ProposalOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/create_crystal_proteins_protein_id_crystals_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/create_crystal_proteins_protein_id_crystals_post.py index 2add58e..22d6ba3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/create_crystal_proteins_protein_id_crystals_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/create_crystal_proteins_protein_id_crystals_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (CrystalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (CrystalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (CrystalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (CrystalIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/edit_protein_proteins_protein_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/edit_protein_proteins_protein_id_patch.py index 453a1f4..5e24383 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/edit_protein_proteins_protein_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/edit_protein_proteins_protein_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (ProteinOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ProteinOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ProteinOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ProteinOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_crystals_proteins_protein_id_crystals_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_crystals_proteins_protein_id_crystals_get.py index ef14069..b8119a4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_crystals_proteins_protein_id_crystals_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_crystals_proteins_protein_id_crystals_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_protein_proteins_protein_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_protein_proteins_protein_id_get.py index 1cb0ab7..a35cc10 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_protein_proteins_protein_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/proteins/get_protein_proteins_protein_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( protein_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( protein_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( protein_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( protein_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py index ab068e5..671af1c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/add_laser_points_robot_actions_robot_action_id_laser_points_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (LaserPointListIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (LaserPointListIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (LaserPointListIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (LaserPointListIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py index eba5d2f..f2f3d00 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/create_laser_action_robot_actions_robot_action_id_laser_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (LaserActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (LaserActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (LaserActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (LaserActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py index 342ab68..475794f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_laser_action_robot_actions_robot_action_id_laser_get.py @@ -68,7 +68,8 @@ def sync_detailed( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py index 91a53d7..dc1f61b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/get_robot_action_robot_actions_robot_action_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( robot_action_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py index 45bfe97..ac55939 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_laser_parameters_robot_actions_robot_action_id_laser_parameters_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (LaserParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (LaserParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (LaserParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (LaserParametersIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py index fa84cea..499f15e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/robot_actions/update_robot_action_robot_actions_robot_action_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (RobotActionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (RobotActionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (RobotActionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (RobotActionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py index e3c221b..8be65f6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/delete_sample_image_sample_images_sample_image_id_delete.py @@ -66,7 +66,8 @@ def sync_detailed( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -97,7 +98,8 @@ def sync( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +125,8 @@ async def asyncio_detailed( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +155,8 @@ async def asyncio( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/get_sample_image_sample_images_sample_image_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/get_sample_image_sample_images_sample_image_id_get.py index 65f36c1..47839dc 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/get_sample_image_sample_images_sample_image_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/get_sample_image_sample_images_sample_image_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( sample_image_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py index a5cb916..3dc9d98 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sample_images/update_sample_image_sample_images_sample_image_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (SampleImageOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (SampleImageOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (SampleImageOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (SampleImageOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py index 2a8bca4..e932423 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_diffraction_plan_samples_sample_id_diffraction_plan_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (DiffractionPlanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DiffractionPlanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DiffractionPlanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DiffractionPlanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_image_samples_sample_id_images_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_image_samples_sample_id_images_post.py index 783c82c..c492fc6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_image_samples_sample_id_images_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_image_samples_sample_id_images_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (SampleImageIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (SampleImageIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (SampleImageIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (SampleImageIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py index a2a705d..a96415f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_ligand_samples_sample_id_ligands_ligand_id_post.py @@ -72,7 +72,8 @@ def sync_detailed( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( ligand_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_position_samples_sample_id_positions_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_position_samples_sample_id_positions_post.py index 85d6949..f47b66b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_position_samples_sample_id_positions_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_position_samples_sample_id_positions_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (SamplePositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (SamplePositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (SamplePositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (SamplePositionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_samples_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_samples_post.py index 625e1e7..1ba818b 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_samples_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/create_sample_samples_post.py @@ -95,7 +95,8 @@ def sync_detailed( body (SampleIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -127,7 +128,8 @@ def sync( body (SampleIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +156,8 @@ async def asyncio_detailed( body (SampleIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -184,7 +187,8 @@ async def asyncio( body (SampleIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py index ff3c0b6..e161ffe 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_position_samples_sample_id_positions_position_id_patch.py @@ -83,7 +83,8 @@ def sync_detailed( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_positions_samples_sample_id_positions_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_positions_samples_sample_id_positions_patch.py index be9a88c..df21089 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_positions_samples_sample_id_positions_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_positions_samples_sample_id_positions_patch.py @@ -94,7 +94,8 @@ def sync_detailed( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -131,7 +132,8 @@ def sync( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -163,7 +165,8 @@ async def asyncio_detailed( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -198,7 +201,8 @@ async def asyncio( body (SamplePositionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_samples_sample_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_samples_sample_id_patch.py index 9e585e2..3e0039c 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_samples_sample_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/edit_sample_samples_sample_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (SampleOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (SampleOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (SampleOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (SampleOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py index ff4d9b3..c8b0460 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_diffraction_plans_samples_sample_id_diffraction_plan_get.py @@ -68,7 +68,8 @@ def sync_detailed( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py index c5b8bdf..5bb8358 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_energy_scans_samples_sample_id_energy_scans_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_images_samples_sample_id_images_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_images_samples_sample_id_images_get.py index 21e0c54..b86cbd2 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_images_samples_sample_id_images_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_images_samples_sample_id_images_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_ligands_samples_sample_id_ligands_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_ligands_samples_sample_id_ligands_get.py index ca2f9ff..b209058 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_ligands_samples_sample_id_ligands_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_ligands_samples_sample_id_ligands_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -211,7 +214,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_positions_samples_sample_id_positions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_positions_samples_sample_id_positions_get.py index bd9188c..65897d4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_positions_samples_sample_id_positions_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_positions_samples_sample_id_positions_get.py @@ -95,7 +95,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -136,7 +137,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -172,7 +174,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -211,7 +214,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_samples_sample_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_samples_sample_id_get.py index 48dc751..8385ae1 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_samples_sample_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/get_sample_samples_sample_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( sample_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py index 3a09e17..6de3af6 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/samples/update_diffraction_plan_samples_sample_id_diffraction_plan_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py index 70a0b0c..8c573a2 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_data_collection_group_proposals_proposal_reference_sessions_visit_number_data_groups_post.py @@ -83,7 +83,8 @@ def sync_detailed( body (DataCollectionGroupIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (DataCollectionGroupIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (DataCollectionGroupIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (DataCollectionGroupIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py index 0213a0d..e1f2c7d 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_post.py @@ -83,7 +83,8 @@ def sync_detailed( body (EnergyScanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (EnergyScanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (EnergyScanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (EnergyScanIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py index bfc951b..25dcba3 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_fluorescence_spectrum_params_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_post.py @@ -83,7 +83,8 @@ def sync_detailed( body (FluorescenceSpectrumIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (FluorescenceSpectrumIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (FluorescenceSpectrumIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (FluorescenceSpectrumIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py index 7ed29a8..98901d9 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_persons_proposals_proposal_reference_sessions_visit_number_persons_post.py @@ -86,7 +86,8 @@ def sync_detailed( body (list[PersonWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( body (list[PersonWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -155,7 +157,8 @@ async def asyncio_detailed( body (list[PersonWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -190,7 +193,8 @@ async def asyncio( body (list[PersonWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py index e1dadaf..5a23cbc 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_robot_action_proposals_proposal_reference_sessions_visit_number_robot_actions_post.py @@ -83,7 +83,8 @@ def sync_detailed( body (RobotActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (RobotActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (RobotActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (RobotActionIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py index 0c5df56..81f2b4f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_proposals_proposal_reference_sessions_visit_number_session_types_post.py @@ -83,7 +83,8 @@ def sync_detailed( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py index f2968b4..54aea12 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/create_session_type_through_uuid_sessions_session_uuid_session_types_post.py @@ -80,7 +80,8 @@ def sync_detailed( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -114,7 +115,8 @@ def sync( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -143,7 +145,8 @@ async def asyncio_detailed( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -175,7 +178,8 @@ async def asyncio( body (SessionTypeIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py index 51207be..7fe8a28 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/delete_session_proposals_proposal_reference_sessions_visit_number_delete.py @@ -70,7 +70,8 @@ def sync_detailed( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -104,7 +105,8 @@ def sync( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -133,7 +135,8 @@ async def asyncio_detailed( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -165,7 +168,8 @@ async def asyncio( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_beamlines_beamlines_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_beamlines_beamlines_get.py index 98b40ef..d7a2212 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_beamlines_beamlines_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_beamlines_beamlines_get.py @@ -48,7 +48,8 @@ def sync_detailed( Get individual beamlines Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -73,7 +74,8 @@ def sync( Get individual beamlines Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -94,7 +96,8 @@ async def asyncio_detailed( Get individual beamlines Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -117,7 +120,8 @@ async def asyncio( Get individual beamlines Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py index 7e83f1e..c267245 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_collection_groups_proposals_proposal_reference_sessions_visit_number_data_groups_get.py @@ -99,7 +99,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -143,7 +144,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +184,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -224,7 +227,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py index 9035dc2..0295017 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_energy_scans_proposals_proposal_reference_sessions_visit_number_energy_scans_get.py @@ -89,7 +89,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -130,7 +131,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -166,7 +168,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -205,7 +208,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py index 3e6b35f..81d0a50 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_fluorescence_spectrum_params_list_proposals_proposal_reference_sessions_visit_number_fluorescence_spectrums_get.py @@ -99,7 +99,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -143,7 +144,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +184,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -224,7 +227,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py index 074bd7a..68d0bfa 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_mxmrrun_blobs_proposals_proposal_reference_sessions_visit_number_blobs_get.py @@ -99,7 +99,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -143,7 +144,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +184,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -224,7 +227,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py index fe2bfdb..d74ced5 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_get.py @@ -116,7 +116,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -168,7 +169,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -215,7 +217,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -265,7 +268,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py index a0ed96e..986c660 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_robot_actions_proposals_proposal_reference_sessions_visit_number_robot_actions_get.py @@ -99,7 +99,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -143,7 +144,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -182,7 +184,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -224,7 +227,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py index 8e6a626..51be347 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_events_proposals_proposal_reference_sessions_visit_number_events_get.py @@ -135,7 +135,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -188,7 +189,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -236,7 +238,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -287,7 +290,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py index e4926d9..3796f39 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_group_events_proposals_proposal_reference_sessions_visit_number_group_events_get.py @@ -130,7 +130,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -184,7 +185,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -233,7 +235,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -285,7 +288,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py index 4aaaf91..092b417 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_session_proposals_proposal_reference_sessions_visit_number_get.py @@ -72,7 +72,8 @@ def sync_detailed( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -106,7 +107,8 @@ def sync( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -135,7 +137,8 @@ async def asyncio_detailed( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -167,7 +170,8 @@ async def asyncio( visit_number (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_sessions_sessions_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_sessions_sessions_get.py index 72a33cd..022301a 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_sessions_sessions_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/get_sessions_sessions_get.py @@ -176,7 +176,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -241,7 +242,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -301,7 +303,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -364,7 +367,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py index 56c558d..124c1a5 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/include_persons_in_session_proposals_proposal_reference_sessions_visit_number_persons_patch.py @@ -86,7 +86,8 @@ def sync_detailed( body (list[PersonIdWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( body (list[PersonIdWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -155,7 +157,8 @@ async def asyncio_detailed( body (list[PersonIdWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -190,7 +193,8 @@ async def asyncio( body (list[PersonIdWithRole]): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py index 16d9300..5039f32 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_mxmrrun_blob_proposals_proposal_reference_sessions_visit_number_blobs_blob_id_patch.py @@ -87,7 +87,8 @@ def sync_detailed( body (MXMRRunBlobOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -127,7 +128,8 @@ def sync( body (MXMRRunBlobOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -162,7 +164,8 @@ async def asyncio_detailed( body (MXMRRunBlobOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -200,7 +203,8 @@ async def asyncio( body (MXMRRunBlobOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py index 5ea6bbf..6136d64 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_processing_program_attachments_proposals_proposal_reference_sessions_visit_number_processing_programs_attachments_patch.py @@ -115,7 +115,8 @@ def sync_detailed( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -163,7 +164,8 @@ def sync( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -206,7 +208,8 @@ async def asyncio_detailed( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -252,7 +255,8 @@ async def asyncio( body (AutoProcProgramAttachmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py index d12bee3..9f416a5 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/sessions/update_session_proposals_proposal_reference_sessions_visit_number_patch.py @@ -83,7 +83,8 @@ def sync_detailed( body (SessionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (SessionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -152,7 +154,8 @@ async def asyncio_detailed( body (SessionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -187,7 +190,8 @@ async def asyncio( body (SessionOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_dewar_shipments_shipment_id_dewars_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_dewar_shipments_shipment_id_dewars_post.py index 4c26a64..cc94535 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_dewar_shipments_shipment_id_dewars_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_dewar_shipments_shipment_id_dewars_post.py @@ -79,7 +79,8 @@ def sync_detailed( body (DewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DewarIn): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_full_shipment_from_file_shipments_upload_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_full_shipment_from_file_shipments_upload_post.py index f34f7a8..5e88cdf 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_full_shipment_from_file_shipments_upload_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/create_full_shipment_from_file_shipments_upload_post.py @@ -96,7 +96,8 @@ def sync_detailed( body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -138,7 +139,8 @@ def sync( body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -175,7 +177,8 @@ async def asyncio_detailed( body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -215,7 +218,8 @@ async def asyncio( body (BodyCreateFullShipmentFromFileShipmentsUploadPost | Unset): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/edit_shipment_shipments_shipment_id_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/edit_shipment_shipments_shipment_id_patch.py index 6afad1a..6a3cf15 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/edit_shipment_shipments_shipment_id_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/edit_shipment_shipments_shipment_id_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (ShipmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (ShipmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (ShipmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (ShipmentOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_dewars_shipments_shipment_id_dewars_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_dewars_shipments_shipment_id_dewars_get.py index da7bfb7..fcd0736 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_dewars_shipments_shipment_id_dewars_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_dewars_shipments_shipment_id_dewars_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py index 30e0271..3e2ab54 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_diffraction_plans_shipments_shipment_id_diffraction_plans_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_samples_shipments_shipment_id_samples_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_samples_shipments_shipment_id_samples_get.py index 2304a13..384e018 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_samples_shipments_shipment_id_samples_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_samples_shipments_shipment_id_samples_get.py @@ -106,7 +106,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -151,7 +152,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -191,7 +193,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -234,7 +237,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_shipment_shipments_shipment_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_shipment_shipments_shipment_id_get.py index b8d46f1..43112e4 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_shipment_shipments_shipment_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/get_shipment_shipments_shipment_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( shipment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( shipment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( shipment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( shipment_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py index e2926e9..5c83b2f 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/shipments/update_diffraction_plans_shipments_shipment_id_diffraction_plans_patch.py @@ -79,7 +79,8 @@ def sync_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -113,7 +114,8 @@ def sync( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -142,7 +144,8 @@ async def asyncio_detailed( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -174,7 +177,8 @@ async def asyncio( body (DiffractionPlanOptional): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/tomograms/get_tomogram_tomograms_tomogram_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/tomograms/get_tomogram_tomograms_tomogram_id_get.py index 643d90e..5fef196 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/tomograms/get_tomogram_tomograms_tomogram_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/tomograms/get_tomogram_tomograms_tomogram_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( tomogram_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( tomogram_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( tomogram_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( tomogram_id (int): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_ldap_search_params_user_groups_search_params_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_ldap_search_params_user_groups_search_params_get.py index 6c7ee57..29d695e 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_ldap_search_params_user_groups_search_params_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_ldap_search_params_user_groups_search_params_get.py @@ -79,7 +79,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -114,7 +115,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -144,7 +146,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -177,7 +180,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py index e963b73..8232c37 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_ldap_search_params_user_groups_usergroup_id_search_params_get.py @@ -85,7 +85,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -123,7 +124,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -156,7 +158,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -192,7 +195,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_user_groups_usergroup_id_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_user_groups_usergroup_id_get.py index c043710..92103db 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_user_groups_usergroup_id_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroup_user_groups_usergroup_id_get.py @@ -68,7 +68,8 @@ def sync_detailed( usergroup_id (str): User group ID or usergroup name Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -99,7 +100,8 @@ def sync( usergroup_id (str): User group ID or usergroup name Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -125,7 +127,8 @@ async def asyncio_detailed( usergroup_id (str): User group ID or usergroup name Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +157,8 @@ async def asyncio( usergroup_id (str): User group ID or usergroup name Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroups_user_groups_get.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroups_user_groups_get.py index b4e5df0..18a6339 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroups_user_groups_get.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/get_usergroups_user_groups_get.py @@ -79,7 +79,8 @@ def sync_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -114,7 +115,8 @@ def sync( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -144,7 +146,8 @@ async def asyncio_detailed( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -177,7 +180,8 @@ async def asyncio( limit (int | Unset): Number of results to show Default: 25. Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py index 4b7c068..efb69b5 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/include_persons_in_usergroup_user_groups_usergroup_id_persons_post.py @@ -86,7 +86,8 @@ def sync_detailed( body (PersonListNumeric | PersonListStr | PersonListUuid): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -120,7 +121,8 @@ def sync( body (PersonListNumeric | PersonListStr | PersonListUuid): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -149,7 +151,8 @@ async def asyncio_detailed( body (PersonListNumeric | PersonListStr | PersonListUuid): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -181,7 +184,8 @@ async def asyncio( body (PersonListNumeric | PersonListStr | PersonListUuid): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py index aa6642c..d756b98 100644 --- a/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py +++ b/src/lims_utils/expeye_client/UNSTABLE_api/user_groups/remove_person_from_usergroup_user_groups_usergroup_id_persons_person_delete.py @@ -85,7 +85,8 @@ def sync_detailed( person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -122,7 +123,8 @@ def sync( person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -154,7 +156,8 @@ async def asyncio_detailed( person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: @@ -189,7 +192,8 @@ async def asyncio( person_as (RemovePersonFromUsergroupUserGroupsUsergroupIdPersonsPersonDeletePersonas): Raises: - errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + errors.UnexpectedStatus: If the server returns an undocumented status code and + Client.raise_on_unexpected_status is True. httpx2.TimeoutException: If the request takes longer than Client.timeout. Returns: diff --git a/src/lims_utils/expeye_client/client.py b/src/lims_utils/expeye_client/client.py index 136b83d..8de28d9 100644 --- a/src/lims_utils/expeye_client/client.py +++ b/src/lims_utils/expeye_client/client.py @@ -20,12 +20,13 @@ class Client: ``timeout``: The maximum amount of a time a request can take. API functions will raise httpx2.TimeoutException if this is exceeded. - ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, - but can be set to False for testing purposes. + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in + but can be set to False for testing purposes. ``follow_redirects``: Whether or not to follow redirects. Default value is False. - ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx2.Client`` and ``httpx2.AsyncClient`` constructor. + ``httpx_args``: Additional arguments passed to the ``httpx2.Client`` and + ``httpx2.AsyncClient`` constructors. Attributes: @@ -147,12 +148,13 @@ class AuthenticatedClient: ``timeout``: The maximum amount of a time a request can take. API functions will raise httpx2.TimeoutException if this is exceeded. - ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production, - but can be set to False for testing purposes. + ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in + but can be set to False for testing purposes. ``follow_redirects``: Whether or not to follow redirects. Default value is False. - ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx2.Client`` and ``httpx2.AsyncClient`` constructor. + ``httpx_args``: Additional arguments passed to the ``httpx2.Client`` and + ``httpx2.AsyncClient`` constructors. Attributes: diff --git a/src/lims_utils/expeye_client/errors.py b/src/lims_utils/expeye_client/errors.py index 5f92e76..b706f35 100644 --- a/src/lims_utils/expeye_client/errors.py +++ b/src/lims_utils/expeye_client/errors.py @@ -2,7 +2,8 @@ class UnexpectedStatus(Exception): - """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" + """Raised by API functions when the response status is undocumented and + Client.raise_on_unexpected_status is True.""" def __init__(self, status_code: int, content: bytes): self.status_code = status_code diff --git a/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py b/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py index 937355b..8a31556 100644 --- a/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py +++ b/src/lims_utils/expeye_client/models/auto_proc_program_with_auto_proc_out.py @@ -184,8 +184,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.auto_proc_integration_out import AutoProcIntegrationOut # noqa: PLC0415 - from ..models.auto_proc_with_scaling_out import AutoProcWithScalingOut # noqa: PLC0415 + from ..models.auto_proc_integration_out import AutoProcIntegrationOut + from ..models.auto_proc_with_scaling_out import AutoProcWithScalingOut d = dict(src_dict) auto_proc_program_id = d.pop("autoProcProgramId") diff --git a/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py b/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py index be4a01d..080c6da 100644 --- a/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py +++ b/src/lims_utils/expeye_client/models/auto_proc_with_scaling_out.py @@ -46,7 +46,7 @@ class AutoProcWithScalingOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut # noqa: PLC0415 + from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut auto_proc_id = self.auto_proc_id @@ -148,7 +148,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut # noqa: PLC0415 + from ..models.auto_proc_scaling_statistics_out import AutoProcScalingStatisticsOut d = dict(src_dict) auto_proc_id = d.pop("autoProcId") diff --git a/src/lims_utils/expeye_client/models/container_with_children_in.py b/src/lims_utils/expeye_client/models/container_with_children_in.py index 8973956..ef7f05d 100644 --- a/src/lims_utils/expeye_client/models/container_with_children_in.py +++ b/src/lims_utils/expeye_client/models/container_with_children_in.py @@ -193,7 +193,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sample_with_crystal_in import SampleWithCrystalIn # noqa: PLC0415 + from ..models.sample_with_crystal_in import SampleWithCrystalIn d = dict(src_dict) children = [] diff --git a/src/lims_utils/expeye_client/models/container_with_children_out.py b/src/lims_utils/expeye_client/models/container_with_children_out.py index 0456904..4cfd514 100644 --- a/src/lims_utils/expeye_client/models/container_with_children_out.py +++ b/src/lims_utils/expeye_client/models/container_with_children_out.py @@ -221,7 +221,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sample_out import SampleOut # noqa: PLC0415 + from ..models.sample_out import SampleOut d = dict(src_dict) container_id = d.pop("containerId") diff --git a/src/lims_utils/expeye_client/models/dewar_in.py b/src/lims_utils/expeye_client/models/dewar_in.py index a871fd3..55cb799 100644 --- a/src/lims_utils/expeye_client/models/dewar_in.py +++ b/src/lims_utils/expeye_client/models/dewar_in.py @@ -55,7 +55,7 @@ class DewarIn: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 weight: float | None | Unset if isinstance(self.weight, Unset): @@ -189,7 +189,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_in_extra_type_0_type_0 import DewarInExtraType0Type0 d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/dewar_optional.py b/src/lims_utils/expeye_client/models/dewar_optional.py index 75d8b29..a2824c8 100644 --- a/src/lims_utils/expeye_client/models/dewar_optional.py +++ b/src/lims_utils/expeye_client/models/dewar_optional.py @@ -55,7 +55,7 @@ class DewarOptional: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 weight: float | None | Unset if isinstance(self.weight, Unset): @@ -189,7 +189,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_optional_extra_type_0_type_0 import DewarOptionalExtraType0Type0 d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/dewar_out.py b/src/lims_utils/expeye_client/models/dewar_out.py index bd6c2e0..d7086c2 100644 --- a/src/lims_utils/expeye_client/models/dewar_out.py +++ b/src/lims_utils/expeye_client/models/dewar_out.py @@ -59,7 +59,7 @@ class DewarOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 dewar_id = self.dewar_id @@ -202,7 +202,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_out_extra_type_0_type_0 import DewarOutExtraType0Type0 d = dict(src_dict) dewar_id = d.pop("dewarId") diff --git a/src/lims_utils/expeye_client/models/dewar_with_children_in.py b/src/lims_utils/expeye_client/models/dewar_with_children_in.py index 8a9cfc9..3f96973 100644 --- a/src/lims_utils/expeye_client/models/dewar_with_children_in.py +++ b/src/lims_utils/expeye_client/models/dewar_with_children_in.py @@ -58,7 +58,9 @@ class DewarWithChildrenIn: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dewar_with_children_in_extra_type_0_type_0 import DewarWithChildrenInExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_with_children_in_extra_type_0_type_0 import ( + DewarWithChildrenInExtraType0Type0, + ) children = [] for children_item_data in self.children: @@ -201,8 +203,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.container_with_children_in import ContainerWithChildrenIn # noqa: PLC0415 - from ..models.dewar_with_children_in_extra_type_0_type_0 import DewarWithChildrenInExtraType0Type0 # noqa: PLC0415 + from ..models.container_with_children_in import ContainerWithChildrenIn + from ..models.dewar_with_children_in_extra_type_0_type_0 import ( + DewarWithChildrenInExtraType0Type0, + ) d = dict(src_dict) children = [] diff --git a/src/lims_utils/expeye_client/models/dewar_with_children_out.py b/src/lims_utils/expeye_client/models/dewar_with_children_out.py index 7991d06..f7f7530 100644 --- a/src/lims_utils/expeye_client/models/dewar_with_children_out.py +++ b/src/lims_utils/expeye_client/models/dewar_with_children_out.py @@ -62,7 +62,9 @@ class DewarWithChildrenOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dewar_with_children_out_extra_type_0_type_0 import DewarWithChildrenOutExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_with_children_out_extra_type_0_type_0 import ( + DewarWithChildrenOutExtraType0Type0, + ) dewar_id = self.dewar_id @@ -214,8 +216,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.container_with_children_out import ContainerWithChildrenOut # noqa: PLC0415 - from ..models.dewar_with_children_out_extra_type_0_type_0 import DewarWithChildrenOutExtraType0Type0 # noqa: PLC0415 + from ..models.container_with_children_out import ContainerWithChildrenOut + from ..models.dewar_with_children_out_extra_type_0_type_0 import ( + DewarWithChildrenOutExtraType0Type0, + ) d = dict(src_dict) dewar_id = d.pop("dewarId") diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_in.py b/src/lims_utils/expeye_client/models/diffraction_plan_in.py index 5d83b06..afb4b33 100644 --- a/src/lims_utils/expeye_client/models/diffraction_plan_in.py +++ b/src/lims_utils/expeye_client/models/diffraction_plan_in.py @@ -149,8 +149,12 @@ class DiffractionPlanIn: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import DiffractionPlanInScanParametersType0Type0 # noqa: PLC0415 - from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 + from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import ( + DiffractionPlanInScanParametersType0Type0, + ) + from ..models.string_serialised_strategy_option_type_0 import ( + StringSerialisedStrategyOptionType0, + ) name: None | str | Unset if isinstance(self.name, Unset): @@ -652,8 +656,12 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import DiffractionPlanInScanParametersType0Type0 # noqa: PLC0415 - from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 + from ..models.diffraction_plan_in_scan_parameters_type_0_type_0 import ( + DiffractionPlanInScanParametersType0Type0, + ) + from ..models.string_serialised_strategy_option_type_0 import ( + StringSerialisedStrategyOptionType0, + ) d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_optional.py b/src/lims_utils/expeye_client/models/diffraction_plan_optional.py index 8512b09..99ac4c4 100644 --- a/src/lims_utils/expeye_client/models/diffraction_plan_optional.py +++ b/src/lims_utils/expeye_client/models/diffraction_plan_optional.py @@ -152,9 +152,11 @@ class DiffractionPlanOptional: def to_dict(self) -> dict[str, Any]: from ..models.diffraction_plan_optional_scan_parameters_type_0_type_0 import ( - DiffractionPlanOptionalScanParametersType0Type0, # noqa: PLC0415 + DiffractionPlanOptionalScanParametersType0Type0, + ) + from ..models.string_serialised_strategy_option_type_0 import ( + StringSerialisedStrategyOptionType0, ) - from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 name: None | str | Unset if isinstance(self.name, Unset): @@ -657,9 +659,11 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.diffraction_plan_optional_scan_parameters_type_0_type_0 import ( - DiffractionPlanOptionalScanParametersType0Type0, # noqa: PLC0415 + DiffractionPlanOptionalScanParametersType0Type0, + ) + from ..models.string_serialised_strategy_option_type_0 import ( + StringSerialisedStrategyOptionType0, ) - from ..models.string_serialised_strategy_option_type_0 import StringSerialisedStrategyOptionType0 # noqa: PLC0415 d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/diffraction_plan_out.py b/src/lims_utils/expeye_client/models/diffraction_plan_out.py index d5a9622..82286f6 100644 --- a/src/lims_utils/expeye_client/models/diffraction_plan_out.py +++ b/src/lims_utils/expeye_client/models/diffraction_plan_out.py @@ -155,9 +155,9 @@ class DiffractionPlanOut: def to_dict(self) -> dict[str, Any]: from ..models.diffraction_plan_out_scan_parameters_type_0_type_0 import ( - DiffractionPlanOutScanParametersType0Type0, # noqa: PLC0415 + DiffractionPlanOutScanParametersType0Type0, ) - from ..models.strategy_option import StrategyOption # noqa: PLC0415 + from ..models.strategy_option import StrategyOption diffraction_plan_id = self.diffraction_plan_id @@ -669,9 +669,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.diffraction_plan_out_scan_parameters_type_0_type_0 import ( - DiffractionPlanOutScanParametersType0Type0, # noqa: PLC0415 + DiffractionPlanOutScanParametersType0Type0, ) - from ..models.strategy_option import StrategyOption # noqa: PLC0415 + from ..models.strategy_option import StrategyOption d = dict(src_dict) diffraction_plan_id = d.pop("diffractionPlanId") diff --git a/src/lims_utils/expeye_client/models/full_movie_optional.py b/src/lims_utils/expeye_client/models/full_movie_optional.py index 82cdf93..b155373 100644 --- a/src/lims_utils/expeye_client/models/full_movie_optional.py +++ b/src/lims_utils/expeye_client/models/full_movie_optional.py @@ -33,7 +33,7 @@ class FullMovieOptional: tilt_image_alignment: None | TiltImageAlignmentOptional | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional # noqa: PLC0415 + from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional movie: dict[str, Any] | Unset = UNSET if not isinstance(self.movie, Unset): @@ -71,10 +71,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.ctf_base import CTFBase # noqa: PLC0415 - from ..models.motion_correction_optional import MotionCorrectionOptional # noqa: PLC0415 - from ..models.movie_optional import MovieOptional # noqa: PLC0415 - from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional # noqa: PLC0415 + from ..models.ctf_base import CTFBase + from ..models.motion_correction_optional import MotionCorrectionOptional + from ..models.movie_optional import MovieOptional + from ..models.tilt_image_alignment_optional import TiltImageAlignmentOptional d = dict(src_dict) _movie = d.pop("movie", UNSET) diff --git a/src/lims_utils/expeye_client/models/full_movie_out.py b/src/lims_utils/expeye_client/models/full_movie_out.py index 0633adc..1df811b 100644 --- a/src/lims_utils/expeye_client/models/full_movie_out.py +++ b/src/lims_utils/expeye_client/models/full_movie_out.py @@ -31,7 +31,7 @@ class FullMovieOut: tilt_image_alignment: None | TiltImageAlignmentOut def to_dict(self) -> dict[str, Any]: - from ..models.tilt_image_alignment_out import TiltImageAlignmentOut # noqa: PLC0415 + from ..models.tilt_image_alignment_out import TiltImageAlignmentOut ctf = self.ctf.to_dict() @@ -60,10 +60,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.ctf_out import CTFOut # noqa: PLC0415 - from ..models.motion_correction_out import MotionCorrectionOut # noqa: PLC0415 - from ..models.movie_out import MovieOut # noqa: PLC0415 - from ..models.tilt_image_alignment_out import TiltImageAlignmentOut # noqa: PLC0415 + from ..models.ctf_out import CTFOut + from ..models.motion_correction_out import MotionCorrectionOut + from ..models.movie_out import MovieOut + from ..models.tilt_image_alignment_out import TiltImageAlignmentOut d = dict(src_dict) ctf = CTFOut.from_dict(d.pop("CTF")) diff --git a/src/lims_utils/expeye_client/models/http_validation_error.py b/src/lims_utils/expeye_client/models/http_validation_error.py index 3275f36..195e5a7 100644 --- a/src/lims_utils/expeye_client/models/http_validation_error.py +++ b/src/lims_utils/expeye_client/models/http_validation_error.py @@ -43,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.validation_error import ValidationError # noqa: PLC0415 + from ..models.validation_error import ValidationError d = dict(src_dict) _detail = d.pop("detail", UNSET) diff --git a/src/lims_utils/expeye_client/models/laser_action_in.py b/src/lims_utils/expeye_client/models/laser_action_in.py index 884e1b5..a013777 100644 --- a/src/lims_utils/expeye_client/models/laser_action_in.py +++ b/src/lims_utils/expeye_client/models/laser_action_in.py @@ -47,8 +47,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.laser_parameters_in import LaserParametersIn # noqa: PLC0415 - from ..models.laser_point_in import LaserPointIn # noqa: PLC0415 + from ..models.laser_parameters_in import LaserParametersIn + from ..models.laser_point_in import LaserPointIn d = dict(src_dict) parameters = LaserParametersIn.from_dict(d.pop("parameters")) diff --git a/src/lims_utils/expeye_client/models/laser_action_out.py b/src/lims_utils/expeye_client/models/laser_action_out.py index b507bbd..bfdb9ad 100644 --- a/src/lims_utils/expeye_client/models/laser_action_out.py +++ b/src/lims_utils/expeye_client/models/laser_action_out.py @@ -47,8 +47,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.laser_parameters_out import LaserParametersOut # noqa: PLC0415 - from ..models.laser_point_out import LaserPointOut # noqa: PLC0415 + from ..models.laser_parameters_out import LaserParametersOut + from ..models.laser_point_out import LaserPointOut d = dict(src_dict) parameters = LaserParametersOut.from_dict(d.pop("parameters")) diff --git a/src/lims_utils/expeye_client/models/laser_point_list_in.py b/src/lims_utils/expeye_client/models/laser_point_list_in.py index edf9e41..be43f2c 100644 --- a/src/lims_utils/expeye_client/models/laser_point_list_in.py +++ b/src/lims_utils/expeye_client/models/laser_point_list_in.py @@ -41,7 +41,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.laser_point_in import LaserPointIn # noqa: PLC0415 + from ..models.laser_point_in import LaserPointIn d = dict(src_dict) points = [] diff --git a/src/lims_utils/expeye_client/models/mx_lims_dewar.py b/src/lims_utils/expeye_client/models/mx_lims_dewar.py index 6bcbe87..158bc58 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_dewar.py +++ b/src/lims_utils/expeye_client/models/mx_lims_dewar.py @@ -74,9 +74,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_dewar_containerref import MxLimsDewarContainerref # noqa: PLC0415 - from ..models.mx_lims_dewar_identifiers import MxLimsDewarIdentifiers # noqa: PLC0415 - from ..models.mx_lims_dewar_urls import MxLimsDewarUrls # noqa: PLC0415 + from ..models.mx_lims_dewar_containerref import MxLimsDewarContainerref + from ..models.mx_lims_dewar_identifiers import MxLimsDewarIdentifiers + from ..models.mx_lims_dewar_urls import MxLimsDewarUrls d = dict(src_dict) mxlims_type = d.pop("mxlimsType") diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py index 4453aa2..3a70e6a 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment.py @@ -75,12 +75,14 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_full_shipment_dewar import MxLimsFullShipmentDewar # noqa: PLC0415 - from ..models.mx_lims_full_shipment_macromolecule import MxLimsFullShipmentMacromolecule # noqa: PLC0415 - from ..models.mx_lims_full_shipment_macromoleculesample import MxLimsFullShipmentMacromoleculesample # noqa: PLC0415 - from ..models.mx_lims_full_shipment_pin import MxLimsFullShipmentPin # noqa: PLC0415 - from ..models.mx_lims_full_shipment_puck import MxLimsFullShipmentPuck # noqa: PLC0415 - from ..models.mx_lims_full_shipment_shipment import MxLimsFullShipmentShipment # noqa: PLC0415 + from ..models.mx_lims_full_shipment_dewar import MxLimsFullShipmentDewar + from ..models.mx_lims_full_shipment_macromolecule import MxLimsFullShipmentMacromolecule + from ..models.mx_lims_full_shipment_macromoleculesample import ( + MxLimsFullShipmentMacromoleculesample, + ) + from ..models.mx_lims_full_shipment_pin import MxLimsFullShipmentPin + from ..models.mx_lims_full_shipment_puck import MxLimsFullShipmentPuck + from ..models.mx_lims_full_shipment_shipment import MxLimsFullShipmentShipment d = dict(src_dict) version = MxLimsFullShipmentVersion(d.pop("version")) diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py index 28ef44f..91d62ef 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_dewar.py @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_dewar import MxLimsDewar # noqa: PLC0415 + from ..models.mx_lims_dewar import MxLimsDewar d = dict(src_dict) mx_lims_full_shipment_dewar = cls() diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py index 0056346..b8d9373 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromolecule.py @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_macromolecule import MxLimsMacromolecule # noqa: PLC0415 + from ..models.mx_lims_macromolecule import MxLimsMacromolecule d = dict(src_dict) mx_lims_full_shipment_macromolecule = cls() diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py index 4197158..e5fff0b 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_macromoleculesample.py @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_macromolecule_sample import MxLimsMacromoleculeSample # noqa: PLC0415 + from ..models.mx_lims_macromolecule_sample import MxLimsMacromoleculeSample d = dict(src_dict) mx_lims_full_shipment_macromoleculesample = cls() diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py index b4791e8..12f4300 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_pin.py @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_pin import MxLimsPin # noqa: PLC0415 + from ..models.mx_lims_pin import MxLimsPin d = dict(src_dict) mx_lims_full_shipment_pin = cls() diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py index c3da6d1..a6ab3a0 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_puck.py @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_puck import MxLimsPuck # noqa: PLC0415 + from ..models.mx_lims_puck import MxLimsPuck d = dict(src_dict) mx_lims_full_shipment_puck = cls() diff --git a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py index 68da14a..52a0bd5 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py +++ b/src/lims_utils/expeye_client/models/mx_lims_full_shipment_shipment.py @@ -27,7 +27,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_shipment import MxLimsShipment # noqa: PLC0415 + from ..models.mx_lims_shipment import MxLimsShipment d = dict(src_dict) mx_lims_full_shipment_shipment = cls() diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py index 544f159..3956dbc 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule.py @@ -68,8 +68,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_macromolecule_identifiers import MxLimsMacromoleculeIdentifiers # noqa: PLC0415 - from ..models.mx_lims_macromolecule_urls import MxLimsMacromoleculeUrls # noqa: PLC0415 + from ..models.mx_lims_macromolecule_identifiers import MxLimsMacromoleculeIdentifiers + from ..models.mx_lims_macromolecule_urls import MxLimsMacromoleculeUrls d = dict(src_dict) mxlims_type = d.pop("mxlimsType") diff --git a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py index 8245484..73ca973 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py +++ b/src/lims_utils/expeye_client/models/mx_lims_macromolecule_sample.py @@ -74,9 +74,13 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_macromolecule_sample_identifiers import MxLimsMacromoleculeSampleIdentifiers # noqa: PLC0415 - from ..models.mx_lims_macromolecule_sample_parentsampleref import MxLimsMacromoleculeSampleParentsampleref # noqa: PLC0415 - from ..models.mx_lims_macromolecule_sample_urls import MxLimsMacromoleculeSampleUrls # noqa: PLC0415 + from ..models.mx_lims_macromolecule_sample_identifiers import ( + MxLimsMacromoleculeSampleIdentifiers, + ) + from ..models.mx_lims_macromolecule_sample_parentsampleref import ( + MxLimsMacromoleculeSampleParentsampleref, + ) + from ..models.mx_lims_macromolecule_sample_urls import MxLimsMacromoleculeSampleUrls d = dict(src_dict) mxlims_type = d.pop("mxlimsType") diff --git a/src/lims_utils/expeye_client/models/mx_lims_pin.py b/src/lims_utils/expeye_client/models/mx_lims_pin.py index b2a7618..21826a9 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_pin.py +++ b/src/lims_utils/expeye_client/models/mx_lims_pin.py @@ -91,10 +91,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_pin_containerref import MxLimsPinContainerref # noqa: PLC0415 - from ..models.mx_lims_pin_identifiers import MxLimsPinIdentifiers # noqa: PLC0415 - from ..models.mx_lims_pin_sampleref import MxLimsPinSampleref # noqa: PLC0415 - from ..models.mx_lims_pin_urls import MxLimsPinUrls # noqa: PLC0415 + from ..models.mx_lims_pin_containerref import MxLimsPinContainerref + from ..models.mx_lims_pin_identifiers import MxLimsPinIdentifiers + from ..models.mx_lims_pin_sampleref import MxLimsPinSampleref + from ..models.mx_lims_pin_urls import MxLimsPinUrls d = dict(src_dict) uuid = UUID(d.pop("uuid")) diff --git a/src/lims_utils/expeye_client/models/mx_lims_puck.py b/src/lims_utils/expeye_client/models/mx_lims_puck.py index c4a7b6b..f126d8a 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_puck.py +++ b/src/lims_utils/expeye_client/models/mx_lims_puck.py @@ -79,9 +79,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_puck_containerref import MxLimsPuckContainerref # noqa: PLC0415 - from ..models.mx_lims_puck_identifiers import MxLimsPuckIdentifiers # noqa: PLC0415 - from ..models.mx_lims_puck_urls import MxLimsPuckUrls # noqa: PLC0415 + from ..models.mx_lims_puck_containerref import MxLimsPuckContainerref + from ..models.mx_lims_puck_identifiers import MxLimsPuckIdentifiers + from ..models.mx_lims_puck_urls import MxLimsPuckUrls d = dict(src_dict) mxlims_type = d.pop("mxlimsType") diff --git a/src/lims_utils/expeye_client/models/mx_lims_shipment.py b/src/lims_utils/expeye_client/models/mx_lims_shipment.py index b9cac75..f4ddff8 100644 --- a/src/lims_utils/expeye_client/models/mx_lims_shipment.py +++ b/src/lims_utils/expeye_client/models/mx_lims_shipment.py @@ -79,9 +79,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mx_lims_contact import MxLimsContact # noqa: PLC0415 - from ..models.mx_lims_shipment_identifiers import MxLimsShipmentIdentifiers # noqa: PLC0415 - from ..models.mx_lims_shipment_urls import MxLimsShipmentUrls # noqa: PLC0415 + from ..models.mx_lims_contact import MxLimsContact + from ..models.mx_lims_shipment_identifiers import MxLimsShipmentIdentifiers + from ..models.mx_lims_shipment_urls import MxLimsShipmentUrls d = dict(src_dict) mxlims_type = d.pop("mxlimsType") diff --git a/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py b/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py index 8e5c225..02a7cb4 100644 --- a/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py +++ b/src/lims_utils/expeye_client/models/paged_auto_proc_program_attachment_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut # noqa: PLC0415 + from ..models.auto_proc_program_attachment_out import AutoProcProgramAttachmentOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py b/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py index 66a8d9d..ef11294 100644 --- a/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py +++ b/src/lims_utils/expeye_client/models/paged_auto_proc_program_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.auto_proc_program_out import AutoProcProgramOut # noqa: PLC0415 + from ..models.auto_proc_program_out import AutoProcProgramOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_container_history_out.py b/src/lims_utils/expeye_client/models/paged_container_history_out.py index 14c372c..e9eedb7 100644 --- a/src/lims_utils/expeye_client/models/paged_container_history_out.py +++ b/src/lims_utils/expeye_client/models/paged_container_history_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.container_history_out import ContainerHistoryOut # noqa: PLC0415 + from ..models.container_history_out import ContainerHistoryOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_container_inspection_out.py b/src/lims_utils/expeye_client/models/paged_container_inspection_out.py index d53bf52..2edb63e 100644 --- a/src/lims_utils/expeye_client/models/paged_container_inspection_out.py +++ b/src/lims_utils/expeye_client/models/paged_container_inspection_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.container_inspection_out import ContainerInspectionOut # noqa: PLC0415 + from ..models.container_inspection_out import ContainerInspectionOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_container_out.py b/src/lims_utils/expeye_client/models/paged_container_out.py index b63f5d5..7a2eec1 100644 --- a/src/lims_utils/expeye_client/models/paged_container_out.py +++ b/src/lims_utils/expeye_client/models/paged_container_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.container_out import ContainerOut # noqa: PLC0415 + from ..models.container_out import ContainerOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_container_queue_out.py b/src/lims_utils/expeye_client/models/paged_container_queue_out.py index f96dbf0..2e789a9 100644 --- a/src/lims_utils/expeye_client/models/paged_container_queue_out.py +++ b/src/lims_utils/expeye_client/models/paged_container_queue_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.container_queue_out import ContainerQueueOut # noqa: PLC0415 + from ..models.container_queue_out import ContainerQueueOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_crystal_out.py b/src/lims_utils/expeye_client/models/paged_crystal_out.py index c42810c..2e2e5bf 100644 --- a/src/lims_utils/expeye_client/models/paged_crystal_out.py +++ b/src/lims_utils/expeye_client/models/paged_crystal_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.crystal_out import CrystalOut # noqa: PLC0415 + from ..models.crystal_out import CrystalOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py index f14b8a2..9a1c674 100644 --- a/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py +++ b/src/lims_utils/expeye_client/models/paged_data_collection_comment_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_collection_comment_out import DataCollectionCommentOut # noqa: PLC0415 + from ..models.data_collection_comment_out import DataCollectionCommentOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py index eb2a709..1a82bd2 100644 --- a/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py +++ b/src/lims_utils/expeye_client/models/paged_data_collection_file_attachment_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut # noqa: PLC0415 + from ..models.data_collection_file_attachment_out import DataCollectionFileAttachmentOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py index 7505b64..5c49753 100644 --- a/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py +++ b/src/lims_utils/expeye_client/models/paged_data_collection_group_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_collection_group_out import DataCollectionGroupOut # noqa: PLC0415 + from ..models.data_collection_group_out import DataCollectionGroupOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_data_collection_out.py b/src/lims_utils/expeye_client/models/paged_data_collection_out.py index a5148b6..a50a2c4 100644 --- a/src/lims_utils/expeye_client/models/paged_data_collection_out.py +++ b/src/lims_utils/expeye_client/models/paged_data_collection_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.data_collection_out import DataCollectionOut # noqa: PLC0415 + from ..models.data_collection_out import DataCollectionOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_dewar_out.py b/src/lims_utils/expeye_client/models/paged_dewar_out.py index ea8f38d..4a895e5 100644 --- a/src/lims_utils/expeye_client/models/paged_dewar_out.py +++ b/src/lims_utils/expeye_client/models/paged_dewar_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_out import DewarOut # noqa: PLC0415 + from ..models.dewar_out import DewarOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py b/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py index 856050c..7595349 100644 --- a/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py +++ b/src/lims_utils/expeye_client/models/paged_dewar_transport_history_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_transport_history_out import DewarTransportHistoryOut # noqa: PLC0415 + from ..models.dewar_transport_history_out import DewarTransportHistoryOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py b/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py index 7300a43..fc8a91c 100644 --- a/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py +++ b/src/lims_utils/expeye_client/models/paged_diffraction_plan_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.diffraction_plan_out import DiffractionPlanOut # noqa: PLC0415 + from ..models.diffraction_plan_out import DiffractionPlanOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_energy_scan_out.py b/src/lims_utils/expeye_client/models/paged_energy_scan_out.py index 1066d6d..8893e45 100644 --- a/src/lims_utils/expeye_client/models/paged_energy_scan_out.py +++ b/src/lims_utils/expeye_client/models/paged_energy_scan_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.energy_scan_out import EnergyScanOut # noqa: PLC0415 + from ..models.energy_scan_out import EnergyScanOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py b/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py index 47dda15..0466527 100644 --- a/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py +++ b/src/lims_utils/expeye_client/models/paged_fluorescence_spectrum_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.fluorescence_spectrum_out import FluorescenceSpectrumOut # noqa: PLC0415 + from ..models.fluorescence_spectrum_out import FluorescenceSpectrumOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_foil_hole_out.py b/src/lims_utils/expeye_client/models/paged_foil_hole_out.py index eedfbaa..453fd44 100644 --- a/src/lims_utils/expeye_client/models/paged_foil_hole_out.py +++ b/src/lims_utils/expeye_client/models/paged_foil_hole_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.foil_hole_out import FoilHoleOut # noqa: PLC0415 + from ..models.foil_hole_out import FoilHoleOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_full_movie_out.py b/src/lims_utils/expeye_client/models/paged_full_movie_out.py index 26b9d4b..67e8bd4 100644 --- a/src/lims_utils/expeye_client/models/paged_full_movie_out.py +++ b/src/lims_utils/expeye_client/models/paged_full_movie_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.full_movie_out import FullMovieOut # noqa: PLC0415 + from ..models.full_movie_out import FullMovieOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_grid_info_out.py b/src/lims_utils/expeye_client/models/paged_grid_info_out.py index 6b32050..9c58d63 100644 --- a/src/lims_utils/expeye_client/models/paged_grid_info_out.py +++ b/src/lims_utils/expeye_client/models/paged_grid_info_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.grid_info_out import GridInfoOut # noqa: PLC0415 + from ..models.grid_info_out import GridInfoOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_grid_square_out.py b/src/lims_utils/expeye_client/models/paged_grid_square_out.py index daad3d9..17533e4 100644 --- a/src/lims_utils/expeye_client/models/paged_grid_square_out.py +++ b/src/lims_utils/expeye_client/models/paged_grid_square_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.grid_square_out import GridSquareOut # noqa: PLC0415 + from ..models.grid_square_out import GridSquareOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py b/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py index 4a78e98..006a967 100644 --- a/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py +++ b/src/lims_utils/expeye_client/models/paged_image_quality_indicator_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.image_quality_indicator_out import ImageQualityIndicatorOut # noqa: PLC0415 + from ..models.image_quality_indicator_out import ImageQualityIndicatorOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_ligand_out.py b/src/lims_utils/expeye_client/models/paged_ligand_out.py index 0d027cf..77c5cf6 100644 --- a/src/lims_utils/expeye_client/models/paged_ligand_out.py +++ b/src/lims_utils/expeye_client/models/paged_ligand_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.ligand_out import LigandOut # noqa: PLC0415 + from ..models.ligand_out import LigandOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_milling_step_out.py b/src/lims_utils/expeye_client/models/paged_milling_step_out.py index fbcb7ce..6283e90 100644 --- a/src/lims_utils/expeye_client/models/paged_milling_step_out.py +++ b/src/lims_utils/expeye_client/models/paged_milling_step_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.milling_step_out import MillingStepOut # noqa: PLC0415 + from ..models.milling_step_out import MillingStepOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py b/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py index 5b41f85..8d2abee 100644 --- a/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py +++ b/src/lims_utils/expeye_client/models/paged_mxmr_run_blob_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.mxmr_run_blob_out import MXMRRunBlobOut # noqa: PLC0415 + from ..models.mxmr_run_blob_out import MXMRRunBlobOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_pdb_out.py b/src/lims_utils/expeye_client/models/paged_pdb_out.py index e3159ee..8ec26cf 100644 --- a/src/lims_utils/expeye_client/models/paged_pdb_out.py +++ b/src/lims_utils/expeye_client/models/paged_pdb_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.pdb_out import PDBOut # noqa: PLC0415 + from ..models.pdb_out import PDBOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_person_out.py b/src/lims_utils/expeye_client/models/paged_person_out.py index ef42aa5..db79f6b 100644 --- a/src/lims_utils/expeye_client/models/paged_person_out.py +++ b/src/lims_utils/expeye_client/models/paged_person_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.person_out import PersonOut # noqa: PLC0415 + from ..models.person_out import PersonOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py b/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py index 950547b..ee2bfcc 100644 --- a/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py +++ b/src/lims_utils/expeye_client/models/paged_processing_job_with_auto_proc_program_out.py @@ -56,7 +56,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.processing_job_with_auto_proc_program_out import ProcessingJobWithAutoProcProgramOut # noqa: PLC0415 + from ..models.processing_job_with_auto_proc_program_out import ( + ProcessingJobWithAutoProcProgramOut, + ) d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_proposal_out.py b/src/lims_utils/expeye_client/models/paged_proposal_out.py index fbe97ae..25acbf6 100644 --- a/src/lims_utils/expeye_client/models/paged_proposal_out.py +++ b/src/lims_utils/expeye_client/models/paged_proposal_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.proposal_out import ProposalOut # noqa: PLC0415 + from ..models.proposal_out import ProposalOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_protein_out.py b/src/lims_utils/expeye_client/models/paged_protein_out.py index ff86b50..4d4f3ee 100644 --- a/src/lims_utils/expeye_client/models/paged_protein_out.py +++ b/src/lims_utils/expeye_client/models/paged_protein_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.protein_out import ProteinOut # noqa: PLC0415 + from ..models.protein_out import ProteinOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_registered_container_out.py b/src/lims_utils/expeye_client/models/paged_registered_container_out.py index 3becd7c..b38b984 100644 --- a/src/lims_utils/expeye_client/models/paged_registered_container_out.py +++ b/src/lims_utils/expeye_client/models/paged_registered_container_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.registered_container_out import RegisteredContainerOut # noqa: PLC0415 + from ..models.registered_container_out import RegisteredContainerOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py b/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py index 6d27ee3..84ff195 100644 --- a/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py +++ b/src/lims_utils/expeye_client/models/paged_registered_dewar_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.registered_dewar_out import RegisteredDewarOut # noqa: PLC0415 + from ..models.registered_dewar_out import RegisteredDewarOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_robot_action_out.py b/src/lims_utils/expeye_client/models/paged_robot_action_out.py index 647bb76..309f94a 100644 --- a/src/lims_utils/expeye_client/models/paged_robot_action_out.py +++ b/src/lims_utils/expeye_client/models/paged_robot_action_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.robot_action_out import RobotActionOut # noqa: PLC0415 + from ..models.robot_action_out import RobotActionOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_sample_image_out.py b/src/lims_utils/expeye_client/models/paged_sample_image_out.py index 4b34e08..20c2db6 100644 --- a/src/lims_utils/expeye_client/models/paged_sample_image_out.py +++ b/src/lims_utils/expeye_client/models/paged_sample_image_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sample_image_out import SampleImageOut # noqa: PLC0415 + from ..models.sample_image_out import SampleImageOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_sample_out.py b/src/lims_utils/expeye_client/models/paged_sample_out.py index ec6ff34..0f95cbd 100644 --- a/src/lims_utils/expeye_client/models/paged_sample_out.py +++ b/src/lims_utils/expeye_client/models/paged_sample_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sample_out import SampleOut # noqa: PLC0415 + from ..models.sample_out import SampleOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_sample_position_out.py b/src/lims_utils/expeye_client/models/paged_sample_position_out.py index 11d12fe..e554705 100644 --- a/src/lims_utils/expeye_client/models/paged_sample_position_out.py +++ b/src/lims_utils/expeye_client/models/paged_sample_position_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sample_position_out import SamplePositionOut # noqa: PLC0415 + from ..models.sample_position_out import SamplePositionOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py b/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py index 459ffcd..419d333 100644 --- a/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py +++ b/src/lims_utils/expeye_client/models/paged_session_event_with_children_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.session_event_with_children_out import SessionEventWithChildrenOut # noqa: PLC0415 + from ..models.session_event_with_children_out import SessionEventWithChildrenOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_session_out.py b/src/lims_utils/expeye_client/models/paged_session_out.py index fb1d691..914184e 100644 --- a/src/lims_utils/expeye_client/models/paged_session_out.py +++ b/src/lims_utils/expeye_client/models/paged_session_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.session_out import SessionOut # noqa: PLC0415 + from ..models.session_out import SessionOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_shipment_out.py b/src/lims_utils/expeye_client/models/paged_shipment_out.py index 140404a..c531bbb 100644 --- a/src/lims_utils/expeye_client/models/paged_shipment_out.py +++ b/src/lims_utils/expeye_client/models/paged_shipment_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.shipment_out import ShipmentOut # noqa: PLC0415 + from ..models.shipment_out import ShipmentOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_tomogram_out.py b/src/lims_utils/expeye_client/models/paged_tomogram_out.py index 3755d83..99167d9 100644 --- a/src/lims_utils/expeye_client/models/paged_tomogram_out.py +++ b/src/lims_utils/expeye_client/models/paged_tomogram_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.tomogram_out import TomogramOut # noqa: PLC0415 + from ..models.tomogram_out import TomogramOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py b/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py index a095681..a71e559 100644 --- a/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py +++ b/src/lims_utils/expeye_client/models/paged_union_session_event_out_session_event_with_children_out.py @@ -31,7 +31,7 @@ class PagedUnionSessionEventOutSessionEventWithChildrenOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.session_event_out import SessionEventOut # noqa: PLC0415 + from ..models.session_event_out import SessionEventOut items = [] for items_item_data in self.items: @@ -64,8 +64,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.session_event_out import SessionEventOut # noqa: PLC0415 - from ..models.session_event_with_children_out import SessionEventWithChildrenOut # noqa: PLC0415 + from ..models.session_event_out import SessionEventOut + from ..models.session_event_with_children_out import SessionEventWithChildrenOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py b/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py index 688b9e4..2aedabb 100644 --- a/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py +++ b/src/lims_utils/expeye_client/models/paged_user_group_has_person_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.user_group_has_person_out import UserGroupHasPersonOut # noqa: PLC0415 + from ..models.user_group_has_person_out import UserGroupHasPersonOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py b/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py index de2c16e..9d89b93 100644 --- a/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py +++ b/src/lims_utils/expeye_client/models/paged_user_group_ldap_search_params.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.user_group_ldap_search_params import UserGroupLDAPSearchParams # noqa: PLC0415 + from ..models.user_group_ldap_search_params import UserGroupLDAPSearchParams d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/paged_user_group_out.py b/src/lims_utils/expeye_client/models/paged_user_group_out.py index 6a818cb..dd8cd34 100644 --- a/src/lims_utils/expeye_client/models/paged_user_group_out.py +++ b/src/lims_utils/expeye_client/models/paged_user_group_out.py @@ -56,7 +56,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.user_group_out import UserGroupOut # noqa: PLC0415 + from ..models.user_group_out import UserGroupOut d = dict(src_dict) items = [] diff --git a/src/lims_utils/expeye_client/models/person_with_role.py b/src/lims_utils/expeye_client/models/person_with_role.py index 4b90880..652de54 100644 --- a/src/lims_utils/expeye_client/models/person_with_role.py +++ b/src/lims_utils/expeye_client/models/person_with_role.py @@ -59,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.person_in import PersonIn # noqa: PLC0415 + from ..models.person_in import PersonIn d = dict(src_dict) person = PersonIn.from_dict(d.pop("person")) diff --git a/src/lims_utils/expeye_client/models/processing_job_parameters_in.py b/src/lims_utils/expeye_client/models/processing_job_parameters_in.py index fb5d9ca..6fdfb71 100644 --- a/src/lims_utils/expeye_client/models/processing_job_parameters_in.py +++ b/src/lims_utils/expeye_client/models/processing_job_parameters_in.py @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.processing_job_parameters_in_items import ProcessingJobParametersInItems # noqa: PLC0415 + from ..models.processing_job_parameters_in_items import ProcessingJobParametersInItems d = dict(src_dict) items = ProcessingJobParametersInItems.from_dict(d.pop("items")) diff --git a/src/lims_utils/expeye_client/models/processing_job_parameters_out.py b/src/lims_utils/expeye_client/models/processing_job_parameters_out.py index 5bcbb84..7c70d03 100644 --- a/src/lims_utils/expeye_client/models/processing_job_parameters_out.py +++ b/src/lims_utils/expeye_client/models/processing_job_parameters_out.py @@ -38,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.processing_job_parameters_out_items import ProcessingJobParametersOutItems # noqa: PLC0415 + from ..models.processing_job_parameters_out_items import ProcessingJobParametersOutItems d = dict(src_dict) items = ProcessingJobParametersOutItems.from_dict(d.pop("items")) diff --git a/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py b/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py index 58f0c95..4aad4cd 100644 --- a/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py +++ b/src/lims_utils/expeye_client/models/processing_job_with_auto_proc_program_out.py @@ -102,7 +102,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.auto_proc_program_with_auto_proc_out import AutoProcProgramWithAutoProcOut # noqa: PLC0415 + from ..models.auto_proc_program_with_auto_proc_out import AutoProcProgramWithAutoProcOut d = dict(src_dict) processing_job_id = d.pop("processingJobId") diff --git a/src/lims_utils/expeye_client/models/proposal_with_children_out.py b/src/lims_utils/expeye_client/models/proposal_with_children_out.py index bfbeddb..49875c9 100644 --- a/src/lims_utils/expeye_client/models/proposal_with_children_out.py +++ b/src/lims_utils/expeye_client/models/proposal_with_children_out.py @@ -165,7 +165,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.shipment_with_children_out import ShipmentWithChildrenOut # noqa: PLC0415 + from ..models.shipment_with_children_out import ShipmentWithChildrenOut d = dict(src_dict) proposal_id = d.pop("proposalId") diff --git a/src/lims_utils/expeye_client/models/protein_with_crystals_in.py b/src/lims_utils/expeye_client/models/protein_with_crystals_in.py index 8b1ba85..b0eb991 100644 --- a/src/lims_utils/expeye_client/models/protein_with_crystals_in.py +++ b/src/lims_utils/expeye_client/models/protein_with_crystals_in.py @@ -47,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.crystal_in import CrystalIn # noqa: PLC0415 + from ..models.crystal_in import CrystalIn d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/protein_with_crystals_out.py b/src/lims_utils/expeye_client/models/protein_with_crystals_out.py index 0db8a13..fa7b241 100644 --- a/src/lims_utils/expeye_client/models/protein_with_crystals_out.py +++ b/src/lims_utils/expeye_client/models/protein_with_crystals_out.py @@ -169,7 +169,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.crystal_out import CrystalOut # noqa: PLC0415 + from ..models.crystal_out import CrystalOut d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/registered_dewar_out.py b/src/lims_utils/expeye_client/models/registered_dewar_out.py index fadcfff..740c3e4 100644 --- a/src/lims_utils/expeye_client/models/registered_dewar_out.py +++ b/src/lims_utils/expeye_client/models/registered_dewar_out.py @@ -89,7 +89,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.proposal_out import ProposalOut # noqa: PLC0415 + from ..models.proposal_out import ProposalOut d = dict(src_dict) facility_code = d.pop("facilityCode") diff --git a/src/lims_utils/expeye_client/models/sample_in.py b/src/lims_utils/expeye_client/models/sample_in.py index 7f23d4e..9c72bab 100644 --- a/src/lims_utils/expeye_client/models/sample_in.py +++ b/src/lims_utils/expeye_client/models/sample_in.py @@ -188,7 +188,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.sample_image_in import SampleImageIn # noqa: PLC0415 + from ..models.sample_image_in import SampleImageIn d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py b/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py index 50647e6..f3a82bc 100644 --- a/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py +++ b/src/lims_utils/expeye_client/models/sample_in_with_crystal_and_diffraction_plan.py @@ -60,8 +60,8 @@ class SampleInWithCrystalAndDiffractionPlan: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 - from ..models.diffraction_plan_in import DiffractionPlanIn # noqa: PLC0415 + from ..models.crystal_with_protein import CrystalWithProtein + from ..models.diffraction_plan_in import DiffractionPlanIn diffraction_plan_id: int | None | Unset if isinstance(self.diffraction_plan_id, Unset): @@ -217,9 +217,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 - from ..models.diffraction_plan_in import DiffractionPlanIn # noqa: PLC0415 - from ..models.sample_image_in import SampleImageIn # noqa: PLC0415 + from ..models.crystal_with_protein import CrystalWithProtein + from ..models.diffraction_plan_in import DiffractionPlanIn + from ..models.sample_image_in import SampleImageIn d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/sample_out.py b/src/lims_utils/expeye_client/models/sample_out.py index 51a0292..5099311 100644 --- a/src/lims_utils/expeye_client/models/sample_out.py +++ b/src/lims_utils/expeye_client/models/sample_out.py @@ -69,8 +69,8 @@ class SampleOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.crystal_out import CrystalOut # noqa: PLC0415 - from ..models.diffraction_plan_out import DiffractionPlanOut # noqa: PLC0415 + from ..models.crystal_out import CrystalOut + from ..models.diffraction_plan_out import DiffractionPlanOut bl_sample_id = self.bl_sample_id @@ -251,9 +251,9 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.crystal_out import CrystalOut # noqa: PLC0415 - from ..models.diffraction_plan_out import DiffractionPlanOut # noqa: PLC0415 - from ..models.sample_image_in import SampleImageIn # noqa: PLC0415 + from ..models.crystal_out import CrystalOut + from ..models.diffraction_plan_out import DiffractionPlanOut + from ..models.sample_image_in import SampleImageIn d = dict(src_dict) bl_sample_id = d.pop("blSampleId") diff --git a/src/lims_utils/expeye_client/models/sample_with_crystal_in.py b/src/lims_utils/expeye_client/models/sample_with_crystal_in.py index cb393e8..c8fad1f 100644 --- a/src/lims_utils/expeye_client/models/sample_with_crystal_in.py +++ b/src/lims_utils/expeye_client/models/sample_with_crystal_in.py @@ -52,7 +52,7 @@ class SampleWithCrystalIn: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 + from ..models.crystal_with_protein import CrystalWithProtein diffraction_plan_id: int | None | Unset if isinstance(self.diffraction_plan_id, Unset): @@ -176,7 +176,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.crystal_with_protein import CrystalWithProtein # noqa: PLC0415 + from ..models.crystal_with_protein import CrystalWithProtein d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/session_event_with_children_out.py b/src/lims_utils/expeye_client/models/session_event_with_children_out.py index 9a07fc6..65932b6 100644 --- a/src/lims_utils/expeye_client/models/session_event_with_children_out.py +++ b/src/lims_utils/expeye_client/models/session_event_with_children_out.py @@ -87,8 +87,8 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.auto_proc_program_scaling_out import AutoProcProgramScalingOut # noqa: PLC0415 - from ..models.session_event_out import SessionEventOut # noqa: PLC0415 + from ..models.auto_proc_program_scaling_out import AutoProcProgramScalingOut + from ..models.session_event_out import SessionEventOut d = dict(src_dict) type_ = d.pop("type") diff --git a/src/lims_utils/expeye_client/models/session_out.py b/src/lims_utils/expeye_client/models/session_out.py index a843fec..06311c1 100644 --- a/src/lims_utils/expeye_client/models/session_out.py +++ b/src/lims_utils/expeye_client/models/session_out.py @@ -227,7 +227,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.person_out import PersonOut # noqa: PLC0415 + from ..models.person_out import PersonOut d = dict(src_dict) proposal_id = d.pop("proposalId") diff --git a/src/lims_utils/expeye_client/models/shipment_in.py b/src/lims_utils/expeye_client/models/shipment_in.py index 9373159..fe6fca1 100644 --- a/src/lims_utils/expeye_client/models/shipment_in.py +++ b/src/lims_utils/expeye_client/models/shipment_in.py @@ -41,7 +41,7 @@ class ShipmentIn: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 creation_date: None | str | Unset if isinstance(self.creation_date, Unset): @@ -115,7 +115,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_in_extra_type_0_type_0 import ShipmentInExtraType0Type0 d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/shipment_optional.py b/src/lims_utils/expeye_client/models/shipment_optional.py index 67678bb..aa86e07 100644 --- a/src/lims_utils/expeye_client/models/shipment_optional.py +++ b/src/lims_utils/expeye_client/models/shipment_optional.py @@ -41,7 +41,7 @@ class ShipmentOptional: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 creation_date: None | str | Unset if isinstance(self.creation_date, Unset): @@ -115,7 +115,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_optional_extra_type_0_type_0 import ShipmentOptionalExtraType0Type0 d = dict(src_dict) diff --git a/src/lims_utils/expeye_client/models/shipment_out.py b/src/lims_utils/expeye_client/models/shipment_out.py index 95286a8..3a21be2 100644 --- a/src/lims_utils/expeye_client/models/shipment_out.py +++ b/src/lims_utils/expeye_client/models/shipment_out.py @@ -45,7 +45,7 @@ class ShipmentOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 shipping_id = self.shipping_id @@ -133,7 +133,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_out_extra_type_0_type_0 import ShipmentOutExtraType0Type0 d = dict(src_dict) shipping_id = d.pop("shippingId") diff --git a/src/lims_utils/expeye_client/models/shipment_with_children_in.py b/src/lims_utils/expeye_client/models/shipment_with_children_in.py index 5b570a1..806b6a1 100644 --- a/src/lims_utils/expeye_client/models/shipment_with_children_in.py +++ b/src/lims_utils/expeye_client/models/shipment_with_children_in.py @@ -44,7 +44,9 @@ class ShipmentWithChildrenIn: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shipment_with_children_in_extra_type_0_type_0 import ShipmentWithChildrenInExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_with_children_in_extra_type_0_type_0 import ( + ShipmentWithChildrenInExtraType0Type0, + ) children = [] for children_item_data in self.children: @@ -127,8 +129,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_with_children_in import DewarWithChildrenIn # noqa: PLC0415 - from ..models.shipment_with_children_in_extra_type_0_type_0 import ShipmentWithChildrenInExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_with_children_in import DewarWithChildrenIn + from ..models.shipment_with_children_in_extra_type_0_type_0 import ( + ShipmentWithChildrenInExtraType0Type0, + ) d = dict(src_dict) children = [] diff --git a/src/lims_utils/expeye_client/models/shipment_with_children_out.py b/src/lims_utils/expeye_client/models/shipment_with_children_out.py index 5a85d5b..af60d72 100644 --- a/src/lims_utils/expeye_client/models/shipment_with_children_out.py +++ b/src/lims_utils/expeye_client/models/shipment_with_children_out.py @@ -48,7 +48,9 @@ class ShipmentWithChildrenOut: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shipment_with_children_out_extra_type_0_type_0 import ShipmentWithChildrenOutExtraType0Type0 # noqa: PLC0415 + from ..models.shipment_with_children_out_extra_type_0_type_0 import ( + ShipmentWithChildrenOutExtraType0Type0, + ) shipping_id = self.shipping_id @@ -145,8 +147,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.dewar_with_children_out import DewarWithChildrenOut # noqa: PLC0415 - from ..models.shipment_with_children_out_extra_type_0_type_0 import ShipmentWithChildrenOutExtraType0Type0 # noqa: PLC0415 + from ..models.dewar_with_children_out import DewarWithChildrenOut + from ..models.shipment_with_children_out_extra_type_0_type_0 import ( + ShipmentWithChildrenOutExtraType0Type0, + ) d = dict(src_dict) shipping_id = d.pop("shippingId") diff --git a/src/lims_utils/expeye_client/models/shipping_data_out.py b/src/lims_utils/expeye_client/models/shipping_data_out.py index b16ff94..b4883e6 100644 --- a/src/lims_utils/expeye_client/models/shipping_data_out.py +++ b/src/lims_utils/expeye_client/models/shipping_data_out.py @@ -68,10 +68,10 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.lab_contact_out import LabContactOut # noqa: PLC0415 - from ..models.protein_out import ProteinOut # noqa: PLC0415 - from ..models.registered_container_out import RegisteredContainerOut # noqa: PLC0415 - from ..models.registered_dewar_out import RegisteredDewarOut # noqa: PLC0415 + from ..models.lab_contact_out import LabContactOut + from ..models.protein_out import ProteinOut + from ..models.registered_container_out import RegisteredContainerOut + from ..models.registered_dewar_out import RegisteredDewarOut d = dict(src_dict) lab_contacts = [] diff --git a/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py b/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py index d14bbc3..44d397d 100644 --- a/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py +++ b/src/lims_utils/expeye_client/models/user_group_ldap_search_params.py @@ -51,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.ldap_search_params import LDAPSearchParams # noqa: PLC0415 + from ..models.ldap_search_params import LDAPSearchParams d = dict(src_dict) user_group_id = d.pop("userGroupId") diff --git a/src/lims_utils/expeye_client/models/validation_error.py b/src/lims_utils/expeye_client/models/validation_error.py index 1d3f539..6df5a45 100644 --- a/src/lims_utils/expeye_client/models/validation_error.py +++ b/src/lims_utils/expeye_client/models/validation_error.py @@ -68,7 +68,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.validation_error_context import ValidationErrorContext # noqa: PLC0415 + from ..models.validation_error_context import ValidationErrorContext d = dict(src_dict) loc = [] From 896854a13b7b08bcc36e5545ff99d3ca28782a34 Mon Sep 17 00:00:00 2001 From: Manishi Barosee Date: Tue, 17 Nov 2026 13:28:40 +0000 Subject: [PATCH 5/6] LIMS-2498: omit expeye_client in coverage checks --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 055b80d..b6e4393 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,8 @@ omit = [ "__init__.py", "__main__.py", "_version.py", - "tables.py" + "tables.py", + "expeye_client", ] [tool.coverage.paths] From 8f5edf0e690bc788c938fda38f93e02d89aca984 Mon Sep 17 00:00:00 2001 From: Manishi Barosee Date: Tue, 17 Nov 2026 14:08:25 +0000 Subject: [PATCH 6/6] LIMS-2498: fix omit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b6e4393..ad2db60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ omit = [ "__main__.py", "_version.py", "tables.py", - "expeye_client", + "*/expeye_client/*", ] [tool.coverage.paths]